From 647c5dfc248832804bd9cf16faf5f7ba235e5ce6 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 31 Oct 2014 11:42:41 +0200 Subject: [PATCH 001/305] refs #9 - imported wsrep-5.5 branch from launchpad, revision 4027 http://bazaar.launchpad.net/~codership/codership-mysql/wsrep-5.5/revision/4027 --- Docs/README-wsrep | 488 +++++++++ cmake/wsrep.cmake | 61 ++ scripts/wsrep_sst_common.sh | 151 +++ scripts/wsrep_sst_mysqldump.sh | 126 +++ scripts/wsrep_sst_rsync.sh | 284 ++++++ scripts/wsrep_sst_xtrabackup-v2.sh | 917 +++++++++++++++++ scripts/wsrep_sst_xtrabackup.sh | 715 +++++++++++++ sql/wsrep_applier.cc | 362 +++++++ sql/wsrep_applier.h | 38 + sql/wsrep_binlog.cc | 378 +++++++ sql/wsrep_binlog.h | 52 + sql/wsrep_check_opts.cc | 379 +++++++ sql/wsrep_hton.cc | 567 +++++++++++ sql/wsrep_mysqld.cc | 1524 ++++++++++++++++++++++++++++ sql/wsrep_mysqld.h | 317 ++++++ sql/wsrep_notify.cc | 111 ++ sql/wsrep_priv.h | 51 + sql/wsrep_sst.cc | 1034 +++++++++++++++++++ sql/wsrep_sst.h | 40 + sql/wsrep_thd.cc | 508 ++++++++++ sql/wsrep_thd.h | 35 + sql/wsrep_utils.cc | 519 ++++++++++ sql/wsrep_utils.h | 208 ++++ sql/wsrep_var.cc | 626 ++++++++++++ sql/wsrep_var.h | 84 ++ support-files/wsrep.cnf.sh | 129 +++ support-files/wsrep_notify.sh | 102 ++ wsrep/CMakeLists.txt | 24 + wsrep/Makefile.am | 7 + wsrep/cmake_install.cmake | 34 + wsrep/wsrep_api.h | 1118 ++++++++++++++++++++ wsrep/wsrep_dummy.c | 407 ++++++++ wsrep/wsrep_gtid.c | 74 ++ wsrep/wsrep_loader.c | 203 ++++ wsrep/wsrep_uuid.c | 83 ++ 35 files changed, 11756 insertions(+) create mode 100644 Docs/README-wsrep create mode 100644 cmake/wsrep.cmake create mode 100644 scripts/wsrep_sst_common.sh create mode 100644 scripts/wsrep_sst_mysqldump.sh create mode 100644 scripts/wsrep_sst_rsync.sh create mode 100644 scripts/wsrep_sst_xtrabackup-v2.sh create mode 100644 scripts/wsrep_sst_xtrabackup.sh create mode 100644 sql/wsrep_applier.cc create mode 100644 sql/wsrep_applier.h create mode 100644 sql/wsrep_binlog.cc create mode 100644 sql/wsrep_binlog.h create mode 100644 sql/wsrep_check_opts.cc create mode 100644 sql/wsrep_hton.cc create mode 100644 sql/wsrep_mysqld.cc create mode 100644 sql/wsrep_mysqld.h create mode 100644 sql/wsrep_notify.cc create mode 100644 sql/wsrep_priv.h create mode 100644 sql/wsrep_sst.cc create mode 100644 sql/wsrep_sst.h create mode 100644 sql/wsrep_thd.cc create mode 100644 sql/wsrep_thd.h create mode 100644 sql/wsrep_utils.cc create mode 100644 sql/wsrep_utils.h create mode 100644 sql/wsrep_var.cc create mode 100644 sql/wsrep_var.h create mode 100644 support-files/wsrep.cnf.sh create mode 100644 support-files/wsrep_notify.sh create mode 100644 wsrep/CMakeLists.txt create mode 100644 wsrep/Makefile.am create mode 100644 wsrep/cmake_install.cmake create mode 100644 wsrep/wsrep_api.h create mode 100644 wsrep/wsrep_dummy.c create mode 100644 wsrep/wsrep_gtid.c create mode 100644 wsrep/wsrep_loader.c create mode 100644 wsrep/wsrep_uuid.c diff --git a/Docs/README-wsrep b/Docs/README-wsrep new file mode 100644 index 000000000000..422ec52f48a8 --- /dev/null +++ b/Docs/README-wsrep @@ -0,0 +1,488 @@ +Codership Oy +http://www.codership.com + + +DISCLAIMER + +THIS SOFTWARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +IN NO EVENT SHALL CODERSHIP OY BE HELD LIABLE TO ANY PARTY FOR ANY DAMAGES +RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE. + +Trademark Information. + +MySQL is a trademark or registered trademark of Oracle and/or its affiliates. +Other trademarks are the property of their respective owners. + +Licensing Information. + +Please see file COPYING that came with this distribution + +Source code can be found at +wsrep API: https://launchpad.net/wsrep +MySQL patch: https://launchpad.net/codership-mysql + + +ABOUT THIS DOCUMENT + +This document covers installation and configuration issues specific to this +wsrep-patched MySQL distribution by Codership. It does not cover the use or +administration of MySQL server per se. The reader is assumed to know how to +install, configure, administer and use standard MySQL server version 5.1.xx. + + + MYSQL-5.5.x/wsrep-23.x + +CONTENTS: +========= +1. WHAT IS WSREP PATCH FOR MYSQL +2. INSTALLATION +3. FIRST TIME SETUP + 3.1 CONFIGURATION FILES + 3.2 DATABASE PRIVILEGES + 3.3 CHECK AND CORRECT FIREWALL SETTINGS + 3.4 SELINUX + 3.5 APPARMOR + 3.6 CONNECT TO CLUSTER +4. UPGRADING FROM MySQL 5.1.x +5. CONFIGURATION OPTIONS + 5.1 MANDATORY MYSQL OPTIONS + 5.2 WSREP OPTIONS +6. ONLINE SCHEMA UPGRADE + 6.1 TOTAL ORDER ISOLATION (TOI) + 6.2 ROLLING SCHEMA UPGRADE (RSU) +7. LIMITATIONS + + +1. WHAT IS WSREP PATCH FOR MYSQL/INNODB + +Wsrep API developed by Codership Oy is a modern generic (database-agnostic) +replication API for transactional databases with a goal to make database +replication/logging subsystem completely modular and pluggable. It is developed +with flexibility and completeness in mind to satisfy broad range of modern +replication scenarios. It is equally suitable for synchronous and asynchronous, +master-slave and multi-master replication. + +wsrep stands for Write Set REPlication. + +Wsrep patch for MySQL/InnoDB allows MySQL server to load and use various wsrep +API implementations ("wsrep providers") with different qualities of service. +Without wsrep provider MySQL-wsrep server will function like a regular +standalone server. + + +2. INSTALLATION + +In the examples below mysql authentication options are omitted for brevity. + +2.1 Download and install mysql-wsrep package. + +Download binary package for your Linux distribution from +https://launchpad.net/codership-mysql/ + +2.1.1 On Debian and Debian-derived distributions. + +Upgrade from mysql-server-5.0 to mysql-wsrep is not supported yet, please +upgrade to mysql-server-5.1 first. + +If you're installing over an existing mysql installation, mysql-server-wsrep +will conflict with mysql-server-5.1 package, so remove it first: + +$ sudo apt-get remove mysql-server-5.1 mysql-server-core-5.1 + +mysql-server-wsrep requires psmisc and mysql-client-5.1.47 (or later). +MySQL 5.1 packages can be found from backports repositories. +For further information about configuring and using Debian or Ubuntu +backports, see: + +* http://backports.debian.org + +* https://help.ubuntu.com/community/UbuntuBackports + +For example, installation of required packages on Debian Lenny: + +$ sudo apt-get install psmisc +$ sudo apt-get -t lenny-backports install mysql-client-5.1 + +Now you should be able to install mysql-wsrep package: + +$ sudo dpkg -i + +2.1.2 On CentOS and similar RPM-based distributions. + +If you're migrating from existing MySQL installation, there are two variants: + + a) If you're already using official MySQL-server-community 5.1.x RPM from + Oracle: + + # rpm -e mysql-server + + b) If you're upgrading from the stock mysql-5.0.77 on CentOS: + + 1) Make sure that the following packages are not installed: + # rpm --nodeps --allmatches -e mysql-server mysql-test mysql-bench + + 2) Install *official* MySQL-shared-compat-5.1.x from + http://dev.mysql.com/downloads/mysql/5.1.html + +Actual installation: + + # rpm -Uvh + + If this fails due to unsatisfied dependencies, install missing packages + (e.g. yum install perl-DBI) and retry. + +Additional packages to consider (if not yet installed): + * galera (multi-master replication provider, https://launchpad.net/galera) + * MySQL-client-community (for connecting to server and mysqldump-based SST) + * rsync (for rsync-based SST) + * xtrabackup and nc (for xtrabackup-based SST) + +2.2 Upgrade system tables. + +If you're upgrading a previous MySQL installation, it might be advisable to +upgrade system tables. To do that start mysqld and run mysql_upgrade command. +Consult MySQL documentation in case of errors. Normally they are not critical +and can be ignored unless specific functionality is needed. + + +3. FIRST TIME SETUP + +Unless you're upgrading an already installed mysql-wsrep package, you will need +to set up a few things to prepare server for operation. + +3.1 CONFIGURATION FILES + +* Make sure system-wide my.cnf does not bind mysqld to 127.0.0.1. That is, if + you have the following line in [mysqld] section, comment it out: + + #bind-address = 127.0.0.1 + +* Make sure system-wide my.cnf contains "!includedir /etc/mysql/conf.d/" line. + +* Edit /etc/mysql/conf.d/wsrep.cnf and set wsrep_provider option by specifying + a path to provider library. If you don't have a provider, leave it as it is. + +* When a new node joins the cluster it'll have to receive a state snapshot from + one of the peers. This requires a privileged MySQL account with access from + the rest of the cluster. Edit /etc/mysql/conf.d/wsrep.cnf and set mysql + login/password pair for SST, for example: + + wsrep_sst_auth=wsrep_sst:wspass + +* See CONFIGURATION section below about other configuration parameters that you + might want to change at this point. + +3.2 DATABASE PRIVILEGES + +Restart MySQL server and connect to it as root to grant privileges to SST +account (empty users confuse MySQL authentication matching rules, we need to +delete them too): + +$ mysql -e "SET wsrep_on=OFF; DELETE FROM mysql.user WHERE user='';" +$ mysql -e "SET wsrep_on=OFF; GRANT ALL ON *.* TO wsrep_sst@'%' IDENTIFIED BY 'wspass'"; + +3.3 CHECK AND CORRECT FIREWALL SETTINGS. + +MySQL-wsrep server needs to be accessible from other cluster members through +its client listening socket and through wsrep provider socket. See your +distribution and wsrep provider documentation for details. For example on +CentOS you might need to do something along these lines: + +# iptables --insert RH-Firewall-1-INPUT 1 --proto tcp --source /24 --destination /32 --dport 3306 -j ACCEPT +# iptables --insert RH-Firewall-1-INPUT 1 --proto tcp --source /24 --destination /32 --dport 4567 -j ACCEPT + +If there is a NAT firewall between the nodes, it must be configured to allow +direct connections between the nodes (e.g. via port forwarding). + +3.4 SELINUX + +If you have SELinux enabled, it may block mysqld from doing required operations. +You'll need to either disable it or configure to allow mysqld to run external +programs and open listen sockets at unprivileged ports (i.e. things that +an unprivileged user can do). See SELinux documentation about it. + +To quickly disable SELinux: +1) run 'setenforce 0' as root. +2) set 'SELINUX=permissive' in /etc/selinux/config + +3.5 APPARMOR + +AppArmor automatically comes with Ubuntu and may also prevent mysqld to from +opening additional ports or run scripts. See AppArmor documentation about its +configuration. To disable AppArmor for mysqld: + +$ cd /etc/apparmor.d/disable/ +$ sudo ln -s /etc/apparmor.d/usr.sbin.mysqld +$ sudo service apparmor restart + + +3.6 CONNECT TO CLUSTER + +Now you're ready to connect to cluster by setting wsrep_cluster_address variable +and monitor status of wsrep provider: + +mysql> SET GLOBAL wsrep_cluster_address=''; +mysql> SHOW STATUS LIKE 'wsrep%'; + + +4 UPGRADING FROM MySQL 5.1.x + +!!! THESE INSTRUCTIONS ARE PRELIMINARY AND INCOMPLETE !!! + +1) BEFORE UPGRADE (while running 5.1.x): + - comment out 'wsrep_provider' setting from configuration files + (my.cnf and/or wsrep.cnf) + - If performing a rolling upgrade on a running cluster, set + wsrep_sst_method=mysqldump. + You might also need to configure wsrep_sst_receive_address and + wsrep_sst_auth appropriately. mysqldump is the only way to transfer data + from 5.1.x to 5.5.x reliably. + - remove innodb_plugin settings from configuration files. + +2) Perform upgrade as usual: + http://dev.mysql.com/doc/refman/5.5/en/upgrading-from-previous-series.html + Don't forget to run 'mysql_upgrade' command. + +3) AFTER UPGRADING individual node: + - uncomment 'wsrep_provider' line in configuration file. + - restart the server and join the cluster. + +4) AFTER UPGRADING the whole cluster: + - revert to usual wsrep SST settings if not 'mysqldump'. + + +5. CONFIGURATION OPTIONS + +5.1 MANDATORY MYSQL OPTIONS + +binlog_format=ROW + This option is required to use row-level replication as opposed to + statement-level. For performance and consistency considerations don't change + that. As a side effect, binlog, if turned on, can be ROW only. In future this + option won't have special meaning. + +innodb_autoinc_lock_mode=2 + This is a required parameter. Without it INSERTs into tables with + AUTO_INCREMENT column may fail. + autoinc lock modes 0 and 1 can cause unresolved deadlock, and make + system unresponsive. + +innodb_locks_unsafe_for_binlog=1 + This option is required for parallel applying. + +5.2 WSREP OPTIONS + +All options are optional except for wsrep_provider, wsrep_cluster_address, and +wsrep_sst_auth. + +wsrep_provider=none + A full path to the library that implements WSREP interface. If none is + specified, the server behaves like a regular mysqld. + +wsrep_provider_options= + Provider-specific option string. Check wsrep provider documentation or + http://www.codership.com/wiki + +wsrep_cluster_address= + Provider-specific cluster address string. This is used to connect a node to + the desired cluster. This option can be given either on mysqld startup or set + during runtime. See wsrep provider documentation for possible values. + +wsrep_cluster_name="my_wsrep_cluster" + Logical cluster name, must be the same for all nodes of the cluster. + +wsrep_node_address= + An option to explicitly specify the network address of the node in the form +
[:port] if autoguessing for some reason does not produce desirable + results (multiple network interfaces, NAT, etc.) + If not explicitly overridden by wsrep_sst_receive_address, the
part + will be used to listen for SST (see below). And the whole
[:port] + will be passed to wsrep provider to be used as a base address in its + communications. + +wsrep_node_name= + Human readable node name (for easier log reading only). Defaults to hostname. + +wsrep_slave_threads=1 + Number of threads dedicated to processing of writesets from other nodes. + For best performance should be few per CPU core. + +wsrep_dbug_option + Options for the built-in DBUG library (independent from what MySQL uses). + Empty by default. Not currently in use. + +wsrep_debug=0 + Enable debug-level logging. + +wsrep_convert_LOCK_to_trx=0 + Implicitly convert locking sessions into transactions inside mysqld. By + itself it does not mean support for locking sessions, but it prevents the + database from going into logically inconsistent state. Note however, that + loading large database dump with LOCK statements might result in abnormally + large transactions and cause an out-of-memory condition + +wsrep_retry_autocommit=1 + Retry autocommit queries and single statement transactions should they fail + certification test. This is analogous to rescheduling an autocommit query + should it go into deadlock with other transactions in the database lock + manager. + +wsrep_auto_increment_control=1 + Automatically adjust auto_increment_increment and auto_increment_offset + variables based on the number of nodes in the cluster. Significantly reduces + certification conflict rate for INSERTS. + +wsrep_drupal_282555_workaround=1 + MySQL seems to have an obscure bug when INSERT into table with + AUTO_INCREMENT column with NULL value for that column can fail with a + duplicate key error. When this option is on, it retries such INSERTs. + Required for stable Drupal operation. Documented at: + http://bugs.mysql.com/bug.php?id=41984 + http://drupal.org/node/282555 + +wsrep_causal_reads=0 + Enforce strict READ COMMITTED semantics on reads and transactions. May + result in additional latencies. It is a session variable. + +wsrep_OSU_method=TOI + Online Schema Upgrade (OSU) can be performed with two alternative methods: + Total Order Isolation (TOI) runs DDL statement in all cluster nodes in + same total order sequence locking the affected table for the duration of the + operation. This may result in the whole cluster being blocked for the + duration of the operation. + Rolling Schema Upgrade (RSU) executes the DDL statement only locally, thus + blocking only one cluster node. During the DDL processing, the node + is not replicating and may be unable to process replication events (due to + table lock). Once DDL operation is complete, the node will catch up and sync + with the cluster to become fully operational again. The DDL statement or + its effects are not replicated, so it is user's responsibility to manually + perform this operation on each of the nodes. + +wsrep_forced_binlog_format=none + Force every transaction to use given binlog format. When this variable is + set to something else than NONE, all transactions will use the given forced + format, regardless of what the client session has specified in binlog_format. + Valid choices for wsrep_forced_binlog_format are: ROW, STATEMENT, MIXED and + special value NONE, meaning that there is no forced binlog format in effect. + This variable was intruduced to support STATEMENT format replication during + rolling schema upgrade processing. However, in most cases ROW replication + is valid for asymmetrict schema replication. + +State snapshot transfer options. + +When a new node joins the cluster it has to synchronize its initial state with +the other cluster members by transferring state snapshot from one of them. +The options below govern how this happens and should be set up before attempting +to join or start a cluster. + +wsrep_sst_method=rsync + What method to use to copy database state to a newly joined node. Supported + methods: + - mysqldump: slow (except for small datasets) but allows for upgrade + between major MySQL versions or InnoDB features. + - rsync: much faster on large datasets (default). + - rsync_wan: same as rsync but with deltaxfer to minimize network traffic. + - xtrabackup: very fast and practically non-blocking SST method based on + Percona's xtrabackup tool. + + (for xtrabackup to work the following settings must be present in my.cnf + on all nodes: + [mysqld] + wsrep_sst_auth=root: + datadir= + [client] + socket= + ) + +wsrep_sst_receive_address= + Address (hostname:port) at which this node wants to receive state snapshot. + Defaults to mysqld bind address, and if that is not specified (0.0.0.0) - + to the first IP of eth0 + mysqld bind port. + NOTE: check that your firewall allows connections to this address from other + cluster nodes. + +wsrep_sst_auth= + Authentication information needed for state transfer. Depends on the state + transfer method. For mysqldump-based SST it is + : + and should be the same on all nodes - it is used to authenticate with both + state snapshot receiver and state snapshot donor. + +wsrep_sst_donor= + A name of the node which should serve as state snapshot donor. This allows + to control which node will serve state snapshot request. By default the + most suitable node is chosen by wsrep provider. This is the same as given in + wsrep_node_name. + + +6. ONLINE SCHEMA UPGRADE + + Schema upgrades mean any data definition statements (DDL statemnents) run + for the database. They change the database structure and are non- + transactional. + + Release 22.3 brings a new method for performing schema upgrades. User can + now choose whether to use the traditional total order isolation or new + rolling schema upgrade method. The OSU method choice is done by global + parameter: 'wsrep_OSU_method'. + +6.1 Total Order Isolation (TOI) + + With earlier releases, DDL processing happened always by Total Order + Isolation (TOI) method. With TOI, the DDL was scheduled to be processed in + same transaction seqeuncing 'slot' in each cluster node. + The processing is secured by locking the affected table from any other use. + With TOI method, the whole cluster has part of the database locked for the + duration of the DDL processing. + +6.2 Rolling Schema Upgrade (RSU) + + Rolling schema upgrade is new DDL processing method, where DDL will be + processed locally for the node. The node is disconnected of the replication + for the duration of the DDL processing, so that there is only DDL statement + processing in the node and it does not block the rest of the cluster. When + the DDL processing is complete, the node applies delayed replication events + and synchronizes back with the cluster. + The DDL can then be executed cluster-wide by running the same DDL statement + for each node in turn. When this rolling schema upgrade proceeds, part of + the cluster will have old schema structure and part of the cluster will have + new schema structure. + + +7. LIMITATIONS + +1) Currently replication works only with InnoDB storage engine. Any writes to + tables of other types, including system (mysql.*) tables are not replicated. + However, DDL statements are replicated in statement level, and changes + to mysql.* tables will get replicated that way. + So, you can safely issue: CREATE USER..., + but issuing: INSERT INTO mysql.user..., will not be replicated. + +2) DELETE operation is unsupported on tables without primary key. Also rows in + tables without primary key may appear in different order on different nodes. + As a result SELECT...LIMIT... may return slightly different sets. + +3) Unsupported queries: + * LOCK/UNLOCK TABLES cannot be supported in multi-master setups. + * lock functions (GET_LOCK(), RELEASE_LOCK()... ) + +4) Query log cannot be directed to table. If you enable query logging, + you must forward the log to a file: + log_output = FILE + Use general_log and general_log_file to choose query logging and the + log file name + +5) Maximum allowed transaction size is defined by wsrep_max_ws_rows and + wsrep_max_ws_size. Anything bigger (e.g. huge LOAD DATA) will be rejected. + +6) Due to cluster level optimistic concurrency control, transaction issuing + COMMIT may still be aborted at that stage. There can be two transactions. + writing to same rows and committing in separate cluster nodes, and only one + of the them can successfully commit. The failing one will be aborted. + For cluster level aborts, MySQL/galera cluster gives back deadlock error. + code (Error: 1213 SQLSTATE: 40001 (ER_LOCK_DEADLOCK)). + +7) XA transactions can not be supported due to possible rollback on commit. + diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake new file mode 100644 index 000000000000..3861c73e776c --- /dev/null +++ b/cmake/wsrep.cmake @@ -0,0 +1,61 @@ +# Copyright (c) 2011, Codership Oy . +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# We need to generate a proper spec file even without --with-wsrep flag, +# so WSREP_VERSION is produced regardless + +# Set the patch version +SET(WSREP_PATCH_VERSION "11") + +# Obtain patch revision number +SET(WSREP_PATCH_REVNO $ENV{WSREP_REV}) +IF(NOT WSREP_PATCH_REVNO) + EXECUTE_PROCESS( + COMMAND bzr revno + OUTPUT_VARIABLE WSREP_PATCH_REVNO + RESULT_VARIABLE RESULT + ) +STRING(REGEX REPLACE "(\r?\n)+$" "" WSREP_PATCH_REVNO "${WSREP_PATCH_REVNO}") +#FILE(WRITE "wsrep_config" "Debug: WSREP_PATCH_REVNO result: ${RESULT}\n") +ENDIF() +IF(NOT WSREP_PATCH_REVNO) + SET(WSREP_PATCH_REVNO "XXXX") +ENDIF() + +# Obtain wsrep API version +EXECUTE_PROCESS( + COMMAND sh -c "grep WSREP_INTERFACE_VERSION ${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h | cut -d '\"' -f 2" + OUTPUT_VARIABLE WSREP_API_VERSION + RESULT_VARIABLE RESULT +) +#FILE(WRITE "wsrep_config" "Debug: WSREP_API_VERSION result: ${RESULT}\n") +STRING(REGEX REPLACE "(\r?\n)+$" "" WSREP_API_VERSION "${WSREP_API_VERSION}") + +SET(WSREP_PACKAGE_VERSION "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}") +SET(WSREP_VERSION + "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}.r${WSREP_PATCH_REVNO}" +) + +OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" OFF) +IF (WITH_WSREP) + SET(WSREP_C_FLAGS "-DWITH_WSREP -DWSREP_PROC_INFO -DMYSQL_MAX_VARIABLE_VALUE_LEN=2048") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WSREP_C_FLAGS}") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WSREP_C_FLAGS}") + SET(COMPILATION_COMMENT "${COMPILATION_COMMENT}, wsrep_${WSREP_VERSION}") + SET(WITH_EMBEDDED_SERVER OFF) + SET(WITH_INNODB_DISALLOW_WRITES ON) +ENDIF() + +# diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh new file mode 100644 index 000000000000..d9aa24169ce0 --- /dev/null +++ b/scripts/wsrep_sst_common.sh @@ -0,0 +1,151 @@ +# Copyright (C) 2012-2014 Codership Oy +# +# 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; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston +# MA 02110-1301 USA. + +# This is a common command line parser to be sourced by other SST scripts + +set -u + +WSREP_SST_OPT_BYPASS=0 +WSREP_SST_OPT_DATA="" +WSREP_SST_OPT_AUTH="" + +while [ $# -gt 0 ]; do +case "$1" in + '--address') + readonly WSREP_SST_OPT_ADDR="$2" + shift + ;; + '--auth') + WSREP_SST_OPT_AUTH="$2" + shift + ;; + '--bypass') + WSREP_SST_OPT_BYPASS=1 + ;; + '--datadir') + readonly WSREP_SST_OPT_DATA="$2" + shift + ;; + '--defaults-file') + readonly WSREP_SST_OPT_CONF="$2" + shift + ;; + '--host') + readonly WSREP_SST_OPT_HOST="$2" + shift + ;; + '--local-port') + readonly WSREP_SST_OPT_LPORT="$2" + shift + ;; + '--parent') + readonly WSREP_SST_OPT_PARENT="$2" + shift + ;; + '--password') + WSREP_SST_OPT_PSWD="$2" + shift + ;; + '--port') + readonly WSREP_SST_OPT_PORT="$2" + shift + ;; + '--role') + readonly WSREP_SST_OPT_ROLE="$2" + shift + ;; + '--socket') + readonly WSREP_SST_OPT_SOCKET="$2" + shift + ;; + '--user') + WSREP_SST_OPT_USER="$2" + shift + ;; + '--gtid') + readonly WSREP_SST_OPT_GTID="$2" + shift + ;; + *) # must be command + # usage + # exit 1 + ;; +esac +shift +done +readonly WSREP_SST_OPT_BYPASS + +# For Bug:1200727 +if my_print_defaults -c $WSREP_SST_OPT_CONF sst | grep -q "wsrep_sst_auth";then + if [ -z "$WSREP_SST_OPT_AUTH" -o "$WSREP_SST_OPT_AUTH" = "(null)" ];then + WSREP_SST_OPT_AUTH=$(my_print_defaults -c $WSREP_SST_OPT_CONF sst | grep -- "--wsrep_sst_auth" | cut -d= -f2) + fi +fi + +if [ -n "${WSREP_SST_OPT_DATA:-}" ] +then + SST_PROGRESS_FILE="$WSREP_SST_OPT_DATA/sst_in_progress" +else + SST_PROGRESS_FILE="" +fi + + +wsrep_log() +{ + # echo everything to stderr so that it gets into common error log + # deliberately made to look different from the rest of the log + local readonly tst="$(date +%Y%m%d\ %H:%M:%S.%N | cut -b -21)" + echo "WSREP_SST: $* ($tst)" >&2 +} + +wsrep_log_error() +{ + wsrep_log "[ERROR] $*" +} + +wsrep_log_info() +{ + wsrep_log "[INFO] $*" +} + +wsrep_cleanup_progress_file() +{ + [ -n "$SST_PROGRESS_FILE" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null +} + +wsrep_check_program() +{ + local prog=$1 + + if ! which $prog >/dev/null + then + echo "'$prog' not found in PATH" + return 2 # no such file or directory + fi +} + +wsrep_check_programs() +{ + local ret=0 + + while [ $# -gt 0 ] + do + wsrep_check_program $1 || ret=$? + shift + done + + return $ret +} diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh new file mode 100644 index 000000000000..3db1d73bb9c4 --- /dev/null +++ b/scripts/wsrep_sst_mysqldump.sh @@ -0,0 +1,126 @@ +#!/bin/bash -e +# Copyright (C) 2009 Codership Oy +# +# 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; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston +# MA 02110-1301 USA. + +# This is a reference script for mysqldump-based state snapshot tansfer + +. $(dirname $0)/wsrep_sst_common + +EINVAL=22 + +local_ip() +{ + PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin + + [ "$1" = "127.0.0.1" ] && return 0 + [ "$1" = "localhost" ] && return 0 + [ "$1" = "$(hostname -s)" ] && return 0 + [ "$1" = "$(hostname -f)" ] && return 0 + [ "$1" = "$(hostname -d)" ] && return 0 + + # Now if ip program is not found in the path, we can't return 0 since + # it would block any address. Thankfully grep should fail in this case + ip route get "$1" | grep local >/dev/null && return 0 + + return 1 +} + +if test -z "$WSREP_SST_OPT_USER"; then wsrep_log_error "USER cannot be nil"; exit $EINVAL; fi +if test -z "$WSREP_SST_OPT_HOST"; then wsrep_log_error "HOST cannot be nil"; exit $EINVAL; fi +if test -z "$WSREP_SST_OPT_PORT"; then wsrep_log_error "PORT cannot be nil"; exit $EINVAL; fi +if test -z "$WSREP_SST_OPT_LPORT"; then wsrep_log_error "LPORT cannot be nil"; exit $EINVAL; fi +if test -z "$WSREP_SST_OPT_SOCKET";then wsrep_log_error "SOCKET cannot be nil";exit $EINVAL; fi +if test -z "$WSREP_SST_OPT_GTID"; then wsrep_log_error "GTID cannot be nil"; exit $EINVAL; fi + +if local_ip $WSREP_SST_OPT_HOST && \ + [ "$WSREP_SST_OPT_PORT" = "$WSREP_SST_OPT_LPORT" ] +then + wsrep_log_error \ + "destination address '$WSREP_SST_OPT_HOST:$WSREP_SST_OPT_PORT' matches source address." + exit $EINVAL +fi + +# Check client version +if ! mysql --version | grep 'Distrib 5.5' >/dev/null +then + mysql --version >&2 + wsrep_log_error "this operation requires MySQL client version 5.5.x" + exit $EINVAL +fi + +# For Bug:1293798 +if [ -z "$WSREP_SST_OPT_PSWD" -a -n "$WSREP_SST_OPT_AUTH" ]; then + WSREP_SST_OPT_USER=$(echo $WSREP_SST_OPT_AUTH | cut -d: -f1) + WSREP_SST_OPT_PSWD=$(echo $WSREP_SST_OPT_AUTH | cut -d: -f2) +fi +AUTH="-u$WSREP_SST_OPT_USER" +if test -n "$WSREP_SST_OPT_PSWD"; then AUTH="$AUTH -p$WSREP_SST_OPT_PSWD"; fi + +STOP_WSREP="SET wsrep_on=OFF;" + +# NOTE: we don't use --routines here because we're dumping mysql.proc table +MYSQLDUMP="mysqldump $AUTH -S$WSREP_SST_OPT_SOCKET \ +--add-drop-database --add-drop-table --skip-add-locks --create-options \ +--disable-keys --extended-insert --skip-lock-tables --quick --set-charset \ +--skip-comments --flush-privileges --all-databases" + +# mysqldump cannot restore CSV tables, fix this issue +CSV_TABLES_FIX=" +set sql_mode=''; + +USE mysql; + +SET @str = IF (@@have_csv = 'YES', 'CREATE TABLE IF NOT EXISTS general_log (event_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, thread_id INTEGER NOT NULL, server_id INTEGER UNSIGNED NOT NULL, command_type VARCHAR(64) NOT NULL,argument MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment=\"General log\"', 'SET @dummy = 0'); + +PREPARE stmt FROM @str; +EXECUTE stmt; +DROP PREPARE stmt; + +SET @str = IF (@@have_csv = 'YES', 'CREATE TABLE IF NOT EXISTS slow_log (start_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, query_time TIME NOT NULL, lock_time TIME NOT NULL, rows_sent INTEGER NOT NULL, rows_examined INTEGER NOT NULL, db VARCHAR(512) NOT NULL, last_insert_id INTEGER NOT NULL, insert_id INTEGER NOT NULL, server_id INTEGER UNSIGNED NOT NULL, sql_text MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment=\"Slow log\"', 'SET @dummy = 0'); + +PREPARE stmt FROM @str; +EXECUTE stmt; +DROP PREPARE stmt;" + +SET_START_POSITION="SET GLOBAL wsrep_start_position='$WSREP_SST_OPT_GTID';" + +MYSQL="mysql $AUTH -h$WSREP_SST_OPT_HOST -P$WSREP_SST_OPT_PORT "\ +"--disable-reconnect --connect_timeout=10" + +# need to disable logging when loading the dump +# reason is that dump contains ALTER TABLE for log tables, and +# this causes an error if logging is enabled +GENERAL_LOG_OPT=`$MYSQL --skip-column-names -e"$STOP_WSREP SELECT @@GENERAL_LOG"` +SLOW_LOG_OPT=`$MYSQL --skip-column-names -e"$STOP_WSREP SELECT @@SLOW_QUERY_LOG"` +$MYSQL -e"$STOP_WSREP SET GLOBAL GENERAL_LOG=OFF" +$MYSQL -e"$STOP_WSREP SET GLOBAL SLOW_QUERY_LOG=OFF" + +# commands to restore log settings +RESTORE_GENERAL_LOG="SET GLOBAL GENERAL_LOG=$GENERAL_LOG_OPT;" +RESTORE_SLOW_QUERY_LOG="SET GLOBAL SLOW_QUERY_LOG=$SLOW_LOG_OPT;" + +if [ $WSREP_SST_OPT_BYPASS -eq 0 ] +then + (echo $STOP_WSREP && $MYSQLDUMP && echo $CSV_TABLES_FIX \ + && echo $RESTORE_GENERAL_LOG && echo $RESTORE_SLOW_QUERY_LOG \ + && echo $SET_START_POSITION \ + || echo "SST failed to complete;") | $MYSQL +else + wsrep_log_info "Bypassing state dump." + echo $SET_START_POSITION | $MYSQL +fi +wsrep_cleanup_progress_file +# diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh new file mode 100644 index 000000000000..af3c2bb23cdf --- /dev/null +++ b/scripts/wsrep_sst_rsync.sh @@ -0,0 +1,284 @@ +#!/bin/bash -ue + +# Copyright (C) 2010-2014 Codership Oy +# +# 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; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston +# MA 02110-1301 USA. + +# This is a reference script for rsync-based state snapshot tansfer + +RSYNC_PID= +RSYNC_CONF= +OS=$(uname) +[ "$OS" == "Darwin" ] && export -n LD_LIBRARY_PATH + +# Setting the path for lsof on CentOS +export PATH="/usr/sbin:/sbin:$PATH" + +. $(dirname $0)/wsrep_sst_common + +wsrep_check_programs rsync + +cleanup_joiner() +{ + wsrep_log_info "Joiner cleanup." + local PID=$(cat "$RSYNC_PID" 2>/dev/null || echo 0) + [ "0" != "$PID" ] && kill $PID && sleep 0.5 && kill -9 $PID >/dev/null 2>&1 \ + || : + rm -rf "$RSYNC_CONF" + rm -rf "$MAGIC_FILE" + rm -rf "$RSYNC_PID" + wsrep_log_info "Joiner cleanup done." + if [ "${WSREP_SST_OPT_ROLE}" = "joiner" ];then + wsrep_cleanup_progress_file + fi +} + +check_pid() +{ + local pid_file=$1 + [ -r "$pid_file" ] && ps -p $(cat $pid_file) >/dev/null 2>&1 +} + +check_pid_and_port() +{ + local pid_file=$1 + local rsync_pid=$2 + local rsync_port=$3 + + local port_info=$(lsof -i :$rsync_port -Pn 2>/dev/null | \ + grep "(LISTEN)") + local is_rsync=$(echo $port_info | \ + grep -w '^rsync[[:space:]]\+'"$rsync_pid" 2>/dev/null) + + if [ -n "$port_info" -a -z "$is_rsync" ]; then + wsrep_log_error "rsync daemon port '$rsync_port' has been taken" + exit 16 # EBUSY + fi + check_pid $pid_file && \ + [ -n "$port_info" ] && [ -n "$is_rsync" ] && \ + [ $(cat $pid_file) -eq $rsync_pid ] +} + +MAGIC_FILE="$WSREP_SST_OPT_DATA/rsync_sst_complete" +rm -rf "$MAGIC_FILE" + +WSREP_LOG_DIR=${WSREP_LOG_DIR:-""} + +# if WSREP_LOG_DIR env. variable is not set, try to get it from my.cnf +if [ -z "$WSREP_LOG_DIR" ]; then + SCRIPT_DIR="$(cd $(dirname "$0"); pwd -P)" + WSREP_LOG_DIR=$($SCRIPT_DIR/my_print_defaults --defaults-file \ + "$WSREP_SST_OPT_CONF" mysqld server mysqld-5.5 \ + | grep -- '--innodb[-_]log[-_]group[-_]home[-_]dir=' \ + | cut -b 29- ) +fi + +if [ -n "$WSREP_LOG_DIR" ]; then + # handle both relative and absolute paths + WSREP_LOG_DIR=$(cd $WSREP_SST_OPT_DATA; mkdir -p "$WSREP_LOG_DIR"; cd $WSREP_LOG_DIR; pwd -P) +else + # default to datadir + WSREP_LOG_DIR=$(cd $WSREP_SST_OPT_DATA; pwd -P) +fi + +# Old filter - include everything except selected +# FILTER=(--exclude '*.err' --exclude '*.pid' --exclude '*.sock' \ +# --exclude '*.conf' --exclude core --exclude 'galera.*' \ +# --exclude grastate.txt --exclude '*.pem' \ +# --exclude '*.[0-9][0-9][0-9][0-9][0-9][0-9]' --exclude '*.index') + +# New filter - exclude everything except dirs (schemas) and innodb files +FILTER=(-f '- /lost+found' -f '- /.fseventsd' -f '- /.Trashes' + -f '+ /ib_lru_dump' -f '+ /ibdata*' -f '+ /*/' -f '- /*') + +if [ "$WSREP_SST_OPT_ROLE" = "donor" ] +then + + if [ $WSREP_SST_OPT_BYPASS -eq 0 ] + then + + FLUSHED="$WSREP_SST_OPT_DATA/tables_flushed" + rm -rf "$FLUSHED" + + # Use deltaxfer only for WAN + inv=$(basename $0) + [ "$inv" = "wsrep_sst_rsync_wan" ] && WHOLE_FILE_OPT="" \ + || WHOLE_FILE_OPT="--whole-file" + + echo "flush tables" + + # wait for tables flushed and state ID written to the file + while [ ! -r "$FLUSHED" ] && ! grep -q ':' "$FLUSHED" >/dev/null 2>&1 + do + sleep 0.2 + done + + STATE="$(cat $FLUSHED)" + rm -rf "$FLUSHED" + + sync + + # first, the normal directories, so that we can detect incompatible protocol + RC=0 + rsync --owner --group --perms --links --specials \ + --ignore-times --inplace --dirs --delete --quiet \ + $WHOLE_FILE_OPT "${FILTER[@]}" "$WSREP_SST_OPT_DATA/" \ + rsync://$WSREP_SST_OPT_ADDR >&2 || RC=$? + + if [ "$RC" -ne 0 ]; then + wsrep_log_error "rsync returned code $RC:" + + case $RC in + 12) RC=71 # EPROTO + wsrep_log_error \ + "rsync server on the other end has incompatible protocol. " \ + "Make sure you have the same version of rsync on all nodes." + ;; + 22) RC=12 # ENOMEM + ;; + *) RC=255 # unknown error + ;; + esac + exit $RC + fi + + # second, we transfer InnoDB log files + rsync --owner --group --perms --links --specials \ + --ignore-times --inplace --dirs --delete --quiet \ + $WHOLE_FILE_OPT -f '+ /ib_logfile[0-9]*' -f '- **' "$WSREP_LOG_DIR/" \ + rsync://$WSREP_SST_OPT_ADDR-log_dir >&2 || RC=$? + + if [ $RC -ne 0 ]; then + wsrep_log_error "rsync innodb_log_group_home_dir returned code $RC:" + exit 255 # unknown error + fi + + # then, we parallelize the transfer of database directories, use . so that pathconcatenation works + pushd "$WSREP_SST_OPT_DATA" >/dev/null + + count=1 + [ "$OS" == "Linux" ] && count=$(grep -c processor /proc/cpuinfo) + [ "$OS" == "Darwin" -o "$OS" == "FreeBSD" ] && count=$(sysctl -n hw.ncpu) + + find . -maxdepth 1 -mindepth 1 -type d -print0 | xargs -I{} -0 -P $count \ + rsync --owner --group --perms --links --specials \ + --ignore-times --inplace --recursive --delete --quiet \ + $WHOLE_FILE_OPT --exclude '*/ib_logfile*' "$WSREP_SST_OPT_DATA"/{}/ \ + rsync://$WSREP_SST_OPT_ADDR/{} >&2 || RC=$? + + popd >/dev/null + + if [ $RC -ne 0 ]; then + wsrep_log_error "find/rsync returned code $RC:" + exit 255 # unknown error + fi + + else # BYPASS + wsrep_log_info "Bypassing state dump." + STATE="$WSREP_SST_OPT_GTID" + fi + + echo "continue" # now server can resume updating data + + echo "$STATE" > "$MAGIC_FILE" + rsync --archive --quiet --checksum "$MAGIC_FILE" rsync://$WSREP_SST_OPT_ADDR + + echo "done $STATE" + +elif [ "$WSREP_SST_OPT_ROLE" = "joiner" ] +then + wsrep_check_programs lsof + + touch $SST_PROGRESS_FILE + MYSQLD_PID=$WSREP_SST_OPT_PARENT + + MODULE="rsync_sst" + + RSYNC_PID="$WSREP_SST_OPT_DATA/$MODULE.pid" + + if check_pid $RSYNC_PID + then + wsrep_log_error "rsync daemon already running." + exit 114 # EALREADY + fi + rm -rf "$RSYNC_PID" + + ADDR=$WSREP_SST_OPT_ADDR + RSYNC_PORT=$(echo $ADDR | awk -F ':' '{ print $2 }') + if [ -z "$RSYNC_PORT" ] + then + RSYNC_PORT=4444 + ADDR="$(echo $ADDR | awk -F ':' '{ print $1 }'):$RSYNC_PORT" + fi + + trap "exit 32" HUP PIPE + trap "exit 3" INT TERM ABRT + trap cleanup_joiner EXIT + + RSYNC_CONF="$WSREP_SST_OPT_DATA/$MODULE.conf" + +cat << EOF > "$RSYNC_CONF" +pid file = $RSYNC_PID +use chroot = no +read only = no +timeout = 300 +[$MODULE] + path = $WSREP_SST_OPT_DATA +[$MODULE-log_dir] + path = $WSREP_LOG_DIR +EOF + +# rm -rf "$DATA"/ib_logfile* # we don't want old logs around + + # listen at all interfaces (for firewalled setups) + rsync --daemon --no-detach --port $RSYNC_PORT --config "$RSYNC_CONF" & + RSYNC_REAL_PID=$! + + until check_pid_and_port $RSYNC_PID $RSYNC_REAL_PID $RSYNC_PORT + do + sleep 0.2 + done + + echo "ready $ADDR/$MODULE" + + # wait for SST to complete by monitoring magic file + while [ ! -r "$MAGIC_FILE" ] && check_pid "$RSYNC_PID" && \ + ps -p $MYSQLD_PID >/dev/null + do + sleep 1 + done + + if ! ps -p $MYSQLD_PID >/dev/null + then + wsrep_log_error \ + "Parent mysqld process (PID:$MYSQLD_PID) terminated unexpectedly." + exit 32 + fi + + if [ -r "$MAGIC_FILE" ] + then + cat "$MAGIC_FILE" # output UUID:seqno + else + # this message should cause joiner to abort + echo "rsync process ended without creating '$MAGIC_FILE'" + fi + wsrep_cleanup_progress_file +# cleanup_joiner +else + wsrep_log_error "Unrecognized role: '$WSREP_SST_OPT_ROLE'" + exit 22 # EINVAL +fi + +exit 0 diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh new file mode 100644 index 000000000000..865547ad9d88 --- /dev/null +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -0,0 +1,917 @@ +#!/bin/bash -ue +# Copyright (C) 2013 Percona Inc +# +# 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; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston +# MA 02110-1301 USA. + +# Documentation: http://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html +# Make sure to read that before proceeding! + + + + +. $(dirname $0)/wsrep_sst_common + +ealgo="" +ekey="" +ekeyfile="" +encrypt=0 +nproc=1 +ecode=0 +XTRABACKUP_PID="" +SST_PORT="" +REMOTEIP="" +tcert="" +tpem="" +tkey="" +sockopt="" +progress="" +ttime=0 +totime=0 +lsn="" +incremental=0 +ecmd="" +rlimit="" +# Initially +stagemsg="${WSREP_SST_OPT_ROLE}" +cpat="" +speciald=0 +ib_home_dir="" +ib_log_dir="" + +sfmt="tar" +strmcmd="" +tfmt="" +tcmd="" +rebuild=0 +rebuildcmd="" +payload=0 +pvformat="-F '%N => Rate:%r Avg:%a Elapsed:%t %e Bytes: %b %p' " +pvopts="-f -i 10 -N $WSREP_SST_OPT_ROLE " +STATDIR="" +uextra=0 +disver="" + +tmpopts="" +itmpdir="" +xtmpdir="" + +scomp="" +sdecomp="" + +if which pv &>/dev/null && pv --help | grep -q FORMAT;then + pvopts+=$pvformat +fi +pcmd="pv $pvopts" +declare -a RC + +INNOBACKUPEX_BIN=innobackupex +readonly AUTH=(${WSREP_SST_OPT_AUTH//:/ }) +DATA="${WSREP_SST_OPT_DATA}" +INFO_FILE="xtrabackup_galera_info" +IST_FILE="xtrabackup_ist" +MAGIC_FILE="${DATA}/${INFO_FILE}" + +# Setting the path for ss and ip +export PATH="/usr/sbin:/sbin:$PATH" + +timeit(){ + local stage=$1 + shift + local cmd="$@" + local x1 x2 took extcode + + if [[ $ttime -eq 1 ]];then + x1=$(date +%s) + wsrep_log_info "Evaluating $cmd" + eval "$cmd" + extcode=$? + x2=$(date +%s) + took=$(( x2-x1 )) + wsrep_log_info "NOTE: $stage took $took seconds" + totime=$(( totime+took )) + else + wsrep_log_info "Evaluating $cmd" + eval "$cmd" + extcode=$? + fi + return $extcode +} + +get_keys() +{ + # $encrypt -eq 1 is for internal purposes only + if [[ $encrypt -ge 2 || $encrypt -eq -1 ]];then + return + fi + + if [[ $encrypt -eq 0 ]];then + if my_print_defaults -c $WSREP_SST_OPT_CONF xtrabackup | grep -q encrypt;then + wsrep_log_error "Unexpected option combination. SST may fail. Refer to http://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html " + fi + return + fi + + if [[ $sfmt == 'tar' ]];then + wsrep_log_info "NOTE: Xtrabackup-based encryption - encrypt=1 - cannot be enabled with tar format" + encrypt=-1 + return + fi + + wsrep_log_info "Xtrabackup based encryption enabled in my.cnf - Supported only from Xtrabackup 2.1.4" + + if [[ -z $ealgo ]];then + wsrep_log_error "FATAL: Encryption algorithm empty from my.cnf, bailing out" + exit 3 + fi + + if [[ -z $ekey && ! -r $ekeyfile ]];then + wsrep_log_error "FATAL: Either key or keyfile must be readable" + exit 3 + fi + + if [[ -z $ekey ]];then + ecmd="xbcrypt --encrypt-algo=$ealgo --encrypt-key-file=$ekeyfile" + else + ecmd="xbcrypt --encrypt-algo=$ealgo --encrypt-key=$ekey" + fi + + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + ecmd+=" -d" + fi + + stagemsg+="-XB-Encrypted" +} + +get_transfer() +{ + if [[ -z $SST_PORT ]];then + TSST_PORT=4444 + else + TSST_PORT=$SST_PORT + fi + + if [[ $tfmt == 'nc' ]];then + if [[ ! -x `which nc` ]];then + wsrep_log_error "nc(netcat) not found in path: $PATH" + exit 2 + fi + wsrep_log_info "Using netcat as streamer" + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + tcmd="nc -dl ${TSST_PORT}" + else + tcmd="nc ${REMOTEIP} ${TSST_PORT}" + fi + else + tfmt='socat' + wsrep_log_info "Using socat as streamer" + if [[ ! -x `which socat` ]];then + wsrep_log_error "socat not found in path: $PATH" + exit 2 + fi + + if [[ $encrypt -eq 2 || $encrypt -eq 3 ]] && ! socat -V | grep -q WITH_OPENSSL;then + wsrep_log_info "NOTE: socat is not openssl enabled, falling back to plain transfer" + encrypt=-1 + fi + + if [[ $encrypt -eq 2 ]];then + wsrep_log_info "Using openssl based encryption with socat: with crt and pem" + if [[ -z $tpem || -z $tcert ]];then + wsrep_log_error "Both PEM and CRT files required" + exit 22 + fi + stagemsg+="-OpenSSL-Encrypted-2" + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + wsrep_log_info "Decrypting with PEM $tpem, CA: $tcert" + tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=$tpem,cafile=${tcert}${sockopt} stdio" + else + wsrep_log_info "Encrypting with PEM $tpem, CA: $tcert" + tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=$tpem,cafile=${tcert}${sockopt}" + fi + elif [[ $encrypt -eq 3 ]];then + wsrep_log_info "Using openssl based encryption with socat: with key and crt" + if [[ -z $tpem || -z $tkey ]];then + wsrep_log_error "Both certificate and key files required" + exit 22 + fi + stagemsg+="-OpenSSL-Encrypted-3" + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + wsrep_log_info "Decrypting with certificate $tpem, key $tkey" + tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=$tpem,key=${tkey},verify=0${sockopt} stdio" + else + wsrep_log_info "Encrypting with certificate $tpem, key $tkey" + tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=$tpem,key=${tkey},verify=0${sockopt}" + fi + + else + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + tcmd="socat -u TCP-LISTEN:${TSST_PORT},reuseaddr${sockopt} stdio" + else + tcmd="socat -u stdio TCP:${REMOTEIP}:${TSST_PORT}${sockopt}" + fi + fi + fi + +} + +parse_cnf() +{ + local group=$1 + local var=$2 + reval=$(my_print_defaults -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2-) + if [[ -z $reval ]];then + [[ -n $3 ]] && reval=$3 + fi + echo $reval +} + +get_footprint() +{ + pushd $WSREP_SST_OPT_DATA 1>/dev/null + payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | xargs -0 du --block-size=1 -c | awk 'END { print $1 }') + if my_print_defaults -c $WSREP_SST_OPT_CONF xtrabackup | grep -q -- "--compress";then + # QuickLZ has around 50% compression ratio + # When compression/compaction used, the progress is only an approximate. + payload=$(( payload*1/2 )) + fi + popd 1>/dev/null + pcmd+=" -s $payload" + adjust_progress +} + +adjust_progress() +{ + if [[ -n $progress && $progress != '1' ]];then + if [[ -e $progress ]];then + pcmd+=" 2>>$progress" + else + pcmd+=" 2>$progress" + fi + elif [[ -z $progress && -n $rlimit ]];then + # When rlimit is non-zero + pcmd="pv -q" + fi + + if [[ -n $rlimit && "$WSREP_SST_OPT_ROLE" == "donor" ]];then + wsrep_log_info "Rate-limiting SST to $rlimit" + pcmd+=" -L \$rlimit" + fi +} + +read_cnf() +{ + sfmt=$(parse_cnf sst streamfmt "xbstream") + tfmt=$(parse_cnf sst transferfmt "socat") + tcert=$(parse_cnf sst tca "") + tpem=$(parse_cnf sst tcert "") + tkey=$(parse_cnf sst tkey "") + encrypt=$(parse_cnf sst encrypt 0) + sockopt=$(parse_cnf sst sockopt "") + progress=$(parse_cnf sst progress "") + rebuild=$(parse_cnf sst rebuild 0) + ttime=$(parse_cnf sst time 0) + cpat=$(parse_cnf sst cpat '.*galera\.cache$\|.*sst_in_progress$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$') + incremental=$(parse_cnf sst incremental 0) + ealgo=$(parse_cnf xtrabackup encrypt "") + ekey=$(parse_cnf xtrabackup encrypt-key "") + ekeyfile=$(parse_cnf xtrabackup encrypt-key-file "") + scomp=$(parse_cnf sst compressor "") + sdecomp=$(parse_cnf sst decompressor "") + + + # Refer to http://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html + if [[ -z $ealgo ]];then + ealgo=$(parse_cnf sst encrypt-algo "") + ekey=$(parse_cnf sst encrypt-key "") + ekeyfile=$(parse_cnf sst encrypt-key-file "") + fi + rlimit=$(parse_cnf sst rlimit "") + uextra=$(parse_cnf sst use_extra 0) + speciald=$(parse_cnf sst sst-special-dirs 1) + iopts=$(parse_cnf sst inno-backup-opts "") + iapts=$(parse_cnf sst inno-apply-opts "") + impts=$(parse_cnf sst inno-move-opts "") + stimeout=$(parse_cnf sst sst-initial-timeout 100) +} + +get_stream() +{ + if [[ $sfmt == 'xbstream' ]];then + wsrep_log_info "Streaming with xbstream" + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + strmcmd="xbstream -x" + else + strmcmd="xbstream -c \${INFO_FILE}" + fi + else + sfmt="tar" + wsrep_log_info "Streaming with tar" + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + strmcmd="tar xfi - " + else + strmcmd="tar cf - \${INFO_FILE} " + fi + + fi +} + +get_proc() +{ + set +e + nproc=$(grep -c processor /proc/cpuinfo) + [[ -z $nproc || $nproc -eq 0 ]] && nproc=1 + set -e +} + +sig_joiner_cleanup() +{ + wsrep_log_error "Removing $MAGIC_FILE file due to signal" + rm -f "$MAGIC_FILE" +} + +cleanup_joiner() +{ + # Since this is invoked just after exit NNN + local estatus=$? + if [[ $estatus -ne 0 ]];then + wsrep_log_error "Cleanup after exit with status:$estatus" + fi + if [ "${WSREP_SST_OPT_ROLE}" = "joiner" ];then + wsrep_log_info "Removing the sst_in_progress file" + wsrep_cleanup_progress_file + fi + if [[ -n $progress && -p $progress ]];then + wsrep_log_info "Cleaning up fifo file $progress" + rm $progress + fi + if [[ -n ${STATDIR:-} ]];then + [[ -d $STATDIR ]] && rm -rf $STATDIR + fi +} + +check_pid() +{ + local pid_file="$1" + [ -r "$pid_file" ] && ps -p $(cat "$pid_file") >/dev/null 2>&1 +} + +cleanup_donor() +{ + # Since this is invoked just after exit NNN + local estatus=$? + if [[ $estatus -ne 0 ]];then + wsrep_log_error "Cleanup after exit with status:$estatus" + fi + + if [[ -n ${XTRABACKUP_PID:-} ]];then + if check_pid $XTRABACKUP_PID + then + wsrep_log_error "xtrabackup process is still running. Killing... " + kill_xtrabackup + fi + + fi + rm -f ${DATA}/${IST_FILE} || true + + if [[ -n $progress && -p $progress ]];then + wsrep_log_info "Cleaning up fifo file $progress" + rm -f $progress || true + fi + + wsrep_log_info "Cleaning up temporary directories" + + if [[ -n $xtmpdir ]];then + [[ -d $xtmpdir ]] && rm -rf $xtmpdir || true + fi + + if [[ -n $itmpdir ]];then + [[ -d $itmpdir ]] && rm -rf $itmpdir || true + fi +} + +kill_xtrabackup() +{ + local PID=$(cat $XTRABACKUP_PID) + [ -n "$PID" -a "0" != "$PID" ] && kill $PID && (kill $PID && kill -9 $PID) || : + wsrep_log_info "Removing xtrabackup pid file $XTRABACKUP_PID" + rm -f "$XTRABACKUP_PID" || true +} + +setup_ports() +{ + if [[ "$WSREP_SST_OPT_ROLE" == "donor" ]];then + SST_PORT=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $2 }') + REMOTEIP=$(echo $WSREP_SST_OPT_ADDR | awk -F ':' '{ print $1 }') + lsn=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $4 }') + else + SST_PORT=$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $2 }') + fi +} + +# waits ~10 seconds for nc to open the port and then reports ready +# (regardless of timeout) +wait_for_listen() +{ + local PORT=$1 + local ADDR=$2 + local MODULE=$3 + for i in {1..50} + do + ss -p state listening "( sport = :$PORT )" | grep -qE 'socat|nc' && break + sleep 0.2 + done + if [[ $incremental -eq 1 ]];then + echo "ready ${ADDR}/${MODULE}/$lsn" + else + echo "ready ${ADDR}/${MODULE}" + fi +} + +check_extra() +{ + local use_socket=1 + if [[ $uextra -eq 1 ]];then + if my_print_defaults -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--thread-handling=" | grep -q 'pool-of-threads';then + local eport=$(my_print_defaults -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--extra-port=" | cut -d= -f2) + if [[ -n $eport ]];then + # Xtrabackup works only locally. + # Hence, setting host to 127.0.0.1 unconditionally. + wsrep_log_info "SST through extra_port $eport" + INNOEXTRA+=" --host=127.0.0.1 --port=$eport " + use_socket=0 + else + wsrep_log_error "Extra port $eport null, failing" + exit 1 + fi + else + wsrep_log_info "Thread pool not set, ignore the option use_extra" + fi + fi + if [[ $use_socket -eq 1 ]] && [[ -n "${WSREP_SST_OPT_SOCKET}" ]];then + INNOEXTRA+=" --socket=${WSREP_SST_OPT_SOCKET}" + fi +} + +recv_joiner() +{ + local dir=$1 + local msg=$2 + local tmt=$3 + local ltcmd + + pushd ${dir} 1>/dev/null + set +e + + if [[ $tmt -gt 0 && -x `which timeout` ]];then + if timeout --help | grep -q -- '-k';then + ltcmd="timeout -k $(( tmt+10 )) $tmt $tcmd" + else + ltcmd="timeout $tmt $tcmd" + fi + timeit "$msg" "$ltcmd | $strmcmd; RC=( "\${PIPESTATUS[@]}" )" + else + timeit "$msg" "$tcmd | $strmcmd; RC=( "\${PIPESTATUS[@]}" )" + fi + + set -e + popd 1>/dev/null + + if [[ ${RC[0]} -eq 124 ]];then + wsrep_log_error "Possible timeout in receving first data from donor in gtid stage" + exit 32 + fi + + for ecode in "${RC[@]}";do + if [[ $ecode -ne 0 ]];then + wsrep_log_error "Error while getting data from donor node: " \ + "exit codes: ${RC[@]}" + exit 32 + fi + done + + if [ ! -r "${MAGIC_FILE}" ];then + # this message should cause joiner to abort + wsrep_log_error "xtrabackup process ended without creating '${MAGIC_FILE}'" + wsrep_log_info "Contents of datadir" + wsrep_log_info "$(ls -l ${dir}/*)" + exit 32 + fi +} + + +send_donor() +{ + local dir=$1 + local msg=$2 + + pushd ${dir} 1>/dev/null + set +e + timeit "$msg" "$strmcmd | $tcmd; RC=( "\${PIPESTATUS[@]}" )" + set -e + popd 1>/dev/null + + + for ecode in "${RC[@]}";do + if [[ $ecode -ne 0 ]];then + wsrep_log_error "Error while getting data from donor node: " \ + "exit codes: ${RC[@]}" + exit 32 + fi + done + +} + +if [[ ! -x `which $INNOBACKUPEX_BIN` ]];then + wsrep_log_error "innobackupex not in path: $PATH" + exit 2 +fi + +rm -f "${MAGIC_FILE}" + +if [[ ! ${WSREP_SST_OPT_ROLE} == 'joiner' && ! ${WSREP_SST_OPT_ROLE} == 'donor' ]];then + wsrep_log_error "Invalid role ${WSREP_SST_OPT_ROLE}" + exit 22 +fi + +read_cnf +setup_ports +get_stream +get_transfer + +if ${INNOBACKUPEX_BIN} /tmp --help | grep -q -- '--version-check'; then + disver="--no-version-check" +fi + + +INNOEXTRA="" +INNOAPPLY="${INNOBACKUPEX_BIN} $disver $iapts --apply-log \$rebuildcmd \${DATA} &>\${DATA}/innobackup.prepare.log" +INNOMOVE="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $impts --move-back --force-non-empty-directories \${DATA} &>\${DATA}/innobackup.move.log" +INNOBACKUP="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2>\${DATA}/innobackup.backup.log" + +if [ "$WSREP_SST_OPT_ROLE" = "donor" ] +then + trap cleanup_donor EXIT + + if [ $WSREP_SST_OPT_BYPASS -eq 0 ] + then + + if [[ -z $(parse_cnf mysqld tmpdir "") && -z $(parse_cnf xtrabackup tmpdir "") ]];then + xtmpdir=$(mktemp -d) + tmpopts=" --tmpdir=$xtmpdir " + wsrep_log_info "Using $xtmpdir as xtrabackup temporary directory" + fi + + itmpdir=$(mktemp -d) + wsrep_log_info "Using $itmpdir as innobackupex temporary directory" + + if [ "${AUTH[0]}" != "(null)" ]; then + INNOEXTRA+=" --user=${AUTH[0]}" + fi + + if [ ${#AUTH[*]} -eq 2 ]; then + INNOEXTRA+=" --password=${AUTH[1]}" + elif [ "${AUTH[0]}" != "(null)" ]; then + # Empty password, used for testing, debugging etc. + INNOEXTRA+=" --password=" + fi + + get_keys + if [[ $encrypt -eq 1 ]];then + if [[ -n $ekey ]];then + INNOEXTRA+=" --encrypt=$ealgo --encrypt-key=$ekey " + else + INNOEXTRA+=" --encrypt=$ealgo --encrypt-key-file=$ekeyfile " + fi + fi + + if [[ -n $lsn ]];then + INNOEXTRA+=" --incremental --incremental-lsn=$lsn " + fi + + check_extra + + wsrep_log_info "Streaming GTID file before SST" + + echo "${WSREP_SST_OPT_GTID}" > "${MAGIC_FILE}" + + ttcmd="$tcmd" + + if [[ $encrypt -eq 1 ]];then + if [[ -n $scomp ]];then + tcmd=" $ecmd | $scomp | $tcmd " + else + tcmd=" $ecmd | $tcmd " + fi + elif [[ -n $scomp ]];then + tcmd=" $scomp | $tcmd " + fi + + + send_donor $DATA "${stagemsg}-gtid" + + tcmd="$ttcmd" + if [[ -n $progress ]];then + get_footprint + tcmd="$pcmd | $tcmd" + elif [[ -n $rlimit ]];then + adjust_progress + tcmd="$pcmd | $tcmd" + fi + + wsrep_log_info "Sleeping before data transfer for SST" + sleep 10 + + wsrep_log_info "Streaming the backup to joiner at ${REMOTEIP} ${SST_PORT:-4444}" + + if [[ -n $scomp ]];then + tcmd="$scomp | $tcmd" + fi + + set +e + timeit "${stagemsg}-SST" "$INNOBACKUP | $tcmd; RC=( "\${PIPESTATUS[@]}" )" + set -e + + if [ ${RC[0]} -ne 0 ]; then + wsrep_log_error "${INNOBACKUPEX_BIN} finished with error: ${RC[0]}. " \ + "Check ${DATA}/innobackup.backup.log" + exit 22 + elif [[ ${RC[$(( ${#RC[@]}-1 ))]} -eq 1 ]];then + wsrep_log_error "$tcmd finished with error: ${RC[1]}" + exit 22 + fi + + # innobackupex implicitly writes PID to fixed location in $xtmpdir + XTRABACKUP_PID="$xtmpdir/xtrabackup_pid" + + + else # BYPASS FOR IST + + wsrep_log_info "Bypassing the SST for IST" + echo "continue" # now server can resume updating data + echo "${WSREP_SST_OPT_GTID}" > "${MAGIC_FILE}" + echo "1" > "${DATA}/${IST_FILE}" + get_keys + if [[ $encrypt -eq 1 ]];then + if [[ -n $scomp ]];then + tcmd=" $ecmd | $scomp | $tcmd " + else + tcmd=" $ecmd | $tcmd " + fi + elif [[ -n $scomp ]];then + tcmd=" $scomp | $tcmd " + fi + strmcmd+=" \${IST_FILE}" + + send_donor $DATA "${stagemsg}-IST" + + fi + + echo "done ${WSREP_SST_OPT_GTID}" + wsrep_log_info "Total time on donor: $totime seconds" + +elif [ "${WSREP_SST_OPT_ROLE}" = "joiner" ] +then + [[ -e $SST_PROGRESS_FILE ]] && wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" + [[ -n $SST_PROGRESS_FILE ]] && touch $SST_PROGRESS_FILE + + if [[ $speciald -eq 1 ]];then + wsrep_log_info "WARNING: sst-special-dirs feature requires PXC 2.1.6 or latter." + fi + + if [[ $speciald -eq 1 ]];then + ib_home_dir=$(parse_cnf mysqld innodb-data-home-dir "") + ib_log_dir=$(parse_cnf mysqld innodb-log-group-home-dir "") + if [[ -z $ib_home_dir && -z $ib_log_dir ]];then + speciald=0 + fi + fi + + stagemsg="Joiner-Recv" + + if [[ ! -e ${DATA}/ibdata1 ]];then + incremental=0 + fi + + if [[ $incremental -eq 1 ]];then + wsrep_log_info "Incremental SST enabled: NOT SUPPORTED yet" + lsn=$(grep to_lsn xtrabackup_checkpoints | cut -d= -f2 | tr -d ' ') + wsrep_log_info "Recovered LSN: $lsn" + fi + + sencrypted=1 + nthreads=1 + + MODULE="xtrabackup_sst" + + rm -f "${DATA}/${IST_FILE}" + + # May need xtrabackup_checkpoints later on + rm -f ${DATA}/xtrabackup_binary ${DATA}/xtrabackup_galera_info ${DATA}/xtrabackup_logfile + + ADDR=${WSREP_SST_OPT_ADDR} + if [ -z "${SST_PORT}" ] + then + SST_PORT=4444 + ADDR="$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $1 }'):${SST_PORT}" + fi + + wait_for_listen ${SST_PORT} ${ADDR} ${MODULE} & + + trap sig_joiner_cleanup HUP PIPE INT TERM + trap cleanup_joiner EXIT + + if [[ -n $progress ]];then + adjust_progress + tcmd+=" | $pcmd" + fi + + if [[ $incremental -eq 1 ]];then + BDATA=$DATA + DATA=$(mktemp -d) + MAGIC_FILE="${DATA}/${INFO_FILE}" + fi + + get_keys + if [[ $encrypt -eq 1 && $sencrypted -eq 1 ]];then + if [[ -n $sdecomp ]];then + strmcmd=" $sdecomp | $ecmd | $strmcmd" + else + strmcmd=" $ecmd | $strmcmd" + fi + elif [[ -n $sdecomp ]];then + strmcmd=" $sdecomp | $strmcmd" + fi + + STATDIR=$(mktemp -d) + MAGIC_FILE="${STATDIR}/${INFO_FILE}" + recv_joiner $STATDIR "${stagemsg}-gtid" $stimeout + + if ! ps -p ${WSREP_SST_OPT_PARENT} &>/dev/null + then + wsrep_log_error "Parent mysqld process (PID:${WSREP_SST_OPT_PARENT}) terminated unexpectedly." + exit 32 + fi + + if [ ! -r "${STATDIR}/${IST_FILE}" ] + then + wsrep_log_info "Proceeding with SST" + + if [[ $speciald -eq 1 && -d ${DATA}/.sst ]];then + wsrep_log_info "WARNING: Stale temporary SST directory: ${DATA}/.sst from previous SST" + fi + + if [[ $incremental -ne 1 ]];then + if [[ $speciald -eq 1 ]];then + wsrep_log_info "Cleaning the existing datadir and innodb-data/log directories" + find $ib_home_dir $ib_log_dir $DATA -mindepth 1 -regex $cpat -prune -o -exec rm -rfv {} 1>&2 \+ + else + wsrep_log_info "Cleaning the existing datadir" + find $DATA -mindepth 1 -regex $cpat -prune -o -exec rm -rfv {} 1>&2 \+ + fi + tempdir=$(parse_cnf mysqld log-bin "") + if [[ -n ${tempdir:-} ]];then + binlog_dir=$(dirname $tempdir) + binlog_file=$(basename $tempdir) + if [[ -n ${binlog_dir:-} && $binlog_dir != '.' && $binlog_dir != $DATA ]];then + pattern="$binlog_dir/$binlog_file\.[0-9]+$" + wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" + find $binlog_dir -maxdepth 1 -type f -regex $pattern -exec rm -fv {} 1>&2 \+ + rm $binlog_dir/*.index || true + fi + fi + + else + wsrep_log_info "Removing existing ib_logfile files" + rm -f ${BDATA}/ib_logfile* + fi + + + if [[ $speciald -eq 1 ]];then + mkdir -p ${DATA}/.sst + TDATA=${DATA} + DATA="${DATA}/.sst" + fi + + + MAGIC_FILE="${DATA}/${INFO_FILE}" + recv_joiner $DATA "${stagemsg}-SST" 0 + + get_proc + + # Rebuild indexes for compact backups + if grep -q 'compact = 1' ${DATA}/xtrabackup_checkpoints;then + wsrep_log_info "Index compaction detected" + rebuild=1 + fi + + if [[ $rebuild -eq 1 ]];then + nthreads=$(parse_cnf xtrabackup rebuild-threads $nproc) + wsrep_log_info "Rebuilding during prepare with $nthreads threads" + rebuildcmd="--rebuild-indexes --rebuild-threads=$nthreads" + fi + + if test -n "$(find ${DATA} -maxdepth 1 -type f -name '*.qp' -print -quit)";then + + wsrep_log_info "Compressed qpress files found" + + if [[ ! -x `which qpress` ]];then + wsrep_log_error "qpress not found in path: $PATH" + exit 22 + fi + + if [[ -n $progress ]] && pv --help | grep -q 'line-mode';then + count=$(find ${DATA} -type f -name '*.qp' | wc -l) + count=$(( count*2 )) + if pv --help | grep -q FORMAT;then + pvopts="-f -s $count -l -N Decompression -F '%N => Rate:%r Elapsed:%t %e Progress: [%b/$count]'" + else + pvopts="-f -s $count -l -N Decompression" + fi + pcmd="pv $pvopts" + adjust_progress + dcmd="$pcmd | xargs -n 2 qpress -T${nproc}d" + else + dcmd="xargs -n 2 qpress -T${nproc}d" + fi + + + # Decompress the qpress files + wsrep_log_info "Decompression with $nproc threads" + timeit "Joiner-Decompression" "find ${DATA} -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" + extcode=$? + + if [[ $extcode -eq 0 ]];then + wsrep_log_info "Removing qpress files after decompression" + find ${DATA} -type f -name '*.qp' -delete + if [[ $? -ne 0 ]];then + wsrep_log_error "Something went wrong with deletion of qpress files. Investigate" + fi + else + wsrep_log_error "Decompression failed. Exit code: $extcode" + exit 22 + fi + fi + + if [[ $incremental -eq 1 ]];then + # Added --ibbackup=xtrabackup_55 because it fails otherwise citing connection issues. + INNOAPPLY="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} \ + --ibbackup=xtrabackup_55 --apply-log $rebuildcmd --redo-only $BDATA --incremental-dir=${DATA} &>>${BDATA}/innobackup.prepare.log" + fi + + wsrep_log_info "Preparing the backup at ${DATA}" + timeit "Xtrabackup prepare stage" "$INNOAPPLY" + + if [ $? -ne 0 ]; + then + wsrep_log_error "${INNOBACKUPEX_BIN} apply finished with errors. Check ${DATA}/innobackup.prepare.log" + exit 22 + fi + + if [[ $speciald -eq 1 ]];then + MAGIC_FILE="${TDATA}/${INFO_FILE}" + set +e + rm $TDATA/innobackup.prepare.log $TDATA/innobackup.move.log + set -e + wsrep_log_info "Moving the backup to ${TDATA}" + timeit "Xtrabackup move stage" "$INNOMOVE" + if [[ $? -eq 0 ]];then + wsrep_log_info "Move successful, removing ${DATA}" + rm -rf $DATA + DATA=${TDATA} + else + wsrep_log_error "Move failed, keeping ${DATA} for further diagnosis" + wsrep_log_error "Check ${DATA}/innobackup.move.log for details" + fi + fi + + if [[ $incremental -eq 1 ]];then + wsrep_log_info "Cleaning up ${DATA} after incremental SST" + [[ -d ${DATA} ]] && rm -rf ${DATA} + DATA=$BDATA + fi + + else + wsrep_log_info "${IST_FILE} received from donor: Running IST" + fi + + if [[ ! -r ${MAGIC_FILE} ]];then + wsrep_log_error "SST magic file ${MAGIC_FILE} not found/readable" + exit 2 + fi + cat "${MAGIC_FILE}" # output UUID:seqno + wsrep_log_info "Total time on joiner: $totime seconds" +fi + +exit 0 diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh new file mode 100644 index 000000000000..6b33eabee237 --- /dev/null +++ b/scripts/wsrep_sst_xtrabackup.sh @@ -0,0 +1,715 @@ +#!/bin/bash -ue +# Copyright (C) 2013 Percona Inc +# +# 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; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston +# MA 02110-1301 USA. + +# Optional dependencies and options documented here: http://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html +# Make sure to read that before proceeding! + + + + +. $(dirname $0)/wsrep_sst_common + +ealgo="" +ekey="" +ekeyfile="" +encrypt=0 +nproc=1 +ecode=0 +XTRABACKUP_PID="" +SST_PORT="" +REMOTEIP="" +tcert="" +tpem="" +sockopt="" +progress="" +ttime=0 +totime=0 +lsn="" +incremental=0 +ecmd="" +rlimit="" + +sfmt="tar" +strmcmd="" +tfmt="" +tcmd="" +rebuild=0 +rebuildcmd="" +payload=0 +pvformat="-F '%N => Rate:%r Avg:%a Elapsed:%t %e Bytes: %b %p' " +pvopts="-f -i 10 -N $WSREP_SST_OPT_ROLE " +uextra=0 + +if which pv &>/dev/null && pv --help | grep -q FORMAT;then + pvopts+=$pvformat +fi +pcmd="pv $pvopts" +declare -a RC + +INNOBACKUPEX_BIN=innobackupex +readonly AUTH=(${WSREP_SST_OPT_AUTH//:/ }) +DATA="${WSREP_SST_OPT_DATA}" +INFO_FILE="xtrabackup_galera_info" +IST_FILE="xtrabackup_ist" +MAGIC_FILE="${DATA}/${INFO_FILE}" + +# Setting the path for ss and ip +export PATH="/usr/sbin:/sbin:$PATH" + +timeit(){ + local stage=$1 + shift + local cmd="$@" + local x1 x2 took extcode + + if [[ $ttime -eq 1 ]];then + x1=$(date +%s) + wsrep_log_info "Evaluating $cmd" + eval "$cmd" + extcode=$? + x2=$(date +%s) + took=$(( x2-x1 )) + wsrep_log_info "NOTE: $stage took $took seconds" + totime=$(( totime+took )) + else + wsrep_log_info "Evaluating $cmd" + eval "$cmd" + extcode=$? + fi + return $extcode +} + +get_keys() +{ + if [[ $encrypt -eq 2 ]];then + return + fi + + if [[ $encrypt -eq 0 ]];then + if my_print_defaults -c $WSREP_SST_OPT_CONF xtrabackup | grep -q encrypt;then + wsrep_log_error "Unexpected option combination. SST may fail. Refer to http://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html " + fi + return + fi + + if [[ $sfmt == 'tar' ]];then + wsrep_log_info "NOTE: Xtrabackup-based encryption - encrypt=1 - cannot be enabled with tar format" + encrypt=0 + return + fi + + wsrep_log_info "Xtrabackup based encryption enabled in my.cnf - Supported only from Xtrabackup 2.1.4" + + if [[ -z $ealgo ]];then + wsrep_log_error "FATAL: Encryption algorithm empty from my.cnf, bailing out" + exit 3 + fi + + if [[ -z $ekey && ! -r $ekeyfile ]];then + wsrep_log_error "FATAL: Either key or keyfile must be readable" + exit 3 + fi + + if [[ -z $ekey ]];then + ecmd="xbcrypt --encrypt-algo=$ealgo --encrypt-key-file=$ekeyfile" + else + ecmd="xbcrypt --encrypt-algo=$ealgo --encrypt-key=$ekey" + fi + + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + ecmd+=" -d" + fi +} + +get_transfer() +{ + if [[ -z $SST_PORT ]];then + TSST_PORT=4444 + else + TSST_PORT=$SST_PORT + fi + + if [[ $tfmt == 'nc' ]];then + if [[ ! -x `which nc` ]];then + wsrep_log_error "nc(netcat) not found in path: $PATH" + exit 2 + fi + wsrep_log_info "Using netcat as streamer" + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + tcmd="nc -dl ${TSST_PORT}" + else + tcmd="nc ${REMOTEIP} ${TSST_PORT}" + fi + else + tfmt='socat' + wsrep_log_info "Using socat as streamer" + if [[ ! -x `which socat` ]];then + wsrep_log_error "socat not found in path: $PATH" + exit 2 + fi + + if [[ $encrypt -eq 2 ]] && ! socat -V | grep -q OPENSSL;then + wsrep_log_info "NOTE: socat is not openssl enabled, falling back to plain transfer" + encrypt=0 + fi + + if [[ $encrypt -eq 2 ]];then + wsrep_log_info "Using openssl based encryption with socat" + if [[ -z $tpem || -z $tcert ]];then + wsrep_log_error "Both PEM and CRT files required" + exit 22 + fi + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + wsrep_log_info "Decrypting with PEM $tpem, CA: $tcert" + tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=$tpem,cafile=${tcert}${sockopt} stdio" + else + wsrep_log_info "Encrypting with PEM $tpem, CA: $tcert" + tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=$tpem,cafile=${tcert}${sockopt}" + fi + else + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + tcmd="socat -u TCP-LISTEN:${TSST_PORT},reuseaddr${sockopt} stdio" + else + tcmd="socat -u stdio TCP:${REMOTEIP}:${TSST_PORT}${sockopt}" + fi + fi + fi + +} + +parse_cnf() +{ + local group=$1 + local var=$2 + reval=$(my_print_defaults -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2-) + if [[ -z $reval ]];then + [[ -n $3 ]] && reval=$3 + fi + echo $reval +} + +get_footprint() +{ + pushd $WSREP_SST_OPT_DATA 1>/dev/null + payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | xargs -0 du --block-size=1 -c | awk 'END { print $1 }') + if my_print_defaults -c $WSREP_SST_OPT_CONF xtrabackup | grep -q -- "--compress";then + # QuickLZ has around 50% compression ratio + # When compression/compaction used, the progress is only an approximate. + payload=$(( payload*1/2 )) + fi + popd 1>/dev/null + pcmd+=" -s $payload" + adjust_progress +} + +adjust_progress() +{ + if [[ -n $progress && $progress != '1' ]];then + if [[ -e $progress ]];then + pcmd+=" 2>>$progress" + else + pcmd+=" 2>$progress" + fi + elif [[ -z $progress && -n $rlimit ]];then + # When rlimit is non-zero + pcmd="pv -q" + fi + + if [[ -n $rlimit && "$WSREP_SST_OPT_ROLE" == "donor" ]];then + wsrep_log_info "Rate-limiting SST to $rlimit" + pcmd+=" -L \$rlimit" + fi +} + +read_cnf() +{ + sfmt=$(parse_cnf sst streamfmt "tar") + tfmt=$(parse_cnf sst transferfmt "socat") + tcert=$(parse_cnf sst tca "") + tpem=$(parse_cnf sst tcert "") + encrypt=$(parse_cnf sst encrypt 0) + sockopt=$(parse_cnf sst sockopt "") + progress=$(parse_cnf sst progress "") + rebuild=$(parse_cnf sst rebuild 0) + ttime=$(parse_cnf sst time 0) + incremental=$(parse_cnf sst incremental 0) + ealgo=$(parse_cnf xtrabackup encrypt "") + ekey=$(parse_cnf xtrabackup encrypt-key "") + ekeyfile=$(parse_cnf xtrabackup encrypt-key-file "") + + # Refer to http://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html + if [[ -z $ealgo ]];then + ealgo=$(parse_cnf sst encrypt-algo "") + ekey=$(parse_cnf sst encrypt-key "") + ekeyfile=$(parse_cnf sst encrypt-key-file "") + fi + rlimit=$(parse_cnf sst rlimit "") + uextra=$(parse_cnf sst use_extra 0) +} + +get_stream() +{ + if [[ $sfmt == 'xbstream' ]];then + wsrep_log_info "Streaming with xbstream" + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + strmcmd="xbstream -x" + else + strmcmd="xbstream -c \${INFO_FILE} \${IST_FILE}" + fi + else + sfmt="tar" + wsrep_log_info "Streaming with tar" + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + strmcmd="tar xfi - --recursive-unlink -h" + else + strmcmd="tar cf - \${INFO_FILE} \${IST_FILE}" + fi + + fi +} + +get_proc() +{ + set +e + nproc=$(grep -c processor /proc/cpuinfo) + [[ -z $nproc || $nproc -eq 0 ]] && nproc=1 + set -e +} + +sig_joiner_cleanup() +{ + wsrep_log_error "Removing $MAGIC_FILE file due to signal" + rm -f "$MAGIC_FILE" +} + +cleanup_joiner() +{ + # Since this is invoked just after exit NNN + local estatus=$? + if [[ $estatus -ne 0 ]];then + wsrep_log_error "Cleanup after exit with status:$estatus" + fi + if [ "${WSREP_SST_OPT_ROLE}" = "joiner" ];then + wsrep_log_info "Removing the sst_in_progress file" + wsrep_cleanup_progress_file + fi + if [[ -n $progress && -p $progress ]];then + wsrep_log_info "Cleaning up fifo file $progress" + rm $progress + fi +} + +check_pid() +{ + local pid_file="$1" + [ -r "$pid_file" ] && ps -p $(cat "$pid_file") >/dev/null 2>&1 +} + +cleanup_donor() +{ + # Since this is invoked just after exit NNN + local estatus=$? + if [[ $estatus -ne 0 ]];then + wsrep_log_error "Cleanup after exit with status:$estatus" + fi + + if [[ -n $XTRABACKUP_PID ]];then + if check_pid $XTRABACKUP_PID + then + wsrep_log_error "xtrabackup process is still running. Killing... " + kill_xtrabackup + fi + + rm -f $XTRABACKUP_PID + fi + rm -f ${DATA}/${IST_FILE} + + if [[ -n $progress && -p $progress ]];then + wsrep_log_info "Cleaning up fifo file $progress" + rm $progress + fi +} + +kill_xtrabackup() +{ + local PID=$(cat $XTRABACKUP_PID) + [ -n "$PID" -a "0" != "$PID" ] && kill $PID && (kill $PID && kill -9 $PID) || : + rm -f "$XTRABACKUP_PID" +} + +setup_ports() +{ + if [[ "$WSREP_SST_OPT_ROLE" == "donor" ]];then + SST_PORT=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $2 }') + REMOTEIP=$(echo $WSREP_SST_OPT_ADDR | awk -F ':' '{ print $1 }') + lsn=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $4 }') + else + SST_PORT=$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $2 }') + fi +} + +# waits ~10 seconds for nc to open the port and then reports ready +# (regardless of timeout) +wait_for_listen() +{ + local PORT=$1 + local ADDR=$2 + local MODULE=$3 + for i in {1..50} + do + ss -p state listening "( sport = :$PORT )" | grep -qE 'socat|nc' && break + sleep 0.2 + done + if [[ $incremental -eq 1 ]];then + echo "ready ${ADDR}/${MODULE}/$lsn" + else + echo "ready ${ADDR}/${MODULE}" + fi +} + +check_extra() +{ + local use_socket=1 + if [[ $uextra -eq 1 ]];then + if my_print_defaults -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--thread-handling=" | grep -q 'pool-of-threads';then + local eport=$(my_print_defaults -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--extra-port=" | cut -d= -f2) + if [[ -n $eport ]];then + # Xtrabackup works only locally. + # Hence, setting host to 127.0.0.1 unconditionally. + wsrep_log_info "SST through extra_port $eport" + INNOEXTRA+=" --host=127.0.0.1 --port=$eport " + use_socket=0 + else + wsrep_log_error "Extra port $eport null, failing" + exit 1 + fi + else + wsrep_log_info "Thread pool not set, ignore the option use_extra" + fi + fi + if [[ $use_socket -eq 1 ]] && [[ -n "${WSREP_SST_OPT_SOCKET}" ]];then + INNOEXTRA+=" --socket=${WSREP_SST_OPT_SOCKET}" + fi +} + +if [[ ! -x `which innobackupex` ]];then + wsrep_log_error "innobackupex not in path: $PATH" + exit 2 +fi + +rm -f "${MAGIC_FILE}" + +if [[ ! ${WSREP_SST_OPT_ROLE} == 'joiner' && ! ${WSREP_SST_OPT_ROLE} == 'donor' ]];then + wsrep_log_error "Invalid role ${WSREP_SST_OPT_ROLE}" + exit 22 +fi + +read_cnf +setup_ports +get_stream +get_transfer + +INNOEXTRA="" +INNOAPPLY="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} --apply-log \$rebuildcmd \${DATA} &>\${DATA}/innobackup.prepare.log" +INNOBACKUP="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} \$INNOEXTRA --galera-info --stream=\$sfmt \${TMPDIR} 2>\${DATA}/innobackup.backup.log" + +if [ "$WSREP_SST_OPT_ROLE" = "donor" ] +then + trap cleanup_donor EXIT + + if [ $WSREP_SST_OPT_BYPASS -eq 0 ] + then + TMPDIR="${TMPDIR:-/tmp}" + + if [ "${AUTH[0]}" != "(null)" ]; then + INNOEXTRA+=" --user=${AUTH[0]}" + fi + + if [ ${#AUTH[*]} -eq 2 ]; then + INNOEXTRA+=" --password=${AUTH[1]}" + elif [ "${AUTH[0]}" != "(null)" ]; then + # Empty password, used for testing, debugging etc. + INNOEXTRA+=" --password=" + fi + + get_keys + if [[ $encrypt -eq 1 ]];then + if [[ -n $ekey ]];then + INNOEXTRA+=" --encrypt=$ealgo --encrypt-key=$ekey " + else + INNOEXTRA+=" --encrypt=$ealgo --encrypt-key-file=$ekeyfile " + fi + fi + + if [[ -n $lsn ]];then + INNOEXTRA+=" --incremental --incremental-lsn=$lsn " + fi + + check_extra + + wsrep_log_info "Streaming the backup to joiner at ${REMOTEIP} ${SST_PORT}" + + if [[ -n $progress ]];then + get_footprint + tcmd="$pcmd | $tcmd" + elif [[ -n $rlimit ]];then + adjust_progress + tcmd="$pcmd | $tcmd" + fi + + set +e + timeit "Donor-Transfer" "$INNOBACKUP | $tcmd; RC=( "\${PIPESTATUS[@]}" )" + set -e + + if [ ${RC[0]} -ne 0 ]; then + wsrep_log_error "${INNOBACKUPEX_BIN} finished with error: ${RC[0]}. " \ + "Check ${DATA}/innobackup.backup.log" + exit 22 + elif [[ ${RC[$(( ${#RC[@]}-1 ))]} -eq 1 ]];then + wsrep_log_error "$tcmd finished with error: ${RC[1]}" + exit 22 + fi + + # innobackupex implicitly writes PID to fixed location in ${TMPDIR} + XTRABACKUP_PID="${TMPDIR}/xtrabackup_pid" + + + else # BYPASS FOR IST + + wsrep_log_info "Bypassing the SST for IST" + STATE="${WSREP_SST_OPT_GTID}" + echo "continue" # now server can resume updating data + echo "${STATE}" > "${MAGIC_FILE}" + echo "1" > "${DATA}/${IST_FILE}" + get_keys + pushd ${DATA} 1>/dev/null + set +e + if [[ $encrypt -eq 1 ]];then + tcmd=" $ecmd | $tcmd" + fi + timeit "Donor-IST-Unencrypted-transfer" "$strmcmd | $tcmd; RC=( "\${PIPESTATUS[@]}" )" + set -e + popd 1>/dev/null + + for ecode in "${RC[@]}";do + if [[ $ecode -ne 0 ]];then + wsrep_log_error "Error while streaming data to joiner node: " \ + "exit codes: ${RC[@]}" + exit 1 + fi + done + fi + + echo "done ${WSREP_SST_OPT_GTID}" + wsrep_log_info "Total time on donor: $totime seconds" + +elif [ "${WSREP_SST_OPT_ROLE}" = "joiner" ] +then + [[ -e $SST_PROGRESS_FILE ]] && wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" + touch $SST_PROGRESS_FILE + + if [[ ! -e ${DATA}/ibdata1 ]];then + incremental=0 + fi + + if [[ $incremental -eq 1 ]];then + wsrep_log_info "Incremental SST enabled" + #lsn=$(/pxc/bin/mysqld --defaults-file=$WSREP_SST_OPT_CONF --basedir=/pxc --wsrep-recover 2>&1 | grep -o 'log sequence number .*' | cut -d " " -f 4 | head -1) + lsn=$(grep to_lsn xtrabackup_checkpoints | cut -d= -f2 | tr -d ' ') + wsrep_log_info "Recovered LSN: $lsn" + fi + + sencrypted=1 + nthreads=1 + + MODULE="xtrabackup_sst" + + # May need xtrabackup_checkpoints later on + rm -f ${DATA}/xtrabackup_binary ${DATA}/xtrabackup_galera_info ${DATA}/xtrabackup_logfile + + ADDR=${WSREP_SST_OPT_ADDR} + if [ -z "${SST_PORT}" ] + then + SST_PORT=4444 + ADDR="$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $1 }'):${SST_PORT}" + fi + + wait_for_listen ${SST_PORT} ${ADDR} ${MODULE} & + + trap sig_joiner_cleanup HUP PIPE INT TERM + trap cleanup_joiner EXIT + + if [[ -n $progress ]];then + adjust_progress + tcmd+=" | $pcmd" + fi + + if [[ $incremental -eq 1 ]];then + BDATA=$DATA + DATA=$(mktemp -d) + MAGIC_FILE="${DATA}/${INFO_FILE}" + fi + + get_keys + set +e + if [[ $encrypt -eq 1 && $sencrypted -eq 1 ]];then + strmcmd=" $ecmd | $strmcmd" + fi + + pushd ${DATA} 1>/dev/null + timeit "Joiner-Recv-Unencrypted" "$tcmd | $strmcmd; RC=( "\${PIPESTATUS[@]}" )" + popd 1>/dev/null + + set -e + + if [[ $sfmt == 'xbstream' ]];then + # Special handling till lp:1193240 is fixed" + if [[ ${RC[$(( ${#RC[@]}-1 ))]} -eq 1 ]];then + wsrep_log_error "Xbstream failed" + wsrep_log_error "Data directory ${DATA} may not be empty: lp:1193240" \ + "Manual intervention required in that case" + exit 32 + fi + fi + + wait %% # join for wait_for_listen thread + + for ecode in "${RC[@]}";do + if [[ $ecode -ne 0 ]];then + wsrep_log_error "Error while getting data from donor node: " \ + "exit codes: ${RC[@]}" + exit 32 + fi + done + + if [ ! -r "${MAGIC_FILE}" ] + then + # this message should cause joiner to abort + wsrep_log_error "xtrabackup process ended without creating '${MAGIC_FILE}'" + wsrep_log_info "Contents of datadir" + wsrep_log_info "$(ls -l ${DATA}/**/*)" + exit 32 + fi + + if ! ps -p ${WSREP_SST_OPT_PARENT} &>/dev/null + then + wsrep_log_error "Parent mysqld process (PID:${WSREP_SST_OPT_PARENT}) terminated unexpectedly." + exit 32 + fi + + if [ ! -r "${DATA}/${IST_FILE}" ] + then + wsrep_log_info "Proceeding with SST" + wsrep_log_info "Removing existing ib_logfile files" + if [[ $incremental -ne 1 ]];then + rm -f ${DATA}/ib_logfile* + else + rm -f ${BDATA}/ib_logfile* + fi + + get_proc + + # Rebuild indexes for compact backups + if grep -q 'compact = 1' ${DATA}/xtrabackup_checkpoints;then + wsrep_log_info "Index compaction detected" + rebuild=1 + fi + + if [[ $rebuild -eq 1 ]];then + nthreads=$(parse_cnf xtrabackup rebuild-threads $nproc) + wsrep_log_info "Rebuilding during prepare with $nthreads threads" + rebuildcmd="--rebuild-indexes --rebuild-threads=$nthreads" + fi + + if test -n "$(find ${DATA} -maxdepth 1 -type f -name '*.qp' -print -quit)";then + + wsrep_log_info "Compressed qpress files found" + + if [[ ! -x `which qpress` ]];then + wsrep_log_error "qpress not found in path: $PATH" + exit 22 + fi + + if [[ -n $progress ]] && pv --help | grep -q 'line-mode';then + count=$(find ${DATA} -type f -name '*.qp' | wc -l) + count=$(( count*2 )) + if pv --help | grep -q FORMAT;then + pvopts="-f -s $count -l -N Decompression -F '%N => Rate:%r Elapsed:%t %e Progress: [%b/$count]'" + else + pvopts="-f -s $count -l -N Decompression" + fi + pcmd="pv $pvopts" + adjust_progress + dcmd="$pcmd | xargs -n 2 qpress -T${nproc}d" + else + dcmd="xargs -n 2 qpress -T${nproc}d" + fi + + wsrep_log_info "Removing existing ibdata1 file" + rm -f ${DATA}/ibdata1 + + # Decompress the qpress files + wsrep_log_info "Decompression with $nproc threads" + timeit "Decompression" "find ${DATA} -type f -name '*.qp' -printf '%p\n%h\n' | $dcmd" + extcode=$? + + if [[ $extcode -eq 0 ]];then + wsrep_log_info "Removing qpress files after decompression" + find ${DATA} -type f -name '*.qp' -delete + if [[ $? -ne 0 ]];then + wsrep_log_error "Something went wrong with deletion of qpress files. Investigate" + fi + else + wsrep_log_error "Decompression failed. Exit code: $extcode" + exit 22 + fi + fi + + if [[ $incremental -eq 1 ]];then + # Added --ibbackup=xtrabackup_55 because it fails otherwise citing connection issues. + INNOAPPLY="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} \ + --ibbackup=xtrabackup_55 --apply-log $rebuildcmd --redo-only $BDATA --incremental-dir=${DATA} &>>${BDATA}/innobackup.prepare.log" + fi + + wsrep_log_info "Preparing the backup at ${DATA}" + timeit "Xtrabackup prepare stage" "$INNOAPPLY" + + if [[ $incremental -eq 1 ]];then + wsrep_log_info "Cleaning up ${DATA} after incremental SST" + [[ -d ${DATA} ]] && rm -rf ${DATA} + DATA=$BDATA + fi + + if [ $? -ne 0 ]; + then + wsrep_log_error "${INNOBACKUPEX_BIN} finished with errors. Check ${DATA}/innobackup.prepare.log" + exit 22 + fi + else + wsrep_log_info "${IST_FILE} received from donor: Running IST" + fi + + if [[ ! -r ${MAGIC_FILE} ]];then + wsrep_log_error "SST magic file ${MAGIC_FILE} not found/readable" + exit 2 + fi + + cat "${MAGIC_FILE}" # output UUID:seqno + wsrep_log_info "Total time on joiner: $totime seconds" +fi + +exit 0 diff --git a/sql/wsrep_applier.cc b/sql/wsrep_applier.cc new file mode 100644 index 000000000000..eea54cc07836 --- /dev/null +++ b/sql/wsrep_applier.cc @@ -0,0 +1,362 @@ +/* Copyright (C) 2013 Codership Oy + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "wsrep_priv.h" +#include "wsrep_binlog.h" // wsrep_dump_rbr_buf() + +#include "log_event.h" // EVENT_LEN_OFFSET, etc. + +#include "wsrep_applier.h" + +/* + read the first event from (*buf). The size of the (*buf) is (*buf_len). + At the end (*buf) is shitfed to point to the following event or NULL and + (*buf_len) will be changed to account just being read bytes of the 1st event. +*/ + +static Log_event* wsrep_read_log_event( + char **arg_buf, size_t *arg_buf_len, + const Format_description_log_event *description_event) +{ + DBUG_ENTER("wsrep_read_log_event"); + char *head= (*arg_buf); + + uint data_len = uint4korr(head + EVENT_LEN_OFFSET); + char *buf= (*arg_buf); + const char *error= 0; + Log_event *res= 0; + + if (data_len > wsrep_max_ws_size) + { + error = "Event too big"; + goto err; + } + + res= Log_event::read_log_event(buf, data_len, &error, description_event); + +err: + if (!res) + { + DBUG_ASSERT(error != 0); + sql_print_error("Error in Log_event::read_log_event(): " + "'%s', data_len: %d, event_type: %d", + error,data_len,head[EVENT_TYPE_OFFSET]); + } + (*arg_buf)+= data_len; + (*arg_buf_len)-= data_len; + DBUG_RETURN(res); +} + +#include "transaction.h" // trans_commit(), trans_rollback() +#include "rpl_rli.h" // class Relay_log_info; +#include "sql_base.h" // close_temporary_table() + +extern const Format_description_log_event *wsrep_format_desc; + +static wsrep_cb_status_t wsrep_apply_events(THD* thd, + const void* events_buf, + size_t buf_len) +{ + char *buf= (char *)events_buf; + int rcode= 0; + int event= 1; + + DBUG_ENTER("wsrep_apply_rbr"); + + if (thd->killed == THD::KILL_CONNECTION && + thd->wsrep_conflict_state != REPLAYING) + { + WSREP_INFO("applier has been aborted, skipping apply_rbr: %lld", + (long long) wsrep_thd_trx_seqno(thd)); + DBUG_RETURN(WSREP_CB_FAILURE); + } + + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + thd->wsrep_query_state= QUERY_EXEC; + if (thd->wsrep_conflict_state!= REPLAYING) + thd->wsrep_conflict_state= NO_CONFLICT; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + + if (!buf_len) WSREP_DEBUG("empty rbr buffer to apply: %lld", + (long long) wsrep_thd_trx_seqno(thd)); + + while(buf_len) + { + int exec_res; + int error = 0; + Log_event* ev= wsrep_read_log_event(&buf, &buf_len, wsrep_format_desc); + + if (!ev) + { + WSREP_ERROR("applier could not read binlog event, seqno: %lld, len: %zu", + (long long)wsrep_thd_trx_seqno(thd), buf_len); + rcode= 1; + goto error; + } + switch (ev->get_type_code()) { + case WRITE_ROWS_EVENT: + case UPDATE_ROWS_EVENT: + case DELETE_ROWS_EVENT: + DBUG_ASSERT(buf_len != 0 || + ((Rows_log_event*)ev)->get_flags(Rows_log_event::STMT_END_F)); + break; + default: + break; + } + + thd->server_id = ev->server_id; // use the original server id for logging + thd->set_time(); // time the query + wsrep_xid_init(&thd->transaction.xid_state.xid, + &thd->wsrep_trx_meta.gtid.uuid, + thd->wsrep_trx_meta.gtid.seqno); + thd->lex->current_select= 0; + if (!ev->when) + ev->when = time(NULL); + ev->thd = thd; + exec_res = ev->apply_event(thd->wsrep_rli); + DBUG_PRINT("info", ("exec_event result: %d", exec_res)); + + if (exec_res) + { + WSREP_WARN("RBR event %d %s apply warning: %d, %lld", + event, ev->get_type_str(), exec_res, + (long long) wsrep_thd_trx_seqno(thd)); + rcode= exec_res; + /* stop processing for the first error */ + delete ev; + goto error; + } + event++; + + if (thd->wsrep_conflict_state!= NO_CONFLICT && + thd->wsrep_conflict_state!= REPLAYING) + WSREP_WARN("conflict state after RBR event applying: %d, %lld", + thd->wsrep_query_state, (long long)wsrep_thd_trx_seqno(thd)); + + if (thd->wsrep_conflict_state == MUST_ABORT) { + WSREP_WARN("RBR event apply failed, rolling back: %lld", + (long long) wsrep_thd_trx_seqno(thd)); + trans_rollback(thd); + thd->locked_tables_list.unlock_locked_tables(thd); + /* Release transactional metadata locks. */ + thd->mdl_context.release_transactional_locks(); + thd->wsrep_conflict_state= NO_CONFLICT; + DBUG_RETURN(WSREP_CB_FAILURE); + } + + if ((ev->get_type_code() == WRITE_ROWS_EVENT || + ev->get_type_code() == UPDATE_ROWS_EVENT || + ev->get_type_code() == DELETE_ROWS_EVENT) && + ((Rows_log_event *) ev)->get_flags(Rows_log_event::STMT_END_F)) + { + thd->wsrep_rli->cleanup_context(thd, 0); + + if (error == 0) + { + thd->clear_error(); + } + else + WSREP_ERROR("Error in %s event: commit of row events failed: %lld", + ev->get_type_str(), (long long)wsrep_thd_trx_seqno(thd)); + } + delete ev; + } + + error: + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + thd->wsrep_query_state= QUERY_IDLE; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + + assert(thd->wsrep_exec_mode== REPL_RECV); + + if (thd->killed == THD::KILL_CONNECTION) + WSREP_INFO("applier aborted: %lld", (long long)wsrep_thd_trx_seqno(thd)); + + if (rcode) DBUG_RETURN(WSREP_CB_FAILURE); + DBUG_RETURN(WSREP_CB_SUCCESS); +} + +wsrep_cb_status_t wsrep_apply_cb(void* const ctx, + const void* const buf, + size_t const buf_len, + uint32_t const flags, + const wsrep_trx_meta_t* meta) +{ + THD* const thd((THD*)ctx); + + thd->wsrep_trx_meta = *meta; + +#ifdef WSREP_PROC_INFO + snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, + "applying write set %lld: %p, %zu", + (long long)wsrep_thd_trx_seqno(thd), buf, buf_len); + thd_proc_info(thd, thd->wsrep_info); +#else + thd_proc_info(thd, "applying write set"); +#endif /* WSREP_PROC_INFO */ + + /* tune FK and UK checking policy */ + if (wsrep_slave_UK_checks == FALSE) + thd->variables.option_bits|= OPTION_RELAXED_UNIQUE_CHECKS; + else + thd->variables.option_bits&= ~OPTION_RELAXED_UNIQUE_CHECKS; + + if (wsrep_slave_FK_checks == FALSE) + thd->variables.option_bits|= OPTION_NO_FOREIGN_KEY_CHECKS; + else + thd->variables.option_bits&= ~OPTION_NO_FOREIGN_KEY_CHECKS; + + if (flags & WSREP_FLAG_ISOLATION) + { + thd->wsrep_apply_toi= true; + /* + Don't run in transaction mode with TOI actions. + */ + thd->variables.option_bits&= ~OPTION_BEGIN; + thd->server_status&= ~SERVER_STATUS_IN_TRANS; + } + wsrep_cb_status_t rcode(wsrep_apply_events(thd, buf, buf_len)); + +#ifdef WSREP_PROC_INFO + snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, + "applied write set %lld", (long long)wsrep_thd_trx_seqno(thd)); + thd_proc_info(thd, thd->wsrep_info); +#else + thd_proc_info(thd, "applied write set"); +#endif /* WSREP_PROC_INFO */ + + if (WSREP_CB_SUCCESS != rcode) + { + wsrep_dump_rbr_buf(thd, buf, buf_len); + } + + TABLE *tmp; + while ((tmp = thd->temporary_tables)) + { + WSREP_DEBUG("Applier %lu, has temporary tables: %s.%s", + thd->thread_id, + (tmp->s) ? tmp->s->db.str : "void", + (tmp->s) ? tmp->s->table_name.str : "void"); + close_temporary_table(thd, tmp, 1, 1); + } + + return rcode; +} + +static wsrep_cb_status_t wsrep_commit(THD* const thd, + wsrep_seqno_t const global_seqno) +{ +#ifdef WSREP_PROC_INFO + snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, + "committing %lld", (long long)wsrep_thd_trx_seqno(thd)); + thd_proc_info(thd, thd->wsrep_info); +#else + thd_proc_info(thd, "committing"); +#endif /* WSREP_PROC_INFO */ + + wsrep_cb_status_t const rcode(trans_commit(thd) ? + WSREP_CB_FAILURE : WSREP_CB_SUCCESS); + +#ifdef WSREP_PROC_INFO + snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, + "committed %lld", (long long)wsrep_thd_trx_seqno(thd)); + thd_proc_info(thd, thd->wsrep_info); +#else + thd_proc_info(thd, "committed"); +#endif /* WSREP_PROC_INFO */ + + if (WSREP_CB_SUCCESS == rcode) + { + // TODO: mark snapshot with global_seqno. + } + + return rcode; +} + +static wsrep_cb_status_t wsrep_rollback(THD* const thd, + wsrep_seqno_t const global_seqno) +{ +#ifdef WSREP_PROC_INFO + snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, + "rolling back %lld", (long long)wsrep_thd_trx_seqno(thd)); + thd_proc_info(thd, thd->wsrep_info); +#else + thd_proc_info(thd, "rolling back"); +#endif /* WSREP_PROC_INFO */ + + wsrep_cb_status_t const rcode(trans_rollback(thd) ? + WSREP_CB_FAILURE : WSREP_CB_SUCCESS); + +#ifdef WSREP_PROC_INFO + snprintf(thd->wsrep_info, sizeof(thd->wsrep_info) - 1, + "rolled back %lld", (long long)wsrep_thd_trx_seqno(thd)); + thd_proc_info(thd, thd->wsrep_info); +#else + thd_proc_info(thd, "rolled back"); +#endif /* WSREP_PROC_INFO */ + + return rcode; +} + +wsrep_cb_status_t wsrep_commit_cb(void* const ctx, + uint32_t const flags, + const wsrep_trx_meta_t* meta, + wsrep_bool_t* const exit, + bool const commit) +{ + THD* const thd((THD*)ctx); + + assert(meta->gtid.seqno == wsrep_thd_trx_seqno(thd)); + + wsrep_cb_status_t rcode; + + if (commit) + rcode = wsrep_commit(thd, meta->gtid.seqno); + else + rcode = wsrep_rollback(thd, meta->gtid.seqno); + + thd->mdl_context.release_transactional_locks(); + free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC)); + thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation; + + if (wsrep_slave_count_change < 0 && commit && WSREP_CB_SUCCESS == rcode) + { + mysql_mutex_lock(&LOCK_wsrep_slave_threads); + if (wsrep_slave_count_change < 0) + { + wsrep_slave_count_change++; + *exit = true; + } + mysql_mutex_unlock(&LOCK_wsrep_slave_threads); + } + + if (*exit == false && thd->wsrep_applier) + { + /* From trans_begin() */ + thd->variables.option_bits|= OPTION_BEGIN; + thd->server_status|= SERVER_STATUS_IN_TRANS; + thd->wsrep_apply_toi= false; + } + + return rcode; +} + + +wsrep_cb_status_t wsrep_unordered_cb(void* const ctx, + const void* const data, + size_t const size) +{ + return WSREP_CB_SUCCESS; +} diff --git a/sql/wsrep_applier.h b/sql/wsrep_applier.h new file mode 100644 index 000000000000..816970db67c0 --- /dev/null +++ b/sql/wsrep_applier.h @@ -0,0 +1,38 @@ +/* Copyright 2013 Codership Oy + + 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 */ + +#ifndef WSREP_APPLIER_H +#define WSREP_APPLIER_H + +#include + +/* wsrep callback prototypes */ + +wsrep_cb_status_t wsrep_apply_cb(void *ctx, + const void* buf, size_t buf_len, + uint32_t flags, + const wsrep_trx_meta_t* meta); + +wsrep_cb_status_t wsrep_commit_cb(void *ctx, + uint32_t flags, + const wsrep_trx_meta_t* meta, + wsrep_bool_t* exit, + bool commit); + +wsrep_cb_status_t wsrep_unordered_cb(void* ctx, + const void* data, + size_t size); + +#endif /* WSREP_APPLIER_H */ diff --git a/sql/wsrep_binlog.cc b/sql/wsrep_binlog.cc new file mode 100644 index 000000000000..af4ec84db85e --- /dev/null +++ b/sql/wsrep_binlog.cc @@ -0,0 +1,378 @@ +/* Copyright (C) 2013 Codership Oy + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "wsrep_binlog.h" +#include "wsrep_priv.h" + +/* + Write the contents of a cache to a memory buffer. + + This function quite the same as MYSQL_BIN_LOG::write_cache(), + with the exception that here we write in buffer instead of log file. + */ +int wsrep_write_cache_buf(IO_CACHE *cache, uchar **buf, size_t *buf_len) +{ + *buf= NULL; + *buf_len= 0; + + my_off_t const saved_pos(my_b_tell(cache)); + + if (reinit_io_cache(cache, READ_CACHE, 0, 0, 0)) + { + WSREP_ERROR("failed to initialize io-cache"); + return ER_ERROR_ON_WRITE; + } + + uint length = my_b_bytes_in_cache(cache); + if (unlikely(0 == length)) length = my_b_fill(cache); + + size_t total_length = 0; + + if (likely(length > 0)) do + { + total_length += length; + /* + Bail out if buffer grows too large. + A temporary fix to avoid allocating indefinitely large buffer, + not a real limit on a writeset size which includes other things + like header and keys. + */ + if (total_length > wsrep_max_ws_size) + { + WSREP_WARN("transaction size limit (%lu) exceeded: %zu", + wsrep_max_ws_size, total_length); + goto error; + } + + uchar* tmp = (uchar *)my_realloc(*buf, total_length, MYF(0)); + if (!tmp) + { + WSREP_ERROR("could not (re)allocate buffer: %zu + %u", + *buf_len, length); + goto error; + } + *buf = tmp; + + memcpy(*buf + *buf_len, cache->read_pos, length); + *buf_len = total_length; + cache->read_pos = cache->read_end; + } while ((cache->file >= 0) && (length = my_b_fill(cache))); + + if (reinit_io_cache(cache, WRITE_CACHE, saved_pos, 0, 0)) + { + WSREP_WARN("failed to initialize io-cache"); + goto cleanup; + } + + return 0; + +error: + if (reinit_io_cache(cache, WRITE_CACHE, saved_pos, 0, 0)) + { + WSREP_ERROR("failed to initialize io-cache"); + } +cleanup: + my_free(*buf); + *buf= NULL; + *buf_len= 0; + return ER_ERROR_ON_WRITE; +} + +#define STACK_SIZE 4096 /* 4K - for buffer preallocated on the stack: + * many transactions would fit in there + * so there is no need to reach for the heap */ + +/* Returns minimum multiple of HEAP_PAGE_SIZE that is >= length */ +static inline size_t +heap_size(size_t length) +{ + return (length + HEAP_PAGE_SIZE - 1)/HEAP_PAGE_SIZE*HEAP_PAGE_SIZE; +} + +/* append data to writeset */ +static inline wsrep_status_t +wsrep_append_data(wsrep_t* const wsrep, + wsrep_ws_handle_t* const ws, + const void* const data, + size_t const len) +{ + struct wsrep_buf const buff = { data, len }; + wsrep_status_t const rc(wsrep->append_data(wsrep, ws, &buff, 1, + WSREP_DATA_ORDERED, true)); + if (rc != WSREP_OK) + { + WSREP_WARN("append_data() returned %d", rc); + } + + return rc; +} + +/* + Write the contents of a cache to wsrep provider. + + This function quite the same as MYSQL_BIN_LOG::write_cache(), + with the exception that here we write in buffer instead of log file. + + This version reads all of cache into single buffer and then appends to a + writeset at once. + */ +static int wsrep_write_cache_once(wsrep_t* const wsrep, + THD* const thd, + IO_CACHE* const cache, + size_t* const len) +{ + my_off_t const saved_pos(my_b_tell(cache)); + + if (reinit_io_cache(cache, READ_CACHE, 0, 0, 0)) + { + WSREP_ERROR("failed to initialize io-cache"); + return ER_ERROR_ON_WRITE; + } + + int err(WSREP_OK); + + size_t total_length(0); + uchar stack_buf[STACK_SIZE]; /* to avoid dynamic allocations for few data*/ + uchar* heap_buf(NULL); + uchar* buf(stack_buf); + size_t allocated(sizeof(stack_buf)); + size_t used(0); + + uint length(my_b_bytes_in_cache(cache)); + if (unlikely(0 == length)) length = my_b_fill(cache); + + if (likely(length > 0)) do + { + total_length += length; + /* + Bail out if buffer grows too large. + A temporary fix to avoid allocating indefinitely large buffer, + not a real limit on a writeset size which includes other things + like header and keys. + */ + if (unlikely(total_length > wsrep_max_ws_size)) + { + WSREP_WARN("transaction size limit (%lu) exceeded: %zu", + wsrep_max_ws_size, total_length); + err = WSREP_TRX_SIZE_EXCEEDED; + goto cleanup; + } + + if (total_length > allocated) + { + size_t const new_size(heap_size(total_length)); + uchar* tmp = (uchar *)my_realloc(heap_buf, new_size, MYF(0)); + if (!tmp) + { + WSREP_ERROR("could not (re)allocate buffer: %zu + %u", + allocated, length); + err = WSREP_TRX_SIZE_EXCEEDED; + goto cleanup; + } + + heap_buf = tmp; + buf = heap_buf; + allocated = new_size; + + if (used <= STACK_SIZE && used > 0) // there's data in stack_buf + { + DBUG_ASSERT(buf == stack_buf); + memcpy(heap_buf, stack_buf, used); + } + } + + memcpy(buf + used, cache->read_pos, length); + used = total_length; + cache->read_pos = cache->read_end; + } while ((cache->file >= 0) && (length = my_b_fill(cache))); + + if (used > 0) + err = wsrep_append_data(wsrep, &thd->wsrep_ws_handle, buf, used); + + if (WSREP_OK == err) *len = total_length; + +cleanup: + if (reinit_io_cache(cache, WRITE_CACHE, saved_pos, 0, 0)) + { + WSREP_ERROR("failed to reinitialize io-cache"); + } + + if (unlikely(WSREP_OK != err)) wsrep_dump_rbr_buf(thd, buf, used); + + my_free(heap_buf); + return err; +} + +/* + Write the contents of a cache to wsrep provider. + + This function quite the same as MYSQL_BIN_LOG::write_cache(), + with the exception that here we write in buffer instead of log file. + + This version uses incremental data appending as it reads it from cache. + */ +static int wsrep_write_cache_inc(wsrep_t* const wsrep, + THD* const thd, + IO_CACHE* const cache, + size_t* const len) +{ + my_off_t const saved_pos(my_b_tell(cache)); + + if (reinit_io_cache(cache, READ_CACHE, 0, 0, 0)) + { + WSREP_ERROR("failed to initialize io-cache"); + return WSREP_TRX_ERROR; + } + + int err(WSREP_OK); + + size_t total_length(0); + + uint length(my_b_bytes_in_cache(cache)); + if (unlikely(0 == length)) length = my_b_fill(cache); + + if (likely(length > 0)) do + { + total_length += length; + /* bail out if buffer grows too large + not a real limit on a writeset size which includes other things + like header and keys. + */ + if (unlikely(total_length > wsrep_max_ws_size)) + { + WSREP_WARN("transaction size limit (%lu) exceeded: %zu", + wsrep_max_ws_size, total_length); + err = WSREP_TRX_SIZE_EXCEEDED; + goto cleanup; + } + + if(WSREP_OK != (err=wsrep_append_data(wsrep, &thd->wsrep_ws_handle, + cache->read_pos, length))) + goto cleanup; + + cache->read_pos = cache->read_end; + } while ((cache->file >= 0) && (length = my_b_fill(cache))); + + if (WSREP_OK == err) *len = total_length; + +cleanup: + if (reinit_io_cache(cache, WRITE_CACHE, saved_pos, 0, 0)) + { + WSREP_ERROR("failed to reinitialize io-cache"); + } + + return err; +} + +/* + Write the contents of a cache to wsrep provider. + + This function quite the same as MYSQL_BIN_LOG::write_cache(), + with the exception that here we write in buffer instead of log file. + */ +int wsrep_write_cache(wsrep_t* const wsrep, + THD* const thd, + IO_CACHE* const cache, + size_t* const len) +{ + if (wsrep_incremental_data_collection) { + return wsrep_write_cache_inc(wsrep, thd, cache, len); + } + else { + return wsrep_write_cache_once(wsrep, thd, cache, len); + } +} + +void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len) +{ + char filename[PATH_MAX]= {0}; + int len= snprintf(filename, PATH_MAX, "%s/GRA_%ld_%lld.log", + wsrep_data_home_dir, thd->thread_id, + (long long)wsrep_thd_trx_seqno(thd)); + if (len >= PATH_MAX) + { + WSREP_ERROR("RBR dump path too long: %d, skipping dump.", len); + return; + } + + FILE *of= fopen(filename, "wb"); + if (of) + { + fwrite (rbr_buf, buf_len, 1, of); + fclose(of); + } + else + { + WSREP_ERROR("Failed to open file '%s': %d (%s)", + filename, errno, strerror(errno)); + } +} + +void wsrep_dump_rbr_direct(THD* thd, IO_CACHE* cache) +{ + char filename[PATH_MAX]= {0}; + int len= snprintf(filename, PATH_MAX, "%s/GRA_%ld_%lld.log", + wsrep_data_home_dir, thd->thread_id, + (long long)wsrep_thd_trx_seqno(thd)); + size_t bytes_in_cache = 0; + // check path + if (len >= PATH_MAX) + { + WSREP_ERROR("RBR dump path too long: %d, skipping dump.", len); + return ; + } + // init cache + my_off_t const saved_pos(my_b_tell(cache)); + if (reinit_io_cache(cache, READ_CACHE, 0, 0, 0)) + { + WSREP_ERROR("failed to initialize io-cache"); + return ; + } + // open file + FILE* of = fopen(filename, "wb"); + if (!of) + { + WSREP_ERROR("Failed to open file '%s': %d (%s)", + filename, errno, strerror(errno)); + goto cleanup; + } + // ready to write + bytes_in_cache= my_b_bytes_in_cache(cache); + if (unlikely(bytes_in_cache == 0)) bytes_in_cache = my_b_fill(cache); + if (likely(bytes_in_cache > 0)) do + { + if (my_fwrite(of, cache->read_pos, bytes_in_cache, + MYF(MY_WME | MY_NABP)) == (size_t) -1) + { + WSREP_ERROR("Failed to write file '%s'", filename); + goto cleanup; + } + cache->read_pos= cache->read_end; + } while ((cache->file >= 0) && (bytes_in_cache= my_b_fill(cache))); + if(cache->error == -1) + { + WSREP_ERROR("RBR inconsistent"); + goto cleanup; + } +cleanup: + // init back + if (reinit_io_cache(cache, WRITE_CACHE, saved_pos, 0, 0)) + { + WSREP_ERROR("failed to reinitialize io-cache"); + } + // close file + if (of) fclose(of); +} + diff --git a/sql/wsrep_binlog.h b/sql/wsrep_binlog.h new file mode 100644 index 000000000000..76192f6e119a --- /dev/null +++ b/sql/wsrep_binlog.h @@ -0,0 +1,52 @@ +/* Copyright (C) 2013 Codership Oy + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef WSREP_BINLOG_H +#define WSREP_BINLOG_H + +#include "sql_class.h" // THD, IO_CACHE + +#define HEAP_PAGE_SIZE 65536 /* 64K */ +#define WSREP_MAX_WS_SIZE (0xFFFFFFFFUL - HEAP_PAGE_SIZE) + +/* + Write the contents of a cache to a memory buffer. + + This function quite the same as MYSQL_BIN_LOG::write_cache(), + with the exception that here we write in buffer instead of log file. + */ +int wsrep_write_cache_buf(IO_CACHE *cache, uchar **buf, size_t *buf_len); + +/* + Write the contents of a cache to wsrep provider. + + This function quite the same as MYSQL_BIN_LOG::write_cache(), + with the exception that here we write in buffer instead of log file. + + @param len total amount of data written + @return wsrep error status + */ +int wsrep_write_cache (wsrep_t* wsrep, + THD* thd, + IO_CACHE* cache, + size_t* len); + +/* Dump replication buffer to disk */ +void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len); + +/* Dump replication buffer to disk without intermediate buffer */ +void wsrep_dump_rbr_direct(THD* thd, IO_CACHE* cache); + +#endif /* WSREP_BINLOG_H */ diff --git a/sql/wsrep_check_opts.cc b/sql/wsrep_check_opts.cc new file mode 100644 index 000000000000..5ec18c799786 --- /dev/null +++ b/sql/wsrep_check_opts.cc @@ -0,0 +1,379 @@ +/* Copyright 2011 Codership Oy + + 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 */ + +//#include +#include +//#include +//#include + +#include "wsrep_mysqld.h" + +#include +#include +#include +#include + +/* This file is about checking for correctness of mysql configuration options */ + +struct opt +{ + const char* const name; + const char* value; +}; + +/* A list of options to check. + * At first we assume default values and then see if they are changed on CLI or + * in my.cnf */ +static struct opt opts[] = +{ + { "wsrep_slave_threads", "1" }, // mysqld.cc + { "bind_address", "0.0.0.0" }, // mysqld.cc + { "wsrep_sst_method", "rsync" }, // mysqld.cc + { "wsrep_sst_receive_address","AUTO"}, // mysqld.cc + { "binlog_format", "ROW" }, // mysqld.cc + { "wsrep_provider", "none" }, // mysqld.cc + { "query_cache_type", "0" }, // mysqld.cc + { "query_cache_size", "0" }, // mysqld.cc + { "locked_in_memory", "0" }, // mysqld.cc + { "wsrep_cluster_address", "0" }, // mysqld.cc + { "locks_unsafe_for_binlog", "0" }, // ha_innodb.cc + { "autoinc_lock_mode", "1" }, // ha_innodb.cc + { 0, 0 } +}; + +enum +{ + WSREP_SLAVE_THREADS, + BIND_ADDRESS, + WSREP_SST_METHOD, + WSREP_SST_RECEIVE_ADDRESS, + BINLOG_FORMAT, + WSREP_PROVIDER, + QUERY_CACHE_TYPE, + QUERY_CACHE_SIZE, + LOCKED_IN_MEMORY, + WSREP_CLUSTER_ADDRESS, + LOCKS_UNSAFE_FOR_BINLOG, + AUTOINC_LOCK_MODE +}; + + +/* A class to make a copy of argv[] vector */ +struct argv_copy +{ + int const argc_; + char** argv_; + + argv_copy (int const argc, const char* const argv[]) : + argc_ (argc), + argv_ (reinterpret_cast(calloc(argc_, sizeof(char*)))) + { + if (argv_) + { + for (int i = 0; i < argc_; ++i) + { + argv_[i] = strdup(argv[i]); + + if (!argv_[i]) + { + argv_free (); // free whatever bee allocated + return; + } + } + } + } + + ~argv_copy () { argv_free (); } + +private: + argv_copy (const argv_copy&); + argv_copy& operator= (const argv_copy&); + + void argv_free() + { + if (argv_) + { + for (int i = 0; (i < argc_) && argv_[i] ; ++i) free (argv_[i]); + free (argv_); + argv_ = 0; + } + } +}; + +/* a short corresponding to '--' byte sequence */ +static short const long_opt_prefix ('-' + ('-' << 8)); + +/* Normalizes long options to have '_' instead of '-' */ +static int +normalize_opts (argv_copy& a) +{ + if (a.argv_) + { + for (int i = 0; i < a.argc_; ++i) + { + char* ptr = a.argv_[i]; + if (long_opt_prefix == *(short*)ptr) // long option + { + ptr += 2; + const char* end = strchr(ptr, '='); + + if (!end) end = ptr + strlen(ptr); + + for (; ptr != end; ++ptr) if ('-' == *ptr) *ptr = '_'; + } + } + + return 0; + } + + return EINVAL; +} + +/* Find required options in the argument list and change their values */ +static int +find_opts (argv_copy& a, struct opt* const opts) +{ + for (int i = 0; i < a.argc_; ++i) + { + char* ptr = a.argv_[i] + 2; // we're interested only in long options + + struct opt* opt = opts; + for (; 0 != opt->name; ++opt) + { + if (!strstr(ptr, opt->name)) continue; // try next option + + /* 1. try to find value after the '=' */ + opt->value = strchr(ptr, '=') + 1; + + /* 2. if no '=', try next element in the argument vector */ + if (reinterpret_cast(1) == opt->value) + { + /* also check that the next element is not an option itself */ + if (i + 1 < a.argc_ && *(a.argv_[i + 1]) != '-') + { + ++i; + opt->value = a.argv_[i]; + } + else opt->value = ""; // no value supplied (like boolean opt) + } + + break; // option found, break inner loop + } + } + + return 0; +} + +/* Parses string for an integer. Returns 0 on success. */ +int get_long_long (const struct opt& opt, long long* const val, int const base) +{ + const char* const str = opt.value; + + if ('\0' != *str) + { + char* endptr; + + *val = strtoll (str, &endptr, base); + + if ('k' == *endptr || 'K' == *endptr) + { + *val *= 1024L; + endptr++; + } + else if ('m' == *endptr || 'M' == *endptr) + { + *val *= 1024L * 1024L; + endptr++; + } + else if ('g' == *endptr || 'G' == *endptr) + { + *val *= 1024L * 1024L * 1024L; + endptr++; + } + + if ('\0' == *endptr) return 0; // the whole string was a valid integer + } + + WSREP_ERROR ("Bad value for *%s: '%s'. Should be integer.", + opt.name, opt.value); + + return EINVAL; +} + +/* This is flimzy coz hell knows how mysql interprets boolean strings... + * and, no, I'm not going to become versed in how mysql handles options - + * I'd rather sing. + + Aha, http://dev.mysql.com/doc/refman/5.1/en/dynamic-system-variables.html: + Variables that have a type of “boolean†can be set to 0, 1, ON or OFF. (If you + set them on the command line or in an option file, use the numeric values.) + + So it is '0' for FALSE, '1' or empty string for TRUE + + */ +int get_bool (const struct opt& opt, bool* const val) +{ + const char* str = opt.value; + + while (isspace(*str)) ++str; // skip initial whitespaces + + ssize_t str_len = strlen(str); + switch (str_len) + { + case 0: + *val = true; + return 0; + case 1: + if ('0' == *str || '1' == *str) + { + *val = ('1' == *str); + return 0; + } + } + + WSREP_ERROR ("Bad value for *%s: '%s'. Should be '0', '1' or empty string.", + opt.name, opt.value); + + return EINVAL; +} + +static int +check_opts (int const argc, const char* const argv[], struct opt opts[]) +{ + /* First, make a copy of argv to be able to manipulate it */ + argv_copy a(argc, argv); + + if (!a.argv_) + { + WSREP_ERROR ("Could not copy argv vector: not enough memory."); + return ENOMEM; + } + + int err = normalize_opts (a); + if (err) + { + WSREP_ERROR ("Failed to normalize options."); + return err; + } + + err = find_opts (a, opts); + if (err) + { + WSREP_ERROR ("Failed to parse options."); + return err; + } + + /* At this point we have updated default values in our option list to + what has been specified on the command line / my.cnf */ + + long long slave_threads; + err = get_long_long (opts[WSREP_SLAVE_THREADS], &slave_threads, 10); + if (err) return err; + + int rcode = 0; + + if (slave_threads > 1) + /* Need to check AUTOINC_LOCK_MODE and LOCKS_UNSAFE_FOR_BINLOG */ + { + long long autoinc_lock_mode; + err = get_long_long (opts[AUTOINC_LOCK_MODE], &autoinc_lock_mode, 10); + if (err) return err; + + bool locks_unsafe_for_binlog; + err = get_bool (opts[LOCKS_UNSAFE_FOR_BINLOG],&locks_unsafe_for_binlog); + if (err) return err; + + if (autoinc_lock_mode != 2) + { + WSREP_ERROR ("Parallel applying (wsrep_slave_threads > 1) requires" + " innodb_autoinc_lock_mode = 2."); + rcode = EINVAL; + } + } + + bool locked_in_memory; + err = get_bool (opts[LOCKED_IN_MEMORY], &locked_in_memory); + if (err) { WSREP_ERROR("get_bool error: %s", strerror(err)); return err; } + if (locked_in_memory) + { + WSREP_ERROR ("Memory locking is not supported (locked_in_memory=%s)", + locked_in_memory ? "ON" : "OFF"); + rcode = EINVAL; + } + + if (!strcasecmp(opts[WSREP_SST_METHOD].value,"mysqldump")) + { + if (!strcasecmp(opts[BIND_ADDRESS].value, "127.0.0.1") || + !strcasecmp(opts[BIND_ADDRESS].value, "localhost")) + { + WSREP_ERROR ("wsrep_sst_method is set to 'mysqldump' yet " + "mysqld bind_address is set to '%s', which makes it " + "impossible to receive state transfer from another " + "node, since mysqld won't accept such connections. " + "If you wish to use mysqldump state transfer method, " + "set bind_address to allow mysql client connections " + "from other cluster members (e.g. 0.0.0.0).", + opts[BIND_ADDRESS].value); + rcode = EINVAL; + } + } + else + { + // non-mysqldump SST requires wsrep_cluster_address on startup + if (strlen(opts[WSREP_CLUSTER_ADDRESS].value) == 0) + { + WSREP_ERROR ("%s SST method requires wsrep_cluster_address to be " + "configured on startup.",opts[WSREP_SST_METHOD].value); + rcode = EINVAL; + } + } + + if (strcasecmp(opts[WSREP_SST_RECEIVE_ADDRESS].value, "AUTO")) + { + if (!strncasecmp(opts[WSREP_SST_RECEIVE_ADDRESS].value, + "127.0.0.1", strlen("127.0.0.1")) || + !strncasecmp(opts[WSREP_SST_RECEIVE_ADDRESS].value, + "localhost", strlen("localhost"))) + { + WSREP_WARN ("wsrep_sst_receive_address is set to '%s' which " + "makes it impossible for another host to reach this " + "one. Please set it to the address which this node " + "can be connected at by other cluster members.", + opts[WSREP_SST_RECEIVE_ADDRESS].value); +// rcode = EINVAL; + } + } + + if (strcasecmp(opts[WSREP_PROVIDER].value, "none")) + { + if (strcasecmp(opts[BINLOG_FORMAT].value, "ROW")) + { + WSREP_ERROR ("Only binlog_format = 'ROW' is currently supported. " + "Configured value: '%s'. Please adjust your " + "configuration.", opts[BINLOG_FORMAT].value); + + rcode = EINVAL; + } + } + + return rcode; +} + +int +wsrep_check_opts (int const argc, char* const* const argv) +{ + return check_opts (argc, argv, opts); +} + diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc new file mode 100644 index 000000000000..61072eec1cbf --- /dev/null +++ b/sql/wsrep_hton.cc @@ -0,0 +1,567 @@ +/* Copyright 2008 Codership Oy + + 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 */ + +#include +#include "sql_base.h" +#include "rpl_filter.h" +#include +#include "wsrep_mysqld.h" +#include "wsrep_binlog.h" +#include +#include + +extern handlerton *binlog_hton; +extern int binlog_close_connection(handlerton *hton, THD *thd); +extern ulonglong thd_to_trx_id(THD *thd); + +extern "C" int thd_binlog_format(const MYSQL_THD thd); +// todo: share interface with ha_innodb.c + +enum wsrep_trx_status wsrep_run_wsrep_commit(THD *thd, handlerton *hton, + bool all); + +/* + Cleanup after local transaction commit/rollback, replay or TOI. +*/ +void wsrep_cleanup_transaction(THD *thd) +{ + if (wsrep_emulate_bin_log) thd_binlog_trx_reset(thd); + thd->wsrep_ws_handle.trx_id= WSREP_UNDEFINED_TRX_ID; + thd->wsrep_trx_meta.gtid= WSREP_GTID_UNDEFINED; + thd->wsrep_trx_meta.depends_on= WSREP_SEQNO_UNDEFINED; + thd->wsrep_exec_mode= LOCAL_STATE; + return; +} + +/* + wsrep hton +*/ +handlerton *wsrep_hton; + + +/* + Registers wsrep hton at commit time if transaction has registered htons + for supported engine types. + + Hton should not be registered for TOTAL_ORDER operations. + + Registration is needed for both LOCAL_MODE and REPL_RECV transactions to run + commit in 2pc so that wsrep position gets properly recorded in storage + engines. + + Note that all hton calls should immediately return for threads that are + in REPL_RECV mode as their states are controlled by wsrep appliers or + replaying code. Only threads in LOCAL_MODE should run wsrep callbacks + from hton methods. +*/ +void wsrep_register_hton(THD* thd, bool all) +{ + if (thd->wsrep_exec_mode != TOTAL_ORDER && !thd->wsrep_apply_toi) + { + THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt; + for (Ha_trx_info *i= trans->ha_list; WSREP(thd) && i; i = i->next()) + { + if (i->ht()->db_type == DB_TYPE_INNODB) + { + trans_register_ha(thd, all, wsrep_hton); + + /* follow innodb read/write settting + * but, as an exception: CTAS with empty result set will not be + * replicated unless we declare wsrep hton as read/write here + */ + if (i->is_trx_read_write() || + (thd->lex->sql_command == SQLCOM_CREATE_TABLE && + thd->wsrep_exec_mode == LOCAL_STATE)) + { + thd->ha_data[wsrep_hton->slot].ha_info[all].set_trx_read_write(); + } + break; + } + } + } +} + +/* + Calls wsrep->post_commit() for locally executed transactions that have + got seqno from provider (must commit) and don't require replaying. + */ +void wsrep_post_commit(THD* thd, bool all) +{ + if (thd->wsrep_exec_mode == LOCAL_COMMIT) + { + DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno != WSREP_SEQNO_UNDEFINED); + if (wsrep->post_commit(wsrep, &thd->wsrep_ws_handle)) + { + DBUG_PRINT("wsrep", ("set committed fail")); + WSREP_WARN("set committed fail: %llu %d", + (long long)thd->real_id, thd->stmt_da->status()); + } + wsrep_cleanup_transaction(thd); + } +} + +/* + wsrep exploits binlog's caches even if binlogging itself is not + activated. In such case connection close needs calling + actual binlog's method. + Todo: split binlog hton from its caches to use ones by wsrep + without referring to binlog's stuff. +*/ +static int +wsrep_close_connection(handlerton* hton, THD* thd) +{ + DBUG_ENTER("wsrep_close_connection"); + + if (thd->wsrep_exec_mode == REPL_RECV) + { + DBUG_RETURN(0); + } + + if (wsrep_emulate_bin_log && thd_get_ha_data(thd, binlog_hton) != NULL) + binlog_hton->close_connection (binlog_hton, thd); + DBUG_RETURN(0); +} + +/* + prepare/wsrep_run_wsrep_commit can fail in two ways + - certification test or an equivalent. As a result, + the current transaction just rolls back + Error codes: + WSREP_TRX_CERT_FAIL, WSREP_TRX_SIZE_EXCEEDED, WSREP_TRX_ERROR + - a post-certification failure makes this server unable to + commit its own WS and therefore the server must abort +*/ +static int wsrep_prepare(handlerton *hton, THD *thd, bool all) +{ + DBUG_ENTER("wsrep_prepare"); + + if (thd->wsrep_exec_mode == REPL_RECV) + { + DBUG_RETURN(0); + } + + DBUG_ASSERT(thd->ha_data[wsrep_hton->slot].ha_info[all].is_trx_read_write()); + DBUG_ASSERT(thd->wsrep_exec_mode == LOCAL_STATE); + DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno == WSREP_SEQNO_UNDEFINED); + + if ((all || + !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) && + (thd->variables.wsrep_on && !wsrep_trans_cache_is_empty(thd))) + { + DBUG_RETURN (wsrep_run_wsrep_commit(thd, hton, all)); + } + DBUG_RETURN(0); +} + +static int wsrep_savepoint_set(handlerton *hton, THD *thd, void *sv) +{ + DBUG_ENTER("wsrep_savepoint_set"); + + if (thd->wsrep_exec_mode == REPL_RECV) + { + DBUG_RETURN(0); + } + + if (!wsrep_emulate_bin_log) return 0; + int rcode = binlog_hton->savepoint_set(binlog_hton, thd, sv); + return rcode; +} +static int wsrep_savepoint_rollback(handlerton *hton, THD *thd, void *sv) +{ + DBUG_ENTER("wsrep_savepoint_rollback"); + + if (thd->wsrep_exec_mode == REPL_RECV) + { + DBUG_RETURN(0); + } + + if (!wsrep_emulate_bin_log) return 0; + int rcode = binlog_hton->savepoint_rollback(binlog_hton, thd, sv); + return rcode; +} + +static int wsrep_rollback(handlerton *hton, THD *thd, bool all) +{ + DBUG_ENTER("wsrep_rollback"); + + if (thd->wsrep_exec_mode == REPL_RECV) + { + DBUG_RETURN(0); + } + + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + if ((all || !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) && + (thd->variables.wsrep_on && thd->wsrep_conflict_state != MUST_REPLAY)) + { + if (wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle)) + { + DBUG_PRINT("wsrep", ("setting rollback fail")); + WSREP_ERROR("settting rollback fail: thd: %llu SQL: %s", + (long long)thd->real_id, thd->query()); + } + wsrep_cleanup_transaction(thd); + } + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + DBUG_RETURN(0); +} + +int wsrep_commit(handlerton *hton, THD *thd, bool all) +{ + DBUG_ENTER("wsrep_commit"); + + if (thd->wsrep_exec_mode == REPL_RECV) + { + DBUG_RETURN(0); + } + + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + if ((all || !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) && + (thd->variables.wsrep_on && thd->wsrep_conflict_state != MUST_REPLAY)) + { + if (thd->wsrep_exec_mode == LOCAL_COMMIT) + { + DBUG_ASSERT(thd->ha_data[wsrep_hton->slot].ha_info[all].is_trx_read_write()); + /* + Call to wsrep->post_commit() (moved to wsrep_post_commit()) must + be done only after commit has done for all involved htons. + */ + DBUG_PRINT("wsrep", ("commit")); + } + else + { + /* + Transaction didn't go through wsrep->pre_commit() so just roll back + possible changes to clean state. + */ + if (wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle)) + { + DBUG_PRINT("wsrep", ("setting rollback fail")); + WSREP_ERROR("settting rollback fail: thd: %llu SQL: %s", + (long long)thd->real_id, thd->query()); + } + wsrep_cleanup_transaction(thd); + } + } + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + DBUG_RETURN(0); +} + + +extern Rpl_filter* binlog_filter; +extern my_bool opt_log_slave_updates; + +enum wsrep_trx_status +wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) +{ + int rcode= -1; + size_t data_len= 0; + IO_CACHE *cache; + int replay_round= 0; + + if (thd->stmt_da->is_error()) { + WSREP_ERROR("commit issue, error: %d %s", + thd->stmt_da->sql_errno(), thd->stmt_da->message()); + } + + DBUG_ENTER("wsrep_run_wsrep_commit"); + + if (thd->slave_thread && !opt_log_slave_updates) DBUG_RETURN(WSREP_TRX_OK); + + if (thd->wsrep_exec_mode == REPL_RECV) { + + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + if (thd->wsrep_conflict_state == MUST_ABORT) { + if (wsrep_debug) + WSREP_INFO("WSREP: must abort for BF"); + DBUG_PRINT("wsrep", ("BF apply commit fail")); + thd->wsrep_conflict_state = NO_CONFLICT; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + // + // TODO: test all calls of the rollback. + // rollback must happen automagically innobase_rollback(hton, thd, 1); + // + DBUG_RETURN(WSREP_TRX_ERROR); + } + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + } + + if (thd->wsrep_exec_mode != LOCAL_STATE) DBUG_RETURN(WSREP_TRX_OK); + + if (thd->wsrep_consistency_check == CONSISTENCY_CHECK_RUNNING) { + WSREP_DEBUG("commit for consistency check: %s", thd->query()); + DBUG_RETURN(WSREP_TRX_OK); + } + + DBUG_PRINT("wsrep", ("replicating commit")); + + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + if (thd->wsrep_conflict_state == MUST_ABORT) { + DBUG_PRINT("wsrep", ("replicate commit fail")); + thd->wsrep_conflict_state = ABORTED; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + if (wsrep_debug) { + WSREP_INFO("innobase_commit, abort %s", + (thd->query()) ? thd->query() : "void"); + } + DBUG_RETURN(WSREP_TRX_CERT_FAIL); + } + + mysql_mutex_lock(&LOCK_wsrep_replaying); + + while (wsrep_replaying > 0 && + thd->wsrep_conflict_state == NO_CONFLICT && + thd->killed == THD::NOT_KILLED && + !shutdown_in_progress) + { + + mysql_mutex_unlock(&LOCK_wsrep_replaying); + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + + mysql_mutex_lock(&thd->mysys_var->mutex); + thd_proc_info(thd, "wsrep waiting on replaying"); + thd->mysys_var->current_mutex= &LOCK_wsrep_replaying; + thd->mysys_var->current_cond= &COND_wsrep_replaying; + mysql_mutex_unlock(&thd->mysys_var->mutex); + + mysql_mutex_lock(&LOCK_wsrep_replaying); + // Using timedwait is a hack to avoid deadlock in case if BF victim + // misses the signal. + struct timespec wtime = {0, 1000000}; + mysql_cond_timedwait(&COND_wsrep_replaying, &LOCK_wsrep_replaying, + &wtime); + + if (replay_round++ % 100000 == 0) + WSREP_DEBUG("commit waiting for replaying: replayers %d, thd: (%lu) " + "conflict: %d (round: %d)", + wsrep_replaying, thd->thread_id, + thd->wsrep_conflict_state, replay_round); + + mysql_mutex_unlock(&LOCK_wsrep_replaying); + + mysql_mutex_lock(&thd->mysys_var->mutex); + thd->mysys_var->current_mutex= 0; + thd->mysys_var->current_cond= 0; + mysql_mutex_unlock(&thd->mysys_var->mutex); + + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + mysql_mutex_lock(&LOCK_wsrep_replaying); + } + mysql_mutex_unlock(&LOCK_wsrep_replaying); + + if (thd->wsrep_conflict_state == MUST_ABORT) { + DBUG_PRINT("wsrep", ("replicate commit fail")); + thd->wsrep_conflict_state = ABORTED; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + WSREP_DEBUG("innobase_commit abort after replaying wait %s", + (thd->query()) ? thd->query() : "void"); + DBUG_RETURN(WSREP_TRX_CERT_FAIL); + } + + thd->wsrep_query_state = QUERY_COMMITTING; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + + cache = get_trans_log(thd); + rcode = 0; + if (cache) { + thd->binlog_flush_pending_rows_event(true); + rcode = wsrep_write_cache(wsrep, thd, cache, &data_len); + if (WSREP_OK != rcode) { + WSREP_ERROR("rbr write fail, data_len: %zu, %d", data_len, rcode); + DBUG_RETURN(WSREP_TRX_SIZE_EXCEEDED); + } + } + + if (data_len == 0) + { + if (thd->stmt_da->is_ok() && + thd->stmt_da->affected_rows() > 0 && + !binlog_filter->is_on()) + { + WSREP_DEBUG("empty rbr buffer, query: %s, " + "affected rows: %llu, " + "changed tables: %d, " + "sql_log_bin: %d, " + "wsrep status (%d %d %d)", + thd->query(), thd->stmt_da->affected_rows(), + stmt_has_updated_trans_table(thd), thd->variables.sql_log_bin, + thd->wsrep_exec_mode, thd->wsrep_query_state, + thd->wsrep_conflict_state); + } + else + { + WSREP_DEBUG("empty rbr buffer, query: %s", thd->query()); + } + thd->wsrep_query_state= QUERY_EXEC; + DBUG_RETURN(WSREP_TRX_OK); + } + + if (WSREP_UNDEFINED_TRX_ID == thd->wsrep_ws_handle.trx_id) + { + WSREP_WARN("SQL statement was ineffective, THD: %lu, buf: %zu\n" + "QUERY: %s\n" + " => Skipping replication", + thd->thread_id, data_len, thd->query()); + rcode = WSREP_TRX_FAIL; + } + else if (!rcode) + { + if (WSREP_OK == rcode) + rcode = wsrep->pre_commit(wsrep, + (wsrep_conn_id_t)thd->thread_id, + &thd->wsrep_ws_handle, + WSREP_FLAG_COMMIT | + ((thd->wsrep_PA_safe) ? + 0ULL : WSREP_FLAG_PA_UNSAFE), + &thd->wsrep_trx_meta); + + if (rcode == WSREP_TRX_MISSING) { + WSREP_WARN("Transaction missing in provider, thd: %ld, SQL: %s", + thd->thread_id, thd->query()); + rcode = WSREP_TRX_FAIL; + } else if (rcode == WSREP_BF_ABORT) { + WSREP_DEBUG("thd %lu seqno %lld BF aborted by provider, will replay", + thd->thread_id, (long long)thd->wsrep_trx_meta.gtid.seqno); + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + thd->wsrep_conflict_state = MUST_REPLAY; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + mysql_mutex_lock(&LOCK_wsrep_replaying); + wsrep_replaying++; + WSREP_DEBUG("replaying increased: %d, thd: %lu", + wsrep_replaying, thd->thread_id); + mysql_mutex_unlock(&LOCK_wsrep_replaying); + } + } else { + WSREP_ERROR("I/O error reading from thd's binlog iocache: " + "errno=%d, io cache code=%d", my_errno, cache->error); + DBUG_ASSERT(0); // failure like this can not normally happen + DBUG_RETURN(WSREP_TRX_ERROR); + } + + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + switch(rcode) { + case 0: + /* + About MUST_ABORT: We assume that even if thd conflict state was set + to MUST_ABORT, underlying transaction was not rolled back or marked + as deadlock victim in QUERY_COMMITTING state. Conflict state is + set to NO_CONFLICT and commit proceeds as usual. + */ + if (thd->wsrep_conflict_state == MUST_ABORT) + thd->wsrep_conflict_state= NO_CONFLICT; + + if (thd->wsrep_conflict_state != NO_CONFLICT) + { + WSREP_WARN("thd %lu seqno %lld: conflict state %d after post commit", + thd->thread_id, + (long long)thd->wsrep_trx_meta.gtid.seqno, + thd->wsrep_conflict_state); + } + thd->wsrep_exec_mode= LOCAL_COMMIT; + DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno != WSREP_SEQNO_UNDEFINED); + /* Override XID iff it was generated by mysql */ + if (thd->transaction.xid_state.xid.get_my_xid()) + { + wsrep_xid_init(&thd->transaction.xid_state.xid, + &thd->wsrep_trx_meta.gtid.uuid, + thd->wsrep_trx_meta.gtid.seqno); + } + DBUG_PRINT("wsrep", ("replicating commit success")); + break; + case WSREP_BF_ABORT: + DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno != WSREP_SEQNO_UNDEFINED); + case WSREP_TRX_FAIL: + WSREP_DEBUG("commit failed for reason: %d", rcode); + DBUG_PRINT("wsrep", ("replicating commit fail")); + + thd->wsrep_query_state= QUERY_EXEC; + + if (thd->wsrep_conflict_state == MUST_ABORT) { + thd->wsrep_conflict_state= ABORTED; + } + else + { + WSREP_DEBUG("conflict state: %d", thd->wsrep_conflict_state); + if (thd->wsrep_conflict_state == NO_CONFLICT) + { + thd->wsrep_conflict_state = CERT_FAILURE; + WSREP_LOG_CONFLICT(NULL, thd, FALSE); + } + } + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + + DBUG_RETURN(WSREP_TRX_CERT_FAIL); + + case WSREP_SIZE_EXCEEDED: + WSREP_ERROR("transaction size exceeded"); + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + DBUG_RETURN(WSREP_TRX_SIZE_EXCEEDED); + case WSREP_CONN_FAIL: + WSREP_ERROR("connection failure"); + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + DBUG_RETURN(WSREP_TRX_ERROR); + default: + WSREP_ERROR("unknown connection failure"); + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + DBUG_RETURN(WSREP_TRX_ERROR); + } + + thd->wsrep_query_state= QUERY_EXEC; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + + DBUG_RETURN(WSREP_TRX_OK); +} + + +static int wsrep_hton_init(void *p) +{ + wsrep_hton= (handlerton *)p; + //wsrep_hton->state=opt_bin_log ? SHOW_OPTION_YES : SHOW_OPTION_NO; + wsrep_hton->state= SHOW_OPTION_YES; + wsrep_hton->db_type=DB_TYPE_WSREP; + wsrep_hton->savepoint_offset= sizeof(my_off_t); + wsrep_hton->close_connection= wsrep_close_connection; + wsrep_hton->savepoint_set= wsrep_savepoint_set; + wsrep_hton->savepoint_rollback= wsrep_savepoint_rollback; + wsrep_hton->commit= wsrep_commit; + wsrep_hton->rollback= wsrep_rollback; + wsrep_hton->prepare= wsrep_prepare; + wsrep_hton->flags= HTON_NOT_USER_SELECTABLE | HTON_HIDDEN; // todo: fix flags + wsrep_hton->slot= 0; + return 0; +} + + +struct st_mysql_storage_engine wsrep_storage_engine= +{ MYSQL_HANDLERTON_INTERFACE_VERSION }; + + +mysql_declare_plugin(wsrep) +{ + MYSQL_STORAGE_ENGINE_PLUGIN, + &wsrep_storage_engine, + "wsrep", + "Codership Oy", + "A pseudo storage engine to represent transactions in multi-master " + "synchornous replication", + PLUGIN_LICENSE_GPL, + wsrep_hton_init, /* Plugin Init */ + NULL, /* Plugin Deinit */ + 0x0100 /* 1.0 */, + NULL, /* status variables */ + NULL, /* system variables */ + NULL, /* config options */ + 0, /* flags */ +} +mysql_declare_plugin_end; diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc new file mode 100644 index 000000000000..dec7bb8986df --- /dev/null +++ b/sql/wsrep_mysqld.cc @@ -0,0 +1,1524 @@ +/* Copyright 2008-2013 Codership Oy + + 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 */ + +#include +#include +#include +#include "wsrep_priv.h" +#include "wsrep_thd.h" +#include "wsrep_sst.h" +#include "wsrep_utils.h" +#include "wsrep_var.h" +#include "wsrep_binlog.h" +#include "wsrep_applier.h" +#include +#include +#include "log_event.h" +#include + +Format_description_log_event *wsrep_format_desc = NULL; +wsrep_t *wsrep = NULL; +my_bool wsrep_emulate_bin_log = FALSE; // activating parts of binlog interface + +/* + * Begin configuration options and their default values + */ + +const char* wsrep_data_home_dir = NULL; +const char* wsrep_dbug_option = ""; + +long wsrep_slave_threads = 1; // # of slave action appliers wanted +int wsrep_slave_count_change = 0; // # of appliers to stop or start +my_bool wsrep_debug = 0; // enable debug level logging +my_bool wsrep_convert_LOCK_to_trx = 1; // convert locking sessions to trx +ulong wsrep_retry_autocommit = 5; // retry aborted autocommit trx +my_bool wsrep_auto_increment_control = 1; // control auto increment variables +my_bool wsrep_drupal_282555_workaround = 1; // retry autoinc insert after dupkey +my_bool wsrep_incremental_data_collection = 0; // incremental data collection +ulong wsrep_max_ws_size = 1073741824UL;//max ws (RBR buffer) size +ulong wsrep_max_ws_rows = 65536; // max number of rows in ws +int wsrep_to_isolation = 0; // # of active TO isolation threads +my_bool wsrep_certify_nonPK = 1; // certify, even when no primary key +long wsrep_max_protocol_version = 3; // maximum protocol version to use +ulong wsrep_forced_binlog_format = BINLOG_FORMAT_UNSPEC; +my_bool wsrep_recovery = 0; // recovery +my_bool wsrep_replicate_myisam = 0; // enable myisam replication +my_bool wsrep_log_conflicts = 0; +ulong wsrep_mysql_replication_bundle = 0; +my_bool wsrep_desync = 0; // desynchronize the node from the + // cluster +my_bool wsrep_load_data_splitting = 1; // commit load data every 10K intervals +my_bool wsrep_restart_slave = 0; // should mysql slave thread be + // restarted, if node joins back +my_bool wsrep_restart_slave_activated = 0; // node has dropped, and slave + // restart will be needed +my_bool wsrep_slave_UK_checks = 0; // slave thread does UK checks +my_bool wsrep_slave_FK_checks = 0; // slave thread does FK checks +/* + * End configuration options + */ + +static const wsrep_uuid_t cluster_uuid = WSREP_UUID_UNDEFINED; +const wsrep_uuid_t* wsrep_cluster_uuid() +{ + return &cluster_uuid; +} +static char cluster_uuid_str[40]= { 0, }; +static const char* cluster_status_str[WSREP_VIEW_MAX] = +{ + "Primary", + "non-Primary", + "Disconnected" +}; + +static char provider_name[256]= { 0, }; +static char provider_version[256]= { 0, }; +static char provider_vendor[256]= { 0, }; + +/* + * wsrep status variables + */ +my_bool wsrep_connected = FALSE; +my_bool wsrep_ready = FALSE; // node can accept queries +const char* wsrep_cluster_state_uuid = cluster_uuid_str; +long long wsrep_cluster_conf_id = WSREP_SEQNO_UNDEFINED; +const char* wsrep_cluster_status = cluster_status_str[WSREP_VIEW_DISCONNECTED]; +long wsrep_cluster_size = 0; +long wsrep_local_index = -1; +long long wsrep_local_bf_aborts = 0; +const char* wsrep_provider_name = provider_name; +const char* wsrep_provider_version = provider_version; +const char* wsrep_provider_vendor = provider_vendor; +/* End wsrep status variables */ + +wsrep_uuid_t local_uuid = WSREP_UUID_UNDEFINED; +wsrep_seqno_t local_seqno = WSREP_SEQNO_UNDEFINED; +wsp::node_status local_status; +long wsrep_protocol_version = 3; + +// Boolean denoting if server is in initial startup phase. This is needed +// to make sure that main thread waiting in wsrep_sst_wait() is signaled +// if there was no state gap on receiving first view event. +static my_bool wsrep_startup = TRUE; + + +static void wsrep_log_cb(wsrep_log_level_t level, const char *msg) { + switch (level) { + case WSREP_LOG_INFO: + sql_print_information("WSREP: %s", msg); + break; + case WSREP_LOG_WARN: + sql_print_warning("WSREP: %s", msg); + break; + case WSREP_LOG_ERROR: + case WSREP_LOG_FATAL: + sql_print_error("WSREP: %s", msg); + break; + case WSREP_LOG_DEBUG: + if (wsrep_debug) sql_print_information ("[Debug] WSREP: %s", msg); + default: + break; + } +} + +static void wsrep_log_states (wsrep_log_level_t const level, + const wsrep_uuid_t* const group_uuid, + wsrep_seqno_t const group_seqno, + const wsrep_uuid_t* const node_uuid, + wsrep_seqno_t const node_seqno) +{ + char uuid_str[37]; + char msg[256]; + + wsrep_uuid_print (group_uuid, uuid_str, sizeof(uuid_str)); + snprintf (msg, 255, "WSREP: Group state: %s:%lld", + uuid_str, (long long)group_seqno); + wsrep_log_cb (level, msg); + + wsrep_uuid_print (node_uuid, uuid_str, sizeof(uuid_str)); + snprintf (msg, 255, "WSREP: Local state: %s:%lld", + uuid_str, (long long)node_seqno); + wsrep_log_cb (level, msg); +} + +static my_bool set_SE_checkpoint(THD* unused, plugin_ref plugin, void* arg) +{ + XID* xid= reinterpret_cast(arg); + handlerton* hton= plugin_data(plugin, handlerton *); + if (hton->db_type == DB_TYPE_INNODB) + { + const wsrep_uuid_t* uuid(wsrep_xid_uuid(xid)); + char uuid_str[40] = {0, }; + wsrep_uuid_print(uuid, uuid_str, sizeof(uuid_str)); + WSREP_DEBUG("Set WSREPXid for InnoDB: %s:%lld", + uuid_str, (long long)wsrep_xid_seqno(xid)); + hton->wsrep_set_checkpoint(hton, xid); + } + return FALSE; +} + +void wsrep_set_SE_checkpoint(XID* xid) +{ + plugin_foreach(NULL, set_SE_checkpoint, MYSQL_STORAGE_ENGINE_PLUGIN, xid); +} + +static my_bool get_SE_checkpoint(THD* unused, plugin_ref plugin, void* arg) +{ + XID* xid= reinterpret_cast(arg); + handlerton* hton= plugin_data(plugin, handlerton *); + if (hton->db_type == DB_TYPE_INNODB) + { + hton->wsrep_get_checkpoint(hton, xid); + const wsrep_uuid_t* uuid(wsrep_xid_uuid(xid)); + char uuid_str[40] = {0, }; + wsrep_uuid_print(uuid, uuid_str, sizeof(uuid_str)); + WSREP_DEBUG("Read WSREPXid from InnoDB: %s:%lld", + uuid_str, (long long)wsrep_xid_seqno(xid)); + + } + return FALSE; +} + +void wsrep_get_SE_checkpoint(XID* xid) +{ + plugin_foreach(NULL, get_SE_checkpoint, MYSQL_STORAGE_ENGINE_PLUGIN, xid); +} + +static wsrep_cb_status_t +wsrep_view_handler_cb (void* app_ctx, + void* recv_ctx, + const wsrep_view_info_t* view, + const char* state, + size_t state_len, + void** sst_req, + size_t* sst_req_len) +{ + *sst_req = NULL; + *sst_req_len = 0; + + wsrep_member_status_t new_status= local_status.get(); + + if (memcmp(&cluster_uuid, &view->state_id.uuid, sizeof(wsrep_uuid_t))) + { + memcpy((wsrep_uuid_t*)&cluster_uuid, &view->state_id.uuid, + sizeof(cluster_uuid)); + + wsrep_uuid_print (&cluster_uuid, cluster_uuid_str, + sizeof(cluster_uuid_str)); + } + + wsrep_cluster_conf_id= view->view; + wsrep_cluster_status= cluster_status_str[view->status]; + wsrep_cluster_size= view->memb_num; + wsrep_local_index= view->my_idx; + + WSREP_INFO("New cluster view: global state: %s:%lld, view# %lld: %s, " + "number of nodes: %ld, my index: %ld, protocol version %d", + wsrep_cluster_state_uuid, (long long)view->state_id.seqno, + (long long)wsrep_cluster_conf_id, wsrep_cluster_status, + wsrep_cluster_size, wsrep_local_index, view->proto_ver); + + /* Proceed further only if view is PRIMARY */ + if (WSREP_VIEW_PRIMARY != view->status) { + wsrep_ready_set(FALSE); + new_status= WSREP_MEMBER_UNDEFINED; + /* Always record local_uuid and local_seqno in non-prim since this + * may lead to re-initializing provider and start position is + * determined according to these variables */ + // WRONG! local_uuid should be the last primary configuration uuid we were + // a member of. local_seqno should be updated in commit calls. + // local_uuid= cluster_uuid; + // local_seqno= view->first - 1; + goto out; + } + + switch (view->proto_ver) + { + case 0: + case 1: + case 2: + case 3: + // version change + if (view->proto_ver != wsrep_protocol_version) + { + my_bool wsrep_ready_saved= wsrep_ready; + wsrep_ready_set(FALSE); + WSREP_INFO("closing client connections for " + "protocol change %ld -> %d", + wsrep_protocol_version, view->proto_ver); + wsrep_close_client_connections(TRUE); + wsrep_protocol_version= view->proto_ver; + wsrep_ready_set(wsrep_ready_saved); + } + break; + default: + WSREP_ERROR("Unsupported application protocol version: %d", + view->proto_ver); + unireg_abort(1); + } + + if (view->state_gap) + { + WSREP_WARN("Gap in state sequence. Need state transfer."); + + /* After that wsrep will call wsrep_sst_prepare. */ + /* keep ready flag 0 until we receive the snapshot */ + wsrep_ready_set(FALSE); + + /* Close client connections to ensure that they don't interfere + * with SST. Necessary only if storage engines are initialized + * before SST. + * TODO: Just killing all ongoing transactions should be enough + * since wsrep_ready is OFF and no new transactions can start. + */ + if (!wsrep_before_SE()) + { + WSREP_DEBUG("[debug]: closing client connections for PRIM"); + wsrep_close_client_connections(TRUE); + } + + ssize_t const req_len= wsrep_sst_prepare (sst_req); + + if (req_len < 0) + { + WSREP_ERROR("SST preparation failed: %zd (%s)", -req_len, + strerror(-req_len)); + new_status= WSREP_MEMBER_UNDEFINED; + } + else + { + assert(sst_req != NULL); + *sst_req_len= req_len; + new_status= WSREP_MEMBER_JOINER; + } + } + else + { + /* + * NOTE: Initialize wsrep_group_uuid here only if it wasn't initialized + * before - OR - it was reinitilized on startup (lp:992840) + */ + if (wsrep_startup) + { + if (wsrep_before_SE()) + { + wsrep_SE_init_grab(); + // Signal mysqld init thread to continue + wsrep_sst_complete (&cluster_uuid, view->state_id.seqno, false); + // and wait for SE initialization + wsrep_SE_init_wait(); + } + else + { + local_uuid= cluster_uuid; + local_seqno= view->state_id.seqno; + } + /* Init storage engine XIDs from first view */ + XID xid; + wsrep_xid_init(&xid, &local_uuid, local_seqno); + wsrep_set_SE_checkpoint(&xid); + new_status= WSREP_MEMBER_JOINED; + } + + // just some sanity check + if (memcmp (&local_uuid, &cluster_uuid, sizeof (wsrep_uuid_t))) + { + WSREP_ERROR("Undetected state gap. Can't continue."); + wsrep_log_states(WSREP_LOG_FATAL, &cluster_uuid, view->state_id.seqno, + &local_uuid, -1); + unireg_abort(1); + } + } + + if (wsrep_auto_increment_control) + { + global_system_variables.auto_increment_offset= view->my_idx + 1; + global_system_variables.auto_increment_increment= view->memb_num; + } + + { /* capabilities may be updated on new configuration */ + uint64_t const caps(wsrep->capabilities (wsrep)); + + my_bool const idc((caps & WSREP_CAP_INCREMENTAL_WRITESET) != 0); + if (TRUE == wsrep_incremental_data_collection && FALSE == idc) + { + WSREP_WARN("Unsupported protocol downgrade: " + "incremental data collection disabled. Expect abort."); + } + wsrep_incremental_data_collection = idc; + } + +out: + if (view->status == WSREP_VIEW_PRIMARY) wsrep_startup= FALSE; + local_status.set(new_status, view); + + return WSREP_CB_SUCCESS; +} + +void wsrep_ready_set (my_bool x) +{ + WSREP_DEBUG("Setting wsrep_ready to %d", x); + if (mysql_mutex_lock (&LOCK_wsrep_ready)) abort(); + if (wsrep_ready != x) + { + wsrep_ready= x; + mysql_cond_signal (&COND_wsrep_ready); + } + mysql_mutex_unlock (&LOCK_wsrep_ready); +} + +// Wait until wsrep has reached ready state +void wsrep_ready_wait () +{ + if (mysql_mutex_lock (&LOCK_wsrep_ready)) abort(); + while (!wsrep_ready) + { + WSREP_INFO("Waiting to reach ready state"); + mysql_cond_wait (&COND_wsrep_ready, &LOCK_wsrep_ready); + } + WSREP_INFO("ready state reached"); + mysql_mutex_unlock (&LOCK_wsrep_ready); +} + +static void wsrep_synced_cb(void* app_ctx) +{ + WSREP_INFO("Synchronized with group, ready for connections"); + bool signal_main= false; + if (mysql_mutex_lock (&LOCK_wsrep_ready)) abort(); + if (!wsrep_ready) + { + wsrep_ready= TRUE; + mysql_cond_signal (&COND_wsrep_ready); + signal_main= true; + + } + local_status.set(WSREP_MEMBER_SYNCED); + mysql_mutex_unlock (&LOCK_wsrep_ready); + + if (signal_main) + { + wsrep_SE_init_grab(); + // Signal mysqld init thread to continue + wsrep_sst_complete (&local_uuid, local_seqno, false); + // and wait for SE initialization + wsrep_SE_init_wait(); + } + if (wsrep_restart_slave_activated) + { + int rcode; + WSREP_INFO("MySQL slave restart"); + wsrep_restart_slave_activated= FALSE; + + mysql_mutex_lock(&LOCK_active_mi); + if ((rcode = start_slave_threads(1 /* need mutex */, + 0 /* no wait for start*/, + active_mi, + master_info_file, + relay_log_info_file, + SLAVE_SQL))) + { + WSREP_WARN("Failed to create slave threads: %d", rcode); + } + mysql_mutex_unlock(&LOCK_active_mi); + + } +} + +static void wsrep_init_position() +{ + /* read XIDs from storage engines */ + XID xid; + memset(&xid, 0, sizeof(xid)); + xid.formatID= -1; + wsrep_get_SE_checkpoint(&xid); + + if (xid.formatID == -1) + { + WSREP_INFO("Read nil XID from storage engines, skipping position init"); + return; + } + else if (!wsrep_is_wsrep_xid(&xid)) + { + WSREP_WARN("Read non-wsrep XID from storage engines, skipping position init"); + return; + } + + const wsrep_uuid_t* uuid= wsrep_xid_uuid(&xid); + const wsrep_seqno_t seqno= wsrep_xid_seqno(&xid); + + char uuid_str[40] = {0, }; + wsrep_uuid_print(uuid, uuid_str, sizeof(uuid_str)); + WSREP_INFO("Initial position: %s:%lld", uuid_str, (long long)seqno); + + + if (!memcmp(&local_uuid, &WSREP_UUID_UNDEFINED, sizeof(local_uuid)) && + local_seqno == WSREP_SEQNO_UNDEFINED) + { + // Initial state + local_uuid= *uuid; + local_seqno= seqno; + } + else if (memcmp(&local_uuid, uuid, sizeof(local_uuid)) || + local_seqno != seqno) + { + WSREP_WARN("Initial position was provided by configuration or SST, " + "avoiding override"); + } +} + +extern const char* my_bind_addr_str; + +int wsrep_init() +{ + int rcode= -1; + + wsrep_ready_set(FALSE); + assert(wsrep_provider); + wsrep_format_desc= new Format_description_log_event(4); + wsrep_init_position(); + + if ((rcode= wsrep_load(wsrep_provider, &wsrep, wsrep_log_cb)) != WSREP_OK) + { + if (strcasecmp(wsrep_provider, WSREP_NONE)) + { + WSREP_ERROR("wsrep_load(%s) failed: %s (%d). Reverting to no provider.", + wsrep_provider, strerror(rcode), rcode); + strcpy((char*)wsrep_provider, WSREP_NONE); // damn it's a dirty hack + (void) wsrep_init(); + return rcode; + } + else /* this is for recursive call above */ + { + WSREP_ERROR("Could not revert to no provider: %s (%d). Need to abort.", + strerror(rcode), rcode); + unireg_abort(1); + } + } + + if (strlen(wsrep_provider)== 0 || + !strcmp(wsrep_provider, WSREP_NONE)) + { + // enable normal operation in case no provider is specified + wsrep_ready_set(TRUE); + global_system_variables.wsrep_on = 0; + wsrep_init_args args; + args.logger_cb = wsrep_log_cb; + args.options = (wsrep_provider_options) ? + wsrep_provider_options : ""; + rcode = wsrep->init(wsrep, &args); + if (rcode) + { + DBUG_PRINT("wsrep",("wsrep::init() failed: %d", rcode)); + WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode); + wsrep->free(wsrep); + free(wsrep); + wsrep = NULL; + } + return rcode; + } + else + { + global_system_variables.wsrep_on = 1; + strncpy(provider_name, + wsrep->provider_name, sizeof(provider_name) - 1); + strncpy(provider_version, + wsrep->provider_version, sizeof(provider_version) - 1); + strncpy(provider_vendor, + wsrep->provider_vendor, sizeof(provider_vendor) - 1); + } + + if (!wsrep_data_home_dir || strlen(wsrep_data_home_dir) == 0) + wsrep_data_home_dir = mysql_real_data_home; + + char node_addr[512]= { 0, }; + size_t const node_addr_max= sizeof(node_addr) - 1; + if (!wsrep_node_address || !strcmp(wsrep_node_address, "")) + { + size_t const ret= wsrep_guess_ip(node_addr, node_addr_max); + if (!(ret > 0 && ret < node_addr_max)) + { + WSREP_WARN("Failed to guess base node address. Set it explicitly via " + "wsrep_node_address."); + node_addr[0]= '\0'; + } + } + else + { + strncpy(node_addr, wsrep_node_address, node_addr_max); + } + + char inc_addr[512]= { 0, }; + size_t const inc_addr_max= sizeof (inc_addr); + if ((!wsrep_node_incoming_address || + !strcmp (wsrep_node_incoming_address, WSREP_NODE_INCOMING_AUTO))) + { + unsigned int my_bind_ip= INADDR_ANY; // default if not set + if (my_bind_addr_str && strlen(my_bind_addr_str)) + { + my_bind_ip= wsrep_check_ip(my_bind_addr_str); + } + + if (INADDR_ANY != my_bind_ip) + { + if (INADDR_NONE != my_bind_ip && INADDR_LOOPBACK != my_bind_ip) + { + snprintf(inc_addr, inc_addr_max, "%s:%u", + my_bind_addr_str, (int)mysqld_port); + } // else leave inc_addr an empty string - mysqld is not listening for + // client connections on network interfaces. + } + else // mysqld binds to 0.0.0.0, take IP from wsrep_node_address if possible + { + size_t const node_addr_len= strlen(node_addr); + if (node_addr_len > 0) + { + const char* const colon= strrchr(node_addr, ':'); + if (strchr(node_addr, ':') == colon) // 1 or 0 ':' + { + size_t const ip_len= colon ? colon - node_addr : node_addr_len; + if (ip_len + 7 /* :55555\0 */ < inc_addr_max) + { + memcpy (inc_addr, node_addr, ip_len); + snprintf(inc_addr + ip_len, inc_addr_max - ip_len, ":%u", + (int)mysqld_port); + } + else + { + WSREP_WARN("Guessing address for incoming client connections: " + "address too long."); + inc_addr[0]= '\0'; + } + } + else + { + WSREP_WARN("Guessing address for incoming client connections: " + "too many colons :) ."); + inc_addr[0]= '\0'; + } + } + + if (!strlen(inc_addr)) + { + WSREP_WARN("Guessing address for incoming client connections failed. " + "Try setting wsrep_node_incoming_address explicitly."); + } + } + } + else if (!strchr(wsrep_node_incoming_address, ':')) // no port included + { + if ((int)inc_addr_max <= + snprintf(inc_addr, inc_addr_max, "%s:%u", + wsrep_node_incoming_address,(int)mysqld_port)) + { + WSREP_WARN("Guessing address for incoming client connections: " + "address too long."); + inc_addr[0]= '\0'; + } + } + else + { + size_t const need = strlen (wsrep_node_incoming_address); + if (need >= inc_addr_max) { + WSREP_WARN("wsrep_node_incoming_address too long: %zu", need); + inc_addr[0]= '\0'; + } + else { + memcpy (inc_addr, wsrep_node_incoming_address, need); + } + } + + struct wsrep_init_args wsrep_args; + + struct wsrep_gtid const state_id = { local_uuid, local_seqno }; + + wsrep_args.data_dir = wsrep_data_home_dir; + wsrep_args.node_name = (wsrep_node_name) ? wsrep_node_name : ""; + wsrep_args.node_address = node_addr; + wsrep_args.node_incoming = inc_addr; + wsrep_args.options = (wsrep_provider_options) ? + wsrep_provider_options : ""; + wsrep_args.proto_ver = wsrep_max_protocol_version; + + wsrep_args.state_id = &state_id; + + wsrep_args.logger_cb = wsrep_log_cb; + wsrep_args.view_handler_cb = wsrep_view_handler_cb; + wsrep_args.apply_cb = wsrep_apply_cb; + wsrep_args.commit_cb = wsrep_commit_cb; + wsrep_args.unordered_cb = wsrep_unordered_cb; + wsrep_args.sst_donate_cb = wsrep_sst_donate_cb; + wsrep_args.synced_cb = wsrep_synced_cb; + + rcode = wsrep->init(wsrep, &wsrep_args); + + if (rcode) + { + DBUG_PRINT("wsrep",("wsrep::init() failed: %d", rcode)); + WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode); + wsrep->free(wsrep); + free(wsrep); + wsrep = NULL; + } + + return rcode; +} + +extern "C" int wsrep_on(void *); + +void wsrep_init_startup (bool first) +{ + if (wsrep_init()) unireg_abort(1); + + wsrep_thr_lock_init(wsrep_thd_is_BF, wsrep_abort_thd, + wsrep_debug, wsrep_convert_LOCK_to_trx, wsrep_on); + + /* Skip replication start if no cluster address */ + if (!wsrep_cluster_address || strlen(wsrep_cluster_address) == 0) return; + + if (first) wsrep_sst_grab(); // do it so we can wait for SST below + + if (!wsrep_start_replication()) unireg_abort(1); + + wsrep_create_rollbacker(); + wsrep_create_appliers(1); + + if (first && !wsrep_sst_wait()) unireg_abort(1);// wait until SST is completed +} + + +void wsrep_deinit() +{ + wsrep_unload(wsrep); + wsrep= 0; + provider_name[0]= '\0'; + provider_version[0]= '\0'; + provider_vendor[0]= '\0'; + + delete wsrep_format_desc; + wsrep_format_desc= NULL; +} + +void wsrep_recover() +{ + if (!memcmp(&local_uuid, &WSREP_UUID_UNDEFINED, sizeof(wsrep_uuid_t)) && + local_seqno == -2) + { + char uuid_str[40]; + wsrep_uuid_print(&local_uuid, uuid_str, sizeof(uuid_str)); + WSREP_INFO("Position %s:%lld given at startup, skipping position recovery", + uuid_str, (long long)local_seqno); + return; + } + XID xid; + memset(&xid, 0, sizeof(xid)); + xid.formatID= -1; + wsrep_get_SE_checkpoint(&xid); + char uuid_str[40]; + wsrep_uuid_print(wsrep_xid_uuid(&xid), uuid_str, sizeof(uuid_str)); + WSREP_INFO("Recovered position: %s:%lld", uuid_str, + (long long)wsrep_xid_seqno(&xid)); +} + + +void wsrep_stop_replication(THD *thd) +{ + WSREP_INFO("Stop replication"); + if (!wsrep) + { + WSREP_INFO("Provider was not loaded, in stop replication"); + return; + } + + /* disconnect from group first to get wsrep_ready == FALSE */ + WSREP_DEBUG("Provider disconnect"); + wsrep->disconnect(wsrep); + + wsrep_connected= FALSE; + + wsrep_close_client_connections(TRUE); + + /* wait until appliers have stopped */ + wsrep_wait_appliers_close(thd); + + return; +} + +/* This one is set to true when --wsrep-new-cluster is found in the command + * line arguments */ +static my_bool wsrep_new_cluster= FALSE; +#define WSREP_NEW_CLUSTER "--wsrep-new-cluster" +/* Finds and hides --wsrep-new-cluster from the arguments list + * by moving it to the end of the list and decrementing argument count */ +void wsrep_filter_new_cluster (int* argc, char* argv[]) +{ + int i; + for (i= *argc - 1; i > 0; i--) + { + /* make a copy of the argument to convert possible underscores to hyphens. + * the copy need not to be longer than WSREP_NEW_CLUSTER option */ + char arg[sizeof(WSREP_NEW_CLUSTER) + 1]= { 0, }; + strncpy(arg, argv[i], sizeof(arg) - 1); + char* underscore(arg); + while (NULL != (underscore= strchr(underscore, '_'))) *underscore= '-'; + + if (!strcmp(arg, WSREP_NEW_CLUSTER)) + { + wsrep_new_cluster= TRUE; + *argc -= 1; + /* preserve the order of remaining arguments AND + * preserve the original argument pointers - just in case */ + char* wnc= argv[i]; + memmove(&argv[i], &argv[i + 1], (*argc - i)*sizeof(argv[i])); + argv[*argc]= wnc; /* this will be invisible to the rest of the program */ + } + } +} + +bool wsrep_start_replication() +{ + wsrep_status_t rcode; + + /* + if provider is trivial, don't even try to connect, + but resume local node operation + */ + if (strlen(wsrep_provider)== 0 || + !strcmp(wsrep_provider, WSREP_NONE)) + { + // enable normal operation in case no provider is specified + wsrep_ready_set(TRUE); + return true; + } + + if (!wsrep_cluster_address || strlen(wsrep_cluster_address)== 0) + { + // if provider is non-trivial, but no address is specified, wait for address + wsrep_ready_set(FALSE); + return true; + } + + bool const bootstrap(TRUE == wsrep_new_cluster); + wsrep_new_cluster= FALSE; + + WSREP_INFO("Start replication"); + + if ((rcode = wsrep->connect(wsrep, + wsrep_cluster_name, + wsrep_cluster_address, + wsrep_sst_donor, + bootstrap))) + { + if (-ESOCKTNOSUPPORT == rcode) + { + DBUG_PRINT("wsrep",("unrecognized cluster address: '%s', rcode: %d", + wsrep_cluster_address, rcode)); + WSREP_ERROR("unrecognized cluster address: '%s', rcode: %d", + wsrep_cluster_address, rcode); + } + else + { + DBUG_PRINT("wsrep",("wsrep->connect() failed: %d", rcode)); + WSREP_ERROR("wsrep::connect() failed: %d", rcode); + } + + return false; + } + else + { + wsrep_connected= TRUE; + + char* opts= wsrep->options_get(wsrep); + if (opts) + { + wsrep_provider_options_init(opts); + free(opts); + } + else + { + WSREP_WARN("Failed to get wsrep options"); + } + } + + return true; +} + +bool wsrep_sync_wait (THD* thd, uint mask) +{ + if ((thd->variables.wsrep_sync_wait & mask) && + thd->variables.wsrep_on && + !thd->in_active_multi_stmt_transaction() && + thd->wsrep_conflict_state != REPLAYING) + { + WSREP_DEBUG("wsrep_sync_wait: thd->variables.wsrep_sync_wait = %u, mask = %u", + thd->variables.wsrep_sync_wait, mask); + // This allows autocommit SELECTs and a first SELECT after SET AUTOCOMMIT=0 + // TODO: modify to check if thd has locked any rows. + wsrep_gtid_t gtid; + wsrep_status_t ret= wsrep->causal_read (wsrep, >id); + + if (unlikely(WSREP_OK != ret)) + { + const char* msg; + int err; + + // Possibly relevant error codes: + // ER_CHECKREAD, ER_ERROR_ON_READ, ER_INVALID_DEFAULT, ER_EMPTY_QUERY, + // ER_FUNCTION_NOT_DEFINED, ER_NOT_ALLOWED_COMMAND, ER_NOT_SUPPORTED_YET, + // ER_FEATURE_DISABLED, ER_QUERY_INTERRUPTED + + switch (ret) + { + case WSREP_NOT_IMPLEMENTED: + msg= "synchronous reads by wsrep backend. " + "Please unset wsrep_causal_reads variable."; + err= ER_NOT_SUPPORTED_YET; + break; + default: + msg= "Synchronous wait failed."; + err= ER_LOCK_WAIT_TIMEOUT; // NOTE: the above msg won't be displayed + // with ER_LOCK_WAIT_TIMEOUT + } + + my_error(err, MYF(0), msg); + + return true; + } + } + + return false; +} + +/* + * Helpers to deal with TOI key arrays + */ +typedef struct wsrep_key_arr +{ + wsrep_key_t* keys; + size_t keys_len; +} wsrep_key_arr_t; + + +static void wsrep_keys_free(wsrep_key_arr_t* key_arr) +{ + for (size_t i= 0; i < key_arr->keys_len; ++i) + { + my_free((void*)key_arr->keys[i].key_parts); + } + my_free(key_arr->keys); + key_arr->keys= 0; + key_arr->keys_len= 0; +} + + +/*! + * @param db Database string + * @param table Table string + * @param key Array of wsrep_key_t + * @param key_len In: number of elements in key array, Out: number of + * elements populated + * + * @return true if preparation was successful, otherwise false. + */ + +static bool wsrep_prepare_key_for_isolation(const char* db, + const char* table, + wsrep_buf_t* key, + size_t* key_len) +{ + if (*key_len < 2) return false; + + switch (wsrep_protocol_version) + { + case 0: + *key_len= 0; + break; + case 1: + case 2: + case 3: + { + *key_len= 0; + if (db) + { + // sql_print_information("%s.%s", db, table); + if (db) + { + key[*key_len].ptr= db; + key[*key_len].len= strlen(db); + ++(*key_len); + if (table) + { + key[*key_len].ptr= table; + key[*key_len].len= strlen(table); + ++(*key_len); + } + } + } + break; + } + default: + return false; + } + + return true; +} + +/* Prepare key list from db/table and table_list */ +static bool wsrep_prepare_keys_for_isolation(THD* thd, + const char* db, + const char* table, + const TABLE_LIST* table_list, + wsrep_key_arr_t* ka) +{ + ka->keys= 0; + ka->keys_len= 0; + + extern TABLE* find_temporary_table(THD*, const TABLE_LIST*); + + if (db || table) + { + TABLE_LIST tmp_table; + bzero((char*) &tmp_table,sizeof(tmp_table)); + tmp_table.table_name= (char*)db; + tmp_table.db= (char*)table; + if (!table || !find_temporary_table(thd, &tmp_table)) + { + if (!(ka->keys= (wsrep_key_t*)my_malloc(sizeof(wsrep_key_t), MYF(0)))) + { + WSREP_ERROR("Can't allocate memory for key_array"); + goto err; + } + ka->keys_len= 1; + if (!(ka->keys[0].key_parts= (wsrep_buf_t*) + my_malloc(sizeof(wsrep_buf_t)*2, MYF(0)))) + { + WSREP_ERROR("Can't allocate memory for key_parts"); + goto err; + } + ka->keys[0].key_parts_num= 2; + if (!wsrep_prepare_key_for_isolation( + db, table, + (wsrep_buf_t*)ka->keys[0].key_parts, + &ka->keys[0].key_parts_num)) + { + WSREP_ERROR("Preparing keys for isolation failed"); + goto err; + } + } + } + + for (const TABLE_LIST* table= table_list; table; table= table->next_global) + { + if (!find_temporary_table(thd, table)) + { + wsrep_key_t* tmp; + tmp= (wsrep_key_t*)my_realloc( + ka->keys, (ka->keys_len + 1) * sizeof(wsrep_key_t), MYF(0)); + if (!tmp) + { + WSREP_ERROR("Can't allocate memory for key_array"); + goto err; + } + ka->keys= tmp; + if (!(ka->keys[ka->keys_len].key_parts= (wsrep_buf_t*) + my_malloc(sizeof(wsrep_buf_t)*2, MYF(0)))) + { + WSREP_ERROR("Can't allocate memory for key_parts"); + goto err; + } + ka->keys[ka->keys_len].key_parts_num= 2; + ++ka->keys_len; + if (!wsrep_prepare_key_for_isolation( + table->db, table->table_name, + (wsrep_buf_t*)ka->keys[ka->keys_len - 1].key_parts, + &ka->keys[ka->keys_len - 1].key_parts_num)) + { + WSREP_ERROR("Preparing keys for isolation failed"); + goto err; + } + } + } + return true; +err: + wsrep_keys_free(ka); + return false; +} + + +bool wsrep_prepare_key_for_innodb(const uchar* cache_key, + size_t cache_key_len, + const uchar* row_id, + size_t row_id_len, + wsrep_buf_t* key, + size_t* key_len) +{ + if (*key_len < 3) return false; + + *key_len= 0; + switch (wsrep_protocol_version) + { + case 0: + { + key[0].ptr = cache_key; + key[0].len = cache_key_len; + + *key_len = 1; + break; + } + case 1: + case 2: + case 3: + { + key[0].ptr = cache_key; + key[0].len = strlen( (char*)cache_key ); + + key[1].ptr = cache_key + strlen( (char*)cache_key ) + 1; + key[1].len = strlen( (char*)(key[1].ptr) ); + + *key_len = 2; + break; + } + default: + return false; + } + + key[*key_len].ptr = row_id; + key[*key_len].len = row_id_len; + ++(*key_len); + + return true; +} + + +/* + * Construct Query_log_Event from thd query and serialize it + * into buffer. + * + * Return 0 in case of success, 1 in case of error. + */ +int wsrep_to_buf_helper( + THD* thd, const char *query, uint query_len, uchar** buf, size_t* buf_len) +{ + IO_CACHE tmp_io_cache; + if (open_cached_file(&tmp_io_cache, mysql_tmpdir, TEMP_PREFIX, + 65536, MYF(MY_WME))) + return 1; + + int ret(0); + /* if there is prepare query, add event for it */ + if (thd->wsrep_TOI_pre_query) + { + Query_log_event ev(thd, thd->wsrep_TOI_pre_query, + thd->wsrep_TOI_pre_query_len, + FALSE, FALSE, FALSE, 0); + if (ev.write(&tmp_io_cache)) ret= 1; + } + + /* append the actual query */ + Query_log_event ev(thd, query, query_len, FALSE, FALSE, FALSE, 0); + if (ev.write(&tmp_io_cache)) ret= 1; + + if (!ret && wsrep_write_cache_buf(&tmp_io_cache, buf, buf_len)) ret= 1; + + close_cached_file(&tmp_io_cache); + return ret; +} + +#include "sql_show.h" +static int +create_view_query(THD *thd, uchar** buf, size_t* buf_len) +{ + LEX *lex= thd->lex; + SELECT_LEX *select_lex= &lex->select_lex; + TABLE_LIST *first_table= select_lex->table_list.first; + TABLE_LIST *views = first_table; + + String buff; + const LEX_STRING command[3]= + {{ C_STRING_WITH_LEN("CREATE ") }, + { C_STRING_WITH_LEN("ALTER ") }, + { C_STRING_WITH_LEN("CREATE OR REPLACE ") }}; + + buff.append(command[thd->lex->create_view_mode].str, + command[thd->lex->create_view_mode].length); + + if (!lex->definer) + { + /* + DEFINER-clause is missing; we have to create default definer in + persistent arena to be PS/SP friendly. + If this is an ALTER VIEW then the current user should be set as + the definer. + */ + + if (!(lex->definer= create_default_definer(thd))) + { + WSREP_WARN("view default definer issue"); + } + } + + views->algorithm = lex->create_view_algorithm; + views->definer.user = lex->definer->user; + views->definer.host = lex->definer->host; + views->view_suid = lex->create_view_suid; + views->with_check = lex->create_view_check; + + view_store_options(thd, views, &buff); + buff.append(STRING_WITH_LEN("VIEW ")); + /* Test if user supplied a db (ie: we did not use thd->db) */ + if (views->db && views->db[0] && + (thd->db == NULL || strcmp(views->db, thd->db))) + { + append_identifier(thd, &buff, views->db, + views->db_length); + buff.append('.'); + } + append_identifier(thd, &buff, views->table_name, + views->table_name_length); + if (lex->view_list.elements) + { + List_iterator_fast names(lex->view_list); + LEX_STRING *name; + int i; + + for (i= 0; (name= names++); i++) + { + buff.append(i ? ", " : "("); + append_identifier(thd, &buff, name->str, name->length); + } + buff.append(')'); + } + buff.append(STRING_WITH_LEN(" AS ")); + //buff.append(views->source.str, views->source.length); + buff.append(thd->lex->create_view_select.str, + thd->lex->create_view_select.length); + //int errcode= query_error_code(thd, TRUE); + //if (thd->binlog_query(THD::STMT_QUERY_TYPE, + // buff.ptr(), buff.length(), FALSE, FALSE, FALSE, errcod + return wsrep_to_buf_helper(thd, buff.ptr(), buff.length(), buf, buf_len); +} + +static int wsrep_TOI_begin(THD *thd, char *db_, char *table_, + const TABLE_LIST* table_list) +{ + wsrep_status_t ret(WSREP_WARNING); + uchar* buf(0); + size_t buf_len(0); + int buf_err; + + WSREP_DEBUG("TO BEGIN: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd), + thd->wsrep_exec_mode, thd->query() ); + switch (thd->lex->sql_command) + { + case SQLCOM_CREATE_VIEW: + buf_err= create_view_query(thd, &buf, &buf_len); + break; + case SQLCOM_CREATE_PROCEDURE: + case SQLCOM_CREATE_SPFUNCTION: + buf_err= wsrep_create_sp(thd, &buf, &buf_len); + break; + case SQLCOM_CREATE_TRIGGER: + buf_err= wsrep_create_trigger_query(thd, &buf, &buf_len); + break; + case SQLCOM_CREATE_EVENT: + buf_err= wsrep_create_event_query(thd, &buf, &buf_len); + break; + case SQLCOM_ALTER_EVENT: + buf_err= wsrep_alter_event_query(thd, &buf, &buf_len); + break; + default: + buf_err= wsrep_to_buf_helper(thd, thd->query(), thd->query_length(), &buf, + &buf_len); + break; + } + + wsrep_key_arr_t key_arr= {0, 0}; + struct wsrep_buf buff = { buf, buf_len }; + if (!buf_err && + wsrep_prepare_keys_for_isolation(thd, db_, table_, table_list, &key_arr)&& + WSREP_OK == (ret = wsrep->to_execute_start(wsrep, thd->thread_id, + key_arr.keys, key_arr.keys_len, + &buff, 1, + &thd->wsrep_trx_meta))) + { + thd->wsrep_exec_mode= TOTAL_ORDER; + wsrep_to_isolation++; + if (buf) my_free(buf); + wsrep_keys_free(&key_arr); + WSREP_DEBUG("TO BEGIN: %lld, %d",(long long)wsrep_thd_trx_seqno(thd), + thd->wsrep_exec_mode); + } + else { + /* jump to error handler in mysql_execute_command() */ + WSREP_WARN("TO isolation failed for: %d, sql: %s. Check wsrep " + "connection state and retry the query.", + ret, (thd->query()) ? thd->query() : "void"); + my_error(ER_LOCK_DEADLOCK, MYF(0), "WSREP replication failed. Check " + "your wsrep connection state and retry the query."); + if (buf) my_free(buf); + wsrep_keys_free(&key_arr); + return -1; + } + return 0; +} + +static void wsrep_TOI_end(THD *thd) { + wsrep_status_t ret; + wsrep_to_isolation--; + + WSREP_DEBUG("TO END: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd), + thd->wsrep_exec_mode, (thd->query()) ? thd->query() : "void"); + + XID xid; + wsrep_xid_init(&xid, &thd->wsrep_trx_meta.gtid.uuid, + thd->wsrep_trx_meta.gtid.seqno); + wsrep_set_SE_checkpoint(&xid); + WSREP_DEBUG("TO END: %lld, update seqno", + (long long)wsrep_thd_trx_seqno(thd)); + + if (WSREP_OK == (ret = wsrep->to_execute_end(wsrep, thd->thread_id))) { + WSREP_DEBUG("TO END: %lld", (long long)wsrep_thd_trx_seqno(thd)); + } + else { + WSREP_WARN("TO isolation end failed for: %d, sql: %s", + ret, (thd->query()) ? thd->query() : "void"); + } +} + +static int wsrep_RSU_begin(THD *thd, char *db_, char *table_) +{ + wsrep_status_t ret(WSREP_WARNING); + WSREP_DEBUG("RSU BEGIN: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd), + thd->wsrep_exec_mode, thd->query() ); + + ret = wsrep->desync(wsrep); + if (ret != WSREP_OK) + { + WSREP_WARN("RSU desync failed %d for %s", ret, thd->query()); + my_error(ER_LOCK_DEADLOCK, MYF(0)); + return(ret); + } + mysql_mutex_lock(&LOCK_wsrep_replaying); + wsrep_replaying++; + mysql_mutex_unlock(&LOCK_wsrep_replaying); + + if (wsrep_wait_committing_connections_close(5000)) + { + /* no can do, bail out from DDL */ + WSREP_WARN("RSU failed due to pending transactions, %s", thd->query()); + mysql_mutex_lock(&LOCK_wsrep_replaying); + wsrep_replaying--; + mysql_mutex_unlock(&LOCK_wsrep_replaying); + + ret = wsrep->resync(wsrep); + if (ret != WSREP_OK) + { + WSREP_WARN("resync failed %d for %s", ret, thd->query()); + } + my_error(ER_LOCK_DEADLOCK, MYF(0)); + return(1); + } + + wsrep_seqno_t seqno = wsrep->pause(wsrep); + if (seqno == WSREP_SEQNO_UNDEFINED) + { + WSREP_WARN("pause failed %lld for %s", (long long)seqno, thd->query()); + return(1); + } + WSREP_DEBUG("paused at %lld", (long long)seqno); + thd->variables.wsrep_on = 0; + return 0; +} + +static void wsrep_RSU_end(THD *thd) +{ + wsrep_status_t ret(WSREP_WARNING); + WSREP_DEBUG("RSU END: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd), + thd->wsrep_exec_mode, thd->query() ); + + + mysql_mutex_lock(&LOCK_wsrep_replaying); + wsrep_replaying--; + mysql_mutex_unlock(&LOCK_wsrep_replaying); + + ret = wsrep->resume(wsrep); + if (ret != WSREP_OK) + { + WSREP_WARN("resume failed %d for %s", ret, thd->query()); + } + ret = wsrep->resync(wsrep); + if (ret != WSREP_OK) + { + WSREP_WARN("resync failed %d for %s", ret, thd->query()); + return; + } + thd->variables.wsrep_on = 1; +} + +int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_, + const TABLE_LIST* table_list) +{ + + /* + No isolation for applier or replaying threads. + */ + if (thd->wsrep_exec_mode == REPL_RECV) return 0; + + int ret= 0; + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + + if (thd->wsrep_conflict_state == MUST_ABORT) + { + WSREP_INFO("thread: %lu, %s has been aborted due to multi-master conflict", + thd->thread_id, thd->query()); + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + return WSREP_TRX_FAIL; + } + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + + DBUG_ASSERT(thd->wsrep_exec_mode == LOCAL_STATE); + DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno == WSREP_SEQNO_UNDEFINED); + + if (thd->global_read_lock.can_acquire_protection()) + { + WSREP_DEBUG("Aborting TOI: Global Read-Lock (FTWRL) in place: %s %lu", + thd->query(), thd->thread_id); + return -1; + } + + if (wsrep_debug && thd->mdl_context.has_locks()) + { + WSREP_DEBUG("thread holds MDL locks at TI begin: %s %lu", + thd->query(), thd->thread_id); + } + + /* + It makes sense to set auto_increment_* to defaults in TOI operations. + Must be done before wsrep_TOI_begin() since Query_log_event encapsulating + TOI statement and auto inc variables for wsrep replication is constructed + there. Variables are reset back in THD::reset_for_next_command() before + processing of next command. + */ + if (wsrep_auto_increment_control) + { + thd->variables.auto_increment_offset = 1; + thd->variables.auto_increment_increment = 1; + } + + if (thd->variables.wsrep_on && thd->wsrep_exec_mode==LOCAL_STATE) + { + switch (wsrep_OSU_method_options) { + case WSREP_OSU_TOI: ret = wsrep_TOI_begin(thd, db_, table_, + table_list); break; + case WSREP_OSU_RSU: ret = wsrep_RSU_begin(thd, db_, table_); break; + } + if (!ret) + { + thd->wsrep_exec_mode= TOTAL_ORDER; + } + } + return ret; +} + +void wsrep_to_isolation_end(THD *thd) +{ + if (thd->wsrep_exec_mode == TOTAL_ORDER) + { + switch(wsrep_OSU_method_options) + { + case WSREP_OSU_TOI: wsrep_TOI_end(thd); break; + case WSREP_OSU_RSU: wsrep_RSU_end(thd); break; + } + wsrep_cleanup_transaction(thd); + } +} + +#define WSREP_MDL_LOG(severity, msg, req, gra) \ + WSREP_##severity( \ + "%s\n" \ + "request: (%lu \tseqno %lld \twsrep (%d, %d, %d) cmd %d %d \t%s)\n" \ + "granted: (%lu \tseqno %lld \twsrep (%d, %d, %d) cmd %d %d \t%s)", \ + msg, \ + req->thread_id, (long long)wsrep_thd_trx_seqno(req), \ + req->wsrep_exec_mode, req->wsrep_query_state, req->wsrep_conflict_state, \ + req->command, req->lex->sql_command, req->query(), \ + gra->thread_id, (long long)wsrep_thd_trx_seqno(gra), \ + gra->wsrep_exec_mode, gra->wsrep_query_state, gra->wsrep_conflict_state, \ + gra->command, gra->lex->sql_command, gra->query()); + +bool +wsrep_grant_mdl_exception(MDL_context *requestor_ctx, + MDL_ticket *ticket +) { + if (!WSREP_ON) return FALSE; + + THD *request_thd = requestor_ctx->get_thd(); + THD *granted_thd = ticket->get_ctx()->get_thd(); + bool ret = FALSE; + + mysql_mutex_lock(&request_thd->LOCK_wsrep_thd); + if (request_thd->wsrep_exec_mode == TOTAL_ORDER || + request_thd->wsrep_exec_mode == REPL_RECV) + { + mysql_mutex_unlock(&request_thd->LOCK_wsrep_thd); + WSREP_MDL_LOG(DEBUG, "MDL conflict ", request_thd, granted_thd); + ticket->wsrep_report(wsrep_debug); + + mysql_mutex_lock(&granted_thd->LOCK_wsrep_thd); + if (granted_thd->wsrep_exec_mode == TOTAL_ORDER || + granted_thd->wsrep_exec_mode == REPL_RECV) + { + WSREP_MDL_LOG(INFO, "MDL BF-BF conflict", request_thd, granted_thd); + ticket->wsrep_report(true); + mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd); + ret = TRUE; + } + else if (granted_thd->lex->sql_command == SQLCOM_FLUSH) + { + WSREP_DEBUG("mdl granted over FLUSH BF"); + ticket->wsrep_report(wsrep_debug); + mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd); + ret = TRUE; + } + else if (request_thd->lex->sql_command == SQLCOM_DROP_TABLE) + { + WSREP_DEBUG("DROP caused BF abort"); + ticket->wsrep_report(wsrep_debug); + mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd); + wsrep_abort_thd((void*)request_thd, (void*)granted_thd, 1); + ret = FALSE; + } + else if (granted_thd->wsrep_query_state == QUERY_COMMITTING) + { + WSREP_DEBUG("mdl granted, but commiting thd abort scheduled"); + ticket->wsrep_report(wsrep_debug); + mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd); + wsrep_abort_thd((void*)request_thd, (void*)granted_thd, 1); + ret = FALSE; + } + else + { + WSREP_MDL_LOG(DEBUG, "MDL conflict-> BF abort", request_thd, granted_thd); + ticket->wsrep_report(wsrep_debug); + mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd); + wsrep_abort_thd((void*)request_thd, (void*)granted_thd, 1); + ret = FALSE; + } + } + else + { + mysql_mutex_unlock(&request_thd->LOCK_wsrep_thd); + } + return ret; +} diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h new file mode 100644 index 000000000000..a2c8e479a459 --- /dev/null +++ b/sql/wsrep_mysqld.h @@ -0,0 +1,317 @@ +/* Copyright 2008-2013 Codership Oy + + 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 */ + +#ifndef WSREP_MYSQLD_H +#define WSREP_MYSQLD_H + +#include "mysqld.h" +typedef struct st_mysql_show_var SHOW_VAR; +#include +#include "../wsrep/wsrep_api.h" + +#define WSREP_UNDEFINED_TRX_ID ULONGLONG_MAX + +class set_var; +class THD; + +enum wsrep_exec_mode { + LOCAL_STATE, + REPL_RECV, + TOTAL_ORDER, + LOCAL_COMMIT +}; + +enum wsrep_query_state { + QUERY_IDLE, + QUERY_EXEC, + QUERY_COMMITTING, + QUERY_EXITING, + QUERY_ROLLINGBACK, +}; + +enum wsrep_conflict_state { + NO_CONFLICT, + MUST_ABORT, + ABORTING, + ABORTED, + MUST_REPLAY, + REPLAYING, + RETRY_AUTOCOMMIT, + CERT_FAILURE, +}; + +enum wsrep_consistency_check_mode { + NO_CONSISTENCY_CHECK, + CONSISTENCY_CHECK_DECLARED, + CONSISTENCY_CHECK_RUNNING, +}; + + +// Global wsrep parameters +extern wsrep_t* wsrep; + +// MySQL wsrep options +extern const char* wsrep_provider; +extern const char* wsrep_provider_options; +extern const char* wsrep_cluster_name; +extern const char* wsrep_cluster_address; +extern const char* wsrep_node_name; +extern const char* wsrep_node_address; +extern const char* wsrep_node_incoming_address; +extern const char* wsrep_data_home_dir; +extern const char* wsrep_dbug_option; +extern long wsrep_slave_threads; +extern int wsrep_slave_count_change; +extern MYSQL_PLUGIN_IMPORT my_bool wsrep_debug; +extern my_bool wsrep_convert_LOCK_to_trx; +extern ulong wsrep_retry_autocommit; +extern my_bool wsrep_auto_increment_control; +extern my_bool wsrep_drupal_282555_workaround; +extern my_bool wsrep_incremental_data_collection; +extern const char* wsrep_start_position; +extern ulong wsrep_max_ws_size; +extern ulong wsrep_max_ws_rows; +extern const char* wsrep_notify_cmd; +extern my_bool wsrep_certify_nonPK; +extern long wsrep_max_protocol_version; +extern long wsrep_protocol_version; +extern ulong wsrep_forced_binlog_format; +extern ulong wsrep_OSU_method_options; +extern my_bool wsrep_desync; +extern my_bool wsrep_recovery; +extern my_bool wsrep_replicate_myisam; +extern my_bool wsrep_log_conflicts; +extern ulong wsrep_mysql_replication_bundle; +extern my_bool wsrep_load_data_splitting; +extern my_bool wsrep_restart_slave; +extern my_bool wsrep_restart_slave_activated; +extern my_bool wsrep_slave_FK_checks; +extern my_bool wsrep_slave_UK_checks; + +enum enum_wsrep_OSU_method { WSREP_OSU_TOI, WSREP_OSU_RSU }; +enum enum_wsrep_sync_wait { + WSREP_SYNC_WAIT_NONE = 0x0, + // show, select, begin + WSREP_SYNC_WAIT_BEFORE_READ = 0x1, + WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE = 0x2, + WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE = 0x4, + WSREP_SYNC_WAIT_MAX = 0x7 +}; + +// MySQL status variables +extern my_bool wsrep_connected; +extern my_bool wsrep_ready; +extern const char* wsrep_cluster_state_uuid; +extern long long wsrep_cluster_conf_id; +extern const char* wsrep_cluster_status; +extern long wsrep_cluster_size; +extern long wsrep_local_index; +extern long long wsrep_local_bf_aborts; +extern const char* wsrep_provider_name; +extern const char* wsrep_provider_version; +extern const char* wsrep_provider_vendor; + +int wsrep_show_status(THD *thd, SHOW_VAR *var, char *buff); +void wsrep_free_status(THD *thd); + +/* Filters out --wsrep-new-cluster oprtion from argv[] + * should be called in the very beginning of main() */ +void wsrep_filter_new_cluster (int* argc, char* argv[]); + +int wsrep_init(); +void wsrep_deinit(); +void wsrep_recover(); +bool wsrep_before_SE(); // initialize wsrep before storage + // engines (true) or after (false) +/* wsrep initialization sequence at startup + * @param before wsrep_before_SE() value */ +void wsrep_init_startup(bool before); + + +extern "C" enum wsrep_exec_mode wsrep_thd_exec_mode(THD *thd); +extern "C" enum wsrep_conflict_state wsrep_thd_conflict_state(THD *thd); +extern "C" enum wsrep_query_state wsrep_thd_query_state(THD *thd); +extern "C" const char * wsrep_thd_exec_mode_str(THD *thd); +extern "C" const char * wsrep_thd_conflict_state_str(THD *thd); +extern "C" const char * wsrep_thd_query_state_str(THD *thd); +extern "C" wsrep_ws_handle_t* wsrep_thd_ws_handle(THD *thd); + +extern "C" void wsrep_thd_set_exec_mode(THD *thd, enum wsrep_exec_mode mode); +extern "C" void wsrep_thd_set_query_state( + THD *thd, enum wsrep_query_state state); +extern "C" void wsrep_thd_set_conflict_state( + THD *thd, enum wsrep_conflict_state state); + +extern "C" void wsrep_thd_set_trx_to_replay(THD *thd, uint64 trx_id); + +extern "C" void wsrep_thd_LOCK(THD *thd); +extern "C" void wsrep_thd_UNLOCK(THD *thd); +extern "C" uint32 wsrep_thd_wsrep_rand(THD *thd); +extern "C" time_t wsrep_thd_query_start(THD *thd); +extern "C" my_thread_id wsrep_thd_thread_id(THD *thd); +extern "C" int64_t wsrep_thd_trx_seqno(THD *thd); +extern "C" query_id_t wsrep_thd_query_id(THD *thd); +extern "C" char * wsrep_thd_query(THD *thd); +extern "C" query_id_t wsrep_thd_wsrep_last_query_id(THD *thd); +extern "C" void wsrep_thd_set_wsrep_last_query_id(THD *thd, query_id_t id); +extern "C" void wsrep_thd_awake(THD *thd, my_bool signal); + + +extern void wsrep_close_client_connections(my_bool wait_to_end); +extern int wsrep_wait_committing_connections_close(int wait_time); +extern void wsrep_close_applier(THD *thd); +extern void wsrep_wait_appliers_close(THD *thd); +extern void wsrep_close_applier_threads(int count); +extern void wsrep_kill_mysql(THD *thd); + +/* new defines */ +extern void wsrep_stop_replication(THD *thd); +extern bool wsrep_start_replication(); +extern bool wsrep_sync_wait (THD* thd, uint mask = WSREP_SYNC_WAIT_BEFORE_READ); +extern int wsrep_check_opts (int argc, char* const* argv); +extern void wsrep_prepend_PATH (const char* path); +/* some inline functions are defined in wsrep_mysqld_inl.h */ + +/* Other global variables */ +extern wsrep_seqno_t wsrep_locked_seqno; + +#define WSREP_ON \ + (global_system_variables.wsrep_on) + +#define WSREP(thd) \ + (WSREP_ON && wsrep && (thd && thd->variables.wsrep_on)) + +#define WSREP_CLIENT(thd) \ + (WSREP(thd) && thd->wsrep_client_thread) + +#define WSREP_EMULATE_BINLOG(thd) \ + (WSREP(thd) && wsrep_emulate_bin_log) + +// MySQL logging functions don't seem to understand long long length modifer. +// This is a workaround. It also prefixes all messages with "WSREP" +#define WSREP_LOG(fun, ...) \ + { \ + char msg[1024] = {'\0'}; \ + snprintf(msg, sizeof(msg) - 1, ## __VA_ARGS__); \ + fun("WSREP: %s", msg); \ + } + +#define WSREP_DEBUG(...) \ + if (wsrep_debug) WSREP_LOG(sql_print_information, ##__VA_ARGS__) +#define WSREP_INFO(...) WSREP_LOG(sql_print_information, ##__VA_ARGS__) +#define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__) +#define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__) + +#define WSREP_LOG_CONFLICT_THD(thd, role) \ + WSREP_LOG(sql_print_information, \ + "%s: \n " \ + " THD: %lu, mode: %s, state: %s, conflict: %s, seqno: %lld\n " \ + " SQL: %s", \ + role, wsrep_thd_thread_id(thd), wsrep_thd_exec_mode_str(thd), \ + wsrep_thd_query_state_str(thd), \ + wsrep_thd_conflict_state_str(thd), (long long)wsrep_thd_trx_seqno(thd), \ + wsrep_thd_query(thd) \ + ); + +#define WSREP_LOG_CONFLICT(bf_thd, victim_thd, bf_abort) \ + if (wsrep_debug || wsrep_log_conflicts) \ + { \ + WSREP_LOG(sql_print_information, "cluster conflict due to %s for threads:",\ + (bf_abort) ? "high priority abort" : "certification failure" \ + ); \ + if (bf_thd) WSREP_LOG_CONFLICT_THD(bf_thd, "Winning thread"); \ + if (victim_thd) WSREP_LOG_CONFLICT_THD(victim_thd, "Victim thread"); \ + } + +extern void wsrep_ready_wait(); + +enum wsrep_trx_status { + WSREP_TRX_OK, + WSREP_TRX_CERT_FAIL, /* certification failure, must abort */ + WSREP_TRX_SIZE_EXCEEDED, /* trx size exceeded */ + WSREP_TRX_ERROR, /* native mysql error */ +}; + +extern enum wsrep_trx_status +wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all); +class Ha_trx_info; +struct THD_TRANS; +void wsrep_register_hton(THD* thd, bool all); +void wsrep_post_commit(THD* thd, bool all); +void wsrep_brute_force_killer(THD *thd); +int wsrep_hire_brute_force_killer(THD *thd, uint64_t trx_id); + +extern "C" bool wsrep_consistency_check(void *thd_ptr); + +/* this is visible for client build so that innodb plugin gets this */ +typedef struct wsrep_aborting_thd { + struct wsrep_aborting_thd *next; + THD *aborting_thd; +} *wsrep_aborting_thd_t; + +extern mysql_mutex_t LOCK_wsrep_ready; +extern mysql_cond_t COND_wsrep_ready; +extern mysql_mutex_t LOCK_wsrep_sst; +extern mysql_cond_t COND_wsrep_sst; +extern mysql_mutex_t LOCK_wsrep_sst_init; +extern mysql_cond_t COND_wsrep_sst_init; +extern mysql_mutex_t LOCK_wsrep_rollback; +extern mysql_cond_t COND_wsrep_rollback; +extern int wsrep_replaying; +extern mysql_mutex_t LOCK_wsrep_replaying; +extern mysql_cond_t COND_wsrep_replaying; +extern mysql_mutex_t LOCK_wsrep_slave_threads; +extern mysql_mutex_t LOCK_wsrep_desync; +extern wsrep_aborting_thd_t wsrep_aborting_thd; +extern my_bool wsrep_emulate_bin_log; +extern int wsrep_to_isolation; +#ifdef HAVE_PSI_INTERFACE +extern PSI_mutex_key key_LOCK_wsrep_ready; +extern PSI_mutex_key key_COND_wsrep_ready; +extern PSI_mutex_key key_LOCK_wsrep_sst; +extern PSI_cond_key key_COND_wsrep_sst; +extern PSI_mutex_key key_LOCK_wsrep_sst_init; +extern PSI_cond_key key_COND_wsrep_sst_init; +extern PSI_mutex_key key_LOCK_wsrep_sst_thread; +extern PSI_cond_key key_COND_wsrep_sst_thread; +extern PSI_mutex_key key_LOCK_wsrep_rollback; +extern PSI_cond_key key_COND_wsrep_rollback; +extern PSI_mutex_key key_LOCK_wsrep_replaying; +extern PSI_cond_key key_COND_wsrep_replaying; +extern PSI_mutex_key key_LOCK_wsrep_slave_threads; +extern PSI_mutex_key key_LOCK_wsrep_desync; +#endif /* HAVE_PSI_INTERFACE */ +struct TABLE_LIST; +int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_, + const TABLE_LIST* table_list); +void wsrep_to_isolation_end(THD *thd); +void wsrep_cleanup_transaction(THD *thd); +int wsrep_to_buf_helper( + THD* thd, const char *query, uint query_len, uchar** buf, size_t* buf_len); +int wsrep_create_sp(THD *thd, uchar** buf, size_t* buf_len); +int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len); +int wsrep_create_event_query(THD *thd, uchar** buf, size_t* buf_len); +int wsrep_alter_event_query(THD *thd, uchar** buf, size_t* buf_len); + +const wsrep_uuid_t* wsrep_cluster_uuid(); +struct xid_t; +void wsrep_set_SE_checkpoint(xid_t*); + +void wsrep_xid_init(xid_t*, const wsrep_uuid_t*, wsrep_seqno_t); +const wsrep_uuid_t* wsrep_xid_uuid(const xid_t*); +wsrep_seqno_t wsrep_xid_seqno(const xid_t*); +extern "C" int wsrep_is_wsrep_xid(const void* xid); + +#endif /* WSREP_MYSQLD_H */ diff --git a/sql/wsrep_notify.cc b/sql/wsrep_notify.cc new file mode 100644 index 000000000000..6eefb961b629 --- /dev/null +++ b/sql/wsrep_notify.cc @@ -0,0 +1,111 @@ +/* Copyright 2010 Codership Oy + + 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 */ + +#include +#include "wsrep_priv.h" +#include "wsrep_utils.h" + +const char* wsrep_notify_cmd=""; + +static const char* _status_str(wsrep_member_status_t status) +{ + switch (status) + { + case WSREP_MEMBER_UNDEFINED: return "Undefined"; + case WSREP_MEMBER_JOINER: return "Joiner"; + case WSREP_MEMBER_DONOR: return "Donor"; + case WSREP_MEMBER_JOINED: return "Joined"; + case WSREP_MEMBER_SYNCED: return "Synced"; + default: return "Error(?)"; + } +} + +void wsrep_notify_status (wsrep_member_status_t status, + const wsrep_view_info_t* view) +{ + if (!wsrep_notify_cmd || 0 == strlen(wsrep_notify_cmd)) + { + WSREP_INFO("wsrep_notify_cmd is not defined, skipping notification."); + return; + } + + char cmd_buf[1 << 16]; // this can be long + long cmd_len = sizeof(cmd_buf) - 1; + char* cmd_ptr = cmd_buf; + long cmd_off = 0; + + cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, "%s", + wsrep_notify_cmd); + + if (status >= WSREP_MEMBER_UNDEFINED && status < WSREP_MEMBER_ERROR) + { + cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, " --status %s", + _status_str(status)); + } + else + { + /* here we preserve provider error codes */ + cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, + " --status 'Error(%d)'", status); + } + + if (0 != view) + { + char uuid_str[40]; + + wsrep_uuid_print (&view->state_id.uuid, uuid_str, sizeof(uuid_str)); + cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, + " --uuid %s", uuid_str); + + cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, + " --primary %s", view->view >= 0 ? "yes" : "no"); + + cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, + " --index %d", view->my_idx); + + if (view->memb_num) + { + cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, " --members"); + + for (int i = 0; i < view->memb_num; i++) + { + wsrep_uuid_print (&view->members[i].id, uuid_str, sizeof(uuid_str)); + cmd_off += snprintf (cmd_ptr + cmd_off, cmd_len - cmd_off, + "%c%s/%s/%s", i > 0 ? ',' : ' ', + uuid_str, view->members[i].name, + view->members[i].incoming); + } + } + } + + if (cmd_off == cmd_len) + { + WSREP_ERROR("Notification buffer too short (%ld). Aborting notification.", + cmd_len); + return; + } + + wsp::process p(cmd_ptr, "r"); + + p.wait(); + int err = p.error(); + + if (err) + { + WSREP_ERROR("Notification command failed: %d (%s): \"%s\"", + err, strerror(err), cmd_ptr); + } +} + diff --git a/sql/wsrep_priv.h b/sql/wsrep_priv.h new file mode 100644 index 000000000000..93640fbcc03d --- /dev/null +++ b/sql/wsrep_priv.h @@ -0,0 +1,51 @@ +/* Copyright 2010 Codership Oy + + 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 + */ + +//! @file declares symbols private to wsrep integration layer + +#ifndef WSREP_PRIV_H +#define WSREP_PRIV_H + +#include "wsrep_mysqld.h" +#include "../wsrep/wsrep_api.h" + +#include +#include +#include + +void wsrep_ready_set (my_bool x); + +ssize_t wsrep_sst_prepare (void** msg); +wsrep_cb_status wsrep_sst_donate_cb (void* app_ctx, + void* recv_ctx, + const void* msg, size_t msg_len, + const wsrep_gtid_t* state_id, + const char* state, size_t state_len, + bool bypass); + +extern wsrep_uuid_t local_uuid; +extern wsrep_seqno_t local_seqno; + +// a helper function +void wsrep_sst_received(wsrep_t*, const wsrep_uuid_t*, wsrep_seqno_t, + const void*, size_t); +/*! SST thread signals init thread about sst completion */ +void wsrep_sst_complete(const wsrep_uuid_t*, wsrep_seqno_t, bool); + +void wsrep_notify_status (wsrep_member_status_t new_status, + const wsrep_view_info_t* view = 0); + +#endif /* WSREP_PRIV_H */ diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc new file mode 100644 index 000000000000..ad058dc25778 --- /dev/null +++ b/sql/wsrep_sst.cc @@ -0,0 +1,1034 @@ +/* Copyright 2008-2012 Codership Oy + + 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 */ + +#include "wsrep_sst.h" + +#include +#include +#include +#include +#include +#include +#include "wsrep_priv.h" +#include "wsrep_utils.h" +#include +#include + +extern const char wsrep_defaults_file[]; + +#define WSREP_SST_OPT_ROLE "--role" +#define WSREP_SST_OPT_ADDR "--address" +#define WSREP_SST_OPT_AUTH "--auth" +#define WSREP_SST_OPT_DATA "--datadir" +#define WSREP_SST_OPT_CONF "--defaults-file" +#define WSREP_SST_OPT_PARENT "--parent" + +// mysqldump-specific options +#define WSREP_SST_OPT_USER "--user" +#define WSREP_SST_OPT_PSWD "--password" +#define WSREP_SST_OPT_HOST "--host" +#define WSREP_SST_OPT_PORT "--port" +#define WSREP_SST_OPT_LPORT "--local-port" + +// donor-specific +#define WSREP_SST_OPT_SOCKET "--socket" +#define WSREP_SST_OPT_GTID "--gtid" +#define WSREP_SST_OPT_BYPASS "--bypass" + +#define WSREP_SST_MYSQLDUMP "mysqldump" +#define WSREP_SST_RSYNC "rsync" +#define WSREP_SST_SKIP "skip" +#define WSREP_SST_DEFAULT WSREP_SST_RSYNC +#define WSREP_SST_ADDRESS_AUTO "AUTO" +#define WSREP_SST_AUTH_MASK "********" + +const char* wsrep_sst_method = WSREP_SST_DEFAULT; +const char* wsrep_sst_receive_address = WSREP_SST_ADDRESS_AUTO; +const char* wsrep_sst_donor = ""; + char* wsrep_sst_auth = NULL; + +// container for real auth string +static const char* sst_auth_real = NULL; +my_bool wsrep_sst_donor_rejects_queries = FALSE; + +bool wsrep_sst_method_check (sys_var *self, THD* thd, set_var* var) +{ + char buff[FN_REFLEN]; + String str(buff, sizeof(buff), system_charset_info), *res; + const char* c_str = NULL; + + if ((res = var->value->val_str(&str)) && + (c_str = res->c_ptr()) && + strlen(c_str) > 0) + return 0; + + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), "wsrep_sst_method", c_str ? c_str : "NULL"); + return 1; +} + +bool wsrep_sst_method_update (sys_var *self, THD* thd, enum_var_type type) +{ + return 0; +} + +static bool sst_receive_address_check (const char* str) +{ + if (!strncasecmp(str, "127.0.0.1", strlen("127.0.0.1")) || + !strncasecmp(str, "localhost", strlen("localhost"))) + { + return 1; + } + + return 0; +} + +bool wsrep_sst_receive_address_check (sys_var *self, THD* thd, set_var* var) +{ + const char* c_str = var->value->str_value.c_ptr(); + + if (sst_receive_address_check (c_str)) + { + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), "wsrep_sst_receive_address", c_str ? c_str : "NULL"); + return 1; + } + + return 0; +} + +bool wsrep_sst_receive_address_update (sys_var *self, THD* thd, + enum_var_type type) +{ + return 0; +} + +bool wsrep_sst_auth_check (sys_var *self, THD* thd, set_var* var) +{ + return 0; +} +static bool sst_auth_real_set (const char* value) +{ + const char* v = strdup (value); + + if (v) + { + if (sst_auth_real) free (const_cast(sst_auth_real)); + sst_auth_real = v; + + if (strlen(sst_auth_real)) + { + if (wsrep_sst_auth) + { + my_free ((void*)wsrep_sst_auth); + wsrep_sst_auth = my_strdup(WSREP_SST_AUTH_MASK, MYF(0)); + //strncpy (wsrep_sst_auth, WSREP_SST_AUTH_MASK, + // sizeof(wsrep_sst_auth) - 1); + } + else + wsrep_sst_auth = my_strdup (WSREP_SST_AUTH_MASK, MYF(0)); + } + return 0; + } + + return 1; +} + +bool wsrep_sst_auth_update (sys_var *self, THD* thd, enum_var_type type) +{ + return sst_auth_real_set (wsrep_sst_auth); +} + +void wsrep_sst_auth_init (const char* value) +{ + if (wsrep_sst_auth == value) wsrep_sst_auth = NULL; + if (value) sst_auth_real_set (value); +} + +bool wsrep_sst_donor_check (sys_var *self, THD* thd, set_var* var) +{ + return 0; +} + +bool wsrep_sst_donor_update (sys_var *self, THD* thd, enum_var_type type) +{ + return 0; +} + +static wsrep_uuid_t cluster_uuid = WSREP_UUID_UNDEFINED; + +bool wsrep_before_SE() +{ + return (wsrep_provider != NULL + && strcmp (wsrep_provider, WSREP_NONE) + && strcmp (wsrep_sst_method, WSREP_SST_SKIP) + && strcmp (wsrep_sst_method, WSREP_SST_MYSQLDUMP)); +} + +static bool sst_complete = false; +static bool sst_needed = false; + +void wsrep_sst_grab () +{ + WSREP_INFO("wsrep_sst_grab()"); + if (mysql_mutex_lock (&LOCK_wsrep_sst)) abort(); + sst_complete = false; + mysql_mutex_unlock (&LOCK_wsrep_sst); +} + +// Wait for end of SST +bool wsrep_sst_wait () +{ + if (mysql_mutex_lock (&LOCK_wsrep_sst)) abort(); + while (!sst_complete) + { + WSREP_INFO("Waiting for SST to complete."); + mysql_cond_wait (&COND_wsrep_sst, &LOCK_wsrep_sst); + } + + if (local_seqno >= 0) + { + WSREP_INFO("SST complete, seqno: %lld", (long long) local_seqno); + } + else + { + WSREP_ERROR("SST failed: %d (%s)", + int(-local_seqno), strerror(-local_seqno)); + } + + mysql_mutex_unlock (&LOCK_wsrep_sst); + + return (local_seqno >= 0); +} + +// Signal end of SST +void wsrep_sst_complete (const wsrep_uuid_t* sst_uuid, + wsrep_seqno_t sst_seqno, + bool needed) +{ + if (mysql_mutex_lock (&LOCK_wsrep_sst)) abort(); + if (!sst_complete) + { + sst_complete = true; + sst_needed = needed; + local_uuid = *sst_uuid; + local_seqno = sst_seqno; + mysql_cond_signal (&COND_wsrep_sst); + } + else + { + /* This can happen when called from wsrep_synced_cb(). + At the moment there is no way to check there + if main thread is still waiting for signal, + so wsrep_sst_complete() is called from there + each time wsrep_ready changes from FALSE -> TRUE. + */ + WSREP_DEBUG("Nobody is waiting for SST."); + } + mysql_mutex_unlock (&LOCK_wsrep_sst); +} + +void wsrep_sst_received (wsrep_t* const wsrep, + const wsrep_uuid_t* const uuid, + wsrep_seqno_t const seqno, + const void* const state, + size_t const state_len) +{ + int const rcode(seqno < 0 ? seqno : 0); + wsrep_gtid_t const state_id = { + *uuid, (rcode ? WSREP_SEQNO_UNDEFINED : seqno) + }; + wsrep->sst_received(wsrep, &state_id, state, state_len, rcode); +} + +// Let applier threads to continue +void wsrep_sst_continue () +{ + if (sst_needed) + { + WSREP_INFO("Signalling provider to continue."); + wsrep_sst_received (wsrep, &local_uuid, local_seqno, NULL, 0); + } +} + +struct sst_thread_arg +{ + const char* cmd; + int err; + char* ret_str; + mysql_mutex_t lock; + mysql_cond_t cond; + + sst_thread_arg (const char* c) : cmd(c), err(-1), ret_str(0) + { + mysql_mutex_init(key_LOCK_wsrep_sst_thread, &lock, MY_MUTEX_INIT_FAST); + mysql_cond_init(key_COND_wsrep_sst_thread, &cond, NULL); + } + + ~sst_thread_arg() + { + mysql_cond_destroy (&cond); + mysql_mutex_unlock (&lock); + mysql_mutex_destroy (&lock); + } +}; + +static int sst_scan_uuid_seqno (const char* str, + wsrep_uuid_t* uuid, wsrep_seqno_t* seqno) +{ + int offt = wsrep_uuid_scan (str, strlen(str), uuid); + if (offt > 0 && strlen(str) > (unsigned int)offt && ':' == str[offt]) + { + *seqno = strtoll (str + offt + 1, NULL, 10); + if (*seqno != LLONG_MAX || errno != ERANGE) + { + return 0; + } + } + + WSREP_ERROR("Failed to parse uuid:seqno pair: '%s'", str); + return EINVAL; +} + +// get rid of trailing \n +static char* my_fgets (char* buf, size_t buf_len, FILE* stream) +{ + char* ret= fgets (buf, buf_len, stream); + + if (ret) + { + size_t len = strlen(ret); + if (len > 0 && ret[len - 1] == '\n') ret[len - 1] = '\0'; + } + + return ret; +} + +static void* sst_joiner_thread (void* a) +{ + sst_thread_arg* arg= (sst_thread_arg*) a; + int err= 1; + + { + const char magic[] = "ready"; + const size_t magic_len = sizeof(magic) - 1; + const size_t out_len = 512; + char out[out_len]; + + WSREP_INFO("Running: '%s'", arg->cmd); + + wsp::process proc (arg->cmd, "r"); + + if (proc.pipe() && !proc.error()) + { + const char* tmp= my_fgets (out, out_len, proc.pipe()); + + if (!tmp || strlen(tmp) < (magic_len + 2) || + strncasecmp (tmp, magic, magic_len)) + { + WSREP_ERROR("Failed to read '%s ' from: %s\n\tRead: '%s'", + magic, arg->cmd, tmp); + proc.wait(); + if (proc.error()) err = proc.error(); + } + else + { + err = 0; + } + } + else + { + err = proc.error(); + WSREP_ERROR("Failed to execute: %s : %d (%s)", + arg->cmd, err, strerror(err)); + } + + // signal sst_prepare thread with ret code, + // it will go on sending SST request + mysql_mutex_lock (&arg->lock); + if (!err) + { + arg->ret_str = strdup (out + magic_len + 1); + if (!arg->ret_str) err = ENOMEM; + } + arg->err = -err; + mysql_cond_signal (&arg->cond); + mysql_mutex_unlock (&arg->lock); //! @note arg is unusable after that. + + if (err) return NULL; /* lp:808417 - return immediately, don't signal + * initializer thread to ensure single thread of + * shutdown. */ + + wsrep_uuid_t ret_uuid = WSREP_UUID_UNDEFINED; + wsrep_seqno_t ret_seqno = WSREP_SEQNO_UNDEFINED; + + // in case of successfull receiver start, wait for SST completion/end + char* tmp = my_fgets (out, out_len, proc.pipe()); + + proc.wait(); + err= EINVAL; + + if (!tmp) + { + WSREP_ERROR("Failed to read uuid:seqno from joiner script."); + if (proc.error()) err = proc.error(); + } + else + { + err= sst_scan_uuid_seqno (out, &ret_uuid, &ret_seqno); + } + + if (err) + { + ret_uuid= WSREP_UUID_UNDEFINED; + ret_seqno= -err; + } + + // Tell initializer thread that SST is complete + wsrep_sst_complete (&ret_uuid, ret_seqno, true); + } + + return NULL; +} + +static ssize_t sst_prepare_other (const char* method, + const char* addr_in, + const char** addr_out) +{ + ssize_t cmd_len= 1024; + char cmd_str[cmd_len]; + const char* sst_dir= mysql_real_data_home; + + int ret= snprintf (cmd_str, cmd_len, + "wsrep_sst_%s " + WSREP_SST_OPT_ROLE" 'joiner' " + WSREP_SST_OPT_ADDR" '%s' " + WSREP_SST_OPT_AUTH" '%s' " + WSREP_SST_OPT_DATA" '%s' " + WSREP_SST_OPT_CONF" '%s' " + WSREP_SST_OPT_PARENT" '%d'", + method, addr_in, (sst_auth_real) ? sst_auth_real : "", + sst_dir, wsrep_defaults_file, (int)getpid()); + + if (ret < 0 || ret >= cmd_len) + { + WSREP_ERROR("sst_prepare_other(): snprintf() failed: %d", ret); + return (ret < 0 ? ret : -EMSGSIZE); + } + + pthread_t tmp; + sst_thread_arg arg(cmd_str); + mysql_mutex_lock (&arg.lock); + ret = pthread_create (&tmp, NULL, sst_joiner_thread, &arg); + if (ret) + { + WSREP_ERROR("sst_prepare_other(): pthread_create() failed: %d (%s)", + ret, strerror(ret)); + return ret; + } + mysql_cond_wait (&arg.cond, &arg.lock); + + *addr_out= arg.ret_str; + + if (!arg.err) + ret = strlen(*addr_out); + else + { + assert (arg.err < 0); + ret = arg.err; + } + + pthread_detach (tmp); + + return ret; +} + +//extern ulong my_bind_addr; +extern uint mysqld_port; + +/*! Just tells donor where to send mysqldump */ +static ssize_t sst_prepare_mysqldump (const char* addr_in, + const char** addr_out) +{ + ssize_t ret = strlen (addr_in); + + if (!strrchr(addr_in, ':')) + { + ssize_t s = ret + 7; + char* tmp = (char*) malloc (s); + + if (tmp) + { + ret= snprintf (tmp, s, "%s:%u", addr_in, mysqld_port); + + if (ret > 0 && ret < s) + { + *addr_out= tmp; + return ret; + } + if (ret > 0) /* buffer too short */ ret = -EMSGSIZE; + free (tmp); + } + else { + ret= -ENOMEM; + } + + WSREP_ERROR ("Could not prepare state transfer request: " + "adding default port failed: %zd.", ret); + } + else { + *addr_out= addr_in; + } + + return ret; +} + +static bool SE_initialized = false; + +ssize_t wsrep_sst_prepare (void** msg) +{ + const ssize_t ip_max= 256; + char ip_buf[ip_max]; + const char* addr_in= NULL; + const char* addr_out= NULL; + + if (!strcmp(wsrep_sst_method, WSREP_SST_SKIP)) + { + ssize_t ret = strlen(WSREP_STATE_TRANSFER_TRIVIAL) + 1; + *msg = strdup(WSREP_STATE_TRANSFER_TRIVIAL); + if (!msg) + { + WSREP_ERROR("Could not allocate %zd bytes for state request", ret); + unireg_abort(1); + } + return ret; + } + + // Figure out SST address. Common for all SST methods + if (wsrep_sst_receive_address && + strcmp (wsrep_sst_receive_address, WSREP_SST_ADDRESS_AUTO)) + { + addr_in= wsrep_sst_receive_address; + } + else if (wsrep_node_address && strlen(wsrep_node_address)) + { + const char* const colon= strchr (wsrep_node_address, ':'); + if (colon) + { + ptrdiff_t const len= colon - wsrep_node_address; + strncpy (ip_buf, wsrep_node_address, len); + ip_buf[len]= '\0'; + addr_in= ip_buf; + } + else + { + addr_in= wsrep_node_address; + } + } + else + { + ssize_t ret= wsrep_guess_ip (ip_buf, ip_max); + + if (ret && ret < ip_max) + { + addr_in= ip_buf; + } + else + { + WSREP_ERROR("Could not prepare state transfer request: " + "failed to guess address to accept state transfer at. " + "wsrep_sst_receive_address must be set manually."); + unireg_abort(1); + } + } + + ssize_t addr_len= -ENOSYS; + if (!strcmp(wsrep_sst_method, WSREP_SST_MYSQLDUMP)) + { + addr_len= sst_prepare_mysqldump (addr_in, &addr_out); + if (addr_len < 0) unireg_abort(1); + } + else + { + /*! A heuristic workaround until we learn how to stop and start engines */ + if (SE_initialized) + { + // we already did SST at initializaiton, now engines are running + // sql_print_information() is here because the message is too long + // for WSREP_INFO. + sql_print_information ("WSREP: " + "You have configured '%s' state snapshot transfer method " + "which cannot be performed on a running server. " + "Wsrep provider won't be able to fall back to it " + "if other means of state transfer are unavailable. " + "In that case you will need to restart the server.", + wsrep_sst_method); + *msg = 0; + return 0; + } + + addr_len = sst_prepare_other (wsrep_sst_method, addr_in, &addr_out); + if (addr_len < 0) + { + WSREP_ERROR("Failed to prepare for '%s' SST. Unrecoverable.", + wsrep_sst_method); + unireg_abort(1); + } + } + + size_t const method_len(strlen(wsrep_sst_method)); + size_t const msg_len (method_len + addr_len + 2 /* + auth_len + 1*/); + + *msg = malloc (msg_len); + if (NULL != *msg) { + char* const method_ptr(reinterpret_cast(*msg)); + strcpy (method_ptr, wsrep_sst_method); + char* const addr_ptr(method_ptr + method_len + 1); + strcpy (addr_ptr, addr_out); + + WSREP_INFO ("Prepared SST request: %s|%s", method_ptr, addr_ptr); + } + else { + WSREP_ERROR("Failed to allocate SST request of size %zu. Can't continue.", + msg_len); + unireg_abort(1); + } + + if (addr_out != addr_in) /* malloc'ed */ free ((char*)addr_out); + + return msg_len; +} + +// helper method for donors +static int sst_run_shell (const char* cmd_str, int max_tries) +{ + int ret = 0; + + for (int tries=1; tries <= max_tries; tries++) + { + wsp::process proc (cmd_str, "r"); + + if (NULL != proc.pipe()) + { + proc.wait(); + } + + if ((ret = proc.error())) + { + WSREP_ERROR("Try %d/%d: '%s' failed: %d (%s)", + tries, max_tries, proc.cmd(), ret, strerror(ret)); + sleep (1); + } + else + { + WSREP_DEBUG("SST script successfully completed."); + break; + } + } + + return -ret; +} + +static void sst_reject_queries(my_bool close_conn) +{ + wsrep_ready_set (FALSE); // this will be resotred when donor becomes synced + WSREP_INFO("Rejecting client queries for the duration of SST."); + if (TRUE == close_conn) wsrep_close_client_connections(FALSE); +} + +static int sst_mysqldump_check_addr (const char* user, const char* pswd, + const char* host, const char* port) +{ + return 0; +} + +static int sst_donate_mysqldump (const char* addr, + const wsrep_uuid_t* uuid, + const char* uuid_str, + wsrep_seqno_t seqno, + bool bypass) +{ + size_t host_len; + const char* port = strchr (addr, ':'); + + if (port) + { + port += 1; + host_len = port - addr; + } + else + { + port = ""; + host_len = strlen (addr) + 1; + } + + char host[host_len]; + + strncpy (host, addr, host_len - 1); + host[host_len - 1] = '\0'; + + const char* auth = sst_auth_real; + const char* pswd = (auth) ? strchr (auth, ':') : NULL; + size_t user_len; + + if (pswd) + { + pswd += 1; + user_len = pswd - auth; + } + else + { + pswd = ""; + user_len = (auth) ? strlen (auth) + 1 : 1; + } + + char user[user_len]; + + strncpy (user, (auth) ? auth : "", user_len - 1); + user[user_len - 1] = '\0'; + + int ret = sst_mysqldump_check_addr (user, pswd, host, port); + if (!ret) + { + size_t cmd_len= 1024; + char cmd_str[cmd_len]; + + if (!bypass && wsrep_sst_donor_rejects_queries) sst_reject_queries(TRUE); + + snprintf (cmd_str, cmd_len, + "wsrep_sst_mysqldump " + WSREP_SST_OPT_USER" '%s' " + WSREP_SST_OPT_PSWD" '%s' " + WSREP_SST_OPT_HOST" '%s' " + WSREP_SST_OPT_PORT" '%s' " + WSREP_SST_OPT_LPORT" '%u' " + WSREP_SST_OPT_SOCKET" '%s' " + WSREP_SST_OPT_DATA" '%s' " + WSREP_SST_OPT_CONF" '%s' " + WSREP_SST_OPT_GTID" '%s:%lld'" + "%s", + user, pswd, host, port, mysqld_port, mysqld_unix_port, + mysql_real_data_home, wsrep_defaults_file, uuid_str, + (long long)seqno, bypass ? " "WSREP_SST_OPT_BYPASS : ""); + + WSREP_DEBUG("Running: '%s'", cmd_str); + + ret= sst_run_shell (cmd_str, 3); + } + + wsrep_gtid_t const state_id = { *uuid, (ret ? WSREP_SEQNO_UNDEFINED : seqno)}; + + wsrep->sst_sent (wsrep, &state_id, ret); + + return ret; +} + +wsrep_seqno_t wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED; + +static int run_sql_command(THD *thd, const char *query) +{ + thd->set_query((char *)query, strlen(query)); + + Parser_state ps; + if (ps.init(thd, thd->query(), thd->query_length())) + { + WSREP_ERROR("SST query: %s failed", query); + return -1; + } + + mysql_parse(thd, thd->query(), thd->query_length(), &ps); + if (thd->is_error()) + { + int const err= thd->stmt_da->sql_errno(); + WSREP_WARN ("error executing '%s': %d (%s)%s", + query, err, thd->stmt_da->message(), + err == ER_UNKNOWN_SYSTEM_VARIABLE ? + ". Was mysqld built with --with-innodb-disallow-writes ?" : ""); + thd->clear_error(); + return -1; + } + return 0; +} + +static int sst_flush_tables(THD* thd) +{ + WSREP_INFO("Flushing tables for SST..."); + + int err; + int not_used; + if (run_sql_command(thd, "FLUSH TABLES WITH READ LOCK")) + { + WSREP_ERROR("Failed to flush and lock tables"); + err = -1; + } + else + { + /* make sure logs are flushed after global read lock acquired */ + err= reload_acl_and_cache(thd, REFRESH_ENGINE_LOG, + (TABLE_LIST*) 0, ¬_used); + } + + if (err) + { + WSREP_ERROR("Failed to flush tables: %d (%s)", err, strerror(err)); + } + else + { + WSREP_INFO("Tables flushed."); + const char base_name[]= "tables_flushed"; + ssize_t const full_len= strlen(mysql_real_data_home) + strlen(base_name)+2; + char real_name[full_len]; + sprintf(real_name, "%s/%s", mysql_real_data_home, base_name); + char tmp_name[full_len + 4]; + sprintf(tmp_name, "%s.tmp", real_name); + + FILE* file= fopen(tmp_name, "w+"); + if (0 == file) + { + err= errno; + WSREP_ERROR("Failed to open '%s': %d (%s)", tmp_name, err,strerror(err)); + } + else + { + fprintf(file, "%s:%lld\n", + wsrep_cluster_state_uuid, (long long)wsrep_locked_seqno); + fsync(fileno(file)); + fclose(file); + if (rename(tmp_name, real_name) == -1) + { + err= errno; + WSREP_ERROR("Failed to rename '%s' to '%s': %d (%s)", + tmp_name, real_name, err,strerror(err)); + } + } + } + + return err; +} + +static void sst_disallow_writes (THD* thd, bool yes) +{ + char query_str[64] = { 0, }; + ssize_t const query_max = sizeof(query_str) - 1; + snprintf (query_str, query_max, "SET GLOBAL innodb_disallow_writes=%d", + yes ? 1 : 0); + + if (run_sql_command(thd, query_str)) + { + WSREP_ERROR("Failed to disallow InnoDB writes"); + } +} + +static void* sst_donor_thread (void* a) +{ + sst_thread_arg* arg= (sst_thread_arg*)a; + + WSREP_INFO("Running: '%s'", arg->cmd); + + int err= 1; + bool locked= false; + + const char* out= NULL; + const size_t out_len= 128; + char out_buf[out_len]; + + wsrep_uuid_t ret_uuid= WSREP_UUID_UNDEFINED; + wsrep_seqno_t ret_seqno= WSREP_SEQNO_UNDEFINED; // seqno of complete SST + + wsp::thd thd(FALSE); // we turn off wsrep_on for this THD so that it can + // operate with wsrep_ready == OFF + wsp::process proc(arg->cmd, "r"); + + err= proc.error(); + +/* Inform server about SST script startup and release TO isolation */ + mysql_mutex_lock (&arg->lock); + arg->err = -err; + mysql_cond_signal (&arg->cond); + mysql_mutex_unlock (&arg->lock); //! @note arg is unusable after that. + + if (proc.pipe() && !err) + { +wait_signal: + out= my_fgets (out_buf, out_len, proc.pipe()); + + if (out) + { + const char magic_flush[]= "flush tables"; + const char magic_cont[]= "continue"; + const char magic_done[]= "done"; + + if (!strcasecmp (out, magic_flush)) + { + err= sst_flush_tables (thd.ptr); + if (!err) + { + sst_disallow_writes (thd.ptr, true); + locked= true; + goto wait_signal; + } + } + else if (!strcasecmp (out, magic_cont)) + { + if (locked) + { + sst_disallow_writes (thd.ptr, false); + thd.ptr->global_read_lock.unlock_global_read_lock (thd.ptr); + locked= false; + } + err= 0; + goto wait_signal; + } + else if (!strncasecmp (out, magic_done, strlen(magic_done))) + { + err= sst_scan_uuid_seqno (out + strlen(magic_done) + 1, + &ret_uuid, &ret_seqno); + } + else + { + WSREP_WARN("Received unknown signal: '%s'", out); + } + } + else + { + WSREP_ERROR("Failed to read from: %s", proc.cmd()); + proc.wait(); + } + if (!err && proc.error()) err= proc.error(); + } + else + { + WSREP_ERROR("Failed to execute: %s : %d (%s)", + proc.cmd(), err, strerror(err)); + } + + if (locked) // don't forget to unlock server before return + { + sst_disallow_writes (thd.ptr, false); + thd.ptr->global_read_lock.unlock_global_read_lock (thd.ptr); + } + + // signal to donor that SST is over + struct wsrep_gtid const state_id = { + ret_uuid, err ? WSREP_SEQNO_UNDEFINED : ret_seqno + }; + wsrep->sst_sent (wsrep, &state_id, -err); + proc.wait(); + + return NULL; +} + +static int sst_donate_other (const char* method, + const char* addr, + const char* uuid, + wsrep_seqno_t seqno, + bool bypass) +{ + ssize_t cmd_len = 4096; + char cmd_str[cmd_len]; + + int ret= snprintf (cmd_str, cmd_len, + "wsrep_sst_%s " + WSREP_SST_OPT_ROLE" 'donor' " + WSREP_SST_OPT_ADDR" '%s' " + WSREP_SST_OPT_AUTH" '%s' " + WSREP_SST_OPT_SOCKET" '%s' " + WSREP_SST_OPT_DATA" '%s' " + WSREP_SST_OPT_CONF" '%s' " + WSREP_SST_OPT_GTID" '%s:%lld'" + "%s", + method, addr, sst_auth_real, mysqld_unix_port, + mysql_real_data_home, wsrep_defaults_file, + uuid, (long long) seqno, + bypass ? " "WSREP_SST_OPT_BYPASS : ""); + + if (ret < 0 || ret >= cmd_len) + { + WSREP_ERROR("sst_donate_other(): snprintf() failed: %d", ret); + return (ret < 0 ? ret : -EMSGSIZE); + } + + if (!bypass && wsrep_sst_donor_rejects_queries) sst_reject_queries(FALSE); + + pthread_t tmp; + sst_thread_arg arg(cmd_str); + mysql_mutex_lock (&arg.lock); + ret = pthread_create (&tmp, NULL, sst_donor_thread, &arg); + if (ret) + { + WSREP_ERROR("sst_donate_other(): pthread_create() failed: %d (%s)", + ret, strerror(ret)); + return -ret; + } + mysql_cond_wait (&arg.cond, &arg.lock); + + WSREP_INFO("sst_donor_thread signaled with %d", arg.err); + return arg.err; +} + +wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx, + const void* msg, size_t msg_len, + const wsrep_gtid_t* current_gtid, + const char* state, size_t state_len, + bool bypass) +{ + /* This will be reset when sync callback is called. + * Should we set wsrep_ready to FALSE here too? */ +// wsrep_notify_status(WSREP_MEMBER_DONOR); + local_status.set(WSREP_MEMBER_DONOR); + + const char* method = (char*)msg; + size_t method_len = strlen (method); + const char* data = method + method_len + 1; + + char uuid_str[37]; + wsrep_uuid_print (¤t_gtid->uuid, uuid_str, sizeof(uuid_str)); + + int ret; + if (!strcmp (WSREP_SST_MYSQLDUMP, method)) + { + ret = sst_donate_mysqldump(data, ¤t_gtid->uuid, uuid_str, + current_gtid->seqno, bypass); + } + else + { + ret = sst_donate_other(method, data, uuid_str, current_gtid->seqno,bypass); + } + + return (ret > 0 ? WSREP_CB_SUCCESS : WSREP_CB_FAILURE); +} + +void wsrep_SE_init_grab() +{ + if (mysql_mutex_lock (&LOCK_wsrep_sst_init)) abort(); +} + +void wsrep_SE_init_wait() +{ + while (SE_initialized == false) + { + mysql_cond_wait (&COND_wsrep_sst_init, &LOCK_wsrep_sst_init); + } + mysql_mutex_unlock (&LOCK_wsrep_sst_init); +} + +void wsrep_SE_init_done() +{ + mysql_cond_signal (&COND_wsrep_sst_init); + mysql_mutex_unlock (&LOCK_wsrep_sst_init); +} + +void wsrep_SE_initialized() +{ + SE_initialized = true; +} diff --git a/sql/wsrep_sst.h b/sql/wsrep_sst.h new file mode 100644 index 000000000000..b7f0e26f2261 --- /dev/null +++ b/sql/wsrep_sst.h @@ -0,0 +1,40 @@ +/* Copyright (C) 2013 Codership Oy + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef WSREP_SST_H +#define WSREP_SST_H + +#include // my_bool + +/* system variables */ +extern const char* wsrep_sst_method; +extern const char* wsrep_sst_receive_address; +extern const char* wsrep_sst_donor; +extern char* wsrep_sst_auth; +extern my_bool wsrep_sst_donor_rejects_queries; + +/*! Synchronizes applier thread start with init thread */ +extern void wsrep_sst_grab(); +/*! Init thread waits for SST completion */ +extern bool wsrep_sst_wait(); +/*! Signals wsrep that initialization is complete, writesets can be applied */ +extern void wsrep_sst_continue(); + +extern void wsrep_SE_init_grab(); /*! grab init critical section */ +extern void wsrep_SE_init_wait(); /*! wait for SE init to complete */ +extern void wsrep_SE_init_done(); /*! signal that SE init is complte */ +extern void wsrep_SE_initialized(); /*! mark SE initialization complete */ + +#endif /* WSREP_SST_H */ diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc new file mode 100644 index 000000000000..7f945ae3a6f7 --- /dev/null +++ b/sql/wsrep_thd.cc @@ -0,0 +1,508 @@ +/* Copyright (C) 2013 Codership Oy + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#include "wsrep_thd.h" + +#include "transaction.h" +#include "rpl_rli.h" +#include "log_event.h" +#include "sql_parse.h" +#include "slave.h" // opt_log_slave_updates +#include "sql_base.h" // close_thread_tables() +#include "mysqld.h" // start_wsrep_THD(); + + +#if (__LP64__) +static volatile int64 wsrep_bf_aborts_counter(0); +#define WSREP_ATOMIC_LOAD_LONG my_atomic_load64 +#define WSREP_ATOMIC_ADD_LONG my_atomic_add64 +#else +static volatile int32 wsrep_bf_aborts_counter(0); +#define WSREP_ATOMIC_LOAD_LONG my_atomic_load32 +#define WSREP_ATOMIC_ADD_LONG my_atomic_add32 +#endif + +int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, char *buff) +{ + wsrep_local_bf_aborts = WSREP_ATOMIC_LOAD_LONG(&wsrep_bf_aborts_counter); + var->type = SHOW_LONGLONG; + var->value = (char*)&wsrep_local_bf_aborts; + return 0; +} + +/* must have (&thd->LOCK_wsrep_thd) */ +void wsrep_client_rollback(THD *thd) +{ + WSREP_DEBUG("client rollback due to BF abort for (%ld), query: %s", + thd->thread_id, thd->query()); + + WSREP_ATOMIC_ADD_LONG(&wsrep_bf_aborts_counter, 1); + + thd->wsrep_conflict_state= ABORTING; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + trans_rollback(thd); + + if (thd->locked_tables_mode && thd->lock) + { + WSREP_DEBUG("unlocking tables for BF abort (%ld)", thd->thread_id); + thd->locked_tables_list.unlock_locked_tables(thd); + thd->variables.option_bits&= ~(OPTION_TABLE_LOCK); + } + + if (thd->global_read_lock.is_acquired()) + { + WSREP_DEBUG("unlocking GRL for BF abort (%ld)", thd->thread_id); + thd->global_read_lock.unlock_global_read_lock(thd); + } + + /* Release transactional metadata locks. */ + thd->mdl_context.release_transactional_locks(); + + /* release explicit MDL locks */ + thd->mdl_context.release_explicit_locks(); + + if (thd->get_binlog_table_maps()) + { + WSREP_DEBUG("clearing binlog table map for BF abort (%ld)", thd->thread_id); + thd->clear_binlog_table_maps(); + } + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + thd->wsrep_conflict_state= ABORTED; +} + +static Relay_log_info* wsrep_relay_log_init(const char* log_fname) +{ + Relay_log_info* rli= new Relay_log_info(false); + + rli->no_storage= true; + if (!rli->relay_log.description_event_for_exec) + { + rli->relay_log.description_event_for_exec= + new Format_description_log_event(4); + } + + rli->sql_thd= current_thd; + return rli; +} + +static void wsrep_prepare_bf_thd(THD *thd, struct wsrep_thd_shadow* shadow) +{ + shadow->options = thd->variables.option_bits; + shadow->server_status = thd->server_status; + shadow->wsrep_exec_mode = thd->wsrep_exec_mode; + shadow->vio = thd->net.vio; + + if (opt_log_slave_updates) + thd->variables.option_bits|= OPTION_BIN_LOG; + else + thd->variables.option_bits&= ~(OPTION_BIN_LOG); + + if (!thd->wsrep_rli) thd->wsrep_rli= wsrep_relay_log_init("wsrep_relay"); + + thd->wsrep_exec_mode= REPL_RECV; + thd->net.vio= 0; + thd->clear_error(); + + shadow->tx_isolation = thd->variables.tx_isolation; + thd->variables.tx_isolation = ISO_READ_COMMITTED; + thd->tx_isolation = ISO_READ_COMMITTED; + + shadow->db = thd->db; + shadow->db_length = thd->db_length; + thd->reset_db(NULL, 0); +} + +static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow) +{ + thd->variables.option_bits = shadow->options; + thd->server_status = shadow->server_status; + thd->wsrep_exec_mode = shadow->wsrep_exec_mode; + thd->net.vio = shadow->vio; + thd->variables.tx_isolation = shadow->tx_isolation; + thd->reset_db(shadow->db, shadow->db_length); +} + +void wsrep_replay_transaction(THD *thd) +{ + /* checking if BF trx must be replayed */ + if (thd->wsrep_conflict_state== MUST_REPLAY) { + if (thd->wsrep_exec_mode!= REPL_RECV) { + if (thd->stmt_da->is_sent) + { + WSREP_ERROR("replay issue, thd has reported status already"); + } + thd->stmt_da->reset_diagnostics_area(); + + thd->wsrep_conflict_state= REPLAYING; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + + mysql_reset_thd_for_next_command(thd); + thd->killed= THD::NOT_KILLED; + close_thread_tables(thd); + if (thd->locked_tables_mode && thd->lock) + { + WSREP_DEBUG("releasing table lock for replaying (%ld)", + thd->thread_id); + thd->locked_tables_list.unlock_locked_tables(thd); + thd->variables.option_bits&= ~(OPTION_TABLE_LOCK); + } + thd->mdl_context.release_transactional_locks(); + + thd_proc_info(thd, "wsrep replaying trx"); + WSREP_DEBUG("replay trx: %s %lld", + thd->query() ? thd->query() : "void", + (long long)wsrep_thd_trx_seqno(thd)); + struct wsrep_thd_shadow shadow; + wsrep_prepare_bf_thd(thd, &shadow); + + /* From trans_begin() */ + thd->variables.option_bits|= OPTION_BEGIN; + thd->server_status|= SERVER_STATUS_IN_TRANS; + + int rcode = wsrep->replay_trx(wsrep, + &thd->wsrep_ws_handle, + (void *)thd); + + wsrep_return_from_bf_mode(thd, &shadow); + if (thd->wsrep_conflict_state!= REPLAYING) + WSREP_WARN("lost replaying mode: %d", thd->wsrep_conflict_state ); + + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + + switch (rcode) + { + case WSREP_OK: + thd->wsrep_conflict_state= NO_CONFLICT; + wsrep->post_commit(wsrep, &thd->wsrep_ws_handle); + WSREP_DEBUG("trx_replay successful for: %ld %llu", + thd->thread_id, (long long)thd->real_id); + if (thd->stmt_da->is_sent) + { + WSREP_WARN("replay ok, thd has reported status"); + } + else if (thd->stmt_da->is_set()) + { + if (thd->stmt_da->status() != Diagnostics_area::DA_OK) + { + WSREP_WARN("replay ok, thd has error status %d", + thd->stmt_da->status()); + } + } + else + { + my_ok(thd); + } + break; + case WSREP_TRX_FAIL: + if (thd->stmt_da->is_sent) + { + WSREP_ERROR("replay failed, thd has reported status"); + } + else + { + WSREP_DEBUG("replay failed, rolling back"); + my_error(ER_LOCK_DEADLOCK, MYF(0), "wsrep aborted transaction"); + } + thd->wsrep_conflict_state= ABORTED; + wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle); + break; + default: + WSREP_ERROR("trx_replay failed for: %d, query: %s", + rcode, thd->query() ? thd->query() : "void"); + /* we're now in inconsistent state, must abort */ + unireg_abort(1); + break; + } + + wsrep_cleanup_transaction(thd); + + mysql_mutex_lock(&LOCK_wsrep_replaying); + wsrep_replaying--; + WSREP_DEBUG("replaying decreased: %d, thd: %lu", + wsrep_replaying, thd->thread_id); + mysql_cond_broadcast(&COND_wsrep_replaying); + mysql_mutex_unlock(&LOCK_wsrep_replaying); + } + } +} + +static void wsrep_replication_process(THD *thd) +{ + int rcode; + DBUG_ENTER("wsrep_replication_process"); + + struct wsrep_thd_shadow shadow; + wsrep_prepare_bf_thd(thd, &shadow); + + /* From trans_begin() */ + thd->variables.option_bits|= OPTION_BEGIN; + thd->server_status|= SERVER_STATUS_IN_TRANS; + + rcode = wsrep->recv(wsrep, (void *)thd); + DBUG_PRINT("wsrep",("wsrep_repl returned: %d", rcode)); + + WSREP_INFO("applier thread exiting (code:%d)", rcode); + + switch (rcode) { + case WSREP_OK: + case WSREP_NOT_IMPLEMENTED: + case WSREP_CONN_FAIL: + /* provider does not support slave operations / disconnected from group, + * just close applier thread */ + break; + case WSREP_NODE_FAIL: + /* data inconsistency => SST is needed */ + /* Note: we cannot just blindly restart replication here, + * SST might require server restart if storage engines must be + * initialized after SST */ + WSREP_ERROR("node consistency compromised, aborting"); + wsrep_kill_mysql(thd); + break; + case WSREP_WARNING: + case WSREP_TRX_FAIL: + case WSREP_TRX_MISSING: + /* these suggests a bug in provider code */ + WSREP_WARN("bad return from recv() call: %d", rcode); + /* fall through to node shutdown */ + case WSREP_FATAL: + /* Cluster connectivity is lost. + * + * If applier was killed on purpose (KILL_CONNECTION), we + * avoid mysql shutdown. This is because the killer will then handle + * shutdown processing (or replication restarting) + */ + if (thd->killed != THD::KILL_CONNECTION) + { + wsrep_kill_mysql(thd); + } + break; + } + + mysql_mutex_lock(&LOCK_thread_count); + wsrep_close_applier(thd); + mysql_cond_broadcast(&COND_thread_count); + mysql_mutex_unlock(&LOCK_thread_count); + + if (thd->temporary_tables) + { + WSREP_DEBUG("Applier %lu, has temporary tables at exit", thd->thread_id); + } + wsrep_return_from_bf_mode(thd, &shadow); + DBUG_VOID_RETURN; +} + +void wsrep_create_appliers(long threads) +{ + if (!wsrep_connected) + { + /* see wsrep_replication_start() for the logic */ + if (wsrep_cluster_address && strlen(wsrep_cluster_address) && + wsrep_provider && strcasecmp(wsrep_provider, "none")) + { + WSREP_ERROR("Trying to launch slave threads before creating " + "connection at '%s'", wsrep_cluster_address); + assert(0); + } + return; + } + + long wsrep_threads=0; + pthread_t hThread; + while (wsrep_threads++ < threads) { + if (pthread_create( + &hThread, &connection_attrib, + start_wsrep_THD, (void*)wsrep_replication_process)) + WSREP_WARN("Can't create thread to manage wsrep replication"); + } +} + +static void wsrep_rollback_process(THD *thd) +{ + DBUG_ENTER("wsrep_rollback_process"); + + mysql_mutex_lock(&LOCK_wsrep_rollback); + wsrep_aborting_thd= NULL; + + while (thd->killed == THD::NOT_KILLED) { + thd_proc_info(thd, "wsrep aborter idle"); + thd->mysys_var->current_mutex= &LOCK_wsrep_rollback; + thd->mysys_var->current_cond= &COND_wsrep_rollback; + + mysql_cond_wait(&COND_wsrep_rollback,&LOCK_wsrep_rollback); + + WSREP_DEBUG("WSREP rollback thread wakes for signal"); + + mysql_mutex_lock(&thd->mysys_var->mutex); + thd_proc_info(thd, "wsrep aborter active"); + thd->mysys_var->current_mutex= 0; + thd->mysys_var->current_cond= 0; + mysql_mutex_unlock(&thd->mysys_var->mutex); + + /* check for false alarms */ + if (!wsrep_aborting_thd) + { + WSREP_DEBUG("WSREP rollback thread has empty abort queue"); + } + /* process all entries in the queue */ + while (wsrep_aborting_thd) { + THD *aborting; + wsrep_aborting_thd_t next = wsrep_aborting_thd->next; + aborting = wsrep_aborting_thd->aborting_thd; + my_free(wsrep_aborting_thd); + wsrep_aborting_thd= next; + /* + * must release mutex, appliers my want to add more + * aborting thds in our work queue, while we rollback + */ + mysql_mutex_unlock(&LOCK_wsrep_rollback); + + mysql_mutex_lock(&aborting->LOCK_wsrep_thd); + if (aborting->wsrep_conflict_state== ABORTED) + { + WSREP_DEBUG("WSREP, thd already aborted: %llu state: %d", + (long long)aborting->real_id, + aborting->wsrep_conflict_state); + + mysql_mutex_unlock(&aborting->LOCK_wsrep_thd); + mysql_mutex_lock(&LOCK_wsrep_rollback); + continue; + } + aborting->wsrep_conflict_state= ABORTING; + + mysql_mutex_unlock(&aborting->LOCK_wsrep_thd); + + aborting->store_globals(); + + mysql_mutex_lock(&aborting->LOCK_wsrep_thd); + wsrep_client_rollback(aborting); + WSREP_DEBUG("WSREP rollbacker aborted thd: (%lu %llu)", + aborting->thread_id, (long long)aborting->real_id); + mysql_mutex_unlock(&aborting->LOCK_wsrep_thd); + + mysql_mutex_lock(&LOCK_wsrep_rollback); + } + } + + mysql_mutex_unlock(&LOCK_wsrep_rollback); + sql_print_information("WSREP: rollbacker thread exiting"); + + DBUG_PRINT("wsrep",("wsrep rollbacker thread exiting")); + DBUG_VOID_RETURN; +} + +void wsrep_create_rollbacker() +{ + if (wsrep_provider && strcasecmp(wsrep_provider, "none")) + { + pthread_t hThread; + /* create rollbacker */ + if (pthread_create( &hThread, &connection_attrib, + start_wsrep_THD, (void*)wsrep_rollback_process)) + WSREP_WARN("Can't create thread to manage wsrep rollback"); + } +} + + +extern "C" +void wsrep_thd_set_PA_safe(void *thd_ptr, my_bool safe) +{ + if (thd_ptr) + { + THD* thd = (THD*)thd_ptr; + thd->wsrep_PA_safe = safe; + } +} + +extern "C" +my_bool wsrep_thd_is_BF(void *thd_ptr, my_bool sync) +{ + my_bool status = FALSE; + if (thd_ptr) + { + THD* thd = (THD*)thd_ptr; + if (sync) mysql_mutex_lock(&thd->LOCK_wsrep_thd); + + status = ((thd->wsrep_exec_mode == REPL_RECV) || + (thd->wsrep_exec_mode == TOTAL_ORDER)); + if (sync) mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + } + return status; +} + +extern "C" +my_bool wsrep_thd_is_BF_or_commit(void *thd_ptr, my_bool sync) +{ + bool status = FALSE; + if (thd_ptr) + { + THD* thd = (THD*)thd_ptr; + if (sync) mysql_mutex_lock(&thd->LOCK_wsrep_thd); + + status = ((thd->wsrep_exec_mode == REPL_RECV) || + (thd->wsrep_exec_mode == TOTAL_ORDER) || + (thd->wsrep_exec_mode == LOCAL_COMMIT)); + if (sync) mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + } + return status; +} + +extern "C" +my_bool wsrep_thd_is_local(void *thd_ptr, my_bool sync) +{ + bool status = FALSE; + if (thd_ptr) + { + THD* thd = (THD*)thd_ptr; + if (sync) mysql_mutex_lock(&thd->LOCK_wsrep_thd); + + status = (thd->wsrep_exec_mode == LOCAL_STATE); + if (sync) mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + } + return status; +} + +extern "C" +int wsrep_abort_thd(void *bf_thd_ptr, void *victim_thd_ptr, my_bool signal) +{ + THD *victim_thd = (THD *) victim_thd_ptr; + THD *bf_thd = (THD *) bf_thd_ptr; + DBUG_ENTER("wsrep_abort_thd"); + + if ( (WSREP(bf_thd) || + ( (WSREP_ON || wsrep_OSU_method_options == WSREP_OSU_RSU) && + bf_thd->wsrep_exec_mode == TOTAL_ORDER) ) && + victim_thd) + { + WSREP_DEBUG("wsrep_abort_thd, by: %llu, victim: %llu", (bf_thd) ? + (long long)bf_thd->real_id : 0, (long long)victim_thd->real_id); + ha_wsrep_abort_transaction(bf_thd, victim_thd, signal); + } + else + { + WSREP_DEBUG("wsrep_abort_thd not effective: %p %p", bf_thd, victim_thd); + } + + DBUG_RETURN(1); +} + +extern "C" +int wsrep_thd_in_locking_session(void *thd_ptr) +{ + if (thd_ptr && ((THD *)thd_ptr)->in_lock_tables) { + return 1; + } + return 0; +} + diff --git a/sql/wsrep_thd.h b/sql/wsrep_thd.h new file mode 100644 index 000000000000..597033a7c705 --- /dev/null +++ b/sql/wsrep_thd.h @@ -0,0 +1,35 @@ +/* Copyright (C) 2013 Codership Oy + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef WSREP_THD_H +#define WSREP_THD_H + +#include "sql_class.h" + +int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, char *buff); +void wsrep_client_rollback(THD *thd); +void wsrep_replay_transaction(THD *thd); +void wsrep_create_appliers(long threads); +void wsrep_create_rollbacker(); + +extern "C" my_bool wsrep_thd_is_BF(void *thd_ptr, my_bool sync); +extern "C" void wsrep_thd_set_PA_safe(void *thd_ptr, my_bool safe); +extern "C" my_bool wsrep_thd_is_BF_or_commit(void *thd_ptr, my_bool sync); +extern "C" my_bool wsrep_thd_is_local(void *thd_ptr, my_bool sync); +extern "C" int wsrep_abort_thd(void *bf_thd_ptr, void *victim_thd_ptr, + my_bool signal); +extern "C" int wsrep_thd_in_locking_session(void *thd_ptr); + +#endif /* WSREP_THD_H */ diff --git a/sql/wsrep_utils.cc b/sql/wsrep_utils.cc new file mode 100644 index 000000000000..90af2fb8156b --- /dev/null +++ b/sql/wsrep_utils.cc @@ -0,0 +1,519 @@ +/* Copyright 2010 Codership Oy + + 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 + */ + +//! @file some utility functions and classes not directly related to replication + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE // POSIX_SPAWN_USEVFORK flag +#endif + +#include "wsrep_utils.h" +#include "wsrep_mysqld.h" + +#include + +#include // posix_spawn() +#include // pipe() +#include // errno +#include // strerror() +#include // waitpid() +#include +#include +#include // getaddrinfo() + +extern char** environ; // environment variables + +static wsp::string wsrep_PATH; + +void +wsrep_prepend_PATH (const char* path) +{ + int count = 0; + + while (environ[count]) + { + if (strncmp (environ[count], "PATH=", 5)) + { + count++; + continue; + } + + char* const old_path (environ[count]); + + if (strstr (old_path, path)) return; // path already there + + size_t const new_path_len(strlen(old_path) + strlen(":") + + strlen(path) + 1); + + char* const new_path (reinterpret_cast(malloc(new_path_len))); + + if (new_path) + { + snprintf (new_path, new_path_len, "PATH=%s:%s", path, + old_path + strlen("PATH=")); + + wsrep_PATH.set (new_path); + environ[count] = new_path; + } + else + { + WSREP_ERROR ("Failed to allocate 'PATH' environment variable " + "buffer of size %zu.", new_path_len); + } + + return; + } + + WSREP_ERROR ("Failed to find 'PATH' environment variable. " + "State snapshot transfer may not be working."); +} + +namespace wsp +{ + +#define PIPE_READ 0 +#define PIPE_WRITE 1 +#define STDIN_FD 0 +#define STDOUT_FD 1 + +#ifndef POSIX_SPAWN_USEVFORK +# define POSIX_SPAWN_USEVFORK 0 +#endif + +process::process (const char* cmd, const char* type) + : str_(cmd ? strdup(cmd) : strdup("")), io_(NULL), err_(EINVAL), pid_(0) +{ + if (0 == str_) + { + WSREP_ERROR ("Can't allocate command line of size: %zu", strlen(cmd)); + err_ = ENOMEM; + return; + } + + if (0 == strlen(str_)) + { + WSREP_ERROR ("Can't start a process: null or empty command line."); + return; + } + + if (NULL == type || (strcmp (type, "w") && strcmp(type, "r"))) + { + WSREP_ERROR ("type argument should be either \"r\" or \"w\"."); + return; + } + + int pipe_fds[2] = { -1, }; + if (::pipe(pipe_fds)) + { + err_ = errno; + WSREP_ERROR ("pipe() failed: %d (%s)", err_, strerror(err_)); + return; + } + + // which end of pipe will be returned to parent + int const parent_end (strcmp(type,"w") ? PIPE_READ : PIPE_WRITE); + int const child_end (parent_end == PIPE_READ ? PIPE_WRITE : PIPE_READ); + int const close_fd (parent_end == PIPE_READ ? STDOUT_FD : STDIN_FD); + + char* const pargv[4] = { strdup("sh"), strdup("-c"), strdup(str_), NULL }; + if (!(pargv[0] && pargv[1] && pargv[2])) + { + err_ = ENOMEM; + WSREP_ERROR ("Failed to allocate pargv[] array."); + goto cleanup_pipe; + } + + posix_spawnattr_t attr; + err_ = posix_spawnattr_init (&attr); + if (err_) + { + WSREP_ERROR ("posix_spawnattr_init() failed: %d (%s)", + err_, strerror(err_)); + goto cleanup_pipe; + } + + err_ = posix_spawnattr_setflags (&attr, POSIX_SPAWN_SETSIGDEF | + POSIX_SPAWN_USEVFORK); + if (err_) + { + WSREP_ERROR ("posix_spawnattr_setflags() failed: %d (%s)", + err_, strerror(err_)); + goto cleanup_attr; + } + + posix_spawn_file_actions_t fact; + err_ = posix_spawn_file_actions_init (&fact); + if (err_) + { + WSREP_ERROR ("posix_spawn_file_actions_init() failed: %d (%s)", + err_, strerror(err_)); + goto cleanup_attr; + } + + // close child's stdout|stdin depending on what we returning + err_ = posix_spawn_file_actions_addclose (&fact, close_fd); + if (err_) + { + WSREP_ERROR ("posix_spawn_file_actions_addclose() failed: %d (%s)", + err_, strerror(err_)); + goto cleanup_fact; + } + + // substitute our pipe descriptor in place of the closed one + err_ = posix_spawn_file_actions_adddup2 (&fact, + pipe_fds[child_end], close_fd); + if (err_) + { + WSREP_ERROR ("posix_spawn_file_actions_addup2() failed: %d (%s)", + err_, strerror(err_)); + goto cleanup_fact; + } + + err_ = posix_spawnp (&pid_, pargv[0], &fact, &attr, pargv, environ); + if (err_) + { + WSREP_ERROR ("posix_spawnp(%s) failed: %d (%s)", + pargv[2], err_, strerror(err_)); + pid_ = 0; // just to make sure it was not messed up in the call + goto cleanup_fact; + } + + io_ = fdopen (pipe_fds[parent_end], type); + + if (io_) + { + pipe_fds[parent_end] = -1; // skip close on cleanup + } + else + { + err_ = errno; + WSREP_ERROR ("fdopen() failed: %d (%s)", err_, strerror(err_)); + } + +cleanup_fact: + int err; // to preserve err_ code + err = posix_spawn_file_actions_destroy (&fact); + if (err) + { + WSREP_ERROR ("posix_spawn_file_actions_destroy() failed: %d (%s)\n", + err, strerror(err)); + } + +cleanup_attr: + err = posix_spawnattr_destroy (&attr); + if (err) + { + WSREP_ERROR ("posix_spawnattr_destroy() failed: %d (%s)", + err, strerror(err)); + } + +cleanup_pipe: + if (pipe_fds[0] >= 0) close (pipe_fds[0]); + if (pipe_fds[1] >= 0) close (pipe_fds[1]); + + free (pargv[0]); + free (pargv[1]); + free (pargv[2]); +} + +process::~process () +{ + if (io_) + { + assert (pid_); + assert (str_); + + WSREP_WARN("Closing pipe to child process: %s, PID(%ld) " + "which might still be running.", str_, (long)pid_); + + if (fclose (io_) == -1) + { + err_ = errno; + WSREP_ERROR("fclose() failed: %d (%s)", err_, strerror(err_)); + } + } + + if (str_) free (const_cast(str_)); +} + +int +process::wait () +{ + if (pid_) + { + int status; + if (-1 == waitpid(pid_, &status, 0)) + { + err_ = errno; assert (err_); + WSREP_ERROR("Waiting for process failed: %s, PID(%ld): %d (%s)", + str_, (long)pid_, err_, strerror (err_)); + } + else + { // command completed, check exit status + if (WIFEXITED (status)) { + err_ = WEXITSTATUS (status); + } + else { // command didn't complete with exit() + WSREP_ERROR("Process was aborted."); + err_ = errno ? errno : ECHILD; + } + + if (err_) { + switch (err_) /* Translate error codes to more meaningful */ + { + case 126: err_ = EACCES; break; /* Permission denied */ + case 127: err_ = ENOENT; break; /* No such file or directory */ + } + WSREP_ERROR("Process completed with error: %s: %d (%s)", + str_, err_, strerror(err_)); + } + + pid_ = 0; + if (io_) fclose (io_); + io_ = NULL; + } + } + else { + assert (NULL == io_); + WSREP_ERROR("Command did not run: %s", str_); + } + + return err_; +} + +thd::thd (my_bool won) : init(), ptr(new THD) +{ + if (ptr) + { + ptr->thread_stack= (char*) &ptr; + ptr->store_globals(); + ptr->variables.option_bits&= ~OPTION_BIN_LOG; // disable binlog + ptr->variables.wsrep_on = won; + ptr->security_ctx->master_access= ~(ulong)0; + lex_start(ptr); + } +} + +thd::~thd () +{ + if (ptr) + { + delete ptr; + my_pthread_setspecific_ptr (THR_THD, 0); + } +} + +} // namespace wsp + +/* Returns INADDR_NONE, INADDR_ANY, INADDR_LOOPBACK or something else */ +unsigned int wsrep_check_ip (const char* const addr) +{ + unsigned int ret = INADDR_NONE; + struct addrinfo *res, hints; + + memset (&hints, 0, sizeof(hints)); + hints.ai_flags= AI_PASSIVE/*|AI_ADDRCONFIG*/; + hints.ai_socktype= SOCK_STREAM; + hints.ai_family= AF_UNSPEC; + + int gai_ret = getaddrinfo(addr, NULL, &hints, &res); + if (0 == gai_ret) + { + if (AF_INET == res->ai_family) /* IPv4 */ + { + struct sockaddr_in* a= (struct sockaddr_in*)res->ai_addr; + ret= htonl(a->sin_addr.s_addr); + } + else /* IPv6 */ + { + struct sockaddr_in6* a= (struct sockaddr_in6*)res->ai_addr; + if (IN6_IS_ADDR_UNSPECIFIED(&a->sin6_addr)) + ret= INADDR_ANY; + else if (IN6_IS_ADDR_LOOPBACK(&a->sin6_addr)) + ret= INADDR_LOOPBACK; + else + ret= 0xdeadbeef; + } + freeaddrinfo (res); + } + else { + WSREP_ERROR ("getaddrinfo() failed on '%s': %d (%s)", + addr, gai_ret, gai_strerror(gai_ret)); + } + + // uint8_t* b= (uint8_t*)&ret; + // fprintf (stderr, "########## wsrep_check_ip returning: %hhu.%hhu.%hhu.%hhu\n", + // b[0], b[1], b[2], b[3]); + + return ret; +} + +extern const char* my_bind_addr_str; +extern uint mysqld_port; + +size_t wsrep_guess_ip (char* buf, size_t buf_len) +{ + size_t ip_len = 0; + + if (my_bind_addr_str && strlen(my_bind_addr_str)) + { + unsigned int const ip_type= wsrep_check_ip(my_bind_addr_str); + + if (INADDR_NONE == ip_type) { + WSREP_ERROR("Networking not configured, cannot receive state transfer."); + return 0; + } + + if (INADDR_ANY != ip_type) {; + strncpy (buf, my_bind_addr_str, buf_len); + return strlen(buf); + } + } + + // mysqld binds to all interfaces - try IP from wsrep_node_address + if (wsrep_node_address && wsrep_node_address[0] != '\0') { + const char* const colon_ptr = strchr(wsrep_node_address, ':'); + + if (colon_ptr) + ip_len = colon_ptr - wsrep_node_address; + else + ip_len = strlen(wsrep_node_address); + + if (ip_len >= buf_len) { + WSREP_WARN("default_ip(): buffer too short: %zu <= %zd", buf_len, ip_len); + return 0; + } + + memcpy (buf, wsrep_node_address, ip_len); + buf[ip_len] = '\0'; + return ip_len; + } + + // try to find the address of the first one +#if (TARGET_OS_LINUX == 1) + const char cmd[] = "ip addr show | grep -E '^\\s*inet' | grep -m1 global |" + " awk '{ print $2 }' | sed 's/\\/.*//'"; +#elif defined(__sun__) + const char cmd[] = "/sbin/ifconfig -a | " + "/usr/gnu/bin/grep -m1 -1 -E 'net[0-9]:' | tail -n 1 | awk '{ print $2 }'"; +#elif defined(__APPLE__) || defined(__FreeBSD__) + const char cmd[] = "/sbin/route -nv get 8.8.8.8 | tail -n1 | awk '{print $(NF)}'"; +#else + char *cmd; +#error "OS not supported" +#endif + wsp::process proc (cmd, "r"); + + if (NULL != proc.pipe()) { + char* ret; + + ret = fgets (buf, buf_len, proc.pipe()); + + if (proc.wait()) return 0; + + if (NULL == ret) { + WSREP_ERROR("Failed to read output of: '%s'", cmd); + return 0; + } + } + else { + WSREP_ERROR("Failed to execute: '%s'", cmd); + return 0; + } + + // clear possible \n at the end of ip string left by fgets() + ip_len = strlen (buf); + if (ip_len > 0 && '\n' == buf[ip_len - 1]) { + ip_len--; + buf[ip_len] = '\0'; + } + + if (INADDR_NONE == inet_addr(buf)) { + if (strlen(buf) != 0) { + WSREP_WARN("Shell command returned invalid address: '%s'", buf); + } + return 0; + } + + return ip_len; +} + +size_t wsrep_guess_address(char* buf, size_t buf_len) +{ + size_t addr_len = wsrep_guess_ip (buf, buf_len); + + if (addr_len && addr_len < buf_len) { + addr_len += snprintf (buf + addr_len, buf_len - addr_len, + ":%u", mysqld_port); + } + + return addr_len; +} + +/* + * WSREPXid + */ + +#define WSREP_XID_PREFIX "WSREPXid" +#define WSREP_XID_PREFIX_LEN MYSQL_XID_PREFIX_LEN +#define WSREP_XID_UUID_OFFSET 8 +#define WSREP_XID_SEQNO_OFFSET (WSREP_XID_UUID_OFFSET + sizeof(wsrep_uuid_t)) +#define WSREP_XID_GTRID_LEN (WSREP_XID_SEQNO_OFFSET + sizeof(wsrep_seqno_t)) + +void wsrep_xid_init(XID* xid, const wsrep_uuid_t* uuid, wsrep_seqno_t seqno) +{ + xid->formatID= 1; + xid->gtrid_length= WSREP_XID_GTRID_LEN; + xid->bqual_length= 0; + memset(xid->data, 0, sizeof(xid->data)); + memcpy(xid->data, WSREP_XID_PREFIX, WSREP_XID_PREFIX_LEN); + memcpy(xid->data + WSREP_XID_UUID_OFFSET, uuid, sizeof(wsrep_uuid_t)); + memcpy(xid->data + WSREP_XID_SEQNO_OFFSET, &seqno, sizeof(wsrep_seqno_t)); +} + +const wsrep_uuid_t* wsrep_xid_uuid(const XID* xid) +{ + if (wsrep_is_wsrep_xid(xid)) + return reinterpret_cast(xid->data + + WSREP_XID_UUID_OFFSET); + else + return &WSREP_UUID_UNDEFINED; +} + +wsrep_seqno_t wsrep_xid_seqno(const XID* xid) +{ + + if (wsrep_is_wsrep_xid(xid)) + { + wsrep_seqno_t seqno; + memcpy(&seqno, xid->data + WSREP_XID_SEQNO_OFFSET, sizeof(wsrep_seqno_t)); + return seqno; + } + else + { + return WSREP_SEQNO_UNDEFINED; + } +} + +extern "C" +int wsrep_is_wsrep_xid(const void* xid_ptr) +{ + const XID* xid= reinterpret_cast(xid_ptr); + return (xid->formatID == 1 && + xid->gtrid_length == WSREP_XID_GTRID_LEN && + xid->bqual_length == 0 && + !memcmp(xid->data, WSREP_XID_PREFIX, WSREP_XID_PREFIX_LEN)); +} diff --git a/sql/wsrep_utils.h b/sql/wsrep_utils.h new file mode 100644 index 000000000000..337678238f82 --- /dev/null +++ b/sql/wsrep_utils.h @@ -0,0 +1,208 @@ +/* Copyright (C) 2013 Codership Oy + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef WSREP_UTILS_H +#define WSREP_UTILS_H + +#include "wsrep_priv.h" + +unsigned int wsrep_check_ip (const char* addr); +size_t wsrep_guess_ip (char* buf, size_t buf_len); +size_t wsrep_guess_address(char* buf, size_t buf_len); + +namespace wsp { +class node_status +{ +public: + node_status() : status(WSREP_MEMBER_UNDEFINED) {} + void set(wsrep_member_status_t new_status, + const wsrep_view_info_t* view = 0) + { + if (status != new_status || 0 != view) + { + wsrep_notify_status(new_status, view); + status = new_status; + } + } + wsrep_member_status_t get() const { return status; } +private: + wsrep_member_status_t status; +}; +} /* namespace wsp */ + +extern wsp::node_status local_status; + +namespace wsp { +/* A small class to run external programs. */ +class process +{ +private: + const char* const str_; + FILE* io_; + int err_; + pid_t pid_; + +public: +/*! @arg type is a pointer to a null-terminated string which must contain + either the letter 'r' for reading or the letter 'w' for writing. + */ + process (const char* cmd, const char* type); + ~process (); + + FILE* pipe () { return io_; } + int error() { return err_; } + int wait (); + const char* cmd() { return str_; } +}; + +class thd +{ + class thd_init + { + public: + thd_init() { my_thread_init(); } + ~thd_init() { my_thread_end(); } + } + init; + + thd (const thd&); + thd& operator= (const thd&); + +public: + + thd(my_bool wsrep_on); + ~thd(); + THD* const ptr; +}; + +class string +{ +public: + string() : string_(0) {} + void set(char* str) { if (string_) free (string_); string_ = str; } + ~string() { set (0); } +private: + char* string_; +}; + +#ifdef REMOVED +class lock +{ + pthread_mutex_t* const mtx_; + +public: + + lock (pthread_mutex_t* mtx) : mtx_(mtx) + { + int err = pthread_mutex_lock (mtx_); + + if (err) + { + WSREP_ERROR("Mutex lock failed: %s", strerror(err)); + abort(); + } + } + + virtual ~lock () + { + int err = pthread_mutex_unlock (mtx_); + + if (err) + { + WSREP_ERROR("Mutex unlock failed: %s", strerror(err)); + abort(); + } + } + + inline void wait (pthread_cond_t* cond) + { + pthread_cond_wait (cond, mtx_); + } + +private: + + lock (const lock&); + lock& operator=(const lock&); + +}; + +class monitor +{ + int mutable refcnt; + pthread_mutex_t mutable mtx; + pthread_cond_t mutable cond; + +public: + + monitor() : refcnt(0) + { + pthread_mutex_init (&mtx, NULL); + pthread_cond_init (&cond, NULL); + } + + ~monitor() + { + pthread_mutex_destroy (&mtx); + pthread_cond_destroy (&cond); + } + + void enter() const + { + lock l(&mtx); + + while (refcnt) + { + l.wait(&cond); + } + refcnt++; + } + + void leave() const + { + lock l(&mtx); + + refcnt--; + if (refcnt == 0) + { + pthread_cond_signal (&cond); + } + } + +private: + + monitor (const monitor&); + monitor& operator= (const monitor&); +}; + +class critical +{ + const monitor& mon; + +public: + + critical(const monitor& m) : mon(m) { mon.enter(); } + + ~critical() { mon.leave(); } + +private: + + critical (const critical&); + critical& operator= (const critical&); +}; +#endif + +} // namespace wsrep + +#endif /* WSREP_UTILS_H */ diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc new file mode 100644 index 000000000000..b58df860fbdc --- /dev/null +++ b/sql/wsrep_var.cc @@ -0,0 +1,626 @@ +/* Copyright 2008 Codership Oy + + 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 */ + +#include "wsrep_var.h" + +#include +#include +#include +#include +#include +#include "wsrep_priv.h" +#include "wsrep_thd.h" +#include +#include +#include + +#define WSREP_START_POSITION_ZERO "00000000-0000-0000-0000-000000000000:-1" +#define WSREP_CLUSTER_NAME "my_wsrep_cluster" + +const char* wsrep_provider = 0; +const char* wsrep_provider_options = 0; +const char* wsrep_cluster_address = 0; +const char* wsrep_cluster_name = 0; +const char* wsrep_node_name = 0; +const char* wsrep_node_address = 0; +const char* wsrep_node_incoming_address = 0; +const char* wsrep_start_position = 0; +ulong wsrep_OSU_method_options; + +int wsrep_init_vars() +{ + wsrep_provider = my_strdup(WSREP_NONE, MYF(MY_WME)); + wsrep_provider_options= my_strdup("", MYF(MY_WME)); + wsrep_cluster_address = my_strdup("", MYF(MY_WME)); + wsrep_cluster_name = my_strdup(WSREP_CLUSTER_NAME, MYF(MY_WME)); + wsrep_node_name = my_strdup("", MYF(MY_WME)); + wsrep_node_address = my_strdup("", MYF(MY_WME)); + wsrep_node_incoming_address= my_strdup(WSREP_NODE_INCOMING_AUTO, MYF(MY_WME)); + wsrep_start_position = my_strdup(WSREP_START_POSITION_ZERO, MYF(MY_WME)); + + global_system_variables.binlog_format=BINLOG_FORMAT_ROW; + return 0; +} + +bool wsrep_on_update (sys_var *self, THD* thd, enum_var_type var_type) +{ + if (var_type == OPT_GLOBAL) { + // FIXME: this variable probably should be changed only per session + thd->variables.wsrep_on = global_system_variables.wsrep_on; + } + return false; +} + +bool wsrep_causal_reads_update (sys_var *self, THD* thd, enum_var_type var_type) +{ + // global setting should not affect session setting. + // if (var_type == OPT_GLOBAL) { + // thd->variables.wsrep_causal_reads = global_system_variables.wsrep_causal_reads; + // } + if (thd->variables.wsrep_causal_reads) { + thd->variables.wsrep_sync_wait |= WSREP_SYNC_WAIT_BEFORE_READ; + } else { + thd->variables.wsrep_sync_wait &= ~WSREP_SYNC_WAIT_BEFORE_READ; + } + + // update global settings too. + if (global_system_variables.wsrep_causal_reads) { + global_system_variables.wsrep_sync_wait |= WSREP_SYNC_WAIT_BEFORE_READ; + } else { + global_system_variables.wsrep_sync_wait &= ~WSREP_SYNC_WAIT_BEFORE_READ; + } + return false; +} + +bool wsrep_sync_wait_update (sys_var* self, THD* thd, enum_var_type var_type) +{ + // global setting should not affect session setting. + // if (var_type == OPT_GLOBAL) { + // thd->variables.wsrep_sync_wait = global_system_variables.wsrep_sync_wait; + // } + thd->variables.wsrep_causal_reads = thd->variables.wsrep_sync_wait & + WSREP_SYNC_WAIT_BEFORE_READ; + + // update global settings too + global_system_variables.wsrep_causal_reads = global_system_variables.wsrep_sync_wait & + WSREP_SYNC_WAIT_BEFORE_READ; + return false; +} + +static int wsrep_start_position_verify (const char* start_str) +{ + size_t start_len; + wsrep_uuid_t uuid; + ssize_t uuid_len; + + start_len = strlen (start_str); + if (start_len < 34) + return 1; + + uuid_len = wsrep_uuid_scan (start_str, start_len, &uuid); + if (uuid_len < 0 || (start_len - uuid_len) < 2) + return 1; + + if (start_str[uuid_len] != ':') // separator should follow UUID + return 1; + + char* endptr; + wsrep_seqno_t const seqno __attribute__((unused)) // to avoid GCC warnings + (strtoll(&start_str[uuid_len + 1], &endptr, 10)); + + if (*endptr == '\0') return 0; // remaining string was seqno + + return 1; +} + +bool wsrep_start_position_check (sys_var *self, THD* thd, set_var* var) +{ + char buff[FN_REFLEN]; + String str(buff, sizeof(buff), system_charset_info), *res; + const char* start_str = NULL; + + if (!(res = var->value->val_str(&str))) goto err; + + start_str = res->c_ptr(); + + if (!start_str) goto err; + + if (!wsrep_start_position_verify(start_str)) return 0; + +err: + + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->name.str, + start_str ? start_str : "NULL"); + return 1; +} + +void wsrep_set_local_position (const char* value) +{ + size_t value_len = strlen (value); + size_t uuid_len = wsrep_uuid_scan (value, value_len, &local_uuid); + + local_seqno = strtoll (value + uuid_len + 1, NULL, 10); + + XID xid; + wsrep_xid_init(&xid, &local_uuid, local_seqno); + wsrep_set_SE_checkpoint(&xid); + WSREP_INFO ("wsrep_start_position var submitted: '%s'", wsrep_start_position); +} + +bool wsrep_start_position_update (sys_var *self, THD* thd, enum_var_type type) +{ + // since this value passed wsrep_start_position_check, don't check anything + // here + wsrep_set_local_position (wsrep_start_position); + + if (wsrep) { + wsrep_sst_received (wsrep, &local_uuid, local_seqno, NULL, 0); + } + + return 0; +} + +void wsrep_start_position_init (const char* val) +{ + if (NULL == val || wsrep_start_position_verify (val)) + { + WSREP_ERROR("Bad initial value for wsrep_start_position: %s", + (val ? val : "")); + return; + } + + wsrep_set_local_position (val); +} + +static bool refresh_provider_options() +{ + WSREP_DEBUG("refresh_provider_options: %s", + (wsrep_provider_options) ? wsrep_provider_options : "null"); + char* opts= wsrep->options_get(wsrep); + if (opts) + { + if (wsrep_provider_options) my_free((void *)wsrep_provider_options); + wsrep_provider_options = (char*)my_memdup(opts, strlen(opts) + 1, + MYF(MY_WME)); + } + else + { + WSREP_ERROR("Failed to get provider options"); + return true; + } + return false; +} + +static int wsrep_provider_verify (const char* provider_str) +{ + MY_STAT f_stat; + char path[FN_REFLEN]; + + if (!provider_str || strlen(provider_str)== 0) + return 1; + + if (!strcmp(provider_str, WSREP_NONE)) + return 0; + + if (!unpack_filename(path, provider_str)) + return 1; + + /* check that provider file exists */ + bzero(&f_stat, sizeof(MY_STAT)); + if (!my_stat(path, &f_stat, MYF(0))) + { + return 1; + } + return 0; +} + +bool wsrep_provider_check (sys_var *self, THD* thd, set_var* var) +{ + char buff[FN_REFLEN]; + String str(buff, sizeof(buff), system_charset_info), *res; + const char* provider_str = NULL; + + if (!(res = var->value->val_str(&str))) goto err; + + provider_str = res->c_ptr(); + + if (!provider_str) goto err; + + if (!wsrep_provider_verify(provider_str)) return 0; + +err: + + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->name.str, + provider_str ? provider_str : "NULL"); + return 1; +} + +bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type) +{ + bool rcode= false; + + bool wsrep_on_saved= thd->variables.wsrep_on; + thd->variables.wsrep_on= false; + + WSREP_DEBUG("wsrep_provider_update: %s", wsrep_provider); + + /* stop replication is heavy operation, and includes closing all client + connections. Closing clients may need to get LOCK_global_system_variables + at least in MariaDB. + + Note: releasing LOCK_global_system_variables may cause race condition, if + there can be several concurrent clients changing wsrep_provider + */ + mysql_mutex_unlock(&LOCK_global_system_variables); + wsrep_stop_replication(thd); + mysql_mutex_lock(&LOCK_global_system_variables); + + wsrep_deinit(); + + char* tmp= strdup(wsrep_provider); // wsrep_init() rewrites provider + //when fails + if (wsrep_init()) + { + my_error(ER_CANT_OPEN_LIBRARY, MYF(0), tmp); + rcode = true; + } + free(tmp); + + // we sure don't want to use old address with new provider + wsrep_cluster_address_init(NULL); + wsrep_provider_options_init(NULL); + + thd->variables.wsrep_on= wsrep_on_saved; + + refresh_provider_options(); + + return rcode; +} + +void wsrep_provider_init (const char* value) +{ + WSREP_DEBUG("wsrep_provider_init: %s -> %s", + (wsrep_provider) ? wsrep_provider : "null", + (value) ? value : "null"); + if (NULL == value || wsrep_provider_verify (value)) + { + WSREP_ERROR("Bad initial value for wsrep_provider: %s", + (value ? value : "")); + return; + } + + if (wsrep_provider) my_free((void *)wsrep_provider); + wsrep_provider = my_strdup(value, MYF(0)); +} + +bool wsrep_provider_options_check(sys_var *self, THD* thd, set_var* var) +{ + return 0; +} + +bool wsrep_provider_options_update(sys_var *self, THD* thd, enum_var_type type) +{ + wsrep_status_t ret= wsrep->options_set(wsrep, wsrep_provider_options); + if (ret != WSREP_OK) + { + WSREP_ERROR("Set options returned %d", ret); + refresh_provider_options(); + return true; + } + return refresh_provider_options(); +} + +void wsrep_provider_options_init(const char* value) +{ + if (wsrep_provider_options && wsrep_provider_options != value) + my_free((void *)wsrep_provider_options); + wsrep_provider_options = (value) ? my_strdup(value, MYF(0)) : NULL; +} + +static int wsrep_cluster_address_verify (const char* cluster_address_str) +{ + /* There is no predefined address format, it depends on provider. */ + return 0; +} + +bool wsrep_cluster_address_check (sys_var *self, THD* thd, set_var* var) +{ + char buff[FN_REFLEN]; + String str(buff, sizeof(buff), system_charset_info), *res; + const char* cluster_address_str = NULL; + + if (!(res = var->value->val_str(&str))) goto err; + + cluster_address_str = res->c_ptr(); + + if (!wsrep_cluster_address_verify(cluster_address_str)) return 0; + + err: + + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->name.str, + cluster_address_str ? cluster_address_str : "NULL"); + return 1 ; +} + +bool wsrep_cluster_address_update (sys_var *self, THD* thd, enum_var_type type) +{ + bool wsrep_on_saved= thd->variables.wsrep_on; + thd->variables.wsrep_on= false; + + /* stop replication is heavy operation, and includes closing all client + connections. Closing clients may need to get LOCK_global_system_variables + at least in MariaDB. + + Note: releasing LOCK_global_system_variables may cause race condition, if + there can be several concurrent clients changing wsrep_provider + */ + mysql_mutex_unlock(&LOCK_global_system_variables); + wsrep_stop_replication(thd); + mysql_mutex_lock(&LOCK_global_system_variables); + + if (wsrep_start_replication()) + { + wsrep_create_rollbacker(); + wsrep_create_appliers(wsrep_slave_threads); + } + + thd->variables.wsrep_on= wsrep_on_saved; + + return false; +} + +void wsrep_cluster_address_init (const char* value) +{ + WSREP_DEBUG("wsrep_cluster_address_init: %s -> %s", + (wsrep_cluster_address) ? wsrep_cluster_address : "null", + (value) ? value : "null"); + + if (wsrep_cluster_address) my_free ((void*)wsrep_cluster_address); + wsrep_cluster_address = (value) ? my_strdup(value, MYF(0)) : NULL; +} + +bool wsrep_cluster_name_check (sys_var *self, THD* thd, set_var* var) +{ + char buff[FN_REFLEN]; + String str(buff, sizeof(buff), system_charset_info), *res; + const char* cluster_name_str = NULL; + + if (!(res = var->value->val_str(&str))) goto err; + + cluster_name_str = res->c_ptr(); + + if (!cluster_name_str || strlen(cluster_name_str) == 0) goto err; + + return 0; + + err: + + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->name.str, + cluster_name_str ? cluster_name_str : "NULL"); + return 1; +} + +bool wsrep_cluster_name_update (sys_var *self, THD* thd, enum_var_type type) +{ + return 0; +} + +bool wsrep_node_name_check (sys_var *self, THD* thd, set_var* var) +{ + char buff[FN_REFLEN]; + String str(buff, sizeof(buff), system_charset_info), *res; + const char* node_name_str = NULL; + + if (!(res = var->value->val_str(&str))) goto err; + + node_name_str = res->c_ptr(); + + if (!node_name_str || strlen(node_name_str) == 0) goto err; + + return 0; + + err: + + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->name.str, + node_name_str ? node_name_str : "NULL"); + return 1; +} + +bool wsrep_node_name_update (sys_var *self, THD* thd, enum_var_type type) +{ + return 0; +} + +// TODO: do something more elaborate, like checking connectivity +bool wsrep_node_address_check (sys_var *self, THD* thd, set_var* var) +{ + char buff[FN_REFLEN]; + String str(buff, sizeof(buff), system_charset_info), *res; + const char* node_address_str = NULL; + + if (!(res = var->value->val_str(&str))) goto err; + + node_address_str = res->c_ptr(); + + if (!node_address_str || strlen(node_address_str) == 0) goto err; + + return 0; + + err: + + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->name.str, + node_address_str ? node_address_str : "NULL"); + return 1; +} + +bool wsrep_node_address_update (sys_var *self, THD* thd, enum_var_type type) +{ + return 0; +} + +void wsrep_node_address_init (const char* value) +{ + if (wsrep_node_address && strcmp(wsrep_node_address, value)) + my_free ((void*)wsrep_node_address); + + wsrep_node_address = (value) ? my_strdup(value, MYF(0)) : NULL; +} + +bool wsrep_slave_threads_check (sys_var *self, THD* thd, set_var* var) +{ + mysql_mutex_lock(&LOCK_wsrep_slave_threads); + wsrep_slave_count_change = var->value->val_int() - wsrep_slave_threads; + mysql_mutex_unlock(&LOCK_wsrep_slave_threads); + + return 0; +} + +bool wsrep_slave_threads_update (sys_var *self, THD* thd, enum_var_type type) +{ + if (wsrep_slave_count_change > 0) + { + wsrep_create_appliers(wsrep_slave_count_change); + wsrep_slave_count_change = 0; + } + return false; +} + +bool wsrep_desync_check (sys_var *self, THD* thd, set_var* var) +{ + bool new_wsrep_desync = var->value->val_bool(); + if (wsrep_desync == new_wsrep_desync) { + if (new_wsrep_desync) { + push_warning (thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_WRONG_VALUE_FOR_VAR, + "'wsrep_desync' is already ON."); + } else { + push_warning (thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_WRONG_VALUE_FOR_VAR, + "'wsrep_desync' is already OFF."); + } + } + return 0; +} + +bool wsrep_desync_update (sys_var *self, THD* thd, enum_var_type type) +{ + wsrep_status_t ret(WSREP_WARNING); + if (wsrep_desync) { + ret = wsrep->desync (wsrep); + if (ret != WSREP_OK) { + WSREP_WARN ("SET desync failed %d for %s", ret, thd->query()); + my_error (ER_CANNOT_USER, MYF(0), "'desync'", thd->query()); + return true; + } + } else { + ret = wsrep->resync (wsrep); + if (ret != WSREP_OK) { + WSREP_WARN ("SET resync failed %d for %s", ret, thd->query()); + my_error (ER_CANNOT_USER, MYF(0), "'resync'", thd->query()); + return true; + } + } + return false; +} + +/* + * Status variables stuff below + */ +static inline void +wsrep_assign_to_mysql (SHOW_VAR* mysql, wsrep_stats_var* wsrep) +{ + mysql->name = wsrep->name; + switch (wsrep->type) { + case WSREP_VAR_INT64: + mysql->value = (char*) &wsrep->value._int64; + mysql->type = SHOW_LONGLONG; + break; + case WSREP_VAR_STRING: + mysql->value = (char*) &wsrep->value._string; + mysql->type = SHOW_CHAR_PTR; + break; + case WSREP_VAR_DOUBLE: + mysql->value = (char*) &wsrep->value._double; + mysql->type = SHOW_DOUBLE; + break; + } +} + +#if DYNAMIC +// somehow this mysql status thing works only with statically allocated arrays. +static SHOW_VAR* mysql_status_vars = NULL; +static int mysql_status_len = -1; +#else +static SHOW_VAR mysql_status_vars[512 + 1]; +static const int mysql_status_len = 512; +#endif + +static void export_wsrep_status_to_mysql(THD* thd) +{ + int wsrep_status_len, i; + + thd->wsrep_status_vars = wsrep->stats_get(wsrep); + + if (!thd->wsrep_status_vars) { + return; + } + + for (wsrep_status_len = 0; + thd->wsrep_status_vars[wsrep_status_len].name != NULL; + wsrep_status_len++); + +#if DYNAMIC + if (wsrep_status_len != mysql_status_len) { + void* tmp = realloc (mysql_status_vars, + (wsrep_status_len + 1) * sizeof(SHOW_VAR)); + if (!tmp) { + + sql_print_error ("Out of memory for wsrep status variables." + "Number of variables: %d", wsrep_status_len); + return; + } + + mysql_status_len = wsrep_status_len; + mysql_status_vars = (SHOW_VAR*)tmp; + } + /* @TODO: fix this: */ +#else + if (mysql_status_len < wsrep_status_len) wsrep_status_len= mysql_status_len; +#endif + + for (i = 0; i < wsrep_status_len; i++) + wsrep_assign_to_mysql (mysql_status_vars + i, thd->wsrep_status_vars + i); + + mysql_status_vars[wsrep_status_len].name = NullS; + mysql_status_vars[wsrep_status_len].value = NullS; + mysql_status_vars[wsrep_status_len].type = SHOW_LONG; +} + +int wsrep_show_status (THD *thd, SHOW_VAR *var, char *buff) +{ + export_wsrep_status_to_mysql(thd); + var->type= SHOW_ARRAY; + var->value= (char *) &mysql_status_vars; + return 0; +} + +void wsrep_free_status (THD* thd) +{ + if (thd->wsrep_status_vars) + { + wsrep->stats_free (wsrep, thd->wsrep_status_vars); + thd->wsrep_status_vars = 0; + } +} diff --git a/sql/wsrep_var.h b/sql/wsrep_var.h new file mode 100644 index 000000000000..d84598767e83 --- /dev/null +++ b/sql/wsrep_var.h @@ -0,0 +1,84 @@ +/* Copyright (C) 2013 Codership Oy + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ + +#ifndef WSREP_VAR_H +#define WSREP_VAR_H + +#define WSREP_NODE_INCOMING_AUTO "AUTO" + +// MySQL variables funcs + +#include "sql_priv.h" +class sys_var; +class set_var; +class THD; + +int wsrep_init_vars(); + +#define CHECK_ARGS (sys_var *self, THD* thd, set_var *var) +#define UPDATE_ARGS (sys_var *self, THD* thd, enum_var_type type) +#define DEFAULT_ARGS (THD* thd, enum_var_type var_type) +#define INIT_ARGS (const char* opt) + +extern bool wsrep_on_update UPDATE_ARGS; +extern bool wsrep_causal_reads_update UPDATE_ARGS; +extern bool wsrep_sync_wait_update UPDATE_ARGS; +extern bool wsrep_start_position_check CHECK_ARGS; +extern bool wsrep_start_position_update UPDATE_ARGS; +extern void wsrep_start_position_init INIT_ARGS; + +extern bool wsrep_provider_check CHECK_ARGS; +extern bool wsrep_provider_update UPDATE_ARGS; +extern void wsrep_provider_init INIT_ARGS; + +extern bool wsrep_provider_options_check CHECK_ARGS; +extern bool wsrep_provider_options_update UPDATE_ARGS; +extern void wsrep_provider_options_init INIT_ARGS; + +extern bool wsrep_cluster_address_check CHECK_ARGS; +extern bool wsrep_cluster_address_update UPDATE_ARGS; +extern void wsrep_cluster_address_init INIT_ARGS; + +extern bool wsrep_cluster_name_check CHECK_ARGS; +extern bool wsrep_cluster_name_update UPDATE_ARGS; + +extern bool wsrep_node_name_check CHECK_ARGS; +extern bool wsrep_node_name_update UPDATE_ARGS; + +extern bool wsrep_node_address_check CHECK_ARGS; +extern bool wsrep_node_address_update UPDATE_ARGS; +extern void wsrep_node_address_init INIT_ARGS; + +extern bool wsrep_sst_method_check CHECK_ARGS; +extern bool wsrep_sst_method_update UPDATE_ARGS; +extern void wsrep_sst_method_init INIT_ARGS; + +extern bool wsrep_sst_receive_address_check CHECK_ARGS; +extern bool wsrep_sst_receive_address_update UPDATE_ARGS; + +extern bool wsrep_sst_auth_check CHECK_ARGS; +extern bool wsrep_sst_auth_update UPDATE_ARGS; +extern void wsrep_sst_auth_init INIT_ARGS; + +extern bool wsrep_sst_donor_check CHECK_ARGS; +extern bool wsrep_sst_donor_update UPDATE_ARGS; + +extern bool wsrep_slave_threads_check CHECK_ARGS; +extern bool wsrep_slave_threads_update UPDATE_ARGS; + +extern bool wsrep_desync_check CHECK_ARGS; +extern bool wsrep_desync_update UPDATE_ARGS; + +#endif /* WSREP_VAR_H */ diff --git a/support-files/wsrep.cnf.sh b/support-files/wsrep.cnf.sh new file mode 100644 index 000000000000..756d4f6783bc --- /dev/null +++ b/support-files/wsrep.cnf.sh @@ -0,0 +1,129 @@ +# This file contains wsrep-related mysqld options. It should be included +# in the main MySQL configuration file. +# +# Options that need to be customized: +# - wsrep_provider +# - wsrep_cluster_address +# - wsrep_sst_auth +# The rest of defaults should work out of the box. + +## +## mysqld options _MANDATORY_ for correct opration of the cluster +## +[mysqld] + +# (This must be substituted by wsrep_format) +binlog_format=ROW + +# Currently only InnoDB storage engine is supported +default-storage-engine=innodb + +# to avoid issues with 'bulk mode inserts' using autoinc +innodb_autoinc_lock_mode=2 + +# This is a must for paralell applying +innodb_locks_unsafe_for_binlog=1 + +# Query Cache is not supported with wsrep +query_cache_size=0 +query_cache_type=0 + +# Override bind-address +# In some systems bind-address defaults to 127.0.0.1, and with mysqldump SST +# it will have (most likely) disastrous consequences on donor node +bind-address=0.0.0.0 + +## +## WSREP options +## + +# Full path to wsrep provider library or 'none' +wsrep_provider=none + +# Provider specific configuration options +#wsrep_provider_options= + +# Logical cluster name. Should be the same for all nodes. +wsrep_cluster_name="my_wsrep_cluster" + +# Group communication system handle +#wsrep_cluster_address="dummy://" + +# Human-readable node name (non-unique). Hostname by default. +#wsrep_node_name= + +# Base replication [:port] of the node. +# The values supplied will be used as defaults for state transfer receiving, +# listening ports and so on. Default: address of the first network interface. +#wsrep_node_address= + +# Address for incoming client connections. Autodetect by default. +#wsrep_node_incoming_address= + +# How many threads will process writesets from other nodes +wsrep_slave_threads=1 + +# DBUG options for wsrep provider +#wsrep_dbug_option + +# Generate fake primary keys for non-PK tables (required for multi-master +# and parallel applying operation) +wsrep_certify_nonPK=1 + +# Maximum number of rows in write set +wsrep_max_ws_rows=131072 + +# Maximum size of write set +wsrep_max_ws_size=1073741824 + +# to enable debug level logging, set this to 1 +wsrep_debug=0 + +# convert locking sessions into transactions +wsrep_convert_LOCK_to_trx=0 + +# how many times to retry deadlocked autocommits +wsrep_retry_autocommit=1 + +# change auto_increment_increment and auto_increment_offset automatically +wsrep_auto_increment_control=1 + +# retry autoinc insert, which failed for duplicate key error +wsrep_drupal_282555_workaround=0 + +# enable "strictly synchronous" semantics for read operations +wsrep_causal_reads=0 + +# Command to call when node status or cluster membership changes. +# Will be passed all or some of the following options: +# --status - new status of this node +# --uuid - UUID of the cluster +# --primary - whether the component is primary or not ("yes"/"no") +# --members - comma-separated list of members +# --index - index of this node in the list +wsrep_notify_cmd= + +## +## WSREP State Transfer options +## + +# State Snapshot Transfer method +wsrep_sst_method=rsync + +# Address which donor should send State Snapshot to. +# Should be the address of THIS node. DON'T SET IT TO DONOR ADDRESS!!! +# (SST method dependent. Defaults to the first IP of the first interface) +#wsrep_sst_receive_address= + +# SST authentication string. This will be used to send SST to joining nodes. +# Depends on SST method. For mysqldump method it is root: +wsrep_sst_auth=root: + +# Desired SST donor name. +#wsrep_sst_donor= + +# Reject client queries when donating SST (false) +#wsrep_sst_donor_rejects_queries=0 + +# Protocol version to use +# wsrep_protocol_version= diff --git a/support-files/wsrep_notify.sh b/support-files/wsrep_notify.sh new file mode 100644 index 000000000000..bdbe3d12a39f --- /dev/null +++ b/support-files/wsrep_notify.sh @@ -0,0 +1,102 @@ +#!/bin/sh -eu + +# This is a simple example of wsrep notification script (wsrep_notify_cmd). +# It will create 'wsrep' schema and two tables in it: 'membeship' and 'status' +# and fill them on every membership or node status change. +# +# Edit parameters below to specify the address and login to server. + +USER=root +PSWD=rootpass +HOST=127.0.0.1 +PORT=3306 + +SCHEMA="wsrep" +MEMB_TABLE="$SCHEMA.membership" +STATUS_TABLE="$SCHEMA.status" + +BEGIN=" +SET wsrep_on=0; +DROP SCHEMA IF EXISTS $SCHEMA; CREATE SCHEMA $SCHEMA; +CREATE TABLE $MEMB_TABLE ( + idx INT UNIQUE PRIMARY KEY, + uuid CHAR(40) UNIQUE, /* node UUID */ + name VARCHAR(32), /* node name */ + addr VARCHAR(256) /* node address */ +) ENGINE=MEMORY; +CREATE TABLE $STATUS_TABLE ( + size INT, /* component size */ + idx INT, /* this node index */ + status CHAR(16), /* this node status */ + uuid CHAR(40), /* cluster UUID */ + prim BOOLEAN /* if component is primary */ +) ENGINE=MEMORY; +BEGIN; +DELETE FROM $MEMB_TABLE; +DELETE FROM $STATUS_TABLE; +" +END="COMMIT;" + +configuration_change() +{ + echo "$BEGIN;" + + local idx=0 + + for NODE in $(echo $MEMBERS | sed s/,/\ /g) + do + echo "INSERT INTO $MEMB_TABLE VALUES ( $idx, " + # Don't forget to properly quote string values + echo "'$NODE'" | sed s/\\//\',\'/g + echo ");" + idx=$(( $idx + 1 )) + done + + echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);" + + echo "$END" +} + +status_update() +{ + echo "SET wsrep_on=0; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; COMMIT;" +} + +COM=status_update # not a configuration change by default + +while [ $# -gt 0 ] +do + case $1 in + --status) + STATUS=$2 + shift + ;; + --uuid) + CLUSTER_UUID=$2 + shift + ;; + --primary) + [ "$2" = "yes" ] && PRIMARY="1" || PRIMARY="0" + COM=configuration_change + shift + ;; + --index) + INDEX=$2 + shift + ;; + --members) + MEMBERS=$2 + shift + ;; + esac + shift +done + +# Undefined means node is shutting down +if [ "$STATUS" != "Undefined" ] +then + $COM | mysql -B -u$USER -p$PSWD -h$HOST -P$PORT +fi + +exit 0 +# diff --git a/wsrep/CMakeLists.txt b/wsrep/CMakeLists.txt new file mode 100644 index 000000000000..182e4586ddc1 --- /dev/null +++ b/wsrep/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) 2012, Codership Oy. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +INCLUDE_DIRECTORIES( "." ) + +SET(WSREP_SOURCES wsrep_gtid.c wsrep_uuid.c wsrep_loader.c wsrep_dummy.c) + +ADD_CONVENIENCE_LIBRARY(wsrep ${WSREP_SOURCES}) +DTRACE_INSTRUMENT(wsrep) + +#ADD_EXECUTABLE(listener wsrep_listener.c ${WSREP_SOURCES}) +#TARGET_LINK_LIBRARIES(listener ${LIBDL}) diff --git a/wsrep/Makefile.am b/wsrep/Makefile.am new file mode 100644 index 000000000000..a748ece92e98 --- /dev/null +++ b/wsrep/Makefile.am @@ -0,0 +1,7 @@ +noinst_LIBRARIES = libwsrep.a +libwsrep_a_SOURCES = wsrep_api.h wsrep_loader.c wsrep_dummy.c wsrep_uuid.c wsrep_gtid.c +noinst_PROGRAMS = wsrep_listener +wsrep_listener_SOURCES = wsrep_listener.c +wsrep_listener_LDADD = $(noinst_LIBRARIES) +wsrep_listener_LDFLAGS = -static -ldl + diff --git a/wsrep/cmake_install.cmake b/wsrep/cmake_install.cmake new file mode 100644 index 000000000000..4268379fa152 --- /dev/null +++ b/wsrep/cmake_install.cmake @@ -0,0 +1,34 @@ +# Install script for directory: /home/seppo/work/wsrep/mysql-wsrep/wsrep + +# Set the install prefix +IF(NOT DEFINED CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX "/usr/local/mysql") +ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) +STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + IF(BUILD_TYPE) + STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + ELSE(BUILD_TYPE) + SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") + ENDIF(BUILD_TYPE) + MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + +# Set the component getting installed. +IF(NOT CMAKE_INSTALL_COMPONENT) + IF(COMPONENT) + MESSAGE(STATUS "Install component: \"${COMPONENT}\"") + SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + ELSE(COMPONENT) + SET(CMAKE_INSTALL_COMPONENT) + ENDIF(COMPONENT) +ENDIF(NOT CMAKE_INSTALL_COMPONENT) + +# Install shared libraries without execute permission? +IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + SET(CMAKE_INSTALL_SO_NO_EXE "1") +ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + diff --git a/wsrep/wsrep_api.h b/wsrep/wsrep_api.h new file mode 100644 index 000000000000..c3304d7ed7c0 --- /dev/null +++ b/wsrep/wsrep_api.h @@ -0,0 +1,1118 @@ +/* Copyright (C) 2009-2013 Codership Oy + + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/*! + @file wsrep API declaration. + + HOW TO READ THIS FILE. + + Due to C language rules this header layout doesn't lend itself to intuitive + reading. So here's the scoop: in the end this header declares two main types: + + * struct wsrep_init_args + + and + + * struct wsrep + + wsrep_init_args contains initialization parameters for wsrep provider like + names, addresses, etc. and pointers to callbacks. The callbacks will be called + by provider when it needs to do something application-specific, like log a + message or apply a writeset. It should be passed to init() call from + wsrep API. It is an application part of wsrep API contract. + + struct wsrep is the interface to wsrep provider. It contains all wsrep API + calls. It is a provider part of wsrep API contract. + + Finally, wsrep_load() method loads (dlopens) wsrep provider library. It is + defined in wsrep_loader.c unit and is part of libwsrep.a (which is not a + wsrep provider, but a convenience library). + + wsrep_unload() does the reverse. + +*/ +#ifndef WSREP_H +#define WSREP_H + +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/************************************************************************** + * * + * wsrep replication API * + * * + **************************************************************************/ + +#define WSREP_INTERFACE_VERSION "25" + +/*! Empty backend spec */ +#define WSREP_NONE "none" + + +/*! + * @brief log severity levels, passed as first argument to log handler + */ +typedef enum wsrep_log_level +{ + WSREP_LOG_FATAL, //!< Unrecoverable error, application must quit. + WSREP_LOG_ERROR, //!< Operation failed, must be repeated. + WSREP_LOG_WARN, //!< Unexpected condition, but no operational failure. + WSREP_LOG_INFO, //!< Informational message. + WSREP_LOG_DEBUG //!< Debug message. Shows only of compiled with debug. +} wsrep_log_level_t; + +/*! + * @brief error log handler + * + * All messages from wsrep provider are directed to this + * handler, if present. + * + * @param level log level + * @param message log message + */ +typedef void (*wsrep_log_cb_t)(wsrep_log_level_t, const char *); + + +/*! + * Certain provider capabilities application may want to know about + */ +#define WSREP_CAP_MULTI_MASTER ( 1ULL << 0 ) +#define WSREP_CAP_CERTIFICATION ( 1ULL << 1 ) +#define WSREP_CAP_PARALLEL_APPLYING ( 1ULL << 2 ) +#define WSREP_CAP_TRX_REPLAY ( 1ULL << 3 ) +#define WSREP_CAP_ISOLATION ( 1ULL << 4 ) +#define WSREP_CAP_PAUSE ( 1ULL << 5 ) +#define WSREP_CAP_CAUSAL_READS ( 1ULL << 6 ) +#define WSREP_CAP_CAUSAL_TRX ( 1ULL << 7 ) +#define WSREP_CAP_INCREMENTAL_WRITESET ( 1ULL << 8 ) +#define WSREP_CAP_SESSION_LOCKS ( 1ULL << 9 ) +#define WSREP_CAP_DISTRIBUTED_LOCKS ( 1ULL << 10 ) +#define WSREP_CAP_CONSISTENCY_CHECK ( 1ULL << 11 ) +#define WSREP_CAP_UNORDERED ( 1ULL << 12 ) +#define WSREP_CAP_ANNOTATION ( 1ULL << 13 ) +#define WSREP_CAP_PREORDERED ( 1ULL << 14 ) + + +/*! + * Writeset flags + * + * COMMIT the writeset and all preceding writesets must be committed + * ROLLBACK all preceding writesets in a transaction must be rolled back + * ISOLATION the writeset must be applied AND committed in isolation + * PA_UNSAFE the writeset cannot be applied in parallel + * COMMUTATIVE the order in which the writeset is applied does not matter + * NATIVE the writeset contains another writeset in this provider format + * + * Note that some of the flags are mutually exclusive (e.g. COMMIT and + * ROLLBACK). + */ +#define WSREP_FLAG_COMMIT ( 1ULL << 0 ) +#define WSREP_FLAG_ROLLBACK ( 1ULL << 1 ) +#define WSREP_FLAG_ISOLATION ( 1ULL << 2 ) +#define WSREP_FLAG_PA_UNSAFE ( 1ULL << 3 ) +#define WSREP_FLAG_COMMUTATIVE ( 1ULL << 4 ) +#define WSREP_FLAG_NATIVE ( 1ULL << 5 ) + + +typedef uint64_t wsrep_trx_id_t; //!< application transaction ID +typedef uint64_t wsrep_conn_id_t; //!< application connection ID +typedef int64_t wsrep_seqno_t; //!< sequence number of a writeset, etc. +#ifdef __cplusplus +typedef bool wsrep_bool_t; +#else +typedef _Bool wsrep_bool_t; //!< should be the same as standard (C99) bool +#endif /* __cplusplus */ + +/*! undefined seqno */ +#define WSREP_SEQNO_UNDEFINED (-1) + + +/*! wsrep provider status codes */ +typedef enum wsrep_status +{ + WSREP_OK = 0, //!< success + WSREP_WARNING, //!< minor warning, error logged + WSREP_TRX_MISSING, //!< transaction is not known by wsrep + WSREP_TRX_FAIL, //!< transaction aborted, server can continue + WSREP_BF_ABORT, //!< trx was victim of brute force abort + WSREP_SIZE_EXCEEDED, //!< data exceeded maximum supported size + WSREP_CONN_FAIL, //!< error in client connection, must abort + WSREP_NODE_FAIL, //!< error in node state, wsrep must reinit + WSREP_FATAL, //!< fatal error, server must abort + WSREP_NOT_IMPLEMENTED //!< feature not implemented +} wsrep_status_t; + + +/*! wsrep callbacks status codes */ +typedef enum wsrep_cb_status +{ + WSREP_CB_SUCCESS = 0, //!< success (as in "not critical failure") + WSREP_CB_FAILURE //!< critical failure (consistency violation) + /* Technically, wsrep provider has no use for specific failure codes since + * there is nothing it can do about it but abort execution. Therefore any + * positive number shall indicate a critical failure. Optionally that value + * may be used by provider to come to a consensus about state consistency + * in a group of nodes. */ +} wsrep_cb_status_t; + + +/*! + * UUID type - for all unique IDs + */ +typedef struct wsrep_uuid { + uint8_t data[16]; +} wsrep_uuid_t; + +/*! Undefined UUID */ +static const wsrep_uuid_t WSREP_UUID_UNDEFINED = {{0,}}; + +/*! UUID string representation length, terminating '\0' not included */ +#define WSREP_UUID_STR_LEN 36 + +/*! + * Scan UUID from string + * @return length of UUID string representation or negative error code + */ +extern int +wsrep_uuid_scan (const char* str, size_t str_len, wsrep_uuid_t* uuid); + +/*! + * Print UUID to string + * @return length of UUID string representation or negative error code + */ +extern int +wsrep_uuid_print (const wsrep_uuid_t* uuid, char* str, size_t str_len); + +#define WSREP_MEMBER_NAME_LEN 32 //!< maximum logical member name length +#define WSREP_INCOMING_LEN 256 //!< max Domain Name length + 0x00 + + +/*! + * Global transaction identifier + */ +typedef struct wsrep_gtid +{ + wsrep_uuid_t uuid; /*!< History UUID */ + wsrep_seqno_t seqno; /*!< Sequence number */ +} wsrep_gtid_t; + +/*! Undefined GTID */ +static const wsrep_gtid_t WSREP_GTID_UNDEFINED = {{{0, }}, -1}; + +/*! Minimum number of bytes guaranteed to store GTID string representation, + * terminating '\0' not included (36 + 1 + 20) */ +#define WSREP_GTID_STR_LEN 57 + + +/*! + * Scan GTID from string + * @return length of GTID string representation or negative error code + */ +extern int +wsrep_gtid_scan(const char* str, size_t str_len, wsrep_gtid_t* gtid); + +/*! + * Print GTID to string + * @return length of GTID string representation or negative error code + */ +extern int +wsrep_gtid_print(const wsrep_gtid_t* gtid, char* str, size_t str_len); + + +/*! + * Transaction meta data + */ +typedef struct wsrep_trx_meta +{ + wsrep_gtid_t gtid; /*!< Global transaction identifier */ + wsrep_seqno_t depends_on; /*!< Sequence number part of the last transaction + this transaction depends on */ +} wsrep_trx_meta_t; + + +/*! + * member status + */ +typedef enum wsrep_member_status { + WSREP_MEMBER_UNDEFINED, //!< undefined state + WSREP_MEMBER_JOINER, //!< incomplete state, requested state transfer + WSREP_MEMBER_DONOR, //!< complete state, donates state transfer + WSREP_MEMBER_JOINED, //!< complete state + WSREP_MEMBER_SYNCED, //!< complete state, synchronized with group + WSREP_MEMBER_ERROR, //!< this and above is provider-specific error code + WSREP_MEMBER_MAX +} wsrep_member_status_t; + +/*! + * static information about a group member (some fields are tentative yet) + */ +typedef struct wsrep_member_info { + wsrep_uuid_t id; //!< group-wide unique member ID + char name[WSREP_MEMBER_NAME_LEN]; //!< human-readable name + char incoming[WSREP_INCOMING_LEN]; //!< address for client requests +} wsrep_member_info_t; + +/*! + * group status + */ +typedef enum wsrep_view_status { + WSREP_VIEW_PRIMARY, //!< primary group configuration (quorum present) + WSREP_VIEW_NON_PRIMARY, //!< non-primary group configuration (quorum lost) + WSREP_VIEW_DISCONNECTED, //!< not connected to group, retrying. + WSREP_VIEW_MAX +} wsrep_view_status_t; + +/*! + * view of the group + */ +typedef struct wsrep_view_info { + wsrep_gtid_t state_id; //!< global state ID + wsrep_seqno_t view; //!< global view number + wsrep_view_status_t status; //!< view status + wsrep_bool_t state_gap; //!< gap between global and local states + int my_idx; //!< index of this member in the view + int memb_num; //!< number of members in the view + int proto_ver; //!< application protocol agreed on the view + wsrep_member_info_t members[1];//!< array of member information +} wsrep_view_info_t; + +/*! + * Magic string to tell provider to engage into trivial (empty) state transfer. + * No data will be passed, but the node shall be considered JOINED. + * Should be passed in sst_req parameter of wsrep_view_cb_t. + */ +#define WSREP_STATE_TRANSFER_TRIVIAL "trivial" + +/*! + * Magic string to tell provider not to engage in state transfer at all. + * The member will stay in WSREP_MEMBER_UNDEFINED state but will keep on + * receiving all writesets. + * Should be passed in sst_req parameter of wsrep_view_cb_t. + */ +#define WSREP_STATE_TRANSFER_NONE "none" + +/*! + * @brief group view handler + * + * This handler is called in total order corresponding to the group + * configuration change. It is to provide a vital information about + * new group view. If view info indicates existence of discontinuity + * between group and member states, state transfer request message + * should be filled in by the callback implementation. + * + * @note Currently it is assumed that sst_req is allocated using + * malloc()/calloc()/realloc() and it will be freed by + * wsrep implementation. + * + * @param app_ctx application context + * @param recv_ctx receiver context + * @param view new view on the group + * @param state current state + * @param state_len lenght of current state + * @param sst_req location to store SST request + * @param sst_req_len location to store SST request length or error code, + * value of 0 means no SST. + */ +typedef enum wsrep_cb_status (*wsrep_view_cb_t) ( + void* app_ctx, + void* recv_ctx, + const wsrep_view_info_t* view, + const char* state, + size_t state_len, + void** sst_req, + size_t* sst_req_len +); + + +/*! + * @brief apply callback + * + * This handler is called from wsrep library to apply replicated writeset + * Must support brute force applying for multi-master operation + * + * @param recv_ctx receiver context pointer provided by the application + * @param data data buffer containing the writeset + * @param size data buffer size + * @param flags WSREP_FLAG_... flags + * @param meta transaction meta data of the writeset to be applied + * + * @return success code: + * @retval WSREP_OK + * @retval WSREP_NOT_IMPLEMENTED appl. does not support the writeset format + * @retval WSREP_ERROR failed to apply the writeset + */ +typedef enum wsrep_cb_status (*wsrep_apply_cb_t) ( + void* recv_ctx, + const void* data, + size_t size, + uint32_t flags, + const wsrep_trx_meta_t* meta +); + + +/*! + * @brief commit callback + * + * This handler is called to commit the changes made by apply callback. + * + * @param recv_ctx receiver context pointer provided by the application + * @param flags WSREP_FLAG_... flags + * @param meta transaction meta data of the writeset to be committed + * @param exit set to true to exit recv loop + * @param commit true - commit writeset, false - rollback writeset + * + * @return success code: + * @retval WSREP_OK + * @retval WSREP_ERROR call failed + */ +typedef enum wsrep_cb_status (*wsrep_commit_cb_t) ( + void* recv_ctx, + uint32_t flags, + const wsrep_trx_meta_t* meta, + wsrep_bool_t* exit, + wsrep_bool_t commit +); + + +/*! + * @brief unordered callback + * + * This handler is called to execute unordered actions (actions that need not + * to be executed in any particular order) attached to writeset. + * + * @param recv_ctx receiver context pointer provided by the application + * @param data data buffer containing the writeset + * @param size data buffer size + */ +typedef enum wsrep_cb_status (*wsrep_unordered_cb_t) ( + void* recv_ctx, + const void* data, + size_t size +); + + +/*! + * @brief a callback to donate state snapshot + * + * This handler is called from wsrep library when it needs this node + * to deliver state to a new cluster member. + * No state changes will be committed for the duration of this call. + * Wsrep implementation may provide internal state to be transmitted + * to new cluster member for initial state. + * + * @param app_ctx application context + * @param recv_ctx receiver context + * @param msg state transfer request message + * @param msg_len state transfer request message length + * @param gtid current state ID on this node + * @param state current wsrep internal state buffer + * @param state_len current wsrep internal state buffer len + * @param bypass bypass snapshot transfer, only transfer uuid:seqno pair + */ +typedef enum wsrep_cb_status (*wsrep_sst_donate_cb_t) ( + void* app_ctx, + void* recv_ctx, + const void* msg, + size_t msg_len, + const wsrep_gtid_t* state_id, + const char* state, + size_t state_len, + wsrep_bool_t bypass +); + + +/*! + * @brief a callback to signal application that wsrep state is synced + * with cluster + * + * This callback is called after wsrep library has got in sync with + * rest of the cluster. + * + * @param app_ctx application context + */ +typedef void (*wsrep_synced_cb_t) (void* app_ctx); + + +/*! + * Initialization parameters for wsrep provider. + */ +struct wsrep_init_args +{ + void* app_ctx; //!< Application context for callbacks + + /* Configuration parameters */ + const char* node_name; //!< Symbolic name of this node (e.g. hostname) + const char* node_address; //!< Address to be used by wsrep provider + const char* node_incoming; //!< Address for incoming client connections + const char* data_dir; //!< Directory where wsrep files are kept if any + const char* options; //!< Provider-specific configuration string + int proto_ver; //!< Max supported application protocol version + + /* Application initial state information. */ + const wsrep_gtid_t* state_id; //!< Application state GTID + const char* state; //!< Initial state for wsrep provider + size_t state_len; //!< Length of state buffer + + /* Application callbacks */ + wsrep_log_cb_t logger_cb; //!< logging handler + wsrep_view_cb_t view_handler_cb; //!< group view change handler + + /* Applier callbacks */ + wsrep_apply_cb_t apply_cb; //!< apply callback + wsrep_commit_cb_t commit_cb; //!< commit callback + wsrep_unordered_cb_t unordered_cb; //!< callback for unordered actions + + /* State Snapshot Transfer callbacks */ + wsrep_sst_donate_cb_t sst_donate_cb; //!< starting to donate + wsrep_synced_cb_t synced_cb; //!< synced with group +}; + + +/*! Type of the stats variable value in struct wsrep_status_var */ +typedef enum wsrep_var_type +{ + WSREP_VAR_STRING, //!< pointer to null-terminated string + WSREP_VAR_INT64, //!< int64_t + WSREP_VAR_DOUBLE //!< double +} +wsrep_var_type_t; + +/*! Generalized stats variable representation */ +struct wsrep_stats_var +{ + const char* name; //!< variable name + wsrep_var_type_t type; //!< variable value type + union { + int64_t _int64; + double _double; + const char* _string; + } value; //!< variable value +}; + + +/*! Abstract data buffer structure */ +typedef struct wsrep_buf +{ + const void* ptr; /*!< Pointer to data buffer */ + size_t len; /*!< Length of buffer */ +} wsrep_buf_t; + +/*! Key struct used to pass certification keys for transaction handling calls. + * A key consists of zero or more key parts. */ +typedef struct wsrep_key +{ + const wsrep_buf_t* key_parts; /*!< Array of key parts */ + size_t key_parts_num; /*!< Number of key parts */ +} wsrep_key_t; + +/*! Key type: + * EXCLUSIVE conflicts with any key type + * SEMI reserved. If not supported, should be interpeted as EXCLUSIVE + * SHARED conflicts only with EXCLUSIVE keys */ +typedef enum wsrep_key_type +{ + WSREP_KEY_SHARED = 0, + WSREP_KEY_SEMI, + WSREP_KEY_EXCLUSIVE +} wsrep_key_type_t; + +/*! Data type: + * ORDERED state modification event that should be applied and committed + * in order. + * UNORDERED some action that does not modify state and execution of which is + * optional and does not need to happen in order. + * ANNOTATION (human readable) writeset annotation. */ +typedef enum wsrep_data_type +{ + WSREP_DATA_ORDERED = 0, + WSREP_DATA_UNORDERED, + WSREP_DATA_ANNOTATION +} wsrep_data_type_t; + + +/*! Transaction handle struct passed for wsrep transaction handling calls */ +typedef struct wsrep_ws_handle +{ + wsrep_trx_id_t trx_id; //!< transaction ID + void* opaque; //!< opaque provider transaction context data +} wsrep_ws_handle_t; + +/*! + * @brief Helper method to reset trx writeset handle state when trx id changes + * + * Instead of passing wsrep_ws_handle_t directly to wsrep calls, + * wrapping handle with this call offloads bookkeeping from + * application. + */ +static inline wsrep_ws_handle_t* wsrep_ws_handle_for_trx( + wsrep_ws_handle_t* ws_handle, + wsrep_trx_id_t trx_id) +{ + if (ws_handle->trx_id != trx_id) + { + ws_handle->trx_id = trx_id; + ws_handle->opaque = NULL; + } + return ws_handle; +} + + +/*! + * A handle for processing preordered actions. + * Must be initialized to WSREP_PO_INITIALIZER before use. + */ +typedef struct wsrep_po_handle { void* opaque; } wsrep_po_handle_t; + +static const wsrep_po_handle_t WSREP_PO_INITIALIZER = { NULL }; + + +typedef struct wsrep wsrep_t; +/*! + * wsrep interface for dynamically loadable libraries + */ +struct wsrep { + + const char *version; //!< interface version string + + /*! + * @brief Initializes wsrep provider + * + * @param wsrep provider handle + * @param args wsrep initialization parameters + */ + wsrep_status_t (*init) (wsrep_t* wsrep, + const struct wsrep_init_args* args); + + /*! + * @brief Returns provider capabilities flag bitmap + * + * @param wsrep provider handle + */ + uint64_t (*capabilities) (wsrep_t* wsrep); + + /*! + * @brief Passes provider-specific configuration string to provider. + * + * @param wsrep provider handle + * @param conf configuration string + * + * @retval WSREP_OK configuration string was parsed successfully + * @retval WSREP_WARNING could't not parse conf string, no action taken + */ + wsrep_status_t (*options_set) (wsrep_t* wsrep, const char* conf); + + /*! + * @brief Returns provider-specific string with current configuration values. + * + * @param wsrep provider handle + * + * @return a dynamically allocated string with current configuration + * parameter values + */ + char* (*options_get) (wsrep_t* wsrep); + + /*! + * @brief Opens connection to cluster + * + * Returns when either node is ready to operate as a part of the clsuter + * or fails to reach operating status. + * + * @param wsrep provider handle + * @param cluster_name unique symbolic cluster name + * @param cluster_url URL-like cluster address (backend://address) + * @param state_donor name of the node to be asked for state transfer. + * @param bootstrap a flag to request initialization of a new wsrep + * service rather then a connection to the existing one. + * clister_url may still carry important initialization + * parameters, like backend spec and/or listen address. + */ + wsrep_status_t (*connect) (wsrep_t* wsrep, + const char* cluster_name, + const char* cluster_url, + const char* state_donor, + wsrep_bool_t bootstrap); + + /*! + * @brief Closes connection to cluster. + * + * If state_uuid and/or state_seqno is not NULL, will store final state + * in there. + * + * @param wsrep this wsrep handler + */ + wsrep_status_t (*disconnect)(wsrep_t* wsrep); + + /*! + * @brief start receiving replication events + * + * This function never returns + * + * @param wsrep provider handle + * @param recv_ctx receiver context + */ + wsrep_status_t (*recv)(wsrep_t* wsrep, void* recv_ctx); + + /*! + * @brief Replicates/logs result of transaction to other nodes and allocates + * required resources. + * + * Must be called before transaction commit. Returns success code, which + * caller must check. + * In case of WSREP_OK, starts commit critical section, transaction can + * commit. Otherwise transaction must rollback. + * + * @param wsrep provider handle + * @param ws_handle writeset of committing transaction + * @param conn_id connection ID + * @param flags fine tuning the replication WSREP_FLAG_* + * @param meta transaction meta data + * + * @retval WSREP_OK cluster-wide commit succeeded + * @retval WSREP_TRX_FAIL must rollback transaction + * @retval WSREP_CONN_FAIL must close client connection + * @retval WSREP_NODE_FAIL must close all connections and reinit + */ + wsrep_status_t (*pre_commit)(wsrep_t* wsrep, + wsrep_conn_id_t conn_id, + wsrep_ws_handle_t* ws_handle, + uint32_t flags, + wsrep_trx_meta_t* meta); + + /*! + * @brief Releases resources after transaction commit. + * + * Ends commit critical section. + * + * @param wsrep provider handle + * @param ws_handle writeset of committing transaction + * @retval WSREP_OK post_commit succeeded + */ + wsrep_status_t (*post_commit) (wsrep_t* wsrep, + wsrep_ws_handle_t* ws_handle); + + /*! + * @brief Releases resources after transaction rollback. + * + * @param wsrep provider handle + * @param ws_handle writeset of committing transaction + * @retval WSREP_OK post_rollback succeeded + */ + wsrep_status_t (*post_rollback)(wsrep_t* wsrep, + wsrep_ws_handle_t* ws_handle); + + /*! + * @brief Replay trx as a slave writeset + * + * If local trx has been aborted by brute force, and it has already + * replicated before this abort, we must try if we can apply it as + * slave trx. Note that slave nodes see only trx writesets and certification + * test based on write set content can be different to DBMS lock conflicts. + * + * @param wsrep provider handle + * @param ws_handle writeset of committing transaction + * @param trx_ctx transaction context + * + * @retval WSREP_OK cluster commit succeeded + * @retval WSREP_TRX_FAIL must rollback transaction + * @retval WSREP_BF_ABORT brute force abort happened after trx replicated + * must rollback transaction and try to replay + * @retval WSREP_CONN_FAIL must close client connection + * @retval WSREP_NODE_FAIL must close all connections and reinit + */ + wsrep_status_t (*replay_trx)(wsrep_t* wsrep, + wsrep_ws_handle_t* ws_handle, + void* trx_ctx); + + /*! + * @brief Abort pre_commit() call of another thread. + * + * It is possible, that some high-priority transaction needs to abort + * another transaction which is in pre_commit() call waiting for resources. + * + * The kill routine checks that abort is not attmpted against a transaction + * which is front of the caller (in total order). + * + * @param wsrep provider handle + * @param bf_seqno seqno of brute force trx, running this cancel + * @param victim_trx transaction to be aborted, and which is committing + * + * @retval WSREP_OK abort secceded + * @retval WSREP_WARNING abort failed + */ + wsrep_status_t (*abort_pre_commit)(wsrep_t* wsrep, + wsrep_seqno_t bf_seqno, + wsrep_trx_id_t victim_trx); + + /*! + * @brief Appends a row reference to transaction writeset + * + * Both copy flag and key_type can be ignored by provider (key type + * interpreted as WSREP_KEY_EXCLUSIVE). + * + * @param wsrep provider handle + * @param ws_handle writeset handle + * @param keys array of keys + * @param count length of the array of keys + * @param type type ot the key + * @param copy can be set to FALSE if keys persist through commit. + */ + wsrep_status_t (*append_key)(wsrep_t* wsrep, + wsrep_ws_handle_t* ws_handle, + const wsrep_key_t* keys, + size_t count, + enum wsrep_key_type type, + wsrep_bool_t copy); + + /*! + * @brief Appends data to transaction writeset + * + * This method can be called any time before commit and it + * appends a number of data buffers to transaction writeset. + * + * Both copy and unordered flags can be ignored by provider. + * + * @param wsrep provider handle + * @param ws_handle writeset handle + * @param data array of data buffers + * @param count buffer count + * @param type type of data + * @param copy can be set to FALSE if data persists through commit. + */ + wsrep_status_t (*append_data)(wsrep_t* wsrep, + wsrep_ws_handle_t* ws_handle, + const struct wsrep_buf* data, + size_t count, + enum wsrep_data_type type, + wsrep_bool_t copy); + + /*! + * @brief Get causal ordering for read operation + * + * This call will block until causal ordering with all possible + * preceding writes in the cluster is guaranteed. If pointer to + * gtid is non-null, the call stores the global transaction ID + * of the last transaction which is guaranteed to be ordered + * causally before this call. + * + * @param wsrep provider handle + * @param gtid location to store GTID + */ + wsrep_status_t (*causal_read)(wsrep_t* wsrep, wsrep_gtid_t* gtid); + + /*! + * @brief Clears allocated connection context. + * + * Whenever a new connection ID is passed to wsrep provider through + * any of the API calls, a connection context is allocated for this + * connection. This call is to explicitly notify provider fo connection + * closing. + * + * @param wsrep provider handle + * @param conn_id connection ID + * @param query the 'set database' query + * @param query_len length of query (does not end with 0) + */ + wsrep_status_t (*free_connection)(wsrep_t* wsrep, + wsrep_conn_id_t conn_id); + + /*! + * @brief Replicates a query and starts "total order isolation" section. + * + * Replicates the action spec and returns success code, which caller must + * check. Total order isolation continues until to_execute_end() is called. + * + * @param wsrep provider handle + * @param conn_id connection ID + * @param keys array of keys + * @param keys_num lenght of the array of keys + * @param action action buffer array to be executed + * @param count action buffer count + * @param meta transaction meta data + * + * @retval WSREP_OK cluster commit succeeded + * @retval WSREP_CONN_FAIL must close client connection + * @retval WSREP_NODE_FAIL must close all connections and reinit + */ + wsrep_status_t (*to_execute_start)(wsrep_t* wsrep, + wsrep_conn_id_t conn_id, + const wsrep_key_t* keys, + size_t keys_num, + const struct wsrep_buf* action, + size_t count, + wsrep_trx_meta_t* meta); + + /*! + * @brief Ends the total order isolation section. + * + * Marks the end of total order isolation. TO locks are freed + * and other transactions are free to commit from this point on. + * + * @param wsrep provider handle + * @param conn_id connection ID + * + * @retval WSREP_OK cluster commit succeeded + * @retval WSREP_CONN_FAIL must close client connection + * @retval WSREP_NODE_FAIL must close all connections and reinit + */ + wsrep_status_t (*to_execute_end)(wsrep_t* wsrep, wsrep_conn_id_t conn_id); + + /*! + * @brief Collects preordered replication events into a writeset. + * + * @param wsrep wsrep provider handle + * @param handle a handle associated with a given writeset + * @param data an array of data buffers. + * @param count length of data buffer array. + * @param copy whether provider needs to make a copy of events. + * + * @retval WSREP_OK cluster-wide commit succeeded + * @retval WSREP_TRX_FAIL operation failed (e.g. trx size exceeded limit) + * @retval WSREP_NODE_FAIL must close all connections and reinit + */ + wsrep_status_t (*preordered_collect) (wsrep_t* wsrep, + wsrep_po_handle_t* handle, + const struct wsrep_buf* data, + size_t count, + wsrep_bool_t copy); + + /*! + * @brief "Commits" preordered writeset to cluster. + * + * The contract is that the writeset will be committed in the same (partial) + * order this method was called. Frees resources associated with the writeset + * handle and reinitializes the handle. + * + * @param wsrep wsrep provider handle + * @param po_handle a handle associated with a given writeset + * @param source_id ID of the event producer, also serves as the partial order + * or stream ID - events with different source_ids won't be + * ordered with respect to each other. + * @param flags WSREP_FLAG_... flags + * @param pa_range the number of preceding events this event can be processed + * in parallel with. A value of 0 means strict serial + * processing. Note: commits always happen in wsrep order. + * @param commit 'true' to commit writeset to cluster (replicate) or + * 'false' to rollback (cancel) the writeset. + * + * @retval WSREP_OK cluster-wide commit succeeded + * @retval WSREP_TRX_FAIL operation failed (e.g. NON-PRIMARY component) + * @retval WSREP_NODE_FAIL must close all connections and reinit + */ + wsrep_status_t (*preordered_commit) (wsrep_t* wsrep, + wsrep_po_handle_t* handle, + const wsrep_uuid_t* source_id, + uint32_t flags, + int pa_range, + wsrep_bool_t commit); + + /*! + * @brief Signals to wsrep provider that state snapshot has been sent to + * joiner. + * + * @param wsrep provider handle + * @param state_id state ID + * @param rcode 0 or negative error code of the operation. + */ + wsrep_status_t (*sst_sent)(wsrep_t* wsrep, + const wsrep_gtid_t* state_id, + int rcode); + + /*! + * @brief Signals to wsrep provider that new state snapshot has been received. + * May deadlock if called from sst_prepare_cb. + * + * @param wsrep provider handle + * @param state_id state ID + * @param state initial state provided by SST donor + * @param state_len length of state buffer + * @param rcode 0 or negative error code of the operation. + */ + wsrep_status_t (*sst_received)(wsrep_t* wsrep, + const wsrep_gtid_t* state_id, + const void* state, + size_t state_len, + int rcode); + + + /*! + * @brief Generate request for consistent snapshot. + * + * If successfull, this call will generate internally SST request + * which in turn triggers calling SST donate callback on the nodes + * specified in donor_spec. If donor_spec is null, callback is + * called only locally. This call will block until sst_sent is called + * from callback. + * + * @param wsrep provider handle + * @param msg context message for SST donate callback + * @param msg_len length of context message + * @param donor_spec list of snapshot donors + */ + wsrep_status_t (*snapshot)(wsrep_t* wsrep, + const void* msg, + size_t msg_len, + const char* donor_spec); + + /*! + * @brief Returns an array fo status variables. + * Array is terminated by Null variable name. + * + * @param wsrep provider handle + * @return array of struct wsrep_status_var. + */ + struct wsrep_stats_var* (*stats_get) (wsrep_t* wsrep); + + /*! + * @brief Release resources that might be associated with the array. + * + * @param wsrep provider handle. + * @param var_array array returned by stats_get(). + */ + void (*stats_free) (wsrep_t* wsrep, struct wsrep_stats_var* var_array); + + /*! + * @brief Reset some stats variables to inital value, provider-dependent. + * + * @param wsrep provider handle. + */ + void (*stats_reset) (wsrep_t* wsrep); + + /*! + * @brief Pauses writeset applying/committing. + * + * @return global sequence number of the paused state or negative error code. + */ + wsrep_seqno_t (*pause) (wsrep_t* wsrep); + + /*! + * @brief Resumes writeset applying/committing. + */ + wsrep_status_t (*resume) (wsrep_t* wsrep); + + /*! + * @brief Desynchronize from cluster + * + * Effectively turns off flow control for this node, allowing it + * to fall behind the cluster. + */ + wsrep_status_t (*desync) (wsrep_t* wsrep); + + /*! + * @brief Request to resynchronize with cluster. + * + * Effectively turns on flow control. Asynchronous - actual synchronization + * event to be deliverred via sync_cb. + */ + wsrep_status_t (*resync) (wsrep_t* wsrep); + + /*! + * @brief Acquire global named lock + * + * @param wsrep wsrep provider handle + * @param name lock name + * @param shared shared or exclusive lock + * @param owner 64-bit owner ID + * @param tout timeout in nanoseconds. + * 0 - return immediately, -1 wait forever. + * @return wsrep status or negative error code + * @retval -EDEADLK lock was already acquired by this thread + * @retval -EBUSY lock was busy + */ + wsrep_status_t (*lock) (wsrep_t* wsrep, + const char* name, wsrep_bool_t shared, + uint64_t owner, int64_t tout); + + /*! + * @brief Release global named lock + * + * @param wsrep wsrep provider handle + * @param name lock name + * @param owner 64-bit owner ID + * @return wsrep status or negative error code + * @retval -EPERM lock does not belong to this owner + */ + wsrep_status_t (*unlock) (wsrep_t* wsrep, const char* name, uint64_t owner); + + /*! + * @brief Check if global named lock is locked + * + * @param wsrep wsrep provider handle + * @param name lock name + * @param owner if not NULL will contain 64-bit owner ID + * @param node if not NULL will contain owner's node UUID + * @return true if lock is locked + */ + wsrep_bool_t (*is_locked) (wsrep_t* wsrep, const char* name, uint64_t* conn, + wsrep_uuid_t* node); + + /*! + * wsrep provider name + */ + const char* provider_name; + + /*! + * wsrep provider version + */ + const char* provider_version; + + /*! + * wsrep provider vendor name + */ + const char* provider_vendor; + + /*! + * @brief Frees allocated resources before unloading the library. + * @param wsrep provider handle + */ + void (*free)(wsrep_t* wsrep); + + void *dlh; //!< reserved for future use + void *ctx; //!< reserved for implemetation private context +}; + + +/*! + * + * @brief Loads wsrep library + * + * @param spec path to wsrep library. If NULL or WSREP_NONE initialises dummy + * pass-through implementation. + * @param hptr wsrep handle + * @param log_cb callback to handle loader messages. Otherwise writes to stderr. + * + * @return zero on success, errno on failure + */ +int wsrep_load(const char* spec, wsrep_t** hptr, wsrep_log_cb_t log_cb); + +/*! + * @brief Unloads wsrep library and frees associated resources + * + * @param hptr wsrep handler pointer + */ +void wsrep_unload(wsrep_t* hptr); + +#ifdef __cplusplus +} +#endif + +#endif /* WSREP_H */ diff --git a/wsrep/wsrep_dummy.c b/wsrep/wsrep_dummy.c new file mode 100644 index 000000000000..bab5329dc028 --- /dev/null +++ b/wsrep/wsrep_dummy.c @@ -0,0 +1,407 @@ +/* Copyright (C) 2009-2010 Codership Oy + + 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 + */ + +/*! @file Dummy wsrep API implementation. */ + +#include "wsrep_api.h" + +#include +#include +#include + +/*! Dummy backend context. */ +typedef struct wsrep_dummy +{ + wsrep_log_cb_t log_fn; + char* options; +} wsrep_dummy_t; + +/* Get pointer to wsrep_dummy context from wsrep_t pointer */ +#define WSREP_DUMMY(_p) ((wsrep_dummy_t *) (_p)->ctx) + +/* Trace function usage a-la DBUG */ +#define WSREP_DBUG_ENTER(_w) do { \ + if (WSREP_DUMMY(_w)) { \ + if (WSREP_DUMMY(_w)->log_fn) \ + WSREP_DUMMY(_w)->log_fn(WSREP_LOG_DEBUG, __FUNCTION__); \ + } \ + } while (0) + + +static void dummy_free(wsrep_t *w) +{ + WSREP_DBUG_ENTER(w); + if (WSREP_DUMMY(w)->options) { + free(WSREP_DUMMY(w)->options); + WSREP_DUMMY(w)->options = NULL; + } + free(w->ctx); + w->ctx = NULL; +} + +static wsrep_status_t dummy_init (wsrep_t* w, + const struct wsrep_init_args* args) +{ + WSREP_DUMMY(w)->log_fn = args->logger_cb; + WSREP_DBUG_ENTER(w); + if (args->options) { + WSREP_DUMMY(w)->options = strdup(args->options); + } + return WSREP_OK; +} + +static uint64_t dummy_capabilities (wsrep_t* w __attribute__((unused))) +{ + return 0; +} + +static wsrep_status_t dummy_options_set( + wsrep_t* w, + const char* conf) +{ + WSREP_DBUG_ENTER(w); + if (WSREP_DUMMY(w)->options) { + free(WSREP_DUMMY(w)->options); + WSREP_DUMMY(w)->options = NULL; + } + if (conf) { + WSREP_DUMMY(w)->options = strdup(conf); + } + return WSREP_OK; +} + +static char* dummy_options_get (wsrep_t* w) +{ + WSREP_DBUG_ENTER(w); + return WSREP_DUMMY(w)->options; +} + +static wsrep_status_t dummy_connect( + wsrep_t* w, + const char* name __attribute__((unused)), + const char* url __attribute__((unused)), + const char* donor __attribute__((unused)), + wsrep_bool_t bootstrap __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_disconnect(wsrep_t* w) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_recv(wsrep_t* w, + void* recv_ctx __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_pre_commit( + wsrep_t* w, + const wsrep_conn_id_t conn_id __attribute__((unused)), + wsrep_ws_handle_t* ws_handle __attribute__((unused)), + uint32_t flags __attribute__((unused)), + wsrep_trx_meta_t* meta __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_post_commit( + wsrep_t* w, + wsrep_ws_handle_t* ws_handle __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_post_rollback( + wsrep_t* w, + wsrep_ws_handle_t* ws_handle __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_replay_trx( + wsrep_t* w, + wsrep_ws_handle_t* ws_handle __attribute__((unused)), + void* trx_ctx __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_abort_pre_commit( + wsrep_t* w, + const wsrep_seqno_t bf_seqno __attribute__((unused)), + const wsrep_trx_id_t trx_id __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_append_key( + wsrep_t* w, + wsrep_ws_handle_t* ws_handle __attribute__((unused)), + const wsrep_key_t* key __attribute__((unused)), + const size_t key_num __attribute__((unused)), + const wsrep_key_type_t key_type __attribute__((unused)), + const bool copy __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_append_data( + wsrep_t* w, + wsrep_ws_handle_t* ws_handle __attribute__((unused)), + const struct wsrep_buf* data __attribute__((unused)), + const size_t count __attribute__((unused)), + const wsrep_data_type_t type __attribute__((unused)), + const bool copy __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_causal_read( + wsrep_t* w, + wsrep_gtid_t* gtid __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_free_connection( + wsrep_t* w, + const wsrep_conn_id_t conn_id __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_to_execute_start( + wsrep_t* w, + const wsrep_conn_id_t conn_id __attribute__((unused)), + const wsrep_key_t* key __attribute__((unused)), + const size_t key_num __attribute__((unused)), + const struct wsrep_buf* data __attribute__((unused)), + const size_t count __attribute__((unused)), + wsrep_trx_meta_t* meta __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_to_execute_end( + wsrep_t* w, + const wsrep_conn_id_t conn_id __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_preordered_collect( + wsrep_t* w, + wsrep_po_handle_t* handle __attribute__((unused)), + const struct wsrep_buf* data __attribute__((unused)), + size_t count __attribute__((unused)), + wsrep_bool_t copy __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_preordered_commit( + wsrep_t* w, + wsrep_po_handle_t* handle __attribute__((unused)), + const wsrep_uuid_t* source_id __attribute__((unused)), + uint32_t flags __attribute__((unused)), + int pa_range __attribute__((unused)), + wsrep_bool_t commit __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_sst_sent( + wsrep_t* w, + const wsrep_gtid_t* state_id __attribute__((unused)), + const int rcode __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_sst_received( + wsrep_t* w, + const wsrep_gtid_t* state_id __attribute__((unused)), + const void* state __attribute__((unused)), + const size_t state_len __attribute__((unused)), + const int rcode __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_snapshot( + wsrep_t* w, + const void* msg __attribute__((unused)), + const size_t msg_len __attribute__((unused)), + const char* donor_spec __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static struct wsrep_stats_var dummy_stats[] = { + { NULL, WSREP_VAR_STRING, { 0 } } +}; + +static struct wsrep_stats_var* dummy_stats_get (wsrep_t* w) +{ + WSREP_DBUG_ENTER(w); + return dummy_stats; +} + +static void dummy_stats_free ( + wsrep_t* w, + struct wsrep_stats_var* stats __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); +} + +static void dummy_stats_reset (wsrep_t* w) +{ + WSREP_DBUG_ENTER(w); +} + +static wsrep_seqno_t dummy_pause (wsrep_t* w) +{ + WSREP_DBUG_ENTER(w); + return -ENOSYS; +} + +static wsrep_status_t dummy_resume (wsrep_t* w) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_desync (wsrep_t* w) +{ + WSREP_DBUG_ENTER(w); + return WSREP_NOT_IMPLEMENTED; +} + +static wsrep_status_t dummy_resync (wsrep_t* w) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static wsrep_status_t dummy_lock (wsrep_t* w, + const char* s __attribute__((unused)), + bool r __attribute__((unused)), + uint64_t o __attribute__((unused)), + int64_t t __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_NOT_IMPLEMENTED; +} + +static wsrep_status_t dummy_unlock (wsrep_t* w, + const char* s __attribute__((unused)), + uint64_t o __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return WSREP_OK; +} + +static bool dummy_is_locked (wsrep_t* w, + const char* s __attribute__((unused)), + uint64_t* o __attribute__((unused)), + wsrep_uuid_t* t __attribute__((unused))) +{ + WSREP_DBUG_ENTER(w); + return false; +} + +static wsrep_t dummy_iface = { + WSREP_INTERFACE_VERSION, + &dummy_init, + &dummy_capabilities, + &dummy_options_set, + &dummy_options_get, + &dummy_connect, + &dummy_disconnect, + &dummy_recv, + &dummy_pre_commit, + &dummy_post_commit, + &dummy_post_rollback, + &dummy_replay_trx, + &dummy_abort_pre_commit, + &dummy_append_key, + &dummy_append_data, + &dummy_causal_read, + &dummy_free_connection, + &dummy_to_execute_start, + &dummy_to_execute_end, + &dummy_preordered_collect, + &dummy_preordered_commit, + &dummy_sst_sent, + &dummy_sst_received, + &dummy_snapshot, + &dummy_stats_get, + &dummy_stats_free, + &dummy_stats_reset, + &dummy_pause, + &dummy_resume, + &dummy_desync, + &dummy_resync, + &dummy_lock, + &dummy_unlock, + &dummy_is_locked, + WSREP_NONE, + WSREP_INTERFACE_VERSION, + "Codership Oy ", + &dummy_free, + NULL, + NULL +}; + +int wsrep_dummy_loader(wsrep_t* w) +{ + if (!w) + return EINVAL; + + *w = dummy_iface; + + // allocate private context + if (!(w->ctx = malloc(sizeof(wsrep_dummy_t)))) + return ENOMEM; + + // initialize private context + WSREP_DUMMY(w)->log_fn = NULL; + WSREP_DUMMY(w)->options = NULL; + + return 0; +} diff --git a/wsrep/wsrep_gtid.c b/wsrep/wsrep_gtid.c new file mode 100644 index 000000000000..e618c5ab7d0f --- /dev/null +++ b/wsrep/wsrep_gtid.c @@ -0,0 +1,74 @@ +/* Copyright (C) 2013 Codership Oy + + 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 + */ + +/*! @file Helper functions to deal with GTID string representations */ + +#include +#include +#include +#include + +#include "wsrep_api.h" + +/*! + * Read GTID from string + * @return length of GTID string representation or -EINVAL in case of error + */ +int +wsrep_gtid_scan(const char* str, size_t str_len, wsrep_gtid_t* gtid) +{ + unsigned int offset; + char* endptr; + + if ((offset = wsrep_uuid_scan(str, str_len, >id->uuid)) > 0 && + offset < str_len && str[offset] == ':') { + ++offset; + if (offset < str_len) + { + errno = 0; + gtid->seqno = strtoll(str + offset, &endptr, 0); + + if (errno == 0) { + offset = endptr - str; + return offset; + } + } + } + *gtid = WSREP_GTID_UNDEFINED; + return -EINVAL; +} + +/*! + * Write GTID to string + * @return length of GTID stirng representation of -EMSGSIZE if string is too + * short + */ +int +wsrep_gtid_print(const wsrep_gtid_t* gtid, char* str, size_t str_len) +{ + unsigned int offset, ret; + if ((offset = wsrep_uuid_print(>id->uuid, str, str_len)) > 0) + { + ret = snprintf(str + offset, str_len - offset, + ":%" PRId64, gtid->seqno); + if (ret <= str_len - offset) { + return (offset + ret); + } + + } + + return -EMSGSIZE; +} diff --git a/wsrep/wsrep_loader.c b/wsrep/wsrep_loader.c new file mode 100644 index 000000000000..8ae6ea962ece --- /dev/null +++ b/wsrep/wsrep_loader.c @@ -0,0 +1,203 @@ +/* Copyright (C) 2009-2011 Codership Oy + + 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 + */ + +/*! @file wsrep implementation loader */ + +#include +#include +#include +#include + +#include "wsrep_api.h" + +// Logging stuff for the loader +static const char* log_levels[] = {"FATAL", "ERROR", "WARN", "INFO", "DEBUG"}; + +static void default_logger (wsrep_log_level_t lvl, const char* msg) +{ + fprintf (stderr, "wsrep loader: [%s] %s\n", log_levels[lvl], msg); +} + +static wsrep_log_cb_t logger = default_logger; + +/************************************************************************** + * Library loader + **************************************************************************/ + +static int verify(const wsrep_t *wh, const char *iface_ver) +{ + const size_t msg_len = 128; + char msg[msg_len]; + +#define VERIFY(_p) if (!(_p)) { \ + snprintf(msg, msg_len, "wsrep_load(): verify(): %s\n", # _p); \ + logger (WSREP_LOG_ERROR, msg); \ + return EINVAL; \ + } + + VERIFY(wh); + VERIFY(wh->version); + + if (strcmp(wh->version, iface_ver)) { + snprintf (msg, msg_len, + "provider interface version mismatch: need '%s', found '%s'", + iface_ver, wh->version); + logger (WSREP_LOG_ERROR, msg); + return EINVAL; + } + + VERIFY(wh->init); + VERIFY(wh->options_set); + VERIFY(wh->options_get); + VERIFY(wh->connect); + VERIFY(wh->disconnect); + VERIFY(wh->recv); + VERIFY(wh->pre_commit); + VERIFY(wh->post_commit); + VERIFY(wh->post_rollback); + VERIFY(wh->replay_trx); + VERIFY(wh->abort_pre_commit); + VERIFY(wh->append_key); + VERIFY(wh->append_data); + VERIFY(wh->free_connection); + VERIFY(wh->to_execute_start); + VERIFY(wh->to_execute_end); + VERIFY(wh->preordered_collect); + VERIFY(wh->preordered_commit); + VERIFY(wh->sst_sent); + VERIFY(wh->sst_received); + VERIFY(wh->stats_get); + VERIFY(wh->stats_free); + VERIFY(wh->stats_reset); + VERIFY(wh->pause); + VERIFY(wh->resume); + VERIFY(wh->desync); + VERIFY(wh->resync); + VERIFY(wh->lock); + VERIFY(wh->unlock); + VERIFY(wh->is_locked); + VERIFY(wh->provider_name); + VERIFY(wh->provider_version); + VERIFY(wh->provider_vendor); + VERIFY(wh->free); + return 0; +} + +typedef int (*wsrep_loader_fun)(wsrep_t*); + +static wsrep_loader_fun wsrep_dlf(void *dlh, const char *sym) +{ + union { + wsrep_loader_fun dlfun; + void *obj; + } alias; + alias.obj = dlsym(dlh, sym); + return alias.dlfun; +} + +extern int wsrep_dummy_loader(wsrep_t *w); + +int wsrep_load(const char *spec, wsrep_t **hptr, wsrep_log_cb_t log_cb) +{ + int ret = 0; + void *dlh = NULL; + wsrep_loader_fun dlfun; + const size_t msg_len = 1024; + char msg[msg_len + 1]; + msg[msg_len] = 0; + + if (NULL != log_cb) + logger = log_cb; + + if (!(spec && hptr)) + return EINVAL; + + snprintf (msg, msg_len, + "wsrep_load(): loading provider library '%s'", spec); + logger (WSREP_LOG_INFO, msg); + + if (!(*hptr = malloc(sizeof(wsrep_t)))) { + logger (WSREP_LOG_FATAL, "wsrep_load(): out of memory"); + return ENOMEM; + } + + if (!spec || strcmp(spec, WSREP_NONE) == 0) { + if ((ret = wsrep_dummy_loader(*hptr)) != 0) { + free (*hptr); + *hptr = NULL; + } + return ret; + } + + if (!(dlh = dlopen(spec, RTLD_NOW | RTLD_LOCAL))) { + snprintf(msg, msg_len, "wsrep_load(): dlopen(): %s", dlerror()); + logger (WSREP_LOG_ERROR, msg); + ret = EINVAL; + goto out; + } + + if (!(dlfun = wsrep_dlf(dlh, "wsrep_loader"))) { + ret = EINVAL; + goto out; + } + + if ((ret = (*dlfun)(*hptr)) != 0) { + snprintf(msg, msg_len, "wsrep_load(): loader failed: %s", + strerror(ret)); + logger (WSREP_LOG_ERROR, msg); + goto out; + } + + if ((ret = verify(*hptr, WSREP_INTERFACE_VERSION)) != 0) { + snprintf (msg, msg_len, + "wsrep_load(): interface version mismatch: my version %s, " + "provider version %s", WSREP_INTERFACE_VERSION, + (*hptr)->version); + logger (WSREP_LOG_ERROR, msg); + goto out; + } + + (*hptr)->dlh = dlh; + +out: + if (ret != 0) { + if (dlh) dlclose(dlh); + free(*hptr); + *hptr = NULL; + } else { + snprintf (msg, msg_len, + "wsrep_load(): %s %s by %s loaded successfully.", + (*hptr)->provider_name, (*hptr)->provider_version, + (*hptr)->provider_vendor); + logger (WSREP_LOG_INFO, msg); + } + + return ret; +} + +void wsrep_unload(wsrep_t *hptr) +{ + if (!hptr) { + logger (WSREP_LOG_WARN, "wsrep_unload(): null pointer."); + } else { + if (hptr->free) + hptr->free(hptr); + if (hptr->dlh) + dlclose(hptr->dlh); + free(hptr); + } +} + diff --git a/wsrep/wsrep_uuid.c b/wsrep/wsrep_uuid.c new file mode 100644 index 000000000000..baa95b2578a2 --- /dev/null +++ b/wsrep/wsrep_uuid.c @@ -0,0 +1,83 @@ +/* Copyright (C) 2009 Codership Oy + + 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 + */ + +/*! @file Helper functions to deal with history UUID string representations */ + +#include +#include +#include + +#include "wsrep_api.h" + +/*! + * Read UUID from string + * @return length of UUID string representation or -EINVAL in case of error + */ +int +wsrep_uuid_scan (const char* str, size_t str_len, wsrep_uuid_t* uuid) +{ + unsigned int uuid_len = 0; + unsigned int uuid_offt = 0; + + while (uuid_len + 1 < str_len) { + /* We are skipping potential '-' after uuid_offt == 4, 6, 8, 10 + * which means + * (uuid_offt >> 1) == 2, 3, 4, 5, + * which in turn means + * (uuid_offt >> 1) - 2 <= 3 + * since it is always >= 0, because uuid_offt is unsigned */ + if (((uuid_offt >> 1) - 2) <= 3 && str[uuid_len] == '-') { + // skip dashes after 4th, 6th, 8th and 10th positions + uuid_len += 1; + continue; + } + + if (isxdigit(str[uuid_len]) && isxdigit(str[uuid_len + 1])) { + // got hex digit, scan another byte to uuid, increment uuid_offt + sscanf (str + uuid_len, "%2hhx", uuid->data + uuid_offt); + uuid_len += 2; + uuid_offt += 1; + if (sizeof (uuid->data) == uuid_offt) + return uuid_len; + } + else { + break; + } + } + + *uuid = WSREP_UUID_UNDEFINED; + return -EINVAL; +} + +/*! + * Write UUID to string + * @return length of UUID string representation or -EMSGSIZE if string is too + * short + */ +int +wsrep_uuid_print (const wsrep_uuid_t* uuid, char* str, size_t str_len) +{ + if (str_len > 36) { + const unsigned char* u = uuid->data; + return snprintf(str, str_len, "%02x%02x%02x%02x-%02x%02x-%02x%02x-" + "%02x%02x-%02x%02x%02x%02x%02x%02x", + u[ 0], u[ 1], u[ 2], u[ 3], u[ 4], u[ 5], u[ 6], u[ 7], + u[ 8], u[ 9], u[10], u[11], u[12], u[13], u[14], u[15]); + } + else { + return -EMSGSIZE; + } +} From 844cb3d72232eeb67ca47a5a0d67857d13c98a13 Mon Sep 17 00:00:00 2001 From: dirtysalt Date: Wed, 5 Nov 2014 20:10:31 +0800 Subject: [PATCH 002/305] Refs #9: complete import by patching the diff between lp and github --- BUILD/SETUP.sh | 2 +- BUILD/compile-amd64-debug-wsrep | 11 + BUILD/compile-amd64-wsrep | 9 + BUILD/compile-pentium-debug-wsrep | 12 + BUILD/compile-pentium-wsrep | 11 + BUILD/compile-pentium64-wsrep | 28 + CMakeLists.txt | 15 +- cmake/configure.pl | 10 + cmake/install_layout.cmake | 5 +- cmake/install_macros.cmake | 24 + cmake/os/FreeBSD.cmake | 2 + cmake/package_name.cmake | 11 +- include/thr_lock.h | 13 + mysql-test/collections/default.release | 15 + mysql-test/r/information_schema.result | 4 +- mysql-test/r/show_check.result | 6 +- .../suite/innodb/r/innodb-autoinc.result | 20 + .../perfschema/r/dml_setup_instruments.result | 1 + .../perfschema/t/dml_setup_instruments.test | 3 +- .../suite/rpl/r/rpl_auto_increment.result | 1 + mysys/default.c | 12 + mysys/thr_lock.c | 170 +- scripts/CMakeLists.txt | 10 + scripts/mysqld_safe.sh | 185 ++- sql/CMakeLists.txt | 22 + sql/event_data_objects.cc | 17 + sql/events.cc | 53 + sql/ha_partition.cc | 8 +- sql/ha_partition.h | 3 + sql/handler.cc | 145 +- sql/handler.h | 16 + sql/item_func.cc | 12 + sql/lock.cc | 51 +- sql/log.cc | 149 +- sql/log.h | 17 + sql/log_event.cc | 150 +- sql/mdl.cc | 142 +- sql/mdl.h | 13 + sql/mysqld.cc | 794 +++++++++- sql/mysqld.h | 17 + sql/protocol.cc | 8 + sql/set_var.h | 6 + sql/slave.cc | 41 + sql/sp.cc | 34 + sql/sql_acl.cc | 38 +- sql/sql_admin.cc | 3 + sql/sql_alter.cc | 20 +- sql/sql_base.cc | 56 +- sql/sql_builtin.cc.in | 12 +- sql/sql_class.cc | 287 +++- sql/sql_class.h | 63 +- sql/sql_connect.cc | 25 + sql/sql_delete.cc | 12 + sql/sql_insert.cc | 44 + sql/sql_lex.cc | 11 + sql/sql_parse.cc | 595 ++++++- sql/sql_parse.h | 16 + sql/sql_partition_admin.cc | 13 + sql/sql_plugin.cc | 6 + sql/sql_prepare.cc | 20 +- sql/sql_reload.cc | 13 +- sql/sql_repl.cc | 14 + sql/sql_show.cc | 6 +- sql/sql_table.cc | 80 + sql/sql_trigger.cc | 52 + sql/sql_truncate.cc | 10 +- sql/sql_update.cc | 12 + sql/sql_yacc.yy | 12 +- sql/sys_vars.cc | 268 ++++ sql/transaction.cc | 63 +- sql/tztime.cc | 3 + storage/innobase/dict/dict0crea.c | 8 + storage/innobase/dict/dict0dict.c | 26 +- storage/innobase/handler/ha_innodb.cc | 1365 ++++++++++++++++- storage/innobase/handler/ha_innodb.h | 41 + storage/innobase/handler/handler0alter.cc | 4 + storage/innobase/include/dict0mem.h | 3 + storage/innobase/include/ha_prototypes.h | 16 + storage/innobase/include/lock0lock.h | 3 - storage/innobase/include/rem0rec.h | 9 + storage/innobase/include/srv0srv.h | 12 + storage/innobase/include/trx0sys.h | 35 + storage/innobase/include/trx0trx.h | 3 + storage/innobase/lock/lock0lock.c | 355 ++++- storage/innobase/os/os0file.c | 23 +- storage/innobase/rem/rem0rec.c | 133 ++ storage/innobase/row/row0ins.c | 29 +- storage/innobase/row/row0upd.c | 301 +++- storage/innobase/srv/srv0srv.c | 143 ++ storage/innobase/trx/trx0roll.c | 27 + storage/innobase/trx/trx0sys.c | 131 +- storage/innobase/trx/trx0trx.c | 32 +- support-files/CMakeLists.txt | 8 +- support-files/build-tags | 7 +- support-files/mysql.server.sh | 22 +- support-files/mysql.spec.sh | 69 +- support-files/wsrep/debian/changelog | 4 + support-files/wsrep/debian/compat | 1 + support-files/wsrep/debian/control | 44 + .../ignore.d.paranoid/mysql-server-5_1 | 9 + .../logcheck/ignore.d.server/mysql-server-5_1 | 32 + .../ignore.d.workstation/mysql-server-5_1 | 32 + .../wsrep/debian/etc/logrotate.d/mysql-server | 27 + .../etc/mysql/conf.d/mysqld_safe_syslog.cnf | 2 + .../wsrep/debian/etc/mysql/debian-start | 31 + .../wsrep/debian/mysql-client-wsrep.install | 17 + .../wsrep/debian/mysql-server-wsrep.dirs | 2 + .../wsrep/debian/mysql-server-wsrep.install | 59 + .../wsrep/debian/mysql-server-wsrep.postinst | 13 + .../wsrep/debian/mysql-server-wsrep.preinst | 6 + .../wsrep/debian/mysql-server-wsrep.prerm | 10 + support-files/wsrep/debian/rules | 83 + support-files/wsrep/debian/source/format | 1 + vio/viossl.c | 2 + wsrep/cmake_install.cmake | 34 - 115 files changed, 7120 insertions(+), 126 deletions(-) create mode 100644 BUILD/compile-amd64-debug-wsrep create mode 100644 BUILD/compile-amd64-wsrep create mode 100644 BUILD/compile-pentium-debug-wsrep create mode 100644 BUILD/compile-pentium-wsrep create mode 100644 BUILD/compile-pentium64-wsrep create mode 100644 mysql-test/collections/default.release create mode 100644 support-files/wsrep/debian/changelog create mode 100644 support-files/wsrep/debian/compat create mode 100644 support-files/wsrep/debian/control create mode 100644 support-files/wsrep/debian/etc/logcheck/ignore.d.paranoid/mysql-server-5_1 create mode 100644 support-files/wsrep/debian/etc/logcheck/ignore.d.server/mysql-server-5_1 create mode 100644 support-files/wsrep/debian/etc/logcheck/ignore.d.workstation/mysql-server-5_1 create mode 100644 support-files/wsrep/debian/etc/logrotate.d/mysql-server create mode 100644 support-files/wsrep/debian/etc/mysql/conf.d/mysqld_safe_syslog.cnf create mode 100644 support-files/wsrep/debian/etc/mysql/debian-start create mode 100644 support-files/wsrep/debian/mysql-client-wsrep.install create mode 100644 support-files/wsrep/debian/mysql-server-wsrep.dirs create mode 100644 support-files/wsrep/debian/mysql-server-wsrep.install create mode 100644 support-files/wsrep/debian/mysql-server-wsrep.postinst create mode 100644 support-files/wsrep/debian/mysql-server-wsrep.preinst create mode 100644 support-files/wsrep/debian/mysql-server-wsrep.prerm create mode 100644 support-files/wsrep/debian/rules create mode 100644 support-files/wsrep/debian/source/format delete mode 100644 wsrep/cmake_install.cmake diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index 9f0fa7cb2d30..171c926be6a6 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -198,7 +198,7 @@ max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server" alpha_cflags="$check_cpu_cflags -Wa,-m$cpu_flag" amd64_cflags="$check_cpu_cflags" amd64_cxxflags="" # If dropping '--with-big-tables', add here "-DBIG_TABLES" -pentium_cflags="$check_cpu_cflags" +pentium_cflags="$check_cpu_cflags -m32" pentium64_cflags="$check_cpu_cflags -m64" ppc_cflags="$check_cpu_cflags" sparc_cflags="" diff --git a/BUILD/compile-amd64-debug-wsrep b/BUILD/compile-amd64-debug-wsrep new file mode 100644 index 000000000000..995a8afcca96 --- /dev/null +++ b/BUILD/compile-amd64-debug-wsrep @@ -0,0 +1,11 @@ +#! /bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="$amd64_cflags $debug_cflags -g -O0 $wsrep_cflags" +c_warnings="$c_warnings $debug_extra_warnings" +cxx_warnings="$cxx_warnings $debug_extra_warnings" +extra_configs="$amd64_configs $debug_configs $wsrep_configs --with-wsrep" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-amd64-wsrep b/BUILD/compile-amd64-wsrep new file mode 100644 index 000000000000..57dfbdd6da2f --- /dev/null +++ b/BUILD/compile-amd64-wsrep @@ -0,0 +1,9 @@ +#! /bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="$amd64_cflags $fast_cflags -g $wsrep_cflags" +extra_configs="$amd64_configs $wsrep_configs --with-wsrep" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-debug-wsrep b/BUILD/compile-pentium-debug-wsrep new file mode 100644 index 000000000000..ee68e3fd0c12 --- /dev/null +++ b/BUILD/compile-pentium-debug-wsrep @@ -0,0 +1,12 @@ +#! /bin/sh -x + +path=`dirname $0` +set -- "$@" --with-debug=full +. "$path/SETUP.sh" + +extra_flags="$pentium_cflags $debug_cflags -g -O0 $wsrep_cflags" +c_warnings="$c_warnings $debug_extra_warnings" +cxx_warnings="$cxx_warnings $debug_extra_warnings" +extra_configs="$pentium_configs $debug_configs $wsrep_configs --with-wsrep" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-wsrep b/BUILD/compile-pentium-wsrep new file mode 100644 index 000000000000..eeb14310e4e0 --- /dev/null +++ b/BUILD/compile-pentium-wsrep @@ -0,0 +1,11 @@ +#! /bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="$pentium_cflags $fast_cflags $wsrep_cflags" +extra_configs="$pentium_configs $wsrep_configs --with-wsrep" + +#strip=yes + +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-wsrep b/BUILD/compile-pentium64-wsrep new file mode 100644 index 000000000000..0bccb34e753c --- /dev/null +++ b/BUILD/compile-pentium64-wsrep @@ -0,0 +1,28 @@ +#! /bin/sh + +# Copyright (C) 2006, 2007 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 + +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="$pentium64_cflags $fast_cflags -g $wsrep_cflags" +extra_configs="$pentium_configs $static_link $wsrep_configs --with-wsrep" +CC="$CC --pipe" +strip=yes + +. "$path/FINISH.sh" diff --git a/CMakeLists.txt b/CMakeLists.txt index f43473f76a5c..bde534c86dbd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,6 +163,7 @@ IF(MYSQL_MAINTAINER_MODE) ENDIF() # Add macros +INCLUDE(wsrep) INCLUDE(character_sets) INCLUDE(zlib) INCLUDE(ssl) @@ -288,6 +289,13 @@ MARK_AS_ADVANCED(ENABLED_LOCAL_INFILE) OPTION(WITH_FAST_MUTEXES "Compile with fast mutexes" OFF) MARK_AS_ADVANCED(WITH_FAST_MUTEXES) +OPTION(WITH_INNODB_DISALLOW_WRITES "InnoDB freeze writes patch from Google" ${WITH_WSREP}) +IF (WITH_INNODB_DISALLOW_WRITES) + MESSAGE(STATUS "INNODB_DISALLOW_WRITES") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWITH_INNODB_DISALLOW_WRITES") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITH_INNODB_DISALLOW_WRITES") +ENDIF() + # Set DBUG_OFF and other optional release-only flags for non-debug project types FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL) FOREACH(LANG C CXX) @@ -394,7 +402,9 @@ ADD_SUBDIRECTORY(vio) ADD_SUBDIRECTORY(regex) ADD_SUBDIRECTORY(mysys) ADD_SUBDIRECTORY(libmysql) - +IF(WITH_WSREP) +ADD_SUBDIRECTORY(wsrep) +ENDIF() IF(WITH_UNIT_TESTS) ENABLE_TESTING() @@ -489,7 +499,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM") INSTALL(FILES ${CMAKE_BINARY_DIR}/Docs/INFO_SRC ${CMAKE_BINARY_DIR}/Docs/INFO_BIN DESTINATION ${INSTALL_DOCDIR}) IF(UNIX) - INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme) + INSTALL(FILES Docs/INSTALL-BINARY Docs/README-wsrep DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme) ENDIF() # MYSQL_DOCS_LOCATON is used in "make dist", points to the documentation directory SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied") @@ -497,6 +507,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM") INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR} COMPONENT Documentation PATTERN "INSTALL-BINARY" EXCLUDE + PATTERN "README-wsrep" EXCLUDE PATTERN "Makefile.*" EXCLUDE PATTERN "glibc*" EXCLUDE PATTERN "linuxthreads.txt" EXCLUDE diff --git a/cmake/configure.pl b/cmake/configure.pl index 76a5a8994eea..018d8c8f68e6 100644 --- a/cmake/configure.pl +++ b/cmake/configure.pl @@ -195,6 +195,16 @@ sub check_compiler $cmakeargs = $cmakeargs." -DMYSQL_DATADIR=".substr($option,14); next; } + if ($option =~ /layout=/) + { + $cmakeargs = $cmakeargs." -DINSTALL_LAYOUT=".substr($option,7); + next; + } + if ($option =~ /with-unix-socket-path=/) + { + $cmakeargs = $cmakeargs." -DMYSQL_UNIX_ADDR=".substr($option,22); + next; + } if ($option =~ /mysql-maintainer-mode/) { $cmakeargs = $cmakeargs." -DMYSQL_MAINTAINER_MODE=" . diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake index 4adda0b6eacb..5cd47af0343c 100644 --- a/cmake/install_layout.cmake +++ b/cmake/install_layout.cmake @@ -146,7 +146,10 @@ SET(INSTALL_BINDIR_RPM "bin") SET(INSTALL_SBINDIR_RPM "sbin") SET(INSTALL_SCRIPTDIR_RPM "bin") # -IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") +# Deciding via system processor may give wrong answer in +# virtual environments that see host CPU directly. +# IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") +IF(64BIT) SET(INSTALL_LIBDIR_RPM "lib64") SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin") ELSE() diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake index be243a429240..a4f2267db7f0 100644 --- a/cmake/install_macros.cmake +++ b/cmake/install_macros.cmake @@ -13,8 +13,31 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +if(APPLE) + LIST(APPEND CMAKE_CXX_LINK_EXECUTABLE "dsymutil ") + LIST(APPEND CMAKE_C_LINK_EXECUTABLE "dsymutil ") + LIST(APPEND CMAKE_CXX_CREATE_SHARED_LIBRARY "dsymutil ") + LIST(APPEND CMAKE_C_CREATE_SHARED_LIBRARY "dsymutil ") + LIST(APPEND CMAKE_CXX_CREATE_SHARED_MODULE "dsymutil ") + LIST(APPEND CMAKE_C_CREATE_SHARED_MODULE "dsymutil ") +ENDIF() + GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/cmake_parse_arguments.cmake) +MACRO (INSTALL_DSYM_DIRECTORIES targets) + IF(APPLE) + FOREACH(target ${targets}) + GET_TARGET_PROPERTY(location ${target} LOCATION) + GET_TARGET_PROPERTY(type ${target} TYPE) + # It's a dirty hack, but cmake too stupid and mysql cmake files too buggy */ + STRING(REPLACE "liblibmysql.dylib" "libmysqlclient.${SHARED_LIB_MAJOR_VERSION}.dylib" location ${location}) + IF(type MATCHES "EXECUTABLE" OR type MATCHES "MODULE" OR type MATCHES "SHARED_LIBRARY") + INSTALL(DIRECTORY "${location}.dSYM" DESTINATION ${INSTALL_LOCATION} COMPONENT Debuginfo) + ENDIF() + ENDFOREACH() + ENDIF() +ENDMACRO() + MACRO (INSTALL_DEBUG_SYMBOLS targets) IF(MSVC) FOREACH(target ${targets}) @@ -241,6 +264,7 @@ FUNCTION(MYSQL_INSTALL_TARGETS) INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION} ${COMP}) SET(INSTALL_LOCATION ${ARG_DESTINATION} ) INSTALL_DEBUG_SYMBOLS("${TARGETS}") + INSTALL_DSYM_DIRECTORIES("${TARGETS}") SET(INSTALL_LOCATION) ENDFUNCTION() diff --git a/cmake/os/FreeBSD.cmake b/cmake/os/FreeBSD.cmake index e09592942c18..bd72a58c68a6 100644 --- a/cmake/os/FreeBSD.cmake +++ b/cmake/os/FreeBSD.cmake @@ -22,3 +22,5 @@ # The below was used for really old versions of FreeBSD, roughly: before 5.1.9 # ADD_DEFINITIONS(-DHAVE_BROKEN_REALPATH) + +SET(HAVE_SYS_TIMEB_H CACHE INTERNAL "") diff --git a/cmake/package_name.cmake b/cmake/package_name.cmake index 1566117cb601..0f1c9458b03c 100644 --- a/cmake/package_name.cmake +++ b/cmake/package_name.cmake @@ -28,6 +28,8 @@ IF(NOT VERSION) SET(DEFAULT_MACHINE ${CMAKE_SYSTEM_PROCESSOR}) IF(SIZEOF_VOIDP EQUAL 8) SET(64BIT 1) + ELSE() + SET(64BIT 0) ENDIF() IF(CMAKE_SYSTEM_NAME MATCHES "Windows") @@ -128,7 +130,14 @@ IF(NOT VERSION) STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}") SET(package_name "mysql-cluster${PRODUCT_TAG}-${NDBVERSION}-${SYSTEM_NAME_AND_PROCESSOR}") ELSE() - SET(package_name "mysql${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}") + IF(WITH_WSREP) + IF(NOT WSREP_PACKAGE_VERSION) + MESSAGE(FATAL_ERROR "Variable WSREP_PACKAGE_VERSION must be set") + ENDIF() + SET(package_name "mysql${PRODUCT_TAG}-${VERSION}_wsrep_${WSREP_PACKAGE_VERSION}-${SYSTEM_NAME_AND_PROCESSOR}") + ELSE() + SET(package_name "mysql${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}") + ENDIF() ENDIF() MESSAGE(STATUS "Packaging as: ${package_name}") diff --git a/include/thr_lock.h b/include/thr_lock.h index c5638ec2cdea..6b0741f1fd24 100644 --- a/include/thr_lock.h +++ b/include/thr_lock.h @@ -20,6 +20,15 @@ #ifdef __cplusplus extern "C" { #endif +#ifdef WITH_WSREP +#include + typedef my_bool (* wsrep_thd_is_brute_force_fun)(void *, my_bool); + typedef int (* wsrep_abort_thd_fun)(void *, void *, my_bool); + typedef int (* wsrep_on_fun)(void *); + void wsrep_thr_lock_init( + wsrep_thd_is_brute_force_fun bf_fun, wsrep_abort_thd_fun abort_fun, + my_bool debug, my_bool convert_LOCK_to_trx, wsrep_on_fun on_fun); +#endif #include #include @@ -89,6 +98,10 @@ typedef struct st_thr_lock_info { pthread_t thread; my_thread_id thread_id; +#ifdef WITH_WSREP + void *mysql_thd; // THD pointer + my_bool in_lock_tables; // true, if inside locking session +#endif } THR_LOCK_INFO; diff --git a/mysql-test/collections/default.release b/mysql-test/collections/default.release new file mode 100644 index 000000000000..0064c1ef659a --- /dev/null +++ b/mysql-test/collections/default.release @@ -0,0 +1,15 @@ +# This file contains the old default.release, the plan is to replace that +# with something like the below (remove space after #): +# include default.daily +# include default.weekly +perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=debug --vardir=var-debug --skip-rpl --report-features --debug-server +perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --report-features +perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --ps-protocol +perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=funcs1+ps --vardir=var-funcs_1_ps --suite=funcs_1 --ps-protocol +perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=funcs2 --vardir=var-funcs2 --suite=funcs_2 +perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=partitions --vardir=var-parts --suite=parts +perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=stress --vardir=var-stress --suite=stress +perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=jp --vardir=var-jp --suite=jp +perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-embedded --embedded-server --skip-rpl +perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=nist --vardir=var-nist --suite=nist +perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=nist+ps --vardir=var-nist_ps --suite=nist --ps-protocol diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 062fa0a92afc..908f1989a527 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1640,9 +1640,7 @@ drop table if exists t1;drop table if exists t1; drop table if exists t1;drop table if exists t1; drop table if exists t1;drop table if exists t1; drop table if exists t1;drop table if exists t1; -drop table if exists t1;drop table if exists -Warnings: -Warning 1265 Data truncated for column 'VARIABLE_VALUE' at row 1 +drop table if exists t1;drop table if exists t1; set global init_connect=""; create table t0 select * from information_schema.global_status where VARIABLE_NAME='COM_SELECT'; SELECT 1; diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 6d46f0560cec..bef68969da8e 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -101,19 +101,19 @@ drop table t1; show variables like "wait_timeout%"; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def information_schema VARIABLES VARIABLES VARIABLE_NAME Variable_name 253 64 12 N 1 0 8 -def information_schema VARIABLES VARIABLES VARIABLE_VALUE Value 253 1024 5 Y 0 0 8 +def information_schema VARIABLES VARIABLES VARIABLE_VALUE Value 253 2048 5 Y 0 0 8 Variable_name Value wait_timeout 28800 show variables like "WAIT_timeout%"; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def information_schema VARIABLES VARIABLES VARIABLE_NAME Variable_name 253 64 12 N 1 0 8 -def information_schema VARIABLES VARIABLES VARIABLE_VALUE Value 253 1024 5 Y 0 0 8 +def information_schema VARIABLES VARIABLES VARIABLE_VALUE Value 253 2048 5 Y 0 0 8 Variable_name Value wait_timeout 28800 show variables like "this_doesn't_exists%"; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def information_schema VARIABLES VARIABLES VARIABLE_NAME Variable_name 253 64 0 N 1 0 8 -def information_schema VARIABLES VARIABLES VARIABLE_VALUE Value 253 1024 0 Y 0 0 8 +def information_schema VARIABLES VARIABLES VARIABLE_VALUE Value 253 2048 0 Y 0 0 8 Variable_name Value show table status from test like "this_doesn't_exists%"; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result index 6f168ecbce60..6a9106cbbb43 100644 --- a/mysql-test/suite/innodb/r/innodb-autoinc.result +++ b/mysql-test/suite/innodb/r/innodb-autoinc.result @@ -201,6 +201,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 100 auto_increment_offset 10 +wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -234,6 +235,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 +wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -273,6 +275,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 +wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -286,6 +289,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 100 auto_increment_offset 10 +wsrep_auto_increment_control ON INSERT INTO t1 VALUES (-2), (NULL),(2),(NULL); INSERT INTO t1 VALUES (250),(NULL); SELECT * FROM t1; @@ -319,6 +323,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 +wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -334,6 +339,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 100 auto_increment_offset 10 +wsrep_auto_increment_control ON INSERT INTO t1 VALUES (-2); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 @@ -374,6 +380,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 +wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -389,6 +396,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 100 auto_increment_offset 10 +wsrep_auto_increment_control ON INSERT INTO t1 VALUES (-2),(NULL),(2),(NULL); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 @@ -423,6 +431,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 +wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -438,6 +447,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 2 auto_increment_offset 10 +wsrep_auto_increment_control ON INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); SELECT * FROM t1; c1 @@ -456,6 +466,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 +wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -471,6 +482,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 2 auto_increment_offset 10 +wsrep_auto_increment_control ON INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); ERROR HY000: Failed to read auto-increment value from storage engine SELECT * FROM t1; @@ -484,6 +496,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 +wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -499,6 +512,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 5 auto_increment_offset 7 +wsrep_auto_increment_control ON INSERT INTO t1 VALUES (NULL),(NULL), (NULL); ERROR HY000: Failed to read auto-increment value from storage engine SELECT * FROM t1; @@ -512,6 +526,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 +wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -531,6 +546,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 3 auto_increment_offset 3 +wsrep_auto_increment_control ON INSERT INTO t1 VALUES (NULL),(NULL), (NULL); SELECT * FROM t1; c1 @@ -548,6 +564,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 +wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -566,6 +583,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 65535 auto_increment_offset 65535 +wsrep_auto_increment_control ON INSERT INTO t1 VALUES (NULL),(NULL); ERROR 22003: Out of range value for column 't1' at row 167 SELECT * FROM t1; @@ -579,6 +597,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 +wsrep_auto_increment_control ON CREATE TABLE t1 (c1 DOUBLE NOT NULL AUTO_INCREMENT, c2 INT, PRIMARY KEY (c1)) ENGINE=InnoDB; INSERT INTO t1 VALUES(NULL, 1); INSERT INTO t1 VALUES(NULL, 2); @@ -866,6 +885,7 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 +wsrep_auto_increment_control ON CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); INSERT INTO t1 VALUES (-1, 'innodb'); diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result index fefc4f46061b..1f1ee7035fcf 100644 --- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result +++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result @@ -34,6 +34,7 @@ where name like 'Wait/Synch/Cond/sql/%' and name not in ( 'wait/synch/cond/sql/COND_handler_count', 'wait/synch/cond/sql/DEBUG_SYNC::cond') +and name not like 'wait/synch/cond/sql/COND_wsrep_%' order by name limit 10; NAME ENABLED TIMED wait/synch/cond/sql/COND_flush_thread_cache YES YES diff --git a/mysql-test/suite/perfschema/t/dml_setup_instruments.test b/mysql-test/suite/perfschema/t/dml_setup_instruments.test index 5582d5596645..ca39f919585b 100644 --- a/mysql-test/suite/perfschema/t/dml_setup_instruments.test +++ b/mysql-test/suite/perfschema/t/dml_setup_instruments.test @@ -36,7 +36,8 @@ select * from performance_schema.setup_instruments and name not in ( 'wait/synch/cond/sql/COND_handler_count', 'wait/synch/cond/sql/DEBUG_SYNC::cond') - order by name limit 10; + and name not like 'wait/synch/cond/sql/COND_wsrep_%' +order by name limit 10; --disable_result_log select * from performance_schema.setup_instruments diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result index 03b413e1b128..2bd11d881554 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result @@ -37,6 +37,7 @@ show variables like "%auto_inc%"; Variable_name Value auto_increment_increment 100 auto_increment_offset 10 +wsrep_auto_increment_control ON create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; insert into t1 values (NULL),(5),(NULL); insert into t1 values (250),(NULL); diff --git a/mysys/default.c b/mysys/default.c index 6fe00af087ea..e63942151e93 100644 --- a/mysys/default.c +++ b/mysys/default.c @@ -87,6 +87,12 @@ static char my_defaults_extra_file_buffer[FN_REFLEN]; static my_bool defaults_already_read= FALSE; +#ifdef WITH_WSREP +/* The only purpose of this global array is to hold full name of my.cnf + * which seems to be otherwise unavailable */ +char wsrep_defaults_file[FN_REFLEN + 10]={0,}; +#endif /* WITH_WREP */ + /* Which directories are searched for options (and in which order) */ #define MAX_DEFAULT_DIRS 6 @@ -803,6 +809,12 @@ static int search_default_file_with_ext(Process_option_func opt_handler, if (!(fp= mysql_file_fopen(key_file_cnf, name, O_RDONLY, MYF(0)))) return 1; /* Ignore wrong files */ +#ifdef WITH_WSREP + /* make sure we do this only once - for top-level file */ + if ('\0' == wsrep_defaults_file[0]) + strncpy(wsrep_defaults_file, name, sizeof(wsrep_defaults_file) - 1); +#endif /* WITH_WSREP */ + while (mysql_file_fgets(buff, sizeof(buff) - 1, fp)) { line++; diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index bc2a29b4296f..dab963b2197b 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -81,7 +81,24 @@ one TL_WRITE_DELAYED lock at the same time as multiple read locks. my_bool thr_lock_inited=0; ulong locks_immediate = 0L, locks_waited = 0L; enum thr_lock_type thr_upgraded_concurrent_insert_lock = TL_WRITE; - +#ifdef WITH_WSREP +static wsrep_thd_is_brute_force_fun wsrep_thd_is_brute_force= NULL; +static wsrep_abort_thd_fun wsrep_abort_thd= NULL; +static my_bool wsrep_debug; +static my_bool wsrep_convert_LOCK_to_trx; +static wsrep_on_fun wsrep_on = NULL; + +void wsrep_thr_lock_init( + wsrep_thd_is_brute_force_fun bf_fun, wsrep_abort_thd_fun abort_fun, + my_bool debug, my_bool convert_LOCK_to_trx, wsrep_on_fun on_fun +) { + wsrep_thd_is_brute_force = bf_fun; + wsrep_abort_thd = abort_fun; + wsrep_debug = debug; + wsrep_convert_LOCK_to_trx= convert_LOCK_to_trx; + wsrep_on = on_fun; +} +#endif /* The following constants are only for debug output */ #define MAX_THREADS 100 #define MAX_LOCKS 100 @@ -533,6 +550,108 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data, DBUG_RETURN(result); } +#ifdef WITH_WSREP +/* + * If brute force applier would need to wait for a thr lock, + * it needs to make sure that it will get the lock without (too much) + * delay. + * We identify here the owners of blocking locks and ask them to + * abort. We then put our lock request in the first place in the + * wait queue. When lock holders abort (one by one) the lock release + * algorithm should grant the lock to us. We rely on this and proceed + * to wait_for_locks(). + * wsrep_break_locks() should be called in all the cases, where lock + * wait would happen. + * + * TODO: current implementation might not cover all possible lock wait + * situations. This needs an review still. + * TODO: lock release, might favor some other lock (instead our bf). + * This needs an condition to check for bf locks first. + * TODO: we still have a debug fprintf, this should be removed + */ +static inline my_bool +wsrep_break_lock( + THR_LOCK_DATA *data, struct st_lock_list *lock_queue1, + struct st_lock_list *lock_queue2, struct st_lock_list *wait_queue) +{ + if (wsrep_on(data->owner->mysql_thd) && + wsrep_thd_is_brute_force && + wsrep_thd_is_brute_force(data->owner->mysql_thd, TRUE)) + { + THR_LOCK_DATA *holder; + + /* if locking session conversion to transaction has been enabled, + we know that this conflicting lock must be read lock and furthermore, + lock holder is read-only. It is safe to wait for him. + */ +#ifdef TODO + if (wsrep_convert_LOCK_to_trx && + (THD*)(data->owner->mysql_thd)->in_lock_tables) + { + if (wsrep_debug) + fprintf(stderr,"WSREP wsrep_break_lock read lock untouched\n"); + return FALSE; + } +#endif + if (wsrep_debug) + fprintf(stderr,"WSREP wsrep_break_lock aborting locks\n"); + + /* aborting lock holder(s) here */ + for (holder=(lock_queue1) ? lock_queue1->data : NULL; + holder; + holder=holder->next) + { + if (!wsrep_thd_is_brute_force(holder->owner->mysql_thd, TRUE)) + { + wsrep_abort_thd(data->owner->mysql_thd, + holder->owner->mysql_thd, FALSE); + } + else + { + if (wsrep_debug) + fprintf(stderr,"WSREP wsrep_break_lock skipping BF lock conflict\n"); + return FALSE; + } + } + for (holder=(lock_queue2) ? lock_queue2->data : NULL; + holder; + holder=holder->next) + { + if (!wsrep_thd_is_brute_force(holder->owner->mysql_thd, TRUE)) + { + wsrep_abort_thd(data->owner->mysql_thd, + holder->owner->mysql_thd, FALSE); + } + else + { + if (wsrep_debug) + fprintf(stderr,"WSREP wsrep_break_lock skipping BF lock conflict\n"); + return FALSE; + } + } + + /* Add our lock to the head of the wait queue */ + if (*(wait_queue->last)==wait_queue->data) + { + wait_queue->last=&data->next; + assert(wait_queue->data==0); + } + else + { + assert(wait_queue->data!=0); + wait_queue->data->prev=&data->next; + } + data->next=wait_queue->data; + data->prev=&wait_queue->data; + wait_queue->data=data; + data->cond=get_cond(); + + statistic_increment(locks_immediate,&THR_LOCK_lock); + return TRUE; + } + return FALSE; +} +#endif enum enum_thr_lock_result thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, @@ -541,6 +660,9 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, THR_LOCK *lock=data->lock; enum enum_thr_lock_result result= THR_LOCK_SUCCESS; struct st_lock_list *wait_queue; +#ifdef WITH_WSREP + my_bool wsrep_lock_inserted= FALSE; +#endif DBUG_ENTER("thr_lock"); data->next=0; @@ -605,6 +727,13 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, } if (lock->write.data->type == TL_WRITE_ONLY) { +#ifdef WITH_WSREP + if (wsrep_break_lock(data, &lock->write, NULL, &lock->read_wait)) + { + wsrep_lock_inserted= TRUE; + goto wsrep_read_wait; + } +#endif /* We are not allowed to get a READ lock in this case */ data->type=TL_UNLOCK; result= THR_LOCK_ABORTED; /* Can't wait for this one */ @@ -632,6 +761,13 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, lock but a high priority write waiting in the write_wait queue. In the latter case we should yield the lock to the writer. */ +#ifdef WITH_WSREP + if (wsrep_break_lock(data, &lock->write, NULL, &lock->read_wait)) + { + wsrep_lock_inserted= TRUE; + } + wsrep_read_wait: +#endif wait_queue= &lock->read_wait; } else /* Request for WRITE lock */ @@ -640,12 +776,25 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, { if (lock->write.data && lock->write.data->type == TL_WRITE_ONLY) { +#ifdef WITH_WSREP + if (wsrep_break_lock(data, &lock->write, NULL, &lock->write_wait)) + { + wsrep_lock_inserted=TRUE; + goto wsrep_write_wait; + } +#endif data->type=TL_UNLOCK; result= THR_LOCK_ABORTED; /* Can't wait for this one */ goto end; } if (lock->write.data || lock->read.data) { +#ifdef WITH_WSREP + if (wsrep_break_lock(data, &lock->write, NULL, &lock->write_wait)) + { + goto end; + } +#endif /* Add delayed write lock to write_wait queue, and return at once */ (*lock->write_wait.last)=data; data->prev=lock->write_wait.last; @@ -670,6 +819,13 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, /* Allow lock owner to bypass TL_WRITE_ONLY. */ if (!thr_lock_owner_equal(data->owner, lock->write.data->owner)) { +#ifdef WITH_WSREP + if (wsrep_break_lock(data, &lock->write, NULL, &lock->write_wait)) + { + wsrep_lock_inserted=TRUE; + goto wsrep_write_wait; + } +#endif /* We are not allowed to get a lock in this case */ data->type=TL_UNLOCK; result= THR_LOCK_ABORTED; /* Can't wait for this one */ @@ -773,9 +929,21 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, DBUG_PRINT("lock",("write locked 3 by thread: 0x%lx type: %d", lock->read.data->owner->thread_id, data->type)); } +#ifdef WITH_WSREP + if (wsrep_break_lock(data, &lock->write, NULL, &lock->write_wait)) + { + wsrep_lock_inserted= TRUE; + } + wsrep_write_wait: + +#endif wait_queue= &lock->write_wait; } /* Can't get lock yet; Wait for it */ +#ifdef WITH_WSREP + if (wsrep_on(data->owner->mysql_thd) && wsrep_lock_inserted) + DBUG_RETURN(wait_for_lock(wait_queue, data, 1, lock_wait_timeout)); +#endif DBUG_RETURN(wait_for_lock(wait_queue, data, 0, lock_wait_timeout)); end: mysql_mutex_unlock(&lock->mutex); diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 5e03acb654b1..5d856969bcaf 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -321,6 +321,15 @@ ELSE() # Configure this one, for testing, but do not install it. CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_config.pl.in ${CMAKE_CURRENT_BINARY_DIR}/mysql_config.pl ESCAPE_QUOTES @ONLY) + IF(WITH_WSREP) + SET(WSREP_BINARIES + wsrep_sst_common + wsrep_sst_mysqldump + wsrep_sst_rsync + wsrep_sst_xtrabackup + wsrep_sst_xtrabackup-v2 + ) + ENDIF() # On Unix, most of the files end up in the bin directory SET(mysql_config_COMPONENT COMPONENT Development) SET(BIN_SCRIPTS @@ -338,6 +347,7 @@ ELSE() mysqldumpslow mysqld_multi mysqld_safe + ${WSREP_BINARIES} ) FOREACH(file ${BIN_SCRIPTS}) IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh) diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 31bb8f364e28..940fd19cd411 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -17,6 +17,8 @@ MYSQLD= niceness=0 mysqld_ld_preload= mysqld_ld_library_path= +flush_caches=0 +numa_interleave=0 # Initial logging status: error log is not open, and not using syslog logging=init @@ -81,6 +83,10 @@ Usage: $0 [OPTIONS] --syslog Log messages to syslog with 'logger' --skip-syslog Log messages to error log (default) --syslog-tag=TAG Pass -t "mysqld-TAG" to 'logger' + --flush-caches Flush and purge buffers/caches before + starting the server + --numa-interleave Run mysqld with its memory interleaved + on all NUMA nodes All other options are passed to the mysqld program. @@ -143,7 +149,7 @@ log_notice () { } eval_log_error () { - cmd="$1" + local cmd="$1" case $logging in file) cmd="$cmd >> "`shell_quote_string "$err_log"`" 2>&1" ;; syslog) @@ -171,6 +177,79 @@ shell_quote_string() { echo "$1" | sed -e 's,\([^a-zA-Z0-9/_.=-]\),\\\1,g' } +wsrep_pick_url() { + [ $# -eq 0 ] && return 0 + + log_error "WSREP: 'wsrep_urls' is DEPRECATED! Use wsrep_cluster_address to specify multiple addresses instead." + + if ! which nc >/dev/null; then + log_error "ERROR: nc tool not found in PATH! Make sure you have it installed." + return 1 + fi + + local url + # Assuming URL in the form scheme://host:port + # If host and port are not NULL, the liveness of URL is assumed to be tested + # If port part is absent, the url is returned literally and unconditionally + # If every URL has port but none is reachable, nothing is returned + for url in `echo $@ | sed s/,/\ /g` 0; do + local host=`echo $url | cut -d \: -f 2 | sed s/^\\\/\\\///` + local port=`echo $url | cut -d \: -f 3` + [ -z "$port" ] && break + nc -z "$host" $port >/dev/null && break + done + + if [ "$url" == "0" ]; then + log_error "ERROR: none of the URLs in '$@' is reachable." + return 1 + fi + + echo $url +} + +# Run mysqld with --wsrep-recover and parse recovered position from log. +# Position will be stored in wsrep_start_position_opt global. +wsrep_start_position_opt="" +wsrep_recover_position() { + local mysqld_cmd="$@" + local euid=$(id -u) + local ret=0 + + local wr_logfile=$(mktemp $DATADIR/wsrep_recovery.XXXXXX) + + [ "$euid" = "0" ] && chown $user $wr_logfile + chmod 600 $wr_logfile + + local wr_pidfile="$DATADIR/"`@HOSTNAME@`"-recover.pid" + + local wr_options="--log_error='$wr_logfile' --pid-file='$wr_pidfile'" + + log_notice "WSREP: Running position recovery with $wr_options" + + eval_log_error "$mysqld_cmd --wsrep_recover $wr_options" + + local rp="$(grep 'WSREP: Recovered position:' $wr_logfile)" + if [ -z "$rp" ]; then + local skipped="$(grep WSREP $wr_logfile | grep 'skipping position recovery')" + if [ -z "$skipped" ]; then + log_error "WSREP: Failed to recover position: +'`cat $wr_logfile`'" + ret=1 + else + log_notice "WSREP: Position recovery skipped" + fi + else + local start_pos="$(echo $rp | sed 's/.*WSREP\:\ Recovered\ position://' \ + | sed 's/^[ \t]*//')" + log_notice "WSREP: Recovered position $start_pos" + wsrep_start_position_opt="--wsrep_start_position=$start_pos" + fi + + [ $ret -eq 0 ] && rm $wr_logfile + + return $ret +} + parse_arguments() { # We only need to pass arguments through to the server if we don't # handle them here. So, we collect unrecognized options (passed on @@ -226,7 +305,15 @@ parse_arguments() { --skip-syslog) want_syslog=0 ;; --syslog-tag=*) syslog_tag="$val" ;; --timezone=*) TZ="$val"; export TZ; ;; - + --wsrep[-_]urls=*) wsrep_urls="$val"; ;; + --flush-caches) flush_caches=1 ;; + --numa-interleave) numa_interleave=1 ;; + --wsrep[-_]provider=*) + if test -n "$val" && test "$val" != "none" + then + wsrep_restart=1 + fi + ;; --help) usage ;; *) @@ -739,6 +826,41 @@ mysqld daemon not started" fi fi +# +# Flush and purge buffers/caches. +# + +if @TARGET_LINUX@ && test $flush_caches -eq 1 +then + # Locate sync, ensure it exists. + if ! my_which sync > /dev/null 2>&1 + then + log_error "sync command not found, required for --flush-caches" + exit 1 + # Flush file system buffers. + elif ! sync + then + # Huh, the sync() function is always successful... + log_error "sync failed, check if sync is properly installed" + fi + + # Locate sysctl, ensure it exists. + if ! my_which sysctl > /dev/null 2>&1 + then + log_error "sysctl command not found, required for --flush-caches" + exit 1 + # Purge page cache, dentries and inodes. + elif ! sysctl -q -w vm.drop_caches=3 + then + log_error "sysctl failed, check the error message for details" + exit 1 + fi +elif test $flush_caches -eq 1 +then + log_error "--flush-caches is not supported on this platform" + exit 1 +fi + # # Uncomment the following lines if you want all tables to be automatically # checked and repaired during startup. You should add sensible key_buffer @@ -759,6 +881,31 @@ fi cmd="`mysqld_ld_preload_text`$NOHUP_NICENESS" +# +# Set mysqld's memory interleave policy. +# + +if @TARGET_LINUX@ && test $numa_interleave -eq 1 +then + # Locate numactl, ensure it exists. + if ! my_which numactl > /dev/null 2>&1 + then + log_error "numactl command not found, required for --numa-interleave" + exit 1 + # Attempt to run a command, ensure it works. + elif ! numactl --interleave=all true + then + log_error "numactl failed, check if numactl is properly installed" + fi + + # Launch mysqld with numactl. + cmd="$cmd numactl --interleave=all" +elif test $numa_interleave -eq 1 +then + log_error "--numa-interleave is not supported on this platform" + exit 1 +fi + for i in "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \ "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION" do @@ -766,7 +913,8 @@ do done cmd="$cmd $args" # Avoid 'nohup: ignoring input' warning -test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null" +nohup_redir="" +test -n "$NOHUP_NICENESS" && nohup_redir=" < /dev/null" log_notice "Starting $MYSQLD daemon with databases from $DATADIR" @@ -777,13 +925,28 @@ max_fast_restarts=5 # flag whether a usable sleep command exists have_sleep=1 +# maximum number of wsrep restarts +max_wsrep_restarts=0 + while true do rm -f $safe_mysql_unix_port "$pid_file" # Some extra safety start_time=`date +%M%S` - eval_log_error "$cmd" + # this sets wsrep_start_position_opt + wsrep_recover_position "$cmd" + + [ $? -ne 0 ] && exit 1 # + + [ -n "$wsrep_urls" ] && url=`wsrep_pick_url $wsrep_urls` # check connect address + + if [ -z "$url" ] + then + eval_log_error "$cmd $wsrep_start_position_opt $nohup_redir" + else + eval_log_error "$cmd $wsrep_start_position_opt --wsrep_cluster_address=$url $nohup_redir" + fi if [ $want_syslog -eq 0 -a ! -f "$err_log" ]; then touch "$err_log" # hypothetical: log was renamed but not @@ -853,6 +1016,20 @@ do I=`expr $I + 1` done fi + + if [ -n "$wsrep_restart" ] + then + if [ $wsrep_restart -le $max_wsrep_restarts ] + then + wsrep_restart=`expr $wsrep_restart + 1` + log_notice "WSREP: sleeping 15 seconds before restart" + sleep 15 + else + log_notice "WSREP: not restarting wsrep node automatically" + break + fi + fi + log_notice "mysqld restarted" done diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index c19ea9b17bd3..773bbfdf241b 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -13,6 +13,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +IF(WITH_WSREP) + SET(WSREP_INCLUDES ${CMAKE_SOURCE_DIR}/wsrep) +ENDIF() + INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql @@ -20,6 +24,7 @@ ${CMAKE_SOURCE_DIR}/regex ${ZLIB_INCLUDE_DIR} ${SSL_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/sql +${WSREP_INCLUDES} ) SET(GEN_SOURCES @@ -36,6 +41,21 @@ IF(SSL_DEFINES) ADD_DEFINITIONS(${SSL_DEFINES}) ENDIF() +IF(WITH_WSREP) + SET(WSREP_SOURCES + wsrep_check_opts.cc + wsrep_hton.cc + wsrep_mysqld.cc + wsrep_notify.cc + wsrep_sst.cc + wsrep_utils.cc + wsrep_var.cc + wsrep_binlog.cc + wsrep_applier.cc + wsrep_thd.cc + ) + SET(WSREP_LIB wsrep) +ENDIF() SET (SQL_SOURCE ../sql-common/client.c derror.cc des_key_file.cc @@ -77,6 +97,7 @@ SET (SQL_SOURCE sql_signal.cc rpl_handler.cc mdl.cc sql_admin.cc transaction.cc sys_vars.cc sql_truncate.cc datadict.cc sql_reload.cc + ${WSREP_SOURCES} ${GEN_SOURCES} ${MYSYS_LIBWRAP_SOURCE}) @@ -89,6 +110,7 @@ DTRACE_INSTRUMENT(sql) TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS} mysys dbug strings vio regex ${LIBWRAP} ${LIBCRYPT} ${LIBDL} + ${WSREP_LIB} ${SSL_LIBRARIES}) # diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index 2600b23332d8..da43c227e1cb 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1468,8 +1468,25 @@ Event_job_data::execute(THD *thd, bool drop) saved_master_access= thd->security_ctx->master_access; thd->security_ctx->master_access |= SUPER_ACL; +#ifdef WITH_WSREP + if (WSREP(thd)) { + // sql_print_information("sizeof(LEX) = %d", sizeof(struct LEX)); + // sizeof(LEX) = 4512, so it's relatively safe to allocate it on stack. + LEX lex; + lex.sql_command = SQLCOM_DROP_EVENT; + LEX* saved = thd->lex; + thd->lex = &lex; + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); + thd->lex = saved; + } +#endif + ret= Events::drop_event(thd, dbname, name, FALSE); +#ifdef WITH_WSREP + WSREP_TO_ISOLATION_END; + error: +#endif thd->security_ctx->master_access= saved_master_access; } } diff --git a/sql/events.cc b/sql/events.cc index 25de503300bd..cb410c5647df 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -1097,6 +1097,20 @@ Events::load_events_from_db(THD *thd) delete et; goto end; } +#ifdef WITH_WSREP + // when SST from master node who initials event, the event status is ENABLED + // this is problematic because there are two nodes with same events and both enabled. + if (et->originator != thd->server_id) + { + store_record(table, record[1]); + table->field[ET_FIELD_STATUS]-> + store((longlong) Event_parse_data::SLAVESIDE_DISABLED, + TRUE); + (void) table->file->ha_update_row(table->record[1], table->record[0]); + delete et; + continue; + } +#endif drop_on_completion= (et->on_completion == Event_parse_data::ON_COMPLETION_DROP); @@ -1138,7 +1152,46 @@ Events::load_events_from_db(THD *thd) close_mysql_tables(thd); DBUG_RETURN(ret); } +#ifdef WITH_WSREP +int wsrep_create_event_query(THD *thd, uchar** buf, size_t* buf_len) +{ + String log_query; + + if (create_query_string(thd, &log_query)) + { + WSREP_WARN("events create string failed: %s", thd->query()); + return 1; + } + return wsrep_to_buf_helper(thd, log_query.ptr(), log_query.length(), buf, buf_len); +} +static int +wsrep_alter_query_string(THD *thd, String *buf) +{ + /* Append the "ALTER" part of the query */ + if (buf->append(STRING_WITH_LEN("ALTER "))) + return 1; + /* Append definer */ + append_definer(thd, buf, &(thd->lex->definer->user), &(thd->lex->definer->host)); + /* Append the left part of thd->query after event name part */ + if (buf->append(thd->lex->stmt_definition_begin, + thd->lex->stmt_definition_end - + thd->lex->stmt_definition_begin)) + return 1; + + return 0; +} +int wsrep_alter_event_query(THD *thd, uchar** buf, size_t* buf_len) +{ + String log_query; + if (wsrep_alter_query_string(thd, &log_query)) + { + WSREP_WARN("events alter string failed: %s", thd->query()); + return 1; + } + return wsrep_to_buf_helper(thd, log_query.ptr(), log_query.length(), buf, buf_len); +} +#endif /* WITH_WSREP */ /** @} (End of group Event_Scheduler) */ diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index aadac36e2ee8..58c4e98db749 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -302,7 +302,13 @@ const char *ha_partition::table_type() const // we can do this since we only support a single engine type return m_file[0]->table_type(); } - +#ifdef WITH_WSREP +int ha_partition::wsrep_db_type() const +{ + // we can do this since we only support a single engine type + return ha_legacy_type(m_file[0]->ht); +} +#endif /* WITH_WSREP */ /* Destructor method diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 153e610d86f9..9438a69f4e56 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -1156,6 +1156,9 @@ class ha_partition :public handler ------------------------------------------------------------------------- virtual void append_create_info(String *packet) */ +#ifdef WITH_WSREP + virtual int wsrep_db_type() const; +#endif /* WITH_WSREP */ }; #endif /* HA_PARTITION_INCLUDED */ diff --git a/sql/handler.cc b/sql/handler.cc index 6307e95a194d..f2b17639f9c9 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -44,6 +44,9 @@ #ifdef WITH_PARTITION_STORAGE_ENGINE #include "ha_partition.h" #endif +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#endif /* @@ -1269,7 +1272,12 @@ int ha_commit_trans(THD *thd, bool all) mdl_request.init(MDL_key::COMMIT, "", "", MDL_INTENTION_EXCLUSIVE, MDL_EXPLICIT); +#ifdef WITH_WSREP + if (!WSREP(thd) && + thd->mdl_context.acquire_lock(&mdl_request, +#else if (thd->mdl_context.acquire_lock(&mdl_request, +#endif /* WITH_WSREP */ thd->variables.lock_wait_timeout)) { ha_rollback_trans(thd, all); @@ -1309,12 +1317,45 @@ int ha_commit_trans(THD *thd, bool all) */ if ((err= ht->prepare(ht, thd, all))) { +#ifdef WITH_WSREP + if (WSREP(thd) && ht->db_type== DB_TYPE_WSREP) + { + error= 1; + switch (err) + { + case WSREP_TRX_SIZE_EXCEEDED: + /* give user size exeeded erro from wsrep_api.h */ + my_error(ER_ERROR_DURING_COMMIT, MYF(0), WSREP_SIZE_EXCEEDED); + break; + case WSREP_TRX_CERT_FAIL: + case WSREP_TRX_ERROR: + /* avoid sending error, if we need to replay */ + if (thd->wsrep_conflict_state!= MUST_REPLAY) + { + my_error(ER_LOCK_DEADLOCK, MYF(0), err); + } + } + } + else + { + /* not wsrep hton, bail to native mysql behavior */ +#endif /* WITH_WSREP */ my_error(ER_ERROR_DURING_COMMIT, MYF(0), err); error= 1; +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ } status_var_increment(thd->status_var.ha_prepare_count); } DBUG_EXECUTE_IF("crash_commit_after_prepare", DBUG_SUICIDE();); +#ifdef WITH_WSREP + if (!error && wsrep_is_wsrep_xid(&thd->transaction.xid_state.xid)) + { + // xid was rewritten by wsrep + xid= wsrep_xid_seqno(&thd->transaction.xid_state.xid); + } +#endif /* WITH_WSREP */ if (error || (is_real_trans && xid && (error= !(cookie= tc_log->log_xid(thd, xid))))) { @@ -1383,6 +1424,17 @@ int ha_commit_one_phase(THD *thd, bool all) bool is_real_trans=all || thd->transaction.all.ha_list == 0; Ha_trx_info *ha_info= trans->ha_list, *ha_info_next; DBUG_ENTER("ha_commit_one_phase"); +#ifdef WITH_WSREP +#ifdef WSREP_PROC_INFO + char info[64]= { 0, }; + snprintf (info, sizeof(info) - 1, "ha_commit_one_phase(%lld)", + (long long)wsrep_thd_trx_seqno(thd)); +#else + const char info[]="ha_commit_one_phase()"; +#endif /* WSREP_PROC_INFO */ + char* tmp_info= NULL; + if (WSREP(thd)) tmp_info= (char *)thd_proc_info(thd, info); +#endif /* WITH_WSREP */ if (ha_info) { @@ -1411,7 +1463,10 @@ int ha_commit_one_phase(THD *thd, bool all) } /* Free resources and perform other cleanup even for 'empty' transactions. */ if (is_real_trans) - thd->transaction.cleanup(); + thd->transaction.cleanup(); +#ifdef WITH_WSREP + if (WSREP(thd)) thd_proc_info(thd, tmp_info); +#endif /* WITH_WSREP */ DBUG_RETURN(error); } @@ -1492,7 +1547,7 @@ int ha_rollback_trans(THD *thd, bool all) /* Always cleanup. Even if nht==0. There may be savepoints. */ if (is_real_trans) - thd->transaction.cleanup(); + thd->transaction.cleanup(); if (all) thd->transaction_rollback_request= FALSE; @@ -1653,7 +1708,13 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin, got, ha_resolve_storage_engine_name(hton)); for (int i=0; i < got; i ++) { +#ifdef WITH_WSREP + my_xid x=(wsrep_is_wsrep_xid(&info->list[i]) ? + wsrep_xid_seqno(&info->list[i]) : + info->list[i].get_my_xid()); +#else my_xid x=info->list[i].get_my_xid(); +#endif /* WITH_WSREP */ if (!x) // not "mine" - that is generated by external TM { #ifndef DBUG_OFF @@ -1722,7 +1783,9 @@ int ha_recover(HASH *commit_list) for now, only InnoDB supports 2pc. It means we can always safely rollback all pending transactions, without risking inconsistent data */ +#ifndef WITH_WSREP DBUG_ASSERT(total_ha_2pc == (ulong) opt_bin_log+1); // only InnoDB and binlog +#endif tc_heuristic_recover= TC_HEURISTIC_RECOVER_ROLLBACK; // forcing ROLLBACK info.dry_run=FALSE; #endif @@ -2636,7 +2699,12 @@ int handler::update_auto_increment() variables->auto_increment_increment); auto_inc_intervals_count++; /* Row-based replication does not need to store intervals in binlog */ +#ifdef WITH_WSREP + if (((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()) && + !thd->is_current_stmt_binlog_format_row()) +#else if (mysql_bin_log.is_open() && !thd->is_current_stmt_binlog_format_row()) +#endif /* WITH_WSREP */ thd->auto_inc_intervals_in_cur_stmt_for_binlog.append(auto_inc_interval_for_cur_row.minimum(), auto_inc_interval_for_cur_row.values(), variables->auto_increment_increment); @@ -4964,7 +5032,11 @@ static bool check_table_binlog_row_based(THD *thd, TABLE *table) return (thd->is_current_stmt_binlog_format_row() && table->s->cached_row_logging_check && (thd->variables.option_bits & OPTION_BIN_LOG) && +#ifdef WITH_WSREP + ((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open())); +#else mysql_bin_log.is_open()); +#endif } @@ -5061,6 +5133,17 @@ static int binlog_log_row(TABLE* table, bool error= 0; THD *const thd= table->in_use; +#ifdef WITH_WSREP + /* only InnoDB tables will be replicated through binlog emulation */ + if (WSREP_EMULATE_BINLOG(thd) && + table->file->ht->db_type != DB_TYPE_INNODB && + !(table->file->ht->db_type == DB_TYPE_PARTITION_DB && + (((ha_partition*)(table->file))->wsrep_db_type() == DB_TYPE_INNODB))) + // !strcmp(table->file->table_type(), "InnoDB")) + { + return 0; + } +#endif /* WITH_WSREP */ if (check_table_binlog_row_based(thd, table)) { MY_BITMAP cols; @@ -5284,6 +5367,64 @@ void signal_log_not_needed(struct handlerton, char *log_file) } +#ifdef WITH_WSREP +/** + @details + This function makes the storage engine to force the victim transaction + to abort. Currently, only innodb has this functionality, but any SE + implementing the wsrep API should provide this service to support + multi-master operation. + + @param bf_thd brute force THD asking for the abort + @param victim_thd victim THD to be aborted + + @return + always 0 +*/ + +int ha_wsrep_abort_transaction(THD *bf_thd, THD *victim_thd, my_bool signal) +{ + DBUG_ENTER("ha_wsrep_abort_transaction"); + if (!WSREP(bf_thd) && + !(wsrep_OSU_method_options == WSREP_OSU_RSU && + bf_thd->wsrep_exec_mode == TOTAL_ORDER)) { + DBUG_RETURN(0); + } + + handlerton *hton= installed_htons[DB_TYPE_INNODB]; + if (hton && hton->wsrep_abort_transaction) + { + hton->wsrep_abort_transaction(hton, bf_thd, victim_thd, signal); + } + else + { + WSREP_WARN("cannot abort InnoDB transaction"); + } + + DBUG_RETURN(0); +} + +void ha_wsrep_fake_trx_id(THD *thd) +{ + DBUG_ENTER("ha_wsrep_fake_trx_id"); + if (!WSREP(thd)) + { + DBUG_VOID_RETURN; + } + + handlerton *hton= installed_htons[DB_TYPE_INNODB]; + if (hton && hton->wsrep_fake_trx_id) + { + hton->wsrep_fake_trx_id(hton, thd); + } + else + { + WSREP_WARN("cannot get get fake InnoDB transaction ID"); + } + + DBUG_VOID_RETURN; +} +#endif /* WITH_WSREP */ #ifdef TRANS_LOG_MGM_EXAMPLE_CODE /* Example of transaction log management functions based on assumption that logs diff --git a/sql/handler.h b/sql/handler.h index 5eb2d6b440a8..53155f6263bb 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -326,6 +326,7 @@ enum legacy_db_type DB_TYPE_MARIA, /** Performance schema engine. */ DB_TYPE_PERFORMANCE_SCHEMA, + DB_TYPE_WSREP, DB_TYPE_FIRST_DYNAMIC=42, DB_TYPE_DEFAULT=127 // Must be last }; @@ -819,6 +820,11 @@ struct handlerton const char *wild, bool dir, List *files); int (*table_exists_in_engine)(handlerton *hton, THD* thd, const char *db, const char *name); + int (*wsrep_abort_transaction)(handlerton *hton, THD *bf_thd, + THD *victim_thd, my_bool signal); + int (*wsrep_set_checkpoint)(handlerton *hton, const XID* xid); + int (*wsrep_get_checkpoint)(handlerton *hton, XID* xid); + void (*wsrep_fake_trx_id)(handlerton *hton, THD *thd); /** List of all system tables specific to the SE. @@ -2225,6 +2231,9 @@ class handler :public Sql_alloc extern const char *ha_row_type[]; extern MYSQL_PLUGIN_IMPORT const char *tx_isolation_names[]; extern MYSQL_PLUGIN_IMPORT const char *binlog_format_names[]; +#ifdef WITH_WSREP +extern MYSQL_PLUGIN_IMPORT const char *wsrep_binlog_format_names[]; +#endif /* WITH_WSREP */ extern TYPELIB tx_isolation_typelib; extern const char *myisam_stats_method_names[]; extern ulong total_ha, total_ha_2pc; @@ -2320,6 +2329,10 @@ int ha_enable_transaction(THD *thd, bool on); int ha_rollback_to_savepoint(THD *thd, SAVEPOINT *sv); int ha_savepoint(THD *thd, SAVEPOINT *sv); int ha_release_savepoint(THD *thd, SAVEPOINT *sv); +#ifdef WITH_WSREP +int ha_wsrep_abort_transaction(THD *bf_thd, THD *victim_thd, my_bool signal); +void ha_wsrep_fake_trx_id(THD *thd); +#endif /* WITH_WSREP */ /* these are called by storage engines */ void trans_register_ha(THD *thd, bool all, handlerton *ht); @@ -2350,6 +2363,9 @@ int ha_binlog_end(THD *thd); #define ha_binlog_wait(a) do {} while (0) #define ha_binlog_end(a) do {} while (0) #endif +#ifdef WITH_WSREP +void wsrep_brute_force_aborts(); +#endif const char *get_canonical_filename(handler *file, const char *path, char *tmp_path); diff --git a/sql/item_func.cc b/sql/item_func.cc index 3e3079f317f7..9dbf85133221 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2435,7 +2435,19 @@ void Item_func_rand::seed_random(Item *arg) TODO: do not do reinit 'rand' for every execute of PS/SP if args[0] is a constant. */ +#ifdef WITH_WSREP + uint32 tmp; + if (WSREP(current_thd)) + { + if (current_thd->wsrep_exec_mode==REPL_RECV) + tmp= current_thd->wsrep_rand; + else + tmp= current_thd->wsrep_rand= (uint32) arg->val_int(); + } else + tmp= (uint32) arg->val_int(); +#else uint32 tmp= (uint32) arg->val_int(); +#endif randominit(rand, (uint32) (tmp*0x10001L+55555555L), (uint32) (tmp*0x10000001L)); } diff --git a/sql/lock.cc b/sql/lock.cc index 65a51bfc0fb7..a2b4e08d3ce3 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -83,6 +83,10 @@ #include #include +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#endif /* WITH_WSREP */ + /** @defgroup Locking Locking @{ @@ -309,6 +313,10 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **tables, uint count, uint flags) /* Copy the lock data array. thr_multi_lock() reorders its contents. */ memcpy(sql_lock->locks + sql_lock->lock_count, sql_lock->locks, sql_lock->lock_count * sizeof(*sql_lock->locks)); +#ifdef WITH_WSREP + //thd->main_lock_id.info->in_lock_tables= thd->in_lock_tables; + thd->lock_info.in_lock_tables= thd->in_lock_tables; +#endif /* Lock on the copied half of the lock data array. */ /* Lock on the copied half of the lock data array. */ rc= thr_lock_errno_to_mysql[(int) thr_multi_lock(sql_lock->locks + sql_lock->lock_count, @@ -323,7 +331,11 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **tables, uint count, uint flags) my_error(rc, MYF(0)); } end: +#ifdef WITH_WSREP + thd_proc_info(thd, "mysql_lock_tables(): unlocking tables II"); +#else /* WITH_WSREP */ thd_proc_info(thd, 0); +#endif /* WITH_WSREP */ if (thd->killed) { @@ -336,6 +348,9 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **tables, uint count, uint flags) } thd->set_time_after_lock(); +#ifdef WITH_WSREP + thd_proc_info(thd, "exit mysqld_lock_tables()"); +#endif /* WITH_WSREP */ DBUG_RETURN(sql_lock); } @@ -1007,11 +1022,15 @@ void Global_read_lock::unlock_global_read_lock(THD *thd) { thd->mdl_context.release_lock(m_mdl_blocks_commits_lock); m_mdl_blocks_commits_lock= NULL; +#ifdef WITH_WSREP + wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED; + wsrep->resume(wsrep); +#endif /* WITH_WSREP */ } thd->mdl_context.release_lock(m_mdl_global_shared_lock); m_mdl_global_shared_lock= NULL; m_state= GRL_NONE; - + DBUG_VOID_RETURN; } @@ -1039,6 +1058,20 @@ bool Global_read_lock::make_global_read_lock_block_commit(THD *thd) If we didn't succeed lock_global_read_lock(), or if we already suceeded make_global_read_lock_block_commit(), do nothing. */ + +#ifdef WITH_WSREP + if (m_mdl_blocks_commits_lock) + { + WSREP_DEBUG("GRL was in block commit mode when entering " + "make_global_read_lock_block_commit"); + thd->mdl_context.release_lock(m_mdl_blocks_commits_lock); + m_mdl_blocks_commits_lock= NULL; + wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED; + wsrep->resume(wsrep); + m_state= GRL_ACQUIRED; + } +#endif /* WITH_WSREP */ + if (m_state != GRL_ACQUIRED) DBUG_RETURN(0); @@ -1051,6 +1084,22 @@ bool Global_read_lock::make_global_read_lock_block_commit(THD *thd) m_mdl_blocks_commits_lock= mdl_request.ticket; m_state= GRL_ACQUIRED_AND_BLOCKS_COMMIT; +#ifdef WITH_WSREP + long long ret = wsrep->pause(wsrep); + if (ret >= 0) + { + wsrep_locked_seqno= ret; + } + else if (ret != -ENOSYS) /* -ENOSYS - no provider */ + { + WSREP_ERROR("Failed to pause provider: %lld (%s)", -ret, strerror(-ret)); + + /* m_mdl_blocks_commits_lock is always NULL here */ + wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED; + my_error(ER_LOCK_DEADLOCK, MYF(0)); + DBUG_RETURN(TRUE); + } +#endif /* WITH_WSREP */ DBUG_RETURN(FALSE); } diff --git a/sql/log.cc b/sql/log.cc index d322abcd742d..655cff5d41e5 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -50,6 +50,9 @@ #include "sql_plugin.h" #include "rpl_handler.h" +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#endif /* WITH_WSREP */ #include "debug_sync.h" /* max size of the log message */ #define MAX_LOG_BUFFER_SIZE 1024 @@ -458,6 +461,63 @@ class binlog_cache_mngr { handlerton *binlog_hton; +#if WITH_WSREP +/* the functions below depend on the definition of binlog_cache_manager class, + * so have to stay in this unit. */ +IO_CACHE * get_trans_log(THD * thd) +{ + binlog_cache_mngr *cache_mngr = (binlog_cache_mngr*) + thd_get_ha_data(thd, binlog_hton); + if (cache_mngr) + { + return cache_mngr->get_binlog_cache_log(true); + } + else + { + WSREP_DEBUG("binlog cache not initialized, conn :%ld", thd->thread_id); + return NULL; + } +} + +bool wsrep_trans_cache_is_empty(THD *thd) +{ + binlog_cache_mngr *const cache_mngr= + (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); + return (!cache_mngr || cache_mngr->trx_cache.empty()); +} + +void thd_binlog_flush_pending_rows_event(THD *thd, bool stmt_end) +{ + thd->binlog_flush_pending_rows_event(stmt_end); +} + +void thd_binlog_trx_reset(THD * thd) +{ + /* + todo: fix autocommit select to not call the caller + */ + if (thd_get_ha_data(thd, binlog_hton) != NULL) + { + binlog_cache_mngr *const cache_mngr= + (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); + if (cache_mngr) + { + cache_mngr->reset_cache(&cache_mngr->stmt_cache); + cache_mngr->reset_cache(&cache_mngr->trx_cache); + } + } + thd->clear_binlog_table_maps(); +} + +void thd_binlog_rollback_stmt(THD * thd) +{ + WSREP_DEBUG("thd_binlog_rollback_stmt :%ld", thd->thread_id); + binlog_cache_mngr *const cache_mngr= + (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); + if (cache_mngr) cache_mngr->trx_cache.set_prev_position(MY_OFF_T_UNDEF); +} +#endif /* WITH_WSREP */ + bool LOGGER::is_log_table_enabled(uint log_table_type) { switch (log_table_type) { @@ -1521,7 +1581,11 @@ binlog_trans_log_savepos(THD *thd, my_off_t *pos) thd->binlog_setup_trx_data(); binlog_cache_mngr *const cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); +#ifdef WITH_WSREP + DBUG_ASSERT((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()); +#else DBUG_ASSERT(mysql_bin_log.is_open()); +#endif *pos= cache_mngr->trx_cache.get_byte_position(); DBUG_PRINT("return", ("*pos: %lu", (ulong) *pos)); DBUG_VOID_RETURN; @@ -1569,7 +1633,16 @@ binlog_trans_log_truncate(THD *thd, my_off_t pos) int binlog_init(void *p) { binlog_hton= (handlerton *)p; +#ifdef WITH_WSREP + if (WSREP_ON) + binlog_hton->state= SHOW_OPTION_YES; + else + { +#endif /* WITH_WSREP */ binlog_hton->state=opt_bin_log ? SHOW_OPTION_YES : SHOW_OPTION_NO; +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ binlog_hton->db_type=DB_TYPE_BINLOG; binlog_hton->savepoint_offset= sizeof(my_off_t); binlog_hton->close_connection= binlog_close_connection; @@ -1666,6 +1739,13 @@ binlog_commit_flush_stmt_cache(THD *thd, static inline int binlog_commit_flush_trx_cache(THD *thd, binlog_cache_mngr *cache_mngr) { +#ifdef WITH_WSREP + if (thd->wsrep_mysql_replicated > 0) + { + WSREP_DEBUG("avoiding binlog_commit_flush_trx_cache: %d", thd->wsrep_mysql_replicated); + return 0; + } +#endif Query_log_event end_evt(thd, STRING_WITH_LEN("COMMIT"), TRUE, FALSE, TRUE, 0); return (binlog_flush_cache(thd, &cache_mngr->trx_cache, &end_evt, @@ -1791,6 +1871,9 @@ static int binlog_commit(handlerton *hton, THD *thd, bool all) DBUG_ENTER("binlog_commit"); binlog_cache_mngr *const cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); +#ifdef WITH_WSREP + if (!cache_mngr) DBUG_RETURN(0); +#endif /* WITH_WSREP */ DBUG_PRINT("debug", ("all: %d, in_transaction: %s, all.modified_non_trans_table: %s, stmt.modified_non_trans_table: %s", @@ -1847,6 +1930,9 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all) int error= 0; binlog_cache_mngr *const cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); +#ifdef WITH_WSREP + if (!cache_mngr) DBUG_RETURN(0); +#endif /* WITH_WSREP */ DBUG_PRINT("debug", ("all: %s, all.modified_non_trans_table: %s, stmt.modified_non_trans_table: %s", YESNO(all), @@ -1875,8 +1961,12 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all) cache_mngr->reset_cache(&cache_mngr->trx_cache); DBUG_RETURN(error); } - +#ifdef WITH_WSREP + if (!wsrep_emulate_bin_log && + mysql_bin_log.check_write_error(thd)) +#else if (mysql_bin_log.check_write_error(thd)) +#endif { /* "all == true" means that a "rollback statement" triggered the error and @@ -1906,12 +1996,12 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all) if (ending_trans(thd, all) && ((thd->variables.option_bits & OPTION_KEEP_LOG) || (trans_has_updated_non_trans_table(thd) && - thd->variables.binlog_format == BINLOG_FORMAT_STMT) || + WSREP_BINLOG_FORMAT(thd->variables.binlog_format) == BINLOG_FORMAT_STMT) || (cache_mngr->trx_cache.changes_to_non_trans_temp_table() && - thd->variables.binlog_format == BINLOG_FORMAT_MIXED) || + WSREP_BINLOG_FORMAT(thd->variables.binlog_format) == BINLOG_FORMAT_MIXED) || (trans_has_updated_non_trans_table(thd) && ending_single_stmt_trans(thd,all) && - thd->variables.binlog_format == BINLOG_FORMAT_MIXED))) + WSREP_BINLOG_FORMAT(thd->variables.binlog_format) == BINLOG_FORMAT_MIXED))) error= binlog_rollback_flush_trx_cache(thd, cache_mngr); /* Truncate the cache if: @@ -1925,9 +2015,9 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all) else if (ending_trans(thd, all) || (!(thd->variables.option_bits & OPTION_KEEP_LOG) && (!stmt_has_updated_non_trans_table(thd) || - thd->variables.binlog_format != BINLOG_FORMAT_STMT) && + WSREP_BINLOG_FORMAT(thd->variables.binlog_format) != BINLOG_FORMAT_STMT) && (!cache_mngr->trx_cache.changes_to_non_trans_temp_table() || - thd->variables.binlog_format != BINLOG_FORMAT_MIXED))) + WSREP_BINLOG_FORMAT(thd->variables.binlog_format) != BINLOG_FORMAT_MIXED))) error= binlog_truncate_trx_cache(thd, cache_mngr, all); } @@ -2027,6 +2117,9 @@ static int binlog_savepoint_set(handlerton *hton, THD *thd, void *sv) log_query.length(0); /* Write it to the binary log */ +#ifdef WITH_WSREP + if (wsrep_emulate_bin_log) DBUG_RETURN(0); +#endif /* WITH_WSREP */ if (log_query.append(STRING_WITH_LEN("SAVEPOINT "))) DBUG_RETURN(1); @@ -2049,7 +2142,12 @@ static int binlog_savepoint_rollback(handlerton *hton, THD *thd, void *sv) non-transactional table. Otherwise, truncate the binlog cache starting from the SAVEPOINT command. */ +#ifdef WITH_WSREP + if (!wsrep_emulate_bin_log && + unlikely(trans_has_updated_non_trans_table(thd) || +#else if (unlikely(trans_has_updated_non_trans_table(thd) || +#endif (thd->variables.option_bits & OPTION_KEEP_LOG))) { // buffer to store rollback query with quoted identifier @@ -4637,6 +4735,7 @@ int THD::binlog_setup_trx_data() DBUG_RETURN(0); } + /* Function to start a statement and optionally a transaction for the binary log. @@ -4733,7 +4832,12 @@ int THD::binlog_write_table_map(TABLE *table, bool is_transactional) table->s->table_map_id)); /* Pre-conditions */ +#ifdef WITH_WSREP + DBUG_ASSERT(is_current_stmt_binlog_format_row() && + (WSREP_EMULATE_BINLOG(this) || mysql_bin_log.is_open())); +#else DBUG_ASSERT(is_current_stmt_binlog_format_row() && mysql_bin_log.is_open()); +#endif DBUG_ASSERT(table->s->table_map_id != ULONG_MAX); Table_map_log_event @@ -4862,7 +4966,11 @@ MYSQL_BIN_LOG::flush_and_set_pending_rows_event(THD *thd, bool is_transactional) { DBUG_ENTER("MYSQL_BIN_LOG::flush_and_set_pending_rows_event(event)"); +#ifdef WITH_WSREP + DBUG_ASSERT(WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()); +#else DBUG_ASSERT(mysql_bin_log.is_open()); +#endif DBUG_PRINT("enter", ("event: 0x%lx", (long) event)); int error= 0; @@ -4946,7 +5054,11 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info) mostly called if is_open() *was* true a few instructions before, but it could have changed since. */ +#ifdef WITH_WSREP + if ((WSREP(thd) && wsrep_emulate_bin_log) || is_open()) +#else if (likely(is_open())) +#endif { #ifdef HAVE_REPLICATION /* @@ -5191,6 +5303,15 @@ int MYSQL_BIN_LOG::rotate(bool force_rotate, bool* check_purge) { int error= 0; DBUG_ENTER("MYSQL_BIN_LOG::rotate"); +#ifdef WITH_WSREP + if (WSREP_ON && wsrep_to_isolation) + { + *check_purge= false; + WSREP_DEBUG("avoiding binlog rotate due to TO isolation: %d", + wsrep_to_isolation); + DBUG_RETURN(0); + } +#endif //todo: fix the macro def and restore safe_mutex_assert_owner(&LOCK_log); *check_purge= false; @@ -5507,6 +5628,9 @@ bool MYSQL_BIN_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event, bool incident) { DBUG_ENTER("MYSQL_BIN_LOG::write(THD *, IO_CACHE *, Log_event *)"); +#ifdef WITH_WSREP + if (wsrep_emulate_bin_log) DBUG_RETURN(0); +#endif /* WITH_WSREP */ DBUG_ASSERT(is_open()); if (likely(is_open())) // Should always be true @@ -6124,8 +6248,14 @@ int TC_LOG_MMAP::open(const char *opt_name) mysql_mutex_init(key_PAGE_lock, &pg->lock, MY_MUTEX_INIT_FAST); mysql_cond_init(key_PAGE_cond, &pg->cond, 0); pg->start=(my_xid *)(data + i*tc_log_page_size); +#ifdef WITH_WSREP + if (!WSREP_ON) +#endif /* WITH_WSREP */ pg->end=(my_xid *)(pg->start + tc_log_page_size); pg->size=pg->free=tc_log_page_size/sizeof(my_xid); +#ifdef WITH_WSREP + if (WSREP_ON) pg->end=pg->start + pg->size; +#endif /* WITH_WSREP */ } pages[0].size=pages[0].free= (tc_log_page_size-TC_LOG_HEADER_SIZE)/sizeof(my_xid); @@ -6621,6 +6751,13 @@ int TC_LOG_BINLOG::log_xid(THD *thd, my_xid xid) DBUG_ENTER("TC_LOG_BINLOG::log"); binlog_cache_mngr *cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); +#ifdef WITH_WSREP + if (!cache_mngr) + { + WSREP_DEBUG("Skipping empty log_xid: %s", thd->query()); + DBUG_RETURN(1); + } +#endif /* WITH_WSREP */ /* We always commit the entire transaction when writing an XID. Also note that the return value is inverted. diff --git a/sql/log.h b/sql/log.h index 1fc13afe7d18..ada45dd5567b 100644 --- a/sql/log.h +++ b/sql/log.h @@ -679,12 +679,29 @@ class LOGGER }; enum enum_binlog_format { + /* + statement-based except for cases where only row-based can work (UUID() + etc): + */ BINLOG_FORMAT_MIXED= 0, ///< statement if safe, otherwise row - autodetected BINLOG_FORMAT_STMT= 1, ///< statement-based BINLOG_FORMAT_ROW= 2, ///< row-based BINLOG_FORMAT_UNSPEC=3 ///< thd_binlog_format() returns it when binlog is closed }; +#ifdef WITH_WSREP +IO_CACHE* get_trans_log(THD * thd); +bool wsrep_trans_cache_is_empty(THD *thd); +void thd_binlog_flush_pending_rows_event(THD *thd, bool stmt_end); +void thd_binlog_trx_reset(THD * thd); +void thd_binlog_rollback_stmt(THD * thd); + +#define WSREP_BINLOG_FORMAT(my_format) \ + ((wsrep_forced_binlog_format != BINLOG_FORMAT_UNSPEC) ? \ + wsrep_forced_binlog_format : my_format) +#else +#define WSREP_BINLOG_FORMAT(my_format) my_format +#endif int query_error_code(THD *thd, bool not_killed); uint purge_log_get_error_code(int res); diff --git a/sql/log_event.cc b/sql/log_event.cc index 4f55d08933e3..70f597994cab 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -48,6 +48,9 @@ #include #include "sql_show.h" // append_identifier +#if WITH_WSREP +#include "wsrep_mysqld.h" +#endif #endif /* MYSQL_CLIENT */ #include @@ -2533,7 +2536,14 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg, master_data_written(0) { time_t end_time; - +#ifdef WITH_WSREP + /* + If Query_log_event will contain non trans keyword (not BEGIN, COMMIT, + SAVEPOINT or ROLLBACK) we disable PA for this transaction. + */ + if (!is_trans_keyword()) + thd->wsrep_PA_safe= false; +#endif /* WITH_WSREP */ memset(&user, 0, sizeof(user)); memset(&host, 0, sizeof(host)); @@ -3696,6 +3706,21 @@ Query_log_event::do_shall_skip(Relay_log_info *rli) DBUG_RETURN(Log_event::EVENT_SKIP_COUNT); } } +#ifdef WITH_WSREP + else if (wsrep_mysql_replication_bundle && WSREP_ON && thd->wsrep_mysql_replicated > 0 && + (!strncasecmp(query , "BEGIN", 5) || !strncasecmp(query , "COMMIT", 6))) + { + if (++thd->wsrep_mysql_replicated < (int)wsrep_mysql_replication_bundle) + { + WSREP_DEBUG("skipping wsrep commit %d", thd->wsrep_mysql_replicated); + DBUG_RETURN(Log_event::EVENT_SKIP_IGNORE); + } + else + { + thd->wsrep_mysql_replicated = 0; + } + } +#endif DBUG_RETURN(Log_event::do_shall_skip(rli)); } @@ -5776,6 +5801,20 @@ Xid_log_event::do_shall_skip(Relay_log_info *rli) thd->variables.option_bits&= ~OPTION_BEGIN; DBUG_RETURN(Log_event::EVENT_SKIP_COUNT); } +#ifdef WITH_WSREP + else if (wsrep_mysql_replication_bundle && WSREP_ON) + { + if (++thd->wsrep_mysql_replicated < (int)wsrep_mysql_replication_bundle) + { + WSREP_DEBUG("skipping wsrep commit %d", thd->wsrep_mysql_replicated); + DBUG_RETURN(Log_event::EVENT_SKIP_IGNORE); + } + else + { + thd->wsrep_mysql_replicated = 0; + } + } +#endif DBUG_RETURN(Log_event::do_shall_skip(rli)); } #endif /* !MYSQL_CLIENT */ @@ -6756,7 +6795,14 @@ int Create_file_log_event::do_apply_event(Relay_log_info const *rli) end_io_cache(&file); if (fd >= 0) mysql_file_close(fd, MYF(0)); +#ifdef WITH_WSREP + if (WSREP(thd)) + thd_proc_info(thd, "exit Create_file_log_event::do_apply_event()"); + else + thd_proc_info(thd, 0); +#else /* WITH_WSREP */ thd_proc_info(thd, 0); +#endif /* WITH_WSREP */ return error != 0; } #endif /* defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) */ @@ -6927,7 +6973,14 @@ int Append_block_log_event::do_apply_event(Relay_log_info const *rli) err: if (fd >= 0) mysql_file_close(fd, MYF(0)); +#ifdef WITH_WSREP + if (WSREP(thd)) + thd_proc_info(thd, "exit Append_block_log_event::do_apply_event()"); + else + thd_proc_info(thd, 0); +#else /* WITH_WSREP */ thd_proc_info(thd, 0); +#endif /* WITH_WSREP */ DBUG_RETURN(error); } #endif @@ -7901,10 +7954,21 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli) thd->variables.option_bits&= ~OPTION_RELAXED_UNIQUE_CHECKS; /* A small test to verify that objects have consistent types */ DBUG_ASSERT(sizeof(thd->variables.option_bits) == sizeof(OPTION_RELAXED_UNIQUE_CHECKS)); - if (open_and_lock_tables(thd, rli->tables_to_lock, FALSE, 0)) { uint actual_error= thd->stmt_da->sql_errno(); +#ifdef WITH_WSREP + if (WSREP(thd)) + { + WSREP_WARN("BF applier failed to open_and_lock_tables: %u, fatal: %d " + "wsrep = (exec_mode: %d conflict_state: %d seqno: %lld)", + thd->stmt_da->sql_errno(), + thd->is_fatal_error, + thd->wsrep_exec_mode, + thd->wsrep_conflict_state, + (long long)wsrep_thd_trx_seqno(thd)); + } +#endif if (thd->is_slave_error || thd->is_fatal_error) { /* @@ -8782,8 +8846,12 @@ check_table_map(Relay_log_info const *rli, RPL_TABLE_LIST *table_list) { DBUG_ENTER("check_table_map"); enum_tbl_map_status res= OK_TO_PROCESS; - +#ifdef WITH_WSREP + if ((rli->sql_thd->slave_thread /* filtering is for slave only */ || + (WSREP(rli->sql_thd) && rli->sql_thd->wsrep_applier)) && +#else if (rli->sql_thd->slave_thread /* filtering is for slave only */ && +#endif /* WITH_WSREP */ (!rpl_filter->db_ok(table_list->db) || (rpl_filter->is_on() && !rpl_filter->tables_ok("", table_list)))) res= FILTERED_OUT; @@ -9479,8 +9547,23 @@ int Write_rows_log_event::do_exec_row(const Relay_log_info *const rli) { DBUG_ASSERT(m_table != NULL); +#ifdef WITH_WSREP +#ifdef WSREP_PROC_INFO + char info[64]; + info[sizeof(info) - 1] = '\0'; + snprintf(info, sizeof(info) - 1, "Write_rows_log_event::write_row(%lld)", + (long long) wsrep_thd_trx_seqno(thd)); + const char* tmp = (WSREP(thd)) ? thd_proc_info(thd, info) : NULL; +#else + const char* tmp = (WSREP(thd)) ? + thd_proc_info(thd,"Write_rows_log_event::write_row()") : NULL; +#endif /* WSREP_PROC_INFO */ +#endif /* WITH_WSREP */ int error= write_row(rli, slave_exec_mode == SLAVE_EXEC_MODE_IDEMPOTENT); +#ifdef WITH_WSREP + if (WSREP(thd)) thd_proc_info(thd, tmp); +#endif /* WITH_WSREP */ if (error && !thd->is_error()) { DBUG_ASSERT(0); @@ -10084,13 +10167,38 @@ int Delete_rows_log_event::do_exec_row(const Relay_log_info *const rli) int error; DBUG_ASSERT(m_table != NULL); +#ifdef WITH_WSREP +#ifdef WSREP_PROC_INFO + char info[64]; + info[sizeof(info) - 1] = '\0'; + snprintf(info, sizeof(info) - 1, "Delete_rows_log_event::find_row(%lld)", + (long long) wsrep_thd_trx_seqno(thd)); + const char* tmp = (WSREP(thd)) ? thd_proc_info(thd, info) : NULL; +#else + const char* tmp = (WSREP(thd)) ? + thd_proc_info(thd,"Delete_rows_log_event::find_row()") : NULL; +#endif /* WSREP_PROC_INFO */ +#endif /* WITH_WSREP */ if (!(error= find_row(rli))) { /* Delete the record found, located in record[0] */ +#ifdef WITH_WSREP +#ifdef WSREP_PROC_INFO + snprintf(info, sizeof(info) - 1, + "Delete_rows_log_event::ha_delete_row(%lld)", + (long long) wsrep_thd_trx_seqno(thd)); + if (WSREP(thd)) thd_proc_info(thd, info); +#else + if (WSREP(thd)) thd_proc_info(thd,"Delete_rows_log_event::ha_delete_row()"); +#endif /* WSREP_PROC_INFO */ +#endif /* WITH_WSREP */ error= m_table->file->ha_delete_row(m_table->record[0]); } +#ifdef WITH_WSREP + if (WSREP(thd)) thd_proc_info(thd, tmp); +#endif /* WITH_WSREP */ return error; } @@ -10213,6 +10321,18 @@ Update_rows_log_event::do_exec_row(const Relay_log_info *const rli) { DBUG_ASSERT(m_table != NULL); +#ifdef WITH_WSREP +#ifdef WSREP_PROC_INFO + char info[64]; + info[sizeof(info) - 1] = '\0'; + snprintf(info, sizeof(info) - 1, "Update_rows_log_event::find_row(%lld)", + (long long) wsrep_thd_trx_seqno(thd)); + const char* tmp = (WSREP(thd)) ? thd_proc_info(thd, info) : NULL; +#else + const char* tmp = (WSREP(thd)) ? + thd_proc_info(thd,"Update_rows_log_event::find_row()") : NULL; +#endif /* WSREP_PROC_INFO */ +#endif /* WITH_WSREP */ int error= find_row(rli); if (error) { @@ -10239,6 +10359,17 @@ Update_rows_log_event::do_exec_row(const Relay_log_info *const rli) store_record(m_table,record[1]); m_curr_row= m_curr_row_end; +#ifdef WITH_WSREP +#ifdef WSREP_PROC_INFO + snprintf(info, sizeof(info) - 1, + "Update_rows_log_event::unpack_current_row(%lld)", + (long long) wsrep_thd_trx_seqno(thd)); + if (WSREP(thd)) thd_proc_info(thd, info); +#else + if (WSREP(thd)) + thd_proc_info(thd,"Update_rows_log_event::unpack_current_row()"); +#endif /* WSREP_PROC_INFO */ +#endif /* WITH_WSREP */ /* this also updates m_curr_row_end */ if ((error= unpack_current_row(rli))) return error; @@ -10257,10 +10388,23 @@ Update_rows_log_event::do_exec_row(const Relay_log_info *const rli) DBUG_DUMP("new values", m_table->record[0], m_table->s->reclength); #endif +#ifdef WITH_WSREP +#ifdef WSREP_PROC_INFO + snprintf(info, sizeof(info) - 1, + "Update_rows_log_event::ha_update_row(%lld)", + (long long) wsrep_thd_trx_seqno(thd)); + if (WSREP(thd)) thd_proc_info(thd, info); +#else + if (WSREP(thd)) thd_proc_info(thd,"Update_rows_log_event::ha_update_row()"); +#endif /* WSREP_PROC_INFO */ +#endif /* WITH_WSREP */ error= m_table->file->ha_update_row(m_table->record[1], m_table->record[0]); if (error == HA_ERR_RECORD_IS_THE_SAME) error= 0; +#ifdef WITH_WSREP + if (WSREP(thd)) thd_proc_info(thd, tmp); +#endif /* WITH_WSREP */ return error; } diff --git a/sql/mdl.cc b/sql/mdl.cc index 1a968f278418..cc920e9d15a1 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -20,7 +20,18 @@ #include #include #include - +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#include "wsrep_thd.h" +extern "C" my_thread_id wsrep_thd_thread_id(THD *thd); +extern "C" char *wsrep_thd_query(THD *thd); +void sql_print_information(const char *format, ...) + ATTRIBUTE_FORMAT(printf, 1, 2); + +extern bool +wsrep_grant_mdl_exception(MDL_context *requestor_ctx, + MDL_ticket *ticket); +#endif /* WITH_WSREP */ #ifdef HAVE_PSI_INTERFACE static PSI_mutex_key key_MDL_map_mutex; static PSI_mutex_key key_MDL_wait_LOCK_wait_status; @@ -1253,11 +1264,54 @@ void MDL_lock::Ticket_list::add_ticket(MDL_ticket *ticket) called by other threads. */ DBUG_ASSERT(ticket->get_lock()); +#ifdef WITH_WSREP + if ((this == &(ticket->get_lock()->m_waiting)) && + wsrep_thd_is_BF((void *)(ticket->get_ctx()->get_thd()), false)) + { + Ticket_iterator itw(ticket->get_lock()->m_waiting); + Ticket_iterator itg(ticket->get_lock()->m_granted); + + MDL_ticket *waiting, *granted; + MDL_ticket *prev=NULL; + bool added= false; + + while ((waiting= itw++) && !added) + { + if (!wsrep_thd_is_BF((void *)(waiting->get_ctx()->get_thd()), true)) + { + WSREP_DEBUG("MDL add_ticket inserted before: %lu %s", + wsrep_thd_thread_id(waiting->get_ctx()->get_thd()), + wsrep_thd_query(waiting->get_ctx()->get_thd())); + m_list.insert_after(prev, ticket); + added= true; + } + prev= waiting; + } + if (!added) m_list.push_back(ticket); + + while ((granted= itg++)) + { + if (granted->get_ctx() != ticket->get_ctx() && + granted->is_incompatible_when_granted(ticket->get_type())) + { + if (!wsrep_grant_mdl_exception(ticket->get_ctx(), granted)) + { + WSREP_DEBUG("MDL victim killed at add_ticket"); + } + } + } + } + else + { +#endif /* WITH_WSREP */ /* Add ticket to the *back* of the queue to ensure fairness among requests with the same priority. */ m_list.push_back(ticket); +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ m_bitmap|= MDL_BIT(ticket->get_type()); } @@ -1563,7 +1617,6 @@ MDL_object_lock::m_waiting_incompatible[MDL_TYPE_END] = 0 }; - /** Check if request for the metadata lock can be satisfied given its current state. @@ -1588,6 +1641,9 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg, bool can_grant= FALSE; bitmap_t waiting_incompat_map= incompatible_waiting_types_bitmap()[type_arg]; bitmap_t granted_incompat_map= incompatible_granted_types_bitmap()[type_arg]; +#ifdef WITH_WSREP + bool wsrep_can_grant= TRUE; +#endif /* WITH_WSREP */ /* New lock request can be satisfied iff: @@ -1610,12 +1666,59 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg, { if (ticket->get_ctx() != requestor_ctx && ticket->is_incompatible_when_granted(type_arg)) +#ifdef WITH_WSREP + { + if (wsrep_thd_is_BF((void *)(requestor_ctx->get_thd()), false) && + key.mdl_namespace() == MDL_key::GLOBAL) + { + WSREP_DEBUG("global lock granted for BF: %lu %s", + wsrep_thd_thread_id(requestor_ctx->get_thd()), + wsrep_thd_query(requestor_ctx->get_thd())); + can_grant = true; + } + else if (!wsrep_grant_mdl_exception(requestor_ctx, ticket)) + { + wsrep_can_grant= FALSE; + if (wsrep_log_conflicts) + { + MDL_lock * lock = ticket->get_lock(); + WSREP_INFO( + "MDL conflict db=%s table=%s ticket=%d solved by %s", + lock->key.db_name(), lock->key.name(), ticket->get_type(), "abort" + ); + } + } + else + { + can_grant= TRUE; + } + } +#else break; +#endif /* WITH_WSREP */ } +#ifdef WITH_WSREP + if ((ticket == NULL) && wsrep_can_grant) +#else if (ticket == NULL) /* Incompatible locks are our own. */ +#endif /* WITH_WSREP */ + can_grant= TRUE; } } +#ifdef WITH_WSREP + else + { + if (wsrep_thd_is_BF((void *)(requestor_ctx->get_thd()), false) && + key.mdl_namespace() == MDL_key::GLOBAL) + { + WSREP_DEBUG("global lock granted for BF (waiting queue): %lu %s", + wsrep_thd_thread_id(requestor_ctx->get_thd()), + wsrep_thd_query(requestor_ctx->get_thd())); + can_grant = true; + } + } +#endif /* WITH_WSREP */ return can_grant; } @@ -2631,6 +2734,12 @@ void MDL_context::release_locks_stored_before(enum_mdl_duration duration, } +#ifdef WITH_WSREP +void MDL_context::release_explicit_locks() +{ + release_locks_stored_before(MDL_EXPLICIT, NULL); +} +#endif /** Release all explicit locks in the context which correspond to the same name/object as this lock request. @@ -2912,3 +3021,32 @@ void MDL_context::set_transaction_duration_for_all_locks() ticket->m_duration= MDL_TRANSACTION; #endif } +#ifdef WITH_WSREP +void MDL_ticket::wsrep_report(bool debug) +{ + if (debug) + { + WSREP_DEBUG("MDL ticket: type: %s space: %s db: %s name: %s", + (get_type() == MDL_INTENTION_EXCLUSIVE) ? "intention exclusive" : + ((get_type() == MDL_SHARED) ? "shared" : + ((get_type() == MDL_SHARED_HIGH_PRIO ? "shared high prio" : + ((get_type() == MDL_SHARED_READ) ? "shared read" : + ((get_type() == MDL_SHARED_WRITE) ? "shared write" : + ((get_type() == MDL_SHARED_NO_WRITE) ? "shared no write" : + ((get_type() == MDL_SHARED_NO_READ_WRITE) ? "shared no read write" : + ((get_type() == MDL_EXCLUSIVE) ? "exclusive" : + "UNKNOWN")))))))), + (m_lock->key.mdl_namespace() == MDL_key::GLOBAL) ? "GLOBAL" : + ((m_lock->key.mdl_namespace() == MDL_key::SCHEMA) ? "SCHEMA" : + ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "TABLE" : + ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "FUNCTION" : + ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "PROCEDURE" : + ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "TRIGGER" : + ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "EVENT" : + ((m_lock->key.mdl_namespace() == MDL_key::COMMIT) ? "COMMIT" : + (char *)"UNKNOWN"))))))), + m_lock->key.db_name(), + m_lock->key.name()); + } +} +#endif /* WITH_WSREP */ diff --git a/sql/mdl.h b/sql/mdl.h index 3179205f999c..3fc8def21b76 100644 --- a/sql/mdl.h +++ b/sql/mdl.h @@ -480,6 +480,9 @@ class MDL_ticket : public MDL_wait_for_subgraph MDL_ticket *next_in_lock; MDL_ticket **prev_in_lock; public: +#ifdef WITH_WSREP + void wsrep_report(bool debug); +#endif /* WITH_WSREP */ bool has_pending_conflicting_lock() const; MDL_context *get_ctx() const { return m_ctx; } @@ -662,6 +665,13 @@ class MDL_context m_tickets[MDL_EXPLICIT].is_empty()); } +#ifdef WITH_WSREP + inline bool has_transactional_locks() const + { + return !m_tickets[MDL_TRANSACTION].is_empty(); + } +#endif /* WITH_WSREP */ + MDL_savepoint mdl_savepoint() { return MDL_savepoint(m_tickets[MDL_STATEMENT].front(), @@ -674,6 +684,9 @@ class MDL_context void release_statement_locks(); void release_transactional_locks(); +#ifdef WITH_WSREP + void release_explicit_locks(); +#endif void rollback_to_savepoint(const MDL_savepoint &mdl_savepoint); inline THD *get_thd() const { return m_thd; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index f8f50313dad4..b0d7438dd960 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -68,6 +68,13 @@ #include "probes_mysql.h" #include "scheduler.h" #include "debug_sync.h" +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#include "wsrep_var.h" +#include "wsrep_thd.h" +#include "wsrep_sst.h" +ulong wsrep_running_threads = 0; // # of currently running wsrep threads +#endif #include "sql_callback.h" #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE @@ -342,7 +349,11 @@ static char *default_character_set_name; static char *character_set_filesystem_name; static char *lc_messages; static char *lc_time_names_name; +#ifndef WITH_WSREP static char *my_bind_addr_str; +#else +char *my_bind_addr_str; +#endif /* WITH_WSREP */ static char *default_collation_name; char *default_storage_engine; static char compiled_default_collation_name[]= MYSQL_DEFAULT_COLLATION_NAME; @@ -355,6 +366,9 @@ static mysql_cond_t COND_thread_cache, COND_flush_thread_cache; /* Global variables */ +#ifdef WITH_WSREP +ulong my_bind_addr; +#endif /* WITH_WSREP */ bool opt_bin_log, opt_ignore_builtin_innodb= 0; my_bool opt_log, opt_slow_log; ulonglong log_output_options; @@ -446,6 +460,10 @@ my_bool sp_automatic_privileges= 1; ulong opt_binlog_rows_event_max_size; const char *binlog_format_names[]= {"MIXED", "STATEMENT", "ROW", NullS}; +#ifdef WITH_WSREP +const char *wsrep_binlog_format_names[]= + {"MIXED", "STATEMENT", "ROW", "NONE", NullS}; +#endif /*WITH_WSREP */ #ifdef HAVE_INITGROUPS volatile sig_atomic_t calling_initgroups= 0; /**< Used in SIGSEGV handler. */ #endif @@ -669,6 +687,23 @@ pthread_attr_t connection_attrib; mysql_mutex_t LOCK_server_started; mysql_cond_t COND_server_started; +#ifdef WITH_WSREP +mysql_mutex_t LOCK_wsrep_ready; +mysql_cond_t COND_wsrep_ready; +mysql_mutex_t LOCK_wsrep_sst; +mysql_cond_t COND_wsrep_sst; +mysql_mutex_t LOCK_wsrep_sst_init; +mysql_cond_t COND_wsrep_sst_init; +mysql_mutex_t LOCK_wsrep_rollback; +mysql_cond_t COND_wsrep_rollback; +wsrep_aborting_thd_t wsrep_aborting_thd= NULL; +mysql_mutex_t LOCK_wsrep_replaying; +mysql_cond_t COND_wsrep_replaying; +mysql_mutex_t LOCK_wsrep_slave_threads; +mysql_mutex_t LOCK_wsrep_desync; +int wsrep_replaying= 0; +static void wsrep_close_threads(THD* thd); +#endif /* WITH_WSREP */ int mysqld_server_started= 0; File_parser_dummy_hook file_parser_dummy_hook; @@ -1123,6 +1158,11 @@ static void close_connections(void) if (tmp->slave_thread) continue; +#ifdef WITH_WSREP + /* skip wsrep system threads as well */ + if (WSREP(tmp) && (tmp->wsrep_exec_mode==REPL_RECV || tmp->wsrep_applier)) + continue; +#endif tmp->killed= THD::KILL_CONNECTION; MYSQL_CALLBACK(thread_scheduler, post_kill_notification, (tmp)); mysql_mutex_lock(&tmp->LOCK_thd_data); @@ -1174,6 +1214,33 @@ static void close_connections(void) tmp->main_security_ctx.user : "")); close_connection(tmp); } +#endif +#ifdef WITH_WSREP + /* + * TODO: this code block may turn out redundant. wsrep->disconnect() + * should terminate slave threads gracefully, and we don't need + * to signal them here. + * The code here makes sure mysqld will not hang during shutdown + * even if wsrep provider has problems in shutting down. + */ + if (WSREP(tmp) && tmp->wsrep_exec_mode==REPL_RECV) + { + sql_print_information("closing wsrep system thread"); + tmp->killed= THD::KILL_CONNECTION; + MYSQL_CALLBACK(thread_scheduler, post_kill_notification, (tmp)); + if (tmp->mysys_var) + { + tmp->mysys_var->abort=1; + mysql_mutex_lock(&tmp->mysys_var->mutex); + if (tmp->mysys_var->current_cond) + { + mysql_mutex_lock(tmp->mysys_var->current_mutex); + mysql_cond_broadcast(tmp->mysys_var->current_cond); + mysql_mutex_unlock(tmp->mysys_var->current_mutex); + } + mysql_mutex_unlock(&tmp->mysys_var->mutex); + } + } #endif DBUG_PRINT("quit",("Unlocking LOCK_thread_count")); mysql_mutex_unlock(&LOCK_thread_count); @@ -1321,8 +1388,14 @@ static void __cdecl kill_server(int sig_ptr) } } #endif +#ifdef WITH_WSREP + if (WSREP_ON) wsrep_stop_replication(NULL); +#endif close_connections(); +#ifdef WITH_WSREP + if (WSREP_ON) wsrep_deinit(); +#endif if (sig != MYSQL_KILL_SIGNAL && sig != 0) unireg_abort(1); /* purecov: inspected */ @@ -1417,6 +1490,23 @@ extern "C" void unireg_abort(int exit_code) usage(); if (exit_code) sql_print_error("Aborting\n"); + +#ifdef WITH_WSREP + if (wsrep) + { + /* This is an abort situation, we cannot expect to gracefully close all + * wsrep threads here, we can only diconnect from service */ + wsrep_close_client_connections(FALSE); + shutdown_in_progress= 1; + THD* thd(0); + wsrep->disconnect(wsrep); + WSREP_INFO("Service disconnected."); + wsrep_close_threads(thd); /* this won't close all threads */ + sleep(1); /* so give some time to exit for those which can */ + WSREP_INFO("Some threads may fail to exit."); + } +#endif // WITH_WSREP + clean_up(!opt_help && (exit_code || !opt_bootstrap)); /* purecov: inspected */ DBUG_PRINT("quit",("done with cleanup in unireg_abort")); mysqld_exit(exit_code); @@ -1611,6 +1701,20 @@ static void clean_up_mutexes() mysql_cond_destroy(&COND_thread_cache); mysql_cond_destroy(&COND_flush_thread_cache); mysql_cond_destroy(&COND_manager); +#ifdef WITH_WSREP + (void) mysql_mutex_destroy(&LOCK_wsrep_ready); + (void) mysql_cond_destroy(&COND_wsrep_ready); + (void) mysql_mutex_destroy(&LOCK_wsrep_sst); + (void) mysql_cond_destroy(&COND_wsrep_sst); + (void) mysql_mutex_destroy(&LOCK_wsrep_sst_init); + (void) mysql_cond_destroy(&COND_wsrep_sst_init); + (void) mysql_mutex_destroy(&LOCK_wsrep_rollback); + (void) mysql_cond_destroy(&COND_wsrep_rollback); + (void) mysql_mutex_destroy(&LOCK_wsrep_replaying); + (void) mysql_cond_destroy(&COND_wsrep_replaying); + (void) mysql_mutex_destroy(&LOCK_wsrep_slave_threads); + (void) mysql_mutex_destroy(&LOCK_wsrep_desync); +#endif } #endif /*EMBEDDED_LIBRARY*/ @@ -1978,6 +2082,9 @@ static void network_init(void) socket_errno); unireg_abort(1); } +#if defined(WITH_WSREP) && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) + (void) fcntl(ip_sock, F_SETFD, FD_CLOEXEC); +#endif /* WITH_WSREP */ } #ifdef _WIN32 @@ -2068,6 +2175,9 @@ static void network_init(void) if (listen(unix_sock,(int) back_log) < 0) sql_print_warning("listen() on Unix socket failed with error %d", socket_errno); +#if defined(WITH_WSREP) && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) + (void) fcntl(unix_sock, F_SETFD, FD_CLOEXEC); +#endif /* WITH_WSREP */ } #endif DBUG_PRINT("info",("server started")); @@ -2298,9 +2408,16 @@ static bool cache_thread() bool one_thread_per_connection_end(THD *thd, bool put_in_cache) { DBUG_ENTER("one_thread_per_connection_end"); +#ifdef WITH_WSREP + const bool wsrep_applier(thd->wsrep_applier); + unlink_thd(thd); + mysql_mutex_unlock(&LOCK_thd_remove); + if (put_in_cache && !wsrep_applier) +#else unlink_thd(thd); mysql_mutex_unlock(&LOCK_thd_remove); if (put_in_cache) +#endif /* WITH_WSREP */ put_in_cache= cache_thread(); mysql_mutex_unlock(&LOCK_thread_count); if (put_in_cache) @@ -2691,10 +2808,21 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused))) should not be any other mysql_cond_signal() calls. */ mysql_mutex_lock(&LOCK_thread_count); - mysql_mutex_unlock(&LOCK_thread_count); mysql_cond_broadcast(&COND_thread_count); + mysql_mutex_unlock(&LOCK_thread_count); + + /* + Waiting for until mysqld_server_started != 0 + to ensure that all server components has been successfully + initialized. This step is mandatory since signal processing + could be done safely only when all server components + has been initialized. + */ + mysql_mutex_lock(&LOCK_server_started); + while (!mysqld_server_started) + mysql_cond_wait(&COND_server_started, &LOCK_server_started); + mysql_mutex_unlock(&LOCK_server_started); - (void) pthread_sigmask(SIG_BLOCK,&set,NULL); for (;;) { int error; // Used when debugging @@ -3221,6 +3349,13 @@ static int init_common_variables() strmake(default_logfile_name, glob_hostname, sizeof(default_logfile_name)-5); +#ifdef WITH_WSREP + if (0 == wsrep_node_name || 0 == wsrep_node_name[0]) + { + my_free((void *)wsrep_node_name); + wsrep_node_name= my_strdup(glob_hostname, MYF(MY_WME)); + } +#endif /* WITH_WSREP */ strmake(pidfile_name, default_logfile_name, sizeof(pidfile_name)-5); strmov(fn_ext(pidfile_name),".pid"); // Add proper extension @@ -3276,7 +3411,11 @@ static int init_common_variables() compile_time_assert(sizeof(com_status_vars)/sizeof(com_status_vars[0]) - 1 == SQLCOM_END + 8); #endif - +#ifdef WITH_WSREP + /* This is a protection against mutually incompatible option values. */ + if (WSREP_ON && wsrep_check_opts (remaining_argc, remaining_argv)) + return 1; +#endif /* WITH_WSREP */ if (get_options(&remaining_argc, &remaining_argv)) return 1; set_server_version(); @@ -3664,6 +3803,27 @@ static int init_thread_environment() sql_print_error("Can't create thread-keys"); return 1; } +#ifdef WITH_WSREP + mysql_mutex_init(key_LOCK_wsrep_ready, + &LOCK_wsrep_ready, MY_MUTEX_INIT_FAST); + mysql_cond_init(key_COND_wsrep_ready, &COND_wsrep_ready, NULL); + mysql_mutex_init(key_LOCK_wsrep_sst, + &LOCK_wsrep_sst, MY_MUTEX_INIT_FAST); + mysql_cond_init(key_COND_wsrep_sst, &COND_wsrep_sst, NULL); + mysql_mutex_init(key_LOCK_wsrep_sst_init, + &LOCK_wsrep_sst_init, MY_MUTEX_INIT_FAST); + mysql_cond_init(key_COND_wsrep_sst_init, &COND_wsrep_sst_init, NULL); + mysql_mutex_init(key_LOCK_wsrep_rollback, + &LOCK_wsrep_rollback, MY_MUTEX_INIT_FAST); + mysql_cond_init(key_COND_wsrep_rollback, &COND_wsrep_rollback, NULL); + mysql_mutex_init(key_LOCK_wsrep_replaying, + &LOCK_wsrep_replaying, MY_MUTEX_INIT_FAST); + mysql_cond_init(key_COND_wsrep_replaying, &COND_wsrep_replaying, NULL); + mysql_mutex_init(key_LOCK_wsrep_slave_threads, + &LOCK_wsrep_slave_threads, MY_MUTEX_INIT_FAST); + mysql_mutex_init(key_LOCK_wsrep_desync, + &LOCK_wsrep_desync, MY_MUTEX_INIT_FAST); +#endif return 0; } @@ -3784,7 +3944,6 @@ static void end_ssl() #endif /* HAVE_OPENSSL */ } - static int init_server_components() { DBUG_ENTER("init_server_components"); @@ -3875,7 +4034,12 @@ static int init_server_components() sql_print_warning("You need to use --log-bin to make " "--log-slave-updates work."); } + +#ifdef WITH_WSREP + if (!WSREP_ON && !opt_bin_log && binlog_format_used) +#else if (!opt_bin_log && binlog_format_used) +#endif sql_print_warning("You need to use --log-bin to make " "--binlog-format work."); @@ -3900,6 +4064,39 @@ will be ignored as the --log-bin option is not defined."); } #endif +#ifdef WITH_WSREP /* WSREP BEFORE SE */ + if (!wsrep_recovery) + { + if (opt_bootstrap) // bootsrap option given - disable wsrep functionality + { + wsrep_provider_init(WSREP_NONE); + if (wsrep_init()) unireg_abort(1); + } + else // full wsrep initialization + { + // add basedir/bin to PATH to resolve wsrep script names + char* const tmp_path((char*)alloca(strlen(mysql_home) + + strlen("/bin") + 1)); + if (tmp_path) + { + strcpy(tmp_path, mysql_home); + strcat(tmp_path, "/bin"); + wsrep_prepend_PATH(tmp_path); + } + else + { + WSREP_ERROR("Could not append %s/bin to PATH", mysql_home); + } + + if (wsrep_before_SE()) + { + set_ports(); // this is also called in network_init() later but we need + // to know mysqld_port now - lp:1071882 + wsrep_init_startup(true); + } + } + } +#endif /* WITH_WSREP */ if (opt_bin_log) { /* Reports an error and aborts, if the --log-bin's path @@ -4097,11 +4294,30 @@ a file name for --log-bin-index option", opt_binlog_index_name); global_system_variables.table_plugin= plugin; } +#ifdef WITH_WSREP + if (!opt_bin_log) + { + wsrep_emulate_bin_log= 1; + } +#endif + tc_log= (total_ha_2pc > 1 ? (opt_bin_log ? (TC_LOG *) &mysql_bin_log : +#ifdef WITH_WSREP + (WSREP_ON ? + (TC_LOG *) &tc_log_dummy : + (TC_LOG *) &tc_log_mmap)) : +#else (TC_LOG *) &tc_log_mmap) : - (TC_LOG *) &tc_log_dummy); - +#endif + (TC_LOG *) &tc_log_dummy); +#ifdef WITH_WSREP + WSREP_DEBUG("Initial TC log open: %s", + (tc_log == &mysql_bin_log) ? "binlog" : + (tc_log == &tc_log_mmap) ? "mmap" : + (tc_log == &tc_log_dummy) ? "dummy" : "unknown" + ); +#endif if (tc_log->open(opt_bin_log ? opt_bin_logname : opt_tc_log_file)) { sql_print_error("Can't init tc log"); @@ -4156,8 +4372,6 @@ a file name for --log-bin-index option", opt_binlog_index_name); init_update_queries(); DBUG_RETURN(0); } - - #ifndef EMBEDDED_LIBRARY static void create_shutdown_thread() @@ -4179,6 +4393,431 @@ static void create_shutdown_thread() #endif /* EMBEDDED_LIBRARY */ +#ifdef WITH_WSREP +typedef void (*wsrep_thd_processor_fun)(THD *); + +pthread_handler_t start_wsrep_THD(void *arg) +{ + THD *thd; + wsrep_thd_processor_fun processor= (wsrep_thd_processor_fun)arg; + + if (my_thread_init()) + { + WSREP_ERROR("Could not initialize thread"); + return(NULL); + } + + if (!(thd= new THD(true))) + { + return(NULL); + } + mysql_mutex_lock(&LOCK_thread_count); + thd->thread_id=thread_id++; + + thd->real_id=pthread_self(); // Keep purify happy + thread_count++; + thread_created++; + threads.append(thd); + + my_net_init(&thd->net,(st_vio*) 0); + + DBUG_PRINT("wsrep",(("creating thread %lld"), (long long)thd->thread_id)); + thd->prior_thr_create_utime= thd->start_utime= my_micro_time(); + (void) mysql_mutex_unlock(&LOCK_thread_count); + + /* from bootstrap()... */ + thd->bootstrap=1; + thd->max_client_packet_length= thd->net.max_packet; + thd->security_ctx->master_access= ~(ulong)0; + + /* from handle_one_connection... */ + pthread_detach_this_thread(); + + mysql_thread_set_psi_id(thd->thread_id); + thd->thr_create_utime= my_micro_time(); + if (MYSQL_CALLBACK_ELSE(thread_scheduler, init_new_connection_thread, (), 0)) + { + close_connection(thd, ER_OUT_OF_RESOURCES); + statistic_increment(aborted_connects,&LOCK_status); + MYSQL_CALLBACK(thread_scheduler, end_thread, (thd, 0)); + + return(NULL); + } + +// + /* + handle_one_connection() is normally the only way a thread would + start and would always be on the very high end of the stack , + therefore, the thread stack always starts at the address of the + first local variable of handle_one_connection, which is thd. We + need to know the start of the stack so that we could check for + stack overruns. + */ + DBUG_PRINT("wsrep", ("handle_one_connection called by thread %lld\n", + (long long)thd->thread_id)); + /* now that we've called my_thread_init(), it is safe to call DBUG_* */ + + thd->thread_stack= (char*) &thd; + if (thd->store_globals()) + { + close_connection(thd, ER_OUT_OF_RESOURCES); + statistic_increment(aborted_connects,&LOCK_status); + MYSQL_CALLBACK(thread_scheduler, end_thread, (thd, 0)); + delete thd; + + return(NULL); + } + + thd->system_thread= SYSTEM_THREAD_SLAVE_SQL; + thd->security_ctx->skip_grants(); + + /* handle_one_connection() again... */ + //thd->version= refresh_version; + thd->proc_info= 0; + thd->command= COM_SLEEP; + thd->set_time(); + thd->init_for_queries(); + + mysql_mutex_lock(&LOCK_connection_count); + ++connection_count; + mysql_mutex_unlock(&LOCK_connection_count); + + mysql_mutex_lock(&LOCK_thread_count); + wsrep_running_threads++; + mysql_cond_broadcast(&COND_thread_count); + mysql_mutex_unlock(&LOCK_thread_count); + + processor(thd); + + close_connection(thd, 0); + + mysql_mutex_lock(&LOCK_thread_count); + wsrep_running_threads--; + WSREP_DEBUG("wsrep running threads now: %lu", wsrep_running_threads); + mysql_cond_broadcast(&COND_thread_count); + mysql_mutex_unlock(&LOCK_thread_count); + + // Note: We can't call THD destructor without crashing + // if plugins have not been initialized. However, in most of the + // cases this means that pre SE initialization SST failed and + // we are going to exit anyway. + if (plugins_are_initialized) + { + net_end(&thd->net); + MYSQL_CALLBACK(thread_scheduler, end_thread, (thd, 1)); + } + else + { + // TODO: lightweight cleanup to get rid of: + // 'Error in my_thread_global_end(): 2 threads didn't exit' + // at server shutdown + } + my_thread_end(); + return(NULL); +} + +/**/ +static bool abort_replicated(THD *thd) +{ + bool ret_code= false; + if (thd->wsrep_query_state== QUERY_COMMITTING) + { + if (wsrep_debug) WSREP_INFO("aborting replicated trx: %lu", thd->real_id); + + (void)wsrep_abort_thd(thd, thd, TRUE); + ret_code= true; + } + return ret_code; +} +/**/ +static inline bool is_client_connection(THD *thd) +{ +#if REMOVE +// REMOVE THIS LATER (lp:777201). Below we had to add an explicit check for +// wsrep_applier since wsrep_exec_mode didn't seem to always work +if (thd->wsrep_applier && thd->wsrep_exec_mode != REPL_RECV) +WSREP_WARN("applier has wsrep_exec_mode = %d", thd->wsrep_exec_mode); + + if ( thd->slave_thread || /* declared as mysql slave */ + thd->system_thread || /* declared as system thread */ + !thd->vio_ok() || /* server internal thread */ + thd->wsrep_exec_mode==REPL_RECV || /* applier or replaying thread */ + thd->wsrep_applier || /* wsrep slave applier */ + !thd->variables.wsrep_on) /* client, but fenced outside wsrep */ + return false; + + return true; +#else + return (thd->wsrep_client_thread && thd->variables.wsrep_on); +#endif /* REMOVE */ +} + +static inline bool is_replaying_connection(THD *thd) +{ + bool ret; + + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + ret= (thd->wsrep_conflict_state == REPLAYING) ? true : false; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + + return ret; +} + +static inline bool is_committing_connection(THD *thd) +{ + bool ret; + + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + ret= (thd->wsrep_query_state == QUERY_COMMITTING) ? true : false; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + + return ret; +} + +static bool have_client_connections() +{ + THD *tmp; + + I_List_iterator it(threads); + while ((tmp=it++)) + { + DBUG_PRINT("quit",("Informing thread %ld that it's time to die", + tmp->thread_id)); + if (is_client_connection(tmp) && tmp->killed == THD::KILL_CONNECTION) + { + (void)abort_replicated(tmp); + return true; + } + } + return false; +} + +static void wsrep_close_thread(THD *thd) +{ + thd->killed= THD::KILL_CONNECTION; + MYSQL_CALLBACK(thread_scheduler, post_kill_notification, (thd)); + if (thd->mysys_var) + { + thd->mysys_var->abort=1; + mysql_mutex_lock(&thd->mysys_var->mutex); + if (thd->mysys_var->current_cond) + { + mysql_mutex_lock(thd->mysys_var->current_mutex); + mysql_cond_broadcast(thd->mysys_var->current_cond); + mysql_mutex_unlock(thd->mysys_var->current_mutex); + } + mysql_mutex_unlock(&thd->mysys_var->mutex); + } +} + +static my_bool have_committing_connections() +{ + THD *tmp; + mysql_mutex_lock(&LOCK_thread_count); // For unlink from list + + I_List_iterator it(threads); + while ((tmp=it++)) + { + if (!is_client_connection(tmp)) + continue; + + if (is_committing_connection(tmp)) + { + mysql_mutex_unlock(&LOCK_thread_count); + return TRUE; + } + } + mysql_mutex_unlock(&LOCK_thread_count); + return FALSE; +} + +int wsrep_wait_committing_connections_close(int wait_time) +{ + int sleep_time= 100; + + while (have_committing_connections() && wait_time > 0) + { + WSREP_DEBUG("wait for committing transaction to close: %d", wait_time); + my_sleep(sleep_time); + wait_time -= sleep_time; + } + if (have_committing_connections()) + { + return 1; + } + return 0; +} + +void wsrep_close_client_connections(my_bool wait_to_end) +{ + /* + First signal all threads that it's time to die + */ + + THD *tmp; + mysql_mutex_lock(&LOCK_thread_count); // For unlink from list + + bool kill_cached_threads_saved= kill_cached_threads; + kill_cached_threads= true; // prevent future threads caching + mysql_cond_broadcast(&COND_thread_cache); // tell cached threads to die + + I_List_iterator it(threads); + while ((tmp=it++)) + { + DBUG_PRINT("quit",("Informing thread %ld that it's time to die", + tmp->thread_id)); + /* We skip slave threads & scheduler on this first loop through. */ + if (!is_client_connection(tmp)) + continue; + + if (is_replaying_connection(tmp)) + { + tmp->killed= THD::KILL_CONNECTION; + continue; + } + + /* replicated transactions must be skipped */ + if (abort_replicated(tmp)) + continue; + + WSREP_DEBUG("closing connection %ld", tmp->thread_id); + wsrep_close_thread(tmp); + } + mysql_mutex_unlock(&LOCK_thread_count); + + if (thread_count) + sleep(2); // Give threads time to die + + mysql_mutex_lock(&LOCK_thread_count); + /* + Force remaining threads to die by closing the connection to the client + */ + + I_List_iterator it2(threads); + while ((tmp=it2++)) + { +#ifndef __bsdi__ // Bug in BSDI kernel + if (is_client_connection(tmp) && + !abort_replicated(tmp) && + !is_replaying_connection(tmp)) + { + WSREP_INFO("killing local connection: %ld",tmp->thread_id); + close_connection(tmp,0); + } +#endif + } + + DBUG_PRINT("quit",("Waiting for threads to die (count=%u)",thread_count)); + if (wsrep_debug) + WSREP_INFO("waiting for client connections to close: %u", thread_count); + + while (wait_to_end && have_client_connections()) + { + mysql_cond_wait(&COND_thread_count, &LOCK_thread_count); + DBUG_PRINT("quit",("One thread died (count=%u)", thread_count)); + } + + kill_cached_threads= kill_cached_threads_saved; + + mysql_mutex_unlock(&LOCK_thread_count); + + /* All client connection threads have now been aborted */ +} + +void wsrep_close_applier(THD *thd) +{ + WSREP_DEBUG("closing applier %ld", thd->thread_id); + wsrep_close_thread(thd); +} + +static void wsrep_close_threads(THD *thd) +{ + THD *tmp; + mysql_mutex_lock(&LOCK_thread_count); // For unlink from list + + I_List_iterator it(threads); + while ((tmp=it++)) + { + DBUG_PRINT("quit",("Informing thread %ld that it's time to die", + tmp->thread_id)); + /* We skip slave threads & scheduler on this first loop through. */ + if (tmp->wsrep_applier && tmp != thd) + { + WSREP_DEBUG("closing wsrep thread %ld", tmp->thread_id); + wsrep_close_thread (tmp); + } + } + + mysql_mutex_unlock(&LOCK_thread_count); +} + +void wsrep_close_applier_threads(int count) +{ + THD *tmp; + mysql_mutex_lock(&LOCK_thread_count); // For unlink from list + + I_List_iterator it(threads); + while ((tmp=it++) && count) + { + DBUG_PRINT("quit",("Informing thread %ld that it's time to die", + tmp->thread_id)); + /* We skip slave threads & scheduler on this first loop through. */ + if (tmp->wsrep_applier) + { + WSREP_DEBUG("closing wsrep applier thread %ld", tmp->thread_id); + tmp->wsrep_applier_closing= TRUE; + count--; + } + } + + mysql_mutex_unlock(&LOCK_thread_count); +} + +void wsrep_wait_appliers_close(THD *thd) +{ + /* Wait for wsrep appliers to gracefully exit */ + mysql_mutex_lock(&LOCK_thread_count); + while (wsrep_running_threads > 1) + // 1 is for rollbacker thread which needs to be killed explicitly. + // This gotta be fixed in a more elegant manner if we gonna have arbitrary + // number of non-applier wsrep threads. + { + mysql_cond_wait(&COND_thread_count,&LOCK_thread_count); + DBUG_PRINT("quit",("One applier died (count=%u)",thread_count)); + } + mysql_mutex_unlock(&LOCK_thread_count); + /* Now kill remaining wsrep threads: rollbacker */ + wsrep_close_threads (thd); + /* and wait for them to die */ + mysql_mutex_lock(&LOCK_thread_count); + while (wsrep_running_threads > 0) + { + mysql_cond_wait(&COND_thread_count,&LOCK_thread_count); + DBUG_PRINT("quit",("One thread died (count=%u)",thread_count)); + } + mysql_mutex_unlock(&LOCK_thread_count); + + /* All wsrep applier threads have now been aborted. However, if this thread + is also applier, we are still running... + */ +} + +void wsrep_kill_mysql(THD *thd) +{ + if (mysqld_server_started) + { + if (!shutdown_in_progress) + { + WSREP_INFO("starting shutdown"); + kill_mysql(); + } + } + else + { + unireg_abort(1); + } +} +#endif /* WITH_WSREP */ #if (defined(_WIN32) || defined(HAVE_SMEM)) && !defined(EMBEDDED_LIBRARY) static void handle_connections_methods() @@ -4315,6 +4954,9 @@ int mysqld_main(int argc, char **argv) return 1; } #endif +#ifdef WITH_WSREP + wsrep_filter_new_cluster (&argc, argv); +#endif /* WITH_WSREP */ orig_argc= argc; orig_argv= argv; @@ -4574,6 +5216,14 @@ int mysqld_main(int argc, char **argv) my_str_malloc= &my_str_malloc_mysqld; my_str_free= &my_str_free_mysqld; +#ifdef WITH_WSREP /* WSREP AFTER SE */ + if (wsrep_recovery) + { + select_thread_in_use= 0; + wsrep_recover(); + unireg_abort(0); + } +#endif /* WITH_WSREP */ /* init signals & alarm After this we can't quit by a simple unireg_abort @@ -4645,6 +5295,38 @@ int mysqld_main(int argc, char **argv) if (Events::init(opt_noacl || opt_bootstrap)) unireg_abort(1); +#ifdef WITH_WSREP /* WSREP AFTER SE */ + if (wsrep_recovery) + { + select_thread_in_use= 0; + wsrep_recover(); + unireg_abort(0); + } + + if (opt_bootstrap) + { + /*! bootstrap wsrep init was taken care of above */ + } + else + { + wsrep_SE_initialized(); + + if (wsrep_before_SE()) + { + /*! in case of no SST wsrep waits in view handler callback */ + wsrep_SE_init_grab(); + wsrep_SE_init_done(); + /*! in case of SST wsrep waits for wsrep->sst_received */ + wsrep_sst_continue(); + } + else + { + wsrep_init_startup (false); + } + + wsrep_create_appliers(wsrep_slave_threads - 1); + } +#endif /* WITH_WSREP */ if (opt_bootstrap) { select_thread_in_use= 0; // Allow 'kill' to work @@ -4689,6 +5371,9 @@ int mysqld_main(int argc, char **argv) #ifndef __WIN__ #ifdef EXTRA_DEBUG2 sql_print_error("Before Lock_thread_count"); +#endif +#ifdef WITH_WSREP + WSREP_DEBUG("Before Lock_thread_count"); #endif mysql_mutex_lock(&LOCK_thread_count); DBUG_PRINT("quit", ("Got thread_count mutex")); @@ -4956,6 +5641,9 @@ static void bootstrap(MYSQL_FILE *file) DBUG_ENTER("bootstrap"); THD *thd= new THD; +#ifdef WITH_WSREP + thd->variables.wsrep_on= 0; +#endif thd->bootstrap=1; my_net_init(&thd->net,(st_vio*) 0); thd->max_client_packet_length= thd->net.max_packet; @@ -5333,6 +6021,9 @@ void handle_connections_sockets() sleep(1); // Give other threads some time continue; } +#if defined(WITH_WSREP) && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) + (void) fcntl(new_sock, F_SETFD, FD_CLOEXEC); +#endif /* WITH_WSREP */ #ifdef HAVE_LIBWRAP { @@ -6682,6 +7373,20 @@ SHOW_VAR status_vars[]= { {"Uptime", (char*) &show_starttime, SHOW_FUNC}, #ifdef ENABLED_PROFILING {"Uptime_since_flush_status",(char*) &show_flushstatustime, SHOW_FUNC}, +#endif +#ifdef WITH_WSREP + {"wsrep_connected", (char*) &wsrep_connected, SHOW_BOOL}, + {"wsrep_ready", (char*) &wsrep_ready, SHOW_BOOL}, + {"wsrep_cluster_state_uuid", (char*) &wsrep_cluster_state_uuid,SHOW_CHAR_PTR}, + {"wsrep_cluster_conf_id", (char*) &wsrep_cluster_conf_id, SHOW_LONGLONG}, + {"wsrep_cluster_status", (char*) &wsrep_cluster_status, SHOW_CHAR_PTR}, + {"wsrep_cluster_size", (char*) &wsrep_cluster_size, SHOW_LONG_NOFLUSH}, + {"wsrep_local_index", (char*) &wsrep_local_index, SHOW_LONG_NOFLUSH}, + {"wsrep_local_bf_aborts", (char*) &wsrep_show_bf_aborts, SHOW_FUNC}, + {"wsrep_provider_name", (char*) &wsrep_provider_name, SHOW_CHAR_PTR}, + {"wsrep_provider_version", (char*) &wsrep_provider_version, SHOW_CHAR_PTR}, + {"wsrep_provider_vendor", (char*) &wsrep_provider_vendor, SHOW_CHAR_PTR}, + {"wsrep", (char*) &wsrep_show_status, SHOW_FUNC}, #endif {NullS, NullS, SHOW_LONG} }; @@ -6993,6 +7698,10 @@ static int mysql_init_variables(void) if (!(tmpenv = getenv("MY_BASEDIR_VERSION"))) tmpenv = DEFAULT_MYSQL_HOME; (void) strmake(mysql_home, tmpenv, sizeof(mysql_home)-1); +#endif +#ifdef WITH_WSREP + if (WSREP_ON && wsrep_init_vars()) + return 1; #endif return 0; } @@ -7217,6 +7926,14 @@ mysqld_get_one_option(int optid, case OPT_LOWER_CASE_TABLE_NAMES: lower_case_table_names_used= 1; break; +#ifdef WITH_WSREP + case OPT_WSREP_START_POSITION: + wsrep_start_position_init (argument); + break; + case OPT_WSREP_SST_AUTH: + wsrep_sst_auth_init (argument); + break; +#endif #if defined(ENABLED_DEBUG_SYNC) case OPT_DEBUG_SYNC_TIMEOUT: /* @@ -7415,6 +8132,31 @@ static int get_options(int *argc_ptr, char ***argv_ptr) else global_system_variables.option_bits&= ~OPTION_BIG_SELECTS; +#ifdef WITH_WSREP + if (global_system_variables.wsrep_causal_reads) { + WSREP_WARN("option --wsrep-casual-reads is deprecated"); + if (!(global_system_variables.wsrep_sync_wait & + WSREP_SYNC_WAIT_BEFORE_READ)) { + WSREP_WARN("--wsrep-casual-reads=ON takes precedence over --wsrep-sync-wait=%u. " + "WSREP_SYNC_WAIT_BEFORE_READ is on", + global_system_variables.wsrep_sync_wait); + global_system_variables.wsrep_sync_wait |= WSREP_SYNC_WAIT_BEFORE_READ; + } else { + // they are turned on both. + } + } else { + if (global_system_variables.wsrep_sync_wait & + WSREP_SYNC_WAIT_BEFORE_READ) { + WSREP_WARN("--wsrep-sync-wait=%u takes precedence over --wsrep-causal-reads=OFF. " + "WSREP_SYNC_WAIT_BEFORE_READ is on", + global_system_variables.wsrep_sync_wait); + global_system_variables.wsrep_causal_reads = 1; + } else { + // they are turned off both. + } + } +#endif // WITH_WSREP + // Synchronize @@global.autocommit on --autocommit const ulonglong turn_bit_on= opt_autocommit ? OPTION_AUTOCOMMIT : OPTION_NOT_AUTOCOMMIT; @@ -7821,6 +8563,9 @@ void refresh_status(THD *thd) /* Reset some global variables */ reset_status_vars(); +#ifdef WITH_WSREP + wsrep->stats_reset(wsrep); +#endif /* WITH_WSREP */ /* Reset the counters of all key caches (default and named). */ process_key_caches(reset_key_cache_counters); @@ -7885,6 +8630,12 @@ PSI_mutex_key key_BINLOG_LOCK_index, key_BINLOG_LOCK_prep_xids, key_structure_guard_mutex, key_TABLE_SHARE_LOCK_ha_data, key_LOCK_error_messages, key_LOG_INFO_lock, key_LOCK_thread_count, key_PARTITION_LOCK_auto_inc; +#ifdef WITH_WSREP +PSI_mutex_key key_LOCK_wsrep_rollback, key_LOCK_wsrep_thd, + key_LOCK_wsrep_replaying, key_LOCK_wsrep_ready, key_LOCK_wsrep_sst, + key_LOCK_wsrep_sst_thread, key_LOCK_wsrep_sst_init, + key_LOCK_wsrep_slave_threads, key_LOCK_wsrep_desync; +#endif PSI_mutex_key key_LOCK_thd_remove; PSI_mutex_key key_RELAYLOG_LOCK_index; PSI_mutex_key key_LOCK_thread_created; @@ -7940,6 +8691,18 @@ static PSI_mutex_info all_server_mutexes[]= { &key_LOCK_error_messages, "LOCK_error_messages", PSI_FLAG_GLOBAL}, { &key_LOG_INFO_lock, "LOG_INFO::lock", 0}, { &key_LOCK_thread_count, "LOCK_thread_count", PSI_FLAG_GLOBAL}, +#ifdef WITH_WSREP + { &key_LOCK_wsrep_ready, "LOCK_wsrep_ready", PSI_FLAG_GLOBAL}, + { &key_LOCK_wsrep_sst, "LOCK_wsrep_sst", PSI_FLAG_GLOBAL}, + { &key_LOCK_wsrep_sst_thread, "wsrep_sst_thread", 0}, + { &key_LOCK_wsrep_sst_init, "LOCK_wsrep_sst_init", PSI_FLAG_GLOBAL}, + { &key_LOCK_wsrep_sst, "LOCK_wsrep_sst", PSI_FLAG_GLOBAL}, + { &key_LOCK_wsrep_rollback, "LOCK_wsrep_rollback", PSI_FLAG_GLOBAL}, + { &key_LOCK_wsrep_thd, "THD::LOCK_wsrep_thd", 0}, + { &key_LOCK_wsrep_replaying, "LOCK_wsrep_replaying", PSI_FLAG_GLOBAL}, + { &key_LOCK_wsrep_slave_threads, "LOCK_wsrep_slave_threads", PSI_FLAG_GLOBAL}, + { &key_LOCK_wsrep_desync, "LOCK_wsrep_desync", PSI_FLAG_GLOBAL}, +#endif { &key_PARTITION_LOCK_auto_inc, "HA_DATA_PARTITION::LOCK_auto_inc", 0}, { &key_LOCK_thread_created, "LOCK_thread_created", PSI_FLAG_GLOBAL }, { &key_LOCK_thd_remove, "LOCK_thd_remove", PSI_FLAG_GLOBAL} @@ -7978,6 +8741,12 @@ PSI_cond_key key_BINLOG_COND_prep_xids, key_BINLOG_update_cond, key_relay_log_info_sleep_cond, key_TABLE_SHARE_cond, key_user_level_lock_cond, key_COND_thread_count, key_COND_thread_cache, key_COND_flush_thread_cache; +#ifdef WITH_WSREP +PSI_cond_key key_COND_wsrep_rollback, key_COND_wsrep_thd, + key_COND_wsrep_replaying, key_COND_wsrep_ready, key_COND_wsrep_sst, + key_COND_wsrep_sst_init, key_COND_wsrep_sst_thread; + +#endif /* WITH_WSREP */ PSI_cond_key key_RELAYLOG_update_cond; static PSI_cond_info all_server_conds[]= @@ -8013,6 +8782,15 @@ static PSI_cond_info all_server_conds[]= { &key_user_level_lock_cond, "User_level_lock::cond", 0}, { &key_COND_thread_count, "COND_thread_count", PSI_FLAG_GLOBAL}, { &key_COND_thread_cache, "COND_thread_cache", PSI_FLAG_GLOBAL}, +#ifdef WITH_WSREP + { &key_COND_wsrep_ready, "COND_wsrep_ready", PSI_FLAG_GLOBAL}, + { &key_COND_wsrep_sst, "COND_wsrep_sst", PSI_FLAG_GLOBAL}, + { &key_COND_wsrep_sst_init, "COND_wsrep_sst_init", PSI_FLAG_GLOBAL}, + { &key_COND_wsrep_sst_thread, "wsrep_sst_thread", 0}, + { &key_COND_wsrep_rollback, "COND_wsrep_rollback", PSI_FLAG_GLOBAL}, + { &key_COND_wsrep_thd, "THD::COND_wsrep_thd", 0}, + { &key_COND_wsrep_replaying, "COND_wsrep_replaying", PSI_FLAG_GLOBAL}, +#endif { &key_COND_flush_thread_cache, "COND_flush_thread_cache", PSI_FLAG_GLOBAL} }; diff --git a/sql/mysqld.h b/sql/mysqld.h index 655fb93df730..7a682e6aad15 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -231,6 +231,10 @@ extern pthread_key(MEM_ROOT**,THR_MALLOC); extern PSI_mutex_key key_PAGE_lock, key_LOCK_sync, key_LOCK_active, key_LOCK_pool; #endif /* HAVE_MMAP */ +#ifdef WITH_WSREP +extern PSI_mutex_key key_LOCK_wsrep_thd; +extern PSI_cond_key key_COND_wsrep_thd; +#endif /* HAVE_WSREP */ #ifdef HAVE_OPENSSL extern PSI_mutex_key key_LOCK_des_key_file; @@ -416,6 +420,14 @@ enum options_mysqld OPT_WANT_CORE, OPT_ENGINE_CONDITION_PUSHDOWN, OPT_LOG_ERROR, +#ifdef WITH_WSREP + OPT_WSREP_PROVIDER, + OPT_WSREP_PROVIDER_OPTIONS, + OPT_WSREP_CLUSTER_ADDRESS, + OPT_WSREP_START_POSITION, + OPT_WSREP_SST_AUTH, + OPT_WSREP_RECOVER, +#endif /* WITH_WSREP */ OPT_MAX_LONG_DATA_SIZE }; @@ -521,4 +533,9 @@ inline THD *_current_thd(void) #endif #define current_thd _current_thd() +#ifdef WITH_WSREP +#include "my_pthread.h" +pthread_handler_t start_wsrep_THD(void*); +#endif /* WITH_WSREP */ + #endif /* MYSQLD_INCLUDED */ diff --git a/sql/protocol.cc b/sql/protocol.cc index 5736a74638d1..3c239b65e4dd 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -485,6 +485,14 @@ static uchar *net_store_length_fast(uchar *packet, uint length) void Protocol::end_statement() { +#ifdef WITH_WSREP + /*sanity check, can be removed before 1.0 release */ + if (WSREP(thd) && thd->wsrep_conflict_state== REPLAYING) + { + WSREP_ERROR("attempting net_end_statement while replaying"); + return; + } +#endif DBUG_ENTER("Protocol::end_statement"); DBUG_ASSERT(! thd->stmt_da->is_sent); bool error= FALSE; diff --git a/sql/set_var.h b/sql/set_var.h index 9be8719d1a1a..ecca4adc8bc4 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -253,6 +253,9 @@ class set_var :public set_var_base int check(THD *thd); int update(THD *thd); int light_check(THD *thd); +#ifdef WITH_WSREP + int wsrep_store_variable(THD *thd); +#endif }; @@ -333,6 +336,9 @@ extern sys_var *Sys_autocommit_ptr; CHARSET_INFO *get_old_charset_by_name(const char *old_name); +#ifdef WITH_WSREP +int sql_set_wsrep_variables(THD *thd, List *var_list); +#endif int sys_var_init(); int sys_var_add_options(DYNAMIC_ARRAY *long_options, int parse_flags); void sys_var_end(void); diff --git a/sql/slave.cc b/sql/slave.cc index 23460c1af63e..91f055caca63 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -52,6 +52,9 @@ // Create_file_log_event, // Format_description_log_event +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#endif #ifdef HAVE_REPLICATION #include "rpl_tblmap.h" @@ -3204,6 +3207,9 @@ pthread_handler_t handle_slave_sql(void *arg) my_off_t UNINIT_VAR(saved_log_pos); my_off_t UNINIT_VAR(saved_master_log_pos); my_off_t saved_skip= 0; +#ifdef WITH_WSREP + my_bool wsrep_node_dropped= FALSE; +#endif /* WITH_WSREP */ Relay_log_info* rli = &((Master_info*)arg)->rli; const char *errmsg; @@ -3211,6 +3217,9 @@ pthread_handler_t handle_slave_sql(void *arg) // needs to call my_thread_init(), otherwise we get a coredump in DBUG_ stuff my_thread_init(); DBUG_ENTER("handle_slave_sql"); +#ifdef WITH_WSREP + wsrep_restart_point: +#endif /* WITH_WSREP */ DBUG_ASSERT(rli->inited); mysql_mutex_lock(&rli->run_lock); @@ -3321,6 +3330,11 @@ pthread_handler_t handle_slave_sql(void *arg) #endif DBUG_ASSERT(rli->sql_thd == thd); +#ifdef WITH_WSREP + thd->wsrep_exec_mode= LOCAL_STATE; + /* synchronize with wsrep replication */ + if (WSREP_ON) wsrep_ready_wait(); +#endif DBUG_PRINT("master_info",("log_file_name: %s position: %s", rli->group_master_log_name, llstr(rli->group_master_log_pos,llbuff))); @@ -3462,6 +3476,12 @@ log '%s' at position %s, relay log '%s' position: %s", RPL_LOG_NAME, Error running query, slave SQL thread aborted. Fix the problem, and restart \ the slave SQL thread with \"SLAVE START\". We stopped at log \ '%s' position %s", RPL_LOG_NAME, llstr(rli->group_master_log_pos, llbuff)); +#ifdef WITH_WSREP + if (WSREP_ON && last_errno == ER_UNKNOWN_COM_ERROR) + { + wsrep_node_dropped= TRUE; + } +#endif /* WITH_WSREP */ } goto err; } @@ -3526,6 +3546,27 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \ delete thd; mysql_mutex_unlock(&LOCK_thread_count); mysql_mutex_unlock(&LOCK_thd_remove); +#ifdef WITH_WSREP + /* if slave stopped due to node going non primary, we set global flag to + trigger automatic restart of slave when node joins back to cluster + */ + if (wsrep_node_dropped && wsrep_restart_slave) + { + if (wsrep_ready) + { + WSREP_INFO("Slave error due to node temporarily non-primary" + "SQL slave will continue"); + wsrep_node_dropped= FALSE; + mysql_mutex_unlock(&rli->run_lock); + goto wsrep_restart_point; + } else { + WSREP_INFO("Slave error due to node going non-primary"); + WSREP_INFO("wsrep_restart_slave was set and therefore slave will be " + "automatically restarted when node joins back to cluster"); + wsrep_restart_slave_activated= TRUE; + } + } +#endif /* WITH_WSREP */ /* Note: the order of the broadcast and unlock calls below (first broadcast, then unlock) is important. Otherwise a killer_thread can execute between the calls and diff --git a/sql/sp.cc b/sql/sp.cc index 6300329398d8..06b34d6bcb09 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -2282,3 +2282,37 @@ sp_load_for_information_schema(THD *thd, TABLE *proc_table, String *db, thd->lex= old_lex; return sp; } +#ifdef WITH_WSREP +int wsrep_create_sp(THD *thd, uchar** buf, size_t* buf_len) +{ + String log_query; + sp_head *sp = thd->lex->sphead; + ulong saved_mode= thd->variables.sql_mode; + String retstr(64); + retstr.set_charset(system_charset_info); + + log_query.set_charset(system_charset_info); + + if (sp->m_type == TYPE_ENUM_FUNCTION) + { + sp_returns_type(thd, retstr, sp); + } + + if (!create_string(thd, &log_query, + sp->m_type, + (sp->m_explicit_name ? sp->m_db.str : NULL), + (sp->m_explicit_name ? sp->m_db.length : 0), + sp->m_name.str, sp->m_name.length, + sp->m_params.str, sp->m_params.length, + retstr.c_ptr(), retstr.length(), + sp->m_body.str, sp->m_body.length, + sp->m_chistics, &(thd->lex->definer->user), + &(thd->lex->definer->host), + saved_mode)) + { + WSREP_WARN("SP create string failed: %s", thd->query()); + return 1; + } + return wsrep_to_buf_helper(thd, log_query.ptr(), log_query.length(), buf, buf_len); +} +#endif /* WITH_WSREP */ diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 2bb074da1f70..d94216abdf3c 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1812,6 +1812,9 @@ int check_change_password(THD *thd, const char *host, const char *user, return(1); } if (!thd->slave_thread && +#ifdef WITH_WSREP + (!WSREP(thd) || !thd->wsrep_applier) && +#endif /* WITH_WSREP */ (strcmp(thd->security_ctx->user, user) || my_strcasecmp(system_charset_info, host, thd->security_ctx->priv_host))) @@ -1819,7 +1822,12 @@ int check_change_password(THD *thd, const char *host, const char *user, if (check_access(thd, UPDATE_ACL, "mysql", NULL, NULL, 1, 0)) return(1); } +#ifdef WITH_WSREP + if ((!WSREP(thd) || !thd->wsrep_applier) && + !thd->slave_thread && !thd->security_ctx->user[0]) +#else if (!thd->slave_thread && !thd->security_ctx->user[0]) +#endif /* WITH_WSREP */ { my_message(ER_PASSWORD_ANONYMOUS_USER, ER(ER_PASSWORD_ANONYMOUS_USER), MYF(0)); @@ -1858,10 +1866,13 @@ bool change_password(THD *thd, const char *host, const char *user, TABLE *table; /* Buffer should be extended when password length is extended. */ char buff[512]; - ulong query_length; + ulong query_length=0; bool save_binlog_row_based; uint new_password_len= (uint) strlen(new_password); bool result= 1; +#ifdef WITH_WSREP + const CSET_STRING query_save = thd->query_string; +#endif /* WITH_WSREP */ DBUG_ENTER("change_password"); DBUG_PRINT("enter",("host: '%s' user: '%s' new_password: '%s'", host,user,new_password)); @@ -1869,6 +1880,18 @@ bool change_password(THD *thd, const char *host, const char *user, if (check_change_password(thd, host, user, new_password, new_password_len)) DBUG_RETURN(1); +#ifdef WITH_WSREP + if (WSREP(thd) && !thd->wsrep_applier) + { + query_length= sprintf(buff, "SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'", + user ? user : "", + host ? host : "", + new_password); + thd->set_query_inner(buff, query_length, system_charset_info); + + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, (char*)"user", NULL); + } +#endif /* WITH_WSREP */ tables.init_one_table("mysql", 5, "user", 4, "user", TL_WRITE); @@ -1945,13 +1968,26 @@ bool change_password(THD *thd, const char *host, const char *user, } end: close_mysql_tables(thd); +#ifdef WITH_WSREP + if (WSREP(thd) && !thd->wsrep_applier) + { + WSREP_TO_ISOLATION_END; + thd->query_string = query_save; + thd->wsrep_exec_mode = LOCAL_STATE; + } +#endif /* WITH_WSREP */ /* Restore the state of binlog format */ DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row()); if (save_binlog_row_based) thd->set_current_stmt_binlog_format_row(); DBUG_RETURN(result); +#ifdef WITH_WSREP + error: + WSREP_ERROR("Replication of SET PASSWORD failed: %s", buff); + DBUG_RETURN(result); +#endif /* WITH_WSREP */ } diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index f07a80898538..784dfcd7fc42 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -1045,6 +1045,8 @@ bool Optimize_table_statement::execute(THD *thd) FALSE, UINT_MAX, FALSE)) goto error; /* purecov: inspected */ thd->enable_slow_log= opt_log_slow_admin_statements; + + WSREP_TO_ISOLATION_BEGIN(first_table->db, first_table->table_name, NULL) res= (specialflag & (SPECIAL_SAFE_MODE | SPECIAL_NO_NEW_FUNC)) ? mysql_recreate_table(thd, first_table) : mysql_admin_table(thd, first_table, &m_lex->check_opt, @@ -1076,6 +1078,7 @@ bool Repair_table_statement::execute(THD *thd) FALSE, UINT_MAX, FALSE)) goto error; /* purecov: inspected */ thd->enable_slow_log= opt_log_slow_admin_statements; + WSREP_TO_ISOLATION_BEGIN(first_table->db, first_table->table_name, NULL) res= mysql_admin_table(thd, first_table, &m_lex->check_opt, "repair", TL_WRITE, 1, test(m_lex->check_opt.sql_flags & TT_USEFRM), diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc index 6247d5818308..e5baa8c7741e 100644 --- a/sql/sql_alter.cc +++ b/sql/sql_alter.cc @@ -17,7 +17,9 @@ #include "sql_table.h" // mysql_alter_table, // mysql_exchange_partition #include "sql_alter.h" - +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#endif /* WITH_WSREP */ bool Alter_table_statement::execute(THD *thd) { LEX *lex= thd->lex; @@ -97,6 +99,20 @@ bool Alter_table_statement::execute(THD *thd) thd->enable_slow_log= opt_log_slow_admin_statements; +#ifdef WITH_WSREP + TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl); + + if ((!thd->is_current_stmt_binlog_format_row() || + !find_temporary_table(thd, first_table)) && + wsrep_to_isolation_begin(thd, + lex->name.str ? select_lex->db : NULL, + lex->name.str ? lex->name.str : NULL, + first_table)) + { + WSREP_WARN("ALTER TABLE isolation failure"); + DBUG_RETURN(TRUE); + } +#endif /* WITH_WSREP */ result= mysql_alter_table(thd, select_lex->db, lex->name.str, &create_info, first_table, @@ -105,5 +121,7 @@ bool Alter_table_statement::execute(THD *thd) select_lex->order_list.first, lex->ignore); +#ifdef WITH_WSREP +#endif /* WITH_WSREP */ DBUG_RETURN(result); } diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 040c04255775..cfcea66d0a10 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -57,7 +57,10 @@ #ifdef __WIN__ #include #endif - +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#include "wsrep_thd.h" +#endif // WITH_WSREP bool No_such_table_error_handler::handle_condition(THD *, @@ -4163,7 +4166,7 @@ thr_lock_type read_lock_type_for_table(THD *thd, */ bool log_on= mysql_bin_log.is_open() && thd->variables.sql_log_bin; ulong binlog_format= thd->variables.binlog_format; - if ((log_on == FALSE) || (binlog_format == BINLOG_FORMAT_ROW) || + if ((log_on == FALSE) || (WSREP_BINLOG_FORMAT(binlog_format) == BINLOG_FORMAT_ROW) || (table_list->table->s->table_category == TABLE_CATEGORY_LOG) || (table_list->table->s->table_category == TABLE_CATEGORY_PERFORMANCE) || !(is_update_query(prelocking_ctx->sql_command) || @@ -5018,9 +5021,33 @@ bool open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags, } } } +#ifdef WITH_WSREP + if ((thd->lex->sql_command== SQLCOM_INSERT || + thd->lex->sql_command== SQLCOM_INSERT_SELECT || + thd->lex->sql_command== SQLCOM_REPLACE || + thd->lex->sql_command== SQLCOM_REPLACE_SELECT || + thd->lex->sql_command== SQLCOM_UPDATE || + thd->lex->sql_command== SQLCOM_UPDATE_MULTI || + thd->lex->sql_command== SQLCOM_LOAD || + thd->lex->sql_command== SQLCOM_DELETE) && + wsrep_replicate_myisam && + (*start) && + (*start)->table && (*start)->table->file->ht->db_type == DB_TYPE_MYISAM) + { + WSREP_TO_ISOLATION_BEGIN(NULL, NULL, (*start)); + } + error: +#endif err: +#ifdef WITH_WSREP + if (WSREP(thd)) + thd_proc_info(thd, "exit open_tables()"); + else + thd_proc_info(thd, 0); +#else /* WITH_WSREP */ thd_proc_info(thd, 0); +#endif /* WITH_WSREP */ free_root(&new_frm_mem, MYF(0)); // Free pre-alloced block if (error && *table_to_open) @@ -5468,7 +5495,14 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type, trans_rollback_stmt(thd); close_thread_tables(thd); } +#ifdef WITH_WSREP + if (WSREP(thd)) + thd_proc_info(thd, "End opening table"); + else + thd_proc_info(thd, 0); +#else /* WITH_WSREP */ thd_proc_info(thd, 0); +#endif /* WITH_WSREP */ DBUG_RETURN(table); } @@ -5734,7 +5768,7 @@ bool lock_tables(THD *thd, TABLE_LIST *tables, uint count, We can solve these problems in mixed mode by switching to binlogging if at least one updated table is used by sub-statement */ - if (thd->variables.binlog_format != BINLOG_FORMAT_ROW && tables && + if (WSREP_BINLOG_FORMAT(thd->variables.binlog_format) != BINLOG_FORMAT_ROW && tables && has_write_table_with_auto_increment(thd->lex->first_not_own_table())) thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_AUTOINC_COLUMNS); } @@ -8894,7 +8928,19 @@ bool mysql_notify_thread_having_shared_lock(THD *thd, THD *in_use, (e.g. see partitioning code). */ if (!thd_table->needs_reopen()) +#ifdef WITH_WSREP + { + signalled|= mysql_lock_abort_for_thread(thd, thd_table); + if (thd && WSREP(thd) && wsrep_thd_is_BF((void *)thd, true)) + { + WSREP_DEBUG("remove_table_from_cache: %llu", + (unsigned long long) thd->real_id); + wsrep_abort_thd((void *)thd, (void *)in_use, FALSE); + } + } +#else signalled|= mysql_lock_abort_for_thread(thd, thd_table); +#endif } mysql_mutex_unlock(&in_use->LOCK_thd_data); } @@ -8948,9 +8994,13 @@ void tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type, mysql_mutex_assert_owner(&LOCK_open); } +#ifdef WITH_WSREP + /* if thd was BF aborted, exclusive locks were canceled */ +#else DBUG_ASSERT(remove_type == TDC_RT_REMOVE_UNUSED || thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name, MDL_EXCLUSIVE)); +#endif /* WITH_WSREP */ key_length= create_table_def_key(key, db, table_name); diff --git a/sql/sql_builtin.cc.in b/sql/sql_builtin.cc.in index cf7006fc7ce2..a89bd06ecc23 100644 --- a/sql/sql_builtin.cc.in +++ b/sql/sql_builtin.cc.in @@ -23,7 +23,11 @@ extern "C" extern #endif builtin_plugin - @mysql_mandatory_plugins@ @mysql_optional_plugins@ builtin_binlog_plugin, builtin_mysql_password_plugin; + @mysql_mandatory_plugins@ @mysql_optional_plugins@ builtin_binlog_plugin, +#ifdef WITH_WSREP + builtin_wsrep_plugin@mysql_plugin_defs@, +#endif /* WITH_WSREP */ + builtin_mysql_password_plugin; struct st_mysql_plugin *mysql_optional_plugins[]= { @@ -32,5 +36,9 @@ struct st_mysql_plugin *mysql_optional_plugins[]= struct st_mysql_plugin *mysql_mandatory_plugins[]= { - builtin_binlog_plugin, builtin_mysql_password_plugin, @mysql_mandatory_plugins@ 0 + builtin_binlog_plugin, +#ifdef WITH_WSREP + builtin_wsrep_plugin@mysql_plugin_defs@, +#endif /* WITH_WSREP */ + builtin_mysql_password_plugin, @mysql_mandatory_plugins@ 0 }; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 136c6012514d..5d22da81b3f7 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -60,6 +60,9 @@ #include "debug_sync.h" #include "sql_parse.h" // is_update_query #include "sql_callback.h" +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#endif /* The following is used to initialise Table_ident with a internal @@ -768,6 +771,172 @@ char *thd_security_context(THD *thd, char *buffer, unsigned int length, return buffer; } +#ifdef WITH_WSREP +extern "C" int wsrep_on(void *thd) +{ + return (int)(WSREP(((THD*)thd))); +} +extern "C" bool wsrep_thd_is_wsrep_on(THD *thd) +{ + return thd->variables.wsrep_on; +} + +extern "C" bool wsrep_consistency_check(void *thd) +{ + return ((THD*)thd)->wsrep_consistency_check == CONSISTENCY_CHECK_RUNNING; +} + +extern "C" void wsrep_thd_set_exec_mode(THD *thd, enum wsrep_exec_mode mode) +{ + thd->wsrep_exec_mode= mode; +} +extern "C" void wsrep_thd_set_query_state( + THD *thd, enum wsrep_query_state state) +{ + thd->wsrep_query_state= state; +} +extern "C" void wsrep_thd_set_conflict_state( + THD *thd, enum wsrep_conflict_state state) +{ + thd->wsrep_conflict_state= state; +} + + +extern "C" enum wsrep_exec_mode wsrep_thd_exec_mode(THD *thd) +{ + return thd->wsrep_exec_mode; +} + +extern "C" const char *wsrep_thd_exec_mode_str(THD *thd) +{ + return + (!thd) ? "void" : + (thd->wsrep_exec_mode == LOCAL_STATE) ? "local" : + (thd->wsrep_exec_mode == REPL_RECV) ? "applier" : + (thd->wsrep_exec_mode == TOTAL_ORDER) ? "total order" : + (thd->wsrep_exec_mode == LOCAL_COMMIT) ? "local commit" : "void"; +} + +extern "C" enum wsrep_query_state wsrep_thd_query_state(THD *thd) +{ + return thd->wsrep_query_state; +} + +extern "C" const char *wsrep_thd_query_state_str(THD *thd) +{ + return + (!thd) ? "void" : + (thd->wsrep_query_state == QUERY_IDLE) ? "idle" : + (thd->wsrep_query_state == QUERY_EXEC) ? "executing" : + (thd->wsrep_query_state == QUERY_COMMITTING) ? "committing" : + (thd->wsrep_query_state == QUERY_EXITING) ? "exiting" : + (thd->wsrep_query_state == QUERY_ROLLINGBACK) ? "rolling back" : "void"; +} + +extern "C" enum wsrep_conflict_state wsrep_thd_conflict_state(THD *thd) +{ + return thd->wsrep_conflict_state; +} +extern "C" const char *wsrep_thd_conflict_state_str(THD *thd) +{ + return + (!thd) ? "void" : + (thd->wsrep_conflict_state == NO_CONFLICT) ? "no conflict" : + (thd->wsrep_conflict_state == MUST_ABORT) ? "must abort" : + (thd->wsrep_conflict_state == ABORTING) ? "aborting" : + (thd->wsrep_conflict_state == MUST_REPLAY) ? "must replay" : + (thd->wsrep_conflict_state == REPLAYING) ? "replaying" : + (thd->wsrep_conflict_state == RETRY_AUTOCOMMIT) ? "retrying" : + (thd->wsrep_conflict_state == CERT_FAILURE) ? "cert failure" : "void"; +} + +extern "C" wsrep_ws_handle_t* wsrep_thd_ws_handle(THD *thd) +{ + return &thd->wsrep_ws_handle; +} + +extern "C"void wsrep_thd_LOCK(THD *thd) +{ + mysql_mutex_lock(&thd->LOCK_wsrep_thd); +} +extern "C"void wsrep_thd_UNLOCK(THD *thd) +{ + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); +} +extern "C" time_t wsrep_thd_query_start(THD *thd) +{ + return thd->query_start(); +} +extern "C" uint32 wsrep_thd_wsrep_rand(THD *thd) +{ + return thd->wsrep_rand; +} +extern "C" my_thread_id wsrep_thd_thread_id(THD *thd) +{ + return thd->thread_id; +} +extern "C" wsrep_seqno_t wsrep_thd_trx_seqno(THD *thd) +{ + return (thd) ? thd->wsrep_trx_meta.gtid.seqno : WSREP_SEQNO_UNDEFINED; +} +extern "C" query_id_t wsrep_thd_query_id(THD *thd) +{ + return thd->query_id; +} +extern "C" char *wsrep_thd_query(THD *thd) +{ + return (thd) ? thd->query() : NULL; +} +extern "C" query_id_t wsrep_thd_wsrep_last_query_id(THD *thd) +{ + return thd->wsrep_last_query_id; +} +extern "C" void wsrep_thd_set_wsrep_last_query_id(THD *thd, query_id_t id) +{ + thd->wsrep_last_query_id= id; +} +extern "C" void wsrep_thd_awake(THD *thd, my_bool signal) +{ + if (signal) + { + mysql_mutex_lock(&thd->LOCK_thd_data); + thd->awake(THD::KILL_QUERY); + mysql_mutex_unlock(&thd->LOCK_thd_data); + } + else + { + mysql_mutex_lock(&LOCK_wsrep_replaying); + mysql_cond_broadcast(&COND_wsrep_replaying); + mysql_mutex_unlock(&LOCK_wsrep_replaying); + } +} + +extern "C" int +wsrep_trx_order_before(void *thd1, void *thd2) +{ + if (wsrep_thd_trx_seqno((THD*)thd1) < wsrep_thd_trx_seqno((THD*)thd2)) { + WSREP_DEBUG("BF conflict, order: %lld %lld\n", + (long long)wsrep_thd_trx_seqno((THD*)thd1), + (long long)wsrep_thd_trx_seqno((THD*)thd2)); + return 1; + } + WSREP_DEBUG("waiting for BF, trx order: %lld %lld\n", + (long long)wsrep_thd_trx_seqno((THD*)thd1), + (long long)wsrep_thd_trx_seqno((THD*)thd2)); + return 0; +} +extern "C" int +wsrep_trx_is_aborting(void *thd_ptr) +{ + if (thd_ptr) { + if ((((THD *)thd_ptr)->wsrep_conflict_state == MUST_ABORT) || + (((THD *)thd_ptr)->wsrep_conflict_state == ABORTING)) { + return 1; + } + } + return 0; +} +#endif /** Implementation of Drop_table_error_handler::handle_condition(). @@ -796,7 +965,11 @@ bool Drop_table_error_handler::handle_condition(THD *thd, } +#ifdef WITH_WSREP +THD::THD(bool is_applier) +#else THD::THD() +#endif :Statement(&main_lex, &main_mem_root, STMT_CONVENTIONAL_EXECUTION, /* statement id */ 0), rli_fake(0), rli_slave(NULL), @@ -822,6 +995,12 @@ THD::THD() bootstrap(0), derived_tables_processing(FALSE), spcont(NULL), +#ifdef WITH_WSREP + wsrep_applier(is_applier), + wsrep_applier_closing(FALSE), + wsrep_client_thread(0), + wsrep_apply_toi(false), +#endif m_parser_state(NULL), #if defined(ENABLED_DEBUG_SYNC) debug_sync_control(0), @@ -901,6 +1080,22 @@ THD::THD() command=COM_CONNECT; *scramble= '\0'; +#ifdef WITH_WSREP + mysql_mutex_init(key_LOCK_wsrep_thd, &LOCK_wsrep_thd, MY_MUTEX_INIT_FAST); + mysql_cond_init(key_COND_wsrep_thd, &COND_wsrep_thd, NULL); + wsrep_ws_handle.trx_id = WSREP_UNDEFINED_TRX_ID; + wsrep_ws_handle.opaque = NULL; + wsrep_retry_counter = 0; + wsrep_PA_safe = true; + wsrep_retry_query = NULL; + wsrep_retry_query_len = 0; + wsrep_retry_command = COM_CONNECT; + wsrep_consistency_check = NO_CONSISTENCY_CHECK; + wsrep_status_vars = 0; + wsrep_mysql_replicated = 0; + wsrep_TOI_pre_query = NULL; + wsrep_TOI_pre_query_len = 0; +#endif /* Call to init() below requires fully initialized Open_tables_state. */ reset_open_tables_state(this); @@ -933,6 +1128,13 @@ THD::THD() randominit(&rand, tmp + (ulong) &rand, tmp + (ulong) ::global_query_id); substitute_null_with_insert_id = FALSE; thr_lock_info_init(&lock_info); /* safety: will be reset after start */ +#ifdef WITH_WSREP + lock_info.mysql_thd= (void *)this; + lock_info.in_lock_tables= false; +#ifdef WSREP_PROC_INFO + wsrep_info[sizeof(wsrep_info) - 1] = '\0'; /* make sure it is 0-terminated */ +#endif /* WSREP_PROC_INFO */ +#endif /* WITH_WSREP */ m_internal_handler= NULL; m_binlog_invoker= FALSE; @@ -1250,6 +1452,23 @@ void THD::init(void) update_charset(); reset_current_stmt_binlog_format_row(); bzero((char *) &status_var, sizeof(status_var)); +#ifdef WITH_WSREP + wsrep_exec_mode= wsrep_applier ? REPL_RECV : LOCAL_STATE; + wsrep_conflict_state= NO_CONFLICT; + wsrep_query_state= QUERY_IDLE; + wsrep_last_query_id= 0; + wsrep_trx_meta.gtid= WSREP_GTID_UNDEFINED; + wsrep_trx_meta.depends_on= WSREP_SEQNO_UNDEFINED; + wsrep_converted_lock_session= false; + //wsrep_retry_autocommit= ::wsrep_retry_autocommit; + wsrep_retry_counter= 0; + wsrep_rli= NULL; + wsrep_PA_safe= true; + wsrep_consistency_check = NO_CONSISTENCY_CHECK; + wsrep_mysql_replicated = 0; + wsrep_TOI_pre_query = NULL; + wsrep_TOI_pre_query_len = 0; +#endif if (variables.sql_log_bin) variables.option_bits|= OPTION_BIN_LOG; @@ -1386,6 +1605,13 @@ THD::~THD() mysql_mutex_unlock(&LOCK_thd_data); add_to_status(&global_status_var, &status_var); +#ifdef WITH_WSREP + mysql_mutex_lock(&LOCK_wsrep_thd); + mysql_mutex_unlock(&LOCK_wsrep_thd); + mysql_mutex_destroy(&LOCK_wsrep_thd); + if (wsrep_rli) delete wsrep_rli; + if (wsrep_status_vars) wsrep->stats_free(wsrep, wsrep_status_vars); +#endif /* Close connection */ #ifndef EMBEDDED_LIBRARY if (net.vio) @@ -2156,6 +2382,13 @@ bool sql_exchange::escaped_given(void) bool select_send::send_result_set_metadata(List &list, uint flags) { bool res; +#ifdef WITH_WSREP + if (WSREP(thd) && thd->wsrep_retry_query) + { + WSREP_DEBUG("skipping select metadata"); + return FALSE; + } +#endif /* WITH_WSREP */ if (!(res= thd->protocol->send_result_set_metadata(&list, flags))) is_result_set_started= 1; return res; @@ -3671,8 +3904,13 @@ extern "C" int thd_non_transactional_update(const MYSQL_THD thd) extern "C" int thd_binlog_format(const MYSQL_THD thd) { +#ifdef WITH_WSREP + if (((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()) && + (thd->variables.option_bits & OPTION_BIN_LOG)) +#else if (mysql_bin_log.is_open() && (thd->variables.option_bits & OPTION_BIN_LOG)) - return (int) thd->variables.binlog_format; +#endif + return (int) WSREP_BINLOG_FORMAT(thd->variables.binlog_format); else return BINLOG_FORMAT_UNSPEC; } @@ -4243,7 +4481,7 @@ int THD::decide_logging_format(TABLE_LIST *tables) binlog by filtering rules. */ if (mysql_bin_log.is_open() && (variables.option_bits & OPTION_BIN_LOG) && - !(variables.binlog_format == BINLOG_FORMAT_STMT && + !(WSREP_BINLOG_FORMAT(variables.binlog_format) == BINLOG_FORMAT_STMT && !binlog_filter->db_ok(db))) { /* @@ -4407,7 +4645,7 @@ int THD::decide_logging_format(TABLE_LIST *tables) */ my_error((error= ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE), MYF(0)); } - else if (variables.binlog_format == BINLOG_FORMAT_ROW && + else if (WSREP_BINLOG_FORMAT(variables.binlog_format) == BINLOG_FORMAT_ROW && sqlcom_can_generate_row_events(this)) { /* @@ -4436,7 +4674,7 @@ int THD::decide_logging_format(TABLE_LIST *tables) else { /* binlog_format = STATEMENT */ - if (variables.binlog_format == BINLOG_FORMAT_STMT) + if (WSREP_BINLOG_FORMAT(variables.binlog_format) == BINLOG_FORMAT_STMT) { if (lex->is_stmt_row_injection()) { @@ -4453,7 +4691,14 @@ int THD::decide_logging_format(TABLE_LIST *tables) 5. Error: Cannot modify table that uses a storage engine limited to row-logging when binlog_format = STATEMENT */ +#ifdef WITH_WSREP + if (!WSREP(this) || wsrep_exec_mode == LOCAL_STATE) + { +#endif /* WITH_WSREP */ my_error((error= ER_BINLOG_STMT_MODE_AND_ROW_ENGINE), MYF(0), ""); +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ } else if (is_write && (unsafe_flags= lex->get_stmt_unsafe_flags()) != 0) { @@ -4541,7 +4786,7 @@ int THD::decide_logging_format(TABLE_LIST *tables) "and binlog_filter->db_ok(db) = %d", mysql_bin_log.is_open(), (variables.option_bits & OPTION_BIN_LOG), - variables.binlog_format, + WSREP_BINLOG_FORMAT(variables.binlog_format), binlog_filter->db_ok(db))); #endif @@ -4796,7 +5041,13 @@ int THD::binlog_write_row(TABLE* table, bool is_trans, MY_BITMAP const* cols, size_t colcnt, uchar const *record) { +#ifdef WITH_WSREP + DBUG_ASSERT(is_current_stmt_binlog_format_row() && + ((WSREP(this) && wsrep_emulate_bin_log) || + mysql_bin_log.is_open())); +#else DBUG_ASSERT(is_current_stmt_binlog_format_row() && mysql_bin_log.is_open()); +#endif /* Pack records into format for transfer. We are allocating more @@ -4826,7 +5077,13 @@ int THD::binlog_update_row(TABLE* table, bool is_trans, const uchar *before_record, const uchar *after_record) { +#ifdef WITH_WSREP + DBUG_ASSERT(is_current_stmt_binlog_format_row() && + ((WSREP(this) && wsrep_emulate_bin_log) + || mysql_bin_log.is_open())); +#else DBUG_ASSERT(is_current_stmt_binlog_format_row() && mysql_bin_log.is_open()); +#endif size_t const before_maxlen = max_row_length(table, before_record); size_t const after_maxlen = max_row_length(table, after_record); @@ -4871,7 +5128,13 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans, MY_BITMAP const* cols, size_t colcnt, uchar const *record) { +#ifdef WITH_WSREP + DBUG_ASSERT(is_current_stmt_binlog_format_row() && + ((WSREP(this) && wsrep_emulate_bin_log) + || mysql_bin_log.is_open())); +#else DBUG_ASSERT(is_current_stmt_binlog_format_row() && mysql_bin_log.is_open()); +#endif /* Pack records into format for transfer. We are allocating more @@ -4902,7 +5165,11 @@ int THD::binlog_remove_pending_rows_event(bool clear_maps, { DBUG_ENTER("THD::binlog_remove_pending_rows_event"); +#ifdef WITH_WSREP + if (!(WSREP_EMULATE_BINLOG(this) || mysql_bin_log.is_open())) +#else if (!mysql_bin_log.is_open()) +#endif DBUG_RETURN(0); mysql_bin_log.remove_pending_rows_event(this, is_transactional); @@ -4921,7 +5188,11 @@ int THD::binlog_flush_pending_rows_event(bool stmt_end, bool is_transactional) mode: it might be the case that we left row-based mode before flushing anything (e.g., if we have explicitly locked tables). */ +#ifdef WITH_WSREP + if (!(WSREP_EMULATE_BINLOG(this) || mysql_bin_log.is_open())) +#else if (!mysql_bin_log.is_open()) +#endif DBUG_RETURN(0); /* @@ -5169,8 +5440,12 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg, DBUG_ENTER("THD::binlog_query"); DBUG_PRINT("enter", ("qtype: %s query: '%s'", show_query_type(qtype), query_arg)); +#ifdef WITH_WSREP + DBUG_ASSERT(query_arg && (WSREP_EMULATE_BINLOG(this) + || mysql_bin_log.is_open())); +#else DBUG_ASSERT(query_arg && mysql_bin_log.is_open()); - +#endif /* If we are not in prelocked mode, mysql_unlock_tables() will be called after this binlog_query(), so we have to flush the pending diff --git a/sql/sql_class.h b/sql/sql_class.h index 58328713e77d..fb947920b158 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -41,6 +41,18 @@ THR_LOCK_INFO */ +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +struct wsrep_thd_shadow { + ulonglong options; + uint server_status; + enum wsrep_exec_mode wsrep_exec_mode; + Vio *vio; + ulong tx_isolation; + char *db; + size_t db_length; +}; +#endif class Reprepare_observer; class Relay_log_info; @@ -505,6 +517,12 @@ typedef struct system_variables my_bool sysdate_is_now; +#ifdef WITH_WSREP + my_bool wsrep_on; + my_bool wsrep_causal_reads; + uint wsrep_sync_wait; + ulong wsrep_retry_autocommit; +#endif double long_query_time_double; my_bool pseudo_slave_mode; @@ -1661,7 +1679,8 @@ class THD :public Statement, int is_current_stmt_binlog_format_row() const { DBUG_ASSERT(current_stmt_binlog_format == BINLOG_FORMAT_STMT || current_stmt_binlog_format == BINLOG_FORMAT_ROW); - return current_stmt_binlog_format == BINLOG_FORMAT_ROW; + return (WSREP_BINLOG_FORMAT((ulong)current_stmt_binlog_format) == + BINLOG_FORMAT_ROW); } private: @@ -2184,6 +2203,40 @@ class THD :public Statement, query_id_t first_query_id; } binlog_evt_union; +#ifdef WITH_WSREP + const bool wsrep_applier; /* dedicated slave applier thread */ + bool wsrep_applier_closing; /* applier marked to close */ + bool wsrep_client_thread; /* to identify client threads*/ + enum wsrep_exec_mode wsrep_exec_mode; + query_id_t wsrep_last_query_id; + enum wsrep_query_state wsrep_query_state; + enum wsrep_conflict_state wsrep_conflict_state; + mysql_mutex_t LOCK_wsrep_thd; + mysql_cond_t COND_wsrep_thd; + // changed from wsrep_seqno_t to wsrep_trx_meta_t in wsrep API rev 75 + // wsrep_seqno_t wsrep_trx_seqno; + wsrep_trx_meta_t wsrep_trx_meta; + uint32 wsrep_rand; + Relay_log_info* wsrep_rli; + bool wsrep_converted_lock_session; + wsrep_ws_handle_t wsrep_ws_handle; +#ifdef WSREP_PROC_INFO + char wsrep_info[128]; /* string for dynamic proc info */ +#endif /* WSREP_PROC_INFO */ + ulong wsrep_retry_counter; // of autocommit + bool wsrep_PA_safe; + char* wsrep_retry_query; + size_t wsrep_retry_query_len; + enum enum_server_command wsrep_retry_command; + enum wsrep_consistency_check_mode + wsrep_consistency_check; + wsrep_stats_var* wsrep_status_vars; + int wsrep_mysql_replicated; + const char* wsrep_TOI_pre_query; /* a query to apply before + the actual TOI query */ + size_t wsrep_TOI_pre_query_len; + bool wsrep_apply_toi; /* applier processing in TOI */ +#endif /* WITH_WSREP */ /** Internal parser state. Note that since the parser is not re-entrant, we keep only one parser @@ -2215,7 +2268,11 @@ class THD :public Statement, /* Debug Sync facility. See debug_sync.cc. */ struct st_debug_sync_control *debug_sync_control; #endif /* defined(ENABLED_DEBUG_SYNC) */ +#ifdef WITH_WSREP + THD(bool is_applier = false); +#else THD(); +#endif ~THD(); void init(void); @@ -2579,7 +2636,7 @@ class THD :public Statement, tests fail and so force them to propagate the lex->binlog_row_based_if_mixed upwards to the caller. */ - if ((variables.binlog_format == BINLOG_FORMAT_MIXED) && + if ((WSREP_BINLOG_FORMAT(variables.binlog_format) == BINLOG_FORMAT_MIXED)&& (in_sub_stmt == 0)) set_current_stmt_binlog_format_row(); @@ -2621,7 +2678,7 @@ class THD :public Statement, show_system_thread(system_thread))); if (in_sub_stmt == 0) { - if (variables.binlog_format == BINLOG_FORMAT_ROW) + if (WSREP_BINLOG_FORMAT(variables.binlog_format) == BINLOG_FORMAT_ROW) set_current_stmt_binlog_format_row(); else if (temporary_tables == NULL) clear_current_stmt_binlog_format_row(); diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index ed0b20a0e347..e4e1aa9de374 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -56,6 +56,9 @@ #else #define MIN_HANDSHAKE_SIZE 6 #endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */ +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#endif /* Get structure for logging connection data for the current user @@ -659,6 +662,17 @@ bool login_connection(THD *thd) void end_connection(THD *thd) { NET *net= &thd->net; +#ifdef WITH_WSREP + if (WSREP(thd)) + { + wsrep_status_t rcode= wsrep->free_connection(wsrep, thd->thread_id); + if (rcode) { + WSREP_WARN("wsrep failed to free connection context: %lu, code: %d", + thd->thread_id, rcode); + } + } + thd->wsrep_client_thread= 0; +#endif plugin_thdvar_cleanup(thd); /* @@ -795,6 +809,9 @@ bool thd_prepare_connection(THD *thd) (char *) thd->security_ctx->host_or_ip); prepare_new_connection_state(thd); +#ifdef WITH_WSREP + thd->wsrep_client_thread= 1; +#endif /* WITH_WSREP */ return FALSE; } @@ -864,6 +881,14 @@ void do_handle_one_connection(THD *thd_arg) } end_connection(thd); +#ifdef WITH_WSREP + if (WSREP(thd)) + { + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + thd->wsrep_query_state= QUERY_EXITING; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + } +#endif end_thread: close_connection(thd); if (MYSQL_CALLBACK_ELSE(thread_scheduler, end_thread, (thd, 1), 0)) diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 1bbc9af08353..a11087e31cbe 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -384,7 +384,11 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, /* See similar binlogging code in sql_update.cc, for comments */ if ((error < 0) || thd->transaction.stmt.modified_non_trans_table) { +#ifdef WITH_WSREP + if ((WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open())) +#else if (mysql_bin_log.is_open()) +#endif { int errcode= 0; if (error < 0) @@ -815,7 +819,11 @@ void multi_delete::abort_result_set() /* there is only side effects; to binlog with the error */ +#ifdef WITH_WSREP + if (WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()) +#else if (mysql_bin_log.is_open()) +#endif { int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED); /* possible error of writing binary log is ignored deliberately */ @@ -988,7 +996,11 @@ bool multi_delete::send_eof() } if ((local_error == 0) || thd->transaction.stmt.modified_non_trans_table) { +#ifdef WITH_WSREP + if (WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()) +#else if (mysql_bin_log.is_open()) +#endif { int errcode= 0; if (local_error == 0) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index d6a83b9c35e2..ed26d16a68d5 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -984,7 +984,11 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, thd->transaction.stmt.modified_non_trans_table || was_insert_delayed) { +#ifdef WITH_WSREP + if (WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()) +#else if (mysql_bin_log.is_open()) +#endif { int errcode= 0; if (error <= 0) @@ -3032,6 +3036,11 @@ bool Delayed_insert::handle_inserts(void) mysql_cond_broadcast(&cond_client); // If waiting clients } } +#ifdef WITH_WSREP + if (WSREP((&thd))) + thd_proc_info(&thd, "insert done"); + else +#endif /* WITH_WSREP */ thd_proc_info(&thd, 0); mysql_mutex_unlock(&mutex); @@ -3477,8 +3486,15 @@ bool select_insert::send_eof() DBUG_PRINT("enter", ("trans_table=%d, table_type='%s'", trans_table, table->file->table_type())); +#ifdef WITH_WSREP + error= (thd->wsrep_conflict_state == MUST_ABORT || + thd->wsrep_conflict_state == CERT_FAILURE) ? -1 : + (thd->locked_tables_mode <= LTM_LOCK_TABLES ? + table->file->ha_end_bulk_insert() : 0); +#else error= (thd->locked_tables_mode <= LTM_LOCK_TABLES ? table->file->ha_end_bulk_insert() : 0); +#endif /* WITH_WSREP */ if (!error && thd->is_error()) error= thd->stmt_da->sql_errno(); @@ -3507,8 +3523,13 @@ bool select_insert::send_eof() events are in the transaction cache and will be written when ha_autocommit_or_rollback() is issued below. */ +#ifdef WITH_WSREP + if ((WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()) && + (!error || thd->transaction.stmt.modified_non_trans_table)) +#else if (mysql_bin_log.is_open() && (!error || thd->transaction.stmt.modified_non_trans_table)) +#endif { int errcode= 0; if (!error) @@ -3591,7 +3612,11 @@ void select_insert::abort_result_set() { if (!can_rollback_data()) thd->transaction.all.modified_non_trans_table= TRUE; +#ifdef WITH_WSREP + if (WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()) +#else if (mysql_bin_log.is_open()) +#endif { int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED); /* error of writing binary log is ignored */ @@ -3971,7 +3996,11 @@ select_create::binlog_show_create_table(TABLE **tables, uint count) /* show_database */ TRUE); DBUG_ASSERT(result == 0); /* store_create_info() always return 0 */ +#ifdef WITH_WSREP + if (WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()) +#else if (mysql_bin_log.is_open()) +#endif /* WITH_WSREP */ { int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED); result= thd->binlog_query(THD::STMT_QUERY_TYPE, @@ -3981,6 +4010,9 @@ select_create::binlog_show_create_table(TABLE **tables, uint count) /* suppress_use */ FALSE, errcode); } +#ifdef WITH_WSREP + ha_wsrep_fake_trx_id(thd); +#endif return result; } @@ -4037,6 +4069,18 @@ bool select_create::send_eof() { trans_commit_stmt(thd); trans_commit_implicit(thd); +#ifdef WITH_WSREP + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + if (thd->wsrep_conflict_state != NO_CONFLICT) + { + WSREP_DEBUG("select_create commit failed, thd: %lu err: %d %s", + thd->thread_id, thd->wsrep_conflict_state, thd->query()); + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + abort_result_set(); + return TRUE; + } + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); +#endif /* WITH_WSREP */ } table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 174467780347..d3bb6bea202b 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1455,6 +1455,17 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd) } else { +#ifdef WITH_WSREP + if (version == 99997 && thd->wsrep_exec_mode == LOCAL_STATE) + { + WSREP_DEBUG("consistency check: %s", thd->query()); + thd->wsrep_consistency_check= CONSISTENCY_CHECK_DECLARED; + lip->yySkipn(5); + lip->set_echo(TRUE); + state=MY_LEX_START; + break; /* Do not treat contents as a comment. */ + } +#endif /* WITH_WSREP */ /* Patch and skip the conditional comment to avoid it being propagated infinitely (eg. to a slave). diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index ea63d23d182a..e87aefec18a5 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -97,6 +97,12 @@ #define FLAGSTR(V,F) ((V)&(F)?#F" ":"") +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#include "wsrep_thd.h" +static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, + Parser_state *parser_state); +#endif /* WITH_WSREP */ /** @defgroup Runtime_Environment Runtime Environment @{ @@ -676,7 +682,18 @@ bool do_command(THD *thd) NET *net= &thd->net; enum enum_server_command command; DBUG_ENTER("do_command"); - +#ifdef WITH_WSREP + if (WSREP(thd)) + { + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + thd->wsrep_query_state= QUERY_IDLE; + if (thd->wsrep_conflict_state==MUST_ABORT) + { + wsrep_client_rollback(thd); + } + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + } +#endif /* WITH_WSREP */ /* indicator of uninitialized lex => normal flow of errors handling (see my_message_sql) @@ -716,11 +733,48 @@ bool do_command(THD *thd) */ DEBUG_SYNC(thd, "before_do_command_net_read"); +#ifdef WITH_WSREP + if (WSREP(thd)) { + packet_length= my_net_read(net); + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + /* these THD's are aborted or are aborting during being idle */ + if (thd->wsrep_conflict_state == ABORTING) + { + while (thd->wsrep_conflict_state == ABORTING) { + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + my_sleep(1000); + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + } + thd->store_globals(); + } + else if (thd->wsrep_conflict_state == ABORTED) + { + thd->store_globals(); + } + + thd->wsrep_query_state= QUERY_EXEC; + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + } + if ((WSREP(thd) && packet_length == packet_error) || + (!WSREP(thd) && (packet_length= my_net_read(net)) == packet_error)) +#else if ((packet_length= my_net_read(net)) == packet_error) +#endif /* WITH_WSREP */ { DBUG_PRINT("info",("Got error %d reading command from socket %s", net->error, vio_description(net->vio))); +#ifdef WITH_WSREP + if (WSREP(thd)) { + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + if (thd->wsrep_conflict_state == MUST_ABORT) + { + DBUG_PRINT("wsrep",("aborted for wsrep rollback: %lu", thd->real_id)); + wsrep_client_rollback(thd); + } + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + } +#endif /* WITH_WSREP */ /* Check if we can continue without closing the connection */ @@ -766,12 +820,54 @@ bool do_command(THD *thd) vio_description(net->vio), command, command_name[command].str)); +#ifdef WITH_WSREP + if (WSREP(thd)) { + /* + * bail out if DB snapshot has not been installed. We however, + * allow queries "SET" and "SHOW", they are trapped later in execute_command + */ + if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready && + command != COM_QUERY && + command != COM_PING && + command != COM_QUIT && + command != COM_PROCESS_INFO && + command != COM_PROCESS_KILL && + command != COM_SET_OPTION && + command != COM_SHUTDOWN && + command != COM_SLEEP && + command != COM_STATISTICS && + command != COM_TIME && + command != COM_END + ) { + my_error(ER_UNKNOWN_COM_ERROR, MYF(0), + "WSREP has not yet prepared node for application use"); + thd->protocol->end_statement(); + return_value= FALSE; + goto out; + } + } +#endif /* WITH_WSREP */ /* Restore read timeout value */ my_net_set_read_timeout(net, thd->variables.net_read_timeout); DBUG_ASSERT(packet_length); return_value= dispatch_command(command, thd, packet+1, (uint) (packet_length-1)); - +#ifdef WITH_WSREP + if (WSREP(thd)) { + while (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT) + { + return_value= dispatch_command(command, thd, thd->wsrep_retry_query, + thd->wsrep_retry_query_len); + } + } + if (thd->wsrep_retry_query && thd->wsrep_conflict_state != REPLAYING) + { + my_free(thd->wsrep_retry_query); + thd->wsrep_retry_query = NULL; + thd->wsrep_retry_query_len = 0; + thd->wsrep_retry_command = COM_CONNECT; + } +#endif /* WITH_WSREP */ out: DBUG_RETURN(return_value); } @@ -845,6 +941,36 @@ static my_bool deny_updates_if_read_only_option(THD *thd, DBUG_RETURN(FALSE); } +#ifdef WITH_WSREP +static my_bool wsrep_read_only_option(THD *thd, TABLE_LIST *all_tables) +{ + int opt_readonly_saved = opt_readonly; + ulong flag_saved = (ulong)(thd->security_ctx->master_access & SUPER_ACL); + + opt_readonly = 0; + thd->security_ctx->master_access &= ~SUPER_ACL; + + my_bool ret = !deny_updates_if_read_only_option(thd, all_tables); + + opt_readonly = opt_readonly_saved; + thd->security_ctx->master_access |= flag_saved; + + return ret; +} + +static void wsrep_copy_query(THD *thd) +{ + thd->wsrep_retry_command = thd->command; + thd->wsrep_retry_query_len = thd->query_length(); + if (thd->wsrep_retry_query) { + my_free(thd->wsrep_retry_query); + } + thd->wsrep_retry_query = (char *)my_malloc( + thd->wsrep_retry_query_len + 1, MYF(0)); + strncpy(thd->wsrep_retry_query, thd->query(), thd->wsrep_retry_query_len); + thd->wsrep_retry_query[thd->wsrep_retry_query_len] = '\0'; +} +#endif /* WITH_WSREP */ /** Perform one connection-level (COM_XXXX) command. @@ -874,6 +1000,42 @@ bool dispatch_command(enum enum_server_command command, THD *thd, DBUG_ENTER("dispatch_command"); DBUG_PRINT("info",("packet: '%*.s'; command: %d", packet_length, packet, command)); +#ifdef WITH_WSREP + if (WSREP(thd)) { + if (!thd->in_multi_stmt_transaction_mode()) + { + thd->wsrep_PA_safe= true; + } + + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + thd->wsrep_query_state= QUERY_EXEC; + if (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT) + { + thd->wsrep_conflict_state= NO_CONFLICT; + } + if (thd->wsrep_conflict_state== MUST_ABORT) + { + wsrep_client_rollback(thd); + } + if (thd->wsrep_conflict_state== ABORTED) + { + my_error(ER_LOCK_DEADLOCK, MYF(0), "wsrep aborted transaction"); + WSREP_DEBUG("Deadlock error for: %s", thd->query()); + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + thd->killed = THD::NOT_KILLED; + thd->mysys_var->abort = 0; + thd->wsrep_conflict_state = NO_CONFLICT; + thd->wsrep_retry_counter = 0; + /* + Increment threads running to compensate dec_thread_running() called + after dispatch_end label. + */ + inc_thread_running(); + goto dispatch_end; + } + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + } +#endif /* WITH_WSREP */ #if defined(ENABLED_PROFILING) thd->profiling.start_new_query(); #endif @@ -1035,7 +1197,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd, if (parser_state.init(thd, thd->query(), thd->query_length())) break; +#ifdef WITH_WSREP + wsrep_mysql_parse(thd, thd->query(), thd->query_length(), &parser_state); +#else mysql_parse(thd, thd->query(), thd->query_length(), &parser_state); +#endif /* WITH_WSREP */ while (!thd->killed && (parser_state.m_lip.found_semicolon != NULL) && ! thd->is_error()) @@ -1087,10 +1253,19 @@ bool dispatch_command(enum enum_server_command command, THD *thd, Count each statement from the client. */ statistic_increment(thd->status_var.questions, &LOCK_status); +#ifdef WITH_WSREP + if (!WSREP(thd)) + thd->set_time(); /* Reset the query start time. */ +#else thd->set_time(); /* Reset the query start time. */ +#endif /* WITH_WSREP */ parser_state.reset(beginning_of_next_stmt, length); /* TODO: set thd->lex->sql_command to SQLCOM_END here */ +#ifdef WITH_WSREP + wsrep_mysql_parse(thd, beginning_of_next_stmt, length, &parser_state); +#else mysql_parse(thd, beginning_of_next_stmt, length, &parser_state); +#endif /* WITH_WSREP */ } DBUG_PRINT("info",("query ready")); @@ -1414,6 +1589,26 @@ bool dispatch_command(enum enum_server_command command, THD *thd, my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0)); break; } +#ifdef WITH_WSREP + dispatch_end: + + if (WSREP(thd)) { + /* wsrep BF abort in query exec phase */ + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + if ((thd->wsrep_conflict_state != REPLAYING) && + (thd->wsrep_conflict_state != RETRY_AUTOCOMMIT)) { + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + + thd->update_server_status(); + thd->protocol->end_statement(); + query_cache_end_of_result(thd); + } + else + { + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + } + } else { /* if (WSREP(thd))... */ +#endif /* WITH_WSREP */ DBUG_ASSERT(thd->derived_tables == NULL && (thd->open_tables == NULL || (thd->locked_tables_mode == LTM_LOCK_TABLES))); @@ -1422,6 +1617,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd, thd->update_server_status(); thd->protocol->end_statement(); query_cache_end_of_result(thd); +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ if (!thd->is_error() && !thd->killed_errno()) mysql_audit_general(thd, MYSQL_AUDIT_GENERAL_RESULT, 0, 0); @@ -1436,7 +1634,16 @@ bool dispatch_command(enum enum_server_command command, THD *thd, thd->reset_query(); thd->command=COM_SLEEP; dec_thread_running(); +#ifdef WITH_WSREP + if (WSREP(thd)) { + thd_proc_info(thd, "sleeping"); + } else { +#endif /* WITH_WSREP */ thd_proc_info(thd, 0); +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ + thd->packet.shrink(thd->variables.net_buffer_length); // Reclaim some memory free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC)); @@ -1854,6 +2061,13 @@ static bool lock_tables_open_and_lock_tables(THD *thd, TABLE_LIST *tables) return TRUE; } +#ifdef WITH_WSREP +static bool wsrep_is_show_query(enum enum_sql_command command) +{ + DBUG_ASSERT(command >= 0 && command <= SQLCOM_END); + return (sql_command_flags[command] & CF_STATUS_COMMAND) != 0; +} +#endif /* WITH_WSREP */ /** Execute command saved in thd and lex->sql_command. @@ -2072,7 +2286,66 @@ mysql_execute_command(THD *thd) #ifdef HAVE_REPLICATION } /* endif unlikely slave */ #endif +#ifdef WITH_WSREP + if (WSREP(thd)) { + /* + change LOCK TABLE WRITE to transaction + */ + if (lex->sql_command== SQLCOM_LOCK_TABLES && wsrep_convert_LOCK_to_trx) + { + for (TABLE_LIST *table= all_tables; table; table= table->next_global) + { + if (table->lock_type >= TL_WRITE_ALLOW_WRITE) + { + lex->sql_command= SQLCOM_BEGIN; + thd->wsrep_converted_lock_session= true; + break; + } + } + } + if (lex->sql_command== SQLCOM_UNLOCK_TABLES && + thd->wsrep_converted_lock_session) + { + thd->wsrep_converted_lock_session= false; + lex->sql_command= SQLCOM_COMMIT; + lex->tx_release= TVL_NO; + } + /* + * bail out if DB snapshot has not been installed. We however, + * allow SET and SHOW queries + */ + if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready && + lex->sql_command != SQLCOM_SET_OPTION && + !wsrep_is_show_query(lex->sql_command)) + { +#if DIRTY_HACK + /* Dirty hack for lp:1002714 - trying to recognize mysqldump connection + * and allow it to continue. Actuall mysqldump_magic_str may be longer + * and is obviously version dependent and may be issued by any client + * connection after which connection becomes non-replicating. */ + static char const mysqldump_magic_str[]= +"SELECT LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_SIZE, ENGINE, EXTRA FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'UNDO LOG' AND FILE_NAME IS NOT NULL"; + static const size_t mysqldump_magic_str_len= sizeof(mysqldump_magic_str) -1; + if (SQLCOM_SELECT != lex->sql_command || + thd->query_length() < mysqldump_magic_str_len || + strncmp(thd->query(), mysqldump_magic_str, mysqldump_magic_str_len)) + { +#endif /* DIRTY_HACK */ + my_error(ER_UNKNOWN_COM_ERROR, MYF(0), + "WSREP has not yet prepared node for application use"); + goto error; +#if DIRTY_HACK + } + else + { + /* mysqldump connection, allow all further queries to pass */ + thd->variables.wsrep_on= FALSE; + } +#endif /* DIRTY_HACK */ + } + } +#endif /* WITH_WSREP */ status_var_increment(thd->status_var.com_stat[lex->sql_command]); DBUG_ASSERT(thd->transaction.stmt.modified_non_trans_table == FALSE); @@ -2094,7 +2367,13 @@ mysql_execute_command(THD *thd) DBUG_ASSERT(thd->transaction.stmt.is_empty()); /* Commit the normal transaction if one is active. */ if (trans_commit_implicit(thd)) + { + thd->mdl_context.release_transactional_locks(); +#ifdef WITH_WSREP + WSREP_DEBUG("implicit commit failed, MDL released: %lu", thd->thread_id); +#endif /* WITH_WSREP */ goto error; + } /* Release metadata locks acquired in this transaction. */ thd->mdl_context.release_transactional_locks(); } @@ -2113,6 +2392,9 @@ mysql_execute_command(THD *thd) #endif case SQLCOM_SHOW_STATUS_PROC: case SQLCOM_SHOW_STATUS_FUNC: +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; +#endif /* WITH_WSREP */ if ((res= check_table_access(thd, SELECT_ACL, all_tables, FALSE, UINT_MAX, FALSE))) goto error; @@ -2122,6 +2404,9 @@ mysql_execute_command(THD *thd) { system_status_var old_status_var= thd->status_var; thd->initial_status_var= &old_status_var; +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; +#endif /* WITH_WSREP */ if (!(res= check_table_access(thd, SELECT_ACL, all_tables, FALSE, UINT_MAX, FALSE))) res= execute_sqlcom_select(thd, all_tables); @@ -2137,6 +2422,9 @@ mysql_execute_command(THD *thd) &old_status_var); thd->status_var= old_status_var; mysql_mutex_unlock(&LOCK_status); +#ifdef WITH_WSREP + if (lex->sql_command == SQLCOM_SHOW_STATUS) wsrep_free_status(thd); +#endif /* WITH_WSREP */ break; } case SQLCOM_SHOW_DATABASES: @@ -2147,12 +2435,22 @@ mysql_execute_command(THD *thd) case SQLCOM_SHOW_PLUGINS: case SQLCOM_SHOW_FIELDS: case SQLCOM_SHOW_KEYS: +#ifndef WITH_WSREP case SQLCOM_SHOW_VARIABLES: case SQLCOM_SHOW_CHARSETS: case SQLCOM_SHOW_COLLATIONS: case SQLCOM_SHOW_STORAGE_ENGINES: case SQLCOM_SHOW_PROFILE: +#endif /* WITH_WSREP */ case SQLCOM_SELECT: +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; + case SQLCOM_SHOW_VARIABLES: + case SQLCOM_SHOW_CHARSETS: + case SQLCOM_SHOW_COLLATIONS: + case SQLCOM_SHOW_STORAGE_ENGINES: + case SQLCOM_SHOW_PROFILE: +#endif /* WITH_WSREP */ { thd->status_var.last_query_cost= 0.0; @@ -2467,7 +2765,7 @@ case SQLCOM_PREPARE: */ if (thd->query_name_consts && mysql_bin_log.is_open() && - thd->variables.binlog_format == BINLOG_FORMAT_STMT && + WSREP_BINLOG_FORMAT(thd->variables.binlog_format) == BINLOG_FORMAT_STMT && !mysql_bin_log.is_query_in_union(thd, thd->query_id)) { List_iterator_fast it(select_lex->item_list); @@ -2579,6 +2877,15 @@ case SQLCOM_PREPARE: } else { +#ifdef WITH_WSREP + /* in STATEMENT format, we probably have to replicate also temporary + tables, like mysql replication does + */ + if (!thd->is_current_stmt_binlog_format_row() || + !(create_info.options & HA_LEX_CREATE_TMP_TABLE)) + WSREP_TO_ISOLATION_BEGIN(create_table->db, create_table->table_name, + NULL) +#endif /* WITH_WSREP */ /* Regular CREATE TABLE */ res= mysql_create_table(thd, create_table, &create_info, &alter_info); @@ -2612,6 +2919,7 @@ case SQLCOM_PREPARE: DBUG_ASSERT(first_table == all_tables && first_table != 0); if (check_one_table_access(thd, INDEX_ACL, all_tables)) goto error; /* purecov: inspected */ + WSREP_TO_ISOLATION_BEGIN(first_table->db, first_table->table_name, NULL) /* Currently CREATE INDEX or DROP INDEX cause a full table rebuild and thus classify as slow administrative statements just like @@ -2696,8 +3004,11 @@ case SQLCOM_PREPARE: goto error; } + WSREP_TO_ISOLATION_BEGIN(0, 0, first_table) if (mysql_rename_tables(thd, first_table, 0)) + { goto error; + } break; } #ifndef EMBEDDED_LIBRARY @@ -2723,6 +3034,10 @@ case SQLCOM_PREPARE: goto error; #else { +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; +#endif /* WITH_WSREP */ + /* Access check: SHOW CREATE TABLE require any privileges on the table level (ie @@ -2778,6 +3093,10 @@ case SQLCOM_PREPARE: case SQLCOM_CHECKSUM: { DBUG_ASSERT(first_table == all_tables && first_table != 0); +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; +#endif /* WITH_WSREP */ + if (check_table_access(thd, SELECT_ACL, all_tables, FALSE, UINT_MAX, FALSE)) goto error; /* purecov: inspected */ @@ -2786,6 +3105,10 @@ case SQLCOM_PREPARE: break; } case SQLCOM_UPDATE: +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && + wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE)) goto error; +#endif /* WITH_WSREP */ { ha_rows found= 0, updated= 0; DBUG_ASSERT(first_table == all_tables && first_table != 0); @@ -2825,6 +3148,10 @@ case SQLCOM_PREPARE: /* if we switched from normal update, rights are checked */ if (up_result != 2) { +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && + wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE)) goto error; +#endif /* WITH_WSREP */ if ((res= multi_update_precheck(thd, all_tables))) break; } @@ -2894,6 +3221,10 @@ case SQLCOM_PREPARE: break; } case SQLCOM_REPLACE: +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && + wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE)) goto error; +#endif /* WITH_WSREP */ #ifndef DBUG_OFF if (mysql_bin_log.is_open()) { @@ -2929,6 +3260,10 @@ case SQLCOM_PREPARE: } #endif case SQLCOM_INSERT: +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && + wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE)) goto error; +#endif /* WITH_WSREP */ { DBUG_ASSERT(first_table == all_tables && first_table != 0); if ((res= insert_precheck(thd, all_tables))) @@ -2962,11 +3297,23 @@ case SQLCOM_PREPARE: } case SQLCOM_REPLACE_SELECT: case SQLCOM_INSERT_SELECT: +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && + wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE)) goto error; +#endif /* WITH_WSREP */ { select_result *sel_result; DBUG_ASSERT(first_table == all_tables && first_table != 0); if ((res= insert_precheck(thd, all_tables))) break; +#ifdef WITH_WSREP + if (thd->wsrep_consistency_check == CONSISTENCY_CHECK_DECLARED) + { + thd->wsrep_consistency_check = CONSISTENCY_CHECK_RUNNING; + WSREP_TO_ISOLATION_BEGIN(first_table->db, first_table->table_name, NULL); + } + +#endif /* INSERT...SELECT...ON DUPLICATE KEY UPDATE/REPLACE SELECT/ INSERT...IGNORE...SELECT can be unsafe, unless ORDER BY PRIMARY KEY @@ -3046,6 +3393,10 @@ case SQLCOM_PREPARE: break; } case SQLCOM_DELETE: +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && + wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE)) goto error; +#endif /* WITH_WSREP */ { DBUG_ASSERT(first_table == all_tables && first_table != 0); if ((res= delete_precheck(thd, all_tables))) @@ -3061,6 +3412,10 @@ case SQLCOM_PREPARE: break; } case SQLCOM_DELETE_MULTI: +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && + wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE)) goto error; +#endif /* WITH_WSREP */ { DBUG_ASSERT(first_table == all_tables && first_table != 0); TABLE_LIST *aux_tables= thd->lex->auxiliary_table_list.first; @@ -3126,6 +3481,18 @@ case SQLCOM_PREPARE: /* So that DROP TEMPORARY TABLE gets to binlog at commit/rollback */ thd->variables.option_bits|= OPTION_KEEP_LOG; } +#ifdef WITH_WSREP + for (TABLE_LIST *table= all_tables; table; table= table->next_global) + { + if (!lex->drop_temporary && + (!thd->is_current_stmt_binlog_format_row() || + !find_temporary_table(thd, table))) + { + WSREP_TO_ISOLATION_BEGIN(NULL, NULL, all_tables); + break; + } + } +#endif /* WITH_WSREP */ /* DDL and binlog write order are protected by metadata locks. */ res= mysql_rm_table(thd, first_table, lex->drop_if_exists, lex->drop_temporary); @@ -3169,7 +3536,6 @@ case SQLCOM_PREPARE: if (!mysql_change_db(thd, &db_str, FALSE)) my_ok(thd); - break; } @@ -3312,6 +3678,7 @@ case SQLCOM_PREPARE: #endif if (check_access(thd, CREATE_ACL, lex->name.str, NULL, NULL, 1, 0)) break; + WSREP_TO_ISOLATION_BEGIN(lex->name.str, NULL, NULL) res= mysql_create_db(thd,(lower_case_table_names == 2 ? alias : lex->name.str), &create_info, 0); break; @@ -3341,6 +3708,7 @@ case SQLCOM_PREPARE: #endif if (check_access(thd, DROP_ACL, lex->name.str, NULL, NULL, 1, 0)) break; + WSREP_TO_ISOLATION_BEGIN(lex->name.str, NULL, NULL) res= mysql_rm_db(thd, lex->name.str, lex->drop_if_exists, 0); break; } @@ -3369,6 +3737,7 @@ case SQLCOM_PREPARE: res= 1; break; } + WSREP_TO_ISOLATION_BEGIN(db->str, NULL, NULL) res= mysql_upgrade_db(thd, db); if (!res) my_ok(thd); @@ -3401,6 +3770,7 @@ case SQLCOM_PREPARE: #endif if (check_access(thd, ALTER_ACL, db->str, NULL, NULL, 1, 0)) break; + WSREP_TO_ISOLATION_BEGIN(db->str, NULL, NULL) res= mysql_alter_db(thd, db->str, &create_info); break; } @@ -3433,6 +3803,7 @@ case SQLCOM_PREPARE: if (res) break; + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) switch (lex->sql_command) { case SQLCOM_CREATE_EVENT: { @@ -3467,6 +3838,7 @@ case SQLCOM_PREPARE: lex->spname->m_name); break; case SQLCOM_DROP_EVENT: + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (!(res= Events::drop_event(thd, lex->spname->m_db, lex->spname->m_name, lex->drop_if_exists))) @@ -3481,6 +3853,7 @@ case SQLCOM_PREPARE: if (check_access(thd, INSERT_ACL, "mysql", NULL, NULL, 1, 0)) break; #ifdef HAVE_DLOPEN + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (!(res = mysql_create_function(thd, &lex->udf))) my_ok(thd); #else @@ -3495,6 +3868,7 @@ case SQLCOM_PREPARE: if (check_access(thd, INSERT_ACL, "mysql", NULL, NULL, 1, 1) && check_global_access(thd,CREATE_USER_ACL)) break; + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) /* Conditionally writes to binlog */ if (!(res= mysql_create_user(thd, lex->users_list))) my_ok(thd); @@ -3506,6 +3880,7 @@ case SQLCOM_PREPARE: check_global_access(thd,CREATE_USER_ACL)) break; /* Conditionally writes to binlog */ + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (!(res= mysql_drop_user(thd, lex->users_list))) my_ok(thd); break; @@ -3516,6 +3891,7 @@ case SQLCOM_PREPARE: check_global_access(thd,CREATE_USER_ACL)) break; /* Conditionally writes to binlog */ + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (!(res= mysql_rename_user(thd, lex->users_list))) my_ok(thd); break; @@ -3530,6 +3906,7 @@ case SQLCOM_PREPARE: thd->binlog_invoker(); /* Conditionally writes to binlog */ + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (!(res = mysql_revoke_all(thd, lex->users_list))) my_ok(thd); break; @@ -3596,6 +3973,7 @@ case SQLCOM_PREPARE: lex->type == TYPE_ENUM_PROCEDURE, 0)) goto error; /* Conditionally writes to binlog */ + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_routine_grant(thd, all_tables, lex->type == TYPE_ENUM_PROCEDURE, lex->users_list, grants, @@ -3609,6 +3987,7 @@ case SQLCOM_PREPARE: all_tables, FALSE, UINT_MAX, FALSE)) goto error; /* Conditionally writes to binlog */ + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_table_grant(thd, all_tables, lex->users_list, lex->columns, lex->grant, lex->sql_command == SQLCOM_REVOKE); @@ -3624,6 +4003,7 @@ case SQLCOM_PREPARE: } else { + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) /* Conditionally writes to binlog */ res = mysql_grant(thd, select_lex->db, lex->users_list, lex->grant, lex->sql_command == SQLCOM_REVOKE, @@ -3757,14 +4137,28 @@ case SQLCOM_PREPARE: able to open it (with SQLCOM_HA_OPEN) in the first place. */ unit->set_limit(select_lex); +#ifdef WITH_WSREP + { char* tmp_info= NULL; + if (WSREP(thd)) tmp_info = (char *)thd_proc_info(thd, "mysql_ha_read()"); +#endif /* WITH_WSREP */ res= mysql_ha_read(thd, first_table, lex->ha_read_mode, lex->ident.str, lex->insert_list, lex->ha_rkey_mode, select_lex->where, unit->select_limit_cnt, unit->offset_limit_cnt); +#ifdef WITH_WSREP + if (WSREP(thd)) thd_proc_info(thd, tmp_info); + } +#endif /* WITH_WSREP */ break; case SQLCOM_BEGIN: if (trans_begin(thd, lex->start_transaction_opt)) + { + thd->mdl_context.release_transactional_locks(); +#ifdef WITH_WSREP + WSREP_DEBUG("BEGIN failed, MDL released: %lu", thd->thread_id); +#endif /* WITH_WSREP */ goto error; + } my_ok(thd); break; case SQLCOM_COMMIT: @@ -3778,7 +4172,13 @@ case SQLCOM_PREPARE: (thd->variables.completion_type == 2 && lex->tx_release != TVL_NO)); if (trans_commit(thd)) + { + thd->mdl_context.release_transactional_locks(); +#ifdef WITH_WSREP + WSREP_DEBUG("COMMIT failed, MDL released: %lu", thd->thread_id); +#endif /* WITH_WSREP */ goto error; + } thd->mdl_context.release_transactional_locks(); /* Begin transaction with the same isolation level. */ if (tx_chain) @@ -3794,7 +4194,20 @@ case SQLCOM_PREPARE: /* Disconnect the current client connection. */ if (tx_release) thd->killed= THD::KILL_CONNECTION; +#ifdef WITH_WSREP + if (WSREP(thd)) { + + if (thd->wsrep_conflict_state == NO_CONFLICT || + thd->wsrep_conflict_state == REPLAYING) + { + my_ok(thd); + } + } else { +#endif /* WITH_WSREP */ my_ok(thd); +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ break; } case SQLCOM_ROLLBACK: @@ -3808,7 +4221,13 @@ case SQLCOM_PREPARE: (thd->variables.completion_type == 2 && lex->tx_release != TVL_NO)); if (trans_rollback(thd)) + { + thd->mdl_context.release_transactional_locks(); +#ifdef WITH_WSREP + WSREP_DEBUG("rollback failed, MDL released: %lu", thd->thread_id); +#endif /* WITH_WSREP */ goto error; + } thd->mdl_context.release_transactional_locks(); /* Begin transaction with the same isolation level. */ if (tx_chain) @@ -3824,7 +4243,17 @@ case SQLCOM_PREPARE: /* Disconnect the current client connection. */ if (tx_release) thd->killed= THD::KILL_CONNECTION; +#ifdef WITH_WSREP + if (WSREP(thd)) { + if (thd->wsrep_conflict_state == NO_CONFLICT) { + my_ok(thd); + } + } else { +#endif /* WITH_WSREP */ my_ok(thd); +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ break; } case SQLCOM_RELEASE_SAVEPOINT: @@ -3893,6 +4322,7 @@ case SQLCOM_PREPARE: if (sp_process_definer(thd)) goto create_sp_error; + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= (sp_result= sp_create_routine(thd, lex->sphead->m_type, lex->sphead)); switch (sp_result) { case SP_OK: { @@ -4103,6 +4533,7 @@ case SQLCOM_PREPARE: already puts on CREATE FUNCTION. */ /* Conditionally writes to binlog */ + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) sp_result= sp_update_routine(thd, type, lex->spname, &lex->sp_chistics); switch (sp_result) { @@ -4173,6 +4604,7 @@ case SQLCOM_PREPARE: if (check_routine_access(thd, ALTER_PROC_ACL, db, name, lex->sql_command == SQLCOM_DROP_PROCEDURE, 0)) goto error; + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) /* Conditionally writes to binlog */ sp_result= sp_drop_routine(thd, type, lex->spname); @@ -4290,6 +4722,7 @@ case SQLCOM_PREPARE: Note: SQLCOM_CREATE_VIEW also handles 'ALTER VIEW' commands as specified through the thd->lex->create_view_mode flag. */ + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_create_view(thd, first_table, thd->lex->create_view_mode); break; } @@ -4298,12 +4731,14 @@ case SQLCOM_PREPARE: if (check_table_access(thd, DROP_ACL, all_tables, FALSE, UINT_MAX, FALSE)) goto error; /* Conditionally writes to binlog. */ + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_drop_view(thd, first_table, thd->lex->drop_mode); break; } case SQLCOM_CREATE_TRIGGER: { /* Conditionally writes to binlog. */ + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_create_or_drop_trigger(thd, all_tables, 1); break; @@ -4311,6 +4746,7 @@ case SQLCOM_PREPARE: case SQLCOM_DROP_TRIGGER: { /* Conditionally writes to binlog. */ + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_create_or_drop_trigger(thd, all_tables, 0); break; } @@ -4331,7 +4767,13 @@ case SQLCOM_PREPARE: break; case SQLCOM_XA_COMMIT: if (trans_xa_commit(thd)) + { + thd->mdl_context.release_transactional_locks(); +#ifdef WITH_WSREP + WSREP_DEBUG("XA commit failed, MDL released: %lu", thd->thread_id); +#endif /* WITH_WSREP */ goto error; + } thd->mdl_context.release_transactional_locks(); /* We've just done a commit, reset transaction @@ -4342,7 +4784,13 @@ case SQLCOM_PREPARE: break; case SQLCOM_XA_ROLLBACK: if (trans_xa_rollback(thd)) + { + thd->mdl_context.release_transactional_locks(); +#ifdef WITH_WSREP + WSREP_DEBUG("XA rollback failed, MDL released: %lu", thd->thread_id); +#endif /* WITH_WSREP */ goto error; + } thd->mdl_context.release_transactional_locks(); /* We've just done a rollback, reset transaction @@ -4361,11 +4809,13 @@ case SQLCOM_PREPARE: my_ok(thd); break; case SQLCOM_INSTALL_PLUGIN: + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (! (res= mysql_install_plugin(thd, &thd->lex->comment, &thd->lex->ident))) my_ok(thd); break; case SQLCOM_UNINSTALL_PLUGIN: + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (! (res= mysql_uninstall_plugin(thd, &thd->lex->comment))) my_ok(thd); break; @@ -4516,6 +4966,9 @@ case SQLCOM_PREPARE: /* Free tables */ thd_proc_info(thd, "closing tables"); close_thread_tables(thd); +#ifdef WITH_WSREP + thd->wsrep_consistency_check= NO_CONSISTENCY_CHECK; +#endif /* WITH_WSREP */ thd_proc_info(thd, 0); #ifndef DBUG_OFF @@ -4562,6 +5015,22 @@ case SQLCOM_PREPARE: { thd->mdl_context.release_statement_locks(); } + WSREP_TO_ISOLATION_END; + +#ifdef WITH_WSREP + /* + Force release of transactional locks if not in active MST and wsrep is on. + */ + if (WSREP(thd) && + ! thd->in_sub_stmt && + ! thd->in_active_multi_stmt_transaction() && + thd->mdl_context.has_transactional_locks()) + { + WSREP_DEBUG("Forcing release of transactional locks for thd %lu", + thd->thread_id); + thd->mdl_context.release_transactional_locks(); + } +#endif /* WITH_WSREP */ DBUG_RETURN(res || thd->is_error()); } @@ -5372,6 +5841,26 @@ void THD::reset_for_next_command() thd->auto_inc_intervals_in_cur_stmt_for_binlog.empty(); thd->stmt_depends_on_first_successful_insert_id_in_prev_stmt= 0; +#ifdef WITH_WSREP + /* + Autoinc variables should be adjusted only for locally executed + transactions. Appliers and replayers are either processing ROW + events or get autoinc variable values from Query_log_event. + */ + if (WSREP(thd) && thd->wsrep_exec_mode == LOCAL_STATE) { + if (wsrep_auto_increment_control) + { + if (thd->variables.auto_increment_offset != + global_system_variables.auto_increment_offset) + thd->variables.auto_increment_offset= + global_system_variables.auto_increment_offset; + if (thd->variables.auto_increment_increment != + global_system_variables.auto_increment_increment) + thd->variables.auto_increment_increment= + global_system_variables.auto_increment_increment; + } + } +#endif /* WITH_WSREP */ thd->query_start_used= 0; thd->is_fatal_error= thd->time_zone_used= 0; /* @@ -5567,6 +6056,98 @@ void mysql_init_multi_delete(LEX *lex) lex->query_tables_last= &lex->query_tables; } +#ifdef WITH_WSREP +static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, + Parser_state *parser_state) +{ + bool is_autocommit= + !thd->in_multi_stmt_transaction_mode() && + thd->wsrep_conflict_state == NO_CONFLICT && + !thd->wsrep_applier && + wsrep_read_only_option(thd, thd->lex->query_tables); + + do + { + if (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT) + { + thd->wsrep_conflict_state= NO_CONFLICT; + } + mysql_parse(thd, rawbuf, length, parser_state); + + if (WSREP(thd)) { + /* wsrep BF abort in query exec phase */ + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + if (thd->wsrep_conflict_state == MUST_ABORT) { + wsrep_client_rollback(thd); + + WSREP_DEBUG("abort in exec query state, avoiding autocommit"); + } + + /* checking if BF trx must be replayed */ + if (thd->wsrep_conflict_state== MUST_REPLAY) + { + wsrep_replay_transaction(thd); + } + + /* setting error code for BF aborted trxs */ + if (thd->wsrep_conflict_state == ABORTED || + thd->wsrep_conflict_state == CERT_FAILURE) + { + mysql_reset_thd_for_next_command(thd); + thd->killed= THD::NOT_KILLED; + if (is_autocommit && + thd->lex->sql_command != SQLCOM_SELECT && + (thd->wsrep_retry_counter < thd->variables.wsrep_retry_autocommit)) + { + WSREP_DEBUG("wsrep retrying AC query: %s", + (thd->query()) ? thd->query() : "void"); + + close_thread_tables(thd); + + thd->wsrep_conflict_state= RETRY_AUTOCOMMIT; + thd->wsrep_retry_counter++; // grow + wsrep_copy_query(thd); + thd->set_time(); + parser_state->reset(rawbuf, length); + } + else + { + WSREP_DEBUG("%s, thd: %lu is_AC: %d, retry: %lu - %lu SQL: %s", + (thd->wsrep_conflict_state == ABORTED) ? + "BF Aborted" : "cert failure", + thd->thread_id, is_autocommit, thd->wsrep_retry_counter, + thd->variables.wsrep_retry_autocommit, thd->query()); + my_error(ER_LOCK_DEADLOCK, MYF(0), "wsrep aborted transaction"); + thd->killed= THD::NOT_KILLED; + thd->wsrep_conflict_state= NO_CONFLICT; + if (thd->wsrep_conflict_state != REPLAYING) + thd->wsrep_retry_counter= 0; // reset + } + } + else + { + set_if_smaller(thd->wsrep_retry_counter, 0); // reset; eventually ok + } + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + } + } while (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT); + + if (thd->wsrep_retry_query) + { + WSREP_DEBUG("releasing retry_query: " + "conf %d sent %d kill %d errno %d SQL %s", + thd->wsrep_conflict_state, + thd->stmt_da->is_sent, + thd->killed, + thd->stmt_da->is_error() ? thd->stmt_da->sql_errno() : 0, + thd->wsrep_retry_query); + my_free(thd->wsrep_retry_query); + thd->wsrep_retry_query = NULL; + thd->wsrep_retry_query_len = 0; + thd->wsrep_retry_command = COM_CONNECT; + } +} +#endif /* WITH_WSREP */ /* When you modify mysql_parse(), you may need to mofify @@ -6508,8 +7089,14 @@ uint kill_one_thread(THD *thd, ulong id, bool only_kill_query) slayage if both are string-equal. */ +#ifdef WITH_WSREP + if (((thd->security_ctx->master_access & SUPER_ACL) || + thd->security_ctx->user_matches(tmp->security_ctx)) && + !wsrep_thd_is_BF((void *)tmp, true)) +#else if ((thd->security_ctx->master_access & SUPER_ACL) || thd->security_ctx->user_matches(tmp->security_ctx)) +#endif /* WITH_WSREP */ { /* process the kill only if thread is not already undergoing any kill connection. diff --git a/sql/sql_parse.h b/sql/sql_parse.h index 9a55174b0fba..2ed3b3980d0b 100644 --- a/sql/sql_parse.h +++ b/sql/sql_parse.h @@ -201,6 +201,22 @@ inline bool is_supported_parser_charset(CHARSET_INFO *cs) { return test(cs->mbminlen == 1); } +#ifdef WITH_WSREP + +#define WSREP_MYSQL_DB (char *)"mysql" +#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \ + if (WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error; + +#define WSREP_TO_ISOLATION_END \ + if (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER)) \ + wsrep_to_isolation_end(thd); + +#else + +#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) +#define WSREP_TO_ISOLATION_END + +#endif /* WITH_WSREP */ #endif /* SQL_PARSE_INCLUDED */ diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index a03dcc5c16eb..bb5208a16ff7 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -134,6 +134,19 @@ bool Alter_table_truncate_partition_statement::execute(THD *thd) if (check_one_table_access(thd, DROP_ACL, first_table)) DBUG_RETURN(TRUE); +#ifdef WITH_WSREP + TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl); + + if ((!thd->is_current_stmt_binlog_format_row() || + !find_temporary_table(thd, first_table)) && + wsrep_to_isolation_begin( + thd, first_table->db, first_table->table_name, NULL) + ) + { + WSREP_WARN("ALTER TABLE isolation failure"); + DBUG_RETURN(TRUE); + } +#endif /* WITH_WSREP */ if (open_and_lock_tables(thd, first_table, FALSE, 0)) DBUG_RETURN(TRUE); diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 9ec0390483a7..358d03ddc7c8 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -2749,11 +2749,17 @@ void plugin_thdvar_init(THD *thd) thd->variables.dynamic_variables_size= 0; thd->variables.dynamic_variables_ptr= 0; +#ifdef WITH_WSREP + if (!WSREP(thd) || !thd->wsrep_applier) { +#endif mysql_mutex_lock(&LOCK_plugin); thd->variables.table_plugin= my_intern_plugin_lock(NULL, global_system_variables.table_plugin); intern_plugin_unlock(NULL, old_table_plugin); mysql_mutex_unlock(&LOCK_plugin); +#ifdef WITH_WSREP + } +#endif DBUG_VOID_RETURN; } diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 48d23cd5d219..d69030d68fdc 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -3405,7 +3405,9 @@ Prepared_statement::set_parameters(String *expanded_query, return res; } - +#ifdef WITH_WSREP +void wsrep_replay_transaction(THD *thd); +#endif /* WITH_WSREP */ /** Execute a prepared statement. Re-prepare it a limited number of times if necessary. @@ -3476,6 +3478,22 @@ Prepared_statement::execute_loop(String *expanded_query, error= execute(expanded_query, open_cursor) || thd->is_error(); thd->m_reprepare_observer= NULL; +#ifdef WITH_WSREP + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + switch (thd->wsrep_conflict_state) + { + case CERT_FAILURE: + WSREP_DEBUG("PS execute fail for CERT_FAILURE: thd: %ld err: %d", + thd->thread_id, thd->stmt_da->sql_errno() ); + thd->wsrep_conflict_state = NO_CONFLICT; + break; + + case MUST_REPLAY: + (void)wsrep_replay_transaction(thd); + default: break; + } + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); +#endif /* WITH_WSREP */ if (error && !thd->is_fatal_error && !thd->killed && reprepare_observer.is_invalidated() && diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index b0665a9ea6bd..69cfb0bda518 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -221,7 +221,18 @@ bool reload_acl_and_cache(THD *thd, unsigned long options, thd->global_read_lock.unlock_global_read_lock(thd); return 1; } - } +#ifdef WITH_WSREP + /* + We need to do it second time after wsrep appliers were blocked in + make_global_read_lock_block_commit(thd) above since they could have + modified the tables too. + */ + if (WSREP(thd) && + close_cached_tables(thd, tables, (options & REFRESH_FAST) ? + FALSE : TRUE, TRUE)) + result= 1; +#endif /* WITH_WSREP */ + } else { if (thd && thd->locked_tables_mode) diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 343e128af7a1..5eb87c64690a 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1242,7 +1242,14 @@ int stop_slave(THD* thd, Master_info* mi, bool net_report ) ER(ER_SLAVE_WAS_NOT_RUNNING)); } unlock_slave_threads(mi); +#ifdef WITH_WSREP + if (WSREP(thd)) + thd_proc_info(thd, "exit stop_slave()"); + else + thd_proc_info(thd, 0); +#else /* WITH_WSREP */ thd_proc_info(thd, 0); +#endif /* WITH_WSREP */ if (slave_errno) { @@ -1675,7 +1682,14 @@ bool change_master(THD* thd, Master_info* mi) err: unlock_slave_threads(mi); +#ifdef WITH_WSREP + if (WSREP(thd)) + thd_proc_info(thd, "exit change_master()"); + else + thd_proc_info(thd, 0); +#else /* WITH_WSREP */ thd_proc_info(thd, 0); +#endif /* WITH_WSREP */ if (ret == FALSE) my_ok(thd); DBUG_RETURN(ret); diff --git a/sql/sql_show.cc b/sql/sql_show.cc index ccbf1f411260..3d3ad9035d8c 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -54,6 +54,9 @@ #include "debug_sync.h" #include "datadict.h" // dd_frm_type() +#if !defined(MYSQL_MAX_VARIABLE_VALUE_LEN) +#define MYSQL_MAX_VARIABLE_VALUE_LEN 1024 +#endif // !defined(MYSQL_MAX_VARIABLE_VALUE_LEN) #define STR_OR_NIL(S) ((S) ? (S) : "") #ifdef WITH_PARTITION_STORAGE_ENGINE @@ -7634,7 +7637,8 @@ ST_FIELD_INFO variables_fields_info[]= { {"VARIABLE_NAME", 64, MYSQL_TYPE_STRING, 0, 0, "Variable_name", SKIP_OPEN_TABLE}, - {"VARIABLE_VALUE", 1024, MYSQL_TYPE_STRING, 0, 1, "Value", SKIP_OPEN_TABLE}, + {"VARIABLE_VALUE", MYSQL_MAX_VARIABLE_VALUE_LEN, MYSQL_TYPE_STRING, 0, 1, + "Value", SKIP_OPEN_TABLE}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE} }; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 8b4873cb834d..ebd4a7f2c0f6 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4604,6 +4604,60 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, uint not_used; DBUG_ENTER("mysql_create_like_table"); +#ifdef WITH_WSREP + if (WSREP(thd) && !thd->wsrep_applier) + { + TABLE *tmp_table; + bool is_tmp_table= FALSE; + + for (tmp_table= thd->temporary_tables; tmp_table; tmp_table=tmp_table->next) + { + if (!strcmp(src_table->db, tmp_table->s->db.str) && + !strcmp(src_table->table_name, tmp_table->s->table_name.str)) + { + is_tmp_table= TRUE; + break; + } + } + if (create_info->options & HA_LEX_CREATE_TMP_TABLE) + { + /* CREATE TEMPORARY TABLE LIKE must be skipped from replication */ + WSREP_DEBUG("CREATE TEMPORARY TABLE LIKE... skipped replication\n %s", + thd->query()); + } + else if (!is_tmp_table) + { + /* this is straight CREATE TABLE LIKE... eith no tmp tables */ + WSREP_TO_ISOLATION_BEGIN(table->db, table->table_name, NULL); + } + else + { + /* here we have CREATE TABLE LIKE + the temporary table definition will be needed in slaves to + enable the create to succeed + */ + TABLE_LIST tbl; + bzero((void*) &tbl, sizeof(tbl)); + tbl.db= src_table->db; + tbl.table_name= tbl.alias= src_table->table_name; + tbl.table= tmp_table; + char buf[2048]; + String query(buf, sizeof(buf), system_charset_info); + query.length(0); // Have to zero it since constructor doesn't + + (void) store_create_info(thd, &tbl, &query, NULL, TRUE); + WSREP_DEBUG("TMP TABLE: %s", query.ptr()); + + thd->wsrep_TOI_pre_query= query.ptr(); + thd->wsrep_TOI_pre_query_len= query.length(); + + WSREP_TO_ISOLATION_BEGIN(table->db, table->table_name, NULL); + + thd->wsrep_TOI_pre_query= NULL; + thd->wsrep_TOI_pre_query_len= 0; + } + } +#endif /* We the open source table to get its description in HA_CREATE_INFO @@ -4748,6 +4802,12 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, err: DBUG_RETURN(res); +#ifdef WITH_WSREP + error: + thd->wsrep_TOI_pre_query= NULL; + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ + } @@ -6055,12 +6115,21 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, error= 0; break; } +#ifdef WITH_WSREP + bool do_log_write(true); +#endif /* WITH_WSREP */ if (error == HA_ERR_WRONG_COMMAND) { error= 0; push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), table->alias); +#ifdef WITH_WSREP + + WSREP_DEBUG("ignoring DDL failure: %d %s", error, thd->query()); + // WSREP_DEBUG("stmt da %s", thd->stmt_da->message()); + //do_log_write= false; +#endif /* WITH_WSREP */ } if (!error && (new_name != table_name || new_db != db)) @@ -6112,11 +6181,22 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), table->alias); +#ifdef WITH_WSREP + WSREP_DEBUG("ignoring DDL failure2: %d %s", error, thd->query()); + //WSREP_DEBUG("stmt da %s", thd->stmt_da->message()); + //do_log_write= false; +#endif /* WITH_WSREP */ } if (!error) { +#ifdef WITH_WSREP + if (!WSREP(thd) || do_log_write) { +#endif /* WITH_WSREP */ error= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); +#ifdef WITH_WSREP + } +#endif /* !WITH_WSREP */ if (!error) my_ok(thd); } diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 0a4f549a052b..a79f358c994f 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -2460,3 +2460,55 @@ bool load_table_name_for_trigger(THD *thd, DBUG_RETURN(FALSE); } +#ifdef WITH_WSREP +int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len) +{ + LEX *lex= thd->lex; + String stmt_query; + + LEX_STRING definer_user; + LEX_STRING definer_host; + + if (!lex->definer) + { + if (!thd->slave_thread) + { + if (!(lex->definer= create_default_definer(thd))) + return 1; + } + } + + if (lex->definer) + { + /* SUID trigger. */ + + definer_user= lex->definer->user; + definer_host= lex->definer->host; + } + else + { + /* non-SUID trigger. */ + + definer_user.str= 0; + definer_user.length= 0; + + definer_host.str= 0; + definer_host.length= 0; + } + + stmt_query.append(STRING_WITH_LEN("CREATE ")); + + append_definer(thd, &stmt_query, &definer_user, &definer_host); + + LEX_STRING stmt_definition; + stmt_definition.str= (char*) thd->lex->stmt_definition_begin; + stmt_definition.length= thd->lex->stmt_definition_end + - thd->lex->stmt_definition_begin; + trim_whitespace(thd->charset(), & stmt_definition); + + stmt_query.append(stmt_definition.str, stmt_definition.length); + + return wsrep_to_buf_helper(thd, stmt_query.c_ptr(), stmt_query.length(), + buf, buf_len); +} +#endif /* WITH_WSREP */ diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc index 07bf145c8472..760a4c8bdcf3 100644 --- a/sql/sql_truncate.cc +++ b/sql/sql_truncate.cc @@ -24,6 +24,9 @@ #include "sql_acl.h" // DROP_ACL #include "sql_parse.h" // check_one_table_access() #include "sql_truncate.h" +#ifdef WITH_WSREP +#include "wsrep_mysqld.h" +#endif /* WITH_WSREP */ #include "sql_show.h" //append_identifier() @@ -464,6 +467,12 @@ bool Truncate_statement::truncate_table(THD *thd, TABLE_LIST *table_ref) { bool hton_can_recreate; +#ifdef WITH_WSREP + if (WSREP(thd) && wsrep_to_isolation_begin(thd, + table_ref->db, + table_ref->table_name, NULL)) + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ if (lock_table(thd, table_ref, &hton_can_recreate)) DBUG_RETURN(TRUE); @@ -546,7 +555,6 @@ bool Truncate_statement::execute(THD *thd) if (! (res= truncate_table(thd, first_table))) my_ok(thd); - DBUG_RETURN(res); } diff --git a/sql/sql_update.cc b/sql/sql_update.cc index a29d474fbfc0..6f20e67299ea 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -895,7 +895,11 @@ int mysql_update(THD *thd, */ if ((error < 0) || thd->transaction.stmt.modified_non_trans_table) { +#ifdef WITH_WSREP + if (WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()) +#else if (mysql_bin_log.is_open()) +#endif { int errcode= 0; if (error < 0) @@ -2012,7 +2016,11 @@ void multi_update::abort_result_set() The query has to binlog because there's a modified non-transactional table either from the query's list or via a stored routine: bug#13270,23333 */ +#ifdef WITH_WSREP + if (WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()) +#else if (mysql_bin_log.is_open()) +#endif { /* THD::killed status might not have been set ON at time of an error @@ -2249,7 +2257,11 @@ bool multi_update::send_eof() if (local_error == 0 || thd->transaction.stmt.modified_non_trans_table) { +#ifdef WITH_WSREP + if (WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()) +#else if (mysql_bin_log.is_open()) +#endif { int errcode= 0; if (local_error == 0) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 74a21c9f6b6d..d5253430a10e 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -6341,7 +6341,7 @@ alter: } view_tail {} - | ALTER definer_opt EVENT_SYM sp_name + | ALTER definer_opt remember_name EVENT_SYM sp_name { /* It is safe to use Lex->spname because @@ -6353,9 +6353,12 @@ alter: if (!(Lex->event_parse_data= Event_parse_data::new_instance(YYTHD))) MYSQL_YYABORT; - Lex->event_parse_data->identifier= $4; + Lex->event_parse_data->identifier= $5; Lex->sql_command= SQLCOM_ALTER_EVENT; +#ifdef WITH_WSREP + Lex->stmt_definition_begin= $3; +#endif } ev_alter_on_schedule_completion opt_ev_rename_to @@ -6363,7 +6366,7 @@ alter: opt_ev_comment opt_ev_sql_stmt { - if (!($6 || $7 || $8 || $9 || $10)) + if (!($7 || $8 || $9 || $10 || $11)) { my_parse_error(ER(ER_SYNTAX_ERROR)); MYSQL_YYABORT; @@ -6373,6 +6376,9 @@ alter: can overwrite it */ Lex->sql_command= SQLCOM_ALTER_EVENT; +#ifdef WITH_WSREP + Lex->stmt_definition_end= (char*)YYLIP->get_cpp_ptr(); +#endif } | ALTER TABLESPACE alter_tablespace_info { diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 3cb724803412..003dde55c892 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2377,6 +2377,10 @@ static bool fix_autocommit(sys_var *self, THD *thd, enum_var_type type) if (trans_commit_stmt(thd) || trans_commit(thd)) { thd->variables.option_bits&= ~OPTION_AUTOCOMMIT; + thd->mdl_context.release_transactional_locks(); +#ifdef WITH_WSREP + WSREP_DEBUG("autocommit, MDL TRX lock released: %lu", thd->thread_id); +#endif /* WITH_WSREP */ return true; } /* @@ -3280,6 +3284,270 @@ static Sys_var_tz Sys_time_zone( "time_zone", "time_zone", SESSION_VAR(time_zone), NO_CMD_LINE, DEFAULT(&default_tz), NO_MUTEX_GUARD, IN_BINLOG); +#ifdef WITH_WSREP +#include "wsrep_var.h" +#include "wsrep_sst.h" +#include "wsrep_binlog.h" + +static Sys_var_charptr Sys_wsrep_provider( + "wsrep_provider", "Path to replication provider library", + PREALLOCATED GLOBAL_VAR(wsrep_provider), CMD_LINE(REQUIRED_ARG, OPT_WSREP_PROVIDER), + IN_FS_CHARSET, DEFAULT(wsrep_provider), + // IN_FS_CHARSET, DEFAULT(wsrep_provider_default), + NO_MUTEX_GUARD, NOT_IN_BINLOG, + ON_CHECK(wsrep_provider_check), ON_UPDATE(wsrep_provider_update)); + +static Sys_var_charptr Sys_wsrep_provider_options( + "wsrep_provider_options", "provider specific options", + PREALLOCATED GLOBAL_VAR(wsrep_provider_options), + CMD_LINE(REQUIRED_ARG, OPT_WSREP_PROVIDER_OPTIONS), + IN_FS_CHARSET, DEFAULT(wsrep_provider_options), + NO_MUTEX_GUARD, NOT_IN_BINLOG, + ON_CHECK(wsrep_provider_options_check), + ON_UPDATE(wsrep_provider_options_update)); + +static Sys_var_charptr Sys_wsrep_data_home_dir( + "wsrep_data_home_dir", "home directory for wsrep provider", + READ_ONLY GLOBAL_VAR(wsrep_data_home_dir), CMD_LINE(REQUIRED_ARG), + IN_FS_CHARSET, DEFAULT(""), + NO_MUTEX_GUARD, NOT_IN_BINLOG); + +static Sys_var_charptr Sys_wsrep_cluster_name( + "wsrep_cluster_name", "Name for the cluster", + PREALLOCATED GLOBAL_VAR(wsrep_cluster_name), CMD_LINE(REQUIRED_ARG), + IN_FS_CHARSET, DEFAULT(wsrep_cluster_name), + NO_MUTEX_GUARD, NOT_IN_BINLOG, + ON_CHECK(wsrep_cluster_name_check), + ON_UPDATE(wsrep_cluster_name_update)); + +static PolyLock_mutex PLock_wsrep_slave_threads(&LOCK_wsrep_slave_threads); +static Sys_var_charptr Sys_wsrep_cluster_address ( + "wsrep_cluster_address", "Address to initially connect to cluster", + PREALLOCATED GLOBAL_VAR(wsrep_cluster_address), + CMD_LINE(REQUIRED_ARG, OPT_WSREP_CLUSTER_ADDRESS), + IN_FS_CHARSET, DEFAULT(wsrep_cluster_address), + &PLock_wsrep_slave_threads, NOT_IN_BINLOG, + ON_CHECK(wsrep_cluster_address_check), + ON_UPDATE(wsrep_cluster_address_update)); + +static Sys_var_charptr Sys_wsrep_node_name ( + "wsrep_node_name", "Node name", + PREALLOCATED GLOBAL_VAR(wsrep_node_name), CMD_LINE(REQUIRED_ARG), + IN_FS_CHARSET, DEFAULT(wsrep_node_name), + NO_MUTEX_GUARD, NOT_IN_BINLOG); + +static Sys_var_charptr Sys_wsrep_node_address ( + "wsrep_node_address", "Node address", + PREALLOCATED GLOBAL_VAR(wsrep_node_address), CMD_LINE(REQUIRED_ARG), + IN_FS_CHARSET, DEFAULT(wsrep_node_address), + NO_MUTEX_GUARD, NOT_IN_BINLOG, + ON_CHECK(wsrep_node_address_check), + ON_UPDATE(wsrep_node_address_update)); + +static Sys_var_charptr Sys_wsrep_node_incoming_address( + "wsrep_node_incoming_address", "Client connection address", + PREALLOCATED GLOBAL_VAR(wsrep_node_incoming_address),CMD_LINE(REQUIRED_ARG), + IN_FS_CHARSET, DEFAULT(wsrep_node_incoming_address), + NO_MUTEX_GUARD, NOT_IN_BINLOG); + +static Sys_var_ulong Sys_wsrep_slave_threads( + "wsrep_slave_threads", "Number of slave appliers to launch", + GLOBAL_VAR(wsrep_slave_threads), CMD_LINE(REQUIRED_ARG), + VALID_RANGE(1, 512), DEFAULT(1), BLOCK_SIZE(1), + &PLock_wsrep_slave_threads, NOT_IN_BINLOG, + ON_CHECK(wsrep_slave_threads_check), + ON_UPDATE(wsrep_slave_threads_update)); + +static Sys_var_charptr Sys_wsrep_dbug_option( + "wsrep_dbug_option", "DBUG options to provider library", + GLOBAL_VAR(wsrep_dbug_option),CMD_LINE(REQUIRED_ARG), + IN_FS_CHARSET, DEFAULT(""), + NO_MUTEX_GUARD, NOT_IN_BINLOG); + +static Sys_var_mybool Sys_wsrep_debug( + "wsrep_debug", "To enable debug level logging", + GLOBAL_VAR(wsrep_debug), CMD_LINE(OPT_ARG), DEFAULT(FALSE)); + +static Sys_var_mybool Sys_wsrep_convert_LOCK_to_trx( + "wsrep_convert_LOCK_to_trx", "To convert locking sessions " + "into transactions", + GLOBAL_VAR(wsrep_convert_LOCK_to_trx), + CMD_LINE(OPT_ARG), DEFAULT(FALSE)); + +static Sys_var_ulong Sys_wsrep_retry_autocommit( + "wsrep_retry_autocommit", "Max number of times to retry " + "a failed autocommit statement", + SESSION_VAR(wsrep_retry_autocommit), CMD_LINE(REQUIRED_ARG), + VALID_RANGE(0, 10000), DEFAULT(1), BLOCK_SIZE(1)); + +static Sys_var_mybool Sys_wsrep_auto_increment_control( + "wsrep_auto_increment_control", "To automatically control the " + "assignment of autoincrement variables", + GLOBAL_VAR(wsrep_auto_increment_control), + CMD_LINE(OPT_ARG), DEFAULT(TRUE)); + +static Sys_var_mybool Sys_wsrep_drupal_282555_workaround( + "wsrep_drupal_282555_workaround", "To use a workaround for" + "bad autoincrement value", + GLOBAL_VAR(wsrep_drupal_282555_workaround), + CMD_LINE(OPT_ARG), DEFAULT(FALSE)); + +static Sys_var_charptr sys_wsrep_sst_method( + "wsrep_sst_method", "State snapshot transfer method", + GLOBAL_VAR(wsrep_sst_method),CMD_LINE(REQUIRED_ARG), + IN_FS_CHARSET, DEFAULT(wsrep_sst_method), NO_MUTEX_GUARD, NOT_IN_BINLOG, + ON_CHECK(wsrep_sst_method_check), + ON_UPDATE(wsrep_sst_method_update)); + +static Sys_var_charptr Sys_wsrep_sst_receive_address( + "wsrep_sst_receive_address", "Address where node is waiting for " + "SST contact", + GLOBAL_VAR(wsrep_sst_receive_address),CMD_LINE(REQUIRED_ARG), + IN_FS_CHARSET, DEFAULT(wsrep_sst_receive_address), NO_MUTEX_GUARD, + NOT_IN_BINLOG, + ON_CHECK(wsrep_sst_receive_address_check), + ON_UPDATE(wsrep_sst_receive_address_update)); + +static Sys_var_charptr Sys_wsrep_sst_auth( + "wsrep_sst_auth", "Authentication for SST connection", + PREALLOCATED GLOBAL_VAR(wsrep_sst_auth), CMD_LINE(REQUIRED_ARG, OPT_WSREP_SST_AUTH), + IN_FS_CHARSET, DEFAULT(wsrep_sst_auth), NO_MUTEX_GUARD, + NOT_IN_BINLOG, + ON_CHECK(wsrep_sst_auth_check), + ON_UPDATE(wsrep_sst_auth_update)); + +static Sys_var_charptr Sys_wsrep_sst_donor( + "wsrep_sst_donor", "preferred donor node for the SST", + GLOBAL_VAR(wsrep_sst_donor),CMD_LINE(REQUIRED_ARG), + IN_FS_CHARSET, DEFAULT(""), NO_MUTEX_GUARD, NOT_IN_BINLOG, + ON_CHECK(wsrep_sst_donor_check), + ON_UPDATE(wsrep_sst_donor_update)); + +static Sys_var_mybool Sys_wsrep_sst_donor_rejects_queries( + "wsrep_sst_donor_rejects_queries", "Reject client queries " + "when donating state snapshot transfer", + GLOBAL_VAR(wsrep_sst_donor_rejects_queries), + CMD_LINE(OPT_ARG), DEFAULT(FALSE)); + +static Sys_var_mybool Sys_wsrep_on ( + "wsrep_on", "To enable wsrep replication ", + SESSION_VAR(wsrep_on), + CMD_LINE(OPT_ARG), DEFAULT(TRUE), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(wsrep_on_update)); + +static Sys_var_charptr Sys_wsrep_start_position ( + "wsrep_start_position", "global transaction position to start from ", + PREALLOCATED GLOBAL_VAR(wsrep_start_position), + CMD_LINE(REQUIRED_ARG, OPT_WSREP_START_POSITION), + IN_FS_CHARSET, DEFAULT(wsrep_start_position), + NO_MUTEX_GUARD, NOT_IN_BINLOG, + ON_CHECK(wsrep_start_position_check), + ON_UPDATE(wsrep_start_position_update)); + +static Sys_var_ulong Sys_wsrep_max_ws_size ( + "wsrep_max_ws_size", "Max write set size (bytes)", + GLOBAL_VAR(wsrep_max_ws_size), CMD_LINE(REQUIRED_ARG), + /* Upper limit is 65K short of 4G to avoid overlows on 32-bit systems */ + VALID_RANGE(1024, WSREP_MAX_WS_SIZE), DEFAULT(1073741824UL), BLOCK_SIZE(1)); + +static Sys_var_ulong Sys_wsrep_max_ws_rows ( + "wsrep_max_ws_rows", "Max number of rows in write set", + GLOBAL_VAR(wsrep_max_ws_rows), CMD_LINE(REQUIRED_ARG), + VALID_RANGE(1, 1048576), DEFAULT(131072), BLOCK_SIZE(1)); + +static Sys_var_charptr Sys_wsrep_notify_cmd( + "wsrep_notify_cmd", "", + GLOBAL_VAR(wsrep_notify_cmd),CMD_LINE(REQUIRED_ARG), + IN_FS_CHARSET, DEFAULT(""), NO_MUTEX_GUARD, NOT_IN_BINLOG); + +static Sys_var_mybool Sys_wsrep_certify_nonPK( + "wsrep_certify_nonPK", "Certify tables with no primary key", + GLOBAL_VAR(wsrep_certify_nonPK), + CMD_LINE(OPT_ARG), DEFAULT(TRUE)); + +static Sys_var_mybool Sys_wsrep_causal_reads( + "wsrep_causal_reads", "(DEPRECATED) setting this variable is equivalent to setting wsrep_sync_wait READ flag", + SESSION_VAR(wsrep_causal_reads), + CMD_LINE(OPT_ARG), DEFAULT(FALSE), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(wsrep_causal_reads_update)); + +static Sys_var_uint Sys_wsrep_sync_wait( + "wsrep_sync_wait", "Ensure \"synchronous\" read view before executing an operation of the type specified by bitmask: 1 - READ(includes SELECT, SHOW and BEGIN/START TRANSACTION); 2 - UPDATE and DELETE; 4 - INSERT and REPLACE", + SESSION_VAR(wsrep_sync_wait), + CMD_LINE(OPT_ARG), + VALID_RANGE(WSREP_SYNC_WAIT_NONE, WSREP_SYNC_WAIT_MAX), + DEFAULT(WSREP_SYNC_WAIT_NONE), + BLOCK_SIZE(1), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(wsrep_sync_wait_update)); + +static const char *wsrep_OSU_method_names[]= { "TOI", "RSU", NullS }; +static Sys_var_enum Sys_wsrep_OSU_method( + "wsrep_OSU_method", "Method for Online Schema Upgrade", + GLOBAL_VAR(wsrep_OSU_method_options), CMD_LINE(OPT_ARG), + wsrep_OSU_method_names, DEFAULT(WSREP_OSU_TOI), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(0)); + +static PolyLock_mutex PLock_wsrep_desync(&LOCK_wsrep_desync); +static Sys_var_mybool Sys_wsrep_desync ( + "wsrep_desync", "To desynchronize the node from the cluster", + GLOBAL_VAR(wsrep_desync), + CMD_LINE(OPT_ARG), DEFAULT(FALSE), + &PLock_wsrep_desync, NOT_IN_BINLOG, + ON_CHECK(wsrep_desync_check), + ON_UPDATE(wsrep_desync_update)); + +static Sys_var_enum Sys_wsrep_forced_binlog_format( + "wsrep_forced_binlog_format", "binlog format to take effect over user's choice", + GLOBAL_VAR(wsrep_forced_binlog_format), + CMD_LINE(REQUIRED_ARG, OPT_BINLOG_FORMAT), + wsrep_binlog_format_names, DEFAULT(BINLOG_FORMAT_UNSPEC), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(0)); + +static Sys_var_mybool Sys_wsrep_recover_datadir( + "wsrep_recover", "Recover database state after crash and exit", + READ_ONLY GLOBAL_VAR(wsrep_recovery), + CMD_LINE(OPT_ARG, OPT_WSREP_RECOVER), DEFAULT(FALSE)); + +static Sys_var_mybool Sys_wsrep_replicate_myisam( + "wsrep_replicate_myisam", "To enable myisam replication", + GLOBAL_VAR(wsrep_replicate_myisam), CMD_LINE(OPT_ARG), DEFAULT(FALSE)); + +static Sys_var_mybool Sys_wsrep_log_conflicts( + "wsrep_log_conflicts", "To log multi-master conflicts", + GLOBAL_VAR(wsrep_log_conflicts), CMD_LINE(OPT_ARG), DEFAULT(FALSE)); + +static Sys_var_ulong Sys_wsrep_mysql_replication_bundle( + "wsrep_mysql_replication_bundle", "mysql replication group commit ", + GLOBAL_VAR(wsrep_mysql_replication_bundle), CMD_LINE(REQUIRED_ARG), + VALID_RANGE(0, 1000), DEFAULT(0), BLOCK_SIZE(1)); + +static Sys_var_mybool Sys_wsrep_load_data_splitting( + "wsrep_load_data_splitting", "To commit LOAD DATA " + "transaction after every 10K rows inserted", + GLOBAL_VAR(wsrep_load_data_splitting), + CMD_LINE(OPT_ARG), DEFAULT(TRUE)); + +static Sys_var_mybool Sys_wsrep_slave_FK_checks( + "wsrep_slave_FK_checks", "Should slave thread do " + "foreign key constraint checks", + GLOBAL_VAR(wsrep_slave_FK_checks), + CMD_LINE(OPT_ARG), DEFAULT(TRUE)); + +static Sys_var_mybool Sys_wsrep_slave_UK_checks( + "wsrep_slave_UK_checks", "Should slave thread do " + "secondary index uniqueness chesks", + GLOBAL_VAR(wsrep_slave_UK_checks), + CMD_LINE(OPT_ARG), DEFAULT(FALSE)); + +static Sys_var_mybool Sys_wsrep_restart_slave( + "wsrep_restart_slave", "Should MySQL slave be restarted automatically, when node joins back to cluster", + GLOBAL_VAR(wsrep_restart_slave), CMD_LINE(OPT_ARG), DEFAULT(FALSE)); +#endif /* WITH_WSREP */ static Sys_var_ulong Sys_sp_cache_size( "stored_program_cache", diff --git a/sql/transaction.cc b/sql/transaction.cc index ae38e920a1d3..c293c651c04e 100644 --- a/sql/transaction.cc +++ b/sql/transaction.cc @@ -96,6 +96,9 @@ static bool xa_trans_force_rollback(THD *thd) by ha_rollback()/THD::transaction::cleanup(). */ thd->transaction.xid_state.rm_error= 0; +#ifdef WITH_WSREP + wsrep_register_hton(thd, TRUE); +#endif /* WITH_WSREP */ if (ha_rollback_trans(thd, true)) { my_error(ER_XAER_RMERR, MYF(0)); @@ -134,8 +137,14 @@ bool trans_begin(THD *thd, uint flags) (thd->variables.option_bits & OPTION_TABLE_LOCK)) { thd->variables.option_bits&= ~OPTION_TABLE_LOCK; +#ifdef WITH_WSREP + wsrep_register_hton(thd, TRUE); +#endif /* WITH_WSREP */ thd->server_status&= ~SERVER_STATUS_IN_TRANS; res= test(ha_commit_trans(thd, TRUE)); +#ifdef WITH_WSREP + wsrep_post_commit(thd, TRUE); +#endif /* WITH_WSREP */ } thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); @@ -150,6 +159,12 @@ bool trans_begin(THD *thd, uint flags) */ thd->mdl_context.release_transactional_locks(); +#ifdef WITH_WSREP + thd->wsrep_PA_safe= true; + if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ + thd->variables.option_bits|= OPTION_BEGIN; thd->server_status|= SERVER_STATUS_IN_TRANS; @@ -177,8 +192,14 @@ bool trans_commit(THD *thd) if (trans_check(thd)) DBUG_RETURN(TRUE); +#ifdef WITH_WSREP + wsrep_register_hton(thd, TRUE); +#endif /* WITH_WSREP */ thd->server_status&= ~SERVER_STATUS_IN_TRANS; res= ha_commit_trans(thd, TRUE); +#ifdef WITH_WSREP + wsrep_post_commit(thd, TRUE); +#endif /* WITH_WSREP */ if (res) /* if res is non-zero, then ha_commit_trans has rolled back the @@ -220,8 +241,14 @@ bool trans_commit_implicit(THD *thd) /* Safety if one did "drop table" on locked tables */ if (!thd->locked_tables_mode) thd->variables.option_bits&= ~OPTION_TABLE_LOCK; +#ifdef WITH_WSREP + wsrep_register_hton(thd, TRUE); +#endif /* WITH_WSREP */ thd->server_status&= ~SERVER_STATUS_IN_TRANS; res= test(ha_commit_trans(thd, TRUE)); +#ifdef WITH_WSREP + wsrep_post_commit(thd, TRUE); +#endif /* WITH_WSREP */ } thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); @@ -251,11 +278,16 @@ bool trans_commit_implicit(THD *thd) bool trans_rollback(THD *thd) { int res; - DBUG_ENTER("trans_rollback"); - - if (trans_check(thd)) + DBUG_ENTER("trans_rollback"); +#ifdef WITH_WSREP + thd->wsrep_PA_safe= true; +#endif /* WITH_WSREP */ + if (trans_check(thd)) DBUG_RETURN(TRUE); +#ifdef WITH_WSREP + wsrep_register_hton(thd, TRUE); +#endif /* WITH_WSREP */ thd->server_status&= ~SERVER_STATUS_IN_TRANS; res= ha_rollback_trans(thd, TRUE); RUN_HOOK(transaction, after_rollback, (thd, FALSE)); @@ -295,6 +327,9 @@ bool trans_rollback_implicit(THD *thd) */ DBUG_ASSERT(thd->transaction.stmt.is_empty() && !thd->in_sub_stmt); +#ifdef WITH_WSREP + wsrep_register_hton(thd, true); +#endif /* WITH_WSREP */ thd->server_status&= ~SERVER_STATUS_IN_TRANS; DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS")); res= ha_rollback_trans(thd, true); @@ -342,9 +377,19 @@ bool trans_commit_stmt(THD *thd) if (thd->transaction.stmt.ha_list) { +#ifdef WITH_WSREP + wsrep_register_hton(thd, FALSE); +#endif /* WITH_WSREP */ res= ha_commit_trans(thd, FALSE); if (! thd->in_active_multi_stmt_transaction()) +#ifdef WITH_WSREP + { +#endif /* WITH_WSREP */ thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation; +#ifdef WITH_WSREP + wsrep_post_commit(thd, FALSE); + } +#endif /* WITH_WSREP */ } if (res) @@ -384,6 +429,9 @@ bool trans_rollback_stmt(THD *thd) if (thd->transaction.stmt.ha_list) { +#ifdef WITH_WSREP + wsrep_register_hton(thd, FALSE); +#endif /* WITH_WSREP */ ha_rollback_trans(thd, FALSE); if (! thd->in_active_multi_stmt_transaction()) thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation; @@ -739,9 +787,15 @@ bool trans_xa_commit(THD *thd) } else if (xa_state == XA_IDLE && thd->lex->xa_opt == XA_ONE_PHASE) { +#ifdef WITH_WSREP + wsrep_register_hton(thd, TRUE); +#endif /* WITH_WSREP */ int r= ha_commit_trans(thd, TRUE); if ((res= test(r))) my_error(r == 1 ? ER_XA_RBROLLBACK : ER_XAER_RMERR, MYF(0)); +#ifdef WITH_WSREP + wsrep_post_commit(thd, TRUE); +#endif /* WITH_WSREP */ } else if (xa_state == XA_PREPARED && thd->lex->xa_opt == XA_NONE) { @@ -760,6 +814,9 @@ bool trans_xa_commit(THD *thd) if (thd->mdl_context.acquire_lock(&mdl_request, thd->variables.lock_wait_timeout)) { +#ifdef WITH_WSREP + wsrep_register_hton(thd, TRUE); +#endif /* WITH_WSREP */ ha_rollback_trans(thd, TRUE); my_error(ER_XAER_RMERR, MYF(0)); } diff --git a/sql/tztime.cc b/sql/tztime.cc index 504decd9e7c7..3ddbb2e285af 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -2533,6 +2533,9 @@ main(int argc, char **argv) return 1; } + // Replicate MyISAM DDL for this session, cf. lp:1161432 + printf("SET SESSION wsrep_replicate_myisam=ON;\n"); + if (argc == 2) { root_name_end= strmake(fullname, argv[1], FN_REFLEN); diff --git a/storage/innobase/dict/dict0crea.c b/storage/innobase/dict/dict0crea.c index ac8a1eac03cf..7fba40db2db1 100644 --- a/storage/innobase/dict/dict0crea.c +++ b/storage/innobase/dict/dict0crea.c @@ -1444,6 +1444,7 @@ dict_create_add_foreign_to_dictionary( ut_ad(mutex_own(&(dict_sys->mutex))); if (foreign->id == NULL) { + char* stripped_name; /* Generate a new constraint id */ ulint namelen = strlen(table->name); char* id = mem_heap_alloc(foreign->heap, namelen + 20); @@ -1477,6 +1478,13 @@ dict_create_add_foreign_to_dictionary( } } foreign->id = id; + + stripped_name = strchr(foreign->id, '/') + 1; + if (innobase_check_identifier_length(stripped_name)) { + fprintf(stderr, "InnoDB: Generated foreign key " + "name (%s) is too long\n", foreign->id); + return(DB_IDENTIFIER_TOO_LONG); + } } info = pars_info_create(); diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index 0e4691658d5f..a90d8bca5758 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -2667,7 +2667,26 @@ dict_foreign_find_index( return(NULL); } - +#ifdef WITH_WSREP +dict_index_t* +wsrep_dict_foreign_find_index( +/*====================*/ + dict_table_t* table, /*!< in: table */ + const char** columns,/*!< in: array of column names */ + ulint n_cols, /*!< in: number of columns */ + dict_index_t* types_idx, /*!< in: NULL or an index to whose types the + column types must match */ + ibool check_charsets, + /*!< in: whether to check charsets. + only has an effect if types_idx != NULL */ + ulint check_null) + /*!< in: nonzero if none of the columns must + be declared NOT NULL */ +{ + return dict_foreign_find_index( + table, columns, n_cols, types_idx, check_charsets, check_null); +} +#endif /* WITH_WSREP */ /**********************************************************************//** Find an index that is equivalent to the one passed in and is not marked for deletion. @@ -4897,6 +4916,7 @@ dict_print_info_on_foreign_key_in_create_format( dict_foreign_t* foreign, /*!< in: foreign key constraint */ ibool add_newline) /*!< in: whether to add a newline */ { + char constraint_name[MAX_TABLE_NAME_LEN]; const char* stripped_id; ulint i; @@ -4918,7 +4938,9 @@ dict_print_info_on_foreign_key_in_create_format( } fputs(" CONSTRAINT ", file); - ut_print_name(file, trx, FALSE, stripped_id); + innobase_convert_from_id(&my_charset_filename, constraint_name, + stripped_id, MAX_TABLE_NAME_LEN); + ut_print_name(file, trx, FALSE, constraint_name); fputs(" FOREIGN KEY (", file); for (i = 0;;) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index adedc4fa9617..60bbb0dcffc1 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -88,6 +88,12 @@ extern "C" { #include "ha_prototypes.h" #include "ut0mem.h" #include "ibuf0ibuf.h" +#ifdef WITH_WSREP +#include "../storage/innobase/include/ut0byte.h" +#ifndef EXTRA_DEBUG + //#include "../storage/innobase/include/ut0byte.ic" +#endif /* EXTRA_DEBUG */ +#endif /* WITH_WSREP */ enum_tx_isolation thd_get_trx_isolation(const THD* thd); @@ -100,6 +106,35 @@ enum_tx_isolation thd_get_trx_isolation(const THD* thd); # define MYSQL_PLUGIN_IMPORT /* nothing */ # endif /* MYSQL_PLUGIN_IMPORT */ +#ifdef WITH_WSREP +#include +#include +extern my_bool wsrep_certify_nonPK; +class binlog_trx_data; +extern handlerton *binlog_hton; + +extern MYSQL_PLUGIN_IMPORT MYSQL_BIN_LOG mysql_bin_log; +extern MYSQL_PLUGIN_IMPORT mysql_mutex_t LOCK_wsrep_rollback; +extern MYSQL_PLUGIN_IMPORT mysql_cond_t COND_wsrep_rollback; +extern MYSQL_PLUGIN_IMPORT wsrep_aborting_thd_t wsrep_aborting_thd; + +static inline wsrep_ws_handle_t* +wsrep_ws_handle(THD* thd, const trx_t* trx) { + return wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd), + (wsrep_trx_id_t)trx->id); +} + +extern bool wsrep_prepare_key_for_innodb(const uchar *cache_key, + size_t cache_key_len, + const uchar* row_id, + size_t row_id_len, + wsrep_buf_t* key, + size_t* key_len); + +extern handlerton * wsrep_hton; +extern handlerton * binlog_hton; +extern void wsrep_cleanup_transaction(THD *thd); +#endif /* WITH_WSREP */ /** to protect innobase_open_files */ static mysql_mutex_t innobase_share_mutex; /** to force correct commit order in binlog */ @@ -867,6 +902,15 @@ thd_to_trx( { return(*(trx_t**) thd_ha_data(thd, innodb_hton_ptr)); } +#ifdef WITH_WSREP +ulonglong +thd_to_trx_id( +/*=======*/ + THD* thd) /*!< in: MySQL thread */ +{ + return(thd_to_trx(thd)->id); +} +#endif /********************************************************************//** Call this function when mysqld passes control to the client. That is to @@ -898,6 +942,15 @@ innobase_release_temporary_latches( return(0); } +#ifdef WITH_WSREP +static int +wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd, + my_bool signal); +static void +wsrep_fake_trx_id(handlerton* hton, THD *thd); +static int innobase_wsrep_set_checkpoint(handlerton* hton, const XID* xid); +static int innobase_wsrep_get_checkpoint(handlerton* hton, XID* xid); +#endif /********************************************************************//** Increments innobase_active_counter and every INNOBASE_WAKE_INTERVALth time calls srv_active_wake_master_thread. This function should be used @@ -1312,6 +1365,9 @@ int innobase_mysql_tmpfile(void) /*========================*/ { +#ifdef WITH_INNODB_DISALLOW_WRITES + os_event_wait(srv_allow_writes_event); +#endif /* WITH_INNODB_DISALLOW_WRITES */ int fd2 = -1; File fd; @@ -2254,6 +2310,12 @@ innobase_init( innobase_hton->flags=HTON_NO_FLAGS; innobase_hton->release_temporary_latches=innobase_release_temporary_latches; innobase_hton->alter_table_flags = innobase_alter_table_flags; +#ifdef WITH_WSREP + innobase_hton->wsrep_abort_transaction=wsrep_abort_transaction; + innobase_hton->wsrep_set_checkpoint=innobase_wsrep_set_checkpoint; + innobase_hton->wsrep_get_checkpoint=innobase_wsrep_get_checkpoint; + innobase_hton->wsrep_fake_trx_id=wsrep_fake_trx_id; +#endif /* WITH_WSREP */ ut_a(DATA_MYSQL_TRUE_VARCHAR == (ulint)MYSQL_TYPE_VARCHAR); @@ -2680,10 +2742,30 @@ innobase_commit_low( /*================*/ trx_t* trx) /*!< in: transaction handle */ { +#ifdef WITH_WSREP + THD* thd = (THD*)trx->mysql_thd; + const char* tmp = 0; + if (wsrep_on((void*)thd)) { +#ifdef WSREP_PROC_INFO + char info[64]; + info[sizeof(info) - 1] = '\0'; + snprintf(info, sizeof(info) - 1, + "innobase_commit_low():trx_commit_for_mysql(%lld)", + (long long) wsrep_thd_trx_seqno(thd)); + tmp = thd_proc_info(thd, info); + +#else + tmp = thd_proc_info(thd, "innobase_commit_low()"); +#endif /* WSREP_PROC_INFO */ + } +#endif /* WITH_WSREP */ if (trx_is_started(trx)) { trx_commit_for_mysql(trx); } +#ifdef WITH_WSREP + if (wsrep_on((void*)thd)) { thd_proc_info(thd, tmp); } +#endif /* WITH_WSREP */ } /*****************************************************************//** @@ -2840,10 +2922,16 @@ innobase_commit( mysql_mutex_unlock(&commit_cond_m); } +#ifdef WITH_WSREP + if(!wsrep_on((void*)thd)) { +#endif if (trx_has_prepare_commit_mutex(trx)) { mysql_mutex_unlock(&prepare_commit_mutex); } +#ifdef WITH_WSREP + } +#endif trx_deregister_from_2pc(trx); @@ -3264,7 +3352,14 @@ ha_innobase::max_supported_key_length() const therefore set to slightly less than 1 / 4 of page size which is 16 kB; but currently MySQL does not work with keys whose size is > MAX_KEY_LENGTH */ +#ifdef WITH_WSREP + /* this may look like obsolete code, but this ifdef is here + just to make sure we will see bzr merge conflict, if Oracle + changes max key length */ + return(3500); +#else return(3500); +#endif } /****************************************************************//** @@ -4350,7 +4445,119 @@ innobase_mysql_cmp( return(0); } +#ifdef WITH_WSREP +extern "C" UNIV_INTERN +int +wsrep_innobase_mysql_sort( +/*===============*/ + /* out: str contains sort string */ + int mysql_type, /* in: MySQL type */ + uint charset_number, /* in: number of the charset */ + unsigned char* str, /* in: data field */ + unsigned int str_length, /* in: data field length, + not UNIV_SQL_NULL */ + unsigned int buf_length) /* in: total str buffer length */ + +{ + CHARSET_INFO* charset; + enum_field_types mysql_tp; + int ret_length = str_length; + + DBUG_ASSERT(str_length != UNIV_SQL_NULL); + + mysql_tp = (enum_field_types) mysql_type; + + switch (mysql_tp) { + + case MYSQL_TYPE_BIT: + case MYSQL_TYPE_STRING: + case MYSQL_TYPE_VAR_STRING: + case MYSQL_TYPE_TINY_BLOB: + case MYSQL_TYPE_MEDIUM_BLOB: + case MYSQL_TYPE_BLOB: + case MYSQL_TYPE_LONG_BLOB: + case MYSQL_TYPE_VARCHAR: + { + uchar tmp_str[REC_VERSION_56_MAX_INDEX_COL_LEN]; + uint tmp_length = REC_VERSION_56_MAX_INDEX_COL_LEN; + + /* Use the charset number to pick the right charset struct for + the comparison. Since the MySQL function get_charset may be + slow before Bar removes the mutex operation there, we first + look at 2 common charsets directly. */ + + if (charset_number == default_charset_info->number) { + charset = default_charset_info; + } else if (charset_number == my_charset_latin1.number) { + charset = &my_charset_latin1; + } else { + charset = get_charset(charset_number, MYF(MY_WME)); + + if (charset == NULL) { + sql_print_error("InnoDB needs charset %lu for doing " + "a comparison, but MySQL cannot " + "find that charset.", + (ulong) charset_number); + ut_a(0); + } + } + + ut_a(str_length <= tmp_length); + memcpy(tmp_str, str, str_length); + + if (wsrep_protocol_version < 3) { + tmp_length = charset->coll->strnxfrm( + charset, str, str_length, + tmp_str, str_length); + DBUG_ASSERT(tmp_length <= str_length); + } else { + /* strnxfrm will expand the destination string, + protocols < 3 truncated the sorted sring + protocols > 3 gets full sorted sring + */ + /* 5.5 strnxfrm pads the tail with spaces and + always returns the full destination buffer lenght + we cannot know how many characters were converted + using 2 * str length here as best guess + */ + uint dst_length = (str_length * 2 < tmp_length) ? + (str_length * 2) : tmp_length; + tmp_length = charset->coll->strnxfrm( + charset, str, dst_length, + tmp_str, str_length); + DBUG_ASSERT(tmp_length <= buf_length); + ret_length = tmp_length; + } + + break; + } + case MYSQL_TYPE_DECIMAL : + case MYSQL_TYPE_TINY : + case MYSQL_TYPE_SHORT : + case MYSQL_TYPE_LONG : + case MYSQL_TYPE_FLOAT : + case MYSQL_TYPE_DOUBLE : + case MYSQL_TYPE_NULL : + case MYSQL_TYPE_TIMESTAMP : + case MYSQL_TYPE_LONGLONG : + case MYSQL_TYPE_INT24 : + case MYSQL_TYPE_DATE : + case MYSQL_TYPE_TIME : + case MYSQL_TYPE_DATETIME : + case MYSQL_TYPE_YEAR : + case MYSQL_TYPE_NEWDATE : + case MYSQL_TYPE_NEWDECIMAL : + case MYSQL_TYPE_ENUM : + case MYSQL_TYPE_SET : + case MYSQL_TYPE_GEOMETRY : + break; + default: + break; + } + return ret_length; +} +#endif // WITH_WSREP /**************************************************************//** Converts a MySQL type to an InnoDB type. Note that this function returns the 'mtype' of InnoDB. InnoDB differentiates between MySQL's old <= 4.1 @@ -4495,6 +4702,258 @@ innobase_read_from_2_little_endian( /*******************************************************************//** Stores a key value for a row to a buffer. @return key value length as stored in buff */ +#ifdef WITH_WSREP +UNIV_INTERN +uint +wsrep_store_key_val_for_row( +/*===============================*/ + TABLE* table, + uint keynr, /*!< in: key number */ + char* buff, /*!< in/out: buffer for the key value (in MySQL + format) */ + uint buff_len,/*!< in: buffer length */ + const uchar* record, + ibool* key_is_null)/*!< out: full key was null */ +{ + KEY* key_info = table->key_info + keynr; + KEY_PART_INFO* key_part = key_info->key_part; + KEY_PART_INFO* end = key_part + key_info->key_parts; + char* buff_start = buff; + enum_field_types mysql_type; + Field* field; + + DBUG_ENTER("store_key_val_for_row"); + + bzero(buff, buff_len); + *key_is_null = TRUE; + + for (; key_part != end; key_part++) { + uchar sorted[REC_VERSION_56_MAX_INDEX_COL_LEN] = {'\0'}; + ibool part_is_null = FALSE; + + if (key_part->null_bit) { + if (record[key_part->null_offset] & + key_part->null_bit) { + *buff = 1; + part_is_null = TRUE; + } else { + *buff = 0; + } + buff++; + } + if (!part_is_null) *key_is_null = FALSE; + + field = key_part->field; + mysql_type = field->type(); + + if (mysql_type == MYSQL_TYPE_VARCHAR) { + /* >= 5.0.3 true VARCHAR */ + ulint lenlen; + ulint len; + const byte* data; + ulint key_len; + ulint true_len; + CHARSET_INFO* cs; + int error=0; + + key_len = key_part->length; + + if (part_is_null) { + buff += key_len + 2; + + continue; + } + cs = field->charset(); + + lenlen = (ulint) + (((Field_varstring*)field)->length_bytes); + + data = row_mysql_read_true_varchar(&len, + (byte*) (record + + (ulint)get_field_offset(table, field)), + lenlen); + + true_len = len; + + /* For multi byte character sets we need to calculate + the true length of the key */ + + if (len > 0 && cs->mbmaxlen > 1) { + true_len = (ulint) cs->cset->well_formed_len(cs, + (const char *) data, + (const char *) data + len, + (uint) (key_len / + cs->mbmaxlen), + &error); + } + + /* In a column prefix index, we may need to truncate + the stored value: */ + + if (true_len > key_len) { + true_len = key_len; + } + + memcpy(sorted, data, true_len); + true_len = wsrep_innobase_mysql_sort( + mysql_type, cs->number, sorted, true_len, + REC_VERSION_56_MAX_INDEX_COL_LEN); + + if (wsrep_protocol_version > 1) { + memcpy(buff, sorted, true_len); + /* Note that we always reserve the maximum possible + length of the true VARCHAR in the key value, though + only len first bytes after the 2 length bytes contain + actual data. The rest of the space was reset to zero + in the bzero() call above. */ + buff += true_len; + } else { + buff += key_len; + } + } else if (mysql_type == MYSQL_TYPE_TINY_BLOB + || mysql_type == MYSQL_TYPE_MEDIUM_BLOB + || mysql_type == MYSQL_TYPE_BLOB + || mysql_type == MYSQL_TYPE_LONG_BLOB + /* MYSQL_TYPE_GEOMETRY data is treated + as BLOB data in innodb. */ + || mysql_type == MYSQL_TYPE_GEOMETRY) { + + CHARSET_INFO* cs; + ulint key_len; + ulint true_len; + int error=0; + ulint blob_len; + const byte* blob_data; + + ut_a(key_part->key_part_flag & HA_PART_KEY_SEG); + + key_len = key_part->length; + + if (part_is_null) { + buff += key_len + 2; + + continue; + } + + cs = field->charset(); + + blob_data = row_mysql_read_blob_ref(&blob_len, + (byte*) (record + + (ulint)get_field_offset(table, field)), + (ulint) field->pack_length()); + + true_len = blob_len; + + ut_a(get_field_offset(table, field) + == key_part->offset); + + /* For multi byte character sets we need to calculate + the true length of the key */ + + if (blob_len > 0 && cs->mbmaxlen > 1) { + true_len = (ulint) cs->cset->well_formed_len(cs, + (const char *) blob_data, + (const char *) blob_data + + blob_len, + (uint) (key_len / + cs->mbmaxlen), + &error); + } + + /* All indexes on BLOB and TEXT are column prefix + indexes, and we may need to truncate the data to be + stored in the key value: */ + + if (true_len > key_len) { + true_len = key_len; + } + + memcpy(sorted, blob_data, true_len); + true_len = wsrep_innobase_mysql_sort( + mysql_type, cs->number, sorted, true_len, + REC_VERSION_56_MAX_INDEX_COL_LEN); + + memcpy(buff, sorted, true_len); + + /* Note that we always reserve the maximum possible + length of the BLOB prefix in the key value. */ + if (wsrep_protocol_version > 1) { + buff += true_len; + } else { + buff += key_len; + } + } else { + /* Here we handle all other data types except the + true VARCHAR, BLOB and TEXT. Note that the column + value we store may be also in a column prefix + index. */ + + CHARSET_INFO* cs; + ulint true_len; + ulint key_len; + const uchar* src_start; + int error=0; + enum_field_types real_type; + + key_len = key_part->length; + + if (part_is_null) { + buff += key_len; + + continue; + } + + src_start = record + key_part->offset; + real_type = field->real_type(); + true_len = key_len; + + /* Character set for the field is defined only + to fields whose type is string and real field + type is not enum or set. For these fields check + if character set is multi byte. */ + + if (real_type != MYSQL_TYPE_ENUM + && real_type != MYSQL_TYPE_SET + && ( mysql_type == MYSQL_TYPE_VAR_STRING + || mysql_type == MYSQL_TYPE_STRING)) { + + cs = field->charset(); + + /* For multi byte character sets we need to + calculate the true length of the key */ + + if (key_len > 0 && cs->mbmaxlen > 1) { + + true_len = (ulint) + cs->cset->well_formed_len(cs, + (const char *)src_start, + (const char *)src_start + + key_len, + (uint) (key_len / + cs->mbmaxlen), + &error); + } + memcpy(sorted, src_start, true_len); + true_len = wsrep_innobase_mysql_sort( + mysql_type, cs->number, sorted, true_len, + REC_VERSION_56_MAX_INDEX_COL_LEN); + + memcpy(buff, sorted, true_len); + } else { + memcpy(buff, src_start, true_len); + } + buff += true_len; + + /* Pad the unused space with spaces. */ + + } + } + + ut_a(buff <= buff_start + buff_len); + + DBUG_RETURN((uint)(buff - buff_start)); +} +#endif /* WITH_WSREP */ UNIV_INTERN uint ha_innobase::store_key_val_for_row( @@ -5098,6 +5557,9 @@ ha_innobase::write_row( ulint error = 0; int error_result= 0; ibool auto_inc_used= FALSE; +#ifdef WITH_WSREP + ibool auto_inc_inserted= FALSE; /* if NULL was inserted */ +#endif ulint sql_command; trx_t* trx = thd_to_trx(user_thd); @@ -5128,8 +5590,20 @@ ha_innobase::write_row( if ((sql_command == SQLCOM_ALTER_TABLE || sql_command == SQLCOM_OPTIMIZE || sql_command == SQLCOM_CREATE_INDEX +#ifdef WITH_WSREP + || (wsrep_on(user_thd) && wsrep_load_data_splitting && + sql_command == SQLCOM_LOAD && + !thd_test_options( + user_thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) +#endif /* WITH_WSREP */ || sql_command == SQLCOM_DROP_INDEX) && num_write_row >= 10000) { +#ifdef WITH_WSREP + if (wsrep_on(user_thd) && sql_command == SQLCOM_LOAD) { + WSREP_DEBUG("forced trx split for LOAD: %s", + wsrep_thd_query(user_thd)); + } +#endif /* WITH_WSREP */ /* ALTER TABLE is COMMITted at every 10000 copied rows. The IX table lock for the original table has to be re-issued. As this method will be called on a temporary table where the @@ -5163,6 +5637,21 @@ ha_innobase::write_row( */ ; } else if (src_table == prebuilt->table) { +#ifdef WITH_WSREP + switch (wsrep_run_wsrep_commit(user_thd, wsrep_hton, 1)) + { + case WSREP_TRX_OK: + break; + case WSREP_TRX_SIZE_EXCEEDED: + case WSREP_TRX_CERT_FAIL: + case WSREP_TRX_ERROR: + DBUG_RETURN(1); + } + + if (binlog_hton->commit(binlog_hton, user_thd, 1)) + DBUG_RETURN(1); + wsrep_post_commit(user_thd, TRUE); +#endif /* WITH_WSREP */ /* Source table is not in InnoDB format: no need to re-acquire locks on it. */ @@ -5173,6 +5662,20 @@ ha_innobase::write_row( /* We will need an IX lock on the destination table. */ prebuilt->sql_stat_start = TRUE; } else { +#ifdef WITH_WSREP + switch (wsrep_run_wsrep_commit(user_thd, wsrep_hton, 1)) + { + case WSREP_TRX_OK: + break; + case WSREP_TRX_SIZE_EXCEEDED: + case WSREP_TRX_CERT_FAIL: + case WSREP_TRX_ERROR: + DBUG_RETURN(1); + } + if (binlog_hton->commit(binlog_hton, user_thd, 1)) + DBUG_RETURN(1); + wsrep_post_commit(user_thd, TRUE); +#endif /* WITH_WSREP */ /* Ensure that there are no other table locks than LOCK_IX and LOCK_AUTO_INC on the destination table. */ @@ -5201,7 +5704,9 @@ ha_innobase::write_row( /* Reset the error code before calling innobase_get_auto_increment(). */ prebuilt->autoinc_error = DB_SUCCESS; - +#ifdef WITH_WSREP + auto_inc_inserted= (table->next_number_field->val_int() == 0); +#endif if ((error = update_auto_increment())) { /* We don't want to mask autoinc overflow errors. */ @@ -5281,6 +5786,30 @@ ha_innobase::write_row( case SQLCOM_REPLACE_SELECT: goto set_max_autoinc; +#ifdef WITH_WSREP + /* workaround for LP bug #355000, retrying the insert */ + case SQLCOM_INSERT: + if (wsrep_on(current_thd) && + auto_inc_inserted && + wsrep_drupal_282555_workaround && + !thd_test_options(current_thd, + OPTION_NOT_AUTOCOMMIT | + OPTION_BEGIN)) { + WSREP_DEBUG( + "retrying insert: %s", + (*wsrep_thd_query(current_thd)) ? + wsrep_thd_query(current_thd) : + (char *)"void"); + error= DB_SUCCESS; + wsrep_thd_set_conflict_state( + current_thd, MUST_ABORT); + innodb_srv_conc_exit_innodb(prebuilt->trx); + /* jump straight to func exit over + * later wsrep hooks */ + goto func_exit; + } + break; +#endif default: break; } @@ -5329,6 +5858,20 @@ ha_innobase::write_row( error_result = convert_error_code_to_mysql((int) error, prebuilt->table->flags, user_thd); +#ifdef WITH_WSREP + if (!error_result && wsrep_thd_exec_mode(user_thd) == LOCAL_STATE && + wsrep_on(user_thd) && !wsrep_consistency_check(user_thd) && + (sql_command != SQLCOM_LOAD || + thd_binlog_format(user_thd) == BINLOG_FORMAT_ROW)) { + + if (wsrep_append_keys(user_thd, false, record, NULL)) { + DBUG_PRINT("wsrep", ("row key failed")); + error_result = HA_ERR_INTERNAL_ERROR; + goto wsrep_error; + } + } +wsrep_error: +#endif func_exit: innobase_active_small(); @@ -5484,7 +6027,84 @@ calc_row_difference( return(0); } +#ifdef WITH_WSREP +static +int +wsrep_calc_row_hash( +/*================*/ + byte* digest, /*!< in/out: md5 sum */ + const uchar* row, /*!< in: row in MySQL format */ + TABLE* table, /*!< in: table in MySQL data + dictionary */ + row_prebuilt_t* prebuilt, /*!< in: InnoDB prebuilt struct */ + THD* thd) /*!< in: user thread */ +{ + Field* field; + enum_field_types field_mysql_type; + uint n_fields; + ulint len; + const byte* ptr; + ulint col_type; + uint i; + + my_MD5Context ctx; + my_MD5Init (&ctx); + + n_fields = table->s->fields; + + for (i = 0; i < n_fields; i++) { + byte null_byte=0; + byte true_byte=1; + + field = table->field[i]; + + ptr = (const byte*) row + get_field_offset(table, field); + len = field->pack_length(); + + field_mysql_type = field->type(); + + col_type = prebuilt->table->cols[i].mtype; + + switch (col_type) { + + case DATA_BLOB: + ptr = row_mysql_read_blob_ref(&len, ptr, len); + + break; + + case DATA_VARCHAR: + case DATA_BINARY: + case DATA_VARMYSQL: + if (field_mysql_type == MYSQL_TYPE_VARCHAR) { + /* This is a >= 5.0.3 type true VARCHAR where + the real payload data length is stored in + 1 or 2 bytes */ + + ptr = row_mysql_read_true_varchar( + &len, ptr, + (ulint) + (((Field_varstring*)field)->length_bytes)); + + } + + break; + default: + ; + } + + if (field->null_ptr && + field_in_record_is_null(table, field, (char*) row)) { + my_MD5Update (&ctx, &null_byte, 1); + } else { + my_MD5Update (&ctx, &true_byte, 1); + my_MD5Update (&ctx, ptr, len); + } + } + my_MD5Final (digest, &ctx); + return(0); +} +#endif /* WITH_WSREP */ /**********************************************************************//** Updates a row given as a parameter to a new value. Note that we are given whole rows, not just the fields which are updated: this incurs some @@ -5610,6 +6230,20 @@ ha_innobase::update_row( innobase_active_small(); +#ifdef WITH_WSREP + if (!error && wsrep_thd_exec_mode(user_thd) == LOCAL_STATE && + wsrep_on(user_thd)) { + + DBUG_PRINT("wsrep", ("update row key")); + + if (wsrep_append_keys(user_thd, false, old_row, new_row)) { + DBUG_PRINT("wsrep", ("row key failed")); + error = HA_ERR_INTERNAL_ERROR; + goto wsrep_error; + } + } +wsrep_error: +#endif DBUG_RETURN(error); } @@ -5653,6 +6287,18 @@ ha_innobase::delete_row( innobase_active_small(); +#ifdef WITH_WSREP + if (!error && wsrep_thd_exec_mode(user_thd) == LOCAL_STATE && + wsrep_on(user_thd)) { + + if (wsrep_append_keys(user_thd, false, record, NULL)) { + DBUG_PRINT("wsrep", ("delete fail")); + error = HA_ERR_INTERNAL_ERROR; + goto wsrep_error; + } + } +wsrep_error: +#endif DBUG_RETURN(error); } @@ -6441,7 +7087,395 @@ ha_innobase::rnd_pos( DBUG_RETURN(error); } +#ifdef WITH_WSREP +extern "C" { +dict_index_t* +wsrep_dict_foreign_find_index( + dict_table_t* table, + const char** columns, + ulint n_cols, + dict_index_t* types_idx, + ibool check_charsets, + ulint check_null); +ulint +wsrep_append_foreign_key( +/*===========================*/ + trx_t* trx, /*!< in: trx */ + dict_foreign_t* foreign, /*!< in: foreign key constraint */ + const rec_t* rec, /*!mysql_thd; + ulint rcode = DB_SUCCESS; + char cache_key[513] = {'\0'}; + int cache_key_len; + bool const copy = true; + + if (!wsrep_on(trx->mysql_thd) || + wsrep_thd_exec_mode(thd) != LOCAL_STATE) + return DB_SUCCESS; + + if (!thd || !foreign || + (!foreign->referenced_table && !foreign->foreign_table)) + { + WSREP_INFO("FK: %s missing in: %s", + (!thd) ? "thread" : + ((!foreign) ? "constraint" : + ((!foreign->referenced_table) ? + "referenced table" : "foreign table")), + (thd && wsrep_thd_query(thd)) ? + wsrep_thd_query(thd) : "void"); + return DB_ERROR; + } + + if ( !((referenced) ? + foreign->referenced_table : foreign->foreign_table)) + { + WSREP_DEBUG("pulling %s table into cache", + (referenced) ? "referenced" : "foreign"); + mutex_enter(&(dict_sys->mutex)); + if (referenced) + { + foreign->referenced_table = + dict_table_get_low( + foreign->referenced_table_name_lookup, + DICT_ERR_IGNORE_NONE); + if (foreign->referenced_table) + { + foreign->referenced_index = + wsrep_dict_foreign_find_index( + foreign->referenced_table, + foreign->referenced_col_names, + foreign->n_fields, + foreign->foreign_index, + TRUE, FALSE); + } + } + else + { + foreign->foreign_table = + dict_table_get_low( + foreign->foreign_table_name_lookup, + DICT_ERR_IGNORE_NONE); + if (foreign->foreign_table) + { + foreign->foreign_index = + wsrep_dict_foreign_find_index( + foreign->foreign_table, + foreign->foreign_col_names, + foreign->n_fields, + foreign->referenced_index, + TRUE, FALSE); + } + } + mutex_exit(&(dict_sys->mutex)); + } + + if ( !((referenced) ? + foreign->referenced_table : foreign->foreign_table)) + { + WSREP_WARN("FK: %s missing in query: %s", + (!foreign->referenced_table) ? + "referenced table" : "foreign table", + (wsrep_thd_query(thd)) ? + wsrep_thd_query(thd) : "void"); + return DB_ERROR; + } + byte key[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'}; + ulint len = WSREP_MAX_SUPPORTED_KEY_LENGTH; + + dict_index_t *idx_target = (referenced) ? + foreign->referenced_index : index; + dict_index_t *idx = (referenced) ? + UT_LIST_GET_FIRST(foreign->referenced_table->indexes) : + UT_LIST_GET_FIRST(foreign->foreign_table->indexes); + int i = 0; + while (idx != NULL && idx != idx_target) { + if (innobase_strcasecmp (idx->name, innobase_index_reserve_name) != 0) { + i++; + } + idx = UT_LIST_GET_NEXT(indexes, idx); + } + ut_a(idx); + key[0] = (char)i; + + rcode = wsrep_rec_get_foreign_key( + &key[1], &len, rec, index, idx, + wsrep_protocol_version > 1); + if (rcode != DB_SUCCESS) { + WSREP_ERROR( + "FK key set failed: %lu (%lu %lu), index: %s %s, %s", + rcode, referenced, shared, + (index && index->name) ? index->name : + "void index", + (index && index->table_name) ? index->table_name : + "void table", + wsrep_thd_query(thd)); + return rcode; + } + strncpy(cache_key, + (wsrep_protocol_version > 1) ? + ((referenced) ? + foreign->referenced_table->name : + foreign->foreign_table->name) : + foreign->foreign_table->name, sizeof(cache_key) - 1); + cache_key_len = strlen(cache_key); +#ifdef WSREP_DEBUG_PRINT + ulint j; + fprintf(stderr, "FK parent key, table: %s %s len: %lu ", + cache_key, (shared) ? "shared" : "exclusive", len+1); + for (j=0; jreferenced_table->name, + foreign->foreign_table->name); + } + + wsrep_buf_t wkey_part[3]; + wsrep_key_t wkey = {wkey_part, 3}; + if (!wsrep_prepare_key_for_innodb( + (const uchar*)cache_key, + cache_key_len + 1, + (const uchar*)key, len+1, + wkey_part, + &wkey.key_parts_num)) { + WSREP_WARN("key prepare failed for cascaded FK: %s", + (wsrep_thd_query(thd)) ? + wsrep_thd_query(thd) : "void"); + return DB_ERROR; + } + rcode = (int)wsrep->append_key( + wsrep, + wsrep_ws_handle(thd, trx), + &wkey, + 1, + shared ? WSREP_KEY_SHARED : WSREP_KEY_EXCLUSIVE, + copy); + if (rcode) { + DBUG_PRINT("wsrep", ("row key failed: %lu", rcode)); + WSREP_ERROR("Appending cascaded fk row key failed: %s, %lu", + (wsrep_thd_query(thd)) ? + wsrep_thd_query(thd) : "void", rcode); + return DB_ERROR; + } + + return DB_SUCCESS; +} +} + +static int +wsrep_append_key( +/*==================*/ + THD *thd, + trx_t *trx, + TABLE_SHARE *table_share, + TABLE *table, + const char* key, + uint16_t key_len, + bool shared +) +{ + DBUG_ENTER("wsrep_append_key"); + bool const copy = true; +#ifdef WSREP_DEBUG_PRINT + fprintf(stderr, "%s conn %ld, trx %llu, keylen %d, table %s ", + (shared) ? "Shared" : "Exclusive", + wsrep_thd_thread_id(thd), trx->id, key_len, + table_share->table_name.str); + for (int i=0; itable_cache_key.str, + table_share->table_cache_key.length, + (const uchar*)key, key_len, + wkey_part, + &wkey.key_parts_num)) { + WSREP_WARN("key prepare failed for: %s", + (wsrep_thd_query(thd)) ? + wsrep_thd_query(thd) : "void"); + DBUG_RETURN(HA_ERR_INTERNAL_ERROR); + } + + int rcode = (int)wsrep->append_key( + wsrep, + wsrep_ws_handle(thd, trx), + &wkey, + 1, + shared ? WSREP_KEY_SHARED : WSREP_KEY_EXCLUSIVE, + copy); + if (rcode) { + DBUG_PRINT("wsrep", ("row key failed: %d", rcode)); + WSREP_WARN("Appending row key failed: %s, %d", + (wsrep_thd_query(thd)) ? + wsrep_thd_query(thd) : "void", rcode); + DBUG_RETURN(rcode); + } + DBUG_RETURN(0); +} + +int +ha_innobase::wsrep_append_keys( +/*==================*/ + THD *thd, + bool shared, + const uchar* record0, /* in: row in MySQL format */ + const uchar* record1) /* in: row in MySQL format */ +{ + DBUG_ENTER("wsrep_append_keys"); + + bool key_appended = false; + trx_t *trx = thd_to_trx(thd); + + if (table_share && table_share->tmp_table != NO_TMP_TABLE) { + WSREP_DEBUG("skipping tmp table DML: THD: %lu tmp: %d SQL: %s", + wsrep_thd_thread_id(thd), + table_share->tmp_table, + (wsrep_thd_query(thd)) ? + wsrep_thd_query(thd) : "void"); + DBUG_RETURN(0); + } + + if (wsrep_protocol_version == 0) { + uint len; + char keyval[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'}; + char *key = &keyval[0]; + ibool is_null; + + len = wsrep_store_key_val_for_row( + table, 0, key, WSREP_MAX_SUPPORTED_KEY_LENGTH, + record0, &is_null); + + if (!is_null) { + int rcode = wsrep_append_key( + thd, trx, table_share, table, keyval, + len, shared); + if (rcode) DBUG_RETURN(rcode); + } + else + { + WSREP_DEBUG("NULL key skipped (proto 0): %s", + wsrep_thd_query(thd)); + } + } else { + ut_a(table->s->keys <= 256); + uint i; + bool hasPK= false; + + for (i=0; is->keys; ++i) { + KEY* key_info = table->key_info + i; + if (key_info->flags & HA_NOSAME) { + hasPK = true; + if (i != table->s->primary_key) { + wsrep_thd_set_PA_safe(thd, FALSE); + } + } + } + + for (i=0; is->keys; ++i) { + uint len; + char keyval0[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'}; + char keyval1[WSREP_MAX_SUPPORTED_KEY_LENGTH+1] = {'\0'}; + char* key0 = &keyval0[1]; + char* key1 = &keyval1[1]; + KEY* key_info = table->key_info + i; + ibool is_null; + + dict_index_t* idx = innobase_get_index(i); + dict_table_t* tab = (idx) ? idx->table : NULL; + + keyval0[0] = (char)i; + keyval1[0] = (char)i; + + if (!tab) { + WSREP_WARN("MySQL-InnoDB key mismatch %s %s", + table->s->table_name.str, + key_info->name); + } + /* !hasPK == table with no PK, must append all non-unique keys */ + if (!hasPK || key_info->flags & HA_NOSAME || + ((tab && + dict_table_get_referenced_constraint(tab, idx)) || + (!tab && referenced_by_foreign_key()))) { + + len = wsrep_store_key_val_for_row( + table, i, key0, + WSREP_MAX_SUPPORTED_KEY_LENGTH, + record0, &is_null); + if (!is_null) { + int rcode = wsrep_append_key( + thd, trx, table_share, table, + keyval0, len+1, shared); + if (rcode) DBUG_RETURN(rcode); + + if (key_info->flags & HA_NOSAME || shared) + key_appended = true; + } + else + { + WSREP_DEBUG("NULL key skipped: %s", + wsrep_thd_query(thd)); + } + if (record1) { + len = wsrep_store_key_val_for_row( + table, i, key1, + WSREP_MAX_SUPPORTED_KEY_LENGTH, + record1, &is_null); + if (!is_null && memcmp(key0, key1, len)) { + int rcode = wsrep_append_key( + thd, trx, table_share, + table, + keyval1, len+1, shared); + if (rcode) DBUG_RETURN(rcode); + } + } + } + } + } + + /* if no PK, calculate hash of full row, to be the key value */ + if (!key_appended && wsrep_certify_nonPK) { + uchar digest[16]; + int rcode; + + wsrep_calc_row_hash(digest, record0, table, prebuilt, thd); + if ((rcode = wsrep_append_key(thd, trx, table_share, table, + (const char*) digest, 16, + shared))) { + DBUG_RETURN(rcode); + } + + if (record1) { + wsrep_calc_row_hash( + digest, record1, table, prebuilt, thd); + if ((rcode = wsrep_append_key(thd, trx, table_share, + table, + (const char*) digest, + 16, shared))) { + DBUG_RETURN(rcode); + } + } + DBUG_RETURN(0); + } + + DBUG_RETURN(0); +} +#endif /*********************************************************************//** Stores a reference to the current row to 'ref' field of the handle. Note that in the case where we have generated the clustered index for the @@ -9287,11 +10321,18 @@ ha_innobase::external_lock( /* used by test case */ DBUG_EXECUTE_IF("no_innodb_binlog_errors", skip = 1;); if (!skip) { +#ifdef WITH_WSREP + if (!wsrep_on(thd) || wsrep_thd_exec_mode(thd) == LOCAL_STATE) + { +#endif /* WITH_WSREP */ my_error(ER_BINLOG_STMT_MODE_AND_ROW_ENGINE, MYF(0), " InnoDB is limited to row-logging when " "transaction isolation level is " "READ COMMITTED or READ UNCOMMITTED."); DBUG_RETURN(HA_ERR_LOGGING_IMPOSSIBLE); +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ } } @@ -10540,6 +11581,9 @@ innobase_xa_prepare( to the session variable take effect only in the next transaction */ if (!trx->support_xa) { +#ifdef WITH_WSREP + thd_get_xid(thd, (MYSQL_XID*) &trx->xid); +#endif // WITH_WSREP return(0); } @@ -10611,6 +11655,9 @@ innobase_xa_prepare( In this case we cannot know how many minutes or hours will be between XA PREPARE and XA COMMIT, and we don't want to block for undefined period of time. */ +#ifdef WITH_WSREP + if (!wsrep_on(thd)) +#endif mysql_mutex_lock(&prepare_commit_mutex); trx_owns_prepare_commit_mutex_set(trx); } @@ -11425,6 +12472,285 @@ static SHOW_VAR innodb_status_variables_export[]= { static struct st_mysql_storage_engine innobase_storage_engine= { MYSQL_HANDLERTON_INTERFACE_VERSION }; +#ifdef WITH_WSREP +void +wsrep_abort_slave_trx(wsrep_seqno_t bf_seqno, wsrep_seqno_t victim_seqno) +{ + WSREP_ERROR("Trx %lld tries to abort slave trx %lld. This could be " + "caused by:\n\t" + "1) unsupported configuration options combination, please check documentation.\n\t" + "2) a bug in the code.\n\t" + "3) a database corruption.\n Node consistency compromized, " + "need to abort. Restart the node to resync with cluster.", + (long long)bf_seqno, (long long)victim_seqno); + abort(); +} + +int +wsrep_innobase_kill_one_trx(void *bf_thd_ptr, trx_t *bf_trx, trx_t *victim_trx, ibool signal) +{ + DBUG_ENTER("wsrep_innobase_kill_one_trx"); + THD *bf_thd = (THD *)bf_thd_ptr; + THD *thd = (THD *) victim_trx->mysql_thd; + int64_t bf_seqno = (bf_thd) ? wsrep_thd_trx_seqno(bf_thd) : 0; + + if (!bf_thd) bf_thd = (bf_trx) ? (THD *)bf_trx->mysql_thd : NULL; + + if (!thd) { + DBUG_PRINT("wsrep", ("no thd for conflicting lock")); + WSREP_WARN("no THD for trx: %llu", victim_trx->id); + DBUG_RETURN(1); + } + if (!bf_thd) { + DBUG_PRINT("wsrep", ("no BF thd for conflicting lock")); + WSREP_WARN("no BF THD for trx: %llu", (bf_trx) ? bf_trx->id : 0); + DBUG_RETURN(1); + } + + WSREP_LOG_CONFLICT(bf_thd, thd, TRUE); + + WSREP_DEBUG("BF kill (%lu, seqno: %lld), victim: (%lu) trx: %llu", + signal, (long long)bf_seqno, + wsrep_thd_thread_id(thd), + victim_trx->id); + + WSREP_DEBUG("Aborting query: %s", + (thd && wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void"); + + wsrep_thd_LOCK(thd); + + if (wsrep_thd_query_state(thd) == QUERY_EXITING) { + WSREP_DEBUG("kill trx EXITING for %llu", victim_trx->id); + wsrep_thd_UNLOCK(thd); + DBUG_RETURN(0); + } + if(wsrep_thd_exec_mode(thd) != LOCAL_STATE) { + WSREP_DEBUG("withdraw for BF trx: %llu, state: %d", + victim_trx->id, + wsrep_thd_conflict_state(thd)); + } + + switch (wsrep_thd_conflict_state(thd)) { + case NO_CONFLICT: + wsrep_thd_set_conflict_state(thd, MUST_ABORT); + break; + case MUST_ABORT: + WSREP_DEBUG("victim %llu in MUST ABORT state", + victim_trx->id); + wsrep_thd_UNLOCK(thd); + wsrep_thd_awake(thd, signal); + DBUG_RETURN(0); + break; + case ABORTED: + case ABORTING: // fall through + default: + WSREP_DEBUG("victim %llu in state %d", + victim_trx->id, wsrep_thd_conflict_state(thd)); + wsrep_thd_UNLOCK(thd); + DBUG_RETURN(0); + break; + } + + switch (wsrep_thd_query_state(thd)) { + case QUERY_COMMITTING: + enum wsrep_status rcode; + + WSREP_DEBUG("kill query for: %ld", + wsrep_thd_thread_id(thd)); + wsrep_thd_awake(thd, signal); + WSREP_DEBUG("kill trx QUERY_COMMITTING for %llu", + victim_trx->id); + + if (wsrep_thd_exec_mode(thd) == REPL_RECV) { + wsrep_abort_slave_trx(bf_seqno, + wsrep_thd_trx_seqno(thd)); + } else { + rcode = wsrep->abort_pre_commit( + wsrep, bf_seqno, + (wsrep_trx_id_t)victim_trx->id + ); + + switch (rcode) { + case WSREP_WARNING: + WSREP_DEBUG("cancel commit warning: %llu", + victim_trx->id); + wsrep_thd_UNLOCK(thd); + DBUG_RETURN(1); + break; + case WSREP_OK: + break; + default: + WSREP_ERROR( + "cancel commit bad exit: %d %llu", + rcode, + victim_trx->id); + /* unable to interrupt, must abort */ + /* note: kill_mysql() will block, if we cannot. + * kill the lock holder first. + */ + abort(); + break; + } + } + break; + case QUERY_EXEC: + /* it is possible that victim trx is itself waiting for some + * other lock. We need to cancel this waiting + */ + WSREP_DEBUG("kill trx QUERY_EXEC for %llu", victim_trx->id); + + victim_trx->was_chosen_as_deadlock_victim= TRUE; + if (victim_trx->wait_lock) { + WSREP_DEBUG("victim has wait flag: %ld", + wsrep_thd_thread_id(thd)); + lock_t* wait_lock = victim_trx->wait_lock; + if (wait_lock) { + WSREP_DEBUG("canceling wait lock"); + victim_trx->was_chosen_as_deadlock_victim= TRUE; + lock_cancel_waiting_and_release(wait_lock); + } + + wsrep_thd_awake(thd, signal); + } else { + /* abort currently executing query */ + DBUG_PRINT("wsrep",("sending KILL_QUERY to: %ld", + wsrep_thd_thread_id(thd))); + WSREP_DEBUG("kill query for: %ld", + wsrep_thd_thread_id(thd)); + wsrep_thd_awake(thd, signal); + + /* for BF thd, we need to prevent him from committing */ + if (wsrep_thd_exec_mode(thd) == REPL_RECV) { + wsrep_abort_slave_trx(bf_seqno, + wsrep_thd_trx_seqno(thd)); + } + } + break; + case QUERY_IDLE: + { + bool skip_abort= false; + wsrep_aborting_thd_t abortees; + + WSREP_DEBUG("kill IDLE for %llu", victim_trx->id); + + if (wsrep_thd_exec_mode(thd) == REPL_RECV) { + WSREP_DEBUG("kill BF IDLE, seqno: %lld", + (long long)wsrep_thd_trx_seqno(thd)); + wsrep_thd_UNLOCK(thd); + wsrep_abort_slave_trx(bf_seqno, + wsrep_thd_trx_seqno(thd)); + DBUG_RETURN(0); + } + /* This will lock thd from proceeding after net_read() */ + wsrep_thd_set_conflict_state(thd, ABORTING); + + mysql_mutex_lock(&LOCK_wsrep_rollback); + + abortees = wsrep_aborting_thd; + while (abortees && !skip_abort) { + /* check if we have a kill message for this already */ + if (abortees->aborting_thd == thd) { + skip_abort = true; + WSREP_WARN("duplicate thd aborter %lu", + wsrep_thd_thread_id(thd)); + } + abortees = abortees->next; + } + if (!skip_abort) { + wsrep_aborting_thd_t aborting = (wsrep_aborting_thd_t) + my_malloc(sizeof(struct wsrep_aborting_thd), + MYF(0)); + aborting->aborting_thd = thd; + aborting->next = wsrep_aborting_thd; + wsrep_aborting_thd = aborting; + DBUG_PRINT("wsrep",("enqueuing trx abort for %lu", + wsrep_thd_thread_id(thd))); + WSREP_DEBUG("enqueuing trx abort for (%lu)", + wsrep_thd_thread_id(thd)); + } + + DBUG_PRINT("wsrep",("signalling wsrep rollbacker")); + WSREP_DEBUG("signaling aborter"); + mysql_cond_signal(&COND_wsrep_rollback); + mysql_mutex_unlock(&LOCK_wsrep_rollback); + + break; + } + default: + WSREP_WARN("bad wsrep query state: %d", + wsrep_thd_query_state(thd)); + break; + } + wsrep_thd_UNLOCK(thd); + + DBUG_RETURN(0); +} +static int +wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd, + my_bool signal) +{ + DBUG_ENTER("wsrep_innobase_abort_thd"); + trx_t* victim_trx = thd_to_trx(victim_thd); + trx_t* bf_trx = (bf_thd) ? thd_to_trx(bf_thd) : NULL; + WSREP_DEBUG("abort transaction: BF: %s victim: %s", + wsrep_thd_query(bf_thd), + wsrep_thd_query(victim_thd)); + + if (victim_trx) + { + mutex_enter(&kernel_mutex); + int rcode = wsrep_innobase_kill_one_trx( + bf_thd, bf_trx, victim_trx, signal); + mutex_exit(&kernel_mutex); + wsrep_srv_conc_cancel_wait(victim_trx); + DBUG_RETURN(rcode); + } else { + WSREP_DEBUG("victim does not have transaction"); + wsrep_thd_LOCK(victim_thd); + wsrep_thd_set_conflict_state(victim_thd, MUST_ABORT); + wsrep_thd_UNLOCK(victim_thd); + wsrep_thd_awake(victim_thd, signal); + } + DBUG_RETURN(-1); +} + +static int innobase_wsrep_set_checkpoint(handlerton* hton, const XID* xid) +{ + DBUG_ASSERT(hton == innodb_hton_ptr); + if (wsrep_is_wsrep_xid(xid)) { + mtr_t mtr; + mtr_start(&mtr); + trx_sysf_t* sys_header = trx_sysf_get(&mtr); + trx_sys_update_wsrep_checkpoint(xid, sys_header, &mtr); + mtr_commit(&mtr); + innobase_flush_logs(hton); + return 0; + } else { + return 1; + } +} + +static int innobase_wsrep_get_checkpoint(handlerton* hton, XID* xid) +{ + DBUG_ASSERT(hton == innodb_hton_ptr); + trx_sys_read_wsrep_checkpoint(xid); + return 0; +} + +static void +wsrep_fake_trx_id( +/*==================*/ + handlerton *hton, + THD *thd) /*!< in: user thread handle */ +{ + mutex_enter(&kernel_mutex); + trx_id_t trx_id = trx_sys_get_new_trx_id(); + mutex_exit(&kernel_mutex); + + (void *)wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd), trx_id); +} + +#endif /* WITH_WSREP */ /* plugin options */ static MYSQL_SYSVAR_BOOL(checksums, innobase_use_checksums, PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, @@ -11763,6 +13089,40 @@ static MYSQL_SYSVAR_UINT(change_buffering_debug, ibuf_debug, NULL, NULL, 0, 0, 2, 0); #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ +#ifdef WITH_INNODB_DISALLOW_WRITES +/******************************************************* + * innobase_disallow_writes variable definition * + *******************************************************/ + +/* Must always init to FALSE. */ +static my_bool innobase_disallow_writes = FALSE; + +/************************************************************************** +An "update" method for innobase_disallow_writes variable. */ +static +void +innobase_disallow_writes_update( +/*============================*/ + THD* thd, /* in: thread handle */ + st_mysql_sys_var* var, /* in: pointer to system + variable */ + void* var_ptr, /* out: pointer to dynamic + variable */ + const void* save) /* in: temporary storage */ +{ + *(my_bool*)var_ptr = *(my_bool*)save; + ut_a(srv_allow_writes_event); + if (*(my_bool*)var_ptr) + os_event_reset(srv_allow_writes_event); + else + os_event_set(srv_allow_writes_event); +} + +static MYSQL_SYSVAR_BOOL(disallow_writes, innobase_disallow_writes, + PLUGIN_VAR_NOCMDOPT, + "Tell InnoDB to stop any writes to disk", + NULL, innobase_disallow_writes_update, FALSE); +#endif /* WITH_INNODB_DISALLOW_WRITES */ static MYSQL_SYSVAR_BOOL(random_read_ahead, srv_random_read_ahead, PLUGIN_VAR_NOCMDARG, "Whether to use read ahead for random access within an extent.", @@ -11864,6 +13224,9 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG MYSQL_SYSVAR(change_buffering_debug), #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ +#ifdef WITH_INNODB_DISALLOW_WRITES + MYSQL_SYSVAR(disallow_writes), +#endif /* WITH_INNODB_DISALLOW_WRITES */ MYSQL_SYSVAR(random_read_ahead), MYSQL_SYSVAR(read_ahead_threshold), MYSQL_SYSVAR(io_capacity), diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 94db76fe63d5..571ce038d241 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -114,6 +114,10 @@ class ha_innobase: public handler dict_index_t* innobase_get_index(uint keynr); int info_low(uint flag, bool called_from_analyze); +#ifdef WITH_WSREP + int wsrep_append_keys(THD *thd, bool shared, + const uchar* record0, const uchar* record1); +#endif /* Init values for the class: */ public: ha_innobase(handlerton *hton, TABLE_SHARE *table_arg); @@ -298,6 +302,40 @@ bool thd_binlog_filter_ok(const MYSQL_THD thd); bool thd_sqlcom_can_generate_row_events(const MYSQL_THD thd); } +#ifdef WITH_WSREP +#include +//extern "C" int wsrep_trx_order_before(void *thd1, void *thd2); + +extern "C" bool wsrep_thd_is_wsrep_on(THD *thd); + +extern "C" enum wsrep_exec_mode wsrep_thd_exec_mode(THD *thd); +extern "C" enum wsrep_conflict_state wsrep_thd_conflict_state(THD *thd); +extern "C" enum wsrep_query_state wsrep_thd_query_state(THD *thd); +extern "C" const char * wsrep_thd_exec_mode_str(THD *thd); +extern "C" const char * wsrep_thd_conflict_state_str(THD *thd); +extern "C" const char * wsrep_thd_query_state_str(THD *thd); +extern "C" wsrep_ws_handle_t* wsrep_thd_ws_handle(THD *thd); + +extern "C" void wsrep_thd_set_exec_mode(THD *thd, enum wsrep_exec_mode mode); +extern "C" void wsrep_thd_set_query_state( + THD *thd, enum wsrep_query_state state); +extern "C" void wsrep_thd_set_conflict_state( + THD *thd, enum wsrep_conflict_state state); + +extern "C" void wsrep_thd_set_trx_to_replay(THD *thd, uint64 trx_id); + +extern "C"void wsrep_thd_LOCK(THD *thd); +extern "C"void wsrep_thd_UNLOCK(THD *thd); +extern "C" uint32 wsrep_thd_wsrep_rand(THD *thd); +extern "C" time_t wsrep_thd_query_start(THD *thd); +extern "C" my_thread_id wsrep_thd_thread_id(THD *thd); +extern "C" int64_t wsrep_thd_trx_seqno(THD *thd); +extern "C" query_id_t wsrep_thd_query_id(THD *thd); +extern "C" char * wsrep_thd_query(THD *thd); +extern "C" query_id_t wsrep_thd_wsrep_last_query_id(THD *thd); +extern "C" void wsrep_thd_set_wsrep_last_query_id(THD *thd, query_id_t id); +extern "C" void wsrep_thd_awake(THD *thd, my_bool signal); +#endif typedef struct trx_struct trx_t; /********************************************************************//** @file handler/ha_innodb.h @@ -338,3 +376,6 @@ innobase_index_name_is_reserved( ulint num_of_keys); /*!< in: Number of indexes to be created. */ +#ifdef WITH_WSREP +extern "C" int wsrep_trx_is_aborting(void *thd_ptr); +#endif diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 005f14a6f23f..1a7932e2db81 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -36,6 +36,10 @@ extern "C" { #include "handler0alter.h" } +#ifdef WITH_WSREP +//#include "wsrep_api.h" +#include // PROCESS_ACL +#endif #include "ha_innodb.h" /*************************************************************//** diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index a58bb914be21..daa3c35ebfb0 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -344,6 +344,9 @@ barracuda format, the length could be REC_VERSION_56_MAX_INDEX_COL_LEN /** Defines the maximum fixed length column size */ #define DICT_MAX_FIXED_COL_LEN DICT_ANTELOPE_MAX_INDEX_COL_LEN +#ifdef WITH_WSREP +#define WSREP_MAX_SUPPORTED_KEY_LENGTH 3500 +#endif /* WITH_WSREP */ /** Data structure for a field in an index */ struct dict_field_struct{ diff --git a/storage/innobase/include/ha_prototypes.h b/storage/innobase/include/ha_prototypes.h index 3859b45e8d11..2a45288cf5f1 100644 --- a/storage/innobase/include/ha_prototypes.h +++ b/storage/innobase/include/ha_prototypes.h @@ -285,6 +285,22 @@ thd_set_lock_wait_time( void* thd, /*!< in: thread handle (THD*) */ ulint value); /*!< in: time waited for the lock */ +#ifdef WITH_WSREP +UNIV_INTERN +int +wsrep_innobase_kill_one_trx(void *bf_thd, trx_t *bf_trx, trx_t *victim_trx, ibool signal); +my_bool wsrep_thd_is_BF(void *thd_ptr, my_bool sync); +//int64_t wsrep_thd_trx_seqno(THD *thd); +int wsrep_trx_order_before(void *thd1, void *thd2); +int wsrep_innobase_mysql_sort(int mysql_type, uint charset_number, + unsigned char* str, unsigned int str_length, + unsigned int buf_length); +UNIV_INTERN +int +wsrep_on(void *thd_ptr); +int wsrep_is_wsrep_xid(const void*); +my_bool wsrep_thd_set_PA_safe(void *thd_ptr, my_bool safe); +#endif /* WITH_WSREP */ /**********************************************************************//** Get the current setting of the lower_case_table_names global parameter from mysqld.cc. We do a dirty read because for one there is no synchronization diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h index 01439835aa51..237e43b7882e 100644 --- a/storage/innobase/include/lock0lock.h +++ b/storage/innobase/include/lock0lock.h @@ -799,9 +799,6 @@ lock_rec_get_page_no( record */ #define LOCK_CONV_BY_OTHER 4096 /*!< this bit is set when the lock is created by other transaction */ -#if (LOCK_WAIT|LOCK_GAP|LOCK_REC_NOT_GAP|LOCK_INSERT_INTENTION|LOCK_CONV_BY_OTHER)&LOCK_MODE_MASK -# error -#endif #if (LOCK_WAIT|LOCK_GAP|LOCK_REC_NOT_GAP|LOCK_INSERT_INTENTION|LOCK_CONV_BY_OTHER)&LOCK_TYPE_MASK # error #endif diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h index 9dd96f609ea3..7e76b4f40cb4 100644 --- a/storage/innobase/include/rem0rec.h +++ b/storage/innobase/include/rem0rec.h @@ -836,6 +836,15 @@ are given in one byte (resp. two byte) format. */ two upmost bits in a two byte offset for special purposes */ #define REC_MAX_DATA_SIZE (16 * 1024) +#ifdef WITH_WSREP +int wsrep_rec_get_foreign_key( + byte *buf, /* out: extracted key */ + ulint *buf_len, /* in/out: length of buf */ + const rec_t* rec, /* in: physical record */ + dict_index_t* index_for, /* in: index for foreign table */ + dict_index_t* index_ref, /* in: index for referenced table */ + ibool new_protocol); /* in: protocol > 1 */ +#endif /* WITH_WSREP */ #ifndef UNIV_NONINL #include "rem0rec.ic" #endif diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 0050174c73eb..6405ad0a2554 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -141,6 +141,10 @@ extern ulint srv_log_buffer_size; extern ulong srv_flush_log_at_trx_commit; extern char srv_adaptive_flushing; +#ifdef WITH_INNODB_DISALLOW_WRITES +/* When this event is reset we do not allow any file writes to take place. */ +extern os_event_t srv_allow_writes_event; +#endif /* WITH_INNODB_DISALLOW_WRITES */ /* If this flag is TRUE, then we will load the indexes' (and tables') metadata even if they are marked as "corrupted". Mostly it is for DBA to process corrupted index and table */ @@ -569,6 +573,14 @@ srv_conc_enter_innodb( /*==================*/ trx_t* trx); /*!< in: transaction object associated with the thread */ +#ifdef WITH_WSREP +UNIV_INTERN +void +wsrep_srv_conc_cancel_wait( +/*==================*/ + trx_t* trx); /*!< in: transaction object associated with the + thread */ +#endif /* WITH_WSREP */ /*********************************************************************//** This lets a thread enter InnoDB regardless of the number of threads inside InnoDB. This must be called when a thread ends a lock wait. */ diff --git a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sys.h index 69b87e18010c..b8f1973d9c56 100644 --- a/storage/innobase/include/trx0sys.h +++ b/storage/innobase/include/trx0sys.h @@ -41,6 +41,9 @@ Created 3/26/1996 Heikki Tuuri #include "ut0bh.h" #include "read0types.h" #include "page0types.h" +#ifdef WITH_WSREP +#include "trx0xa.h" +#endif /* WITH_WSREP */ /** In a MySQL replication slave, in crash recovery we store the master log file name and position here. */ @@ -306,6 +309,9 @@ trx_sys_update_mysql_binlog_offset( ib_int64_t offset, /*!< in: position in that log file */ ulint field, /*!< in: offset of the MySQL log info field in the trx sys header */ +#ifdef WITH_WSREP + trx_sysf_t* sys_header, /*!< in: trx sys header */ +#endif /* WITH_WSREP */ mtr_t* mtr); /*!< in: mtr */ /*****************************************************************//** Prints to stderr the MySQL binlog offset info in the trx system header if @@ -314,6 +320,19 @@ UNIV_INTERN void trx_sys_print_mysql_binlog_offset(void); /*===================================*/ +#ifdef WITH_WSREP +/** Update WSREP checkpoint XID in sys header. */ +void +trx_sys_update_wsrep_checkpoint( + const XID* xid, /*!< in: WSREP XID */ + trx_sysf_t* sys_header, /*!< in: sys_header */ + mtr_t* mtr); /*!< in: mtr */ + +void +/** Read WSREP checkpoint XID from sys header. */ +trx_sys_read_wsrep_checkpoint( + XID* xid); /*!< out: WSREP XID */ +#endif /* WITH_WSREP */ /*****************************************************************//** Prints to stderr the MySQL master log offset info in the trx system header if the magic number shows it valid. */ @@ -519,6 +538,22 @@ this contains the same fields as TRX_SYS_MYSQL_LOG_INFO below */ within that file */ #define TRX_SYS_MYSQL_LOG_NAME 12 /*!< MySQL log file name */ +#ifdef WITH_WSREP +/* We hijack TRX_SYS_MYSQL_MASTER_LOG_INFO, it seems to be completely unused + otherwise (see comments for MySQL bug #34058). */ +/** */ +#define TRX_SYS_WSREP_XID_INFO TRX_SYS_MYSQL_MASTER_LOG_INFO +#define TRX_SYS_WSREP_XID_MAGIC_N_FLD 0 +#define TRX_SYS_WSREP_XID_MAGIC_N 0x77737265 + +/* XID field: formatID, gtrid_len, bqual_len, xid_data */ +#define TRX_SYS_WSREP_XID_LEN (4 + 4 + 4 + XIDDATASIZE) +#define TRX_SYS_WSREP_XID_FORMAT 4 +#define TRX_SYS_WSREP_XID_GTRID_LEN 8 +#define TRX_SYS_WSREP_XID_BQUAL_LEN 12 +#define TRX_SYS_WSREP_XID_DATA 16 +#endif /* WITH_WSREP*/ + /** Doublewrite buffer */ /* @{ */ /** The offset of the doublewrite buffer header on the trx system header page */ diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 17a39c2949f8..482d52d5bdb1 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -729,6 +729,9 @@ struct trx_struct{ /*------------------------------*/ char detailed_error[256]; /*!< detailed error message for last error, or empty. */ +#ifdef WITH_WSREP + os_event_t wsrep_event; /* event waited for in srv_conc_slot */ +#endif /* WITH_WSREP */ }; #define TRX_MAX_N_THREADS 32 /* maximum number of diff --git a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.c index e6ce07428e87..f552bc274cc6 100644 --- a/storage/innobase/lock/lock0lock.c +++ b/storage/innobase/lock/lock0lock.c @@ -40,6 +40,10 @@ Created 5/7/1996 Heikki Tuuri #include "trx0sys.h" #include "btr0btr.h" +#ifdef WITH_WSREP +extern my_bool wsrep_debug; +extern my_bool wsrep_log_conflicts; +#endif /* Restricts the length of search we will do in the waits-for graph of transactions */ #define LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK 1000000 @@ -905,6 +909,9 @@ UNIV_INLINE ibool lock_rec_has_to_wait( /*=================*/ +#ifdef WITH_WSREP + ibool for_locking, /*!< is caller locking or releasing */ +#endif /* WITH_WSREP */ const trx_t* trx, /*!< in: trx of new lock */ ulint type_mode,/*!< in: precise mode of the new lock to set: LOCK_S or LOCK_X, possibly @@ -974,6 +981,44 @@ lock_rec_has_to_wait( return(FALSE); } +#ifdef WITH_WSREP + /* if BF thread is locking and has conflict with another BF + thread, we need to look at trx ordering and lock types */ + if (for_locking && + wsrep_thd_is_BF(trx->mysql_thd, FALSE) && + wsrep_thd_is_BF(lock2->trx->mysql_thd, TRUE)) { + + if (wsrep_debug) { + fprintf(stderr, "\n BF-BF lock conflict \n"); + lock_rec_print(stderr, lock2); + } + + if (wsrep_trx_order_before(trx->mysql_thd, + lock2->trx->mysql_thd) && + (type_mode & LOCK_MODE_MASK) == LOCK_X && + (lock2->type_mode & LOCK_MODE_MASK) == LOCK_X) + { + /* exclusive lock conflicts are not accepted */ + fprintf(stderr, "BF-BF X lock conflict\n"); + lock_rec_print(stderr, lock2); + abort(); + } else { + /* if lock2->index->n_uniq <= + lock2->index->n_user_defined_cols + operation is on uniq index + */ + if (wsrep_debug) fprintf(stderr, + "BF conflict, modes: %lu %lu, " + "idx: %s-%s n_uniq %u n_user %u\n", + type_mode, lock2->type_mode, + lock2->index->name, + lock2->index->table_name, + lock2->index->n_uniq, + lock2->index->n_user_defined_cols); + return FALSE; + } + } +#endif /* WITH_WSREP */ return(TRUE); } @@ -1004,7 +1049,11 @@ lock_has_to_wait( /* If this lock request is for a supremum record then the second bit on the lock bitmap is set */ +#ifdef WITH_WSREP + return(lock_rec_has_to_wait(FALSE, lock1->trx, +#else return(lock_rec_has_to_wait(lock1->trx, +#endif /* WITH_WSREP */ lock1->type_mode, lock2, lock_rec_get_nth_bit( lock1, 1))); @@ -1454,6 +1503,11 @@ lock_rec_has_expl( return(NULL); } +#ifdef WITH_WSREP +static +void +lock_rec_discard(lock_t* in_lock); +#endif #ifdef UNIV_DEBUG /*********************************************************************//** Checks if some other transaction has a lock request in the queue. @@ -1503,6 +1557,53 @@ lock_rec_other_has_expl_req( } #endif /* UNIV_DEBUG */ +#ifdef WITH_WSREP +static void +wsrep_kill_victim(trx_t *trx, lock_t *lock) { + my_bool bf_this = wsrep_thd_is_BF(trx->mysql_thd, FALSE); + my_bool bf_other = wsrep_thd_is_BF(lock->trx->mysql_thd, TRUE); + if ((bf_this && !bf_other) || + (bf_this && bf_other && wsrep_trx_order_before( + trx->mysql_thd, lock->trx->mysql_thd))) { + + if (lock->trx->que_state == TRX_QUE_LOCK_WAIT) { + if (wsrep_debug) + fprintf(stderr, "WSREP: BF victim waiting\n"); + /* cannot release lock, until our lock + is in the queue*/ + } else if (lock->trx != trx) { + if (wsrep_log_conflicts) { + if (bf_this) + fputs("\n*** Priority TRANSACTION:\n", + stderr); + else + fputs("\n*** Victim TRANSACTION:\n", + stderr); + trx_print(stderr, trx, 3000); + + if (bf_other) + fputs("\n*** Priority TRANSACTION:\n", + stderr); + else + fputs("\n*** Victim TRANSACTION:\n", + stderr); + trx_print(stderr, lock->trx, 3000); + + fputs("*** WAITING FOR THIS LOCK TO BE GRANTED:\n", + stderr); + + if (lock_get_type(lock) == LOCK_REC) { + lock_rec_print(stderr, lock); + } else { + lock_table_print(stderr, lock); + } + } + wsrep_innobase_kill_one_trx( + trx->mysql_thd, trx, lock->trx, TRUE); + } + } +} +#endif /*********************************************************************//** Checks if some other transaction has a conflicting explicit lock request in the queue, so that we have to wait. @@ -1530,8 +1631,15 @@ lock_rec_other_has_conflicting( if (UNIV_UNLIKELY(heap_no == PAGE_HEAP_NO_SUPREMUM)) { do { - if (lock_rec_has_to_wait(trx, mode, lock, +#ifdef WITH_WSREP + if (lock_rec_has_to_wait(TRUE, trx, mode, lock, +#else + if (lock_rec_has_to_wait(trx, mode, lock, +#endif /* WITH_WSREP */ TRUE)) { +#ifdef WITH_WSREP + wsrep_kill_victim(trx, lock); +#endif return(lock); } @@ -1540,8 +1648,15 @@ lock_rec_other_has_conflicting( } else { do { - if (lock_rec_has_to_wait(trx, mode, lock, +#ifdef WITH_WSREP + if (lock_rec_has_to_wait(TRUE, trx, mode, lock, +#else + if (lock_rec_has_to_wait(trx, mode, lock, +#endif /* WITH_WSREP */ FALSE)) { +#ifdef WITH_WSREP + wsrep_kill_victim(trx, lock); +#endif return(lock); } @@ -1673,6 +1788,9 @@ static lock_t* lock_rec_create( /*============*/ +#ifdef WITH_WSREP + lock_t* c_lock, /* conflicting lock */ +#endif ulint type_mode,/*!< in: lock mode and wait flag, type is ignored and replaced by LOCK_REC */ @@ -1732,8 +1850,66 @@ lock_rec_create( /* Set the bit corresponding to rec */ lock_rec_set_nth_bit(lock, heap_no); +#ifdef WITH_WSREP + if (c_lock && wsrep_thd_is_BF(trx->mysql_thd, FALSE)) { + lock_t *hash = c_lock->hash; + lock_t *prev = NULL; + + while (hash && + wsrep_thd_is_BF(hash->trx->mysql_thd, TRUE) && + wsrep_trx_order_before( + hash->trx->mysql_thd, trx->mysql_thd)) + { + prev = hash; + hash = hash->hash; + } + lock->hash = hash; + if (prev) { + prev->hash = lock; + } else { + c_lock->hash = lock; + } + /* + * delayed conflict resolution '...kill_one_trx' was not called, + * if victim was waiting for some other lock + */ + if (c_lock->trx->que_state == TRX_QUE_LOCK_WAIT) { + c_lock->trx->was_chosen_as_deadlock_victim = TRUE; + + if (wsrep_debug && c_lock->trx->wait_lock != c_lock) { + fprintf(stderr, "WSREP: c_lock != wait lock\n"); + lock_rec_print(stderr, c_lock); + lock_rec_print(stderr, c_lock->trx->wait_lock); + } + + trx->que_state = TRX_QUE_LOCK_WAIT; + lock_set_lock_and_trx_wait(lock, trx); + + lock_cancel_waiting_and_release(c_lock->trx->wait_lock); + + /* trx might not wait for c_lock, but some other lock + does not matter if wait_lock was released above + */ + if (c_lock->trx->wait_lock == c_lock) { + lock_reset_lock_and_trx_wait(lock); + } + + if (wsrep_debug) fprintf( + stderr, + "WSREP: c_lock canceled %llu\n", + (ulonglong) c_lock->trx->id); + + /* have to bail out here to avoid lock_set_lock... */ + return(lock); + } + } else { + HASH_INSERT(lock_t, hash, lock_sys->rec_hash, + lock_rec_fold(space, page_no), lock); + } +#else HASH_INSERT(lock_t, hash, lock_sys->rec_hash, lock_rec_fold(space, page_no), lock); +#endif /* WITH_WSREP */ if (lock_is_wait_not_by_other(type_mode)) { lock_set_lock_and_trx_wait(lock, trx); @@ -1753,6 +1929,9 @@ static enum db_err lock_rec_enqueue_waiting( /*=====================*/ +#ifdef WITH_WSREP + lock_t* c_lock, /* conflicting lock */ +#endif ulint type_mode,/*!< in: lock mode this transaction is requesting: LOCK_S or LOCK_X, possibly @@ -1805,9 +1984,18 @@ lock_rec_enqueue_waiting( } if (lock == NULL) { +#ifdef WITH_WSREP + if (wsrep_on(trx->mysql_thd) && trx->was_chosen_as_deadlock_victim) { + return(DB_DEADLOCK); + } + /* Enqueue the lock request that will wait to be granted */ + lock = lock_rec_create(c_lock, type_mode | LOCK_WAIT, + block, heap_no, index, trx); +#else /* Enqueue the lock request that will wait to be granted */ lock = lock_rec_create(type_mode | LOCK_WAIT, block, heap_no, index, trx); +#endif /*WITH_WSREP */ } else { ut_ad(lock->type_mode & LOCK_WAIT); ut_ad(lock->type_mode & LOCK_CONV_BY_OTHER); @@ -1892,7 +2080,19 @@ lock_rec_add_to_queue( lock_t* other_lock = lock_rec_other_has_expl_req(mode, 0, LOCK_WAIT, block, heap_no, trx); +#ifdef WITH_WSREP + /* this can potentionally assert with wsrep */ + if (wsrep_on(trx->mysql_thd)) { + if (wsrep_debug && other_lock) { + fprintf(stderr, + "WSREP: InnoDB assert ignored\n"); + } + } else { + ut_a(!other_lock); + } +#else ut_a(!other_lock); +#endif /* WITH_WSREP */ } #endif /* UNIV_DEBUG */ @@ -1945,7 +2145,11 @@ lock_rec_add_to_queue( } somebody_waits: +#ifdef WITH_WSREP + return(lock_rec_create(NULL, type_mode, block, heap_no, index, trx)); +#else return(lock_rec_create(type_mode, block, heap_no, index, trx)); +#endif } /** Record locking request status */ @@ -2005,7 +2209,11 @@ lock_rec_lock_fast( if (lock == NULL) { if (!impl) { +#ifdef WITH_WSREP + lock_rec_create(NULL, mode, block, heap_no, index, trx); +#else lock_rec_create(mode, block, heap_no, index, trx); +#endif } return(LOCK_REC_SUCCESS_CREATED); @@ -2061,6 +2269,9 @@ lock_rec_lock_slow( que_thr_t* thr) /*!< in: query thread */ { trx_t* trx; +#ifdef WITH_WSREP + lock_t* c_lock = NULL; +#endif lock_t* lock; ut_ad(mutex_own(&kernel_mutex)); @@ -2102,7 +2313,12 @@ lock_rec_lock_slow( /* The trx already has a strong enough lock on rec: do nothing */ +#ifdef WITH_WSREP + } else if ((c_lock = lock_rec_other_has_conflicting( + mode, block, heap_no, trx))) { +#else } else if (lock_rec_other_has_conflicting(mode, block, heap_no, trx)) { +#endif /* WITH_WSREP */ /* If another transaction has a non-gap conflicting request in the queue, as this transaction does not have a lock strong @@ -2110,8 +2326,16 @@ lock_rec_lock_slow( ut_ad(lock == NULL); enqueue_waiting: +#ifdef WITH_WSREP + /* c_lock is NULL here if jump to enqueue_waiting happened + but it's ok because lock is not NULL in that case and c_lock + is not used. */ + return(lock_rec_enqueue_waiting(c_lock, mode, block, heap_no, + lock, index, thr)); +#else return(lock_rec_enqueue_waiting(mode, block, heap_no, lock, index, thr)); +#endif /* WITH_WSREP */ } else if (!impl) { /* Set the requested lock on the record */ @@ -2158,7 +2382,6 @@ lock_rec_lock( ut_ad(mode - (LOCK_MODE_MASK & mode) == LOCK_GAP || mode - (LOCK_MODE_MASK & mode) == LOCK_REC_NOT_GAP || mode - (LOCK_MODE_MASK & mode) == 0); - /* We try a simplified and faster subroutine for the most common cases */ switch (lock_rec_lock_fast(impl, mode, block, heap_no, index, thr)) { @@ -3590,6 +3813,26 @@ lock_deadlock_recursive( stderr); } #endif /* UNIV_DEBUG */ +#ifdef WITH_WSREP + if (wsrep_debug) + fputs("WSREP: Deadlock detected\n", stderr); + if ((start != wait_lock->trx) && + wsrep_thd_is_BF(start->mysql_thd, TRUE) && + wsrep_thd_is_BF( + wait_lock->trx->mysql_thd, TRUE)) + { + if (wsrep_trx_order_before( + start->mysql_thd, + wait_lock->trx->mysql_thd)) { + + wait_lock->trx->was_chosen_as_deadlock_victim = TRUE; + lock_cancel_waiting_and_release(wait_lock); + return(LOCK_VICTIM_IS_OTHER); + } else { + return(LOCK_VICTIM_IS_START); + } + } +#endif if (trx_weight_ge(wait_lock->trx, start)) { /* Our recursion starting point @@ -3597,8 +3840,23 @@ lock_deadlock_recursive( choose 'start' as the victim and roll back it */ +#ifdef WITH_WSREP + if (!wsrep_thd_is_BF( + start->mysql_thd, FALSE)) + { + return(LOCK_VICTIM_IS_START); + } +#else + return(LOCK_VICTIM_IS_START); +#endif + } +#ifdef WITH_WSREP + if (wsrep_thd_is_BF( + wait_lock->trx->mysql_thd, TRUE)) + { return(LOCK_VICTIM_IS_START); } +#endif lock_deadlock_found = TRUE; @@ -3683,6 +3941,9 @@ UNIV_INLINE lock_t* lock_table_create( /*==============*/ +#ifdef WITH_WSREP + lock_t* c_lock, /* conflicting lock */ +#endif dict_table_t* table, /*!< in: database table in dictionary cache */ ulint type_mode,/*!< in: lock mode possibly ORed with LOCK_WAIT */ @@ -3719,7 +3980,40 @@ lock_table_create( lock->un_member.tab_lock.table = table; +#ifdef WITH_WSREP + if (c_lock && wsrep_thd_is_BF(trx->mysql_thd, FALSE)) { + UT_LIST_INSERT_AFTER( + un_member.tab_lock.locks, table->locks, c_lock, lock); + } else { + UT_LIST_ADD_LAST(un_member.tab_lock.locks, table->locks, lock); + } + + if (c_lock && c_lock->trx->que_state == TRX_QUE_LOCK_WAIT) { + if (wsrep_debug) { + fprintf(stderr, + "WSREP: table c_lock in wait: %llu new loc: %llu\n", + (ulonglong) c_lock->trx->id, lock->trx->id); + } + + c_lock->trx->was_chosen_as_deadlock_victim = TRUE; + lock_cancel_waiting_and_release(c_lock->trx->wait_lock); + + /* trx might not wait for c_lock, but some other lock + does not matter if wait_lock was released above + */ + if (c_lock->trx->wait_lock == c_lock) { + lock_reset_lock_and_trx_wait(lock); + } + + if (wsrep_debug) { + fprintf(stderr, "WSREP: c_lock canceled %llu\n", + (ulonglong) c_lock->trx->id); + } + } + +#else UT_LIST_ADD_LAST(un_member.tab_lock.locks, table->locks, lock); +#endif if (UNIV_UNLIKELY(type_mode & LOCK_WAIT)) { @@ -3865,6 +4159,9 @@ static ulint lock_table_enqueue_waiting( /*=======================*/ +#ifdef WITH_WSREP + lock_t* c_lock, /* conflicting lock */ +#endif ulint mode, /*!< in: lock mode this transaction is requesting */ dict_table_t* table, /*!< in: table */ @@ -3906,7 +4203,14 @@ lock_table_enqueue_waiting( /* Enqueue the lock request that will wait to be granted */ +#ifdef WITH_WSREP + if (trx->was_chosen_as_deadlock_victim) { + return(DB_DEADLOCK); + } + lock = lock_table_create(c_lock, table, mode | LOCK_WAIT, trx); +#else lock = lock_table_create(table, mode | LOCK_WAIT, trx); +#endif /* Check if a deadlock occurs: if yes, remove the lock request and return an error code */ @@ -3964,7 +4268,11 @@ lock_table_other_has_incompatible( if ((lock->trx != trx) && (!lock_mode_compatible(lock_get_mode(lock), mode)) && (wait || !(lock_get_wait(lock)))) { - +#ifdef WITH_WSREP + if (wsrep_debug) + fprintf(stderr, "WSREP: table lock abort"); + wsrep_kill_victim((trx_t *)trx, (lock_t *)lock); +#endif return(lock); } @@ -3988,6 +4296,9 @@ lock_table( enum lock_mode mode, /*!< in: lock mode */ que_thr_t* thr) /*!< in: query thread */ { +#ifdef WITH_WSREP + lock_t *c_lock; +#endif trx_t* trx; ulint err; @@ -4016,19 +4327,32 @@ lock_table( /* We have to check if the new lock is compatible with any locks other transactions have in the table lock queue. */ +#ifdef WITH_WSREP + if ((c_lock = (lock_t *)lock_table_other_has_incompatible( + trx, LOCK_WAIT, table, mode))) { +#else if (lock_table_other_has_incompatible(trx, LOCK_WAIT, table, mode)) { +#endif /* Another trx has a request on the table in an incompatible mode: this trx may have to wait */ +#ifdef WITH_WSREP + err = lock_table_enqueue_waiting(c_lock, mode | flags, table, thr); +#else err = lock_table_enqueue_waiting(mode | flags, table, thr); +#endif lock_mutex_exit_kernel(); return(err); } +#ifdef WITH_WSREP + lock_table_create(c_lock, table, mode | flags, trx); +#else lock_table_create(table, mode | flags, trx); +#endif ut_a(!flags || mode == LOCK_S || mode == LOCK_X); @@ -4946,6 +5270,7 @@ lock_rec_queue_validate( if (!lock_rec_get_gap(lock) && !lock_get_wait(lock)) { +#ifndef WITH_WSREP enum lock_mode mode; if (lock_get_mode(lock) == LOCK_S) { @@ -4955,6 +5280,7 @@ lock_rec_queue_validate( } ut_a(!lock_rec_other_has_expl_req( mode, 0, 0, block, heap_no, lock->trx)); +#endif /* WITH_WSREP */ } else if (lock_get_wait(lock) && !lock_rec_get_gap(lock)) { @@ -5231,6 +5557,9 @@ lock_rec_insert_check_and_lock( lock_t* lock; ulint err; ulint next_rec_heap_no; +#ifdef WITH_WSREP + lock_t *c_lock; +#endif ut_ad(block->frame == page_align(rec)); @@ -5283,15 +5612,28 @@ lock_rec_insert_check_and_lock( had to wait for their insert. Both had waiting gap type lock requests on the successor, which produced an unnecessary deadlock. */ +#ifdef WITH_WSREP + if ((c_lock = lock_rec_other_has_conflicting( + LOCK_X | LOCK_GAP | LOCK_INSERT_INTENTION, + block, next_rec_heap_no, trx))) { +#else if (lock_rec_other_has_conflicting( LOCK_X | LOCK_GAP | LOCK_INSERT_INTENTION, block, next_rec_heap_no, trx)) { +#endif /* Note that we may get DB_SUCCESS also here! */ +#ifdef WITH_WSREP + err = lock_rec_enqueue_waiting(c_lock, LOCK_X | LOCK_GAP + | LOCK_INSERT_INTENTION, + block, next_rec_heap_no, + NULL, index, thr); +#else err = lock_rec_enqueue_waiting(LOCK_X | LOCK_GAP | LOCK_INSERT_INTENTION, block, next_rec_heap_no, NULL, index, thr); +#endif /* WITH_WSREP */ } else { err = DB_SUCCESS; } @@ -5375,6 +5717,11 @@ lock_rec_convert_impl_to_expl( implicit lock. Because cannot lock at this moment.*/ if (rec_get_deleted_flag(rec, rec_offs_comp(offsets)) +#ifdef WITH_WSREP + && !wsrep_thd_is_BF(impl_trx->mysql_thd, FALSE) + /* BF-BF conflict is possible if advancing into + lock_rec_other_has_conflicting*/ +#endif /* WITH_WSREP */ && lock_rec_other_has_conflicting( LOCK_X | LOCK_REC_NOT_GAP, block, heap_no, impl_trx)) { diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c index 6c7f4a25bedf..f25d883ab6db 100644 --- a/storage/innobase/os/os0file.c +++ b/storage/innobase/os/os0file.c @@ -89,6 +89,12 @@ UNIV_INTERN os_mutex_t os_file_seek_mutexes[OS_FILE_N_SEEK_MUTEXES]; /* In simulated aio, merge at most this many consecutive i/os */ #define OS_AIO_MERGE_N_CONSECUTIVE 64 +#ifdef WITH_INNODB_DISALLOW_WRITES +#define WAIT_ALLOW_WRITES() os_event_wait(srv_allow_writes_event) +#else +#define WAIT_ALLOW_WRITES() do { } while (0) +#endif /* WITH_INNODB_DISALLOW_WRITES */ + /********************************************************************** InnoDB AIO Implementation: @@ -726,7 +732,9 @@ os_file_create_tmpfile(void) /*========================*/ { FILE* file = NULL; - int fd = innobase_mysql_tmpfile(); + int fd; + WAIT_ALLOW_WRITES(); + fd = innobase_mysql_tmpfile(); if (fd >= 0) { file = fdopen(fd, "w+b"); @@ -1045,6 +1053,7 @@ os_file_create_directory( return (TRUE); #else int rcode; + WAIT_ALLOW_WRITES(); rcode = mkdir(pathname, 0770); @@ -1146,6 +1155,8 @@ os_file_create_simple_func( os_file_t file; int create_flag; ibool retry; + if (create_mode != OS_FILE_OPEN && create_mode != OS_FILE_OPEN_RAW) + WAIT_ALLOW_WRITES(); try_again: ut_a(name); @@ -1278,6 +1289,8 @@ os_file_create_simple_no_error_handling_func( int create_flag; ut_a(name); + if (create_mode != OS_FILE_OPEN && create_mode != OS_FILE_OPEN_RAW) + WAIT_ALLOW_WRITES(); if (create_mode == OS_FILE_OPEN) { if (access_type == OS_FILE_READ_ONLY) { @@ -1518,6 +1531,8 @@ os_file_create_func( int create_flag; ibool retry; const char* mode_str = NULL; + if (create_mode != OS_FILE_OPEN && create_mode != OS_FILE_OPEN_RAW) + WAIT_ALLOW_WRITES(); DBUG_EXECUTE_IF( "ib_create_table_fail_disk_full", @@ -1680,6 +1695,7 @@ os_file_delete_if_exists( goto loop; #else int ret; + WAIT_ALLOW_WRITES(); ret = unlink(name); @@ -1743,6 +1759,7 @@ os_file_delete( goto loop; #else int ret; + WAIT_ALLOW_WRITES(); ret = unlink(name); @@ -1783,6 +1800,7 @@ os_file_rename_func( return(FALSE); #else int ret; + WAIT_ALLOW_WRITES(); ret = rename(oldpath, newpath); @@ -2046,6 +2064,7 @@ os_file_set_eof( HANDLE h = (HANDLE) _get_osfhandle(fileno(file)); return(SetEndOfFile(h)); #else /* __WIN__ */ + WAIT_ALLOW_WRITES(); return(!ftruncate(fileno(file), ftell(file))); #endif /* __WIN__ */ } @@ -2140,6 +2159,7 @@ os_file_flush_func( return(FALSE); #else int ret; + WAIT_ALLOW_WRITES(); #if defined(HAVE_DARWIN_THREADS) # ifndef F_FULLFSYNC @@ -2832,6 +2852,7 @@ os_file_write_func( return(FALSE); #else ssize_t ret; + WAIT_ALLOW_WRITES(); ret = os_file_pwrite(file, buf, n, offset, offset_high); diff --git a/storage/innobase/rem/rem0rec.c b/storage/innobase/rem/rem0rec.c index d938aa696dd3..cb4e8ca1cb1f 100644 --- a/storage/innobase/rem/rem0rec.c +++ b/storage/innobase/rem/rem0rec.c @@ -31,6 +31,9 @@ Created 5/30/1994 Heikki Tuuri #include "mtr0mtr.h" #include "mtr0log.h" +#ifdef WITH_WSREP +#include +#endif /* WITH_WSREP */ /* PHYSICAL RECORD (OLD STYLE) =========================== @@ -1897,3 +1900,133 @@ rec_print( } } #endif /* !UNIV_HOTBACKUP */ +#ifdef WITH_WSREP +int +wsrep_rec_get_foreign_key( + byte *buf, /* out: extracted key */ + ulint *buf_len, /* in/out: length of buf */ + const rec_t* rec, /* in: physical record */ + dict_index_t* index_for, /* in: index in foreign table */ + dict_index_t* index_ref, /* in: index in referenced table */ + ibool new_protocol) /* in: protocol > 1 */ +{ + const byte* data; + ulint len; + ulint key_len = 0; + ulint i; + uint key_parts; + mem_heap_t* heap = NULL; + ulint offsets_[REC_OFFS_NORMAL_SIZE]; + const ulint* offsets; + + ut_ad(index_for); + ut_ad(index_ref); + + rec_offs_init(offsets_); + offsets = rec_get_offsets(rec, index_for, offsets_, + ULINT_UNDEFINED, &heap); + + ut_ad(rec_offs_validate(rec, NULL, offsets)); + + ut_ad(rec); + + key_parts = dict_index_get_n_unique_in_tree(index_for); + for (i = 0; + i < key_parts && + (index_for->type & DICT_CLUSTERED || i < key_parts - 1); + i++) { + dict_field_t* field_f = + dict_index_get_nth_field(index_for, i); + const dict_col_t* col_f = dict_field_get_col(field_f); + dict_field_t* field_r = + dict_index_get_nth_field(index_ref, i); + const dict_col_t* col_r = dict_field_get_col(field_r); + + data = rec_get_nth_field(rec, offsets, i, &len); + if (key_len + ((len != UNIV_SQL_NULL) ? len + 1 : 1) > + *buf_len) { + fprintf (stderr, + "WSREP: FK key len exceeded %lu %lu %lu\n", + key_len, len, *buf_len); + goto err_out; + } + + if (len == UNIV_SQL_NULL) { + ut_a(!(col_f->prtype & DATA_NOT_NULL)); + *buf++ = 1; + key_len++; + } else if (!new_protocol) { + if (!(col_r->prtype & DATA_NOT_NULL)) { + *buf++ = 0; + key_len++; + } + memcpy(buf, data, len); + *buf_len = wsrep_innobase_mysql_sort( + (int)(col_f->prtype & DATA_MYSQL_TYPE_MASK), + (uint)dtype_get_charset_coll(col_f->prtype), + buf, len, *buf_len); + } else { /* new protocol */ + if (!(col_r->prtype & DATA_NOT_NULL)) { + *buf++ = 0; + key_len++; + } + switch (col_f->mtype) { + case DATA_INT: { + byte* ptr = buf+len; + for (;;) { + ptr--; + *ptr = *data; + if (ptr == buf) { + break; + } + data++; + } + + if (!(col_f->prtype & DATA_UNSIGNED)) { + buf[len-1] = (byte) (buf[len-1] ^ 128); + } + + break; + } + case DATA_VARCHAR: + case DATA_VARMYSQL: + case DATA_CHAR: + case DATA_MYSQL: + /* Copy the actual data */ + ut_memcpy(buf, data, len); + len = wsrep_innobase_mysql_sort( + (int) + (col_f->prtype & DATA_MYSQL_TYPE_MASK), + (uint) + dtype_get_charset_coll(col_f->prtype), + buf, len, *buf_len); + break; + case DATA_BLOB: + case DATA_BINARY: + memcpy(buf, data, len); + break; + default: + break; + } + + key_len += len; + buf += len; + } + } + + rec_validate(rec, offsets); + + if (UNIV_LIKELY_NULL(heap)) { + mem_heap_free(heap); + } + + *buf_len = key_len; + return DB_SUCCESS; + + err_out: + if (UNIV_LIKELY_NULL(heap)) { + mem_heap_free(heap); + } + return DB_ERROR; +} +#endif // WITH_WSREP diff --git a/storage/innobase/row/row0ins.c b/storage/innobase/row/row0ins.c index 5bdaf4b722b1..c380390d62ae 100644 --- a/storage/innobase/row/row0ins.c +++ b/storage/innobase/row/row0ins.c @@ -759,6 +759,14 @@ row_ins_invalidate_query_cache( innobase_invalidate_query_cache(thr_get_trx(thr), buf, len); mem_free(buf); } +#ifdef WITH_WSREP +ulint wsrep_append_foreign_key(trx_t *trx, + dict_foreign_t* foreign, + const rec_t* clust_rec, + dict_index_t* clust_index, + ibool referenced, + ibool shared); +#endif /* WITH_WSREP */ /*********************************************************************//** Perform referential actions or checks when a parent row is deleted or updated @@ -1072,6 +1080,18 @@ row_ins_foreign_check_on_constraint( cascade->state = UPD_NODE_UPDATE_CLUSTERED; +#ifdef WITH_WSREP + err = wsrep_append_foreign_key( + thr_get_trx(thr), + foreign, + clust_rec, + clust_index, + FALSE, FALSE); + if (err != DB_SUCCESS) { + fprintf(stderr, + "WSREP: foreign key append failed: %lu\n", err); + } else +#endif err = row_update_cascade_for_mysql(thr, cascade, foreign->foreign_table); @@ -1405,7 +1425,14 @@ row_ins_check_foreign_constraint( if (check_ref) { err = DB_SUCCESS; - +#ifdef WITH_WSREP + err = wsrep_append_foreign_key( + thr_get_trx(thr), + foreign, + rec, + check_index, + check_ref, TRUE); +#endif /* WITH_WSREP */ goto end_scan; } else if (foreign->type != 0) { /* There is an ON UPDATE or ON DELETE diff --git a/storage/innobase/row/row0upd.c b/storage/innobase/row/row0upd.c index 825902c4ff29..4a44c2722b00 100644 --- a/storage/innobase/row/row0upd.c +++ b/storage/innobase/row/row0upd.c @@ -51,6 +51,10 @@ Created 12/27/1996 Heikki Tuuri #include "pars0sym.h" #include "eval0eval.h" #include "buf0lru.h" +#ifdef WITH_WSREP +#include "ha_prototypes.h" +extern my_bool wsrep_debug; +#endif /* What kind of latch and lock can we assume when the control comes to @@ -170,6 +174,50 @@ row_upd_index_is_referenced( return(is_referenced); } +#ifdef WITH_WSREP +static +ibool +wsrep_row_upd_index_is_foreign( +/*========================*/ + dict_index_t* index, /*!< in: index */ + trx_t* trx) /*!< in: transaction */ +{ + dict_table_t* table = index->table; + dict_foreign_t* foreign; + ibool froze_data_dict = FALSE; + ibool is_referenced = FALSE; + + if (!UT_LIST_GET_FIRST(table->foreign_list)) { + + return(FALSE); + } + + if (trx->dict_operation_lock_mode == 0) { + row_mysql_freeze_data_dictionary(trx); + froze_data_dict = TRUE; + } + + foreign = UT_LIST_GET_FIRST(table->foreign_list); + + while (foreign) { + if (foreign->foreign_index == index) { + + is_referenced = TRUE; + goto func_exit; + } + + foreign = UT_LIST_GET_NEXT(foreign_list, foreign); + } + +func_exit: + if (froze_data_dict) { + row_mysql_unfreeze_data_dictionary(trx); + } + + return(is_referenced); +} +#endif /* WITH_WSREP */ + /*********************************************************************//** Checks if possible foreign key constraints hold after a delete of the record under pcur. @@ -241,7 +289,7 @@ row_upd_check_references_constraints( if (foreign->foreign_table == NULL) { dict_table_get(foreign->foreign_table_name_lookup, - FALSE, + FALSE, DICT_ERR_IGNORE_NONE); } @@ -284,7 +332,127 @@ row_upd_check_references_constraints( } err = DB_SUCCESS; +func_exit: + if (got_s_lock) { + row_mysql_unfreeze_data_dictionary(trx); + } + + mem_heap_free(heap); + + return(err); +} +#ifdef WITH_WSREP +static +ulint +wsrep_row_upd_check_foreign_constraints( +/*=================================*/ + upd_node_t* node, /*!< in: row update node */ + btr_pcur_t* pcur, /*!< in: cursor positioned on a record; NOTE: the + cursor position is lost in this function! */ + dict_table_t* table, /*!< in: table in question */ + dict_index_t* index, /*!< in: index of the cursor */ + ulint* offsets,/*!< in/out: rec_get_offsets(pcur.rec, index) */ + que_thr_t* thr, /*!< in: query thread */ + mtr_t* mtr) /*!< in: mtr */ +{ + dict_foreign_t* foreign; + mem_heap_t* heap; + dtuple_t* entry; + trx_t* trx; + const rec_t* rec; + ulint n_ext; + ulint err; + ibool got_s_lock = FALSE; + + if (UT_LIST_GET_FIRST(table->foreign_list) == NULL) { + + return(DB_SUCCESS); + } + + trx = thr_get_trx(thr); + if (wsrep_thd_is_BF(trx->mysql_thd, FALSE)) { + + return(DB_SUCCESS); + } + + /* TODO: make native slave thread bail out here */ + + rec = btr_pcur_get_rec(pcur); + ut_ad(rec_offs_validate(rec, index, offsets)); + heap = mem_heap_create(500); + + entry = row_rec_to_index_entry(ROW_COPY_DATA, rec, index, offsets, + &n_ext, heap); + + mtr_commit(mtr); + + mtr_start(mtr); + + if (trx->dict_operation_lock_mode == 0) { + got_s_lock = TRUE; + + row_mysql_freeze_data_dictionary(trx); + } + + foreign = UT_LIST_GET_FIRST(table->foreign_list); + + while (foreign) { + /* Note that we may have an update which updates the index + record, but does NOT update the first fields which are + referenced in a foreign key constraint. Then the update does + NOT break the constraint. */ + + if (foreign->foreign_index == index + && (node->is_delete + || row_upd_changes_first_fields_binary( + entry, index, node->update, + foreign->n_fields))) { + + if (foreign->referenced_table == NULL) { + dict_table_get(foreign->referenced_table_name_lookup, + FALSE, DICT_ERR_IGNORE_NONE); + } + + if (foreign->referenced_table) { + mutex_enter(&(dict_sys->mutex)); + + (foreign->referenced_table + ->n_foreign_key_checks_running)++; + + mutex_exit(&(dict_sys->mutex)); + } + + /* NOTE that if the thread ends up waiting for a lock + we will release dict_operation_lock temporarily! + But the counter on the table protects 'foreign' from + being dropped while the check is running. */ + + err = row_ins_check_foreign_constraint( + TRUE, foreign, table, entry, thr); + + if (foreign->referenced_table) { + mutex_enter(&(dict_sys->mutex)); + + ut_a(foreign->referenced_table + ->n_foreign_key_checks_running > 0); + + (foreign->referenced_table + ->n_foreign_key_checks_running)--; + + mutex_exit(&(dict_sys->mutex)); + } + + if (err != DB_SUCCESS) { + + goto func_exit; + } + } + + foreign = UT_LIST_GET_NEXT(foreign_list, foreign); + } + + err = DB_SUCCESS; func_exit: if (got_s_lock) { row_mysql_unfreeze_data_dictionary(trx); @@ -294,6 +462,7 @@ row_upd_check_references_constraints( return(err); } +#endif /* WITH_WSREP */ /*********************************************************************//** Creates an update node for a query graph. @@ -1564,10 +1733,16 @@ row_upd_sec_index_entry( trx_t* trx = thr_get_trx(thr); ulint mode = BTR_MODIFY_LEAF; enum row_search_result search_result; +#ifdef WITH_WSREP + ibool foreign; +#endif /* WITH_WSREP */ index = node->index; referenced = row_upd_index_is_referenced(index, trx); +#ifdef WITH_WSREP + foreign = wsrep_row_upd_index_is_foreign(index, trx); +#endif /* WITH_WSREP */ heap = mem_heap_create(1024); @@ -1630,6 +1805,9 @@ row_upd_sec_index_entry( if (!rec_get_deleted_flag( rec, dict_table_is_comp(index->table))) { +#ifdef WITH_WSREP + que_node_t *parent = que_node_get_parent(node); +#endif /* WITH_WSREP */ err = btr_cur_del_mark_set_sec_rec( 0, btr_cur, TRUE, thr, &mtr); @@ -1647,6 +1825,38 @@ row_upd_sec_index_entry( node, &pcur, index->table, index, offsets, thr, &mtr); } +#ifdef WITH_WSREP + if (err == DB_SUCCESS && !referenced && + !(parent && que_node_get_type(parent) == + QUE_NODE_UPDATE && + ((upd_node_t*)parent)->cascade_node == node) && + foreign + ) { + ulint* offsets = + rec_get_offsets( + rec, index, NULL, + ULINT_UNDEFINED, &heap); + err = wsrep_row_upd_check_foreign_constraints( + node, &pcur, index->table, + index, offsets, thr, &mtr); + switch (err) { + case DB_SUCCESS: + case DB_NO_REFERENCED_ROW: + err = DB_SUCCESS; + break; + case DB_DEADLOCK: + if (wsrep_debug) + fprintf (stderr, + "WSREP: sec index FK check fail for deadlock"); + break; + default: + fprintf (stderr, + "WSREP: referenced FK check fail: %lu", + err); + break; + } + } +#endif /* WITH_WSREP */ } break; } @@ -1797,6 +2007,9 @@ row_upd_clust_rec_by_insert( que_thr_t* thr, /*!< in: query thread */ ibool referenced,/*!< in: TRUE if index may be referenced in a foreign key constraint */ +#ifdef WITH_WSREP + ibool foreign, /*!< in: TRUE if index is foreign key index */ +#endif /* WITH_WSREP */ mtr_t* mtr) /*!< in/out: mtr; gets committed here */ { mem_heap_t* heap; @@ -1810,6 +2023,9 @@ row_upd_clust_rec_by_insert( rec_t* rec; ulint* offsets = NULL; +#ifdef WITH_WSREP + que_node_t *parent = que_node_get_parent(node); +#endif /* WITH_WSREP */ ut_ad(node); ut_ad(dict_index_is_clust(index)); @@ -1892,6 +2108,34 @@ row_upd_clust_rec_by_insert( goto err_exit; } } +#ifdef WITH_WSREP + if (!referenced && + !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE && + ((upd_node_t*)parent)->cascade_node == node) && + foreign + ) { + err = wsrep_row_upd_check_foreign_constraints( + node, pcur, table, index, offsets, thr, mtr); + switch (err) { + case DB_SUCCESS: + case DB_NO_REFERENCED_ROW: + err = DB_SUCCESS; + break; + case DB_DEADLOCK: + if (wsrep_debug) fprintf (stderr, + "WSREP: insert FK check fail for deadlock"); + break; + default: + fprintf (stderr, + "WSREP: referenced FK check fail: %lu", + err); + break; + } + if (err != DB_SUCCESS) { + goto err_exit; + } + } +#endif /* WITH_WSREP */ } mtr_commit(mtr); @@ -2060,11 +2304,18 @@ row_upd_del_mark_clust_rec( ibool referenced, /*!< in: TRUE if index may be referenced in a foreign key constraint */ +#ifdef WITH_WSREP + ibool foreign,/*!< in: TRUE if index is foreign key index */ +#endif /* WITH_WSREP */ mtr_t* mtr) /*!< in: mtr; gets committed here */ { btr_pcur_t* pcur; btr_cur_t* btr_cur; ulint err; +#ifdef WITH_WSREP + rec_t* rec; + que_node_t *parent = que_node_get_parent(node); +#endif /* WITH_WSREP */ ut_ad(node); ut_ad(dict_index_is_clust(index)); @@ -2081,15 +2332,49 @@ row_upd_del_mark_clust_rec( /* Mark the clustered index record deleted; we do not have to check locks, because we assume that we have an x-lock on the record */ +#ifdef WITH_WSREP + rec = btr_cur_get_rec(btr_cur); +#endif /* WITH_WSREP */ + err = btr_cur_del_mark_set_clust_rec( BTR_NO_LOCKING_FLAG, btr_cur_get_block(btr_cur), +#ifdef WITH_WSREP + rec, index, offsets, TRUE, thr, mtr); +#else btr_cur_get_rec(btr_cur), index, offsets, TRUE, thr, mtr); +#endif /* WITH_WSREP */ if (err == DB_SUCCESS && referenced) { /* NOTE that the following call loses the position of pcur ! */ err = row_upd_check_references_constraints( node, pcur, index->table, index, offsets, thr, mtr); } +#ifdef WITH_WSREP + if (err == DB_SUCCESS && !referenced && + !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE && + ((upd_node_t*)parent)->cascade_node == node) && + thr_get_trx(thr) && + foreign + ) { + err = wsrep_row_upd_check_foreign_constraints( + node, pcur, index->table, index, offsets, thr, mtr); + switch (err) { + case DB_SUCCESS: + case DB_NO_REFERENCED_ROW: + err = DB_SUCCESS; + break; + case DB_DEADLOCK: + if (wsrep_debug) fprintf (stderr, + "WSREP: clust rec FK check fail for deadlock"); + break; + default: + fprintf (stderr, + "WSREP: clust rec referenced FK check fail: %lu", + err); + break; + } + } +#endif /* WITH_WSREP */ mtr_commit(mtr); @@ -2118,11 +2403,17 @@ row_upd_clust_step( ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets; ibool referenced; +#ifdef WITH_WSREP + ibool foreign; +#endif /* WITH_WSREP */ rec_offs_init(offsets_); index = dict_table_get_first_index(node->table); referenced = row_upd_index_is_referenced(index, thr_get_trx(thr)); +#ifdef WITH_WSREP + foreign = wsrep_row_upd_index_is_foreign(index, thr_get_trx(thr)); +#endif /* WITH_WSREP */ pcur = node->pcur; @@ -2192,7 +2483,11 @@ row_upd_clust_step( if (node->is_delete) { err = row_upd_del_mark_clust_rec( +#ifdef WITH_WSREP + node, index, offsets, thr, referenced, foreign, mtr); +#else node, index, offsets, thr, referenced, mtr); +#endif /* WITH_WSREP */ if (err == DB_SUCCESS) { node->state = UPD_NODE_UPDATE_ALL_SEC; @@ -2243,7 +2538,11 @@ row_upd_clust_step( externally! */ err = row_upd_clust_rec_by_insert( +#ifdef WITH_WSREP + node, index, thr, referenced, foreign, mtr); +#else node, index, thr, referenced, mtr); +#endif /* WITH_WSREP */ if (err != DB_SUCCESS) { diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index 573488bebca3..8fd517701e39 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -89,6 +89,10 @@ Created 10/8/1995 Heikki Tuuri #include "mysql/plugin.h" #include "mysql/service_thd_wait.h" +#ifdef WITH_WSREP +extern int wsrep_debug; +extern int wsrep_trx_is_aborting(void *thd_ptr); +#endif /* The following counter is incremented whenever there is some user activity in the server */ UNIV_INTERN ulint srv_activity_count = 0; @@ -201,6 +205,10 @@ srv_printf_innodb_monitor() will request mutex acquisition with mutex_enter(), which will wait until it gets the mutex. */ #define MUTEX_NOWAIT(mutex_skipped) ((mutex_skipped) < MAX_MUTEX_NOWAIT) +#ifdef WITH_INNODB_DISALLOW_WRITES +UNIV_INTERN os_event_t srv_allow_writes_event; +#endif /* WITH_INNODB_DISALLOW_WRITES */ + /** The sort order table of the MySQL latin1_swedish_ci character set collation */ UNIV_INTERN const byte* srv_latin1_ordering; @@ -374,6 +382,9 @@ struct srv_conc_slot_struct{ free to proceed; but reserved may still be TRUE at that point */ +#ifdef WITH_WSREP + void *thd; /*!< to see priority */ +#endif UT_LIST_NODE_T(srv_conc_slot_t) srv_conc_queue; /*!< queue node */ }; @@ -1081,8 +1092,20 @@ srv_init(void) conc_slot->reserved = FALSE; conc_slot->event = os_event_create(NULL); ut_a(conc_slot->event); +#ifdef WITH_WSREP + conc_slot->thd = NULL; +#endif /* WITH_WSREP */ } +#ifdef WITH_INNODB_DISALLOW_WRITES + /* Writes have to be enabled on init or else we hang. Thus, we + always set the event here regardless of innobase_disallow_writes. + That flag will always be 0 at this point because it isn't settable + via my.cnf or command line arg. */ + srv_allow_writes_event = os_event_create(NULL); + os_event_set(srv_allow_writes_event); +#endif /* WITH_INNODB_DISALLOW_WRITES */ + /* Initialize some INFORMATION SCHEMA internal structures */ trx_i_s_cache_init(trx_i_s_cache); } @@ -1131,6 +1154,23 @@ srv_general_init(void) /* Maximum allowable purge history length. <=0 means 'infinite'. */ UNIV_INTERN ulong srv_max_purge_lag = 0; +#ifdef WITH_WSREP +UNIV_INTERN +void +wsrep_srv_conc_cancel_wait( +/*==================*/ + trx_t* trx) /*!< in: transaction object associated with the + thread */ +{ + os_fast_mutex_lock(&srv_conc_mutex); + if (trx->wsrep_event) { + if (wsrep_debug) + fprintf(stderr, "WSREP: conc slot cancel\n"); + os_event_set(trx->wsrep_event); + } + os_fast_mutex_unlock(&srv_conc_mutex); +} +#endif /* WITH_WSREP */ /*********************************************************************//** Puts an OS thread to wait if there are too many concurrent threads (>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. */ @@ -1168,6 +1208,18 @@ srv_conc_enter_innodb( return; } +#ifdef WITH_WSREP + if (wsrep_on(trx->mysql_thd) && + wsrep_thd_is_BF(trx->mysql_thd, FALSE)) { + srv_conc_force_enter_innodb(trx); + return; + } + if (wsrep_on(trx->mysql_thd) && + wsrep_trx_is_aborting(trx->mysql_thd)) { + srv_conc_force_enter_innodb(trx); + return; + } +#endif os_fast_mutex_lock(&srv_conc_mutex); retry: if (trx->declared_to_be_inside_innodb) { @@ -1260,6 +1312,9 @@ srv_conc_enter_innodb( /* Add to the queue */ slot->reserved = TRUE; slot->wait_ended = FALSE; +#ifdef WITH_WSREP + slot->thd = trx->mysql_thd; +#endif UT_LIST_ADD_LAST(srv_conc_queue, srv_conc_queue, slot); @@ -1267,6 +1322,19 @@ srv_conc_enter_innodb( srv_conc_n_waiting_threads++; +#ifdef WITH_WSREP + if (wsrep_on(trx->mysql_thd) && + wsrep_trx_is_aborting(trx->mysql_thd)) { + srv_conc_n_waiting_threads--; + os_fast_mutex_unlock(&srv_conc_mutex); + if (wsrep_debug) + fprintf(stderr, "srv_conc_enter due to MUST_ABORT"); + trx->declared_to_be_inside_innodb = TRUE; + trx->n_tickets_to_enter_innodb = SRV_FREE_TICKETS_TO_ENTER; + return; + } + trx->wsrep_event = slot->event; +#endif /* WITH_WSREP */ os_fast_mutex_unlock(&srv_conc_mutex); /* Go to wait for the event; when a thread leaves InnoDB it will @@ -1281,6 +1349,9 @@ srv_conc_enter_innodb( thd_wait_begin(trx->mysql_thd, THD_WAIT_USER_LOCK); os_event_wait(slot->event); thd_wait_end(trx->mysql_thd); +#ifdef WITH_WSREP + trx->wsrep_event = NULL; +#endif /* WITH_WSREP */ trx->op_info = ""; @@ -1292,6 +1363,9 @@ srv_conc_enter_innodb( incremented the thread counter on behalf of this thread */ slot->reserved = FALSE; +#ifdef WITH_WSREP + slot->thd = NULL; +#endif UT_LIST_REMOVE(srv_conc_queue, srv_conc_queue, slot); @@ -1362,6 +1436,9 @@ srv_conc_force_exit_innodb( trx->n_tickets_to_enter_innodb = 0; if (srv_conc_n_threads < (lint)srv_thread_concurrency) { +#ifdef WITH_WSREP + srv_conc_slot_t* wsrep_slot; +#endif /* Look for a slot where a thread is waiting and no other thread has yet released the thread */ @@ -1371,6 +1448,19 @@ srv_conc_force_exit_innodb( slot = UT_LIST_GET_NEXT(srv_conc_queue, slot); } +#ifdef WITH_WSREP + /* look for aborting trx, they must be released asap */ + wsrep_slot= slot; + while (wsrep_slot && (wsrep_slot->wait_ended == TRUE || + !wsrep_trx_is_aborting(wsrep_slot->thd))) { + wsrep_slot = UT_LIST_GET_NEXT(srv_conc_queue, wsrep_slot); + } + if (wsrep_slot) { + slot = wsrep_slot; + if (wsrep_debug) + fprintf(stderr, "WSREP: releasing aborting thd\n"); + } +#endif if (slot != NULL) { slot->wait_ended = TRUE; @@ -1748,7 +1838,20 @@ srv_suspend_mysql_thread( if (lock_wait_timeout < 100000000 && wait_time > (double) lock_wait_timeout) { +#ifdef WITH_WSREP + if (wsrep_on(trx->mysql_thd) && + wsrep_thd_is_BF(trx->mysql_thd, TRUE)) { + fprintf(stderr, + "WSREP: BF long lock wait ended after %.f sec\n", + wait_time); + srv_print_innodb_monitor = FALSE; + srv_print_innodb_lock_monitor = FALSE; + } else { +#endif trx->error_state = DB_LOCK_WAIT_TIMEOUT; +#ifdef WITH_WSREP + } +#endif } if (trx_is_interrupted(trx)) { @@ -2303,6 +2406,27 @@ srv_monitor_thread( OS_THREAD_DUMMY_RETURN; } +#ifdef WITH_WSREP +/*********************************************************************//** +check if lock timeout was for priority thread, +as a side effect trigger lock monitor +@return false for regular lock timeout */ +static ibool +wsrep_is_BF_lock_timeout( +/*====================*/ + srv_slot_t* slot) /* in: lock slot to check for lock priority */ +{ + if (wsrep_on(thr_get_trx(slot->thr)->mysql_thd) && + wsrep_thd_is_BF((thr_get_trx(slot->thr))->mysql_thd, TRUE)) { + fprintf(stderr, "WSREP: BF lock wait long\n"); + srv_print_innodb_monitor = TRUE; + srv_print_innodb_lock_monitor = TRUE; + os_event_set(srv_lock_timeout_thread_event); + return TRUE; + } + return FALSE; + } +#endif /* WITH_WSREP */ /*********************************************************************//** A thread which wakes up threads whose lock wait may have lasted too long. @return a dummy parameter */ @@ -2371,8 +2495,14 @@ srv_lock_timeout_thread( granted: in that case do nothing */ if (trx->wait_lock) { +#ifdef WITH_WSREP + if (!wsrep_is_BF_lock_timeout(slot)) { +#endif lock_cancel_waiting_and_release( trx->wait_lock); +#ifdef WITH_WSREP + } +#endif } } } @@ -2489,7 +2619,20 @@ srv_error_monitor_thread( if (sync_array_print_long_waits(&waiter, &sema) && sema == old_sema && os_thread_eq(waiter, old_waiter)) { +#if defined(WITH_WSREP) && defined(WITH_INNODB_DISALLOW_WRITES) + if (srv_allow_writes_event->is_set) { +#endif /* WITH_WSREP */ fatal_cnt++; +#if defined(WITH_WSREP) && defined(WITH_INNODB_DISALLOW_WRITES) + } else { + fprintf(stderr, + "WSREP: avoiding InnoDB self crash due to long " + "semaphore wait of > %lu seconds\n" + "Server is processing SST donor operation, " + "fatal_cnt now: %lu", + (ulong) srv_fatal_semaphore_wait_threshold, fatal_cnt); + } +#endif /* WITH_WSREP */ if (fatal_cnt > 10) { fprintf(stderr, diff --git a/storage/innobase/trx/trx0roll.c b/storage/innobase/trx/trx0roll.c index ffd7bb3d1469..d0bbf7fd7c2d 100644 --- a/storage/innobase/trx/trx0roll.c +++ b/storage/innobase/trx/trx0roll.c @@ -42,6 +42,9 @@ Created 3/26/1996 Heikki Tuuri #include "row0mysql.h" #include "lock0lock.h" #include "pars0pars.h" +#ifdef WITH_WSREP +#include "ha_prototypes.h" +#endif /* WITH_WSREP */ /** This many pages must be undone before a truncate is tried within rollback */ @@ -147,6 +150,12 @@ trx_rollback_for_mysql( trx->op_info = ""; +#ifdef WITH_WSREP + if (wsrep_on(trx->mysql_thd) && + trx->was_chosen_as_deadlock_victim) { + trx->was_chosen_as_deadlock_victim = FALSE; + } +#endif return(err); } @@ -174,6 +183,12 @@ trx_rollback_last_sql_stat_for_mysql( trx->op_info = ""; +#ifdef WITH_WSREP + if (wsrep_on(trx->mysql_thd) && + trx->was_chosen_as_deadlock_victim) { + trx->was_chosen_as_deadlock_victim = FALSE; + } +#endif return(err); } @@ -1123,6 +1138,12 @@ trx_rollback( srv_que_task_enqueue_low(thr); /* srv_que_task_enqueue_low(thr2); */ } +#ifdef WITH_WSREP + if (wsrep_on(trx->mysql_thd) && + trx->was_chosen_as_deadlock_victim) { + trx->was_chosen_as_deadlock_victim = FALSE; + } +#endif } /****************************************************************//** @@ -1281,6 +1302,12 @@ trx_finish_rollback_off_kernel( sig = next_sig; } +#ifdef WITH_WSREP + if (wsrep_on(trx->mysql_thd) && + trx->was_chosen_as_deadlock_victim) { + trx->was_chosen_as_deadlock_victim = FALSE; + } +#endif } /*********************************************************************//** diff --git a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c index d5649ea9890e..45a361ddcb61 100644 --- a/storage/innobase/trx/trx0sys.c +++ b/storage/innobase/trx/trx0sys.c @@ -44,6 +44,10 @@ Created 3/26/1996 Heikki Tuuri #include "os0file.h" #include "read0read.h" +#ifdef WITH_WSREP +#include "ha_prototypes.h" /* wsrep_is_wsrep_xid() */ +#endif /* */ + /** The file format tag structure with id and name. */ struct file_format_struct { ulint id; /*!< id of the file format */ @@ -691,10 +695,14 @@ trx_sys_update_mysql_binlog_offset( ib_int64_t offset, /*!< in: position in that log file */ ulint field, /*!< in: offset of the MySQL log info field in the trx sys header */ +#ifdef WITH_WSREP + trx_sysf_t* sys_header, /*!< in: trx sys header */ +#endif /* WITH_WSREP */ mtr_t* mtr) /*!< in: mtr */ { +#ifndef WITH_WSREP trx_sysf_t* sys_header; - +#endif /* !WITH_WSREP */ if (ut_strlen(file_name) >= TRX_SYS_MYSQL_LOG_NAME_LEN) { /* We cannot fit the name to the 512 bytes we have reserved */ @@ -702,7 +710,9 @@ trx_sys_update_mysql_binlog_offset( return; } +#ifndef WITH_WSREP sys_header = trx_sysf_get(mtr); +#endif /* !WITH_WSREP */ if (mach_read_from_4(sys_header + field + TRX_SYS_MYSQL_LOG_MAGIC_N_FLD) @@ -789,6 +799,125 @@ trx_sys_print_mysql_binlog_offset(void) mtr_commit(&mtr); } +#ifdef WITH_WSREP + +#ifdef UNIV_DEBUG +static long long trx_sys_cur_xid_seqno = -1; +static unsigned char trx_sys_cur_xid_uuid[16]; + +long long read_wsrep_xid_seqno(const XID* xid) +{ + long long seqno; + memcpy(&seqno, xid->data + 24, sizeof(long long)); + return seqno; +} + +void read_wsrep_xid_uuid(const XID* xid, unsigned char* buf) +{ + memcpy(buf, xid->data + 8, 16); +} + +#endif /* UNIV_DEBUG */ + +void +trx_sys_update_wsrep_checkpoint( + const XID* xid, /*!< in: transaction XID */ + trx_sysf_t* sys_header, /*!< in: sys_header */ + mtr_t* mtr) /*!< in: mtr */ +{ + +#ifdef UNIV_DEBUG + { + /* Check that seqno is monotonically increasing */ + unsigned char xid_uuid[16]; + long long xid_seqno = read_wsrep_xid_seqno(xid); + read_wsrep_xid_uuid(xid, xid_uuid); + if (!memcmp(xid_uuid, trx_sys_cur_xid_uuid, 8)) + { + ut_ad(xid_seqno > trx_sys_cur_xid_seqno); + trx_sys_cur_xid_seqno = xid_seqno; + } + else + { + memcpy(trx_sys_cur_xid_uuid, xid_uuid, 16); + } + trx_sys_cur_xid_seqno = xid_seqno; + } +#endif /* UNIV_DEBUG */ + + ut_ad(xid && mtr && sys_header); + ut_a(xid->formatID == -1 || wsrep_is_wsrep_xid(xid)); + + if (mach_read_from_4(sys_header + TRX_SYS_WSREP_XID_INFO + + TRX_SYS_WSREP_XID_MAGIC_N_FLD) + != TRX_SYS_WSREP_XID_MAGIC_N) { + mlog_write_ulint(sys_header + TRX_SYS_WSREP_XID_INFO + + TRX_SYS_WSREP_XID_MAGIC_N_FLD, + TRX_SYS_WSREP_XID_MAGIC_N, + MLOG_4BYTES, mtr); + } + + mlog_write_ulint(sys_header + TRX_SYS_WSREP_XID_INFO + + TRX_SYS_WSREP_XID_FORMAT, + (int)xid->formatID, + MLOG_4BYTES, mtr); + mlog_write_ulint(sys_header + TRX_SYS_WSREP_XID_INFO + + TRX_SYS_WSREP_XID_GTRID_LEN, + (int)xid->gtrid_length, + MLOG_4BYTES, mtr); + mlog_write_ulint(sys_header + TRX_SYS_WSREP_XID_INFO + + TRX_SYS_WSREP_XID_BQUAL_LEN, + (int)xid->bqual_length, + MLOG_4BYTES, mtr); + mlog_write_string(sys_header + TRX_SYS_WSREP_XID_INFO + + TRX_SYS_WSREP_XID_DATA, + (const unsigned char*) xid->data, + XIDDATASIZE, mtr); + +} + +void +trx_sys_read_wsrep_checkpoint(XID* xid) +/*===================================*/ +{ + trx_sysf_t* sys_header; + mtr_t mtr; + ulint magic; + + ut_ad(xid); + + mtr_start(&mtr); + + sys_header = trx_sysf_get(&mtr); + + if ((magic = mach_read_from_4(sys_header + TRX_SYS_WSREP_XID_INFO + + TRX_SYS_WSREP_XID_MAGIC_N_FLD)) + != TRX_SYS_WSREP_XID_MAGIC_N) { + memset(xid, 0, sizeof(*xid)); + xid->formatID = -1; + trx_sys_update_wsrep_checkpoint(xid, sys_header, &mtr); + mtr_commit(&mtr); + return; + } + + xid->formatID = (int)mach_read_from_4( + sys_header + + TRX_SYS_WSREP_XID_INFO + TRX_SYS_WSREP_XID_FORMAT); + xid->gtrid_length = (int)mach_read_from_4( + sys_header + + TRX_SYS_WSREP_XID_INFO + TRX_SYS_WSREP_XID_GTRID_LEN); + xid->bqual_length = (int)mach_read_from_4( + sys_header + + TRX_SYS_WSREP_XID_INFO + TRX_SYS_WSREP_XID_BQUAL_LEN); + ut_memcpy(xid->data, + sys_header + TRX_SYS_WSREP_XID_INFO + TRX_SYS_WSREP_XID_DATA, + XIDDATASIZE); + + mtr_commit(&mtr); +} + +#endif /* WITH_WSREP */ + /*****************************************************************//** Prints to stderr the MySQL master log offset info in the trx system header if the magic number shows it valid. */ diff --git a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c index 3fff702cacca..96fa92d00f69 100644 --- a/storage/innobase/trx/trx0trx.c +++ b/storage/innobase/trx/trx0trx.c @@ -193,6 +193,9 @@ trx_create( /* Remember to free the vector explicitly. */ trx->autoinc_locks = ib_vector_create( mem_heap_create(sizeof(ib_vector_t) + sizeof(void*) * 4), 4); +#ifdef WITH_WSREP + trx->wsrep_event = NULL; +#endif /* WITH_WSREP */ return(trx); } @@ -714,6 +717,11 @@ trx_start_low( trx->id = trx_sys_get_new_trx_id(); +#ifdef WITH_WSREP + memset(&trx->xid, 0, sizeof(trx->xid)); + trx->xid.formatID = -1; +#endif /* WITH_WSREP */ + /* The initial value for trx->no: IB_ULONGLONG_MAX is used in read_view_open_now: */ @@ -818,6 +826,9 @@ trx_write_serialisation_history( /*============================*/ trx_t* trx) /*!< in: transaction */ { +#ifdef WITH_WSREP + trx_sysf_t* sys_header; +#endif /* WITH_WSREP */ mtr_t mtr; trx_rseg_t* rseg; @@ -867,6 +878,15 @@ trx_write_serialisation_history( mutex_exit(&rseg->mutex); +#ifdef WITH_WSREP + sys_header = trx_sysf_get(&mtr); + /* Update latest MySQL wsrep XID in trx sys header. */ + if (wsrep_is_wsrep_xid(&trx->xid)) + { + trx_sys_update_wsrep_checkpoint(&trx->xid, sys_header, &mtr); + } +#endif /* WITH_WSREP */ + /* Update the latest MySQL binlog name and offset info in trx sys header if MySQL binlogging is on or the database server is a MySQL replication slave */ @@ -877,7 +897,11 @@ trx_write_serialisation_history( trx_sys_update_mysql_binlog_offset( trx->mysql_log_file_name, trx->mysql_log_offset, - TRX_SYS_MYSQL_LOG_INFO, &mtr); + TRX_SYS_MYSQL_LOG_INFO, +#ifdef WITH_WSREP + sys_header, +#endif /* WITH_WSREP */ + &mtr); trx->mysql_log_file_name = NULL; } @@ -1064,6 +1088,12 @@ trx_commit_off_kernel( ut_ad(UT_LIST_GET_LEN(trx->wait_thrs) == 0); ut_ad(UT_LIST_GET_LEN(trx->trx_locks) == 0); +#ifdef WITH_WSREP + if (wsrep_on(trx->mysql_thd) && + trx->was_chosen_as_deadlock_victim) { + trx->was_chosen_as_deadlock_victim = FALSE; + } +#endif UT_LIST_REMOVE(trx_list, trx_sys->trx_list, trx); trx->error_state = DB_SUCCESS; diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index 6aef51a5c169..f5ced07919af 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -40,7 +40,7 @@ ELSE() SET(inst_location ${INSTALL_SUPPORTFILESDIR}) ENDIF() -FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small) +FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small wsrep) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${inifile}.cnf.sh ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} @ONLY) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} @@ -93,4 +93,10 @@ IF(UNIX) DESTINATION ${inst_location} COMPONENT SupportFiles PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/wsrep_notify.sh + ${CMAKE_CURRENT_BINARY_DIR}/wsrep_notify @ONLY) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/wsrep_notify + DESTINATION ${inst_location} COMPONENT SupportFiles + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ + GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) ENDIF() diff --git a/support-files/build-tags b/support-files/build-tags index 9c43e021c424..f8fc7b39a508 100755 --- a/support-files/build-tags +++ b/support-files/build-tags @@ -3,10 +3,15 @@ rm -f TAGS filter='\.cc$\|\.c$\|\.h$\|sql_yacc\.yy$' -list="find . -type f" +#list="find . -type f" bzr root >/dev/null 2>/dev/null && list="bzr ls --from-root -R --kind=file --versioned" $list |grep $filter |while read f; do etags -o TAGS --append $f done + +(cd storage/galera && svn ls -R) | grep $filter | while read f; +do + etags -o TAGS --append storage/galera/$f +done diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index 7487d5acc0f9..751eb22d9b5b 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -52,6 +52,7 @@ datadir= # 0 means don't wait at all # Negative numbers mean to wait indefinitely service_startup_timeout=900 +startup_sleep=1 # Lock directory for RedHat / SuSE. lockdir='/var/lock/subsys' @@ -146,6 +147,7 @@ wait_for_pid () { pid="$2" # process ID of the program operating on the pid-file pid_file_path="$3" # path to the PID file. + sst_progress_file=$datadir/sst_in_progress i=0 avoid_race_condition="by checking again" @@ -183,9 +185,14 @@ wait_for_pid () { fi fi + if test -e $sst_progress_file && [ $startup_sleep -ne 100 ];then + echo $echo_n "SST in progress, setting sleep higher" + startup_sleep=100 + fi + echo $echo_n ".$echo_c" i=`expr $i + 1` - sleep 1 + sleep $startup_sleep done @@ -329,7 +336,10 @@ case "$mode" in # Stop the service and regardless of whether it was # running or not, start it again. if $0 stop $other_args; then - $0 start $other_args + if ! $0 start $other_args; then + log_failure_msg "Failed to restart server." + exit 1 + fi else log_failure_msg "Failed to stop running server, so refusing to try to start." exit 1 @@ -379,10 +389,16 @@ case "$mode" in fi fi ;; + 'bootstrap') + # Bootstrap the cluster, start the first node + # that initiate the cluster + echo $echo_n "Bootstrapping the cluster" + $0 start $other_args --wsrep-new-cluster + ;; *) # usage basename=`basename "$0"` - echo "Usage: $basename {start|stop|restart|reload|force-reload|status} [ MySQL server options ]" + echo "Usage: $basename {start|stop|restart|reload|force-reload|status|bootstrap} [ MySQL server options ]" exit 1 ;; esac diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index ee95e65780b5..f4a4c5fc0d83 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -68,6 +68,14 @@ # $ rpmbuild --define="option " ... # +# ---------------------------------------------------------------------------- +# wsrep builds +# ---------------------------------------------------------------------------- +%if %{defined with_wsrep} +%define mysql_version @VERSION@_wsrep_@WSREP_API_VERSION@.@WSREP_PATCH_VERSION@ +%define wsrep_version @WSREP_VERSION@ +%endif + # ---------------------------------------------------------------------------- # Commercial builds # ---------------------------------------------------------------------------- @@ -115,6 +123,13 @@ %define server_suffix %{nil} %endif +# ---------------------------------------------------------------------------- +# Packager +# ---------------------------------------------------------------------------- +%if %{undefined mysql_packager} +%define mysql_packager MySQL Build Team +%endif + # ---------------------------------------------------------------------------- # Distribution support # ---------------------------------------------------------------------------- @@ -284,9 +299,16 @@ documentation and the manual for more information. ############################################################################## %package -n MySQL-server%{product_suffix} +%if %{defined with_wsrep} +Version: %{mysql_version} +%endif Summary: MySQL: a very fast and reliable SQL database server Group: Applications/Databases +%if %{defined with_wsrep} +Requires: %{distro_requires} rsync lsof +%else Requires: %{distro_requires} +%endif %if 0%{?commercial} Obsoletes: MySQL-server %else @@ -320,6 +342,9 @@ and the manual for more information. This package includes the MySQL server binary as well as related utilities to run and administer a MySQL server. +%if %{defined with_wsrep} +Built with wsrep patch %{wsrep_version}. +%endif If you want to access and work with the database, you have to install package "MySQL-client%{product_suffix}" as well! @@ -411,6 +436,7 @@ This package contains the shared libraries (*.so*) which certain languages and applications need to dynamically load and use MySQL. # ---------------------------------------------------------------------------- +%if %{undefined with_wsrep} %package -n MySQL-embedded%{product_suffix} Summary: MySQL - Embedded library Group: Applications/Databases @@ -440,6 +466,7 @@ The API is identical for the embedded MySQL version and the client/server version. For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ +%endif ############################################################################## %prep @@ -517,6 +544,9 @@ mkdir debug -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ -DFEATURE_SET="%{feature_set}" \ -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \ +%if %{defined with_wsrep} + -DWITH_WSREP=1 \ +%endif -DMYSQL_SERVER_SUFFIX="%{server_suffix}" echo BEGIN_DEBUG_CONFIG ; egrep '^#define' include/config.h ; echo END_DEBUG_CONFIG make ${MAKE_JFLAG} VERBOSE=1 @@ -533,6 +563,9 @@ mkdir release -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ -DFEATURE_SET="%{feature_set}" \ -DCOMPILATION_COMMENT="%{compilation_comment_release}" \ +%if %{defined with_wsrep} + -DWITH_WSREP=1 \ +%endif -DMYSQL_SERVER_SUFFIX="%{server_suffix}" echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG make ${MAKE_JFLAG} VERBOSE=1 @@ -597,11 +630,20 @@ install -m 755 $MBD/release/support-files/mysql.server $RBR%{_sysconfdir}/init.d # Create a symlink "rcmysql", pointing to the init.script. SuSE users # will appreciate that, as all services usually offer this. -ln -s %{_sysconfdir}/init.d/mysql $RBR%{_sbindir}/rcmysql +ln -sf %{_sysconfdir}/init.d/mysql $RBR%{_sbindir}/rcmysql + +%if %{defined with_wsrep} +# Create a wsrep_sst_rsync_wan symlink. +install -d $RBR%{_bindir} +ln -sf wsrep_sst_rsync $RBR%{_bindir}/wsrep_sst_rsync_wan +%endif # Touch the place where the my.cnf config file might be located # Just to make sure it's in the file list and marked as a config file touch $RBR%{_sysconfdir}/my.cnf +%if %{defined with_wsrep} +touch $RBR%{_sysconfdir}/wsrep.cnf +%endif # Install SELinux files in datadir install -m 600 $MBD/%{src_dir}/support-files/RHEL4-SElinux/mysql.{fc,te} \ @@ -1063,6 +1105,11 @@ echo "=====" >> $STATUS_HISTORY %doc %{src_dir}/Docs/INFO_SRC* %doc release/Docs/INFO_BIN* %doc release/support-files/my-*.cnf +%if %{defined with_wsrep} +%doc %{src_dir}/Docs/README-wsrep +%doc release/support-files/wsrep.cnf +%doc release/support-files/wsrep_notify +%endif %if 0%{?commercial} %doc %attr(644, root, root) %{_infodir}/mysql.info* @@ -1098,6 +1145,9 @@ echo "=====" >> $STATUS_HISTORY %doc %attr(644, root, man) %{_mandir}/man1/resolveip.1* %ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf +%if %{defined with_wsrep} +%ghost %config(noreplace,missingok) %{_sysconfdir}/wsrep.cnf +%endif %dir %{_sysconfdir}/my.cnf.d %attr(755, root, root) %{_bindir}/innochecksum @@ -1125,6 +1175,14 @@ echo "=====" >> $STATUS_HISTORY %attr(755, root, root) %{_bindir}/replace %attr(755, root, root) %{_bindir}/resolve_stack_dump %attr(755, root, root) %{_bindir}/resolveip +%if %{defined with_wsrep} +%attr(755, root, root) %{_bindir}/wsrep_sst_common +%attr(755, root, root) %{_bindir}/wsrep_sst_mysqldump +%attr(755, root, root) %{_bindir}/wsrep_sst_rsync +%attr(755, root, root) %{_bindir}/wsrep_sst_rsync_wan +%attr(755, root, root) %{_bindir}/wsrep_sst_xtrabackup +%attr(755, root, root) %{_bindir}/wsrep_sst_xtrabackup-v2 +%endif %attr(755, root, root) %{_sbindir}/mysqld %attr(755, root, root) %{_sbindir}/mysqld-debug @@ -1203,8 +1261,10 @@ echo "=====" >> $STATUS_HISTORY %defattr(-, root, root, 0755) %attr(-, root, root) %{_datadir}/mysql-test %attr(755, root, root) %{_bindir}/mysql_client_test +%if %{undefined with_wsrep} %attr(755, root, root) %{_bindir}/mysql_client_test_embedded %attr(755, root, root) %{_bindir}/mysqltest_embedded +%endif %doc %attr(644, root, man) %{_mandir}/man1/mysql_client_test.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql-stress-test.pl.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql-test-run.pl.1* @@ -1212,11 +1272,13 @@ echo "=====" >> $STATUS_HISTORY %doc %attr(644, root, man) %{_mandir}/man1/mysqltest_embedded.1* # ---------------------------------------------------------------------------- +%if %{undefined with_wsrep} %files -n MySQL-embedded%{product_suffix} %defattr(-, root, root, 0755) %attr(755, root, root) %{_bindir}/mysql_embedded %attr(644, root, root) %{_libdir}/mysql/libmysqld.a %attr(644, root, root) %{_libdir}/mysql/libmysqld-debug.a +%endif ############################################################################## # The spec file changelog only includes changes made to the spec file @@ -1251,6 +1313,10 @@ echo "=====" >> $STATUS_HISTORY - Make sure newly added "SPECIFIC-ULN/" directory does not disturb packaging. +* Wed Dec 07 2011 Alexey Yurchenko + +- wsrep-related cleanups. + * Wed Sep 28 2011 Joerg Bruehe - Fix duplicate mentioning of "mysql_plugin" and its manual page, @@ -1303,7 +1369,6 @@ echo "=====" >> $STATUS_HISTORY - Fix bug#12561297: Added the MySQL embedded binary * Thu Jul 07 2011 Joerg Bruehe - - Fix bug#45415: "rpm upgrade recreates test database" Let the creation of the "test" database happen only during a new installation, not in an RPM upgrade. diff --git a/support-files/wsrep/debian/changelog b/support-files/wsrep/debian/changelog new file mode 100644 index 000000000000..b6b1adcc5b4c --- /dev/null +++ b/support-files/wsrep/debian/changelog @@ -0,0 +1,4 @@ +mysql-server-wsrep-5.5 (5.5.20-25.11) UNRELEASED; urgency=medium + + + -- Codership Oy Sat, 30 Aug 2014 13:13:03 +0300 diff --git a/support-files/wsrep/debian/compat b/support-files/wsrep/debian/compat new file mode 100644 index 000000000000..7f8f011eb73d --- /dev/null +++ b/support-files/wsrep/debian/compat @@ -0,0 +1 @@ +7 diff --git a/support-files/wsrep/debian/control b/support-files/wsrep/debian/control new file mode 100644 index 000000000000..a2398b9da4ed --- /dev/null +++ b/support-files/wsrep/debian/control @@ -0,0 +1,44 @@ +Source: mysql-server-wsrep +Section: misc +Priority: extra +Maintainer: Codership Oy +Build-Depends: debhelper (>= 7) +Homepage: http://galeracluster.com/ + +Package: mysql-client-wsrep +Architecture: any +Section: misc +Priority: extra +Depends: ${shlibs:Depends}, ${misc:Depends} +Conflicts: mysql-client (<< ${source:Version}), mysql-client-core, mysql-client-5.5, mysql-client-core-5.5 +Provides: mysql-client, mysql-client-core, mysql-client-5.5, mysql-client-core-5.5 +Replaces: mysql-client (<< ${source:Version}), mysql-client-core, mysql-client-5.5, mysql-client-core-5.5 +Homepage: http://galeracluster.com/ +Description: MySQL database client binaries for Galera Cluster + + +Package: mysql-client-wsrep-dbg +Architecture: any +Section: debug +Priority: extra +Depends: mysql-client-wsrep (= ${binary:Version}), ${misc:Depends} +Description: Debug symbols for mysql-client-wsrep + + +Package: mysql-server-wsrep +Architecture: any +Priority: extra +Depends: rsync, lsof, ${shlibs:Depends}, ${misc:Depends} +Conflicts: mysql-server (<< ${source:Version}), mysql-server-core, mysql-server-5.5, mysql-server-core-5.5 +Provides: mysql-server, mysql-server-core, mysql-server-5.5, mysql-server-core-5.5 +Replaces: mysql-server (<< ${source:Version}), mysql-server-core, mysql-server-5.5, mysql-server-core-5.5 +Homepage: http://galeracluster.com/ +Description: MySQL database server binaries for Galera Cluster + + +Package: mysql-server-wsrep-dbg +Architecture: any +Section: debug +Priority: extra +Depends: mysql-server-wsrep (= ${binary:Version}), ${misc:Depends} +Description: Debug symbols for mysql-server-wsrep diff --git a/support-files/wsrep/debian/etc/logcheck/ignore.d.paranoid/mysql-server-5_1 b/support-files/wsrep/debian/etc/logcheck/ignore.d.paranoid/mysql-server-5_1 new file mode 100644 index 000000000000..00cc5c3e29d0 --- /dev/null +++ b/support-files/wsrep/debian/etc/logcheck/ignore.d.paranoid/mysql-server-5_1 @@ -0,0 +1,9 @@ +/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$ +/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$ +mysqld\[[0-9]+\]: $ +mysqld\[[0-9]+\]: Version: .* socket: '/var/run/mysqld/mysqld.sock' port: 3306$ +mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$ +mysqld_safe\[[0-9]+\]: started$ +usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$ +usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$ diff --git a/support-files/wsrep/debian/etc/logcheck/ignore.d.server/mysql-server-5_1 b/support-files/wsrep/debian/etc/logcheck/ignore.d.server/mysql-server-5_1 new file mode 100644 index 000000000000..37f25cb01ea9 --- /dev/null +++ b/support-files/wsrep/debian/etc/logcheck/ignore.d.server/mysql-server-5_1 @@ -0,0 +1,32 @@ +/etc/init.d/mysql\[[0-9]+\]: [0-9]+ processes alive and '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$ +/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$ +mysqld\[[0-9]+\]: ?$ +mysqld\[[0-9]+\]: .*InnoDB: Shutdown completed +mysqld\[[0-9]+\]: .*InnoDB: Started; +mysqld\[[0-9]+\]: .*InnoDB: Starting shutdown\.\.\.$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Normal shutdown$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: ready for connections\.$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Shutdown complete$ +mysqld\[[0-9]+\]: /usr/sbin/mysqld: ready for connections\.$ +mysqld\[[0-9]+\]: .*/usr/sbin/mysqld: Shutdown Complete$ +mysqld\[[0-9]+\]: Version: .* socket +mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$ +mysqld_safe\[[0-9]+\]: ?$ +mysqld_safe\[[0-9]+\]: able to use the new GRANT command!$ +mysqld_safe\[[0-9]+\]: ended$ +mysqld_safe\[[0-9]+\]: http://www.mysql.com$ +mysqld_safe\[[0-9]+\]: NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run$ +mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$ +mysqld_safe\[[0-9]+\]: Please report any problems with the /usr/bin/mysqlbug script!$ +mysqld_safe\[[0-9]+\]: See the manual for more instructions.$ +mysqld_safe\[[0-9]+\]: started$ +mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at https://order.mysql.com$ +mysqld_safe\[[0-9]+\]: The latest information about MySQL is available on the web at$ +mysqld_safe\[[0-9]+\]: the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be$ +mysqld_safe\[[0-9]+\]: To do so, start the server, then issue the following commands:$ +mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root -h app109 password 'new-password'$ +mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root password 'new-password'$ +usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$ +usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$ diff --git a/support-files/wsrep/debian/etc/logcheck/ignore.d.workstation/mysql-server-5_1 b/support-files/wsrep/debian/etc/logcheck/ignore.d.workstation/mysql-server-5_1 new file mode 100644 index 000000000000..37f25cb01ea9 --- /dev/null +++ b/support-files/wsrep/debian/etc/logcheck/ignore.d.workstation/mysql-server-5_1 @@ -0,0 +1,32 @@ +/etc/init.d/mysql\[[0-9]+\]: [0-9]+ processes alive and '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$ +/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$ +mysqld\[[0-9]+\]: ?$ +mysqld\[[0-9]+\]: .*InnoDB: Shutdown completed +mysqld\[[0-9]+\]: .*InnoDB: Started; +mysqld\[[0-9]+\]: .*InnoDB: Starting shutdown\.\.\.$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Normal shutdown$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: ready for connections\.$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Shutdown complete$ +mysqld\[[0-9]+\]: /usr/sbin/mysqld: ready for connections\.$ +mysqld\[[0-9]+\]: .*/usr/sbin/mysqld: Shutdown Complete$ +mysqld\[[0-9]+\]: Version: .* socket +mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$ +mysqld_safe\[[0-9]+\]: ?$ +mysqld_safe\[[0-9]+\]: able to use the new GRANT command!$ +mysqld_safe\[[0-9]+\]: ended$ +mysqld_safe\[[0-9]+\]: http://www.mysql.com$ +mysqld_safe\[[0-9]+\]: NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run$ +mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$ +mysqld_safe\[[0-9]+\]: Please report any problems with the /usr/bin/mysqlbug script!$ +mysqld_safe\[[0-9]+\]: See the manual for more instructions.$ +mysqld_safe\[[0-9]+\]: started$ +mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at https://order.mysql.com$ +mysqld_safe\[[0-9]+\]: The latest information about MySQL is available on the web at$ +mysqld_safe\[[0-9]+\]: the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be$ +mysqld_safe\[[0-9]+\]: To do so, start the server, then issue the following commands:$ +mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root -h app109 password 'new-password'$ +mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root password 'new-password'$ +usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$ +usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$ diff --git a/support-files/wsrep/debian/etc/logrotate.d/mysql-server b/support-files/wsrep/debian/etc/logrotate.d/mysql-server new file mode 100644 index 000000000000..0f0de516b13c --- /dev/null +++ b/support-files/wsrep/debian/etc/logrotate.d/mysql-server @@ -0,0 +1,27 @@ +# - I put everything in one block and added sharedscripts, so that mysql gets +# flush-logs'd only once. +# Else the binary logs would automatically increase by n times every day. +# - The error log is obsolete, messages go to syslog now. +/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log { + daily + rotate 7 + missingok + create 640 mysql adm + compress + sharedscripts + postrotate + test -x /usr/bin/mysqladmin || exit 0 + + # If this fails, check debian.conf! + MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" + if [ -z "`$MYADMIN ping 2>/dev/null`" ]; then + # Really no mysqld or rather a missing debian-sys-maint user? + # If this occurs and is not a error please report a bug. + if ps cax | grep -q mysqld; then + exit 1 + fi + else + $MYADMIN flush-logs + fi + endscript +} diff --git a/support-files/wsrep/debian/etc/mysql/conf.d/mysqld_safe_syslog.cnf b/support-files/wsrep/debian/etc/mysql/conf.d/mysqld_safe_syslog.cnf new file mode 100644 index 000000000000..3b0445d6bd82 --- /dev/null +++ b/support-files/wsrep/debian/etc/mysql/conf.d/mysqld_safe_syslog.cnf @@ -0,0 +1,2 @@ +[mysqld_safe] +syslog diff --git a/support-files/wsrep/debian/etc/mysql/debian-start b/support-files/wsrep/debian/etc/mysql/debian-start new file mode 100644 index 000000000000..10628019e401 --- /dev/null +++ b/support-files/wsrep/debian/etc/mysql/debian-start @@ -0,0 +1,31 @@ +#!/bin/bash +# +# This script is executed by "/etc/init.d/mysql" on every (re)start. +# +# Changes to this file will be preserved when updating the Debian package. +# + +source /usr/share/mysql/debian-start.inc.sh + +MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf" +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" +MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf" +MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf" +MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables" +MYCHECK_PARAMS="--all-databases --fast --silent" +MYCHECK_RCPT="root" + +# The following commands should be run when the server is up but in background +# where they do not block the server start and in one shell instance so that +# they run sequentially. They are supposed not to echo anything to stdout. +# If you want to disable the check for crashed tables comment +# "check_for_crashed_tables" out. +# (There may be no output to stdout inside the background process!) +echo "Checking for corrupt, not cleanly closed and upgrade needing tables." +( + upgrade_system_tables_if_necessary; + check_root_accounts; + check_for_crashed_tables; +) >&2 & + +exit 0 diff --git a/support-files/wsrep/debian/mysql-client-wsrep.install b/support-files/wsrep/debian/mysql-client-wsrep.install new file mode 100644 index 000000000000..b4a356df773d --- /dev/null +++ b/support-files/wsrep/debian/mysql-client-wsrep.install @@ -0,0 +1,17 @@ +usr/bin/mysql +usr/bin/mysqlcheck +usr/bin/innochecksum +usr/bin/myisam_ftdump +usr/bin/mysql_client_test +usr/bin/mysql_find_rows +usr/bin/mysql_fix_extensions +usr/bin/mysql_plugin +usr/bin/mysql_waitpid +usr/bin/mysqlaccess +usr/bin/mysqladmin +usr/bin/mysqlbug +usr/bin/mysqldump +usr/bin/mysqldumpslow +usr/bin/mysqlimport +usr/bin/mysqlshow +usr/bin/mysqlslap diff --git a/support-files/wsrep/debian/mysql-server-wsrep.dirs b/support-files/wsrep/debian/mysql-server-wsrep.dirs new file mode 100644 index 000000000000..15f79fc96f96 --- /dev/null +++ b/support-files/wsrep/debian/mysql-server-wsrep.dirs @@ -0,0 +1,2 @@ +etc/mysql/conf.d/ +var/run/mysqld/ \ No newline at end of file diff --git a/support-files/wsrep/debian/mysql-server-wsrep.install b/support-files/wsrep/debian/mysql-server-wsrep.install new file mode 100644 index 000000000000..d1180465448b --- /dev/null +++ b/support-files/wsrep/debian/mysql-server-wsrep.install @@ -0,0 +1,59 @@ +etc/init.d/mysql +etc/logcheck/* +etc/logrotate.d/* +etc/mysql/* +usr/bin/my_print_defaults +usr/bin/mysql_install_db +usr/bin/mysql_upgrade +usr/sbin/mysqld +usr/bin/msql2mysql +usr/bin/myisamchk +usr/bin/myisamlog +usr/bin/myisampack +usr/bin/mysql_convert_table_format +usr/bin/mysql_secure_installation +usr/bin/mysql_setpermission +usr/bin/mysql_tzinfo_to_sql +usr/bin/mysql_zap +usr/bin/mysqlbinlog +usr/bin/mysqld_multi +usr/bin/mysqld_safe +usr/bin/mysqlhotcopy +usr/bin/mysqltest +usr/bin/replace +usr/bin/resolve_stack_dump +usr/bin/resolveip +usr/bin/wsrep_sst_xtrabackup-v2 +usr/bin/wsrep_sst_rsync +usr/bin/wsrep_sst_rsync_wan +usr/bin/wsrep_sst_xtrabackup +usr/bin/wsrep_sst_mysqldump +usr/bin/wsrep_sst_common +usr/lib/mysql/plugin/*.so +usr/share/man/man1/my_print_defaults.1 +usr/share/man/man1/mysql_install_db.1 +usr/share/man/man1/mysql_upgrade.1 +usr/share/man/man1/msql2mysql.1 +usr/share/man/man1/myisamchk.1 +usr/share/man/man1/myisamlog.1 +usr/share/man/man1/myisampack.1 +usr/share/man/man1/mysql_convert_table_format.1 +usr/share/man/man1/mysql_secure_installation.1 +usr/share/man/man1/mysql_setpermission.1 +usr/share/man/man1/mysql_tzinfo_to_sql.1 +usr/share/man/man1/mysql_zap.1 +usr/share/man/man1/mysqlbinlog.1 +usr/share/man/man1/mysqld_multi.1 +usr/share/man/man1/mysqld_safe.1 +usr/share/man/man1/mysqlhotcopy.1 +usr/share/man/man1/mysqltest.1 +usr/share/man/man1/mysql.server.1 +usr/share/man/man1/replace.1 +usr/share/man/man1/resolve_stack_dump.1 +usr/share/man/man1/resolveip.1 +usr/share/man/man8/mysqld.8 +usr/share/mysql/* +usr/share/mysql/errmsg-utf8.txt +usr/share/mysql/mysql_test_data_timezone.sql +usr/share/mysql/mysqld_multi.server +usr/share/doc/mysql-server-wsrep/* \ No newline at end of file diff --git a/support-files/wsrep/debian/mysql-server-wsrep.postinst b/support-files/wsrep/debian/mysql-server-wsrep.postinst new file mode 100644 index 000000000000..88fdd603e630 --- /dev/null +++ b/support-files/wsrep/debian/mysql-server-wsrep.postinst @@ -0,0 +1,13 @@ +#!/bin/bash -eu + +chmod 0755 /etc/init.d/mysql +chmod 0755 /var/run/mysqld +chown mysql:root /var/run/mysqld +update-rc.d -f mysql remove >/dev/null +ldconfig -n /usr/lib/mysql + +mysql_install_db --wsrep-on=0 --user=mysql --datadir=/var/lib/mysql --basedir=/usr +# This is a fix/workaround for AppArmor profile provided with mysql-server deb +[ ! -d /etc/apparmor.d/disable ] || \ +( cd /etc/apparmor.d/disable && ln -sf ../usr.sbin.mysqld ./ ) +[ ! -x /etc/init.d/apparmor ] || /etc/init.d/apparmor restart diff --git a/support-files/wsrep/debian/mysql-server-wsrep.preinst b/support-files/wsrep/debian/mysql-server-wsrep.preinst new file mode 100644 index 000000000000..157acc9a45cd --- /dev/null +++ b/support-files/wsrep/debian/mysql-server-wsrep.preinst @@ -0,0 +1,6 @@ +#!/bin/bash -eu + +getent group mysql >/dev/null || addgroup --system mysql >/dev/null +getent passwd mysql >/dev/null || \ +adduser --system --disabled-login --ingroup mysql --home /var/lib/mysql \ + --gecos "MySQL Server" --shell /bin/false mysql >/dev/null diff --git a/support-files/wsrep/debian/mysql-server-wsrep.prerm b/support-files/wsrep/debian/mysql-server-wsrep.prerm new file mode 100644 index 000000000000..f991477a23e7 --- /dev/null +++ b/support-files/wsrep/debian/mysql-server-wsrep.prerm @@ -0,0 +1,10 @@ +#!/bin/bash -eu + +if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d mysql stop +else + /etc/init.d/mysql stop +fi +update-rc.d -f mysql remove >/dev/null +[ ! -L /etc/apparmor.d/disable/usr.sbin.mysqld ] || rm -rf /etc/apparmor.d/disable/usr.sbin.mysqld +[ ! -x /etc/init.d/apparmor ] || /etc/init.d/apparmor restart diff --git a/support-files/wsrep/debian/rules b/support-files/wsrep/debian/rules new file mode 100644 index 000000000000..1e5e9957e0b7 --- /dev/null +++ b/support-files/wsrep/debian/rules @@ -0,0 +1,83 @@ +#!/usr/bin/make -f + +DH_VERBOSE = 1 +TMP = $(CURDIR)/debian/tmp + + +override_dh_auto_configure: + mkdir -p build_release + cd build_release && \ + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DINSTALL_LAYOUT=RPM \ + -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \ + -DINSTALL_PLUGINDIR=lib/mysql/plugin \ + -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ + -DMYSQL_USER=mysql \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DWITH_WSREP=1 \ + -DWITH_SSL=bundled \ + -DWITH_ZLIB=system \ + -DWITH_EXTRA_CHARSETS=all \ + -DWITH_INNODB_MEMCACHED=ON \ + -DWITH_LIBEVENT=bundled .. + +override_dh_auto_build: + cd build_release && make -j3 + +override_dh_auto_install: + mkdir -p $(TMP) + cd build_release && DESTDIR=$(TMP) make install +# Install files not covered with make install + install -D -m 644 debian/etc/mysql/debian-start \ + $(TMP)/etc/mysql/debian-start + install -D -m 644 debian/etc/mysql/conf.d/mysqld_safe_syslog.cnf \ + $(TMP)/etc/mysql/conf.d/mysqld_safe_syslog.cnf + install -D -m 640 build_release/support-files/wsrep.cnf \ + $(TMP)/etc/mysql/conf.d/wsrep.cnf + install -D -m 755 debian/etc/logrotate.d/mysql-server \ + $(TMP)/etc/logrotate.d/mysql-server + install -D -m 755 debian/etc/logcheck/ignore.d.paranoid/mysql-server-5_1 \ + $(TMP)/etc/logcheck/ignore.d.paranoid/mysql-server-5_5 + install -D -m 755 debian/etc/logcheck/ignore.d.server/mysql-server-5_1 \ + $(TMP)/etc/logcheck/ignore.d.server/mysql-server-5_5 + install -D -m 755 debian/etc/logcheck/ignore.d.workstation/mysql-server-5_1 \ + $(TMP)/etc/logcheck/ignore.d.workstation/mysql-server-5_5 + install -D -m 755 build_release/support-files/mysql.server \ + $(TMP)/etc/init.d/mysql + install -D -m 755 build_release/scripts/wsrep_sst_rsync \ + $(TMP)/usr/bin/wsrep_sst_rsync_wan + install -D -m 644 scripts/mysql_system_tables_fix.sql \ + $(TMP)/usr/share/mysql/mysql_system_tables_fix.sql + install -D -m 644 Docs/README-wsrep \ + $(TMP)/usr/share/doc/mysql-server-wsrep/README-wsrep + install -D -m 644 build_release/support-files/wsrep.cnf \ + $(TMP)/usr/share/mysql/wsrep.cnf + install -D -m 644 COPYING \ + $(TMP)/usr/share/doc/mysql-server-wsrep/COPYING + install -D -m 644 Docs/ChangeLog \ + $(TMP)/usr/share/doc/mysql-server-wsrep/ChangeLog + install -D -m 644 build_release/Docs/INFO_BIN \ + $(TMP)/usr/share/doc/mysql-server-wsrep/INFO_BIN + install -D -m 644 build_release/Docs/INFO_SRC \ + $(TMP)/usr/share/doc/mysql-server-wsrep/INFO_SRC + install -D -m 644 Docs/INSTALL-BINARY \ + $(TMP)/usr/share/doc/mysql-server-wsrep/INSTALL-BINARY + install -D -m 644 README \ + $(TMP)/usr/share/doc/mysql-server-wsrep/README + install -D -m 644 Docs/sp-imp-spec.txt \ + $(TMP)/usr/share/doc/mysql-server-wsrep/sp-imp-spec.txt +# Clean up unnecessary + rm $(TMP)/usr/share/mysql/magic + + + + +.PHONY: override_dh_strip + +override_dh_strip: + dh_strip -pmysql-client-wsrep --dbg-package=mysql-client-wsrep-dbg + dh_strip -pmysql-server-wsrep --dbg-package=mysql-server-wsrep-dbg + +%: + dh $@ diff --git a/support-files/wsrep/debian/source/format b/support-files/wsrep/debian/source/format new file mode 100644 index 000000000000..163aaf8d82b6 --- /dev/null +++ b/support-files/wsrep/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/vio/viossl.c b/vio/viossl.c index a7370d3cc586..85705b0c77df 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -172,7 +172,9 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout); SSL_set_fd(ssl, vio->sd); #ifndef HAVE_YASSL +# if defined SSL_OP_NO_COMPRESSION SSL_set_options(ssl, SSL_OP_NO_COMPRESSION); +# endif #endif if ((r= connect_accept_func(ssl)) < 1) diff --git a/wsrep/cmake_install.cmake b/wsrep/cmake_install.cmake deleted file mode 100644 index 4268379fa152..000000000000 --- a/wsrep/cmake_install.cmake +++ /dev/null @@ -1,34 +0,0 @@ -# Install script for directory: /home/seppo/work/wsrep/mysql-wsrep/wsrep - -# Set the install prefix -IF(NOT DEFINED CMAKE_INSTALL_PREFIX) - SET(CMAKE_INSTALL_PREFIX "/usr/local/mysql") -ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) -STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - IF(BUILD_TYPE) - STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - ELSE(BUILD_TYPE) - SET(CMAKE_INSTALL_CONFIG_NAME "RelWithDebInfo") - ENDIF(BUILD_TYPE) - MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - -# Set the component getting installed. -IF(NOT CMAKE_INSTALL_COMPONENT) - IF(COMPONENT) - MESSAGE(STATUS "Install component: \"${COMPONENT}\"") - SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - ELSE(COMPONENT) - SET(CMAKE_INSTALL_COMPONENT) - ENDIF(COMPONENT) -ENDIF(NOT CMAKE_INSTALL_COMPONENT) - -# Install shared libraries without execute permission? -IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) - SET(CMAKE_INSTALL_SO_NO_EXE "1") -ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) - From fc392689e025c749b594fa58f0d7c8b91ce43b24 Mon Sep 17 00:00:00 2001 From: dirtysalt Date: Fri, 31 Oct 2014 15:55:18 +0800 Subject: [PATCH 003/305] Refs #8: [5.5] preserve gvwstate.dat for pc recovery feature --- scripts/wsrep_sst_xtrabackup-v2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index 865547ad9d88..97fb5fb91f7a 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -282,7 +282,7 @@ read_cnf() progress=$(parse_cnf sst progress "") rebuild=$(parse_cnf sst rebuild 0) ttime=$(parse_cnf sst time 0) - cpat=$(parse_cnf sst cpat '.*galera\.cache$\|.*sst_in_progress$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$') + cpat=$(parse_cnf sst cpat '.*galera\.cache$\|.*sst_in_progress$\|.*grastate\.dat$\|.*gvwstate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$') incremental=$(parse_cnf sst incremental 0) ealgo=$(parse_cnf xtrabackup encrypt "") ekey=$(parse_cnf xtrabackup encrypt-key "") From 8875bb0efe6ce8e573787b78579c950f63548101 Mon Sep 17 00:00:00 2001 From: dirtysalt Date: Wed, 5 Nov 2014 21:42:35 +0800 Subject: [PATCH 004/305] Refs #9: remove uncessary files and update .gitignore --- .gitignore | 3081 ++++++++++++++++++++++++ mysql-test/collections/default.release | 15 - 2 files changed, 3081 insertions(+), 15 deletions(-) create mode 100644 .gitignore delete mode 100644 mysql-test/collections/default.release diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..03c97b42e1cd --- /dev/null +++ b/.gitignore @@ -0,0 +1,3081 @@ +*-t +*.Plo +*.Po +*.a +*.bb +*.bbg +*.bin +*.cdf +*.core +*.d +*.da +*.dir +*.dll +*.dylib +*.diff +*.exe +*.exp +*.gcda +*.gcno +*.gcov +*.idb +*.ilk +*.la +*.lai +*.lib +*.lo +*.manifest +*.map +*.o +*.obj +*.old +*.pch +*.pdb +*.reject +*.res +*.rule +*.sbr +*.so +*.so.* +*.spec +*.user +*.vcproj +*.vcproj.cmake +*.vcxproj +*.vcxproj.filters +*/*.dir/* +Debug +MySql.sdf +Win32 +*/*_pure_*warnings +*/.deps +*/.libs/* +*/.pure +*/debug/* +*/minsizerel/* +*/release/* +RelWithDebInfo +*~ +.*.swp +./CMakeCache.txt +./MySql.ncb +./MySql.sln +./MySql.suo +./README.build-files +./cmakecache.txt +./config.h +./copy_mysql_files.bat +./fix-project-files +./mysql*.ds? +./mysql.ncb +./mysql.sln +./mysql.suo +./prepare +.DS_Store +.defs.mk +.depend +.depend.mk +.deps +.gdb_history +.gdbinit +.libs +.o +.out +.snprj/* +.vimrc +50 +=6 +BUILD/compile-pentium-maintainer +BitKeeper/etc/RESYNC_TREE +BitKeeper/etc/config +BitKeeper/etc/csets +BitKeeper/etc/csets-in +BitKeeper/etc/csets-out +BitKeeper/etc/gone +BitKeeper/etc/level +BitKeeper/etc/pushed +BitKeeper/post-commit +BitKeeper/post-commit-manual +BitKeeper/tmp/* +BitKeeper/tmp/bkr3sAHD +BitKeeper/tmp/gone +CMakeFiles +CMakeFiles/* +CTestTestfile.cmake +COPYING +COPYING.LIB +Docs/#manual.texi# +Docs/INSTALL-BINARY +Docs/Images/myaccess-odbc.txt +Docs/Images/myaccess.txt +Docs/Images/myarchitecture.txt +Docs/Images/mydll-properties.txt +Docs/Images/mydsn-example.txt +Docs/Images/mydsn-icon.txt +Docs/Images/mydsn-options.txt +Docs/Images/mydsn-setup.txt +Docs/Images/mydsn-test-fail.txt +Docs/Images/mydsn-test-success.txt +Docs/Images/mydsn-trace.txt +Docs/Images/mydsn.txt +Docs/Images/myflowchart.txt +Docs/include.texi +Docs/internals.html +Docs/internals.info +Docs/internals.pdf +Docs/internals.txt +Docs/internals_toc.html +Docs/manual.aux +Docs/manual.cp +Docs/manual.cps +Docs/manual.de.log +Docs/manual.dvi +Docs/manual.fn +Docs/manual.fns +Docs/manual.html +Docs/manual.ky +Docs/manual.log +Docs/manual.pdf +Docs/manual.pg +Docs/manual.texi.orig +Docs/manual.texi.rej +Docs/manual.toc +Docs/manual.tp +Docs/manual.txt +Docs/manual.vr +Docs/manual_a4.ps +Docs/manual_letter.ps +Docs/manual_toc.html +Docs/my_sys.doc +Docs/mysql.info +Docs/mysql.xml +Docs/safe-mysql.xml +Docs/tex.fmt +Docs/texi2dvi.out +EXCEPTIONS-CLIENT +INSTALL-SOURCE +INSTALL-WIN-SOURCE +Logs/* +MIRRORS +Makefile +Makefile.in +Makefile.in' +PENDING/* +scripts/scripts +TAGS +VC++Files/client/mysql_amd64.dsp +ac_available_languages_fragment +acinclude.m4 +aclocal.m4 +analyse.test +autom4te-2.53.cache/* +autom4te-2.53.cache/output.0 +autom4te-2.53.cache/requests +autom4te-2.53.cache/traces.0 +autom4te.cache/* +autom4te.cache/output.0 +autom4te.cache/requests +autom4te.cache/traces.0 +bdb/*.ds? +bdb/*.vcproj +bdb/README +bdb/btree/btree_auto.c +bdb/build_unix/* +bdb/build_vxworks/db.h +bdb/build_vxworks/db_int.h +bdb/build_win32/db.h +bdb/build_win32/db_archive.dsp +bdb/build_win32/db_checkpoint.dsp +bdb/build_win32/db_config.h +bdb/build_win32/db_cxx.h +bdb/build_win32/db_deadlock.dsp +bdb/build_win32/db_dll.dsp +bdb/build_win32/db_dump.dsp +bdb/build_win32/db_int.h +bdb/build_win32/db_java.dsp +bdb/build_win32/db_load.dsp +bdb/build_win32/db_perf.dsp +bdb/build_win32/db_printlog.dsp +bdb/build_win32/db_recover.dsp +bdb/build_win32/db_stat.dsp +bdb/build_win32/db_static.dsp +bdb/build_win32/db_tcl.dsp +bdb/build_win32/db_test.dsp +bdb/build_win32/db_upgrade.dsp +bdb/build_win32/db_verify.dsp +bdb/build_win32/ex_access.dsp +bdb/build_win32/ex_btrec.dsp +bdb/build_win32/ex_env.dsp +bdb/build_win32/ex_lock.dsp +bdb/build_win32/ex_mpool.dsp +bdb/build_win32/ex_tpcb.dsp +bdb/build_win32/excxx_access.dsp +bdb/build_win32/excxx_btrec.dsp +bdb/build_win32/excxx_env.dsp +bdb/build_win32/excxx_lock.dsp +bdb/build_win32/excxx_mpool.dsp +bdb/build_win32/excxx_tpcb.dsp +bdb/build_win32/include.tcl +bdb/build_win32/libdb.def +bdb/build_win32/libdb.rc +bdb/db/crdel_auto.c +bdb/db/db_auto.c +bdb/dbinc_auto/*.* +bdb/dbreg/dbreg_auto.c +bdb/dist/autom4te-2.53.cache/* +bdb/dist/autom4te-2.53.cache/output.0 +bdb/dist/autom4te-2.53.cache/requests +bdb/dist/autom4te-2.53.cache/traces.0 +bdb/dist/autom4te.cache/* +bdb/dist/autom4te.cache/output.0 +bdb/dist/autom4te.cache/requests +bdb/dist/autom4te.cache/traces.0 +bdb/dist/config.hin +bdb/dist/configure +bdb/dist/db.h +bdb/dist/db_config.h +bdb/dist/db_cxx.h +bdb/dist/db_int.h +bdb/dist/include.tcl +bdb/dist/tags +bdb/dist/template/db_server_proc +bdb/dist/template/gen_client_ret +bdb/dist/template/rec_btree +bdb/dist/template/rec_crdel +bdb/dist/template/rec_db +bdb/dist/template/rec_dbreg +bdb/dist/template/rec_fileops +bdb/dist/template/rec_hash +bdb/dist/template/rec_log +bdb/dist/template/rec_qam +bdb/dist/template/rec_txn +bdb/examples_c/ex_apprec/ex_apprec_auto.c +bdb/examples_c/ex_apprec/ex_apprec_auto.h +bdb/examples_c/ex_apprec/ex_apprec_template +bdb/examples_java +bdb/fileops/fileops_auto.c +bdb/hash/hash_auto.c +bdb/include/btree_auto.h +bdb/include/btree_ext.h +bdb/include/clib_ext.h +bdb/include/common_ext.h +bdb/include/crdel_auto.h +bdb/include/db_auto.h +bdb/include/db_ext.h +bdb/include/db_server.h +bdb/include/env_ext.h +bdb/include/gen_client_ext.h +bdb/include/gen_server_ext.h +bdb/include/hash_auto.h +bdb/include/hash_ext.h +bdb/include/lock_ext.h +bdb/include/log_auto.h +bdb/include/log_ext.h +bdb/include/mp_ext.h +bdb/include/mutex_ext.h +bdb/include/os_ext.h +bdb/include/qam_auto.h +bdb/include/qam_ext.h +bdb/include/rpc_client_ext.h +bdb/include/rpc_server_ext.h +bdb/include/tcl_ext.h +bdb/include/txn_auto.h +bdb/include/txn_ext.h +bdb/include/xa_ext.h +bdb/java/src/com/sleepycat/db/Db.java +bdb/java/src/com/sleepycat/db/DbBtreeStat.java +bdb/java/src/com/sleepycat/db/DbConstants.java +bdb/java/src/com/sleepycat/db/DbHashStat.java +bdb/java/src/com/sleepycat/db/DbLockStat.java +bdb/java/src/com/sleepycat/db/DbLogStat.java +bdb/java/src/com/sleepycat/db/DbMpoolFStat.java +bdb/java/src/com/sleepycat/db/DbQueueStat.java +bdb/java/src/com/sleepycat/db/DbRepStat.java +bdb/java/src/com/sleepycat/db/DbTxnStat.java +bdb/libdb_java/java_stat_auto.c +bdb/libdb_java/java_stat_auto.h +bdb/log/log_auto.c +bdb/qam/qam_auto.c +bdb/rpc_client/db_server_clnt.c +bdb/rpc_client/gen_client.c +bdb/rpc_server/c/db_server_proc.c +bdb/rpc_server/c/db_server_proc.sed +bdb/rpc_server/c/db_server_svc.c +bdb/rpc_server/c/db_server_xdr.c +bdb/rpc_server/c/gen_db_server.c +bdb/rpc_server/db_server.x +bdb/rpc_server/db_server_proc.sed +bdb/rpc_server/db_server_svc.c +bdb/rpc_server/db_server_xdr.c +bdb/rpc_server/gen_db_server.c +bdb/test/TESTS +bdb/test/include.tcl +bdb/test/logtrack.list +bdb/txn/txn_auto.c +binary/* +bkpull.log +bkpull.log* +bkpull.log.2 +bkpull.log.3 +bkpull.log.4 +bkpull.log.5 +bkpull.log.6 +bkpush.log +bkpush.log* +build.log +build_debug +build_install +build_release +build_tags.sh +client/#mysql.cc# +client/*.ds? +client/*.vcproj +client/.deps/base64.Po +client/.deps/completion_hash.Po +client/.deps/dummy.Po +client/.deps/mf_tempdir.Po +client/.deps/my_bit.Po +client/.deps/my_bitmap.Po +client/.deps/my_getsystime.Po +client/.deps/my_new.Po +client/.deps/my_user.Po +client/.deps/my_vle.Po +client/.deps/mysql.Po +client/.deps/mysql_upgrade.Po +client/.deps/mysqladmin.Po +client/.deps/mysqlbinlog.Po +client/.deps/mysqlcheck.Po +client/.deps/mysqldump.Po +client/.deps/mysqlimport.Po +client/.deps/mysqlshow.Po +client/.deps/mysqlslap.Po +client/.deps/mysqltest.Po +client/.deps/readline.Po +client/.deps/sql_string.Po +client/.libs -prune +client/.libs/lt-mysql +client/.libs/lt-mysqladmin +client/.libs/lt-mysqlbinlog +client/.libs/lt-mysqlcheck +client/.libs/lt-mysqldump +client/.libs/lt-mysqlimport +client/.libs/lt-mysqlshow +client/.libs/lt-mysqlslap +client/.libs/lt-mysqltest +client/.libs/mysql +client/.libs/mysql_upgrade +client/.libs/mysqladmin +client/.libs/mysqlbinlog +client/.libs/mysqlcheck +client/.libs/mysqldump +client/.libs/mysqlimport +client/.libs/mysqlshow +client/.libs/mysqlslap +client/.libs/mysqltest +client/completion_hash.cpp +client/decimal.c +client/insert_test +client/link_sources +client/log_event.cc +client/log_event.h +client/log_event_old.cc +client/log_event_old.h +client/mf_iocache.c +client/mf_iocache.cc +client/my_decimal.cc +client/my_decimal.h +client/my_user.c +client/mysql +client/mysql.cpp +client/mysql_upgrade +client/mysqladmin +client/mysqladmin.c +client/mysqladmin.cpp +client/mysqlbinlog +client/mysqlbinlog.cpp +client/mysqlcheck +client/mysqldump +client/mysqlimport +client/mysqlmanager-pwgen +client/mysqlmanagerc +client/mysqlshow +client/mysqlslap +client/mysqltest +client/mysqltestmanager-pwgen +client/mysqltestmanagerc +client/mysys_priv.h +client/readline.cpp +client/rpl_constants.h +client/rpl_record_old.cc +client/rpl_record_old.h +client/rpl_tblmap.h +client/rpl_tblmap.cc +client/rpl_utility.h +client/rpl_utility.cc +client/select_test +client/sql_const.h +client/sql_string.cpp +client/ssl_test +client/thimble +client/thread_test +client/tmp.diff +client_debug/* +client_release/* +client_test +cmake_install.cmake +cmd-line-utils/libedit/.deps/chared.Po +cmd-line-utils/libedit/.deps/common.Po +cmd-line-utils/libedit/.deps/el.Po +cmd-line-utils/libedit/.deps/emacs.Po +cmd-line-utils/libedit/.deps/fcns.Po +cmd-line-utils/libedit/.deps/fgetln.Po +cmd-line-utils/libedit/.deps/help.Po +cmd-line-utils/libedit/.deps/hist.Po +cmd-line-utils/libedit/.deps/history.Po +cmd-line-utils/libedit/.deps/key.Po +cmd-line-utils/libedit/.deps/map.Po +cmd-line-utils/libedit/.deps/parse.Po +cmd-line-utils/libedit/.deps/prompt.Po +cmd-line-utils/libedit/.deps/read.Po +cmd-line-utils/libedit/.deps/readline.Po +cmd-line-utils/libedit/.deps/refresh.Po +cmd-line-utils/libedit/.deps/search.Po +cmd-line-utils/libedit/.deps/sig.Po +cmd-line-utils/libedit/.deps/strlcat.Po +cmd-line-utils/libedit/.deps/strlcpy.Po +cmd-line-utils/libedit/.deps/term.Po +cmd-line-utils/libedit/.deps/tokenizer.Po +cmd-line-utils/libedit/.deps/tty.Po +cmd-line-utils/libedit/.deps/unvis.Po +cmd-line-utils/libedit/.deps/vi.Po +cmd-line-utils/libedit/.deps/vis.Po +cmd-line-utils/libedit/common.h +cmd-line-utils/libedit/makelist +cmd-line-utils/readline/.deps/bind.Po +cmd-line-utils/readline/.deps/callback.Po +cmd-line-utils/readline/.deps/compat.Po +cmd-line-utils/readline/.deps/complete.Po +cmd-line-utils/readline/.deps/display.Po +cmd-line-utils/readline/.deps/funmap.Po +cmd-line-utils/readline/.deps/histexpand.Po +cmd-line-utils/readline/.deps/histfile.Po +cmd-line-utils/readline/.deps/history.Po +cmd-line-utils/readline/.deps/histsearch.Po +cmd-line-utils/readline/.deps/input.Po +cmd-line-utils/readline/.deps/isearch.Po +cmd-line-utils/readline/.deps/keymaps.Po +cmd-line-utils/readline/.deps/kill.Po +cmd-line-utils/readline/.deps/macro.Po +cmd-line-utils/readline/.deps/mbutil.Po +cmd-line-utils/readline/.deps/misc.Po +cmd-line-utils/readline/.deps/nls.Po +cmd-line-utils/readline/.deps/parens.Po +cmd-line-utils/readline/.deps/readline.Po +cmd-line-utils/readline/.deps/rltty.Po +cmd-line-utils/readline/.deps/savestring.Po +cmd-line-utils/readline/.deps/search.Po +cmd-line-utils/readline/.deps/shell.Po +cmd-line-utils/readline/.deps/signals.Po +cmd-line-utils/readline/.deps/terminal.Po +cmd-line-utils/readline/.deps/text.Po +cmd-line-utils/readline/.deps/tilde.Po +cmd-line-utils/readline/.deps/undo.Po +cmd-line-utils/readline/.deps/util.Po +cmd-line-utils/readline/.deps/vi_mode.Po +cmd-line-utils/readline/.deps/xmalloc.Po +comon.h +comp_err/*.ds? +comp_err/*.vcproj +compile +config.cache +config.guess +config.h +config.h.in +config.log +config.status +config.sub +configure +configure.lineno +contrib/*.ds? +contrib/*.vcproj +core +core.* +cscope.in.out +cscope.out +cscope.po.out +db-*.*.* +dbug/*.ds? +dbug/*.vcproj +dbug/.deps/dbug.Po +dbug/.deps/dbug_analyze.Po +dbug/.deps/factorial.Po +dbug/.deps/my_main.Po +dbug/.deps/sanity.Po +dbug/dbug_analyze +dbug/example*.r +dbug/factorial +dbug/factorial.r +dbug/main.r +dbug/output*.r +dbug/user.ps +dbug/user.t +debian/control +debian/defs.mk +depcomp +emacs.h +examples/*.ds? +examples/*.vcproj +examples/udf_example/udf_example.def +extra/.deps/charset2html.Po +extra/.deps/comp_err.Po +extra/.deps/innochecksum.Po +extra/.deps/my_print_defaults.Po +extra/.deps/mysql_waitpid.Po +extra/.deps/perror.Po +extra/.deps/replace.Po +extra/.deps/resolve_stack_dump.Po +extra/.deps/resolveip.Po +extra/charset2html +extra/comp_err +extra/created_include_files +extra/innochecksum +extra/my_print_defaults +extra/mysql_install +extra/mysql_tzinfo_to_sql +extra/mysql_waitpid +extra/mysqld_ername.h +extra/mysqld_error.h +extra/perror +extra/replace +extra/resolve_stack_dump +extra/resolveip +extra/sql_state.h +extra/tztime.cc +extra/yassl/src/.deps/buffer.Plo +extra/yassl/src/.deps/cert_wrapper.Plo +extra/yassl/src/.deps/crypto_wrapper.Plo +extra/yassl/src/.deps/handshake.Plo +extra/yassl/src/.deps/lock.Plo +extra/yassl/src/.deps/log.Plo +extra/yassl/src/.deps/socket_wrapper.Plo +extra/yassl/src/.deps/ssl.Plo +extra/yassl/src/.deps/template_instnt.Plo +extra/yassl/src/.deps/timer.Plo +extra/yassl/src/.deps/yassl_error.Plo +extra/yassl/src/.deps/yassl_imp.Plo +extra/yassl/src/.deps/yassl_int.Plo +extra/yassl/taocrypt/benchmark/.deps/benchmark-benchmark.Po +extra/yassl/taocrypt/benchmark/benchmark +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-aes.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-aestables.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-algebra.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-arc4.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-asn.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-bftables.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-blowfish.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-coding.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-des.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-dh.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-dsa.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-file.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-hash.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-integer.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-md2.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-md4.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-md5.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-misc.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-random.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-ripemd.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-rsa.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-sha.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-template_instnt.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-tftables.Plo +extra/yassl/taocrypt/src/.deps/libtaocrypt_la-twofish.Plo +extra/yassl/taocrypt/test/.deps/test-test.Po +extra/yassl/taocrypt/test/test +extra/yassl/testsuite/.deps/testsuite-client.Po +extra/yassl/testsuite/.deps/testsuite-echoclient.Po +extra/yassl/testsuite/.deps/testsuite-echoserver.Po +extra/yassl/testsuite/.deps/testsuite-server.Po +extra/yassl/testsuite/.deps/testsuite-test.Po +extra/yassl/testsuite/.deps/testsuite-testsuite.Po +extra/yassl/testsuite/testsuite +fcns.c +fcns.h +gdbinit +gmon.out +hardcopy.0 +heap/*.ds? +heap/*.vcproj +heap/hp_test1 +heap/hp_test2 +help +help.c +help.h +include/abi_check +include/check_abi +include/link_sources +include/my_config.h +include/my_global.h +include/mysql_h.ic +include/mysql_version.h +include/mysqld_ername.h +include/mysqld_error.h +include/mysqld_error.h.rule +include/openssl +include/probes_mysql_dtrace.h +include/readline +include/readline/*.h +include/readline/readline.h +include/sql_state.h +include/widec.h +innobase/*.ds? +innobase/*.vcproj +innobase/autom4te-2.53.cache/* +innobase/autom4te-2.53.cache/output.0 +innobase/autom4te-2.53.cache/requests +innobase/autom4te-2.53.cache/traces.0 +innobase/autom4te.cache/* +innobase/autom4te.cache/output.0 +innobase/autom4te.cache/requests +innobase/autom4te.cache/traces.0 +innobase/configure.lineno +innobase/conftest.s1 +innobase/conftest.subs +innobase/ib_config.h +innobase/ib_config.h.in +innobase/mkinstalldirs +innobase/stamp-h1 +insert_test +install +install-sh +isam/*.ds? +isam/*.vcproj +isam/isamchk +isam/isamlog +isam/pack_isam +isam/test1 +isam/test2 +isam/test3 +isamchk/*.ds? +isamchk/*.vcproj +item_xmlfunc.cc +lib_debug/* +lib_release/* +libmysql/*.c +libmysql/*.ds? +libmysql/*.vcproj +libmysql/.deps/array.Plo +libmysql/.deps/bchange.Plo +libmysql/.deps/bcmp.Plo +libmysql/.deps/bmove.Plo +libmysql/.deps/bmove_upp.Plo +libmysql/.deps/charset-def.Plo +libmysql/.deps/charset.Plo +libmysql/.deps/client.Plo +libmysql/.deps/conf_to_src.Po +libmysql/.deps/ctype-big5.Plo +libmysql/.deps/ctype-bin.Plo +libmysql/.deps/ctype-cp932.Plo +libmysql/.deps/ctype-czech.Plo +libmysql/.deps/ctype-euc_kr.Plo +libmysql/.deps/ctype-eucjpms.Plo +libmysql/.deps/ctype-extra.Plo +libmysql/.deps/ctype-gb2312.Plo +libmysql/.deps/ctype-gbk.Plo +libmysql/.deps/ctype-latin1.Plo +libmysql/.deps/ctype-mb.Plo +libmysql/.deps/ctype-simple.Plo +libmysql/.deps/ctype-sjis.Plo +libmysql/.deps/ctype-tis620.Plo +libmysql/.deps/ctype-uca.Plo +libmysql/.deps/ctype-ucs2.Plo +libmysql/.deps/ctype-ujis.Plo +libmysql/.deps/ctype-utf8.Plo +libmysql/.deps/ctype-win1250ch.Plo +libmysql/.deps/ctype.Plo +libmysql/.deps/dbug.Plo +libmysql/.deps/default.Plo +libmysql/.deps/default_modify.Plo +libmysql/.deps/errmsg.Plo +libmysql/.deps/errors.Plo +libmysql/.deps/get_password.Plo +libmysql/.deps/hash.Plo +libmysql/.deps/int2str.Plo +libmysql/.deps/is_prefix.Plo +libmysql/.deps/libmysql.Plo +libmysql/.deps/list.Plo +libmysql/.deps/llstr.Plo +libmysql/.deps/longlong2str.Plo +libmysql/.deps/manager.Plo +libmysql/.deps/md5.Plo +libmysql/.deps/mf_cache.Plo +libmysql/.deps/mf_dirname.Plo +libmysql/.deps/mf_fn_ext.Plo +libmysql/.deps/mf_format.Plo +libmysql/.deps/mf_iocache.Plo +libmysql/.deps/mf_iocache2.Plo +libmysql/.deps/mf_loadpath.Plo +libmysql/.deps/mf_pack.Plo +libmysql/.deps/mf_path.Plo +libmysql/.deps/mf_tempfile.Plo +libmysql/.deps/mf_unixpath.Plo +libmysql/.deps/mf_wcomp.Plo +libmysql/.deps/mulalloc.Plo +libmysql/.deps/my_alloc.Plo +libmysql/.deps/my_chsize.Plo +libmysql/.deps/my_compress.Plo +libmysql/.deps/my_create.Plo +libmysql/.deps/my_delete.Plo +libmysql/.deps/my_div.Plo +libmysql/.deps/my_error.Plo +libmysql/.deps/my_file.Plo +libmysql/.deps/my_fopen.Plo +libmysql/.deps/my_fstream.Plo +libmysql/.deps/my_gethostbyname.Plo +libmysql/.deps/my_getopt.Plo +libmysql/.deps/my_getwd.Plo +libmysql/.deps/my_init.Plo +libmysql/.deps/my_lib.Plo +libmysql/.deps/my_malloc.Plo +libmysql/.deps/my_messnc.Plo +libmysql/.deps/my_net.Plo +libmysql/.deps/my_once.Plo +libmysql/.deps/my_open.Plo +libmysql/.deps/my_port.Plo +libmysql/.deps/my_pread.Plo +libmysql/.deps/my_pthread.Plo +libmysql/.deps/my_read.Plo +libmysql/.deps/my_realloc.Plo +libmysql/.deps/my_rename.Plo +libmysql/.deps/my_seek.Plo +libmysql/.deps/my_sleep.Plo +libmysql/.deps/my_static.Plo +libmysql/.deps/my_strtoll10.Plo +libmysql/.deps/my_symlink.Plo +libmysql/.deps/my_thr_init.Plo +libmysql/.deps/my_time.Plo +libmysql/.deps/my_vsnprintf.Plo +libmysql/.deps/my_write.Plo +libmysql/.deps/net.Plo +libmysql/.deps/pack.Plo +libmysql/.deps/password.Plo +libmysql/.deps/safemalloc.Plo +libmysql/.deps/sha1.Plo +libmysql/.deps/str2int.Plo +libmysql/.deps/str_alloc.Plo +libmysql/.deps/strcend.Plo +libmysql/.deps/strcont.Plo +libmysql/.deps/strend.Plo +libmysql/.deps/strfill.Plo +libmysql/.deps/string.Plo +libmysql/.deps/strinstr.Plo +libmysql/.deps/strmake.Plo +libmysql/.deps/strmov.Plo +libmysql/.deps/strnlen.Plo +libmysql/.deps/strnmov.Plo +libmysql/.deps/strtod.Plo +libmysql/.deps/strtoll.Plo +libmysql/.deps/strtoull.Plo +libmysql/.deps/strxmov.Plo +libmysql/.deps/strxnmov.Plo +libmysql/.deps/thr_mutex.Plo +libmysql/.deps/typelib.Plo +libmysql/.deps/vio.Plo +libmysql/.deps/viosocket.Plo +libmysql/.deps/viossl.Plo +libmysql/.deps/viosslfactories.Plo +libmysql/.deps/xml.Plo +libmysql/.libs/libmysqlclient.lai +libmysql/.libs/libmysqlclient.so.15 +libmysql/.libs/libmysqlclient.so.15.0.0 +libmysql/conf_to_src +libmysql/debug/libmysql.exp +libmysql/libmysql.ver +libmysql/link_sources +libmysql/my_static.h +libmysql/my_time.c +libmysql/mysys_priv.h +libmysql/net.c +libmysql/release/libmysql.exp +libmysql/vio_priv.h +libmysql/viosocket.o.6WmSJk +libmysql_r/*.c +libmysql_r/.deps/array.Plo +libmysql_r/.deps/bchange.Plo +libmysql_r/.deps/bcmp.Plo +libmysql_r/.deps/bmove.Plo +libmysql_r/.deps/bmove_upp.Plo +libmysql_r/.deps/charset-def.Plo +libmysql_r/.deps/charset.Plo +libmysql_r/.deps/client.Plo +libmysql_r/.deps/conf_to_src.Po +libmysql_r/.deps/ctype-big5.Plo +libmysql_r/.deps/ctype-bin.Plo +libmysql_r/.deps/ctype-cp932.Plo +libmysql_r/.deps/ctype-czech.Plo +libmysql_r/.deps/ctype-euc_kr.Plo +libmysql_r/.deps/ctype-eucjpms.Plo +libmysql_r/.deps/ctype-extra.Plo +libmysql_r/.deps/ctype-gb2312.Plo +libmysql_r/.deps/ctype-gbk.Plo +libmysql_r/.deps/ctype-latin1.Plo +libmysql_r/.deps/ctype-mb.Plo +libmysql_r/.deps/ctype-simple.Plo +libmysql_r/.deps/ctype-sjis.Plo +libmysql_r/.deps/ctype-tis620.Plo +libmysql_r/.deps/ctype-uca.Plo +libmysql_r/.deps/ctype-ucs2.Plo +libmysql_r/.deps/ctype-ujis.Plo +libmysql_r/.deps/ctype-utf8.Plo +libmysql_r/.deps/ctype-win1250ch.Plo +libmysql_r/.deps/ctype.Plo +libmysql_r/.deps/dbug.Plo +libmysql_r/.deps/default.Plo +libmysql_r/.deps/default_modify.Plo +libmysql_r/.deps/errmsg.Plo +libmysql_r/.deps/errors.Plo +libmysql_r/.deps/get_password.Plo +libmysql_r/.deps/hash.Plo +libmysql_r/.deps/int2str.Plo +libmysql_r/.deps/is_prefix.Plo +libmysql_r/.deps/libmysql.Plo +libmysql_r/.deps/list.Plo +libmysql_r/.deps/llstr.Plo +libmysql_r/.deps/longlong2str.Plo +libmysql_r/.deps/manager.Plo +libmysql_r/.deps/md5.Plo +libmysql_r/.deps/mf_cache.Plo +libmysql_r/.deps/mf_dirname.Plo +libmysql_r/.deps/mf_fn_ext.Plo +libmysql_r/.deps/mf_format.Plo +libmysql_r/.deps/mf_iocache.Plo +libmysql_r/.deps/mf_iocache2.Plo +libmysql_r/.deps/mf_loadpath.Plo +libmysql_r/.deps/mf_pack.Plo +libmysql_r/.deps/mf_path.Plo +libmysql_r/.deps/mf_tempfile.Plo +libmysql_r/.deps/mf_unixpath.Plo +libmysql_r/.deps/mf_wcomp.Plo +libmysql_r/.deps/mulalloc.Plo +libmysql_r/.deps/my_alloc.Plo +libmysql_r/.deps/my_chsize.Plo +libmysql_r/.deps/my_compress.Plo +libmysql_r/.deps/my_create.Plo +libmysql_r/.deps/my_delete.Plo +libmysql_r/.deps/my_div.Plo +libmysql_r/.deps/my_error.Plo +libmysql_r/.deps/my_file.Plo +libmysql_r/.deps/my_fopen.Plo +libmysql_r/.deps/my_fstream.Plo +libmysql_r/.deps/my_gethostbyname.Plo +libmysql_r/.deps/my_getopt.Plo +libmysql_r/.deps/my_getwd.Plo +libmysql_r/.deps/my_init.Plo +libmysql_r/.deps/my_lib.Plo +libmysql_r/.deps/my_malloc.Plo +libmysql_r/.deps/my_messnc.Plo +libmysql_r/.deps/my_net.Plo +libmysql_r/.deps/my_once.Plo +libmysql_r/.deps/my_open.Plo +libmysql_r/.deps/my_port.Plo +libmysql_r/.deps/my_pread.Plo +libmysql_r/.deps/my_pthread.Plo +libmysql_r/.deps/my_read.Plo +libmysql_r/.deps/my_realloc.Plo +libmysql_r/.deps/my_rename.Plo +libmysql_r/.deps/my_seek.Plo +libmysql_r/.deps/my_sleep.Plo +libmysql_r/.deps/my_static.Plo +libmysql_r/.deps/my_strtoll10.Plo +libmysql_r/.deps/my_symlink.Plo +libmysql_r/.deps/my_thr_init.Plo +libmysql_r/.deps/my_time.Plo +libmysql_r/.deps/my_vsnprintf.Plo +libmysql_r/.deps/my_write.Plo +libmysql_r/.deps/net.Plo +libmysql_r/.deps/pack.Plo +libmysql_r/.deps/password.Plo +libmysql_r/.deps/safemalloc.Plo +libmysql_r/.deps/sha1.Plo +libmysql_r/.deps/str2int.Plo +libmysql_r/.deps/str_alloc.Plo +libmysql_r/.deps/strcend.Plo +libmysql_r/.deps/strcont.Plo +libmysql_r/.deps/strend.Plo +libmysql_r/.deps/strfill.Plo +libmysql_r/.deps/string.Plo +libmysql_r/.deps/strinstr.Plo +libmysql_r/.deps/strmake.Plo +libmysql_r/.deps/strmov.Plo +libmysql_r/.deps/strnlen.Plo +libmysql_r/.deps/strnmov.Plo +libmysql_r/.deps/strtod.Plo +libmysql_r/.deps/strtoll.Plo +libmysql_r/.deps/strtoull.Plo +libmysql_r/.deps/strxmov.Plo +libmysql_r/.deps/strxnmov.Plo +libmysql_r/.deps/thr_mutex.Plo +libmysql_r/.deps/typelib.Plo +libmysql_r/.deps/vio.Plo +libmysql_r/.deps/viosocket.Plo +libmysql_r/.deps/viossl.Plo +libmysql_r/.deps/viosslfactories.Plo +libmysql_r/.deps/xml.Plo +libmysql_r/.libs/libmysqlclient_r.lai +libmysql_r/.libs/libmysqlclient_r.so.15 +libmysql_r/.libs/libmysqlclient_r.so.15.0.0 +libmysql_r/acconfig.h +libmysql_r/client_settings.h +libmysql_r/conf_to_src +libmysql_r/link_sources +libmysql_r/my_static.h +libmysql_r/mysys_priv.h +libmysql_r/vio_priv.h +libmysqld/*.ds? +libmysqld/*.vcproj +libmysqld/.deps/client.Po +libmysqld/.deps/derror.Po +libmysqld/.deps/discover.Po +libmysqld/.deps/emb_qcache.Po +libmysqld/.deps/errmsg.Po +libmysqld/.deps/event_data_objects.Po +libmysqld/.deps/event_db_repository.Po +libmysqld/.deps/event_queue.Po +libmysqld/.deps/event_scheduler.Po +libmysqld/.deps/events.Po +libmysqld/.deps/field.Po +libmysqld/.deps/field_conv.Po +libmysqld/.deps/filesort.Po +libmysqld/.deps/get_password.Po +libmysqld/.deps/gstream.Po +libmysqld/.deps/ha_berkeley.Po +libmysqld/.deps/ha_federated.Po +libmysqld/.deps/ha_heap.Po +libmysqld/.deps/ha_innodb.Po +libmysqld/.deps/ha_myisam.Po +libmysqld/.deps/ha_myisammrg.Po +libmysqld/.deps/ha_ndbcluster.Po +libmysqld/.deps/ha_ndbcluster_binlog.Po +libmysqld/.deps/ha_partition.Po +libmysqld/.deps/handler.Po +libmysqld/.deps/hash_filo.Po +libmysqld/.deps/hostname.Po +libmysqld/.deps/init.Po +libmysqld/.deps/item.Po +libmysqld/.deps/item_buff.Po +libmysqld/.deps/item_cmpfunc.Po +libmysqld/.deps/item_create.Po +libmysqld/.deps/item_func.Po +libmysqld/.deps/item_geofunc.Po +libmysqld/.deps/item_row.Po +libmysqld/.deps/item_strfunc.Po +libmysqld/.deps/item_subselect.Po +libmysqld/.deps/item_sum.Po +libmysqld/.deps/item_timefunc.Po +libmysqld/.deps/item_uniq.Po +libmysqld/.deps/item_xmlfunc.Po +libmysqld/.deps/key.Po +libmysqld/.deps/lib_sql.Po +libmysqld/.deps/libmysql.Po +libmysqld/.deps/libmysqld.Po +libmysqld/.deps/lock.Po +libmysqld/.deps/log.Po +libmysqld/.deps/log_event.Po +libmysqld/.deps/my_decimal.Po +libmysqld/.deps/my_time.Po +libmysqld/.deps/my_user.Po +libmysqld/.deps/net_serv.Po +libmysqld/.deps/opt_range.Po +libmysqld/.deps/opt_sum.Po +libmysqld/.deps/pack.Po +libmysqld/.deps/parse_file.Po +libmysqld/.deps/partition_info.Po +libmysqld/.deps/password.Po +libmysqld/.deps/procedure.Po +libmysqld/.deps/protocol.Po +libmysqld/.deps/records.Po +libmysqld/.deps/rpl_filter.Po +libmysqld/.deps/rpl_injector.Po +libmysqld/.deps/set_var.Po +libmysqld/.deps/sp.Po +libmysqld/.deps/sp_cache.Po +libmysqld/.deps/sp_head.Po +libmysqld/.deps/sp_pcontext.Po +libmysqld/.deps/sp_rcontext.Po +libmysqld/.deps/spatial.Po +libmysqld/.deps/sql_acl.Po +libmysqld/.deps/sql_analyse.Po +libmysqld/.deps/sql_base.Po +libmysqld/.deps/sql_builtin.Po +libmysqld/.deps/sql_cache.Po +libmysqld/.deps/sql_class.Po +libmysqld/.deps/sql_crypt.Po +libmysqld/.deps/sql_cursor.Po +libmysqld/.deps/sql_db.Po +libmysqld/.deps/sql_delete.Po +libmysqld/.deps/sql_truncate.Po +libmysqld/.deps/sql_reload.Po +libmysqld/.deps/datadict.Po +libmysqld/.deps/sql_derived.Po +libmysqld/.deps/sql_do.Po +libmysqld/.deps/sql_error.Po +libmysqld/.deps/sql_handler.Po +libmysqld/.deps/sql_help.Po +libmysqld/.deps/sql_insert.Po +libmysqld/.deps/sql_lex.Po +libmysqld/.deps/sql_list.Po +libmysqld/.deps/sql_load.Po +libmysqld/.deps/sql_manager.Po +libmysqld/.deps/sql_map.Po +libmysqld/.deps/sql_parse.Po +libmysqld/.deps/sql_partition.Po +libmysqld/.deps/sql_plugin.Po +libmysqld/.deps/sql_prepare.Po +libmysqld/.deps/sql_rename.Po +libmysqld/.deps/sql_select.Po +libmysqld/.deps/sql_show.Po +libmysqld/.deps/sql_state.Po +libmysqld/.deps/sql_string.Po +libmysqld/.deps/sql_table.Po +libmysqld/.deps/sql_tablespace.Po +libmysqld/.deps/sql_test.Po +libmysqld/.deps/sql_trigger.Po +libmysqld/.deps/sql_udf.Po +libmysqld/.deps/sql_union.Po +libmysqld/.deps/sql_update.Po +libmysqld/.deps/sql_view.Po +libmysqld/.deps/sql_yacc.Po +libmysqld/.deps/stacktrace.Po +libmysqld/.deps/strfunc.Po +libmysqld/.deps/table.Po +libmysqld/.deps/thr_malloc.Po +libmysqld/.deps/time.Po +libmysqld/.deps/tztime.Po +libmysqld/.deps/uniques.Po +libmysqld/.deps/unireg.Po +libmysqld/backup_dir +libmysqld/client.c +libmysqld/client_settings.h +libmysqld/cmake_dummy.c +libmysqld/convert.cc +libmysqld/derror.cc +libmysqld/discover.cc +libmysqld/emb_qcache.cpp +libmysqld/errmsg.c +libmysqld/event.cc +libmysqld/event_data_objects.cc +libmysqld/event_db_repository.cc +libmysqld/event_executor.cc +libmysqld/event_queue.cc +libmysqld/event_scheduler.cc +libmysqld/event_timed.cc +libmysqld/events.cc +libmysqld/examples/.deps/completion_hash.Po +libmysqld/examples/.deps/mysql.Po +libmysqld/examples/.deps/mysql_client_test.Po +libmysqld/examples/.deps/mysqltest.Po +libmysqld/examples/.deps/readline.Po +libmysqld/examples/client_test.c +libmysqld/examples/client_test.cc +libmysqld/examples/completion_hash.cc +libmysqld/examples/completion_hash.h +libmysqld/examples/link_sources +libmysqld/examples/my_readline.h +libmysqld/examples/mysql +libmysqld/examples/mysql.cc +libmysqld/examples/mysql_client_test.c +libmysqld/examples/mysql_client_test_embedded +libmysqld/examples/mysqltest +libmysqld/examples/mysqltest.c +libmysqld/examples/mysqltest_embedded +libmysqld/examples/readline.cc +libmysqld/examples/sql_string.cc +libmysqld/examples/sql_string.h +libmysqld/examples/test-gdbinit +libmysqld/field.cc +libmysqld/field_conv.cc +libmysqld/filesort.cc +libmysqld/get_password.c +libmysqld/gstream.cc +libmysqld/ha_archive.cc +libmysqld/ha_berkeley.cc +libmysqld/ha_blackhole.cc +libmysqld/ha_example.cc +libmysqld/ha_federated.cc +libmysqld/ha_heap.cc +libmysqld/ha_innobase.cc +libmysqld/ha_innodb.cc +libmysqld/ha_isam.cc +libmysqld/ha_isammrg.cc +libmysqld/ha_myisam.cc +libmysqld/ha_myisammrg.cc +libmysqld/ha_ndbcluster.cc +libmysqld/ha_ndbcluster_binlog.cc +libmysqld/ha_ndbcluster_cond.cc +libmysqld/ha_partition.cc +libmysqld/ha_tina.cc +libmysqld/handler.cc +libmysqld/handlerton.cc +libmysqld/hash_filo.cc +libmysqld/hostname.cc +libmysqld/init.cc +libmysqld/item.cc +libmysqld/item_buff.cc +libmysqld/item_cmpfunc.cc +libmysqld/item_create.cc +libmysqld/item_func.cc +libmysqld/item_geofunc.cc +libmysqld/item_row.cc +libmysqld/item_strfunc.cc +libmysqld/item_subselect.cc +libmysqld/item_sum.cc +libmysqld/item_timefunc.cc +libmysqld/item_uniq.cc +libmysqld/key.cc +libmysqld/lex_hash.h +libmysqld/lib_sql.cpp +libmysqld/libmysql.c +libmysqld/link_sources +libmysqld/lock.cc +libmysqld/log.cc +libmysqld/log_event.cc +libmysqld/log_event_old.cc +libmysqld/md5.c +libmysqld/message.h +libmysqld/message.rc +libmysqld/mf_iocache.cc +libmysqld/mini_client.cc +libmysqld/my_decimal.cc +libmysqld/my_time.c +libmysqld/my_user.c +libmysqld/net_pkg.cc +libmysqld/net_serv.cc +libmysqld/opt_ft.cc +libmysqld/opt_range.cc +libmysqld/opt_sum.cc +libmysqld/pack.c +libmysqld/parse_file.cc +libmysqld/partition_info.cc +libmysqld/password.c +libmysqld/procedure.cc +libmysqld/protocol.cc +libmysqld/protocol_cursor.cc +libmysqld/records.cc +libmysqld/repl_failsafe.cc +libmysqld/rpl_filter.cc +libmysqld/rpl_handler.cc +libmysqld/rpl_injector.cc +libmysqld/rpl_record.cc +libmysqld/rpl_record_old.cc +libmysqld/rpl_utility.cc +libmysqld/scheduler.cc +libmysqld/set_var.cc +libmysqld/sha2.cc +libmysqld/simple-test +libmysqld/slave.cc +libmysqld/sp.cc +libmysqld/sp_cache.cc +libmysqld/sp_head.cc +libmysqld/sp_pcontext.cc +libmysqld/sp_rcontext.cc +libmysqld/spatial.cc +libmysqld/sql_acl.cc +libmysqld/sql_analyse.cc +libmysqld/sql_base.cc +libmysqld/sql_builtin.cc +libmysqld/sql_cache.cc +libmysqld/sql_class.cc +libmysqld/sql_command +libmysqld/sql_connect.cc +libmysqld/sql_crypt.cc +libmysqld/sql_cursor.cc +libmysqld/sql_cursor.h +libmysqld/sql_db.cc +libmysqld/sql_delete.cc +libmysqld/sql_truncate.cc +libmysqld/sql_reload.cc +libmysqld/datadict.cc +libmysqld/sql_derived.cc +libmysqld/sql_do.cc +libmysqld/sql_error.cc +libmysqld/sql_handler.cc +libmysqld/sql_help.cc +libmysqld/sql_insert.cc +libmysqld/sql_lex.cc +libmysqld/sql_list.cc +libmysqld/sql_load.cc +libmysqld/sql_locale.cc +libmysqld/sql_manager.cc +libmysqld/sql_map.cc +libmysqld/sql_olap.cc +libmysqld/sql_parse.cc +libmysqld/sql_partition.cc +libmysqld/sql_plugin.cc +libmysqld/sql_prepare.cc +libmysqld/sql_profile.cc +libmysqld/sql_rename.cc +libmysqld/sql_repl.cc +libmysqld/sql_select.cc +libmysqld/sql_servers.cc +libmysqld/sql_show.cc +libmysqld/sql_state.c +libmysqld/sql_string.cc +libmysqld/sql_table.cc +libmysqld/sql_tablespace.cc +libmysqld/sql_test.cc +libmysqld/sql_trigger.cc +libmysqld/sql_udf.cc +libmysqld/sql_union.cc +libmysqld/sql_unions.cc +libmysqld/sql_update.cc +libmysqld/sql_view.cc +libmysqld/sql_yacc.cc +libmysqld/sql_yacc.cpp +libmysqld/sql_yacc.h +libmysqld/stacktrace.c +libmysqld/strfunc.cc +libmysqld/table.cc +libmysqld/thr_malloc.cc +libmysqld/sql_time.cc +libmysqld/tztime.cc +libmysqld/uniques.cc +libmysqld/unireg.cc +libmysqltest/*.ds? +libmysqltest/*.vcproj +libmysqltest/mytest.c +libtool +linked_client_sources +linked_include_sources +linked_libmysql_r_sources +linked_libmysql_sources +linked_libmysqld_sources +linked_libmysqldex_sources +linked_server_sources +linked_tools_sources +locked +ltmain.sh +man/*.1 +merge/*.ds? +merge/*.vcproj +missing +mit-pthreads/config.flags +mit-pthreads/include/bits +mit-pthreads/include/pthread/machdep.h +mit-pthreads/include/pthread/posix.h +mit-pthreads/include/sys +mit-pthreads/machdep.c +mit-pthreads/pg++ +mit-pthreads/pgcc +mit-pthreads/syscall.S +mkinstalldirs +my_print_defaults/*.ds? +my_print_defaults/*.vcproj +myisam/*.ds? +myisam/*.vcproj +myisam/FT1.MYD +myisam/FT1.MYI +myisam/ft_dump +myisam/ft_eval +myisam/ft_test1 +myisam/ftbench/data +myisam/ftbench/t +myisam/ftbench/var/* +myisam/mi_test1 +myisam/mi_test2 +myisam/mi_test3 +myisam/mi_test_all +myisam/myisam.log +myisam/myisam_ftdump +myisam/myisamchk +myisam/myisamlog +myisam/myisampack +myisam/rt_test +myisam/rt_test.MYD +myisam/rt_test.MYI +myisam/sp_test +myisam/test1.MYD +myisam/test1.MYI +myisam/test2.MYD +myisam/test2.MYI +myisam_ftdump/*.ds? +myisam_ftdump/*.vcproj +myisamchk/*.ds? +myisamchk/*.vcproj +myisamlog/*.ds? +myisamlog/*.vcproj +myisammrg/*.ds? +myisammrg/*.vcproj +myisampack/*.ds? +myisampack/*.vcproj +mysql-4.0.2-alpha-pc-linux-gnu-i686.tar.gz +mysql-4.0.2-alpha.tar.gz +mysql-4.1.8-win-src.zip +mysql-5.0.2-alpha.tar.gz +mysql-max-4.0.2-alpha-pc-linux-gnu-i686.tar.gz +mysql-test/*.ds? +mysql-test/*.vcproj +mysql-test/.DS_Store +mysql-test/collections/default.release +mysql-test/collections/default.release.done +mysql-test/funcs_1.log +mysql-test/funcs_1.tar +mysql-test/gmon.out +mysql-test/install_test_db +mysql-test/lib/My/SafeProcess/my_safe_process +mysql-test/lib/init_db.sql +mysql-test/linux_sys_vars.inc +mysql-test/load_sysvars.inc +mysql-test/mtr +mysql-test/mysql-test-run +mysql-test/mysql-test-gcov.err +mysql-test/mysql-test-gcov.msg +mysql-test/mysql-test-run-shell +mysql-test/mysql-test-run.log +mysql-test/mysql_test_run_new +mysql-test/ndb/ndbcluster +mysql-test/partitions.log +mysql-test/r/*.err +mysql-test/r/*.log +mysql-test/r/*.out +mysql-test/r/*.reject +mysql-test/r/index_merge_load.result +mysql-test/r/max_allowed_packet_func.result +mysql-test/r/rpl000001.eval +mysql-test/r/rpl000002.eval +mysql-test/r/rpl000014.eval +mysql-test/r/rpl000015.eval +mysql-test/r/rpl000016.eval +mysql-test/r/rpl_log.eval +mysql-test/r/slave-running.eval +mysql-test/r/slave-stopped.eval +mysql-test/r/tmp.result +mysql-test/reg.log +mysql-test/rpl.log +mysql-test/share/mysql +mysql-test/std_data/*.pem +mysql-test/suite/funcs_1.tar.gz +mysql-test/suite/funcs_1.tar.zip +mysql-test/suite/funcs_1/r/innodb_trig_03e.warnings +mysql-test/suite/funcs_1/r/innodb_views.warnings +mysql-test/suite/funcs_1/r/memory_trig_03e.warnings +mysql-test/suite/funcs_1/r/memory_views.warnings +mysql-test/suite/funcs_1/r/myisam_trig_03e.warnings +mysql-test/suite/funcs_1/r/myisam_views.warnings +mysql-test/suite/funcs_1/r/ndb_trig_03e.warnings +mysql-test/suite/funcs_1/r/ndb_views.warnings +mysql-test/suite/partitions/r/dif +mysql-test/suite/partitions/r/diff +mysql-test/suite/partitions/r/partition.result +mysql-test/suite/partitions/r/partition_bit_ndb.warnings +mysql-test/suite/partitions/r/partition_special_innodb.warnings +mysql-test/suite/partitions/r/partition_special_myisam.warnings +mysql-test/suite/partitions/r/partition_t55.out +mysql-test/suite/partitions/r/partition_t55.refout +mysql-test/suite/partitions/t/partition.test +mysql-test/t/index_merge.load +mysql-test/t/tmp.test +mysql-test/var +mysql-test/var/* +mysql-test/windows_sys_vars.inc +mysql.kdevprj +mysql.proj +sql_priv.h +mysqlbinlog/*.ds? +mysqlbinlog/*.vcproj +mysqlcheck/*.ds? +mysqlcheck/*.vcproj +mysqld.S +mysqld.sym +mysqldemb/*.ds? +mysqldemb/*.vcproj +mysqlserver/*.ds? +mysqlserver/*.vcproj +mysys/#mf_iocache.c# +mysys/*.ds? +mysys/*.vcproj +mysys/.deps/array.Po +mysys/.deps/base64.Po +mysys/.deps/charset-def.Po +mysys/.deps/charset.Po +mysys/.deps/checksum.Po +mysys/.deps/default.Po +mysys/.deps/default_modify.Po +mysys/.deps/errors.Po +mysys/.deps/hash.Po +mysys/.deps/list.Po +mysys/.deps/md5.Po +mysys/.deps/mf_brkhant.Po +mysys/.deps/mf_cache.Po +mysys/.deps/mf_dirname.Po +mysys/.deps/mf_fn_ext.Po +mysys/.deps/mf_format.Po +mysys/.deps/mf_getdate.Po +mysys/.deps/mf_iocache.Po +mysys/.deps/mf_iocache2.Po +mysys/.deps/mf_keycache.Po +mysys/.deps/mf_keycaches.Po +mysys/.deps/mf_loadpath.Po +mysys/.deps/mf_pack.Po +mysys/.deps/mf_path.Po +mysys/.deps/mf_qsort.Po +mysys/.deps/mf_qsort2.Po +mysys/.deps/mf_radix.Po +mysys/.deps/mf_same.Po +mysys/.deps/mf_sort.Po +mysys/.deps/mf_strip.Po +mysys/.deps/mf_tempdir.Po +mysys/.deps/mf_tempfile.Po +mysys/.deps/mf_unixpath.Po +mysys/.deps/mf_wcomp.Po +mysys/.deps/mf_wfile.Po +mysys/.deps/mulalloc.Po +mysys/.deps/my_access.Po +mysys/.deps/my_aes.Po +mysys/.deps/my_alarm.Po +mysys/.deps/my_alloc.Po +mysys/.deps/my_append.Po +mysys/.deps/my_atomic.Po +mysys/.deps/my_bit.Po +mysys/.deps/my_bitmap.Po +mysys/.deps/my_chsize.Po +mysys/.deps/my_clock.Po +mysys/.deps/my_compress.Po +mysys/.deps/my_copy.Po +mysys/.deps/my_crc32.Po +mysys/.deps/my_create.Po +mysys/.deps/my_delete.Po +mysys/.deps/my_div.Po +mysys/.deps/my_dup.Po +mysys/.deps/my_error.Po +mysys/.deps/my_file.Po +mysys/.deps/my_fopen.Po +mysys/.deps/my_fstream.Po +mysys/.deps/my_gethostbyname.Po +mysys/.deps/my_gethwaddr.Po +mysys/.deps/my_getncpus.Po +mysys/.deps/my_getopt.Po +mysys/.deps/my_getsystime.Po +mysys/.deps/my_getwd.Po +mysys/.deps/my_handler.Po +mysys/.deps/my_init.Po +mysys/.deps/my_largepage.Po +mysys/.deps/my_lib.Po +mysys/.deps/my_libwrap.Po +mysys/.deps/my_lock.Po +mysys/.deps/my_lockmem.Po +mysys/.deps/my_lread.Po +mysys/.deps/my_lwrite.Po +mysys/.deps/my_malloc.Po +mysys/.deps/my_memmem.Po +mysys/.deps/my_messnc.Po +mysys/.deps/my_mkdir.Po +mysys/.deps/my_mmap.Po +mysys/.deps/my_net.Po +mysys/.deps/my_netware.Po +mysys/.deps/my_new.Po +mysys/.deps/my_once.Po +mysys/.deps/my_open.Po +mysys/.deps/my_port.Po +mysys/.deps/my_pread.Po +mysys/.deps/my_pthread.Po +mysys/.deps/my_quick.Po +mysys/.deps/my_read.Po +mysys/.deps/my_realloc.Po +mysys/.deps/my_redel.Po +mysys/.deps/my_rename.Po +mysys/.deps/my_seek.Po +mysys/.deps/my_semaphore.Po +mysys/.deps/my_sleep.Po +mysys/.deps/my_static.Po +mysys/.deps/my_symlink.Po +mysys/.deps/my_symlink2.Po +mysys/.deps/my_sync.Po +mysys/.deps/my_thr_init.Po +mysys/.deps/my_vle.Po +mysys/.deps/my_windac.Po +mysys/.deps/my_write.Po +mysys/.deps/ptr_cmp.Po +mysys/.deps/queues.Po +mysys/.deps/rijndael.Po +mysys/.deps/safemalloc.Po +mysys/.deps/sha1.Po +mysys/.deps/string.Po +mysys/.deps/thr_alarm.Po +mysys/.deps/thr_lock.Po +mysys/.deps/thr_mutex.Po +mysys/.deps/thr_rwlock.Po +mysys/.deps/tree.Po +mysys/.deps/trie.Po +mysys/.deps/typelib.Po +mysys/charset2html +mysys/getopt.c +mysys/getopt1.c +mysys/main.cc +mysys/my_new.cpp +mysys/raid.cpp +mysys/ste5KbMa +mysys/test_atomic +mysys/test_bitmap +mysys/test_charset +mysys/test_dir +mysys/test_gethwaddr +mysys/test_io_cache +mysys/test_thr_alarm +mysys/test_thr_lock +mysys/test_vsnprintf +mysys/testhash +ndb/bin/DbAsyncGenerator +ndb/bin/DbCreate +ndb/bin/acid +ndb/bin/async-lmc-bench-l-p10.sh +ndb/bin/async-lmc-bench-l.sh +ndb/bin/async-lmc-bench-p10.sh +ndb/bin/async-lmc-bench.sh +ndb/bin/atrt +ndb/bin/atrt-analyze-result.sh +ndb/bin/atrt-clear-result.sh +ndb/bin/atrt-gather-result.sh +ndb/bin/atrt-setup.sh +ndb/bin/bankCreator +ndb/bin/bankMakeGL +ndb/bin/bankSumAccounts +ndb/bin/bankTimer +ndb/bin/bankTransactionMaker +ndb/bin/bankValidateAllGLs +ndb/bin/basicTransporterTest +ndb/bin/benchronja +ndb/bin/bulk_copy +ndb/bin/copy_tab +ndb/bin/create_all_tabs +ndb/bin/create_index +ndb/bin/create_tab +ndb/bin/delete_all +ndb/bin/desc +ndb/bin/drop_all_tabs +ndb/bin/drop_index +ndb/bin/drop_tab +ndb/bin/flexAsynch +ndb/bin/flexBench +ndb/bin/flexHammer +ndb/bin/flexScan +ndb/bin/flexTT +ndb/bin/hugoCalculator +ndb/bin/hugoFill +ndb/bin/hugoLoad +ndb/bin/hugoLockRecords +ndb/bin/hugoPkDelete +ndb/bin/hugoPkRead +ndb/bin/hugoPkReadRecord +ndb/bin/hugoPkUpdate +ndb/bin/hugoScanRead +ndb/bin/hugoScanUpdate +ndb/bin/index +ndb/bin/index2 +ndb/bin/initronja +ndb/bin/interpreterInTup +ndb/bin/list_tables +ndb/bin/make-config.sh +ndb/bin/mgmtclient +ndb/bin/mgmtsrvr +ndb/bin/mkconfig +ndb/bin/ndb +ndb/bin/ndb_cpcc +ndb/bin/ndb_cpcd +ndb/bin/ndb_rep +ndb/bin/ndbsql +ndb/bin/newton_basic +ndb/bin/newton_br +ndb/bin/newton_pb +ndb/bin/newton_perf +ndb/bin/perfTransporterTest +ndb/bin/printConfig +ndb/bin/printSchemafile +ndb/bin/printSysfile +ndb/bin/redoLogFileReader +ndb/bin/restart +ndb/bin/restarter +ndb/bin/restarter2 +ndb/bin/restarts +ndb/bin/restore +ndb/bin/select_all +ndb/bin/select_count +ndb/bin/telco +ndb/bin/testBackup +ndb/bin/testBank +ndb/bin/testBasic +ndb/bin/testBasicAsynch +ndb/bin/testCopy +ndb/bin/testDataBuffers +ndb/bin/testDict +ndb/bin/testGrep +ndb/bin/testGrepVerify +ndb/bin/testIndex +ndb/bin/testInterpreter +ndb/bin/testKernelDataBuffer +ndb/bin/testLongSig +ndb/bin/testMgm +ndb/bin/testMgmapi +ndb/bin/testNdbApi +ndb/bin/testNodeRestart +ndb/bin/testOIBasic +ndb/bin/testOdbcDriver +ndb/bin/testOperations +ndb/bin/testRestartGci +ndb/bin/testScan +ndb/bin/testScanInterpreter +ndb/bin/testSimplePropertiesSection +ndb/bin/testSystemRestart +ndb/bin/testTimeout +ndb/bin/testTransactions +ndb/bin/test_cpcd +ndb/bin/test_event +ndb/bin/verify_index +ndb/bin/waiter +ndb/config/autom4te.cache/* +ndb/config/config.mk +ndb/examples/ndbapi_example1/ndbapi_example1 +ndb/examples/ndbapi_example2/ndbapi_example2 +ndb/examples/ndbapi_example3/ndbapi_example3 +ndb/examples/ndbapi_example5/ndbapi_example5 +ndb/examples/select_all/select_all +ndb/include/ndb_global.h +ndb/include/ndb_types.h +ndb/include/ndb_version.h +ndb/lib/libMGM_API.so +ndb/lib/libNDB_API.so +ndb/lib/libNDB_ODBC.so +ndb/lib/libNEWTON_API.so +ndb/lib/libNEWTON_BASICTEST_COMMON.so +ndb/lib/libREP_API.so +ndb/lib/libndbclient.so +ndb/lib/libndbclient_extra.so +ndb/src/common/debugger/libtrace.dsp +ndb/src/common/debugger/signaldata/libsignaldataprint.dsp +ndb/src/common/logger/liblogger.dsp +ndb/src/common/mgmcommon/libmgmsrvcommon.dsp +ndb/src/common/mgmcommon/printConfig/*.d +ndb/src/common/portlib/libportlib.dsp +ndb/src/common/transporter/libtransporter.dsp +ndb/src/common/util/libgeneral.dsp +ndb/src/common/util/testBitmask.cpp +ndb/src/cw/cpcd/ndb_cpcd +ndb/src/dummy.cpp +ndb/src/kernel/blocks/backup/libbackup.dsp +ndb/src/kernel/blocks/backup/restore/ndb_restore +ndb/src/kernel/blocks/cmvmi/libcmvmi.dsp +ndb/src/kernel/blocks/dbacc/libdbacc.dsp +ndb/src/kernel/blocks/dbdict/libdbdict.dsp +ndb/src/kernel/blocks/dbdih/libdbdih.dsp +ndb/src/kernel/blocks/dblqh/libdblqh.dsp +ndb/src/kernel/blocks/dbtc/libdbtc.dsp +ndb/src/kernel/blocks/dbtup/libdbtup.dsp +ndb/src/kernel/blocks/dbtux/libdbtux.dsp +ndb/src/kernel/blocks/dbutil/libdbutil.dsp +ndb/src/kernel/blocks/grep/libgrep.dsp +ndb/src/kernel/blocks/ndbcntr/libndbcntr.dsp +ndb/src/kernel/blocks/ndbfs/libndbfs.dsp +ndb/src/kernel/blocks/qmgr/libqmgr.dsp +ndb/src/kernel/blocks/suma/libsuma.dsp +ndb/src/kernel/blocks/trix/libtrix.dsp +ndb/src/kernel/error/liberror.dsp +ndb/src/kernel/ndbd +ndb/src/kernel/ndbd.dsp +ndb/src/kernel/vm/libkernel.dsp +ndb/src/libndb.ver +ndb/src/libndbclient.dsp +ndb/src/mgmapi/libmgmapi.dsp +ndb/src/mgmclient/libndbmgmclient.dsp +ndb/src/mgmclient/ndb_mgm +ndb/src/mgmclient/ndb_mgm.dsp +ndb/src/mgmclient/test_cpcd/*.d +ndb/src/mgmsrv/ndb_mgmd +ndb/src/mgmsrv/ndb_mgmd.dsp +ndb/src/ndbapi/libndbapi.dsp +ndb/test/ndbapi/bank/bankCreator +ndb/test/ndbapi/bank/bankMakeGL +ndb/test/ndbapi/bank/bankSumAccounts +ndb/test/ndbapi/bank/bankTimer +ndb/test/ndbapi/bank/bankTransactionMaker +ndb/test/ndbapi/bank/bankValidateAllGLs +ndb/test/ndbapi/bank/testBank +ndb/test/ndbapi/create_all_tabs +ndb/test/ndbapi/create_tab +ndb/test/ndbapi/drop_all_tabs +ndb/test/ndbapi/flexAsynch +ndb/test/ndbapi/flexBench +ndb/test/ndbapi/flexBench.dsp +ndb/test/ndbapi/flexHammer +ndb/test/ndbapi/flexTT +ndb/test/ndbapi/testBackup +ndb/test/ndbapi/testBasic +ndb/test/ndbapi/testBasic.dsp +ndb/test/ndbapi/testBasicAsynch +ndb/test/ndbapi/testBlobs +ndb/test/ndbapi/testBlobs.dsp +ndb/test/ndbapi/testDataBuffers +ndb/test/ndbapi/testDeadlock +ndb/test/ndbapi/testDict +ndb/test/ndbapi/testIndex +ndb/test/ndbapi/testMgm +ndb/test/ndbapi/testNdbApi +ndb/test/ndbapi/testNodeRestart +ndb/test/ndbapi/testOIBasic +ndb/test/ndbapi/testOperations +ndb/test/ndbapi/testRestartGci +ndb/test/ndbapi/testSRBank +ndb/test/ndbapi/testScan +ndb/test/ndbapi/testScan.dsp +ndb/test/ndbapi/testScanInterpreter +ndb/test/ndbapi/testScanPerf +ndb/test/ndbapi/testSystemRestart +ndb/test/ndbapi/testTimeout +ndb/test/ndbapi/testTransactions +ndb/test/ndbapi/test_event +ndb/test/run-test/atrt +ndb/test/src/libNDBT.dsp +ndb/test/tools/copy_tab +ndb/test/tools/create_index +ndb/test/tools/hugoCalculator +ndb/test/tools/hugoFill +ndb/test/tools/hugoLoad +ndb/test/tools/hugoLockRecords +ndb/test/tools/hugoPkDelete +ndb/test/tools/hugoPkRead +ndb/test/tools/hugoPkReadRecord +ndb/test/tools/hugoPkUpdate +ndb/test/tools/hugoScanRead +ndb/test/tools/hugoScanUpdate +ndb/test/tools/ndb_cpcc +ndb/test/tools/restart +ndb/test/tools/verify_index +ndb/tools/ndb_config +ndb/tools/ndb_delete_all +ndb/tools/ndb_delete_all.dsp +ndb/tools/ndb_desc +ndb/tools/ndb_desc.dsp +ndb/tools/ndb_drop_index +ndb/tools/ndb_drop_index.dsp +ndb/tools/ndb_drop_table +ndb/tools/ndb_drop_table.dsp +ndb/tools/ndb_restore +ndb/tools/ndb_select_all +ndb/tools/ndb_select_all.dsp +ndb/tools/ndb_select_count +ndb/tools/ndb_select_count.dsp +ndb/tools/ndb_show_tables +ndb/tools/ndb_show_tables.dsp +ndb/tools/ndb_test_platform +ndb/tools/ndb_waiter +ndb/tools/ndb_waiter.dsp +ndbcluster-1186 +ndbcluster-1186/SCCS +ndbcluster-1186/config.ini +ndbcluster-1186/ndb_1.pid +ndbcluster-1186/ndb_1_out.log +ndbcluster-1186/ndb_1_signal.log +ndbcluster-1186/ndb_2.pid +ndbcluster-1186/ndb_2_out.log +ndbcluster-1186/ndb_2_signal.log +ndbcluster-1186/ndb_3.pid +ndbcluster-1186/ndb_3_cluster.log +ndbcluster-1186/ndb_3_out.log +ndbcluster-1186/ndbcluster.pid +netware/.deps/libmysqlmain.Po +netware/.deps/my_manage.Po +netware/.deps/mysql_install_db.Po +netware/.deps/mysql_test_run.Po +netware/.deps/mysqld_safe.Po +netware/init_db.sql +netware/libmysql.imp +netware/test_db.sql +pack_isam/*.ds? +perror/*.ds? +perror/*.vcproj +plugin/fulltext/.deps/mypluglib_la-plugin_example.Plo +plugin/fulltext/.libs/mypluglib.lai +plugin/fulltext/.libs/mypluglib.so.0 +plugin/fulltext/.libs/mypluglib.so.0.0.0 +pstack/.deps/bucomm.Po +pstack/.deps/debug.Po +pstack/.deps/filemode.Po +pstack/.deps/ieee.Po +pstack/.deps/linuxthreads.Po +pstack/.deps/pstack.Po +pstack/.deps/rddbg.Po +pstack/.deps/stabs.Po +pull.log +regex/*.ds? +regex/*.vcproj +regex/.deps/debug.Po +regex/.deps/main.Po +regex/.deps/regcomp.Po +regex/.deps/regerror.Po +regex/.deps/regexec.Po +regex/.deps/regfree.Po +regex/.deps/reginit.Po +regex/.deps/split.Po +regex/re +repl-tests/test-repl-ts/repl-timestamp.master.reject +repl-tests/test-repl/foo-dump-slave.master. +repl-tests/test-repl/sum-wlen-slave.master. +repl-tests/test-repl/sum-wlen-slave.master.re +repl-tests/test-repl/sum-wlen-slave.master.reje +replace/*.ds? +replace/*.vcproj +scripts/comp_sql +scripts/fill_func_tables +scripts/fill_func_tables.sql +scripts/fill_help_tables +scripts/fill_help_tables.sql +scripts/make_binary_distribution +scripts/make_sharedlib_distribution +scripts/make_win_binary_distribution +scripts/make_win_src_distribution +scripts/make_win_src_distribution_old +scripts/msql2mysql +scripts/mysql_config +scripts/mysql_convert_table_format +scripts/mysql_create_system_tables +scripts/mysql_explain_log +scripts/mysql_find_rows +scripts/mysql_fix_extensions +scripts/mysql_fix_privilege_tables +scripts/mysql_fix_privilege_tables.sql +scripts/mysql_fix_privilege_tables.sql.rule +scripts/mysql_fix_privilege_tables_sql.c +scripts/mysql_fix_privilege_tables_sql.c.rule +scripts/mysql_install_db +scripts/mysql_secure_installation +scripts/mysql_setpermission +scripts/mysql_tableinfo +scripts/mysql_upgrade +scripts/mysql_upgrade_shell +scripts/mysql_zap +scripts/mysqlaccess +scripts/mysqlbug +scripts/mysqld_multi +scripts/mysqld_safe +scripts/mysqldumpslow +scripts/mysqlhotcopy +scripts/mysqlhotcopy.sh.rej +scripts/safe_mysqld +select_test +server-tools/instance-manager/.deps/buffer.Po +server-tools/instance-manager/.deps/command.Po +server-tools/instance-manager/.deps/commands.Po +server-tools/instance-manager/.deps/guardian.Po +server-tools/instance-manager/.deps/instance.Po +server-tools/instance-manager/.deps/instance_map.Po +server-tools/instance-manager/.deps/instance_options.Po +server-tools/instance-manager/.deps/liboptions_la-options.Plo +server-tools/instance-manager/.deps/liboptions_la-priv.Plo +server-tools/instance-manager/.deps/listener.Po +server-tools/instance-manager/.deps/log.Po +server-tools/instance-manager/.deps/manager.Po +server-tools/instance-manager/.deps/messages.Po +server-tools/instance-manager/.deps/mysql_connection.Po +server-tools/instance-manager/.deps/mysqlmanager.Po +server-tools/instance-manager/.deps/net_serv.Po +server-tools/instance-manager/.deps/parse.Po +server-tools/instance-manager/.deps/parse_output.Po +server-tools/instance-manager/.deps/protocol.Po +server-tools/instance-manager/.deps/thread_registry.Po +server-tools/instance-manager/.deps/user_management_commands.Po +server-tools/instance-manager/.deps/user_map.Po +server-tools/instance-manager/buffer.cpp +server-tools/instance-manager/client.c +server-tools/instance-manager/client_settings.h +server-tools/instance-manager/command.cpp +server-tools/instance-manager/commands.cpp +server-tools/instance-manager/errmsg.c +server-tools/instance-manager/guardian.cpp +server-tools/instance-manager/instance.cpp +server-tools/instance-manager/instance_map.cpp +server-tools/instance-manager/instance_options.cpp +server-tools/instance-manager/listener.cpp +server-tools/instance-manager/log.cpp +server-tools/instance-manager/manager.cpp +server-tools/instance-manager/messages.cpp +server-tools/instance-manager/mysql_connection.cpp +server-tools/instance-manager/mysqlmanager +server-tools/instance-manager/mysqlmanager.cpp +server-tools/instance-manager/net_serv.cc +server-tools/instance-manager/options.cpp +server-tools/instance-manager/parse.cpp +server-tools/instance-manager/parse_output.cpp +server-tools/instance-manager/priv.cpp +server-tools/instance-manager/protocol.cpp +server-tools/instance-manager/thr_alarm.c +server-tools/instance-manager/thread_registry.cpp +server-tools/instance-manager/user_map.cpp +sql-bench/Results-linux/ATIS-mysql_bdb-Linux_2.2.14_my_SMP_i686 +sql-bench/bench-count-distinct +sql-bench/bench-init.pl +sql-bench/compare-results +sql-bench/compare-results-all +sql-bench/copy-db +sql-bench/crash-me +sql-bench/gif/* +sql-bench/graph-compare-results +sql-bench/innotest1 +sql-bench/innotest1a +sql-bench/innotest1b +sql-bench/innotest2 +sql-bench/innotest2a +sql-bench/innotest2b +sql-bench/output/* +sql-bench/run-all-tests +sql-bench/server-cfg +sql-bench/template.html +sql-bench/test-ATIS +sql-bench/test-alter-table +sql-bench/test-big-tables +sql-bench/test-connect +sql-bench/test-create +sql-bench/test-insert +sql-bench/test-select +sql-bench/test-transactions +sql-bench/test-wisconsin +sql/*.cpp +sql/*.ds? +sql/*.def +sql/*.vcproj +sql/.deps/client.Po +sql/.deps/derror.Po +sql/.deps/des_key_file.Po +sql/.deps/discover.Po +sql/.deps/event_data_objects.Po +sql/.deps/event_db_repository.Po +sql/.deps/event_queue.Po +sql/.deps/event_scheduler.Po +sql/.deps/events.Po +sql/.deps/field.Po +sql/.deps/field_conv.Po +sql/.deps/filesort.Po +sql/.deps/gen_lex_hash.Po +sql/.deps/gstream.Po +sql/.deps/ha_berkeley.Po +sql/.deps/ha_federated.Po +sql/.deps/ha_heap.Po +sql/.deps/ha_innodb.Po +sql/.deps/ha_myisam.Po +sql/.deps/ha_myisammrg.Po +sql/.deps/ha_ndbcluster.Po +sql/.deps/ha_ndbcluster_binlog.Po +sql/.deps/ha_partition.Po +sql/.deps/handler.Po +sql/.deps/hash_filo.Po +sql/.deps/hostname.Po +sql/.deps/init.Po +sql/.deps/item.Po +sql/.deps/item_buff.Po +sql/.deps/item_cmpfunc.Po +sql/.deps/item_create.Po +sql/.deps/item_func.Po +sql/.deps/item_geofunc.Po +sql/.deps/item_row.Po +sql/.deps/item_strfunc.Po +sql/.deps/item_subselect.Po +sql/.deps/item_sum.Po +sql/.deps/item_timefunc.Po +sql/.deps/item_uniq.Po +sql/.deps/item_xmlfunc.Po +sql/.deps/key.Po +sql/.deps/lock.Po +sql/.deps/log.Po +sql/.deps/log_event.Po +sql/.deps/mf_iocache.Po +sql/.deps/mini_client_errors.Po +sql/.deps/my_decimal.Po +sql/.deps/my_lock.Po +sql/.deps/my_time.Po +sql/.deps/my_user.Po +sql/.deps/mysql_tzinfo_to_sql.Po +sql/.deps/mysqld.Po +sql/.deps/net_serv.Po +sql/.deps/opt_range.Po +sql/.deps/opt_sum.Po +sql/.deps/pack.Po +sql/.deps/parse_file.Po +sql/.deps/partition_info.Po +sql/.deps/password.Po +sql/.deps/procedure.Po +sql/.deps/protocol.Po +sql/.deps/records.Po +sql/.deps/repl_failsafe.Po +sql/.deps/rpl_filter.Po +sql/.deps/rpl_injector.Po +sql/.deps/rpl_tblmap.Po +sql/.deps/set_var.Po +sql/.deps/slave.Po +sql/.deps/sp.Po +sql/.deps/sp_cache.Po +sql/.deps/sp_head.Po +sql/.deps/sp_pcontext.Po +sql/.deps/sp_rcontext.Po +sql/.deps/spatial.Po +sql/.deps/sql_acl.Po +sql/.deps/sql_analyse.Po +sql/.deps/sql_base.Po +sql/.deps/sql_binlog.Po +sql/.deps/sql_builtin.Po +sql/.deps/sql_cache.Po +sql/.deps/sql_class.Po +sql/.deps/sql_client.Po +sql/.deps/sql_crypt.Po +sql/.deps/sql_cursor.Po +sql/.deps/sql_db.Po +sql/.deps/sql_delete.Po +sql/.deps/sql_truncate.Po +sql/.deps/sql_reload.Po +sql/.deps/datadict.Po +sql/.deps/sql_derived.Po +sql/.deps/sql_do.Po +sql/.deps/sql_error.Po +sql/.deps/sql_handler.Po +sql/.deps/sql_help.Po +sql/.deps/sql_insert.Po +sql/.deps/sql_lex.Po +sql/.deps/sql_list.Po +sql/.deps/sql_load.Po +sql/.deps/sql_manager.Po +sql/.deps/sql_map.Po +sql/.deps/sql_olap.Po +sql/.deps/sql_parse.Po +sql/.deps/sql_partition.Po +sql/.deps/sql_plugin.Po +sql/.deps/sql_prepare.Po +sql/.deps/sql_rename.Po +sql/.deps/sql_repl.Po +sql/.deps/sql_select.Po +sql/.deps/sql_show.Po +sql/.deps/sql_state.Po +sql/.deps/sql_string.Po +sql/.deps/sql_table.Po +sql/.deps/sql_tablespace.Po +sql/.deps/sql_test.Po +sql/.deps/sql_trigger.Po +sql/.deps/sql_udf.Po +sql/.deps/sql_union.Po +sql/.deps/sql_update.Po +sql/.deps/sql_view.Po +sql/.deps/sql_yacc.Po +sql/.deps/stacktrace.Po +sql/.deps/strfunc.Po +sql/.deps/table.Po +sql/.deps/thr_malloc.Po +sql/.deps/time.Po +sql/.deps/tztime.Po +sql/.deps/udf_example.Plo +sql/.deps/uniques.Po +sql/.deps/unireg.Po +sql/.gdbinit +sql/.libs/udf_example.lai +sql/.libs/udf_example.so.0 +sql/.libs/udf_example.so.0.0.0 +sql/client.c +sql/cmake_dummy.cc +sql/Doxyfile +sql/f.c +sql/gen_lex_hash +sql/gmon.out +sql/handlerton.cc +sql/html +sql/latex +sql/lex_hash.h +sql/lex_hash.h.rule +sql/link_sources +sql/max/* +sql/message.h +sql/message.mc +sql/message.rc +sql/mini_client_errors.c +sql/my_time.c +sql/my_user.c +sql/mysql_tzinfo_to_sql +sql/mysql_tzinfo_to_sql.cc +sql/mysql_tzinfo_to_sql_tztime.cc +sql/mysqlbinlog +sql/mysqld +sql/mysqld-purecov +sql/mysqld-purify +sql/mysqld-quantify +sql/new.cc +sql/pack.c +sql/safe_to_cache_query.txt +sql/share/*.sys +sql/share/charsets/gmon.out +sql/share/fixerrmsg.pl +sql/share/gmon.out +sql/share/iso639-2.txt +sql/share/mysql +sql/share/norwegian-ny/errmsg.sys +sql/share/norwegian/errmsg.sys +sql/sql_builtin.cc +sql/sql_select.cc.orig +sql/sql_yacc.cc +sql/sql_yacc.h +sql/sql_yacc.h.rule +sql/sql_yacc.output +sql/sql_yacc.yy.orig +sql/test_time +sql/udf_example.so +sql_error.cc +sql_prepare.cc +stamp-h +stamp-h.in +stamp-h1 +stamp-h1.in +stamp-h2 +stamp-h2.in +stamp-h3 +stamp-h4 +start_mysqld.sh +storage/archive/.deps/archive_test-archive_test.Po +storage/archive/.deps/archive_test-azio.Po +storage/archive/.deps/ha_archive_la-azio.Plo +storage/archive/.deps/ha_archive_la-ha_archive.Plo +storage/archive/.deps/libarchive_a-azio.Po +storage/archive/.deps/libarchive_a-ha_archive.Po +storage/archive/archive_reader +storage/archive/archive_test +storage/bdb/*.ds? +storage/bdb/*.vcproj +storage/bdb/README +storage/bdb/btree/btree_auto.c +storage/bdb/btree/btree_autop.c +storage/bdb/build_unix/* +storage/bdb/build_vxworks/BerkeleyDB20.wpj +storage/bdb/build_vxworks/BerkeleyDB20small.wpj +storage/bdb/build_vxworks/BerkeleyDB22.wpj +storage/bdb/build_vxworks/BerkeleyDB22small.wpj +storage/bdb/build_vxworks/db.h +storage/bdb/build_vxworks/db_config.h +storage/bdb/build_vxworks/db_config_small.h +storage/bdb/build_vxworks/db_deadlock/db_deadlock20.wpj +storage/bdb/build_vxworks/db_deadlock/db_deadlock22.wpj +storage/bdb/build_vxworks/db_int.h +storage/bdb/build_vxworks/dbdemo/dbdemo.c +storage/bdb/build_vxworks/dbdemo/dbdemo20.wpj +storage/bdb/build_vxworks/dbdemo/dbdemo22.wpj +storage/bdb/build_win32/*.dsp +storage/bdb/build_win32/*.h +storage/bdb/build_win32/db.h +storage/bdb/build_win32/db_archive.dsp +storage/bdb/build_win32/db_checkpoint.dsp +storage/bdb/build_win32/db_config.h +storage/bdb/build_win32/db_cxx.h +storage/bdb/build_win32/db_deadlock.dsp +storage/bdb/build_win32/db_dll.dsp +storage/bdb/build_win32/db_dump.dsp +storage/bdb/build_win32/db_int.h +storage/bdb/build_win32/db_java.dsp +storage/bdb/build_win32/db_load.dsp +storage/bdb/build_win32/db_perf.dsp +storage/bdb/build_win32/db_printlog.dsp +storage/bdb/build_win32/db_recover.dsp +storage/bdb/build_win32/db_stat.dsp +storage/bdb/build_win32/db_static.dsp +storage/bdb/build_win32/db_tcl.dsp +storage/bdb/build_win32/db_test.dsp +storage/bdb/build_win32/db_upgrade.dsp +storage/bdb/build_win32/db_verify.dsp +storage/bdb/build_win32/ex_access.dsp +storage/bdb/build_win32/ex_btrec.dsp +storage/bdb/build_win32/ex_env.dsp +storage/bdb/build_win32/ex_lock.dsp +storage/bdb/build_win32/ex_mpool.dsp +storage/bdb/build_win32/ex_tpcb.dsp +storage/bdb/build_win32/excxx_access.dsp +storage/bdb/build_win32/excxx_btrec.dsp +storage/bdb/build_win32/excxx_env.dsp +storage/bdb/build_win32/excxx_lock.dsp +storage/bdb/build_win32/excxx_mpool.dsp +storage/bdb/build_win32/excxx_tpcb.dsp +storage/bdb/build_win32/include.tcl +storage/bdb/build_win32/libdb.def +storage/bdb/build_win32/libdb.rc +storage/bdb/build_win64/*.dsp +storage/bdb/build_win64/*.dsw +storage/bdb/build_win64/*.h +storage/bdb/db/crdel_auto.c +storage/bdb/db/crdel_autop.c +storage/bdb/db/db_auto.c +storage/bdb/db/db_autop.c +storage/bdb/dbinc_auto/*.* +storage/bdb/dbreg/dbreg_auto.c +storage/bdb/dbreg/dbreg_autop.c +storage/bdb/dist/autom4te-2.53.cache/* +storage/bdb/dist/autom4te-2.53.cache/output.0 +storage/bdb/dist/autom4te-2.53.cache/requests +storage/bdb/dist/autom4te-2.53.cache/traces.0 +storage/bdb/dist/autom4te.cache/* +storage/bdb/dist/autom4te.cache/output.0 +storage/bdb/dist/autom4te.cache/requests +storage/bdb/dist/autom4te.cache/traces.0 +storage/bdb/dist/config.hin +storage/bdb/dist/configure +storage/bdb/dist/tags +storage/bdb/dist/template/db_server_proc +storage/bdb/dist/template/gen_client_ret +storage/bdb/dist/template/rec_btree +storage/bdb/dist/template/rec_crdel +storage/bdb/dist/template/rec_db +storage/bdb/dist/template/rec_dbreg +storage/bdb/dist/template/rec_fileops +storage/bdb/dist/template/rec_hash +storage/bdb/dist/template/rec_log +storage/bdb/dist/template/rec_qam +storage/bdb/dist/template/rec_txn +storage/bdb/examples_c/ex_apprec/ex_apprec_auto.c +storage/bdb/examples_c/ex_apprec/ex_apprec_auto.h +storage/bdb/examples_c/ex_apprec/ex_apprec_template +storage/bdb/examples_java +storage/bdb/fileops/fileops_auto.c +storage/bdb/fileops/fileops_autop.c +storage/bdb/hash/hash_auto.c +storage/bdb/hash/hash_autop.c +storage/bdb/include/btree_auto.h +storage/bdb/include/btree_ext.h +storage/bdb/include/clib_ext.h +storage/bdb/include/common_ext.h +storage/bdb/include/crdel_auto.h +storage/bdb/include/db_auto.h +storage/bdb/include/db_ext.h +storage/bdb/include/db_server.h +storage/bdb/include/env_ext.h +storage/bdb/include/gen_client_ext.h +storage/bdb/include/gen_server_ext.h +storage/bdb/include/hash_auto.h +storage/bdb/include/hash_ext.h +storage/bdb/include/lock_ext.h +storage/bdb/include/log_auto.h +storage/bdb/include/log_ext.h +storage/bdb/include/mp_ext.h +storage/bdb/include/mutex_ext.h +storage/bdb/include/os_ext.h +storage/bdb/include/qam_auto.h +storage/bdb/include/qam_ext.h +storage/bdb/include/rpc_client_ext.h +storage/bdb/include/rpc_server_ext.h +storage/bdb/include/tcl_ext.h +storage/bdb/include/txn_auto.h +storage/bdb/include/txn_ext.h +storage/bdb/include/xa_ext.h +storage/bdb/java/src/com/sleepycat/db/Db.java +storage/bdb/java/src/com/sleepycat/db/DbBtreeStat.java +storage/bdb/java/src/com/sleepycat/db/DbConstants.java +storage/bdb/java/src/com/sleepycat/db/DbHashStat.java +storage/bdb/java/src/com/sleepycat/db/DbLockStat.java +storage/bdb/java/src/com/sleepycat/db/DbLogStat.java +storage/bdb/java/src/com/sleepycat/db/DbMpoolFStat.java +storage/bdb/java/src/com/sleepycat/db/DbQueueStat.java +storage/bdb/java/src/com/sleepycat/db/DbRepStat.java +storage/bdb/java/src/com/sleepycat/db/DbTxnStat.java +storage/bdb/libdb_java/java_stat_auto.c +storage/bdb/libdb_java/java_stat_auto.h +storage/bdb/libdb_java/java_util.i +storage/bdb/log/log_auto.c +storage/bdb/qam/qam_auto.c +storage/bdb/qam/qam_autop.c +storage/bdb/rep/rep_auto.c +storage/bdb/rep/rep_autop.c +storage/bdb/rpc_client/db_server_clnt.c +storage/bdb/rpc_client/gen_client.c +storage/bdb/rpc_server/c/db_server_proc.c +storage/bdb/rpc_server/c/db_server_proc.sed +storage/bdb/rpc_server/c/db_server_svc.c +storage/bdb/rpc_server/c/db_server_xdr.c +storage/bdb/rpc_server/c/gen_db_server.c +storage/bdb/rpc_server/db_server.x +storage/bdb/rpc_server/db_server_proc.sed +storage/bdb/rpc_server/db_server_svc.c +storage/bdb/rpc_server/db_server_xdr.c +storage/bdb/rpc_server/gen_db_server.c +storage/bdb/test/TESTS +storage/bdb/test/include.tcl +storage/bdb/test/logtrack.list +storage/bdb/txn/txn_auto.c +storage/bdb/txn/txn_autop.c +storage/blackhole/.deps/ha_blackhole_la-ha_blackhole.Plo +storage/blackhole/.deps/libblackhole_a-ha_blackhole.Po +storage/csv/.deps/ha_csv_la-ha_tina.Plo +storage/csv/.deps/libcsv_a-ha_tina.Po +storage/example/.deps/ha_example_la-ha_example.Plo +storage/example/.deps/libexample_a-ha_example.Po +storage/heap/.deps/_check.Po +storage/heap/.deps/_rectest.Po +storage/heap/.deps/hp_block.Po +storage/heap/.deps/hp_clear.Po +storage/heap/.deps/hp_close.Po +storage/heap/.deps/hp_create.Po +storage/heap/.deps/hp_delete.Po +storage/heap/.deps/hp_extra.Po +storage/heap/.deps/hp_hash.Po +storage/heap/.deps/hp_info.Po +storage/heap/.deps/hp_open.Po +storage/heap/.deps/hp_panic.Po +storage/heap/.deps/hp_rename.Po +storage/heap/.deps/hp_rfirst.Po +storage/heap/.deps/hp_rkey.Po +storage/heap/.deps/hp_rlast.Po +storage/heap/.deps/hp_rnext.Po +storage/heap/.deps/hp_rprev.Po +storage/heap/.deps/hp_rrnd.Po +storage/heap/.deps/hp_rsame.Po +storage/heap/.deps/hp_scan.Po +storage/heap/.deps/hp_static.Po +storage/heap/.deps/hp_test1.Po +storage/heap/.deps/hp_test2.Po +storage/heap/.deps/hp_update.Po +storage/heap/.deps/hp_write.Po +storage/heap/hp_test1 +storage/heap/hp_test2 +storage/innobase/autom4te-2.53.cache/* +storage/innobase/autom4te-2.53.cache/output.0 +storage/innobase/autom4te-2.53.cache/requests +storage/innobase/autom4te-2.53.cache/traces.0 +storage/innobase/autom4te.cache/* +storage/innobase/autom4te.cache/output.0 +storage/innobase/autom4te.cache/requests +storage/innobase/autom4te.cache/traces.0 +storage/innobase/btr/.deps/btr0btr.Po +storage/innobase/btr/.deps/btr0cur.Po +storage/innobase/btr/.deps/btr0pcur.Po +storage/innobase/btr/.deps/btr0sea.Po +storage/innobase/buf/.deps/buf0buf.Po +storage/innobase/buf/.deps/buf0flu.Po +storage/innobase/buf/.deps/buf0lru.Po +storage/innobase/buf/.deps/buf0rea.Po +storage/innobase/configure.lineno +storage/innobase/conftest.s1 +storage/innobase/conftest.subs +storage/innobase/data/.deps/data0data.Po +storage/innobase/data/.deps/data0type.Po +storage/innobase/dict/.deps/dict0boot.Po +storage/innobase/dict/.deps/dict0crea.Po +storage/innobase/dict/.deps/dict0dict.Po +storage/innobase/dict/.deps/dict0load.Po +storage/innobase/dict/.deps/dict0mem.Po +storage/innobase/dyn/.deps/dyn0dyn.Po +storage/innobase/eval/.deps/eval0eval.Po +storage/innobase/eval/.deps/eval0proc.Po +storage/innobase/fil/.deps/fil0fil.Po +storage/innobase/fsp/.deps/fsp0fsp.Po +storage/innobase/fut/.deps/fut0fut.Po +storage/innobase/fut/.deps/fut0lst.Po +storage/innobase/ha/.deps/ha0ha.Po +storage/innobase/ha/.deps/hash0hash.Po +storage/innobase/ib_config.h +storage/innobase/ib_config.h.in +storage/innobase/ibuf/.deps/ibuf0ibuf.Po +storage/innobase/lock/.deps/lock0lock.Po +storage/innobase/log/.deps/log0log.Po +storage/innobase/log/.deps/log0recv.Po +storage/innobase/mach/.deps/mach0data.Po +storage/innobase/mem/.deps/mem0mem.Po +storage/innobase/mem/.deps/mem0pool.Po +storage/innobase/mkinstalldirs +storage/innobase/mtr/.deps/mtr0log.Po +storage/innobase/mtr/.deps/mtr0mtr.Po +storage/innobase/os/.deps/os0file.Po +storage/innobase/os/.deps/os0proc.Po +storage/innobase/os/.deps/os0sync.Po +storage/innobase/os/.deps/os0thread.Po +storage/innobase/page/.deps/page0cur.Po +storage/innobase/page/.deps/page0page.Po +storage/innobase/pars/.deps/lexyy.Po +storage/innobase/pars/.deps/pars0grm.Po +storage/innobase/pars/.deps/pars0opt.Po +storage/innobase/pars/.deps/pars0pars.Po +storage/innobase/pars/.deps/pars0sym.Po +storage/innobase/que/.deps/que0que.Po +storage/innobase/read/.deps/read0read.Po +storage/innobase/rem/.deps/rem0cmp.Po +storage/innobase/rem/.deps/rem0rec.Po +storage/innobase/row/.deps/row0ins.Po +storage/innobase/row/.deps/row0mysql.Po +storage/innobase/row/.deps/row0purge.Po +storage/innobase/row/.deps/row0row.Po +storage/innobase/row/.deps/row0sel.Po +storage/innobase/row/.deps/row0uins.Po +storage/innobase/row/.deps/row0umod.Po +storage/innobase/row/.deps/row0undo.Po +storage/innobase/row/.deps/row0upd.Po +storage/innobase/row/.deps/row0vers.Po +storage/innobase/srv/.deps/srv0que.Po +storage/innobase/srv/.deps/srv0srv.Po +storage/innobase/srv/.deps/srv0start.Po +storage/innobase/stamp-h1 +storage/innobase/sync/.deps/sync0arr.Po +storage/innobase/sync/.deps/sync0rw.Po +storage/innobase/sync/.deps/sync0sync.Po +storage/innobase/thr/.deps/thr0loc.Po +storage/innobase/trx/.deps/trx0purge.Po +storage/innobase/trx/.deps/trx0rec.Po +storage/innobase/trx/.deps/trx0roll.Po +storage/innobase/trx/.deps/trx0rseg.Po +storage/innobase/trx/.deps/trx0sys.Po +storage/innobase/trx/.deps/trx0trx.Po +storage/innobase/trx/.deps/trx0undo.Po +storage/innobase/usr/.deps/usr0sess.Po +storage/innobase/ut/.deps/ut0byte.Po +storage/innobase/ut/.deps/ut0dbg.Po +storage/innobase/ut/.deps/ut0list.Po +storage/innobase/ut/.deps/ut0mem.Po +storage/innobase/ut/.deps/ut0rnd.Po +storage/innobase/ut/.deps/ut0ut.Po +storage/innobase/ut/.deps/ut0vec.Po +storage/innobase/ut/.deps/ut0wqueue.Po +storage/myisam/.deps/ft_boolean_search.Po +storage/myisam/.deps/ft_nlq_search.Po +storage/myisam/.deps/ft_parser.Po +storage/myisam/.deps/ft_static.Po +storage/myisam/.deps/ft_stopwords.Po +storage/myisam/.deps/ft_update.Po +storage/myisam/.deps/mi_cache.Po +storage/myisam/.deps/mi_changed.Po +storage/myisam/.deps/mi_check.Po +storage/myisam/.deps/mi_checksum.Po +storage/myisam/.deps/mi_close.Po +storage/myisam/.deps/mi_create.Po +storage/myisam/.deps/mi_dbug.Po +storage/myisam/.deps/mi_delete.Po +storage/myisam/.deps/mi_delete_all.Po +storage/myisam/.deps/mi_delete_table.Po +storage/myisam/.deps/mi_dynrec.Po +storage/myisam/.deps/mi_extra.Po +storage/myisam/.deps/mi_info.Po +storage/myisam/.deps/mi_key.Po +storage/myisam/.deps/mi_keycache.Po +storage/myisam/.deps/mi_locking.Po +storage/myisam/.deps/mi_log.Po +storage/myisam/.deps/mi_open.Po +storage/myisam/.deps/mi_packrec.Po +storage/myisam/.deps/mi_page.Po +storage/myisam/.deps/mi_panic.Po +storage/myisam/.deps/mi_preload.Po +storage/myisam/.deps/mi_range.Po +storage/myisam/.deps/mi_rename.Po +storage/myisam/.deps/mi_rfirst.Po +storage/myisam/.deps/mi_rkey.Po +storage/myisam/.deps/mi_rlast.Po +storage/myisam/.deps/mi_rnext.Po +storage/myisam/.deps/mi_rnext_same.Po +storage/myisam/.deps/mi_rprev.Po +storage/myisam/.deps/mi_rrnd.Po +storage/myisam/.deps/mi_rsame.Po +storage/myisam/.deps/mi_rsamepos.Po +storage/myisam/.deps/mi_scan.Po +storage/myisam/.deps/mi_search.Po +storage/myisam/.deps/mi_static.Po +storage/myisam/.deps/mi_statrec.Po +storage/myisam/.deps/mi_test1.Po +storage/myisam/.deps/mi_test2.Po +storage/myisam/.deps/mi_test3.Po +storage/myisam/.deps/mi_unique.Po +storage/myisam/.deps/mi_update.Po +storage/myisam/.deps/mi_write.Po +storage/myisam/.deps/myisam_ftdump.Po +storage/myisam/.deps/myisamchk.Po +storage/myisam/.deps/myisamlog.Po +storage/myisam/.deps/myisampack.Po +storage/myisam/.deps/rt_index.Po +storage/myisam/.deps/rt_key.Po +storage/myisam/.deps/rt_mbr.Po +storage/myisam/.deps/rt_split.Po +storage/myisam/.deps/rt_test.Po +storage/myisam/.deps/sort.Po +storage/myisam/.deps/sp_key.Po +storage/myisam/.deps/sp_test.Po +storage/myisam/FT1.MYD +storage/myisam/FT1.MYI +storage/myisam/ft_dump +storage/myisam/ft_eval +storage/myisam/ft_test1 +storage/myisam/ftbench/data +storage/myisam/ftbench/t +storage/myisam/ftbench/var/* +storage/myisam/mi_test1 +storage/myisam/mi_test2 +storage/myisam/mi_test3 +storage/myisam/mi_test_all +storage/myisam/myisam.log +storage/myisam/myisam_ftdump +storage/myisam/myisamchk +storage/myisam/myisamlog +storage/myisam/myisampack +storage/myisam/rt_test +storage/myisam/rt_test.MYD +storage/myisam/rt_test.MYI +storage/myisam/sp_test +storage/myisam/test1.MYD +storage/myisam/test1.MYI +storage/myisam/test2.MYD +storage/myisam/test2.MYI +storage/myisammrg/.deps/myrg_close.Po +storage/myisammrg/.deps/myrg_create.Po +storage/myisammrg/.deps/myrg_delete.Po +storage/myisammrg/.deps/myrg_extra.Po +storage/myisammrg/.deps/myrg_info.Po +storage/myisammrg/.deps/myrg_locking.Po +storage/myisammrg/.deps/myrg_open.Po +storage/myisammrg/.deps/myrg_panic.Po +storage/myisammrg/.deps/myrg_queue.Po +storage/myisammrg/.deps/myrg_range.Po +storage/myisammrg/.deps/myrg_rfirst.Po +storage/myisammrg/.deps/myrg_rkey.Po +storage/myisammrg/.deps/myrg_rlast.Po +storage/myisammrg/.deps/myrg_rnext.Po +storage/myisammrg/.deps/myrg_rnext_same.Po +storage/myisammrg/.deps/myrg_rprev.Po +storage/myisammrg/.deps/myrg_rrnd.Po +storage/myisammrg/.deps/myrg_rsame.Po +storage/myisammrg/.deps/myrg_static.Po +storage/myisammrg/.deps/myrg_update.Po +storage/myisammrg/.deps/myrg_write.Po +storage/ndb/bin/DbAsyncGenerator +storage/ndb/bin/DbCreate +storage/ndb/bin/acid +storage/ndb/bin/async-lmc-bench-l-p10.sh +storage/ndb/bin/async-lmc-bench-l.sh +storage/ndb/bin/async-lmc-bench-p10.sh +storage/ndb/bin/async-lmc-bench.sh +storage/ndb/bin/atrt +storage/ndb/bin/atrt-analyze-result.sh +storage/ndb/bin/atrt-clear-result.sh +storage/ndb/bin/atrt-gather-result.sh +storage/ndb/bin/atrt-setup.sh +storage/ndb/bin/bankCreator +storage/ndb/bin/bankMakeGL +storage/ndb/bin/bankSumAccounts +storage/ndb/bin/bankTimer +storage/ndb/bin/bankTransactionMaker +storage/ndb/bin/bankValidateAllGLs +storage/ndb/bin/basicTransporterTest +storage/ndb/bin/benchronja +storage/ndb/bin/bulk_copy +storage/ndb/bin/copy_tab +storage/ndb/bin/create_all_tabs +storage/ndb/bin/create_index +storage/ndb/bin/create_tab +storage/ndb/bin/delete_all +storage/ndb/bin/desc +storage/ndb/bin/drop_all_tabs +storage/ndb/bin/drop_index +storage/ndb/bin/drop_tab +storage/ndb/bin/flexAsynch +storage/ndb/bin/flexBench +storage/ndb/bin/flexHammer +storage/ndb/bin/flexScan +storage/ndb/bin/flexTT +storage/ndb/bin/hugoCalculator +storage/ndb/bin/hugoFill +storage/ndb/bin/hugoLoad +storage/ndb/bin/hugoLockRecords +storage/ndb/bin/hugoPkDelete +storage/ndb/bin/hugoPkRead +storage/ndb/bin/hugoPkReadRecord +storage/ndb/bin/hugoPkUpdate +storage/ndb/bin/hugoScanRead +storage/ndb/bin/hugoScanUpdate +storage/ndb/bin/index +storage/ndb/bin/index2 +storage/ndb/bin/initronja +storage/ndb/bin/interpreterInTup +storage/ndb/bin/list_tables +storage/ndb/bin/make-config.sh +storage/ndb/bin/mgmtclient +storage/ndb/bin/mgmtsrvr +storage/ndb/bin/mkconfig +storage/ndb/bin/ndb +storage/ndb/bin/ndb_cpcc +storage/ndb/bin/ndb_cpcd +storage/ndb/bin/ndb_rep +storage/ndb/bin/ndbsql +storage/ndb/bin/newton_basic +storage/ndb/bin/newton_br +storage/ndb/bin/newton_pb +storage/ndb/bin/newton_perf +storage/ndb/bin/perfTransporterTest +storage/ndb/bin/printConfig +storage/ndb/bin/printSchemafile +storage/ndb/bin/printSysfile +storage/ndb/bin/redoLogFileReader +storage/ndb/bin/restart +storage/ndb/bin/restarter +storage/ndb/bin/restarter2 +storage/ndb/bin/restarts +storage/ndb/bin/restore +storage/ndb/bin/select_all +storage/ndb/bin/select_count +storage/ndb/bin/telco +storage/ndb/bin/testBackup +storage/ndb/bin/testBank +storage/ndb/bin/testBasic +storage/ndb/bin/testBasicAsynch +storage/ndb/bin/testCopy +storage/ndb/bin/testDataBuffers +storage/ndb/bin/testDict +storage/ndb/bin/testGrep +storage/ndb/bin/testGrepVerify +storage/ndb/bin/testIndex +storage/ndb/bin/testInterpreter +storage/ndb/bin/testKernelDataBuffer +storage/ndb/bin/testLongSig +storage/ndb/bin/testMgm +storage/ndb/bin/testMgmapi +storage/ndb/bin/testNdbApi +storage/ndb/bin/testNodeRestart +storage/ndb/bin/testOIBasic +storage/ndb/bin/testOdbcDriver +storage/ndb/bin/testOperations +storage/ndb/bin/testRestartGci +storage/ndb/bin/testScan +storage/ndb/bin/testScanInterpreter +storage/ndb/bin/testSimplePropertiesSection +storage/ndb/bin/testSystemRestart +storage/ndb/bin/testTimeout +storage/ndb/bin/testTransactions +storage/ndb/bin/test_cpcd +storage/ndb/bin/test_event +storage/ndb/bin/verify_index +storage/ndb/bin/waiter +storage/ndb/config/autom4te.cache/* +storage/ndb/config/config.mk +storage/ndb/examples/ndbapi_example1/ndbapi_example1 +storage/ndb/examples/ndbapi_example2/ndbapi_example2 +storage/ndb/examples/ndbapi_example3/ndbapi_example3 +storage/ndb/examples/ndbapi_example5/ndbapi_example5 +storage/ndb/examples/select_all/select_all +storage/ndb/include/ndb_global.h +storage/ndb/include/ndb_types.h +storage/ndb/include/ndb_version.h +storage/ndb/lib/libMGM_API.so +storage/ndb/lib/libNDB_API.so +storage/ndb/lib/libNDB_ODBC.so +storage/ndb/lib/libNEWTON_API.so +storage/ndb/lib/libNEWTON_BASICTEST_COMMON.so +storage/ndb/lib/libREP_API.so +storage/ndb/lib/libndbclient.so +storage/ndb/lib/libndbclient_extra.so +storage/ndb/ndbapi-examples/mgmapi_logevent/mgmapi_logevent +storage/ndb/ndbapi-examples/mgmapi_logevent2/mgmapi_logevent2 +storage/ndb/ndbapi-examples/ndbapi_async/ndbapi_async +storage/ndb/ndbapi-examples/ndbapi_async1/ndbapi_async1 +storage/ndb/ndbapi-examples/ndbapi_event/ndbapi_event +storage/ndb/ndbapi-examples/ndbapi_retries/ndbapi_retries +storage/ndb/ndbapi-examples/ndbapi_scan/ndbapi_scan +storage/ndb/ndbapi-examples/ndbapi_simple/ndbapi_simple +storage/ndb/ndbapi-examples/ndbapi_simple_dual/ndbapi_simple_dual +storage/ndb/ndbapi-examples/ndbapi_simple_index/ndbapi_simple_index +storage/ndb/src/common/debugger/libtrace.dsp +storage/ndb/src/common/debugger/signaldata/libsignaldataprint.dsp +storage/ndb/src/common/logger/liblogger.dsp +storage/ndb/src/common/mgmcommon/libmgmsrvcommon.dsp +storage/ndb/src/common/mgmcommon/printConfig/*.d +storage/ndb/src/common/portlib/libportlib.dsp +storage/ndb/src/common/transporter/libtransporter.dsp +storage/ndb/src/common/util/libgeneral.dsp +storage/ndb/src/common/util/testBitmask.cpp +storage/ndb/src/cw/cpcd/ndb_cpcd +storage/ndb/src/dummy.cpp +storage/ndb/src/kernel/blocks/backup/libbackup.dsp +storage/ndb/src/kernel/blocks/backup/ndb_print_backup_file +storage/ndb/src/kernel/blocks/backup/restore/ndb_restore +storage/ndb/src/kernel/blocks/cmvmi/libcmvmi.dsp +storage/ndb/src/kernel/blocks/dbacc/libdbacc.dsp +storage/ndb/src/kernel/blocks/dbdict/libdbdict.dsp +storage/ndb/src/kernel/blocks/dbdict/ndb_print_schema_file +storage/ndb/src/kernel/blocks/dbdih/libdbdih.dsp +storage/ndb/src/kernel/blocks/dbdih/ndb_print_sys_file +storage/ndb/src/kernel/blocks/dblqh/libdblqh.dsp +storage/ndb/src/kernel/blocks/dbtc/libdbtc.dsp +storage/ndb/src/kernel/blocks/dbtup/libdbtup.dsp +storage/ndb/src/kernel/blocks/dbtup/test_varpage +storage/ndb/src/kernel/blocks/dbtux/libdbtux.dsp +storage/ndb/src/kernel/blocks/dbutil/libdbutil.dsp +storage/ndb/src/kernel/blocks/grep/libgrep.dsp +storage/ndb/src/kernel/blocks/ndb_print_file +storage/ndb/src/kernel/blocks/ndbcntr/libndbcntr.dsp +storage/ndb/src/kernel/blocks/ndbfs/libndbfs.dsp +storage/ndb/src/kernel/blocks/qmgr/libqmgr.dsp +storage/ndb/src/kernel/blocks/suma/libsuma.dsp +storage/ndb/src/kernel/blocks/trix/libtrix.dsp +storage/ndb/src/kernel/error/liberror.dsp +storage/ndb/src/kernel/ndbd +storage/ndb/src/kernel/ndbd.dsp +storage/ndb/src/kernel/vm/libkernel.dsp +storage/ndb/src/libndb.ver +storage/ndb/src/libndbclient.dsp +storage/ndb/src/mgmapi/libmgmapi.dsp +storage/ndb/src/mgmclient/libndbmgmclient.dsp +storage/ndb/src/mgmclient/ndb_mgm +storage/ndb/src/mgmclient/ndb_mgm.dsp +storage/ndb/src/mgmclient/test_cpcd/*.d +storage/ndb/src/mgmsrv/ndb_mgmd +storage/ndb/src/mgmsrv/ndb_mgmd.dsp +storage/ndb/src/ndbapi/libndbapi.dsp +storage/ndb/src/ndbapi/ndberror_check +storage/ndb/test/ndbapi/DbAsyncGenerator +storage/ndb/test/ndbapi/DbCreate +storage/ndb/test/ndbapi/bank/bankCreator +storage/ndb/test/ndbapi/bank/bankMakeGL +storage/ndb/test/ndbapi/bank/bankSumAccounts +storage/ndb/test/ndbapi/bank/bankTimer +storage/ndb/test/ndbapi/bank/bankTransactionMaker +storage/ndb/test/ndbapi/bank/bankValidateAllGLs +storage/ndb/test/ndbapi/bank/testBank +storage/ndb/test/ndbapi/create_all_tabs +storage/ndb/test/ndbapi/create_tab +storage/ndb/test/ndbapi/drop_all_tabs +storage/ndb/test/ndbapi/flexAsynch +storage/ndb/test/ndbapi/flexBench +storage/ndb/test/ndbapi/flexBench.dsp +storage/ndb/test/ndbapi/flexHammer +storage/ndb/test/ndbapi/flexTT +storage/ndb/test/ndbapi/ndbapi_slow_select +storage/ndb/test/ndbapi/testBackup +storage/ndb/test/ndbapi/testBasic +storage/ndb/test/ndbapi/testBasic.dsp +storage/ndb/test/ndbapi/testBasicAsynch +storage/ndb/test/ndbapi/testBitfield +storage/ndb/test/ndbapi/testBlobs +storage/ndb/test/ndbapi/testBlobs.dsp +storage/ndb/test/ndbapi/testDataBuffers +storage/ndb/test/ndbapi/testDeadlock +storage/ndb/test/ndbapi/testDict +storage/ndb/test/ndbapi/testIndex +storage/ndb/test/ndbapi/testIndexStat +storage/ndb/test/ndbapi/testInterpreter +storage/ndb/test/ndbapi/testLcp +storage/ndb/test/ndbapi/testMgm +storage/ndb/test/ndbapi/testNdbApi +storage/ndb/test/ndbapi/testNodeRestart +storage/ndb/test/ndbapi/testOIBasic +storage/ndb/test/ndbapi/testOperations +storage/ndb/test/ndbapi/testPartitioning +storage/ndb/test/ndbapi/testReadPerf +storage/ndb/test/ndbapi/testRestartGci +storage/ndb/test/ndbapi/testSRBank +storage/ndb/test/ndbapi/testScan +storage/ndb/test/ndbapi/testScan.dsp +storage/ndb/test/ndbapi/testScanInterpreter +storage/ndb/test/ndbapi/testScanPerf +storage/ndb/test/ndbapi/testSystemRestart +storage/ndb/test/ndbapi/testTimeout +storage/ndb/test/ndbapi/testTransactions +storage/ndb/test/ndbapi/test_event +storage/ndb/test/ndbapi/test_event_merge +storage/ndb/test/run-test/atrt +storage/ndb/test/src/libNDBT.dsp +storage/ndb/test/tools/copy_tab +storage/ndb/test/tools/create_index +storage/ndb/test/tools/hugoCalculator +storage/ndb/test/tools/hugoFill +storage/ndb/test/tools/hugoLoad +storage/ndb/test/tools/hugoLockRecords +storage/ndb/test/tools/hugoPkDelete +storage/ndb/test/tools/hugoPkRead +storage/ndb/test/tools/hugoPkReadRecord +storage/ndb/test/tools/hugoPkUpdate +storage/ndb/test/tools/hugoScanRead +storage/ndb/test/tools/hugoScanUpdate +storage/ndb/test/tools/listen_event +storage/ndb/test/tools/ndb_cpcc +storage/ndb/test/tools/rep_latency +storage/ndb/test/tools/restart +storage/ndb/test/tools/verify_index +storage/ndb/tools/ndb_config +storage/ndb/tools/ndb_delete_all +storage/ndb/tools/ndb_delete_all.dsp +storage/ndb/tools/ndb_desc +storage/ndb/tools/ndb_desc.dsp +storage/ndb/tools/ndb_drop_index +storage/ndb/tools/ndb_drop_index.dsp +storage/ndb/tools/ndb_drop_table +storage/ndb/tools/ndb_drop_table.dsp +storage/ndb/tools/ndb_restore +storage/ndb/tools/ndb_select_all +storage/ndb/tools/ndb_select_all.dsp +storage/ndb/tools/ndb_select_count +storage/ndb/tools/ndb_select_count.dsp +storage/ndb/tools/ndb_show_tables +storage/ndb/tools/ndb_show_tables.dsp +storage/ndb/tools/ndb_test_platform +storage/ndb/tools/ndb_waiter +storage/ndb/tools/ndb_waiter.dsp +strings/*.ds? +strings/*.vcproj +strings/.deps/bchange.Po +strings/.deps/bcmp.Po +strings/.deps/bfill.Po +strings/.deps/bmove.Po +strings/.deps/bmove512.Po +strings/.deps/bmove_upp.Po +strings/.deps/conf_to_src.Po +strings/.deps/ctype-big5.Po +strings/.deps/ctype-bin.Po +strings/.deps/ctype-cp932.Po +strings/.deps/ctype-czech.Po +strings/.deps/ctype-euc_kr.Po +strings/.deps/ctype-eucjpms.Po +strings/.deps/ctype-extra.Po +strings/.deps/ctype-gb2312.Po +strings/.deps/ctype-gbk.Po +strings/.deps/ctype-latin1.Po +strings/.deps/ctype-mb.Po +strings/.deps/ctype-simple.Po +strings/.deps/ctype-sjis.Po +strings/.deps/ctype-tis620.Po +strings/.deps/ctype-uca.Po +strings/.deps/ctype-ucs2.Po +strings/.deps/ctype-ujis.Po +strings/.deps/ctype-utf8.Po +strings/.deps/ctype-win1250ch.Po +strings/.deps/ctype.Po +strings/.deps/decimal.Po +strings/.deps/int2str.Po +strings/.deps/is_prefix.Po +strings/.deps/llstr.Po +strings/.deps/longlong2str.Po +strings/.deps/longlong2str_asm.Po +strings/.deps/my_strchr.Po +strings/.deps/my_strtoll10.Po +strings/.deps/my_vsnprintf.Po +strings/.deps/r_strinstr.Po +strings/.deps/str2int.Po +strings/.deps/str_alloc.Po +strings/.deps/strappend.Po +strings/.deps/strcend.Po +strings/.deps/strcont.Po +strings/.deps/strend.Po +strings/.deps/strfill.Po +strings/.deps/strinstr.Po +strings/.deps/strmake.Po +strings/.deps/strmov.Po +strings/.deps/strnlen.Po +strings/.deps/strnmov.Po +strings/.deps/strstr.Po +strings/.deps/strtod.Po +strings/.deps/strtol.Po +strings/.deps/strtoll.Po +strings/.deps/strtoul.Po +strings/.deps/strtoull.Po +strings/.deps/strxmov.Po +strings/.deps/strxnmov.Po +strings/.deps/xml.Po +strings/conf_to_src +strings/ctype_autoconf.c +strings/ctype_extra_sources.c +strings/str_test +strings/test_decimal +support-files/*.ini +support-files/MacOSX/Description.plist +support-files/MacOSX/Info.plist +support-files/MacOSX/ReadMe.txt +support-files/MacOSX/StartupParameters.plist +support-files/MacOSX/postflight +support-files/MacOSX/postinstall +support-files/MacOSX/preflight +support-files/MacOSX/preinstall +support-files/binary-configure +support-files/my-huge.cnf +support-files/my-innodb-heavy-4G.cnf +support-files/my-large.cnf +support-files/my-medium.cnf +support-files/my-small.cnf +support-files/mysql-3.23.25-beta.spec +support-files/mysql-3.23.26-beta.spec +support-files/mysql-3.23.27-beta.spec +support-files/mysql-3.23.28-gamma.spec +support-files/mysql-3.23.29-gamma.spec +support-files/mysql-log-rotate +support-files/mysql.server +support-files/mysql.spec +support-files/mysqld_multi.server +support-files/ndb-config-2-node.ini +support-files/wsrep.cnf +support-files/wsrep_notify +tags +test/ndbapi/bank/bankCreator +test/ndbapi/bank/bankMakeGL +test/ndbapi/bank/bankSumAccounts +test/ndbapi/bank/bankTimer +test/ndbapi/bank/bankTransactionMaker +test/ndbapi/bank/bankValidateAllGLs +test/ndbapi/bank/testBank +test/ndbapi/create_all_tabs +test/ndbapi/create_tab +test/ndbapi/drop_all_tabs +test/ndbapi/flexAsynch +test/ndbapi/flexBench +test/ndbapi/flexHammer +test/ndbapi/flexTT +test/ndbapi/testBackup +test/ndbapi/testBasic +test/ndbapi/testBasicAsynch +test/ndbapi/testBlobs +test/ndbapi/testDataBuffers +test/ndbapi/testDeadlock +test/ndbapi/testDict +test/ndbapi/testIndex +test/ndbapi/testMgm +test/ndbapi/testNdbApi +test/ndbapi/testNodeRestart +test/ndbapi/testOIBasic +test/ndbapi/testOperations +test/ndbapi/testRestartGci +test/ndbapi/testScan +test/ndbapi/testScanInterpreter +test/ndbapi/testScanPerf +test/ndbapi/testSystemRestart +test/ndbapi/testTimeout +test/ndbapi/testTransactions +test/ndbapi/test_event +test/run-test/atrt +test/tools/copy_tab +test/tools/create_index +test/tools/hugoCalculator +test/tools/hugoFill +test/tools/hugoLoad +test/tools/hugoLockRecords +test/tools/hugoPkDelete +test/tools/hugoPkRead +test/tools/hugoPkReadRecord +test/tools/hugoPkUpdate +test/tools/hugoScanRead +test/tools/hugoScanUpdate +test/tools/ndb_cpcc +test/tools/restart +test/tools/verify_index +test1/* +test_xml +tests/*.ds? +tests/*.vcproj +tests/.deps/dummy.Po +tests/.deps/insert_test.Po +tests/.deps/mysql_client_test.Po +tests/.deps/select_test.Po +tests/.deps/thread_test.Po +tests/.libs -prune +tests/.libs/lt-mysql_client_test +tests/.libs/mysql_client_test +tests/bug25714 +tests/client_test +tests/connect_test +tests/mysql_client_test +thr_insert_test/* +thr_test/* +thread_test +tmp/* +tools/.libs -prune +tools/my_vsnprintf.c +tools/mysqlmanager +tools/mysqlmngd +tools/mysqltestmanager +tools/mysys_priv.h +unittest/examples/*.t +unittest/examples/.deps/no_plan-t.Po +unittest/examples/.deps/simple-t.Po +unittest/examples/.deps/skip-t.Po +unittest/examples/.deps/skip_all-t.Po +unittest/examples/.deps/todo-t.Po +unittest/mysys/*.t +unittest/mysys/.deps/base64-t.Po +unittest/mysys/.deps/bitmap-t.Po +unittest/mysys/.deps/my_atomic-t.Po +unittest/mytap/.deps/tap.Po +unittest/mytap/t/*.t +unittest/mytap/t/.deps/basic-t.Po +unittest/unit +vi.h +vio/*.ds? +vio/*.vcproj +vio/.deps/dummy.Po +vio/.deps/test-ssl.Po +vio/.deps/test-sslclient.Po +vio/.deps/test-sslserver.Po +vio/.deps/vio.Po +vio/.deps/viosocket.Po +vio/.deps/viossl.Po +vio/.deps/viosslfactories.Po +vio/test-ssl +vio/test-sslclient +vio/test-sslserver +vio/viotest-ssl +vio/viotest-sslconnect.cpp +vio/viotest.cpp +win/configure.data +win/vs71cache.txt +win/vs8cache.txt +win/nmake_cache.txt +ylwrap +zlib/*.ds? +zlib/*.vcproj +mysql-test/bug36522-64.tar +mysql-test/bug36522.tar +mysql-test/t.log +mysql-test/tps.log +libmysqld/event_parse_data.cc +autom4te.cache +sql/share/czech +sql/share/danish +sql/share/dutch +sql/share/english +sql/share/estonian +sql/share/french +sql/share/german +sql/share/greek +sql/share/hungarian +sql/share/italian +sql/share/japanese +sql/share/japanese-sjis +sql/share/korean +sql/share/norwegian +sql/share/norwegian-ny +sql/share/polish +sql/share/portuguese +sql/share/romanian +sql/share/russian +sql/share/serbian +sql/share/slovak +sql/share/spanish +sql/share/swedish +sql/share/ukrainian +scripts/wsrep_sst_common +scripts/wsrep_sst_mysqldump +scripts/wsrep_sst_rsync +scripts/wsrep_sst_xtrabackup +libmysqld/examples/mysqltest.cc +libmysqld/sql_signal.cc +libmysqld/debug_sync.cc +dbug/tests +libmysqld/mdl.cc +client/transaction.h +libmysqld/transaction.cc +libmysqld/sys_vars.cc +libmysqld/keycaches.cc +client/dtoa.c +libmysqld/sql_audit.cc +configure.am +libmysqld/des_key_file.cc +CPackConfig.cmake +CPackSourceConfig.cmake +make_dist.cmake +client/echo +libmysql/libmysql_exports_file.cc +libmysql/merge_archives_mysqlclient.cmake +libmysqld/merge_archives_mysqlserver.cmake +libmysqld/mysqlserver_depends.c +libmysqld/examples/mysql_embedded +sql/dummy.bak +mysys/thr_lock +VERSION.dep +info_macros.cmake +Docs/INFO_BIN +Docs/INFO_SRC +Testing +FilesCopied +source_downloads diff --git a/mysql-test/collections/default.release b/mysql-test/collections/default.release deleted file mode 100644 index 0064c1ef659a..000000000000 --- a/mysql-test/collections/default.release +++ /dev/null @@ -1,15 +0,0 @@ -# This file contains the old default.release, the plan is to replace that -# with something like the below (remove space after #): -# include default.daily -# include default.weekly -perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=debug --vardir=var-debug --skip-rpl --report-features --debug-server -perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --report-features -perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --ps-protocol -perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=funcs1+ps --vardir=var-funcs_1_ps --suite=funcs_1 --ps-protocol -perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=funcs2 --vardir=var-funcs2 --suite=funcs_2 -perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=partitions --vardir=var-parts --suite=parts -perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=stress --vardir=var-stress --suite=stress -perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=jp --vardir=var-jp --suite=jp -perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-embedded --embedded-server --skip-rpl -perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=nist --vardir=var-nist --suite=nist -perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=nist+ps --vardir=var-nist_ps --suite=nist --ps-protocol From 66d2f07baae62ca4e92eb5cf75f4ce1d20aa188e Mon Sep 17 00:00:00 2001 From: sjaakola Date: Sun, 16 Nov 2014 16:26:36 +0200 Subject: [PATCH 005/305] refs #7 - handling lock queue granting in BF-BF conflict situation --- storage/innobase/lock/lock0lock.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.c index f552bc274cc6..9128175bb056 100644 --- a/storage/innobase/lock/lock0lock.c +++ b/storage/innobase/lock/lock0lock.c @@ -982,14 +982,15 @@ lock_rec_has_to_wait( } #ifdef WITH_WSREP - /* if BF thread is locking and has conflict with another BF + /* if BF thread has conflict with another BF thread, we need to look at trx ordering and lock types */ - if (for_locking && - wsrep_thd_is_BF(trx->mysql_thd, FALSE) && + if (wsrep_thd_is_BF(trx->mysql_thd, FALSE) && wsrep_thd_is_BF(lock2->trx->mysql_thd, TRUE)) { if (wsrep_debug) { - fprintf(stderr, "\n BF-BF lock conflict \n"); + fprintf(stderr, + "BF-BF lock conflict, locking: %d \n", + for_locking); lock_rec_print(stderr, lock2); } @@ -998,10 +999,17 @@ lock_rec_has_to_wait( (type_mode & LOCK_MODE_MASK) == LOCK_X && (lock2->type_mode & LOCK_MODE_MASK) == LOCK_X) { - /* exclusive lock conflicts are not accepted */ - fprintf(stderr, "BF-BF X lock conflict\n"); - lock_rec_print(stderr, lock2); - abort(); + if (for_locking) { + /* exclusive lock conflicts are not + accepted */ + fprintf(stderr, + "BF-BF X lock conflict\n"); + lock_rec_print(stderr, lock2); + abort(); + } else if (wsrep_debug) { + fprintf(stderr, + "BF-BF X lock conflict\n"); + } } else { /* if lock2->index->n_uniq <= lock2->index->n_user_defined_cols From 8f42d295f8ba803ff93ac3139d171738f18cebbc Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Tue, 9 Dec 2014 22:13:14 +0200 Subject: [PATCH 006/305] Going more MTR-friendly - for SST prefer to use mysql client, mysqldump and my_print_defaults from the local build tree. Conflicts: scripts/wsrep_sst_mysqldump.sh scripts/wsrep_sst_rsync.sh --- scripts/wsrep_sst_common.sh | 28 +++++++++++++++++++++++++++- scripts/wsrep_sst_mysqldump.sh | 8 ++++---- scripts/wsrep_sst_rsync.sh | 3 +-- scripts/wsrep_sst_xtrabackup-v2.sh | 10 +++++----- scripts/wsrep_sst_xtrabackup.sh | 10 +++++----- 5 files changed, 42 insertions(+), 17 deletions(-) diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index d9aa24169ce0..2546074f7bde 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -88,8 +88,34 @@ shift done readonly WSREP_SST_OPT_BYPASS +# try to use my_print_defaults, mysql and mysqldump that come with the sources +# (for MTR suite) +SCRIPTS_DIR="$(cd $(dirname "$0"); pwd -P)" +EXTRA_DIR="$SCRIPTS_DIR/../extra" +CLIENT_DIR="$SCRIPTS_DIR/../client" + +if [ -x "$CLIENT_DIR/mysql" ]; then + MYSQL_CLIENT="$CLIENT_DIR/mysql" +else + MYSQL_CLIENT=$(which mysql) +fi + +if [ -x "$CLIENT_DIR/mysqldump" ]; then + MYSQLDUMP="$CLIENT_DIR/mysqldump" +else + MYSQLDUMP=$(which mysqldump) +fi + +if [ -x "$SCRIPTS_DIR/my_print_defaults" ]; then + MY_PRINT_DEFAULTS="$SCRIPTS_DIR/my_print_defaults" +elif [ -x "$EXTRA_DIR/my_print_defaults" ]; then + MY_PRINT_DEFAULTS="$EXTRA_DIR/my_print_defaults" +else + MY_PRINT_DEFAULTS=$(which my_print_defaults) +fi + # For Bug:1200727 -if my_print_defaults -c $WSREP_SST_OPT_CONF sst | grep -q "wsrep_sst_auth";then +if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF sst | grep -q "wsrep_sst_auth";then if [ -z "$WSREP_SST_OPT_AUTH" -o "$WSREP_SST_OPT_AUTH" = "(null)" ];then WSREP_SST_OPT_AUTH=$(my_print_defaults -c $WSREP_SST_OPT_CONF sst | grep -- "--wsrep_sst_auth" | cut -d= -f2) fi diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh index 3db1d73bb9c4..53371765f665 100644 --- a/scripts/wsrep_sst_mysqldump.sh +++ b/scripts/wsrep_sst_mysqldump.sh @@ -54,9 +54,9 @@ then fi # Check client version -if ! mysql --version | grep 'Distrib 5.5' >/dev/null +if ! $MYSQL_CLIENT --version | grep 'Distrib 5.5' >/dev/null then - mysql --version >&2 + $MYSQL_CLIENT --version >&2 wsrep_log_error "this operation requires MySQL client version 5.5.x" exit $EINVAL fi @@ -72,7 +72,7 @@ if test -n "$WSREP_SST_OPT_PSWD"; then AUTH="$AUTH -p$WSREP_SST_OPT_PSWD"; fi STOP_WSREP="SET wsrep_on=OFF;" # NOTE: we don't use --routines here because we're dumping mysql.proc table -MYSQLDUMP="mysqldump $AUTH -S$WSREP_SST_OPT_SOCKET \ +MYSQLDUMP="$MYSQLDUMP $AUTH -S$WSREP_SST_OPT_SOCKET \ --add-drop-database --add-drop-table --skip-add-locks --create-options \ --disable-keys --extended-insert --skip-lock-tables --quick --set-charset \ --skip-comments --flush-privileges --all-databases" @@ -97,7 +97,7 @@ DROP PREPARE stmt;" SET_START_POSITION="SET GLOBAL wsrep_start_position='$WSREP_SST_OPT_GTID';" -MYSQL="mysql $AUTH -h$WSREP_SST_OPT_HOST -P$WSREP_SST_OPT_PORT "\ +MYSQL="$MYSQL_CLIENT $AUTH -h$WSREP_SST_OPT_HOST -P$WSREP_SST_OPT_PORT "\ "--disable-reconnect --connect_timeout=10" # need to disable logging when loading the dump diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index af3c2bb23cdf..152e99a08f2d 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -78,8 +78,7 @@ WSREP_LOG_DIR=${WSREP_LOG_DIR:-""} # if WSREP_LOG_DIR env. variable is not set, try to get it from my.cnf if [ -z "$WSREP_LOG_DIR" ]; then - SCRIPT_DIR="$(cd $(dirname "$0"); pwd -P)" - WSREP_LOG_DIR=$($SCRIPT_DIR/my_print_defaults --defaults-file \ + WSREP_LOG_DIR=$($MY_PRINT_DEFAULTS --defaults-file \ "$WSREP_SST_OPT_CONF" mysqld server mysqld-5.5 \ | grep -- '--innodb[-_]log[-_]group[-_]home[-_]dir=' \ | cut -b 29- ) diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index 97fb5fb91f7a..1669e4730d9c 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -117,7 +117,7 @@ get_keys() fi if [[ $encrypt -eq 0 ]];then - if my_print_defaults -c $WSREP_SST_OPT_CONF xtrabackup | grep -q encrypt;then + if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF xtrabackup | grep -q encrypt;then wsrep_log_error "Unexpected option combination. SST may fail. Refer to http://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html " fi return @@ -230,7 +230,7 @@ parse_cnf() { local group=$1 local var=$2 - reval=$(my_print_defaults -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2-) + reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2-) if [[ -z $reval ]];then [[ -n $3 ]] && reval=$3 fi @@ -241,7 +241,7 @@ get_footprint() { pushd $WSREP_SST_OPT_DATA 1>/dev/null payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | xargs -0 du --block-size=1 -c | awk 'END { print $1 }') - if my_print_defaults -c $WSREP_SST_OPT_CONF xtrabackup | grep -q -- "--compress";then + if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF xtrabackup | grep -q -- "--compress";then # QuickLZ has around 50% compression ratio # When compression/compaction used, the progress is only an approximate. payload=$(( payload*1/2 )) @@ -443,8 +443,8 @@ check_extra() { local use_socket=1 if [[ $uextra -eq 1 ]];then - if my_print_defaults -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--thread-handling=" | grep -q 'pool-of-threads';then - local eport=$(my_print_defaults -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--extra-port=" | cut -d= -f2) + if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--thread-handling=" | grep -q 'pool-of-threads';then + local eport=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--extra-port=" | cut -d= -f2) if [[ -n $eport ]];then # Xtrabackup works only locally. # Hence, setting host to 127.0.0.1 unconditionally. diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh index 6b33eabee237..05dbcea70df6 100644 --- a/scripts/wsrep_sst_xtrabackup.sh +++ b/scripts/wsrep_sst_xtrabackup.sh @@ -100,7 +100,7 @@ get_keys() fi if [[ $encrypt -eq 0 ]];then - if my_print_defaults -c $WSREP_SST_OPT_CONF xtrabackup | grep -q encrypt;then + if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF xtrabackup | grep -q encrypt;then wsrep_log_error "Unexpected option combination. SST may fail. Refer to http://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html " fi return @@ -195,7 +195,7 @@ parse_cnf() { local group=$1 local var=$2 - reval=$(my_print_defaults -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2-) + reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2-) if [[ -z $reval ]];then [[ -n $3 ]] && reval=$3 fi @@ -206,7 +206,7 @@ get_footprint() { pushd $WSREP_SST_OPT_DATA 1>/dev/null payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | xargs -0 du --block-size=1 -c | awk 'END { print $1 }') - if my_print_defaults -c $WSREP_SST_OPT_CONF xtrabackup | grep -q -- "--compress";then + if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF xtrabackup | grep -q -- "--compress";then # QuickLZ has around 50% compression ratio # When compression/compaction used, the progress is only an approximate. payload=$(( payload*1/2 )) @@ -385,8 +385,8 @@ check_extra() { local use_socket=1 if [[ $uextra -eq 1 ]];then - if my_print_defaults -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--thread-handling=" | grep -q 'pool-of-threads';then - local eport=$(my_print_defaults -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--extra-port=" | cut -d= -f2) + if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--thread-handling=" | grep -q 'pool-of-threads';then + local eport=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--extra-port=" | cut -d= -f2) if [[ -n $eport ]];then # Xtrabackup works only locally. # Hence, setting host to 127.0.0.1 unconditionally. From 334090ee2f37bf30717b4892cc3e4ebfaadad285 Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Wed, 10 Dec 2014 01:45:50 +0200 Subject: [PATCH 007/305] This commit * improves MySQL client version check making it no less than required as opposed to exactly as required. * adds event table copying to ensure same results as with rsync SST. --- scripts/wsrep_sst_mysqldump.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh index 53371765f665..e21e1cd01bcd 100644 --- a/scripts/wsrep_sst_mysqldump.sh +++ b/scripts/wsrep_sst_mysqldump.sh @@ -54,7 +54,8 @@ then fi # Check client version -if ! $MYSQL_CLIENT --version | grep 'Distrib 5.5' >/dev/null +CLIENT_MINOR=$(mysql --version | cut -d ' ' -f 6 | cut -d '.' -f 2) +if [ $CLIENT_MINOR -lt "5" ] then $MYSQL_CLIENT --version >&2 wsrep_log_error "this operation requires MySQL client version 5.5.x" @@ -75,7 +76,7 @@ STOP_WSREP="SET wsrep_on=OFF;" MYSQLDUMP="$MYSQLDUMP $AUTH -S$WSREP_SST_OPT_SOCKET \ --add-drop-database --add-drop-table --skip-add-locks --create-options \ --disable-keys --extended-insert --skip-lock-tables --quick --set-charset \ ---skip-comments --flush-privileges --all-databases" +--skip-comments --flush-privileges --all-databases --events" # mysqldump cannot restore CSV tables, fix this issue CSV_TABLES_FIX=" From 77468a043477bfaedb2cd1879033fa1cb2e7610b Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Wed, 10 Dec 2014 23:29:28 +0200 Subject: [PATCH 008/305] Refs #25 - made sure signals that may be set to ignored in mysqld were set to default in the child process. --- sql/wsrep_utils.cc | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/sql/wsrep_utils.cc b/sql/wsrep_utils.cc index 90af2fb8156b..1108c82a684e 100644 --- a/sql/wsrep_utils.cc +++ b/sql/wsrep_utils.cc @@ -145,7 +145,35 @@ process::process (const char* cmd, const char* type) goto cleanup_pipe; } - err_ = posix_spawnattr_setflags (&attr, POSIX_SPAWN_SETSIGDEF | + /* make sure that no signlas are masked in child process */ + sigset_t sigmask_empty; sigemptyset(&sigmask_empty); + err_ = posix_spawnattr_setsigmask(&attr, &sigmask_empty); + if (err_) + { + WSREP_ERROR ("posix_spawnattr_setsigmask() failed: %d (%s)", + err_, strerror(err_)); + goto cleanup_attr; + } + + /* make sure the following signals are not ignored in child process */ + sigset_t default_signals; sigemptyset(&default_signals); + sigaddset(&default_signals, SIGHUP); + sigaddset(&default_signals, SIGINT); + sigaddset(&default_signals, SIGQUIT); + sigaddset(&default_signals, SIGPIPE); + sigaddset(&default_signals, SIGTERM); + sigaddset(&default_signals, SIGCHLD); + err_ = posix_spawnattr_setsigdefault(&attr, &default_signals); + if (err_) + { + WSREP_ERROR ("posix_spawnattr_setsigdefault() failed: %d (%s)", + err_, strerror(err_)); + goto cleanup_attr; + } + + err_ = posix_spawnattr_setflags (&attr, POSIX_SPAWN_SETSIGDEF | + POSIX_SPAWN_SETSIGMASK | + /* start a new process group */ POSIX_SPAWN_SETPGROUP | POSIX_SPAWN_USEVFORK); if (err_) { From 8cf3e3b99712da45d2a139de181567fe73e2be7f Mon Sep 17 00:00:00 2001 From: sjaakola Date: Mon, 29 Dec 2014 11:48:47 +0200 Subject: [PATCH 009/305] refs #47 - initializing performance schema when autocommit retrying happens --- sql/sql_parse.cc | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index e87aefec18a5..acb3dbd7cd38 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6109,6 +6109,39 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length, wsrep_copy_query(thd); thd->set_time(); parser_state->reset(rawbuf, length); + + /* PSI end */ + MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da()); + thd->m_statement_psi= NULL; + + /* DTRACE end */ + if (MYSQL_QUERY_DONE_ENABLED()) + { + MYSQL_QUERY_DONE(thd->is_error()); + } + + /* SHOW PROFILE end */ +#if defined(ENABLED_PROFILING) + thd->profiling.finish_current_query(); +#endif + + /* SHOW PROFILE begin */ +#if defined(ENABLED_PROFILING) + thd->profiling.start_new_query("continuing"); + thd->profiling.set_query_source(rawbuf, length); +#endif + + /* DTRACE begin */ + MYSQL_QUERY_START(rawbuf, thd->thread_id, + (char *) (thd->db ? thd->db : ""), + &thd->security_ctx->priv_user[0], + (char *) thd->security_ctx->host_or_ip); + + /* PSI begin */ + thd->m_statement_psi= MYSQL_START_STATEMENT(&thd->m_statement_state, + com_statement_info[thd->get_command()].m_key, + thd->db, thd->db_length, + thd->charset()); } else { From 8023d455191e7890e9ae872d885d69b163d2794f Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Thu, 5 Feb 2015 14:38:03 +0200 Subject: [PATCH 010/305] refs #55 fixed debug build compilation errors --- sql/wsrep_sst.cc | 19 ++++++++++++------- storage/innobase/lock/lock0lock.c | 2 +- wsrep/wsrep_loader.c | 4 ++-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index ad058dc25778..9e0740216137 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -406,7 +406,7 @@ static ssize_t sst_prepare_other (const char* method, const char** addr_out) { ssize_t cmd_len= 1024; - char cmd_str[cmd_len]; + char cmd_str[1024]; const char* sst_dir= mysql_real_data_home; int ret= snprintf (cmd_str, cmd_len, @@ -672,7 +672,7 @@ static int sst_donate_mysqldump (const char* addr, host_len = strlen (addr) + 1; } - char host[host_len]; + char *host= (char*) malloc(host_len); strncpy (host, addr, host_len - 1); host[host_len - 1] = '\0'; @@ -692,7 +692,7 @@ static int sst_donate_mysqldump (const char* addr, user_len = (auth) ? strlen (auth) + 1 : 1; } - char user[user_len]; + char* user= (char*) malloc(user_len); strncpy (user, (auth) ? auth : "", user_len - 1); user[user_len - 1] = '\0'; @@ -701,7 +701,7 @@ static int sst_donate_mysqldump (const char* addr, if (!ret) { size_t cmd_len= 1024; - char cmd_str[cmd_len]; + char cmd_str[1024]; if (!bypass && wsrep_sst_donor_rejects_queries) sst_reject_queries(TRUE); @@ -730,6 +730,9 @@ static int sst_donate_mysqldump (const char* addr, wsrep->sst_sent (wsrep, &state_id, ret); + free(user); + free(host); + return ret; } @@ -787,9 +790,9 @@ static int sst_flush_tables(THD* thd) WSREP_INFO("Tables flushed."); const char base_name[]= "tables_flushed"; ssize_t const full_len= strlen(mysql_real_data_home) + strlen(base_name)+2; - char real_name[full_len]; + char* real_name= (char*) malloc(full_len); sprintf(real_name, "%s/%s", mysql_real_data_home, base_name); - char tmp_name[full_len + 4]; + char* tmp_name= (char*) malloc(full_len + 4); sprintf(tmp_name, "%s.tmp", real_name); FILE* file= fopen(tmp_name, "w+"); @@ -811,6 +814,8 @@ static int sst_flush_tables(THD* thd) tmp_name, real_name, err,strerror(err)); } } + free(tmp_name); + free(real_name); } return err; @@ -935,7 +940,7 @@ static int sst_donate_other (const char* method, bool bypass) { ssize_t cmd_len = 4096; - char cmd_str[cmd_len]; + char cmd_str[4096]; int ret= snprintf (cmd_str, cmd_len, "wsrep_sst_%s " diff --git a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.c index 9128175bb056..f1b0a8496b07 100644 --- a/storage/innobase/lock/lock0lock.c +++ b/storage/innobase/lock/lock0lock.c @@ -989,7 +989,7 @@ lock_rec_has_to_wait( if (wsrep_debug) { fprintf(stderr, - "BF-BF lock conflict, locking: %d \n", + "BF-BF lock conflict, locking: %lu \n", for_locking); lock_rec_print(stderr, lock2); } diff --git a/wsrep/wsrep_loader.c b/wsrep/wsrep_loader.c index 8ae6ea962ece..c330c77718f4 100644 --- a/wsrep/wsrep_loader.c +++ b/wsrep/wsrep_loader.c @@ -40,7 +40,7 @@ static wsrep_log_cb_t logger = default_logger; static int verify(const wsrep_t *wh, const char *iface_ver) { const size_t msg_len = 128; - char msg[msg_len]; + char msg[128]; #define VERIFY(_p) if (!(_p)) { \ snprintf(msg, msg_len, "wsrep_load(): verify(): %s\n", # _p); \ @@ -116,7 +116,7 @@ int wsrep_load(const char *spec, wsrep_t **hptr, wsrep_log_cb_t log_cb) void *dlh = NULL; wsrep_loader_fun dlfun; const size_t msg_len = 1024; - char msg[msg_len + 1]; + char msg[1024 + 1]; msg[msg_len] = 0; if (NULL != log_cb) From c2cd36c5c6c6245d38ede333c565b0df9d73016f Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 10 Feb 2015 00:47:02 +0200 Subject: [PATCH 011/305] refs codership/mysql-wsrep#55 - To avoid compiler warming: sql/sql_parse.cc: In function 'bool do_command(THD*)': sql/sql_parse.cc:758:20: error: 'packet_length' may be used uninitialized in this function [-Werror=maybe-uninitialized] if ((WSREP(thd) && packet_length == packet_error) || [ --- sql/sql_parse.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 7c4071701d04..9d1f2ed5f7cb 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -678,7 +678,11 @@ bool do_command(THD *thd) { bool return_value; char *packet= 0; +#ifdef WITH_WSREP + ulong packet_length= 0; // just to avoid (false positive) compiler warning +#else ulong packet_length; +#endif /* WITH_WSREP */ NET *net= &thd->net; enum enum_server_command command; DBUG_ENTER("do_command"); From 7790cb156a32fb45cfb6067f29fb1e448ed82280 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Tue, 10 Feb 2015 11:12:19 +0200 Subject: [PATCH 012/305] refs codership/mysql-wsrep#56 backport rpm build enhancements from 5.6 * Changes to support-files/mysql.spec.sh to make it OBS compatible * Imported man pages from mysql-5.5.42 source tarball * Various minor fixes to build scripts --- CMakeLists.txt | 2 +- Docs/ChangeLog | 0 cmake/package_name.cmake | 6 +- cmake/wsrep.cmake | 23 +- man/comp_err.1 | 286 +++ man/innochecksum.1 | 168 ++ man/msql2mysql.1 | 85 + man/my_print_defaults.1 | 220 ++ man/myisam_ftdump.1 | 267 +++ man/myisamchk.1 | 2596 +++++++++++++++++++++++ man/myisamlog.1 | 244 +++ man/myisampack.1 | 869 ++++++++ man/mysql-stress-test.pl.1 | 514 +++++ man/mysql-test-run.pl.1 | 2567 +++++++++++++++++++++++ man/mysql.1 | 3374 ++++++++++++++++++++++++++++++ man/mysql.server.1 | 186 ++ man/mysql_client_test.1 | 351 ++++ man/mysql_client_test_embedded.1 | 1 + man/mysql_config.1 | 247 +++ man/mysql_convert_table_format.1 | 241 +++ man/mysql_find_rows.1 | 176 ++ man/mysql_fix_extensions.1 | 86 + man/mysql_install_db.1 | 397 ++++ man/mysql_plugin.1 | 386 ++++ man/mysql_secure_installation.1 | 126 ++ man/mysql_setpermission.1 | 188 ++ man/mysql_tzinfo_to_sql.1 | 138 ++ man/mysql_upgrade.1 | 824 ++++++++ man/mysql_waitpid.1 | 145 ++ man/mysql_zap.1 | 141 ++ man/mysqlaccess.1 | 448 ++++ man/mysqladmin.1 | 1298 ++++++++++++ man/mysqlbinlog.1 | 2262 ++++++++++++++++++++ man/mysqlbug.1 | 58 + man/mysqlcheck.1 | 1077 ++++++++++ man/mysqld.8 | 78 + man/mysqld_multi.1 | 721 +++++++ man/mysqld_safe.1 | 889 ++++++++ man/mysqldump.1 | 2680 ++++++++++++++++++++++++ man/mysqldumpslow.1 | 339 +++ man/mysqlhotcopy.1 | 560 +++++ man/mysqlimport.1 | 840 ++++++++ man/mysqlshow.1 | 681 ++++++ man/mysqlslap.1 | 1129 ++++++++++ man/mysqltest.1 | 931 +++++++++ man/mysqltest_embedded.1 | 1 + man/ndb-common-options.1 | 603 ++++++ man/ndb_blob_tool.1 | 466 +++++ man/ndb_config.1 | 1451 +++++++++++++ man/ndb_cpcd.1 | 55 + man/ndb_delete_all.1 | 179 ++ man/ndb_desc.1 | 585 ++++++ man/ndb_drop_index.1 | 170 ++ man/ndb_drop_table.1 | 111 + man/ndb_error_reporter.1 | 328 +++ man/ndb_index_stat.1 | 1028 +++++++++ man/ndb_mgm.1 | 251 +++ man/ndb_mgmd.8 | 1323 ++++++++++++ man/ndb_print_backup_file.1 | 89 + man/ndb_print_file.1 | 123 ++ man/ndb_print_schema_file.1 | 89 + man/ndb_print_sys_file.1 | 92 + man/ndb_restore.1 | 2217 ++++++++++++++++++++ man/ndb_select_all.1 | 618 ++++++ man/ndb_select_count.1 | 147 ++ man/ndb_show_tables.1 | 323 +++ man/ndb_size.pl.1 | 413 ++++ man/ndb_waiter.1 | 497 +++++ man/ndbd.8 | 1181 +++++++++++ man/ndbd_redo_log_reader.1 | 253 +++ man/ndbinfo_select_all.1 | 304 +++ man/ndbmtd.8 | 225 ++ man/perror.1 | 206 ++ man/replace.1 | 185 ++ man/resolve_stack_dump.1 | 145 ++ man/resolveip.1 | 124 ++ support-files/cmake-no-wix.patch | 14 + support-files/mysql-rpmlintrc | 64 + support-files/mysql.server.sh | 5 + support-files/mysql.spec.sh | 410 ++-- 80 files changed, 42861 insertions(+), 259 deletions(-) create mode 100644 Docs/ChangeLog create mode 100644 man/comp_err.1 create mode 100644 man/innochecksum.1 create mode 100644 man/msql2mysql.1 create mode 100644 man/my_print_defaults.1 create mode 100644 man/myisam_ftdump.1 create mode 100644 man/myisamchk.1 create mode 100644 man/myisamlog.1 create mode 100644 man/myisampack.1 create mode 100644 man/mysql-stress-test.pl.1 create mode 100644 man/mysql-test-run.pl.1 create mode 100644 man/mysql.1 create mode 100644 man/mysql.server.1 create mode 100644 man/mysql_client_test.1 create mode 100644 man/mysql_client_test_embedded.1 create mode 100644 man/mysql_config.1 create mode 100644 man/mysql_convert_table_format.1 create mode 100644 man/mysql_find_rows.1 create mode 100644 man/mysql_fix_extensions.1 create mode 100644 man/mysql_install_db.1 create mode 100644 man/mysql_plugin.1 create mode 100644 man/mysql_secure_installation.1 create mode 100644 man/mysql_setpermission.1 create mode 100644 man/mysql_tzinfo_to_sql.1 create mode 100644 man/mysql_upgrade.1 create mode 100644 man/mysql_waitpid.1 create mode 100644 man/mysql_zap.1 create mode 100644 man/mysqlaccess.1 create mode 100644 man/mysqladmin.1 create mode 100644 man/mysqlbinlog.1 create mode 100644 man/mysqlbug.1 create mode 100644 man/mysqlcheck.1 create mode 100644 man/mysqld.8 create mode 100644 man/mysqld_multi.1 create mode 100644 man/mysqld_safe.1 create mode 100644 man/mysqldump.1 create mode 100644 man/mysqldumpslow.1 create mode 100644 man/mysqlhotcopy.1 create mode 100644 man/mysqlimport.1 create mode 100644 man/mysqlshow.1 create mode 100644 man/mysqlslap.1 create mode 100644 man/mysqltest.1 create mode 100644 man/mysqltest_embedded.1 create mode 100644 man/ndb-common-options.1 create mode 100644 man/ndb_blob_tool.1 create mode 100644 man/ndb_config.1 create mode 100644 man/ndb_cpcd.1 create mode 100644 man/ndb_delete_all.1 create mode 100644 man/ndb_desc.1 create mode 100644 man/ndb_drop_index.1 create mode 100644 man/ndb_drop_table.1 create mode 100644 man/ndb_error_reporter.1 create mode 100644 man/ndb_index_stat.1 create mode 100644 man/ndb_mgm.1 create mode 100644 man/ndb_mgmd.8 create mode 100644 man/ndb_print_backup_file.1 create mode 100644 man/ndb_print_file.1 create mode 100644 man/ndb_print_schema_file.1 create mode 100644 man/ndb_print_sys_file.1 create mode 100644 man/ndb_restore.1 create mode 100644 man/ndb_select_all.1 create mode 100644 man/ndb_select_count.1 create mode 100644 man/ndb_show_tables.1 create mode 100644 man/ndb_size.pl.1 create mode 100644 man/ndb_waiter.1 create mode 100644 man/ndbd.8 create mode 100644 man/ndbd_redo_log_reader.1 create mode 100644 man/ndbinfo_select_all.1 create mode 100644 man/ndbmtd.8 create mode 100644 man/perror.1 create mode 100644 man/replace.1 create mode 100644 man/resolve_stack_dump.1 create mode 100644 man/resolveip.1 create mode 100644 support-files/cmake-no-wix.patch create mode 100644 support-files/mysql-rpmlintrc diff --git a/CMakeLists.txt b/CMakeLists.txt index 8fec62259868..3f697c6a3177 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -470,7 +470,7 @@ ADD_SUBDIRECTORY(packaging/solaris) # (see http://public.kitware.com/Bug/view.php?id=11452) SET(CPACK_MONOLITHIC_INSTALL 1 CACHE INTERNAL "") -IF(UNIX) +IF(UNIX AND NOT WITH_WSREP) INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL COMPONENT Info) ENDIF() # diff --git a/Docs/ChangeLog b/Docs/ChangeLog new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/cmake/package_name.cmake b/cmake/package_name.cmake index 0f1c9458b03c..9511645ea9ce 100644 --- a/cmake/package_name.cmake +++ b/cmake/package_name.cmake @@ -131,10 +131,10 @@ IF(NOT VERSION) SET(package_name "mysql-cluster${PRODUCT_TAG}-${NDBVERSION}-${SYSTEM_NAME_AND_PROCESSOR}") ELSE() IF(WITH_WSREP) - IF(NOT WSREP_PACKAGE_VERSION) - MESSAGE(FATAL_ERROR "Variable WSREP_PACKAGE_VERSION must be set") + IF(NOT WSREP_VERSION) + MESSAGE(FATAL_ERROR "Variable WSREP_VERSION must be set") ENDIF() - SET(package_name "mysql${PRODUCT_TAG}-${VERSION}_wsrep_${WSREP_PACKAGE_VERSION}-${SYSTEM_NAME_AND_PROCESSOR}") + SET(package_name "mysql${PRODUCT_TAG}-${VERSION}_wsrep_${WSREP_VERSION}-${SYSTEM_NAME_AND_PROCESSOR}") ELSE() SET(package_name "mysql${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}") ENDIF() diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 3861c73e776c..054775190559 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -20,20 +20,12 @@ SET(WSREP_PATCH_VERSION "11") # Obtain patch revision number -SET(WSREP_PATCH_REVNO $ENV{WSREP_REV}) -IF(NOT WSREP_PATCH_REVNO) - EXECUTE_PROCESS( - COMMAND bzr revno - OUTPUT_VARIABLE WSREP_PATCH_REVNO - RESULT_VARIABLE RESULT - ) -STRING(REGEX REPLACE "(\r?\n)+$" "" WSREP_PATCH_REVNO "${WSREP_PATCH_REVNO}") -#FILE(WRITE "wsrep_config" "Debug: WSREP_PATCH_REVNO result: ${RESULT}\n") -ENDIF() -IF(NOT WSREP_PATCH_REVNO) - SET(WSREP_PATCH_REVNO "XXXX") +SET(WSREP_REVISION $ENV{WSREP_REV}) +IF(NOT WSREP_REVISION) + SET(WSREP_REVISION "XXXX" CACHE STRING "WSREP revision") ENDIF() + # Obtain wsrep API version EXECUTE_PROCESS( COMMAND sh -c "grep WSREP_INTERFACE_VERSION ${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h | cut -d '\"' -f 2" @@ -43,10 +35,8 @@ EXECUTE_PROCESS( #FILE(WRITE "wsrep_config" "Debug: WSREP_API_VERSION result: ${RESULT}\n") STRING(REGEX REPLACE "(\r?\n)+$" "" WSREP_API_VERSION "${WSREP_API_VERSION}") -SET(WSREP_PACKAGE_VERSION "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}") -SET(WSREP_VERSION - "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}.r${WSREP_PATCH_REVNO}" -) +SET(WSREP_VERSION "${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}" + CACHE STRING "WSREP version") OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" OFF) IF (WITH_WSREP) @@ -56,6 +46,7 @@ IF (WITH_WSREP) SET(COMPILATION_COMMENT "${COMPILATION_COMMENT}, wsrep_${WSREP_VERSION}") SET(WITH_EMBEDDED_SERVER OFF) SET(WITH_INNODB_DISALLOW_WRITES ON) + SET(WITH_INNODB_MEMCACHED ON) ENDIF() # diff --git a/man/comp_err.1 b/man/comp_err.1 new file mode 100644 index 000000000000..a305d45dbf4b --- /dev/null +++ b/man/comp_err.1 @@ -0,0 +1,286 @@ +'\" t +.\" Title: \fBcomp_err\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBCOMP_ERR\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" comp_err +.SH "NAME" +comp_err \- compile MySQL error message file +.SH "SYNOPSIS" +.HP \w'\fBcomp_err\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBcomp_err [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBcomp_err\fR +creates the +errmsg\&.sys +file that is used by +\fBmysqld\fR +to determine the error messages to display for different error codes\&. +\fBcomp_err\fR +normally is run automatically when MySQL is built\&. It compiles the +errmsg\&.sys +file from the plaintext file located at +sql/share/errmsg\&.txt +in MySQL source distributions\&. +.PP +\fBcomp_err\fR +also generates +mysqld_error\&.h, +mysqld_ername\&.h, and +sql_state\&.h +header files\&. +.PP +For more information about how error messages are defined, see the +\m[blue]\fBMySQL Internals Manual\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +Invoke +\fBcomp_err\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBcomp_err [\fR\fB\fIoptions\fR\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBcomp_err\fR +supports the following options\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" comp_err: help option +.\" help option: comp_err +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" comp_err: charset option +.\" charset option: comp_err +\fB\-\-charset=\fR\fB\fIpath\fR\fR, +\fB\-C \fR\fB\fIpath\fR\fR +.sp +The character set directory\&. The default is +\&.\&./sql/share/charsets\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" comp_err: debug option +.\" debug option: comp_err +\fB\-\-debug=\fR\fB\fIdebug_options\fR\fR, +\fB\-# \fR\fB\fIdebug_options\fR\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:O,\fIfile_name\fR\&. The default is +d:t:O,/tmp/comp_err\&.trace\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" comp_err: debug-info option +.\" debug-info option: comp_err +\fB\-\-debug\-info\fR, +\fB\-T\fR +.sp +Print some debugging information when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" comp_err: header_file option +.\" header_file option: comp_err +\fB\-\-header_file=\fR\fB\fIfile_name\fR\fR, +\fB\-H \fR\fB\fIfile_name\fR\fR +.sp +The name of the error header file\&. The default is +mysqld_error\&.h\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" comp_err: in_file option +.\" in_file option: comp_err +\fB\-\-in_file=\fR\fB\fIfile_name\fR\fR, +\fB\-F \fR\fB\fIfile_name\fR\fR +.sp +The name of the input file\&. The default is +\&.\&./sql/share/errmsg\&.txt\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" comp_err: name_file option +.\" name_file option: comp_err +\fB\-\-name_file=\fR\fB\fIfile_name\fR\fR, +\fB\-N \fR\fB\fIfile_name\fR\fR +.sp +The name of the error name file\&. The default is +mysqld_ername\&.h\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" comp_err: out_dir option +.\" out_dir option: comp_err +\fB\-\-out_dir=\fR\fB\fIpath\fR\fR, +\fB\-D \fR\fB\fIpath\fR\fR +.sp +The name of the output base directory\&. The default is +\&.\&./sql/share/\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" comp_err: out_file option +.\" out_file option: comp_err +\fB\-\-out_file=\fR\fB\fIfile_name\fR\fR, +\fB\-O \fR\fB\fIfile_name\fR\fR +.sp +The name of the output file\&. The default is +errmsg\&.sys\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" comp_err: statefile option +.\" statefile option: comp_err +\fB\-\-statefile=\fR\fB\fIfile_name\fR\fR, +\fB\-S \fR\fB\fIfile_name\fR\fR +.sp +The name for the SQLSTATE header file\&. The default is +sql_state\&.h\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" comp_err: version option +.\" version option: comp_err +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +MySQL Internals Manual +.RS 4 +\%http://dev.mysql.com/doc/internals/en +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/innochecksum.1 b/man/innochecksum.1 new file mode 100644 index 000000000000..742d1f5a7cfc --- /dev/null +++ b/man/innochecksum.1 @@ -0,0 +1,168 @@ +'\" t +.\" Title: \fBinnochecksum\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBINNOCHECKSUM\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" innochecksum +.SH "NAME" +innochecksum \- offline InnoDB file checksum utility +.SH "SYNOPSIS" +.HP \w'\fBinnochecksum\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIfile_name\fR\fR\ 'u +\fBinnochecksum [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIfile_name\fR\fR +.SH "DESCRIPTION" +.PP +\fBinnochecksum\fR +prints checksums for +InnoDB +files\&. This tool reads an +InnoDB +tablespace file, calculates the checksum for each page, compares the calculated checksum to the stored checksum, and reports mismatches, which indicate damaged pages\&. It was originally developed to speed up verifying the integrity of tablespace files after power outages but can also be used after file copies\&. Because checksum mismatches will cause +InnoDB +to deliberately shut down a running server, it can be preferable to use this tool rather than waiting for a server in production usage to encounter the damaged pages\&. +\fBinnochecksum\fR +supports files up to 2GB in size\&. +.PP +\fBinnochecksum\fR +cannot be used on tablespace files that the server already has open\&. For such files, you should use +CHECK TABLE +to check tables within the tablespace\&. +.PP +If checksum mismatches are found, you would normally restore the tablespace from backup or start the server and attempt to use +\fBmysqldump\fR +to make a backup of the tables within the tablespace\&. +.PP +Invoke +\fBinnochecksum\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBinnochecksum [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIfile_name\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBinnochecksum\fR +supports the following options\&. For options that refer to page numbers, the numbers are zero\-based\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-c\fR +.sp +Print a count of the number of pages in the file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-d\fR +.sp +Debug mode; prints checksums for each page\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-e \fR\fB\fInum\fR\fR +.sp +End at this page number\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-p \fR\fB\fInum\fR\fR +.sp +Check only this page number\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-s \fR\fB\fInum\fR\fR +.sp +Start at this page number\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-v\fR +.sp +Verbose mode; print a progress indicator every five seconds\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 new file mode 100644 index 000000000000..fef29b589309 --- /dev/null +++ b/man/msql2mysql.1 @@ -0,0 +1,85 @@ +'\" t +.\" Title: \fBmsql2mysql\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMSQL2MYSQL\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" msql2mysql +.SH "NAME" +msql2mysql \- convert mSQL programs for use with MySQL +.SH "SYNOPSIS" +.HP \w'\fBmsql2mysql\fR\fB\fIC\-source\-file\fR\fR\fB\ \&.\&.\&.\fR\ 'u +\fBmsql2mysql\fR\fB\fIC\-source\-file\fR\fR\fB \&.\&.\&.\fR +.SH "DESCRIPTION" +.PP +Initially, the MySQL C API was developed to be very similar to that for the mSQL database system\&. Because of this, mSQL programs often can be converted relatively easily for use with MySQL by changing the names of the C API functions\&. +.PP +The +\fBmsql2mysql\fR +utility performs the conversion of mSQL C API function calls to their MySQL equivalents\&. +\fBmsql2mysql\fR +converts the input file in place, so make a copy of the original before converting it\&. For example, use +\fBmsql2mysql\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBcp client\-prog\&.c client\-prog\&.c\&.orig\fR +shell> \fBmsql2mysql client\-prog\&.c\fR +client\-prog\&.c converted +.fi +.if n \{\ +.RE +.\} +.PP +Then examine +client\-prog\&.c +and make any post\-conversion revisions that may be necessary\&. +.PP +\fBmsql2mysql\fR +uses the +\fBreplace\fR +utility to make the function name substitutions\&. See +\fBreplace\fR(1)\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 new file mode 100644 index 000000000000..c8cbe481b473 --- /dev/null +++ b/man/my_print_defaults.1 @@ -0,0 +1,220 @@ +'\" t +.\" Title: \fBmy_print_defaults\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMY_PRINT_DEFAULTS" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" my_print_defaults +.SH "NAME" +my_print_defaults \- display options from option files +.SH "SYNOPSIS" +.HP \w'\fBmy_print_defaults\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIoption_group\fR\fR\fB\ \&.\&.\&.\fR\ 'u +\fBmy_print_defaults [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIoption_group\fR\fR\fB \&.\&.\&.\fR +.SH "DESCRIPTION" +.PP +\fBmy_print_defaults\fR +displays the options that are present in option groups of option files\&. The output indicates what options will be used by programs that read the specified option groups\&. For example, the +\fBmysqlcheck\fR +program reads the +[mysqlcheck] +and +[client] +option groups\&. To see what options are present in those groups in the standard option files, invoke +\fBmy_print_defaults\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmy_print_defaults mysqlcheck client\fR +\-\-user=myusername +\-\-password=secret +\-\-host=localhost +.fi +.if n \{\ +.RE +.\} +.PP +The output consists of options, one per line, in the form that they would be specified on the command line\&. +.PP +\fBmy_print_defaults\fR +supports the following options\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" my_print_defaults: help option +.\" help option: my_print_defaults +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" my_print_defaults: config-file option +.\" config-file option: my_print_defaults +\fB\-\-config\-file=\fR\fB\fIfile_name\fR\fR, +.\" my_print_defaults: defaults-file option +.\" defaults-file option: my_print_defaults +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR, +\fB\-c \fR\fB\fIfile_name\fR\fR +.sp +Read only the given option file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" my_print_defaults: debug option +.\" debug option: my_print_defaults +\fB\-\-debug=\fR\fB\fIdebug_options\fR\fR, +\fB\-# \fR\fB\fIdebug_options\fR\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:o,\fIfile_name\fR\&. The default is +d:t:o,/tmp/my_print_defaults\&.trace\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" my_print_defaults: defaults-extra-file option +.\" defaults-extra-file option: my_print_defaults +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR, +.\" my_print_defaults: extra-file option +.\" extra-file option: my_print_defaults +\fB\-\-extra\-file=\fR\fB\fIfile_name\fR\fR, +\fB\-e \fR\fB\fIfile_name\fR\fR +.sp +Read this option file after the global option file but (on Unix) before the user option file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" my_print_defaults: defaults-group-suffix option +.\" defaults-group-suffix option: my_print_defaults +\fB\-\-defaults\-group\-suffix=\fR\fB\fIsuffix\fR\fR, +\fB\-g \fR\fB\fIsuffix\fR\fR +.sp +In addition to the groups named on the command line, read groups that have the given suffix\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" my_print_defaults: no-defaults option +.\" no-defaults option: my_print_defaults +\fB\-\-no\-defaults\fR, +\fB\-n\fR +.sp +Return an empty string\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" my_print_defaults: verbose option +.\" verbose option: my_print_defaults +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print more information about what the program does\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" my_print_defaults: version option +.\" version option: my_print_defaults +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 new file mode 100644 index 000000000000..6c22e57c3314 --- /dev/null +++ b/man/myisam_ftdump.1 @@ -0,0 +1,267 @@ +'\" t +.\" Title: \fBmyisam_ftdump\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYISAM_FTDUMP\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" myisam_ftdump +.SH "NAME" +myisam_ftdump \- display full\-text index information +.SH "SYNOPSIS" +.HP \w'\fBmyisam_ftdump\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fItbl_name\fR\fR\fB\ \fR\fB\fIindex_num\fR\fR\ 'u +\fBmyisam_ftdump [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fItbl_name\fR\fR\fB \fR\fB\fIindex_num\fR\fR +.SH "DESCRIPTION" +.PP +\fBmyisam_ftdump\fR +displays information about +FULLTEXT +indexes in +MyISAM +tables\&. It reads the +MyISAM +index file directly, so it must be run on the server host where the table is located\&. Before using +\fBmyisam_ftdump\fR, be sure to issue a +FLUSH TABLES +statement first if the server is running\&. +.PP +\fBmyisam_ftdump\fR +scans and dumps the entire index, which is not particularly fast\&. On the other hand, the distribution of words changes infrequently, so it need not be run often\&. +.PP +Invoke +\fBmyisam_ftdump\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisam_ftdump [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fItbl_name\fR\fR\fB \fR\fB\fIindex_num\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +The +\fItbl_name\fR +argument should be the name of a +MyISAM +table\&. You can also specify a table by naming its index file (the file with the +\&.MYI +suffix)\&. If you do not invoke +\fBmyisam_ftdump\fR +in the directory where the table files are located, the table or index file name must be preceded by the path name to the table\*(Aqs database directory\&. Index numbers begin with 0\&. +.PP +Example: Suppose that the +test +database contains a table named +mytexttable +that has the following definition: +.sp +.if n \{\ +.RS 4 +.\} +.nf +CREATE TABLE mytexttable +( + id INT NOT NULL, + txt TEXT NOT NULL, + PRIMARY KEY (id), + FULLTEXT (txt) +) ENGINE=MyISAM; +.fi +.if n \{\ +.RE +.\} +.PP +The index on +id +is index 0 and the +FULLTEXT +index on +txt +is index 1\&. If your working directory is the +test +database directory, invoke +\fBmyisam_ftdump\fR +as follows: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisam_ftdump mytexttable 1\fR +.fi +.if n \{\ +.RE +.\} +.PP +If the path name to the +test +database directory is +/usr/local/mysql/data/test, you can also specify the table name argument using that path name\&. This is useful if you do not invoke +\fBmyisam_ftdump\fR +in the database directory: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisam_ftdump /usr/local/mysql/data/test/mytexttable 1\fR +.fi +.if n \{\ +.RE +.\} +.PP +You can use +\fBmyisam_ftdump\fR +to generate a list of index entries in order of frequency of occurrence like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisam_ftdump \-c mytexttable 1 | sort \-r\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBmyisam_ftdump\fR +supports the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisam_ftdump: help option +.\" help option: myisam_ftdump +\fB\-\-help\fR, +\fB\-h\fR +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisam_ftdump: count option +.\" count option: myisam_ftdump +\fB\-\-count\fR, +\fB\-c\fR +.sp +Calculate per\-word statistics (counts and global weights)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisam_ftdump: dump option +.\" dump option: myisam_ftdump +\fB\-\-dump\fR, +\fB\-d\fR +.sp +Dump the index, including data offsets and word weights\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisam_ftdump: length option +.\" length option: myisam_ftdump +\fB\-\-length\fR, +\fB\-l\fR +.sp +Report the length distribution\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisam_ftdump: stats option +.\" stats option: myisam_ftdump +\fB\-\-stats\fR, +\fB\-s\fR +.sp +Report global index statistics\&. This is the default operation if no other operation is specified\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisam_ftdump: verbose option +.\" verbose option: myisam_ftdump +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print more output about what the program does\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/myisamchk.1 b/man/myisamchk.1 new file mode 100644 index 000000000000..6dee896f32c7 --- /dev/null +++ b/man/myisamchk.1 @@ -0,0 +1,2596 @@ +'\" t +.\" Title: \fBmyisamchk\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYISAMCHK\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" myisamchk +.SH "NAME" +myisamchk \- MyISAM table\-maintenance utility +.SH "SYNOPSIS" +.HP \w'\fBmyisamchk\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fItbl_name\fR\fR\fB\ \&.\&.\&.\fR\ 'u +\fBmyisamchk [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.\fR +.SH "DESCRIPTION" +.PP +The +\fBmyisamchk\fR +utility gets information about your database tables or checks, repairs, or optimizes them\&. +\fBmyisamchk\fR +works with +MyISAM +tables (tables that have +\&.MYD +and +\&.MYI +files for storing data and indexes)\&. +.PP +You can also use the +CHECK TABLE +and +REPAIR TABLE +statements to check and repair +MyISAM +tables\&. See +Section\ \&13.7.2.2, \(lqCHECK TABLE Syntax\(rq, and +Section\ \&13.7.2.5, \(lqREPAIR TABLE Syntax\(rq\&. +.PP +The use of +\fBmyisamchk\fR +with partitioned tables is not supported\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBCaution\fR +.ps -1 +.br +.PP +It is best to make a backup of a table before performing a table repair operation; under some circumstances the operation might cause data loss\&. Possible causes include but are not limited to file system errors\&. +.sp .5v +.RE +.PP +Invoke +\fBmyisamchk\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisamchk [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.PP +The +\fIoptions\fR +specify what you want +\fBmyisamchk\fR +to do\&. They are described in the following sections\&. You can also get a list of options by invoking +\fBmyisamchk \-\-help\fR\&. +.PP +With no options, +\fBmyisamchk\fR +simply checks your table as the default operation\&. To get more information or to tell +\fBmyisamchk\fR +to take corrective action, specify options as described in the following discussion\&. +.PP +\fItbl_name\fR +is the database table you want to check or repair\&. If you run +\fBmyisamchk\fR +somewhere other than in the database directory, you must specify the path to the database directory, because +\fBmyisamchk\fR +has no idea where the database is located\&. In fact, +\fBmyisamchk\fR +does not actually care whether the files you are working on are located in a database directory\&. You can copy the files that correspond to a database table into some other location and perform recovery operations on them there\&. +.PP +You can name several tables on the +\fBmyisamchk\fR +command line if you wish\&. You can also specify a table by naming its index file (the file with the +\&.MYI +suffix)\&. This enables you to specify all tables in a directory by using the pattern +*\&.MYI\&. For example, if you are in a database directory, you can check all the +MyISAM +tables in that directory like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisamchk *\&.MYI\fR +.fi +.if n \{\ +.RE +.\} +.PP +If you are not in the database directory, you can check all the tables there by specifying the path to the directory: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisamchk \fR\fB\fI/path/to/database_dir/\fR\fR\fB*\&.MYI\fR +.fi +.if n \{\ +.RE +.\} +.PP +You can even check all tables in all databases by specifying a wildcard with the path to the MySQL data directory: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisamchk \fR\fB\fI/path/to/datadir/*/*\fR\fR\fB\&.MYI\fR +.fi +.if n \{\ +.RE +.\} +.PP +The recommended way to quickly check all +MyISAM +tables is: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisamchk \-\-silent \-\-fast \fR\fB\fI/path/to/datadir/*/*\fR\fR\fB\&.MYI\fR +.fi +.if n \{\ +.RE +.\} +.PP +If you want to check all +MyISAM +tables and repair any that are corrupted, you can use the following command: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisamchk \-\-silent \-\-force \-\-fast \-\-update\-state \e\fR + \fB\-\-key_buffer_size=64M \-\-myisam_sort_buffer_size=64M \e\fR + \fB\-\-read_buffer_size=1M \-\-write_buffer_size=1M \e\fR + \fB\fI/path/to/datadir/*/*\fR\fR\fB\&.MYI\fR +.fi +.if n \{\ +.RE +.\} +.PP +This command assumes that you have more than 64MB free\&. For more information about memory allocation with +\fBmyisamchk\fR, see +the section called \(lqMYISAMCHK MEMORY USAGE\(rq\&. +.PP +For additional information about using +\fBmyisamchk\fR, see +Section\ \&7.6, \(lqMyISAM Table Maintenance and Crash Recovery\(rq\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +.PP +\fIYou must ensure that no other program is using the tables while you are running \fR\fI\fBmyisamchk\fR\fR\&. The most effective means of doing so is to shut down the MySQL server while running +\fBmyisamchk\fR, or to lock all tables that +\fBmyisamchk\fR +is being used on\&. +.PP +Otherwise, when you run +\fBmyisamchk\fR, it may display the following error message: +.sp +.if n \{\ +.RS 4 +.\} +.nf +warning: clients are using or haven\*(Aqt closed the table properly +.fi +.if n \{\ +.RE +.\} +.PP +This means that you are trying to check a table that has been updated by another program (such as the +\fBmysqld\fR +server) that hasn\*(Aqt yet closed the file or that has died without closing the file properly, which can sometimes lead to the corruption of one or more +MyISAM +tables\&. +.PP +If +\fBmysqld\fR +is running, you must force it to flush any table modifications that are still buffered in memory by using +FLUSH TABLES\&. You should then ensure that no one is using the tables while you are running +\fBmyisamchk\fR +.PP +However, the easiest way to avoid this problem is to use +CHECK TABLE +instead of +\fBmyisamchk\fR +to check tables\&. See +Section\ \&13.7.2.2, \(lqCHECK TABLE Syntax\(rq\&. +.sp .5v +.RE +.PP +\fBmyisamchk\fR +supports the following options, which can be specified on the command line or in the +[myisamchk] +group of an option file\&. For information about option files used by MySQL programs, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.SH "MYISAMCHK GENERAL OPTIONS" +.\" options: myisamchk +.\" myisamchk: options +.PP +The options described in this section can be used for any type of table maintenance operation performed by +\fBmyisamchk\fR\&. The sections following this one describe options that pertain only to specific operations, such as table checking or repairing\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: help option +.\" help option: myisamchk +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. Options are grouped by type of operation\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: HELP option +.\" HELP option: myisamchk +\fB\-\-HELP\fR, +\fB\-H\fR +.sp +Display a help message and exit\&. Options are presented in a single list\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: debug option +.\" debug option: myisamchk +\fB\-\-debug=\fR\fB\fIdebug_options\fR\fR, +\fB\-# \fR\fB\fIdebug_options\fR\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:o,\fIfile_name\fR\&. The default is +d:t:o,/tmp/myisamchk\&.trace\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: defaults-extra-file option +.\" defaults-extra-file option: myisamchk +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +.sp +Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: defaults-file option +.\" defaults-file option: myisamchk +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: defaults-group-suffix option +.\" defaults-group-suffix option: myisamchk +\fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR +.sp +Read not only the usual option groups, but also groups with the usual names and a suffix of +\fIstr\fR\&. For example, +\fBmyisamchk\fR +normally reads the +[myisamchk] +group\&. If the +\fB\-\-defaults\-group\-suffix=_other\fR +option is given, +\fBmyisamchk\fR +also reads the +[myisamchk_other] +group\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: no-defaults option +.\" no-defaults option: myisamchk +\fB\-\-no\-defaults\fR +.sp +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: print-defaults option +.\" print-defaults option: myisamchk +\fB\-\-print\-defaults\fR +.sp +Print the program name and all options that it gets from option files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: silent option +.\" silent option: myisamchk +\fB\-\-silent\fR, +\fB\-s\fR +.sp +Silent mode\&. Write output only when errors occur\&. You can use +\fB\-s\fR +twice (\fB\-ss\fR) to make +\fBmyisamchk\fR +very silent\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: verbose option +.\" verbose option: myisamchk +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print more information about what the program does\&. This can be used with +\fB\-d\fR +and +\fB\-e\fR\&. Use +\fB\-v\fR +multiple times (\fB\-vv\fR, +\fB\-vvv\fR) for even more output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: version option +.\" version option: myisamchk +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: wait option +.\" wait option: myisamchk +\fB\-\-wait\fR, +\fB\-w\fR +.sp +Instead of terminating with an error if the table is locked, wait until the table is unlocked before continuing\&. If you are running +\fBmysqld\fR +with external locking disabled, the table can be locked only by another +\fBmyisamchk\fR +command\&. +.RE +.PP +You can also set the following variables by using +\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR +syntax: +.\" decode_bits myisamchk variable +.\" ft_max_word_len myisamchk variable +.\" ft_min_word_len myisamchk variable +.\" ft_stopword_file myisamchk variable +.\" key_buffer_size myisamchk variable +.\" myisam_block_size myisamchk variable +.\" read_buffer_size myisamchk variable +.\" sort_buffer_size myisamchk variable +.\" myisam_sort_buffer_size myisamchk variable +.\" sort_key_blocks myisamchk variable +.\" stats_method myisamchk variable +.\" write_buffer_size myisamchk variable +.TS +allbox tab(:); +lB lB. +T{ +Variable +T}:T{ +Default Value +T} +.T& +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l. +T{ +decode_bits +T}:T{ +9 +T} +T{ +ft_max_word_len +T}:T{ +version\-dependent +T} +T{ +ft_min_word_len +T}:T{ +4 +T} +T{ +ft_stopword_file +T}:T{ +built\-in list +T} +T{ +key_buffer_size +T}:T{ +523264 +T} +T{ +myisam_block_size +T}:T{ +1024 +T} +T{ +myisam_sort_key_blocks +T}:T{ +16 +T} +T{ +read_buffer_size +T}:T{ +262136 +T} +T{ +sort_buffer_size +T}:T{ +2097144 +T} +T{ +sort_key_blocks +T}:T{ +16 +T} +T{ +stats_method +T}:T{ +nulls_unequal +T} +T{ +write_buffer_size +T}:T{ +262136 +T} +.TE +.sp 1 +.PP +The possible +\fBmyisamchk\fR +variables and their default values can be examined with +\fBmyisamchk \-\-help\fR: +.PP +sort_buffer_size +is used when the keys are repaired by sorting keys, which is the normal case when you use +\fB\-\-recover\fR\&. As of MySQL 5\&.5\&.29, +myisam_sort_buffer_size +is available as an alternative name to +sort_buffer_size\&. +myisam_sort_buffer_size +is preferable to +sort_buffer_size +because its name corresponds to the +myisam_sort_buffer_size +server system variable that has a similar meaning\&. +sort_buffer_size +should be considered deprecated\&. +.PP +key_buffer_size +is used when you are checking the table with +\fB\-\-extend\-check\fR +or when the keys are repaired by inserting keys row by row into the table (like when doing normal inserts)\&. Repairing through the key buffer is used in the following cases: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +You use +\fB\-\-safe\-recover\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The temporary files needed to sort the keys would be more than twice as big as when creating the key file directly\&. This is often the case when you have large key values for +CHAR, +VARCHAR, or +TEXT +columns, because the sort operation needs to store the complete key values as it proceeds\&. If you have lots of temporary space and you can force +\fBmyisamchk\fR +to repair by sorting, you can use the +\fB\-\-sort\-recover\fR +option\&. +.RE +.PP +Repairing through the key buffer takes much less disk space than using sorting, but is also much slower\&. +.PP +If you want a faster repair, set the +key_buffer_size +and +myisam_sort_buffer_size +variables to about 25% of your available memory\&. You can set both variables to large values, because only one of them is used at a time\&. +.PP +myisam_block_size +is the size used for index blocks\&. +.PP +stats_method +influences how +NULL +values are treated for index statistics collection when the +\fB\-\-analyze\fR +option is given\&. It acts like the +myisam_stats_method +system variable\&. For more information, see the description of +myisam_stats_method +in +Section\ \&5.1.4, \(lqServer System Variables\(rq, and +Section\ \&8.3.7, \(lqInnoDB and MyISAM Index Statistics Collection\(rq\&. +.PP +ft_min_word_len +and +ft_max_word_len +indicate the minimum and maximum word length for +FULLTEXT +indexes\&. +ft_stopword_file +names the stopword file\&. These need to be set under the following circumstances\&. +.PP +If you use +\fBmyisamchk\fR +to perform an operation that modifies table indexes (such as repair or analyze), the +FULLTEXT +indexes are rebuilt using the default full\-text parameter values for minimum and maximum word length and the stopword file unless you specify otherwise\&. This can result in queries failing\&. +.PP +The problem occurs because these parameters are known only by the server\&. They are not stored in +MyISAM +index files\&. To avoid the problem if you have modified the minimum or maximum word length or the stopword file in the server, specify the same +ft_min_word_len, +ft_max_word_len, and +ft_stopword_file +values to +\fBmyisamchk\fR +that you use for +\fBmysqld\fR\&. For example, if you have set the minimum word length to 3, you can repair a table with +\fBmyisamchk\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisamchk \-\-recover \-\-ft_min_word_len=3 \fR\fB\fItbl_name\fR\fR\fB\&.MYI\fR +.fi +.if n \{\ +.RE +.\} +.PP +To ensure that +\fBmyisamchk\fR +and the server use the same values for full\-text parameters, you can place each one in both the +[mysqld] +and +[myisamchk] +sections of an option file: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[mysqld] +ft_min_word_len=3 +[myisamchk] +ft_min_word_len=3 +.fi +.if n \{\ +.RE +.\} +.PP +An alternative to using +\fBmyisamchk\fR +is to use the +REPAIR TABLE, +ANALYZE TABLE, +OPTIMIZE TABLE, or +ALTER TABLE\&. These statements are performed by the server, which knows the proper full\-text parameter values to use\&. +.SH "MYISAMCHK CHECK OPTIONS" +.\" check options: myisamchk +.\" tables: checking +.PP +\fBmyisamchk\fR +supports the following options for table checking operations: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: check option +.\" check option: myisamchk +\fB\-\-check\fR, +\fB\-c\fR +.sp +Check the table for errors\&. This is the default operation if you specify no option that selects an operation type explicitly\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: check-only-changed option +.\" check-only-changed option: myisamchk +\fB\-\-check\-only\-changed\fR, +\fB\-C\fR +.sp +Check only tables that have changed since the last check\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: extend-check option +.\" extend-check option: myisamchk +\fB\-\-extend\-check\fR, +\fB\-e\fR +.sp +Check the table very thoroughly\&. This is quite slow if the table has many indexes\&. This option should only be used in extreme cases\&. Normally, +\fBmyisamchk\fR +or +\fBmyisamchk \-\-medium\-check\fR +should be able to determine whether there are any errors in the table\&. +.sp +If you are using +\fB\-\-extend\-check\fR +and have plenty of memory, setting the +key_buffer_size +variable to a large value helps the repair operation run faster\&. +.sp +See also the description of this option under table repair options\&. +.sp +For a description of the output format, see +the section called \(lqOBTAINING TABLE INFORMATION WITH MYISAMCHK\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: fast option +.\" fast option: myisamchk +\fB\-\-fast\fR, +\fB\-F\fR +.sp +Check only tables that haven\*(Aqt been closed properly\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: force option +.\" force option: myisamchk +\fB\-\-force\fR, +\fB\-f\fR +.sp +Do a repair operation automatically if +\fBmyisamchk\fR +finds any errors in the table\&. The repair type is the same as that specified with the +\fB\-\-recover\fR +or +\fB\-r\fR +option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: information option +.\" information option: myisamchk +\fB\-\-information\fR, +\fB\-i\fR +.sp +Print informational statistics about the table that is checked\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: medium-check option +.\" medium-check option: myisamchk +\fB\-\-medium\-check\fR, +\fB\-m\fR +.sp +Do a check that is faster than an +\fB\-\-extend\-check\fR +operation\&. This finds only 99\&.99% of all errors, which should be good enough in most cases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: read-only option +.\" read-only option: myisamchk +\fB\-\-read\-only\fR, +\fB\-T\fR +.sp +Do not mark the table as checked\&. This is useful if you use +\fBmyisamchk\fR +to check a table that is in use by some other application that does not use locking, such as +\fBmysqld\fR +when run with external locking disabled\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: update-state option +.\" update-state option: myisamchk +\fB\-\-update\-state\fR, +\fB\-U\fR +.sp +Store information in the +\&.MYI +file to indicate when the table was checked and whether the table crashed\&. This should be used to get full benefit of the +\fB\-\-check\-only\-changed\fR +option, but you shouldn\*(Aqt use this option if the +\fBmysqld\fR +server is using the table and you are running it with external locking disabled\&. +.RE +.SH "MYISAMCHK REPAIR OPTIONS" +.\" repair options: myisamchk +.\" files: repairing +.PP +\fBmyisamchk\fR +supports the following options for table repair operations (operations performed when an option such as +\fB\-\-recover\fR +or +\fB\-\-safe\-recover\fR +is given): +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: backup option +.\" backup option: myisamchk +\fB\-\-backup\fR, +\fB\-B\fR +.sp +Make a backup of the +\&.MYD +file as +\fIfile_name\fR\-\fItime\fR\&.BAK +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: character-sets-dir option +.\" character-sets-dir option: myisamchk +\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory where character sets are installed\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: correct-checksum option +.\" correct-checksum option: myisamchk +\fB\-\-correct\-checksum\fR +.sp +Correct the checksum information for the table\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: data-file-length option +.\" data-file-length option: myisamchk +\fB\-\-data\-file\-length=\fR\fB\fIlen\fR\fR, +\fB\-D \fR\fB\fIlen\fR\fR +.sp +The maximum length of the data file (when re\-creating data file when it is +\(lqfull\(rq)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: extend-check option +.\" extend-check option: myisamchk +\fB\-\-extend\-check\fR, +\fB\-e\fR +.sp +Do a repair that tries to recover every possible row from the data file\&. Normally, this also finds a lot of garbage rows\&. Do not use this option unless you are desperate\&. +.sp +See also the description of this option under table checking options\&. +.sp +For a description of the output format, see +the section called \(lqOBTAINING TABLE INFORMATION WITH MYISAMCHK\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: force option +.\" force option: myisamchk +\fB\-\-force\fR, +\fB\-f\fR +.sp +Overwrite old intermediate files (files with names like +\fItbl_name\fR\&.TMD) instead of aborting\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: keys-used option +.\" keys-used option: myisamchk +\fB\-\-keys\-used=\fR\fB\fIval\fR\fR, +\fB\-k \fR\fB\fIval\fR\fR +.sp +For +\fBmyisamchk\fR, the option value is a bit\-value that indicates which indexes to update\&. Each binary bit of the option value corresponds to a table index, where the first index is bit 0\&. An option value of 0 disables updates to all indexes, which can be used to get faster inserts\&. Deactivated indexes can be reactivated by using +\fBmyisamchk \-r\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: no-symlinks option +.\" no-symlinks option: myisamchk +\fB\-\-no\-symlinks\fR, +\fB\-l\fR +.sp +Do not follow symbolic links\&. Normally +\fBmyisamchk\fR +repairs the table that a symlink points to\&. This option does not exist as of MySQL 4\&.0 because versions from 4\&.0 on do not remove symlinks during repair operations\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: max-record-length option +.\" max-record-length option: myisamchk +\fB\-\-max\-record\-length=\fR\fB\fIlen\fR\fR +.sp +Skip rows larger than the given length if +\fBmyisamchk\fR +cannot allocate memory to hold them\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: parallel-recover option +.\" parallel-recover option: myisamchk +\fB\-\-parallel\-recover\fR, +\fB\-p\fR +.sp +Use the same technique as +\fB\-r\fR +and +\fB\-n\fR, but create all the keys in parallel, using different threads\&. +\fIThis is beta\-quality code\&. Use at your own risk!\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: quick option +.\" quick option: myisamchk +\fB\-\-quick\fR, +\fB\-q\fR +.sp +Achieve a faster repair by modifying only the index file, not the data file\&. You can specify this option twice to force +\fBmyisamchk\fR +to modify the original data file in case of duplicate keys\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: recover option +.\" recover option: myisamchk +\fB\-\-recover\fR, +\fB\-r\fR +.sp +Do a repair that can fix almost any problem except unique keys that are not unique (which is an extremely unlikely error with +MyISAM +tables)\&. If you want to recover a table, this is the option to try first\&. You should try +\fB\-\-safe\-recover\fR +only if +\fBmyisamchk\fR +reports that the table cannot be recovered using +\fB\-\-recover\fR\&. (In the unlikely case that +\fB\-\-recover\fR +fails, the data file remains intact\&.) +.sp +If you have lots of memory, you should increase the value of +myisam_sort_buffer_size\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: safe-recover option +.\" safe-recover option: myisamchk +\fB\-\-safe\-recover\fR, +\fB\-o\fR +.sp +Do a repair using an old recovery method that reads through all rows in order and updates all index trees based on the rows found\&. This is an order of magnitude slower than +\fB\-\-recover\fR, but can handle a couple of very unlikely cases that +\fB\-\-recover\fR +cannot\&. This recovery method also uses much less disk space than +\fB\-\-recover\fR\&. Normally, you should repair first using +\fB\-\-recover\fR, and then with +\fB\-\-safe\-recover\fR +only if +\fB\-\-recover\fR +fails\&. +.sp +If you have lots of memory, you should increase the value of +key_buffer_size\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: set-character-set option +.\" set-character-set option: myisamchk +\fB\-\-set\-character\-set=\fR\fB\fIname\fR\fR +.sp +Change the character set used by the table indexes\&. This option was replaced by +\fB\-\-set\-collation\fR +in MySQL 5\&.0\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: set-collation option +.\" set-collation option: myisamchk +\fB\-\-set\-collation=\fR\fB\fIname\fR\fR +.sp +Specify the collation to use for sorting table indexes\&. The character set name is implied by the first part of the collation name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: sort-recover option +.\" sort-recover option: myisamchk +\fB\-\-sort\-recover\fR, +\fB\-n\fR +.sp +Force +\fBmyisamchk\fR +to use sorting to resolve the keys even if the temporary files would be very large\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: tmpdir option +.\" tmpdir option: myisamchk +\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR, +\fB\-t \fR\fB\fIpath\fR\fR +.sp +The path of the directory to be used for storing temporary files\&. If this is not set, +\fBmyisamchk\fR +uses the value of the +TMPDIR +environment variable\&. +\fB\-\-tmpdir\fR +can be set to a list of directory paths that are used successively in round\-robin fashion for creating temporary files\&. The separator character between directory names is the colon (\(lq:\(rq) on Unix and the semicolon (\(lq;\(rq) on Windows\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: unpack option +.\" unpack option: myisamchk +\fB\-\-unpack\fR, +\fB\-u\fR +.sp +Unpack a table that was packed with +\fBmyisampack\fR\&. +.RE +.SH "OTHER MYISAMCHK OPTIONS" +.PP +\fBmyisamchk\fR +supports the following options for actions other than table checks and repairs: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: analyze option +.\" analyze option: myisamchk +\fB\-\-analyze\fR, +\fB\-a\fR +.sp +Analyze the distribution of key values\&. This improves join performance by enabling the join optimizer to better choose the order in which to join the tables and which indexes it should use\&. To obtain information about the key distribution, use a +\fBmyisamchk \-\-description \-\-verbose \fR\fB\fItbl_name\fR\fR +command or the +SHOW INDEX FROM \fItbl_name\fR +statement\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: block-search option +.\" block-search option: myisamchk +\fB\-\-block\-search=\fR\fB\fIoffset\fR\fR, +\fB\-b \fR\fB\fIoffset\fR\fR +.sp +Find the record that a block at the given offset belongs to\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: description option +.\" description option: myisamchk +\fB\-\-description\fR, +\fB\-d\fR +.sp +Print some descriptive information about the table\&. Specifying the +\fB\-\-verbose\fR +option once or twice produces additional information\&. See +the section called \(lqOBTAINING TABLE INFORMATION WITH MYISAMCHK\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: set-auto-increment[ option +.\" set-auto-increment[ option: myisamchk +\fB\-\-set\-auto\-increment[=\fR\fB\fIvalue\fR\fR\fB]\fR, +\fB\-A[\fR\fB\fIvalue\fR\fR\fB]\fR +.sp +Force +AUTO_INCREMENT +numbering for new records to start at the given value (or higher, if there are existing records with +AUTO_INCREMENT +values this large)\&. If +\fIvalue\fR +is not specified, +AUTO_INCREMENT +numbers for new records begin with the largest value currently in the table, plus one\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: sort-index option +.\" sort-index option: myisamchk +\fB\-\-sort\-index\fR, +\fB\-S\fR +.sp +Sort the index tree blocks in high\-low order\&. This optimizes seeks and makes table scans that use indexes faster\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisamchk: sort-records option +.\" sort-records option: myisamchk +\fB\-\-sort\-records=\fR\fB\fIN\fR\fR, +\fB\-R \fR\fB\fIN\fR\fR +.sp +Sort records according to a particular index\&. This makes your data much more localized and may speed up range\-based +SELECT +and +ORDER BY +operations that use this index\&. (The first time you use this option to sort a table, it may be very slow\&.) To determine a table\*(Aqs index numbers, use +SHOW INDEX, which displays a table\*(Aqs indexes in the same order that +\fBmyisamchk\fR +sees them\&. Indexes are numbered beginning with 1\&. +.sp +If keys are not packed (PACK_KEYS=0), they have the same length, so when +\fBmyisamchk\fR +sorts and moves records, it just overwrites record offsets in the index\&. If keys are packed (PACK_KEYS=1), +\fBmyisamchk\fR +must unpack key blocks first, then re\-create indexes and pack the key blocks again\&. (In this case, re\-creating indexes is faster than updating offsets for each index\&.) +.RE +.SH "OBTAINING TABLE INFORMATION WITH MYISAMCHK" +.\" table description: myisamchk +.\" tables: information +.\" examples: myisamchk output +.\" myisamchk: example output +.PP +To obtain a description of a +MyISAM +table or statistics about it, use the commands shown here\&. The output from these commands is explained later in this section\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBmyisamchk \-d \fR\fB\fItbl_name\fR\fR +.sp +Runs +\fBmyisamchk\fR +in +\(lqdescribe mode\(rq +to produce a description of your table\&. If you start the MySQL server with external locking disabled, +\fBmyisamchk\fR +may report an error for a table that is updated while it runs\&. However, because +\fBmyisamchk\fR +does not change the table in describe mode, there is no risk of destroying data\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBmyisamchk \-dv \fR\fB\fItbl_name\fR\fR +.sp +Adding +\fB\-v\fR +runs +\fBmyisamchk\fR +in verbose mode so that it produces more information about the table\&. Adding +\fB\-v\fR +a second time produces even more information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBmyisamchk \-eis \fR\fB\fItbl_name\fR\fR +.sp +Shows only the most important information from a table\&. This operation is slow because it must read the entire table\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBmyisamchk \-eiv \fR\fB\fItbl_name\fR\fR +.sp +This is like +\fB\-eis\fR, but tells you what is being done\&. +.RE +.PP +The +\fItbl_name\fR +argument can be either the name of a +MyISAM +table or the name of its index file, as described in +\fBmyisamchk\fR(1)\&. Multiple +\fItbl_name\fR +arguments can be given\&. +.PP +Suppose that a table named +person +has the following structure\&. (The +MAX_ROWS +table option is included so that in the example output from +\fBmyisamchk\fR +shown later, some values are smaller and fit the output format more easily\&.) +.sp +.if n \{\ +.RS 4 +.\} +.nf +CREATE TABLE person +( + id INT NOT NULL AUTO_INCREMENT, + last_name VARCHAR(20) NOT NULL, + first_name VARCHAR(20) NOT NULL, + birth DATE, + death DATE, + PRIMARY KEY (id), + INDEX (last_name, first_name), + INDEX (birth) +) MAX_ROWS = 1000000; +.fi +.if n \{\ +.RE +.\} +.PP +Suppose also that the table has these data and index file sizes: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-rw\-rw\-\-\-\- 1 mysql mysql 9347072 Aug 19 11:47 person\&.MYD +\-rw\-rw\-\-\-\- 1 mysql mysql 6066176 Aug 19 11:47 person\&.MYI +.fi +.if n \{\ +.RE +.\} +.PP +Example of +\fBmyisamchk \-dvv\fR +output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +MyISAM file: person +Record format: Packed +Character set: latin1_swedish_ci (8) +File\-version: 1 +Creation time: 2009\-08\-19 16:47:41 +Recover time: 2009\-08\-19 16:47:56 +Status: checked,analyzed,optimized keys +Auto increment key: 1 Last value: 306688 +Data records: 306688 Deleted blocks: 0 +Datafile parts: 306688 Deleted data: 0 +Datafile pointer (bytes): 4 Keyfile pointer (bytes): 3 +Datafile length: 9347072 Keyfile length: 6066176 +Max datafile length: 4294967294 Max keyfile length: 17179868159 +Recordlength: 54 +table description: +Key Start Len Index Type Rec/key Root Blocksize +1 2 4 unique long 1 99328 1024 +2 6 20 multip\&. varchar prefix 512 3563520 1024 + 27 20 varchar 512 +3 48 3 multip\&. uint24 NULL 306688 6065152 1024 +Field Start Length Nullpos Nullbit Type +1 1 1 +2 2 4 no zeros +3 6 21 varchar +4 27 21 varchar +5 48 3 1 1 no zeros +6 51 3 1 2 no zeros +.fi +.if n \{\ +.RE +.\} +.PP +Explanations for the types of information +\fBmyisamchk\fR +produces are given here\&. +\(lqKeyfile\(rq +refers to the index file\&. +\(lqRecord\(rq +and +\(lqrow\(rq +are synonymous, as are +\(lqfield\(rq +and +\(lqcolumn\&.\(rq +.PP +The initial part of the table description contains these values: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +MyISAM file +.sp +Name of the +MyISAM +(index) file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Record format +.sp +The format used to store table rows\&. The preceding examples use +Fixed length\&. Other possible values are +Compressed +and +Packed\&. (Packed +corresponds to what +SHOW TABLE STATUS +reports as +Dynamic\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Chararacter set +.sp +The table default character set\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +File\-version +.sp +Version of +MyISAM +format\&. Currently always 1\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Creation time +.sp +When the data file was created\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Recover time +.sp +When the index/data file was last reconstructed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Status +.sp +Table status flags\&. Possible values are +crashed, +open, +changed, +analyzed, +optimized keys, and +sorted index pages\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Auto increment key, +Last value +.sp +The key number associated the table\*(Aqs +AUTO_INCREMENT +column, and the most recently generated value for this column\&. These fields do not appear if there is no such column\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Data records +.sp +The number of rows in the table\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Deleted blocks +.sp +How many deleted blocks still have reserved space\&. You can optimize your table to minimize this space\&. See +Section\ \&7.6.4, \(lqMyISAM Table Optimization\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Datafile parts +.sp +For dynamic\-row format, this indicates how many data blocks there are\&. For an optimized table without fragmented rows, this is the same as +Data records\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Deleted data +.sp +How many bytes of unreclaimed deleted data there are\&. You can optimize your table to minimize this space\&. See +Section\ \&7.6.4, \(lqMyISAM Table Optimization\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Datafile pointer +.sp +The size of the data file pointer, in bytes\&. It is usually 2, 3, 4, or 5 bytes\&. Most tables manage with 2 bytes, but this cannot be controlled from MySQL yet\&. For fixed tables, this is a row address\&. For dynamic tables, this is a byte address\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Keyfile pointer +.sp +The size of the index file pointer, in bytes\&. It is usually 1, 2, or 3 bytes\&. Most tables manage with 2 bytes, but this is calculated automatically by MySQL\&. It is always a block address\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Max datafile length +.sp +How long the table data file can become, in bytes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Max keyfile length +.sp +How long the table index file can become, in bytes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Recordlength +.sp +How much space each row takes, in bytes\&. +.RE +.PP +The +table description +part of the output includes a list of all keys in the table\&. For each key, +\fBmyisamchk\fR +displays some low\-level information: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Key +.sp +This key\*(Aqs number\&. This value is shown only for the first column of the key\&. If this value is missing, the line corresponds to the second or later column of a multiple\-column key\&. For the table shown in the example, there are two +table description +lines for the second index\&. This indicates that it is a multiple\-part index with two parts\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Start +.sp +Where in the row this portion of the index starts\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Len +.sp +How long this portion of the index is\&. For packed numbers, this should always be the full length of the column\&. For strings, it may be shorter than the full length of the indexed column, because you can index a prefix of a string column\&. The total length of a multiple\-part key is the sum of the +Len +values for all key parts\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Index +.sp +Whether a key value can exist multiple times in the index\&. Possible values are +unique +or +multip\&. +(multiple)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Type +.sp +What data type this portion of the index has\&. This is a +MyISAM +data type with the possible values +packed, +stripped, or +empty\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Root +.sp +Address of the root index block\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Blocksize +.sp +The size of each index block\&. By default this is 1024, but the value may be changed at compile time when MySQL is built from source\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Rec/key +.sp +This is a statistical value used by the optimizer\&. It tells how many rows there are per value for this index\&. A unique index always has a value of 1\&. This may be updated after a table is loaded (or greatly changed) with +\fBmyisamchk \-a\fR\&. If this is not updated at all, a default value of 30 is given\&. +.RE +.PP +The last part of the output provides information about each column: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Field +.sp +The column number\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Start +.sp +The byte position of the column within table rows\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Length +.sp +The length of the column in bytes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Nullpos, +Nullbit +.sp +For columns that can be +NULL, +MyISAM +stores +NULL +values as a flag in a byte\&. Depending on how many nullable columns there are, there can be one or more bytes used for this purpose\&. The +Nullpos +and +Nullbit +values, if nonempty, indicate which byte and bit contains that flag indicating whether the column is +NULL\&. +.sp +The position and number of bytes used to store +NULL +flags is shown in the line for field 1\&. This is why there are six +Field +lines for the +person +table even though it has only five columns\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Type +.sp +The data type\&. The value may contain any of the following descriptors: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +constant +.sp +All rows have the same value\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +no endspace +.sp +Do not store endspace\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +no endspace, not_always +.sp +Do not store endspace and do not do endspace compression for all values\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +no endspace, no empty +.sp +Do not store endspace\&. Do not store empty values\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +table\-lookup +.sp +The column was converted to an +ENUM\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +zerofill(\fIN\fR) +.sp +The most significant +\fIN\fR +bytes in the value are always 0 and are not stored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +no zeros +.sp +Do not store zeros\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +always zero +.sp +Zero values are stored using one bit\&. +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Huff tree +.sp +The number of the Huffman tree associated with the column\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Bits +.sp +The number of bits used in the Huffman tree\&. +.RE +.PP +The +Huff tree +and +Bits +fields are displayed if the table has been compressed with +\fBmyisampack\fR\&. See +\fBmyisampack\fR(1), for an example of this information\&. +.PP +Example of +\fBmyisamchk \-eiv\fR +output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +Checking MyISAM file: person +Data records: 306688 Deleted blocks: 0 +\- check file\-size +\- check record delete\-chain +No recordlinks +\- check key delete\-chain +block_size 1024: +\- check index reference +\- check data record references index: 1 +Key: 1: Keyblocks used: 98% Packed: 0% Max levels: 3 +\- check data record references index: 2 +Key: 2: Keyblocks used: 99% Packed: 97% Max levels: 3 +\- check data record references index: 3 +Key: 3: Keyblocks used: 98% Packed: \-14% Max levels: 3 +Total: Keyblocks used: 98% Packed: 89% +\- check records and index references +\fI*** LOTS OF ROW NUMBERS DELETED ***\fR +Records: 306688 M\&.recordlength: 25 Packed: 83% +Recordspace used: 97% Empty space: 2% Blocks/Record: 1\&.00 +Record blocks: 306688 Delete blocks: 0 +Record data: 7934464 Deleted data: 0 +Lost space: 256512 Linkdata: 1156096 +User time 43\&.08, System time 1\&.68 +Maximum resident set size 0, Integral resident set size 0 +Non\-physical pagefaults 0, Physical pagefaults 0, Swaps 0 +Blocks in 0 out 7, Messages in 0 out 0, Signals 0 +Voluntary context switches 0, Involuntary context switches 0 +Maximum memory usage: 1046926 bytes (1023k) +.fi +.if n \{\ +.RE +.\} +.PP +\fBmyisamchk \-eiv\fR +output includes the following information: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Data records +.sp +The number of rows in the table\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Deleted blocks +.sp +How many deleted blocks still have reserved space\&. You can optimize your table to minimize this space\&. See +Section\ \&7.6.4, \(lqMyISAM Table Optimization\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Key +.sp +The key number\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Keyblocks used +.sp +What percentage of the keyblocks are used\&. When a table has just been reorganized with +\fBmyisamchk\fR, the values are very high (very near theoretical maximum)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Packed +.sp +MySQL tries to pack key values that have a common suffix\&. This can only be used for indexes on +CHAR +and +VARCHAR +columns\&. For long indexed strings that have similar leftmost parts, this can significantly reduce the space used\&. In the preceding example, the second key is 40 bytes long and a 97% reduction in space is achieved\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Max levels +.sp +How deep the B\-tree for this key is\&. Large tables with long key values get high values\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Records +.sp +How many rows are in the table\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +M\&.recordlength +.sp +The average row length\&. This is the exact row length for tables with fixed\-length rows, because all rows have the same length\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Packed +.sp +MySQL strips spaces from the end of strings\&. The +Packed +value indicates the percentage of savings achieved by doing this\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Recordspace used +.sp +What percentage of the data file is used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Empty space +.sp +What percentage of the data file is unused\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Blocks/Record +.sp +Average number of blocks per row (that is, how many links a fragmented row is composed of)\&. This is always 1\&.0 for fixed\-format tables\&. This value should stay as close to 1\&.0 as possible\&. If it gets too large, you can reorganize the table\&. See +Section\ \&7.6.4, \(lqMyISAM Table Optimization\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Recordblocks +.sp +How many blocks (links) are used\&. For fixed\-format tables, this is the same as the number of rows\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Deleteblocks +.sp +How many blocks (links) are deleted\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Recorddata +.sp +How many bytes in the data file are used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Deleted data +.sp +How many bytes in the data file are deleted (unused)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Lost space +.sp +If a row is updated to a shorter length, some space is lost\&. This is the sum of all such losses, in bytes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Linkdata +.sp +When the dynamic table format is used, row fragments are linked with pointers (4 to 7 bytes each)\&. +Linkdata +is the sum of the amount of storage used by all such pointers\&. +.RE +.SH "MYISAMCHK MEMORY USAGE" +.\" memory usage: myisamchk +.PP +Memory allocation is important when you run +\fBmyisamchk\fR\&. +\fBmyisamchk\fR +uses no more memory than its memory\-related variables are set to\&. If you are going to use +\fBmyisamchk\fR +on very large tables, you should first decide how much memory you want it to use\&. The default is to use only about 3MB to perform repairs\&. By using larger values, you can get +\fBmyisamchk\fR +to operate faster\&. For example, if you have more than 512MB RAM available, you could use options such as these (in addition to any other options you might specify): +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisamchk \-\-myisam_sort_buffer_size=256M \e\fR + \fB\-\-key_buffer_size=512M \e\fR + \fB\-\-read_buffer_size=64M \e\fR + \fB\-\-write_buffer_size=64M \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.PP +Using +\fB\-\-myisam_sort_buffer_size=16M\fR +is probably enough for most cases\&. +.PP +Be aware that +\fBmyisamchk\fR +uses temporary files in +TMPDIR\&. If +TMPDIR +points to a memory file system, out of memory errors can easily occur\&. If this happens, run +\fBmyisamchk\fR +with the +\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR +option to specify a directory located on a file system that has more space\&. +.PP +When performing repair operations, +\fBmyisamchk\fR +also needs a lot of disk space: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Twice the size of the data file (the original file and a copy)\&. This space is not needed if you do a repair with +\fB\-\-quick\fR; in this case, only the index file is re\-created\&. +\fIThis space must be available on the same file system as the original data file\fR, as the copy is created in the same directory as the original\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Space for the new index file that replaces the old one\&. The old index file is truncated at the start of the repair operation, so you usually ignore this space\&. This space must be available on the same file system as the original data file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +When using +\fB\-\-recover\fR +or +\fB\-\-sort\-recover\fR +(but not when using +\fB\-\-safe\-recover\fR), you need space on disk for sorting\&. This space is allocated in the temporary directory (specified by +TMPDIR +or +\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR)\&. The following formula yields the amount of space required: +.sp +.if n \{\ +.RS 4 +.\} +.nf +(\fIlargest_key\fR + \fIrow_pointer_length\fR) * \fInumber_of_rows\fR * 2 +.fi +.if n \{\ +.RE +.\} +.sp +You can check the length of the keys and the +\fIrow_pointer_length\fR +with +\fBmyisamchk \-dv \fR\fB\fItbl_name\fR\fR +(see +the section called \(lqOBTAINING TABLE INFORMATION WITH MYISAMCHK\(rq)\&. The +\fIrow_pointer_length\fR +and +\fInumber_of_rows\fR +values are the +Datafile pointer +and +Data records +values in the table description\&. To determine the +\fIlargest_key\fR +value, check the +Key +lines in the table description\&. The +Len +column indicates the number of bytes for each key part\&. For a multiple\-column index, the key size is the sum of the +Len +values for all key parts\&. +.RE +.PP +If you have a problem with disk space during repair, you can try +\fB\-\-safe\-recover\fR +instead of +\fB\-\-recover\fR\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/myisamlog.1 b/man/myisamlog.1 new file mode 100644 index 000000000000..bfce712a32a2 --- /dev/null +++ b/man/myisamlog.1 @@ -0,0 +1,244 @@ +'\" t +.\" Title: \fBmyisamlog\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYISAMLOG\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" myisamlog +.SH "NAME" +myisamlog \- display MyISAM log file contents +.SH "SYNOPSIS" +.HP \w'\fBmyisamlog\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIlog_file\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB]\ \&.\&.\&.]\fR\ 'u +\fBmyisamlog [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIlog_file\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB] \&.\&.\&.]\fR +.SH "DESCRIPTION" +.PP +\fBmyisamlog\fR +processes the contents of a +MyISAM +log file\&. To create such a file, start the server with a +\fB\-\-log\-isam=\fR\fBlog_file\fR +option\&. +.PP +Invoke +\fBmyisamlog\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisamlog [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIfile_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB] \&.\&.\&.]\fR +.fi +.if n \{\ +.RE +.\} +.PP +The default operation is update (\fB\-u\fR)\&. If a recovery is done (\fB\-r\fR), all writes and possibly updates and deletes are done and errors are only counted\&. The default log file name is +myisam\&.log +if no +\fIlog_file\fR +argument is given\&. If tables are named on the command line, only those tables are updated\&. +.PP +\fBmyisamlog\fR +supports the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-?\fR, +\fB\-I\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-c \fR\fB\fIN\fR\fR +.sp +Execute only +\fIN\fR +commands\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-f \fR\fB\fIN\fR\fR +.sp +Specify the maximum number of open files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-i\fR +.sp +Display extra information before exiting\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-o \fR\fB\fIoffset\fR\fR +.sp +Specify the starting offset\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-p \fR\fB\fIN\fR\fR +.sp +Remove +\fIN\fR +components from path\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-r\fR +.sp +Perform a recovery operation\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-R \fR\fB\fIrecord_pos_file record_pos\fR\fR +.sp +Specify record position file and record position\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-u\fR +.sp +Perform an update operation\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-v\fR +.sp +Verbose mode\&. Print more output about what the program does\&. This option can be given multiple times to produce more and more output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-w \fR\fB\fIwrite_file\fR\fR +.sp +Specify the write file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-V\fR +.sp +Display version information\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/myisampack.1 b/man/myisampack.1 new file mode 100644 index 000000000000..288c98e2688e --- /dev/null +++ b/man/myisampack.1 @@ -0,0 +1,869 @@ +'\" t +.\" Title: \fBmyisampack\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYISAMPACK\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" myisampack +.\" compressed tables +.\" tables: compressed +.\" MyISAM: compressed tables +.SH "NAME" +myisampack \- generate compressed, read\-only MyISAM tables +.SH "SYNOPSIS" +.HP \w'\fBmyisampack\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIfile_name\fR\fR\fB\ \&.\&.\&.\fR\ 'u +\fBmyisampack [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIfile_name\fR\fR\fB \&.\&.\&.\fR +.SH "DESCRIPTION" +.PP +The +\fBmyisampack\fR +utility compresses +MyISAM +tables\&. +\fBmyisampack\fR +works by compressing each column in the table separately\&. Usually, +\fBmyisampack\fR +packs the data file 40% to 70%\&. +.PP +When the table is used later, the server reads into memory the information needed to decompress columns\&. This results in much better performance when accessing individual rows, because you only have to uncompress exactly one row\&. +.PP +MySQL uses +mmap() +when possible to perform memory mapping on compressed tables\&. If +mmap() +does not work, MySQL falls back to normal read/write file operations\&. +.PP +Please note the following: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If the +\fBmysqld\fR +server was invoked with external locking disabled, it is not a good idea to invoke +\fBmyisampack\fR +if the table might be updated by the server during the packing process\&. It is safest to compress tables with the server stopped\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +After packing a table, it becomes read only\&. This is generally intended (such as when accessing packed tables on a CD)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBmyisampack\fR +does not support partitioned tables\&. +.RE +.PP +Invoke +\fBmyisampack\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisampack [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIfile_name\fR\fR\fB \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.PP +Each file name argument should be the name of an index (\&.MYI) file\&. If you are not in the database directory, you should specify the path name to the file\&. It is permissible to omit the +\&.MYI +extension\&. +.PP +After you compress a table with +\fBmyisampack\fR, you should use +\fBmyisamchk \-rq\fR +to rebuild its indexes\&. +\fBmyisamchk\fR(1)\&. +.PP +\fBmyisampack\fR +supports the following options\&. It also reads option files and supports the options for processing them described at +Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisampack: help option +.\" help option: myisampack +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisampack: backup option +.\" backup option: myisampack +\fB\-\-backup\fR, +\fB\-b\fR +.sp +Make a backup of each table\*(Aqs data file using the name +\fItbl_name\fR\&.OLD\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisampack: character-sets-dir option +.\" character-sets-dir option: myisampack +\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory where character sets are installed\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisampack: debug option +.\" debug option: myisampack +\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, +\fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:o,\fIfile_name\fR\&. The default is +d:t:o\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisampack: force option +.\" force option: myisampack +\fB\-\-force\fR, +\fB\-f\fR +.sp +Produce a packed table even if it becomes larger than the original or if the intermediate file from an earlier invocation of +\fBmyisampack\fR +exists\&. (\fBmyisampack\fR +creates an intermediate file named +\fItbl_name\fR\&.TMD +in the database directory while it compresses the table\&. If you kill +\fBmyisampack\fR, the +\&.TMD +file might not be deleted\&.) Normally, +\fBmyisampack\fR +exits with an error if it finds that +\fItbl_name\fR\&.TMD +exists\&. With +\fB\-\-force\fR, +\fBmyisampack\fR +packs the table anyway\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisampack: join option +.\" join option: myisampack +\fB\-\-join=\fR\fB\fIbig_tbl_name\fR\fR, +\fB\-j \fR\fB\fIbig_tbl_name\fR\fR +.sp +Join all tables named on the command line into a single packed table +\fIbig_tbl_name\fR\&. All tables that are to be combined +\fImust\fR +have identical structure (same column names and types, same indexes, and so forth)\&. +.sp +\fIbig_tbl_name\fR +must not exist prior to the join operation\&. All source tables named on the command line to be merged into +\fIbig_tbl_name\fR +must exist\&. The source tables are read for the join operation but not modified\&. The join operation does not create a +\&.frm +file for +\fIbig_tbl_name\fR, so after the join operation finishes, copy the +\&.frm +file from one of the source tables and name it +\fIbig_tbl_name\fR\&.frm\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisampack: silent option +.\" silent option: myisampack +\fB\-\-silent\fR, +\fB\-s\fR +.sp +Silent mode\&. Write output only when errors occur\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisampack: test option +.\" test option: myisampack +\fB\-\-test\fR, +\fB\-t\fR +.sp +Do not actually pack the table, just test packing it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisampack: tmpdir option +.\" tmpdir option: myisampack +\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR, +\fB\-T \fR\fB\fIpath\fR\fR +.sp +Use the named directory as the location where +\fBmyisampack\fR +creates temporary files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisampack: verbose option +.\" verbose option: myisampack +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Write information about the progress of the packing operation and its result\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisampack: version option +.\" version option: myisampack +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" myisampack: wait option +.\" wait option: myisampack +\fB\-\-wait\fR, +\fB\-w\fR +.sp +Wait and retry if the table is in use\&. If the +\fBmysqld\fR +server was invoked with external locking disabled, it is not a good idea to invoke +\fBmyisampack\fR +if the table might be updated by the server during the packing process\&. +.RE +.\" examples: compressed tables +.PP +The following sequence of commands illustrates a typical table compression session: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBls \-l station\&.*\fR +\-rw\-rw\-r\-\- 1 monty my 994128 Apr 17 19:00 station\&.MYD +\-rw\-rw\-r\-\- 1 monty my 53248 Apr 17 19:00 station\&.MYI +\-rw\-rw\-r\-\- 1 monty my 5767 Apr 17 19:00 station\&.frm +shell> \fBmyisamchk \-dvv station\fR +MyISAM file: station +Isam\-version: 2 +Creation time: 1996\-03\-13 10:08:58 +Recover time: 1997\-02\-02 3:06:43 +Data records: 1192 Deleted blocks: 0 +Datafile parts: 1192 Deleted data: 0 +Datafile pointer (bytes): 2 Keyfile pointer (bytes): 2 +Max datafile length: 54657023 Max keyfile length: 33554431 +Recordlength: 834 +Record format: Fixed length +table description: +Key Start Len Index Type Root Blocksize Rec/key +1 2 4 unique unsigned long 1024 1024 1 +2 32 30 multip\&. text 10240 1024 1 +Field Start Length Type +1 1 1 +2 2 4 +3 6 4 +4 10 1 +5 11 20 +6 31 1 +7 32 30 +8 62 35 +9 97 35 +10 132 35 +11 167 4 +12 171 16 +13 187 35 +14 222 4 +15 226 16 +16 242 20 +17 262 20 +18 282 20 +19 302 30 +20 332 4 +21 336 4 +22 340 1 +23 341 8 +24 349 8 +25 357 8 +26 365 2 +27 367 2 +28 369 4 +29 373 4 +30 377 1 +31 378 2 +32 380 8 +33 388 4 +34 392 4 +35 396 4 +36 400 4 +37 404 1 +38 405 4 +39 409 4 +40 413 4 +41 417 4 +42 421 4 +43 425 4 +44 429 20 +45 449 30 +46 479 1 +47 480 1 +48 481 79 +49 560 79 +50 639 79 +51 718 79 +52 797 8 +53 805 1 +54 806 1 +55 807 20 +56 827 4 +57 831 4 +shell> \fBmyisampack station\&.MYI\fR +Compressing station\&.MYI: (1192 records) +\- Calculating statistics +normal: 20 empty\-space: 16 empty\-zero: 12 empty\-fill: 11 +pre\-space: 0 end\-space: 12 table\-lookups: 5 zero: 7 +Original trees: 57 After join: 17 +\- Compressing file +87\&.14% +Remember to run myisamchk \-rq on compressed tables +shell> \fBls \-l station\&.*\fR +\-rw\-rw\-r\-\- 1 monty my 127874 Apr 17 19:00 station\&.MYD +\-rw\-rw\-r\-\- 1 monty my 55296 Apr 17 19:04 station\&.MYI +\-rw\-rw\-r\-\- 1 monty my 5767 Apr 17 19:00 station\&.frm +shell> \fBmyisamchk \-dvv station\fR +MyISAM file: station +Isam\-version: 2 +Creation time: 1996\-03\-13 10:08:58 +Recover time: 1997\-04\-17 19:04:26 +Data records: 1192 Deleted blocks: 0 +Datafile parts: 1192 Deleted data: 0 +Datafile pointer (bytes): 3 Keyfile pointer (bytes): 1 +Max datafile length: 16777215 Max keyfile length: 131071 +Recordlength: 834 +Record format: Compressed +table description: +Key Start Len Index Type Root Blocksize Rec/key +1 2 4 unique unsigned long 10240 1024 1 +2 32 30 multip\&. text 54272 1024 1 +Field Start Length Type Huff tree Bits +1 1 1 constant 1 0 +2 2 4 zerofill(1) 2 9 +3 6 4 no zeros, zerofill(1) 2 9 +4 10 1 3 9 +5 11 20 table\-lookup 4 0 +6 31 1 3 9 +7 32 30 no endspace, not_always 5 9 +8 62 35 no endspace, not_always, no empty 6 9 +9 97 35 no empty 7 9 +10 132 35 no endspace, not_always, no empty 6 9 +11 167 4 zerofill(1) 2 9 +12 171 16 no endspace, not_always, no empty 5 9 +13 187 35 no endspace, not_always, no empty 6 9 +14 222 4 zerofill(1) 2 9 +15 226 16 no endspace, not_always, no empty 5 9 +16 242 20 no endspace, not_always 8 9 +17 262 20 no endspace, no empty 8 9 +18 282 20 no endspace, no empty 5 9 +19 302 30 no endspace, no empty 6 9 +20 332 4 always zero 2 9 +21 336 4 always zero 2 9 +22 340 1 3 9 +23 341 8 table\-lookup 9 0 +24 349 8 table\-lookup 10 0 +25 357 8 always zero 2 9 +26 365 2 2 9 +27 367 2 no zeros, zerofill(1) 2 9 +28 369 4 no zeros, zerofill(1) 2 9 +29 373 4 table\-lookup 11 0 +30 377 1 3 9 +31 378 2 no zeros, zerofill(1) 2 9 +32 380 8 no zeros 2 9 +33 388 4 always zero 2 9 +34 392 4 table\-lookup 12 0 +35 396 4 no zeros, zerofill(1) 13 9 +36 400 4 no zeros, zerofill(1) 2 9 +37 404 1 2 9 +38 405 4 no zeros 2 9 +39 409 4 always zero 2 9 +40 413 4 no zeros 2 9 +41 417 4 always zero 2 9 +42 421 4 no zeros 2 9 +43 425 4 always zero 2 9 +44 429 20 no empty 3 9 +45 449 30 no empty 3 9 +46 479 1 14 4 +47 480 1 14 4 +48 481 79 no endspace, no empty 15 9 +49 560 79 no empty 2 9 +50 639 79 no empty 2 9 +51 718 79 no endspace 16 9 +52 797 8 no empty 2 9 +53 805 1 17 1 +54 806 1 3 9 +55 807 20 no empty 3 9 +56 827 4 no zeros, zerofill(2) 2 9 +57 831 4 no zeros, zerofill(1) 2 9 +.fi +.if n \{\ +.RE +.\} +.PP +\fBmyisampack\fR +displays the following kinds of information: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +normal +.sp +The number of columns for which no extra packing is used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +empty\-space +.sp +The number of columns containing values that are only spaces\&. These occupy one bit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +empty\-zero +.sp +The number of columns containing values that are only binary zeros\&. These occupy one bit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +empty\-fill +.sp +The number of integer columns that do not occupy the full byte range of their type\&. These are changed to a smaller type\&. For example, a +BIGINT +column (eight bytes) can be stored as a +TINYINT +column (one byte) if all its values are in the range from +\-128 +to +127\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +pre\-space +.sp +The number of decimal columns that are stored with leading spaces\&. In this case, each value contains a count for the number of leading spaces\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +end\-space +.sp +The number of columns that have a lot of trailing spaces\&. In this case, each value contains a count for the number of trailing spaces\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +table\-lookup +.sp +The column had only a small number of different values, which were converted to an +ENUM +before Huffman compression\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +zero +.sp +The number of columns for which all values are zero\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Original trees +.sp +The initial number of Huffman trees\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +After join +.sp +The number of distinct Huffman trees left after joining trees to save some header space\&. +.RE +.PP +After a table has been compressed, the +Field +lines displayed by +\fBmyisamchk \-dvv\fR +include additional information about each column: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Type +.sp +The data type\&. The value may contain any of the following descriptors: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +constant +.sp +All rows have the same value\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +no endspace +.sp +Do not store endspace\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +no endspace, not_always +.sp +Do not store endspace and do not do endspace compression for all values\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +no endspace, no empty +.sp +Do not store endspace\&. Do not store empty values\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +table\-lookup +.sp +The column was converted to an +ENUM\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +zerofill(\fIN\fR) +.sp +The most significant +\fIN\fR +bytes in the value are always 0 and are not stored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +no zeros +.sp +Do not store zeros\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +always zero +.sp +Zero values are stored using one bit\&. +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Huff tree +.sp +The number of the Huffman tree associated with the column\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Bits +.sp +The number of bits used in the Huffman tree\&. +.RE +.PP +After you run +\fBmyisampack\fR, you must run +\fBmyisamchk\fR +to re\-create any indexes\&. At this time, you can also sort the index blocks and create statistics needed for the MySQL optimizer to work more efficiently: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmyisamchk \-rq \-\-sort\-index \-\-analyze \fR\fB\fItbl_name\fR\fR\fB\&.MYI\fR +.fi +.if n \{\ +.RE +.\} +.PP +After you have installed the packed table into the MySQL database directory, you should execute +\fBmysqladmin flush\-tables\fR +to force +\fBmysqld\fR +to start using the new table\&. +.PP +To unpack a packed table, use the +\fB\-\-unpack\fR +option to +\fBmyisamchk\fR\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 new file mode 100644 index 000000000000..e7e2d8def65a --- /dev/null +++ b/man/mysql-stress-test.pl.1 @@ -0,0 +1,514 @@ +'\" t +.\" Title: \fBmysql-stress-test.pl\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/05/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL +.\" Language: English +.\" +.TH "\FBMYSQL\-STRESS\-TE" "1" "01/05/2015" "MySQL" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql-stress-test.pl +.SH "NAME" +mysql-stress-test.pl \- server stress test program +.SH "SYNOPSIS" +.HP \w'\fBmysql\-stress\-test\&.pl\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBmysql\-stress\-test\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +The +\fBmysql\-stress\-test\&.pl\fR +Perl script performs stress\-testing of the MySQL server\&. (MySQL 5\&.0 and up only) +.PP +\fBmysql\-stress\-test\&.pl\fR +requires a version of Perl that has been built with threads support\&. +.PP +Invoke +\fBmysql\-stress\-test\&.pl\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql\-stress\-test\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysql\-stress\-test\&.pl\fR +supports the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: help option +.\" help option: mysql-stress-test.pl +\fB\-\-help\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: abort-on-error option +.\" abort-on-error option: mysql-stress-test.pl +\fB\-\-abort\-on\-error=\fR\fB\fIN\fR\fR +.sp +Causes the program to abort if an error with severity less than or equal to N was encountered\&. Set to 1 to abort on any error\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: check-tests-file option +.\" check-tests-file option: mysql-stress-test.pl +\fB\-\-check\-tests\-file\fR +.sp +Periodically check the file that lists the tests to be run\&. If it has been modified, reread the file\&. This can be useful if you update the list of tests to be run during a stress test\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: cleanup option +.\" cleanup option: mysql-stress-test.pl +\fB\-\-cleanup\fR +.sp +Force cleanup of the working directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: log-error-details option +.\" log-error-details option: mysql-stress-test.pl +\fB\-\-log\-error\-details\fR +.sp +Log error details in the global error log file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: loop-count option +.\" loop-count option: mysql-stress-test.pl +\fB\-\-loop\-count=\fR\fB\fIN\fR\fR +.sp +In sequential test mode, the number of loops to execute before exiting\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: mysqltest option +.\" mysqltest option: mysql-stress-test.pl +\fB\-\-mysqltest=\fR\fB\fIpath\fR\fR +.sp +The path name to the +\fBmysqltest\fR +program\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: server-database option +.\" server-database option: mysql-stress-test.pl +\fB\-\-server\-database=\fR\fB\fIdb_name\fR\fR +.sp +The database to use for the tests\&. The default is +test\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: server-host option +.\" server-host option: mysql-stress-test.pl +\fB\-\-server\-host=\fR\fB\fIhost_name\fR\fR +.sp +The host name of the local host to use for making a TCP/IP connection to the local server\&. By default, the connection is made to +localhost +using a Unix socket file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: server-logs-dir option +.\" server-logs-dir option: mysql-stress-test.pl +\fB\-\-server\-logs\-dir=\fR\fB\fIpath\fR\fR +.sp +This option is required\&. +\fIpath\fR +is the directory where all client session logs will be stored\&. Usually this is the shared directory that is associated with the server used for testing\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: server-password option +.\" server-password option: mysql-stress-test.pl +\fB\-\-server\-password=\fR\fB\fIpassword\fR\fR +.sp +The password to use when connecting to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: server-port option +.\" server-port option: mysql-stress-test.pl +\fB\-\-server\-port=\fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for connecting to the server\&. The default is 3306\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: server-socket option +.\" server-socket option: mysql-stress-test.pl +\fB\-\-server\-socket=\fR\fB\fIfile_name\fR\fR +.sp +For connections to +localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. The default if +/tmp/mysql\&.sock\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: server-user option +.\" server-user option: mysql-stress-test.pl +\fB\-\-server\-user=\fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. The default is +root\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: sleep-time option +.\" sleep-time option: mysql-stress-test.pl +\fB\-\-sleep\-time=\fR\fB\fIN\fR\fR +.sp +The delay in seconds between test executions\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: stress-basedir option +.\" stress-basedir option: mysql-stress-test.pl +\fB\-\-stress\-basedir=\fR\fB\fIpath\fR\fR +.sp +This option is required\&. +\fIpath\fR +is the working directory for the test run\&. It is used as the temporary location for result tracking during testing\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: stress-datadir option +.\" stress-datadir option: mysql-stress-test.pl +\fB\-\-stress\-datadir=\fR\fB\fIpath\fR\fR +.sp +The directory of data files to be used during testing\&. The default location is the +data +directory under the location given by the +\fB\-\-stress\-suite\-basedir\fR +option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: stress-init-file option +.\" stress-init-file option: mysql-stress-test.pl +\fB\-\-stress\-init\-file[=\fR\fB\fIpath\fR\fR\fB]\fR +.sp +\fIfile_name\fR +is the location of the file that contains the list of tests to be run once to initialize the database for the testing\&. If missing, the default file is +stress_init\&.txt +in the test suite directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: stress-mode option +.\" stress-mode option: mysql-stress-test.pl +\fB\-\-stress\-mode=\fR\fB\fImode\fR\fR +.sp +This option indicates the test order in stress\-test mode\&. The +\fImode\fR +value is either +random +to select tests in random order or +seq +to run tests in each thread in the order specified in the test list file\&. The default mode is +random\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: stress-suite-basedir option +.\" stress-suite-basedir option: mysql-stress-test.pl +\fB\-\-stress\-suite\-basedir=\fR\fB\fIpath\fR\fR +.sp +This option is required\&. +\fIpath\fR +is the directory that has the +t +and +\fIr\fR +subdirectories containing the test case and result files\&. This directory is also the default location of the +stress\-test\&.txt +file that contains the list of tests\&. (A different location can be specified with the +\fB\-\-stress\-tests\-file\fR +option\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: stress-tests-file option +.\" stress-tests-file option: mysql-stress-test.pl +\fB\-\-stress\-tests\-file[=\fR\fB\fIfile_name\fR\fR\fB]\fR +.sp +Use this option to run the stress tests\&. +\fIfile_name\fR +is the location of the file that contains the list of tests\&. If +\fIfile_name\fR +is omitted, the default file is +stress\-test\&.txt +in the stress suite directory\&. (See +\fB\-\-stress\-suite\-basedir\fR\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: suite option +.\" suite option: mysql-stress-test.pl +\fB\-\-suite=\fR\fB\fIsuite_name\fR\fR +.sp +Run the named test suite\&. The default name is +main +(the regular test suite located in the +mysql\-test +directory)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: test-count option +.\" test-count option: mysql-stress-test.pl +\fB\-\-test\-count=\fR\fB\fIN\fR\fR +.sp +The number of tests to execute before exiting\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: test-duration option +.\" test-duration option: mysql-stress-test.pl +\fB\-\-test\-duration=\fR\fB\fIN\fR\fR +.sp +The duration of stress testing in seconds\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: threads option +.\" threads option: mysql-stress-test.pl +\fB\-\-threads=\fR\fB\fIN\fR\fR +.sp +The number of threads\&. The default is 1\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-stress-test.pl: verbose option +.\" verbose option: mysql-stress-test.pl +\fB\-\-verbose\fR +.sp +Verbose mode\&. Print more information about what the program does\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 2006, 2014, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 new file mode 100644 index 000000000000..de637719efa4 --- /dev/null +++ b/man/mysql-test-run.pl.1 @@ -0,0 +1,2567 @@ +'\" t +.\" Title: \fBmysql-test-run.pl\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/05/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL +.\" Language: English +.\" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "01/05/2015" "MySQL" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql-test-run.pl +.SH "NAME" +mysql-test-run.pl \- run MySQL test suite +.SH "SYNOPSIS" +.HP \w'\fBmysql\-test\-run\&.pl\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBmysql\-test\-run\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +The +\fBmysql\-test\-run\&.pl\fR +Perl script is the main application used to run the MySQL test suite\&. It invokes +\fBmysqltest\fR +to run individual test cases\&. +.PP +Invoke +\fBmysql\-test\-run\&.pl\fR +in the +mysql\-test +directory like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql\-test\-run\&.pl [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.PP +Each +\fItest_name\fR +argument names a test case\&. The test case file that corresponds to the test name is +t/\fItest_name\fR\&.test\&. +.PP +For each +\fItest_name\fR +argument, +\fBmysql\-test\-run\&.pl\fR +runs the named test case\&. With no +\fItest_name\fR +arguments, +\fBmysql\-test\-run\&.pl\fR +runs all +\&.test +files in the +t +subdirectory\&. +.PP +If no suffix is given for the test name, a suffix of +\&.test +is assumed\&. Any leading path name is ignored\&. These commands are equivalent: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql\-test\-run\&.pl mytest\fR +shell> \fBmysql\-test\-run\&.pl mytest\&.test\fR +shell> \fBmysql\-test\-run\&.pl t/mytest\&.test\fR +.fi +.if n \{\ +.RE +.\} +.PP +A suite name can be given as part of the test name\&. That is, the syntax for naming a test is: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[\fIsuite_name\fR\&.]\fItest_name\fR[\&.\fIsuffix\fR] +.fi +.if n \{\ +.RE +.\} +.PP +If a suite name is given, +\fBmysql\-test\-run\&.pl\fR +looks in that suite for the test\&. The test file corresponding to a test named +\fIsuite_name\&.test_name\fR +is found in +suite/\fIsuite_name\fR/t/\fItest_name\fR\&.test\&. There is also an implicit suite name +main +for the tests in the top +t +directory\&. With no suite name, +\fBmysql\-test\-run\&.pl\fR +looks in the default list of suites for a match and runs the test in any suites where it finds the test\&. Suppose that the default suite list is +main, +binlog, +rpl, and that a test +mytest\&.test +exists in the +main +and +rpl +suites\&. With an argument of +mytest +or +mytest\&.test, +\fBmysql\-test\-run\&.pl\fR +will run +mytest\&.test +from the +main +and +rpl +suites\&. +.PP +To run a family of test cases for which the names share a common prefix, use the +\fB\-\-do\-test=\fR\fB\fIprefix\fR\fR +option\&. For example, +\fB\-\-do\-test=rpl\fR +runs the replication tests (test cases that have names beginning with +rpl)\&. +\fB\-\-skip\-test\fR +has the opposite effect of skipping test cases for which the names share a common prefix\&. +.PP +The argument for the +\fB\-\-do\-test\fR +and +\fB\-\-skip\-test\fR +options also allows more flexible specification of which tests to perform or skip\&. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern\&. If the argument contains a lone period or does not contain any pattern metacharacters, it is interpreted the same way as previously and matches test names that begin with the argument value\&. For example, +\fB\-\-do\-test=testa\fR +matches tests that begin with +testa, +\fB\-\-do\-test=main\&.testa\fR +matches tests in the +main +test suite that begin with +testa, and +\fB\-\-do\-test=main\&.*testa\fR +matches test names that contain +main +followed by +testa +with anything in between\&. In the latter case, the pattern match is not anchored to the beginning of the test name, so it also matches names such as +xmainytesta\&. +.PP +To perform setup prior to running tests, +\fBmysql\-test\-run\&.pl\fR +needs to invoke +\fBmysqld\fR +with the +\fB\-\-bootstrap\fR +and +\fB\-\-skip\-grant\-tables\fR +options\&. If MySQL was configured with the +\fB\-\-disable\-grant\-options\fR +option (only MySQL 5\&.1) or with the compiler flag +\fB\-DDISABLE_GRANT_OPTIONS\fR, then +\fB\-\-bootstrap\fR, +\fB\-\-skip\-grant\-tables\fR, and +\fB\-\-init\-file\fR +will be disabled\&. To handle this, set the +MYSQLD_BOOTSTRAP +environment variable to the full path name of a server that has all options enabled\&. +\fBmysql\-test\-run\&.pl\fR +will use that server to perform setup; it is not used to run the tests\&. +.PP +The +init_file +test will fail if +\fB\-\-init\-file\fR +is disabled\&. This is an expected failure in this case\&. +.PP +To run +\fBmysql\-test\-run\&.pl\fR +on Windows, you\*(Aqll need either Cygwin or ActiveState Perl to run it\&. You may also need to install the modules required by the script\&. To run the test script, change location into the +mysql\-test +directory, set the +MTR_VS_CONFIG +environment variable to the configuration you selected earlier (or use the +\fB\-\-vs\-config\fR +option), and invoke +\fBmysql\-test\-run\&.pl\fR\&. For example (using Cygwin and the +\fBbash\fR +shell): +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBcd mysql\-test\fR +shell> \fBexport MTR_VS_CONFIG=debug\fR +shell> \fB\&./mysqltest\-run\&.pl \-\-force \-\-timer\fR +shell> \fB\&./mysqltest\-run\&.pl \-\-force \-\-timer \-\-ps\-protocol\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysql\-test\-run\&.pl\fR +uses several environment variables\&. Some of them are listed in the following table\&. Some of these are set from the outside and used by +\fBmysql\-test\-run\&.pl\fR, others are set by +\fBmysql\-test\-run\&.pl\fR +instead, and may be referred to in tests\&. +.TS +allbox tab(:); +lB lB. +T{ +Variable +T}:T{ +Description +T} +.T& +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l. +T{ +MTR_VERSION +T}:T{ +If set to 1, will run the older version 1 of + \fBmysql\-test\-run\&.pl\fR\&. This will affect + what functionailty is available and what command line + options are supported\&. +T} +T{ +MTR_MEM +T}:T{ +If set to anything, will run tests with files in "memory" using tmpfs or + ramdisk\&. Not available on Windows\&. Same as + \fB\-\-mem\fR option +T} +T{ +MTR_PARALLEL +T}:T{ +If set, defines number of parallel threads executing tests\&. Same as + \fB\-\-parallel\fR option +T} +T{ +MTR_BUILD_THREAD +T}:T{ +If set, defines which port number range is used for the server +T} +T{ +MTR_PORT_BASE +T}:T{ +If set, defines which port number range is used for the server +T} +T{ +MTR_\fINAME\fR_TIMEOUT +T}:T{ +Setting of a timeout in minutes or seconds, corresponding to command + line option + \fB\-\-\fR\fB\fIname\fR\fR\fB\-timeout\fR\&. + Avaliable timeout names are TESTCASE, + SUITE (both in minutes) and + START, SHUTDOWN + (both in seconds)\&. These variables are supported from + MySQL 5\&.1\&.44\&. +T} +T{ +MYSQL_CONFIG_EDITOR +T}:T{ +Path name to \fBmysql_config_editor\fR binary\&. Supported as + of MySQL 5\&.6\&.6\&. +T} +T{ +MYSQL_TEST +T}:T{ +Path name to \fBmysqltest\fR binary +T} +T{ +MYSQL_TEST_LOGIN_FILE +T}:T{ +Path name to login file used by \fBmysql_config_editor\fR\&. + If not set, the default is + $HOME/\&.mylogin\&.cnf, or + %APPDATA%\eMySQL\e\&.mylogin\&.cnf on + Windows\&. Supported as of MySQL 5\&.6\&.6\&. +T} +T{ +MYSQLD_BOOTSTRAP +T}:T{ +Full path name to \fBmysqld\fR that has all options enabled +T} +T{ +MYSQLD_BOOTSTRAP_CMD +T}:T{ +Full command line used for initial database setup for this test batch +T} +T{ +MYSQLD +T}:T{ +Full path to server executable used in tests\&. Supported as of MySQL + 5\&.5\&.17\&. +T} +T{ +MYSQLD_CMD +T}:T{ +Command line for starting server as used in tests, with the minimum set + of required arguments\&. Supported as of MySQL 5\&.5\&.17\&. +T} +T{ +MYSQLTEST_VARDIR +T}:T{ +Path name to the var directory that is used for + logs, temporary files, and so forth +T} +T{ +MYSQL_TEST_DIR +T}:T{ +Full path to the mysql\-test directory where tests + are being run from +T} +T{ +MYSQL_TMP_DIR +T}:T{ +Path to temp directory used for temporary files during tests +T} +.TE +.sp 1 +.PP +The variable +MTR_PORT_BASE +was added in MySQL 5\&.1\&.45 as a more logical replacement for +MTR_BUILD_THREAD\&. It gives the actual port number directly (will be rounded down to a multiple of 10)\&. If you use +MTR_BUILD_THREAD, the port number is found by multiplying this by 10 and adding 10000\&. +.PP +Tests sometimes rely on certain environment variables being defined\&. For example, certain tests assume that +MYSQL_TEST +is defined so that +\fBmysqltest\fR +can invoke itself with +exec $MYSQL_TEST\&. +.PP +Other tests may refer to the last three variables listed in the preceding table, to locate files to read or write\&. For example, tests that need to create files will typically put them in +$MYSQL_TMP_DIR/\fIfile_name\fR\&. +.PP +The variable +$MYSQLD_CMD +will include any server options added with the +\fB\-\-mysqld\fR +option to +\fBmysql\-test\-run\&.pl\fR, but will not include server options added specifically for the currently running test\&. +.PP +If you are running +\fBmysql\-test\-run\&.pl\fR +version 1 by setting +MTR_VERSION, note that this only affects the test driver, not the test client (and its language) or the tests themselves\&. +.PP +A few tests might not run with version 1 because they depend on some feature of version 2\&. You may have those tests skipped by adding the test name to the file +lib/v1/incompatible\&.tests\&. This feature is available from MySQL 5\&.1\&.40\&. +.PP +\fBmysql\-test\-run\&.pl\fR +supports the options in the following list\&. An argument of +\fB\-\-\fR +tells +\fBmysql\-test\-run\&.pl\fR +not to process any following arguments as options\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: help option +.\" help option: mysql-test-run.pl +\fB\-\-help\fR, +\fB\-h\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: big-test option +.\" big-test option: mysql-test-run.pl +\fB\-\-big\-test\fR +.sp +Allow tests marked as "big" to run\&. Tests can be thus marked by including the line +\-\-source include/big_test\&.inc, and they will only be run if this option is given, or if the environment variable +BIG_TEST +is set to 1\&. +.sp +This is typically done for tests that take very long to run, or that use very much resources, so that they are not suitable for running as part of a normal test suite run\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: boot-dbx option +.\" boot-dbx option: mysql-test-run.pl +\fB\-\-boot\-dbx\fR +.sp +Run the +\fBmysqld\fR +server used for bootstrapping the database through the +\fBdbx\fR +debugger\&. This option is available from MySQL 5\&.5\&.17\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: boot-ddd option +.\" boot-ddd option: mysql-test-run.pl +\fB\-\-boot\-ddd\fR +.sp +Run the +\fBmysqld\fR +server used for bootstrapping the database through the +\fBddd\fR +debugger\&. This option is available from MySQL 5\&.5\&.17\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: boot-gdb option +.\" boot-gdb option: mysql-test-run.pl +\fB\-\-boot\-gdb\fR +.sp +Run the +\fBmysqld\fR +server used for bootstrapping the database through the +\fBgdb\fR +debugger\&. This option is available from MySQL 5\&.5\&.17\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: build-thread option +.\" build-thread option: mysql-test-run.pl +\fB\-\-build\-thread=\fR\fB\fInumber\fR\fR +.sp +Specify a number to calculate port numbers from\&. The formula is 10 * +\fIbuild_thread\fR ++ 10000\&. Instead of a number, it can be set to +auto, which is also the default value, in which case +\fBmysql\-test\-run\&.pl\fR +will allocate a number unique to this host\&. +.sp +The value (number or +auto) can also be set with the +MTR_BUILD_THREAD +environment variable\&. +.sp +From MySQL 5\&.1\&.45, the more logical +\fB\-\-port\-base\fR +is supported as an alternative\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: callgrind option +.\" callgrind option: mysql-test-run.pl +\fB\-\-callgrind\fR +.sp +Instructs +\fBvalgrind\fR +to use +\fBcallgrind\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: check-testcases option +.\" check-testcases option: mysql-test-run.pl +\fB\-\-check\-testcases\fR +.sp +Check test cases for side effects\&. This is done by checking system state before and after each test case; if there is any difference, a warning to that effect will be written, but the test case will not be marked as failed because of it\&. This check is enabled by default\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: clean-vardir option +.\" clean-vardir option: mysql-test-run.pl +\fB\-\-clean\-vardir\fR +.sp +Clean up the +var +directory with logs and test results etc\&. after the test run, but only if there were no test failures\&. This option only has effect if also running with option +\fB\-\-mem\fR\&. The intent is to alleviate the problem of using up memory for test results, in cases where many different test runs are being done on the same host\&. +.sp +The +\fB\-\-clean\-vardir\fR +option is available from MySQL 5\&.5\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: client-bindir option +.\" client-bindir option: mysql-test-run.pl +\fB\-\-client\-bindir=\fR\fB\fIpath\fR\fR +.sp +The path to the directory where client binaries are located\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: client-dbx option +.\" client-dbx option: mysql-test-run.pl +\fB\-\-client\-dbx\fR +.sp +Start +\fBmysqltest\fR +in the +\fBdbx\fR +debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: client-ddd option +.\" client-ddd option: mysql-test-run.pl +\fB\-\-client\-ddd\fR +.sp +Start +\fBmysqltest\fR +in the +\fBddd\fR +debugger\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: client-debugger option +.\" client-debugger option: mysql-test-run.pl +\fB\-\-client\-debugger=\fR\fB\fIdebugger\fR\fR +.sp +Start +\fBmysqltest\fR +in the named debugger\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: client-gdb option +.\" client-gdb option: mysql-test-run.pl +\fB\-\-client\-gdb\fR +.sp +Start +\fBmysqltest\fR +in the +\fBgdb\fR +debugger\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: client-libdir option +.\" client-libdir option: mysql-test-run.pl +\fB\-\-client\-libdir=\fR\fB\fIpath\fR\fR +.sp +The path to the directory where client libraries are located\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: combination option +.\" combination option: mysql-test-run.pl +\fB\-\-combination=\fR\fB\fIvalue\fR\fR +.sp +Extra option to pass to +\fBmysqld\fR\&. The value should consist of a single +\fBmysqld\fR +option including dashes\&. This option is similar to +\fB\-\-mysqld\fR +but has a different effect\&. +\fBmysql\-test\-run\&.pl\fR +executes multiple test runs, using the options for each instance of +\fB\-\-combination\fR +in successive runs\&. If +\fB\-\-combination\fR +is given only once, it has no effect\&. For test runs specific to a given test suite, an alternative to the use of +\fB\-\-combination\fR +is to create a +combinations +file in the suite directory\&. The file should contain a section of options for each test run\&. See +Section\ \&4.9, \(lqPassing Options from mysql-test-run.pl to mysqld or mysqltest\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: comment option +.\" comment option: mysql-test-run.pl +\fB\-\-comment=\fR\fB\fIstr\fR\fR +.sp +Write +\fIstr\fR +to the output within lines filled with +#, as a form of banner\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: compress option +.\" compress option: mysql-test-run.pl +\fB\-\-compress\fR +.sp +Compress all information sent between the client and the server if both support compression\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: cursor-protocol option +.\" cursor-protocol option: mysql-test-run.pl +\fB\-\-cursor\-protocol\fR +.sp +Pass the +\fB\-\-cursor\-protocol\fR +option to +\fBmysqltest\fR +(implies +\fB\-\-ps\-protocol\fR)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: dbx option +.\" gdb option: mysql-test-run.pl +\fB\-\-dbx\fR +.sp +Start +\fBmysqld\fR +in the +\fBdbx\fR +debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: ddd option +.\" ddd option: mysql-test-run.pl +\fB\-\-ddd\fR +.sp +Start +\fBmysqld\fR +in the +\fBddd\fR +debugger\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: debug option +.\" debug option: mysql-test-run.pl +\fB\-\-debug\fR +.sp +Dump trace output for all clients and servers\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: debugger option +.\" debugger option: mysql-test-run.pl +\fB\-\-debugger=\fR\fB\fIdebugger\fR\fR +.sp +Start +\fBmysqld\fR +using the named debugger\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: debug-server option +.\" debug-server option: mysql-test-run.pl +\fB\-\-debug\-server\fR +.sp +Runs +mysqld\&.debug +(if available) instead of +mysqld +as server\&. If it does find +mysqld\&.debug, it will search for plugin libraries in a subdirectory +debug +under the directory where it\*(Aqs normally located\&. This option does not turn on trace output and is independent of the +\fBdebug\fR +option\&. +.sp +The +\fBdebug\-server\fR +option was added in MySQL 5\&.1\&.56 and 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: debug-sync-timeout option +.\" debug-sync-timeout option: mysql-test-run.pl +\fB\-\-debug\-sync\-timeout=\fR\fB\fIN\fR\fR +.sp +Controls whether the Debug Sync facility for testing and debugging is enabled\&. The option value is a timeout in seconds\&. The default value is 300\&. A value of 0 disables Debug Sync\&. The value of this option also becomes the default timeout for individual synchronization points\&. +.sp +\fBmysql\-test\-run\&.pl\fR +passes +\fB\-\-loose\-debug\-sync\-timeout=\fR\fB\fIN\fR\fR +to +\fBmysqld\fR\&. The +\fB\-\-loose\fR +prefix is used so that +\fBmysqld\fR +does not fail if Debug Sync is not compiled in\&. +.sp +For information about using the Debug Sync facility for testing, see +Section\ \&4.14, \(lqThread Synchronization in Test Cases\(rq\&. +.sp +This option was added in MySQL 5\&.1\&.41\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: default-myisam option +.\" default-myisam option: mysql-test-run.pl +\fB\-\-default\-myisam\fR +.sp +Use MyISAM as default engine for all except InnoDB\-specific tests\&. This option was added in MySQL 5\&.5 and is on by default\&. It may be changed to off by default in a later release\&. See also +\fB\-\-nodefault\-myisam\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: defaults-file option +.\" default-file option: mysql-test-run.pl +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Use the named file as fixed config file template for all tests\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: defaults_extra_file option +.\" default_extra_file option: mysql-test-run.pl +\fB\-\-defaults_extra_file=\fR\fB\fIfile_name\fR\fR +.sp +Add setting from the named file to all generated configs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: do-test option +.\" do-test option: mysql-test-run.pl +\fB\-\-do\-test=\fR\fB\fIprefix\fR\fR +.sp +Run all test cases having a name that begins with the given +\fIprefix\fR +value\&. This option provides a convenient way to run a family of similarly named tests\&. +.sp +The argument for the +\fB\-\-do\-test\fR +option also allows more flexible specification of which tests to perform\&. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern\&. If the argument contains a lone period or does not contain any pattern metacharacters, it is interpreted the same way as previously and matches test names that begin with the argument value\&. For example, +\fB\-\-do\-test=testa\fR +matches tests that begin with +testa, +\fB\-\-do\-test=main\&.testa\fR +matches tests in the +main +test suite that begin with +testa, and +\fB\-\-do\-test=main\&.*testa\fR +matches test names that contain +main +followed by +testa +with anything in between\&. In the latter case, the pattern match is not anchored to the beginning of the test name, so it also matches names such as +xmainytestz\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: embedded-server option +.\" embedded-server option: mysql-test-run.pl +\fB\-\-embedded\-server\fR +.sp +Use a version of +\fBmysqltest\fR +built with the embedded server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: enable-disabled option +.\" enable-disabled option: mysql-test-run.pl +\fB\-\-enable\-disabled\fR +.sp +Ignore any +disabled\&.def +file, and run also tests marked as disbaled\&. Success or failure of those tests will be reported the same way as other tests\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: experimental option +.\" experimental option: mysql-test-run.pl +\fB\-\-experimental=\fR\fB\fIfile_name\fR\fR +.sp +Specify a file that contains a list of test cases that should be displayed with the +[ exp\-fail ] +code rather than +[ fail ] +if they fail\&. This option was added in MySQL 5\&.1\&.33\&. +.sp +For an example of a file that might be specified using this option, see +mysql\-test/collections/default\&.experimental\&. +.sp +From MySQL 5\&.1\&.51, it\*(Aqs possible to supply more than one +\fB\-\-experimental\fR, test cases listed in all the files will be treated as experimental\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: extern option +.\" extern option: mysql-test-run.pl +\fB\-\-extern\fR +\fIoption\fR=\fIvalue\fR +.sp +Use an already running server\&. The option/value pair is what is needed by the +\fBmysql\fR +client to connect to the server\&. Each +\fB\-\-extern\fR +can only take one option/value pair as argument, so it you need more you need to repeat +\fB\-\-extern\fR +for each of them\&. Example: +.sp +.if n \{\ +.RS 4 +.\} +.nf + \&./mysql\-test\-run\&.pl \-\-extern socket=var/tmp/mysqld\&.1\&.sock alias +.fi +.if n \{\ +.RE +.\} +.sp +Note: If a test case has an +\&.opt +file that requires the server to be restarted with specific options, the file will not be used\&. The test case likely will fail as a result\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: fast option +.\" fast option: mysql-test-run.pl +\fB\-\-fast\fR +.sp +Do not perform controlled shutdown when servers need to be restarted or at the end of the test run\&. This is equivalent to using +\-\-shutdown\-timeout=0\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: force option +.\" force option: mysql-test-run.pl +\fB\-\-force\fR +.sp +Normally, +\fBmysql\-test\-run\&.pl\fR +exits if a test case fails\&. +\fB\-\-force\fR +causes execution to continue regardless of test case failure\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: force-restart option +.\" force-restart option: mysql-test-run.pl +\fB\-\-force\-restart\fR +.sp +Always restart the server(s) between each tast case, whether it\*(Aqs needed or not\&. Will also restart between repeated runs of the same test case\&. This may be useful e\&.g\&. when looking for the source of a memory leak, as there will only have been one test run before the server exits\&. +.sp +The +\fB\-\-force\-restart\fR +option was added in MySQL version 5\&.1\&.52\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: gcov option +.\" gcov option: mysql-test-run.pl +\fB\-\-gcov\fR +.sp +Run tests with the +\fBgcov\fR +test coverage tool\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: gdb option +.\" gdb option: mysql-test-run.pl +\fB\-\-gdb\fR +.sp +Start +\fBmysqld\fR +in the +\fBgdb\fR +debugger\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: gprof option +.\" gprof option: mysql-test-run.pl +\fB\-\-gprof\fR +.sp +Run tests with the +\fBgprof\fR +profiling tool\&. +\fB\-\-gprof\fR +was added in 5\&.1\&.45\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: include-ndbcluster option +.\" include-ndbcluster option: mysql-test-run.pl +\fB\-\-include\-ndbcluster\fR, +.\" mysql-test-run.pl: include-ndb option +.\" include-ndb option: mysql-test-run.pl +\fB\-\-include\-ndb\fR +.sp +Run also tests that need Cluster\&. This is the default behavior up to MySQL 5\&.1\&.51\&. From MySQL 5\&.1\&.52 this option has been added to re\-enable running Cluster tests\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: manual-dbx option +.\" manual-dbx option: mysql-test-run.pl +\fB\-\-manual\-dbx\fR +.sp +Use a server that has already been started by the user in the +\fBdbx\fR +debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: manual-ddd option +.\" manual-ddd option: mysql-test-run.pl +\fB\-\-manual\-ddd\fR +.sp +Use a server that has already been started by the user in the +\fBddd\fR +debugger\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: manual-debug option +.\" manual-debug option: mysql-test-run.pl +\fB\-\-manual\-debug\fR +.sp +Use a server that has already been started by the user in a debugger\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: manual-gdb option +.\" manual-gdb option: mysql-test-run.pl +\fB\-\-manual\-gdb\fR +.sp +Use a server that has already been started by the user in the +\fBgdb\fR +debugger\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: mark-progress option +.\" mark-progress option: mysql-test-run.pl +\fB\-\-mark\-progress\fR +.sp +Marks progress with timing (in milliseconds) and line number in +var/log/\fItestname\fR\&.progress\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: max-connections option +.\" max-connections option: mysql-test-run.pl +\fB\-\-max\-connections=\fR\fB\fInum\fR\fR +.sp +The maximum number of simultaneous server connections that may be used per test\&. If not set, the maximum is 128\&. Minimum allowed limit is 8, maximum is 5120\&. Corresponds to the same option for +\fBmysqltest\fR\&. +.sp +This option is available from MySQL 5\&.1\&.45\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: max-save-core option +.\" max-save-core option: mysql-test-run.pl +\fB\-\-max\-save\-core=\fR\fB\fIN\fR\fR +.sp +Limit the number of core files saved, to avoid filling up disks in case of a frequently crashing server\&. Defaults to 5, set to 0 for no limit\&. May also be set with the environment variable +MTR_MAX_SAVE_CORE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: max-save-datadir option +.\" max-save-datadir option: mysql-test-run.pl +\fB\-\-max\-save\-datadir=\fR\fB\fIN\fR\fR +.sp +Limit the number of data directories saved after failed tests, to avoid filling up disks in case of frequent failures\&. Defaults to 20, set to 0 for no limit\&. May also be set with the environment variable +MTR_MAX_SAVE_DATADIR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: max-test-fail option +.\" max-test-fail option: mysql-test-run.pl +\fB\-\-max\-test\-fail=\fR\fB\fIN\fR\fR +.sp +Stop execution after the specified number of tests have failed, to avoid using up resources (and time) in case of massive failures\&. retries are noe counted, nor are failures of tests marked experimental\&. Defaults to 10, set to 0 for no limit\&. May also be set with the environment variable +MTR_MAX_TEST_FAIL +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: mem option +.\" mem option: mysql-test-run.pl +\fB\-\-mem\fR +.sp +This option is not supported on Windows\&. +.sp +Run the test suite in memory, using tmpfs or ramdisk\&. This can decrease test times significantly, in particular if you would otherwise be running over a remote file system\&. +\fBmysql\-test\-run\&.pl\fR +attempts to find a suitable location using a built\-in list of standard locations for tmpfs and puts the +var +directory there\&. This option also affects placement of temporary files, which are created in +var/tmp\&. +.sp +The default list includes +/dev/shm\&. You can also enable this option by setting the environment variable +MTR_MEM[=\fIdir_name\fR]\&. If +\fIdir_name\fR +is given, it is added to the beginning of the list of locations to search, so it takes precedence over any built\-in locations\&. +.sp +Once you have run tests with +\fB\-\-mem\fR +within a +mysql\-testdirectory, a soflink +var +will have been set up to the temporary directory, and this will be re\-used the next time, until the soflink is deleted\&. Thus, you do not have to repeat the +\fB\-\-mem\fR +option next time\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: mysqld option +.\" mysqld option: mysql-test-run.pl +\fB\-\-mysqld=\fR\fB\fIvalue\fR\fR +.sp +Extra option to pass to +\fBmysqld\fR\&. Only one option may be specified in +\fIvalue\fR; to specify more than one, use additional +\fB\-\-mysqld\fR +options\&. See +Section\ \&4.9, \(lqPassing Options from mysql-test-run.pl to mysqld or mysqltest\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: mysqld-env option +.\" mysqld-env option: mysql-test-run.pl +\fB\-\-mysqld\-env=\fR\fB\fIvariable\fR\fR\fB=\fR\fB\fIvalue\fR\fR +.sp +Sets (or changes) an environment variable before starting +\fBmysqld\fR\&. Varibles set in the environment from which you run +\fBmysql\-test\-run\&.pl\fR +will normally also be propagated to +\fBmysqld\fR, but there may be cases where you want a setting just for a single run, or you may not want the setting to affect other programs\&. You may use additional +\fB\-\-mysqld\-env\fR +options to set more than one variable\&. +.sp +The +\fB\-\-mysqld\-env\fR +option is available from MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: ndb-connectstring option +.\" ndb-connectstring option: mysql-test-run.pl +\fB\-\-ndb\-connectstring=\fR\fB\fIstr\fR\fR +.sp +Pass +\fB\-\-ndb\-connectstring=\fR\fB\fIstr\fR\fR +to the master MySQL server\&. This option also prevents +\fBmysql\-test\-run\&.pl\fR +from starting a cluster\&. It is assumed that there is already a cluster running to which the server can connect with the given connectstring\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: nocheck-testcases option +.\" nocheck-testcases option: mysql-test-run.pl +\fB\-\-nocheck\-testcases\fR +.sp +Disable the check for test case side effects; see +\fB\-\-check\-testcases\fR +for a description\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: nodefault-myisam option +.\" nodefault-myisam option: mysql-test-run.pl +\fB\-\-nodefault\-myisam\fR +.sp +Do not override the build\-in default engine to use MyISAM instead for non\-InnoDB tests\&. This option was added in MySQL 5\&.5\&. Since the existing collection of tests were originally adapted for MyISAM as default, many tests will fail when this option is used, because the test behaves differently or produces different output when the engine switches to InnoDB\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: noreorder option +.\" noreorder option: mysql-test-run.pl +\fB\-\-noreorder\fR +.sp +Do not reorder tests to reduce number of restarts, but run them in exactly the order given\&. If a whole suite is to be run, the tests are run in alphabetic order, though similiar combinations will be grouped together\&. If more than one suite is listed, the tests are run one suite at a time, in the order listed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: notimer option +.\" notimer option: mysql-test-run.pl +\fB\-\-notimer\fR +.sp +Cause +\fBmysqltest\fR +not to generate a timing file\&. The effect of this is that the report from each test case does not include the timing in milliseconds as it normally does\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: nounit-tests option +.\" nounit-tests option: mysql-test-run.pl +\fB\-\-nounit\-tests\fR +.sp +Do not run unit tests, overriding default behaviour or setting of the +MTR_UNIT_TESTS +variable\&. +.sp +Running of unit tests was enabled from MySQL 5\&.5\&.11\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: nowarnings option +.\" nowarnings option: mysql-test-run.pl +\fB\-\-nowarnings\fR +.sp +Do not look for and report errors and warning in the server logs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: parallel option +.\" parallel option: mysql-test-run.pl +\fB\-\-parallel={\fR\fB\fIN\fR\fR\fB|auto}\fR +.sp +Run tests using +\fIN\fR +parallel threads\&. By default, 1 thread is used\&. Use +\fB\-\-parallel=auto\fR +for auto\-setting of +\fIN\fR\&. The auto value was added in MySQL 5\&.1\&.36\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: port-base option +.\" port-base option: mysql-test-run.pl +\fB\-\-port\-base=\fR\fB\fIP\fR\fR +.sp +Specify base of port numbers to be used; a block of 10 will be allocated\&. +\fIP\fR +should be divisible by 10; if it is not, it will be rounded down\&. If running with more than one parallel test thread, thread 2 will use the next block of 10 and so on\&. +.sp +If the port number is given as +auto, which is also the default, +\fBmysql\-test\-run\&.pl\fRwill allocate a number unique to this host\&. The value may also be given with the environment variable +MTR_PORT_BASE\&. +.sp +\fB\-\-port\-base\fR +was added in MySQL 5\&.1\&.45 as a more logical alternative to +\fB\-\-build\-thread\fR\&. If both are used, +\fB\-\-port\-base\fR +takes precedence\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: print-testcases option +.\" print-testcases option: mysql-test-run.pl +\fB\-\-print\-testcases\fR +.sp +Do not run any tests, but print details about all tests, in the order they would have been run\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: ps-protocol option +.\" ps-protocol option: mysql-test-run.pl +\fB\-\-ps\-protocol\fR +.sp +Pass the +\fB\-\-ps\-protocol\fR +option to +\fBmysqltest\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: record option +.\" record option: mysql-test-run.pl +\fB\-\-record\fR +.sp +Pass the +\fB\-\-record\fR +option to +\fBmysqltest\fR\&. This option requires a specific test case to be named on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: reorder option +.\" reorder option: mysql-test-run.pl +\fB\-\-reorder\fR +.sp +Reorder tests to minimize the number of server restarts needed\&. This is the default behavior\&. There is no guarantee that a particular set of tests will always end up in the same order\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: repeat option +.\" repeat option: mysql-test-run.pl +\fB\-\-repeat=\fR\fB\fIN\fR\fR +.sp +Run each test +\fIN\fR +number of times\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: report-features option +.\" report-features option: mysql-test-run.pl +\fB\-\-report\-features\fR +.sp +Display the output of +SHOW ENGINES +and +SHOW VARIABLES\&. This can be used to verify that binaries are built with all required features\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: report-times option +.\" report-times option: mysql-test-run.pl +\fB\-\-report\-times\fR +.sp +At the end of the test run, write a summary of how much time was spent in various phases of execution\&. If you run with +\fB\-\-parallel\fR, the total will exceed the wall clock time passed, since it will be summed over all threads\&. +.sp +The times reported should only be treated as approximations, and the exact points where the time is taken may also change between releases\&. If the test run is aborted, including if a test fails and +\fB\-\-force\fR +is not in use, the time report will not be produced\&. +.sp +The +\fB\-\-report\-times\fR +is available from MySQL 5\&.5\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: retry option +.\" retry option: mysql-test-run.pl +\fB\-\-retry=\fR\fB\fIN\fR\fR +.sp +If a test fails, it is retried up to a maximum of +\fIN\fR +runs, but will terminate after 2 failures\&. Default is 3, set to 1 or 0 for no retries\&. This option has no effect unless +\fB\-\-force\fR +is also used; without it, test execution will terminate after the first failure\&. +.sp +The +\fB\-\-retry\fR +and +\fB\-\-retry\-failure\fR +options do not affect how many times a test repeated with +\fB\-\-repeat\fR +may fail in total, as each repetition is considered a new test case, which may in turn be retried if it fails\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: retry-failure option +.\" retry-failure option: mysql-test-run.pl +\fB\-\-retry\-failure=\fR\fB\fIN\fR\fR +.sp +Allow a failed and retried test to fail more than the default 2 times before giving it up\&. Setting it to 0 or 1 effectively turns off retries +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: shutdown-timeout option +.\" shutdown-timeout option: mysql-test-run.pl +\fB\-\-shutdown\-timeout=\fR\fB\fISECONDS\fR\fR +.sp +Max number of seconds to wait for servers to do controlled shutdown before killing them\&. Default is 10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: skip-combinations option +.\" skip-combinations option: mysql-test-run.pl +\fB\-\-skip\-combinations\fR +.sp +Do not apply combinations; ignore combinations file or option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: skip-ndbcluster option +.\" skip-ndbcluster option: mysql-test-run.pl +\fB\-\-skip\-ndbcluster\fR, +.\" mysql-test-run.pl: skip-ndb option +.\" skip-ndb option: mysql-test-run.pl +\fB\-\-skip\-ndb\fR +.sp +Do not start NDB Cluster; skip Cluster test cases\&. From MySQL 5\&.1\&.52, this is the default and so this option does not do anything but is kept for backward compatibility\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: skip-ndbcluster-slave option +.\" skip-ndbcluster-slave option: mysql-test-run.pl +\fB\-\-skip\-ndbcluster\-slave\fR, +.\" mysql-test-run.pl: skip-ndb-slave option +.\" skip-ndb-slave option: mysql-test-run.pl +\fB\-\-skip\-ndb\-slave\fR +.sp +Do not start an NDB Cluster slave\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: skip-rpl option +.\" skip-rpl option: mysql-test-run.pl +\fB\-\-skip\-rpl\fR +.sp +Skip replication test cases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: skip-ssl option +.\" skip-ssl option: mysql-test-run.pl +\fB\-\-skip\-ssl\fR +.sp +Do not start +\fBmysqld\fR +with support for SSL connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: skip-test option +.\" skip-test option: mysql-test-run.pl +\fB\-\-skip\-test=\fR\fB\fIregex\fR\fR +.sp +Specify a regular expression to be applied to test case names\&. Cases with names that match the expression are skipped\&. tests to skip\&. +.sp +The argument for the +\fB\-\-skip\-test\fR +option allows more flexible specification of which tests to skip\&. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern\&. See the description of the +\fB\-\-do\-test\fR +option for details\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: skip-test-list option +.\" skip-test-list option: mysql-test-run.pl +\fB\-\-skip\-test\-list=\fR\fB\fIfile\fR\fR +.sp +Specify a file listing tests that should be skipped (disabled)\&. +.sp +The file has the same format as the +disabled\&.def +file listing disabled tests\&. With this option, disabling can be done on a case by case basis\&. The +\fB\-\-skip\-test\-list\fR +option is supported from MySQL 5\&.5\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-skip\-*\fR +.sp +\fB\-\-skip\-*\fR +options not otherwise recognized by +\fBmysql\-test\-run\&.pl\fR +are passed to the master server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: sleep option +.\" sleep option: mysql-test-run.pl +\fB\-\-sleep=\fR\fB\fIN\fR\fR +.sp +Pass +\fB\-\-sleep=\fR\fB\fIN\fR\fR +to +\fBmysqltest\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: sp-protocol option +.\" sp-protocol option: mysql-test-run.pl +\fB\-\-sp\-protocol\fR +.sp +Pass the +\fB\-\-sp\-protocol\fR +option to +\fBmysqltest\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: ssl option +.\" ssl option: mysql-test-run.pl +\fB\-\-ssl\fR +.sp +If +\fBmysql\-test\-run\&.pl\fR +is started with the +\fB\-\-ssl\fR +option, it sets up a secure connection for all test cases\&. In this case, if +\fBmysqld\fR +does not support SSL, +\fBmysql\-test\-run\&.pl\fR +exits with an error message: +Couldn\*(Aqt find support for SSL +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: start option +.\" start option: mysql-test-run.pl +\fB\-\-start\fR +.sp +Initialize and start servers with the startup settings for the specified test case\&. You can use this option to start a server to which you can connect later\&. For example, after building a source distribution you can start a server and connect to it with the +\fBmysql\fR +client like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBcd mysql\-test\fR +shell> \fB\&./mysql\-test\-run\&.pl \-\-start alias &\fR +shell> \fB\&.\&./mysql \-S \&./var/tmp/master\&.sock \-h localhost \-u root\fR +.fi +.if n \{\ +.RE +.\} +.sp +If no tests are named on the command line, the server(s) will be started with settings for the first test that would have been run without the +\fB\-\-start\fR +option\&. +.sp +\fBmysql\-test\-run\&.pl\fR +will stop once the server has been started, but will terminate if the server dies\&. If killed, it will also shut down the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: start-and-exit option +.\" start-and-exit option: mysql-test-run.pl +\fB\-\-start\-and\-exit\fR +.sp +This is similar to +\fB\-\-start\fR, but +\fBmysql\-test\-run\&.pl\fR +terminates once the server has been started, leaving just the server process running\&. +.sp +Tha +\fB\-\-start\-and\-exit\fR +was available with version 1 of +\fBmysql\-test\-run\&.pl\fR +(unlike +\fB\-\-start\fR +which came with version 2), and is again supported in version 2 from MySQL 5\&.1\&.51\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: start-dirty option +.\" start-dirty option: mysql-test-run.pl +\fB\-\-start\-dirty\fR +.sp +This is similar to +\fB\-\-start\fR, but will skip the database initialization phase and assume that database files are already available\&. Usually this means you must have run another test first\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: start-from option +.\" start-from option: mysql-test-run.pl +\fB\-\-start\-from=\fR\fB\fItest_name\fR\fR +.sp +\fBmysql\-test\-run\&.pl\fR +sorts the list of names of the test cases to be run, and then begins with +\fItest_name\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: strace-client option +.\" strace-client option: mysql-test-run.pl +\fB\-\-strace\-client\fR +.sp +Create +\fBstrace\fR +output for +\fBmysqltest\fR\&. Will produce default +\fBstrace\fR +output as +mysqltest\&.strace\&. Note that this will be overwritten for each new test case, so it\*(Aqs most useful for running only one test\&. +.sp +The +\fBstrace\-client\fR +option is functional from MySQL 5\&.5\&.20, and only supported on Linux\&. The option was available in earlier versions too, but was not working properly\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: strace-server option +.\" strace-server option: mysql-test-run.pl +\fB\-\-strace\-server\fR +.sp +Create +\fBstrace\fR +output for the server\&. Will produce default +\fBstrace\fR +output as +mysqld\&.1\&.strace\&. Note that this will be overwritten each time the server is restarted, so it\*(Aqs most useful for running a single test, or if you want trace from the first test that fails\&. +.sp +The +\fBstrace\-server\fR +option is available from MySQL 5\&.5\&.20, on Linux only\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: stress option +.\" stress option: mysql-test-run.pl +\fB\-\-stress=\fR\fB\fIstress options\fR\fR +.sp +Start a server, but instead of running a test, run +\fBmysql\-stress\-test\&.pl\fR +with the supplied arguments\&. Arguments needed to communicate with the server will be automatically provided, the rest should be given as arguments to this option\&. Command line options for +\fBmysql\-stress\-test\&.pl\fR +should be separeted by a comma\&. +.sp +The +\fBstress\fR +option was added in MySQL 5\&.5\&.17, it is not a direct replacement for the option of the same name that exists in version 1 of +\fBmysql\-test\-run\&.pl\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: suite option +.\" suite option: mysql-test-run.pl +\fB\-\-suite=\fR\fB\fIsuite_name\fR\fR +.sp +Run the named test suite\&. The default name is +main +(the regular test suite located in the +mysql\-test +directory)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: suite-timeout option +.\" suite-timeout option: mysql-test-run.pl +\fB\-\-suite\-timeout=\fR\fB\fIminutes\fR\fR +.sp +Specify the maximum test suite runtime\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: testcase-timeout option +.\" testcase-timeout option: mysql-test-run.pl +\fB\-\-testcase\-timeout\fR +.sp +Specify the maximum test case runtime\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: timediff option +.\" timediff option: mysql-test-run.pl +\fB\-\-timediff\fR +.sp +Adds to each test report for a test case, the total time in sconds and milliseconds passed since the preceding test ended\&. This option can only be used together with +\fB\-\-timestamp\fR, and has no effect without it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: timer option +.\" timer option: mysql-test-run.pl +\fB\-\-timer\fR +.sp +Cause +\fBmysqltest\fR +to generate a timing file\&. The default file is named +\&./var/log/timer\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: timestamp option +.\" timestamp option: mysql-test-run.pl +\fB\-\-timestamp\fR +.sp +Prints a timestamp before the test case name in each test report line, showing when the test ended\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: tmpdir option +.\" tmpdir option: mysql-test-run.pl +\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR +.sp +The directory where temporary file are stored\&. The default location is +\&./var/tmp\&. The environment variable +MYSQL_TMP_DIR +will be set to the path for this directory, whether it has the default value or has been set explicitly\&. This may be referred to in tests\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: unit-tests option +.\" unit-tests option: mysql-test-run.pl +\fB\-\-unit\-tests\fR +.sp +Force running of unit tests, overriding default behaviour or setting of the +MTR_UNIT_TESTS +variable\&. +.sp +Running of unit tests was enabled from MySQL 5\&.5\&.11\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: user option +.\" user option: mysql-test-run.pl +\fB\-\-user=\fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: user-args option +.\" user-args option: mysql-test-run.pl +\fB\-\-user\-args\fR +.sp +Drops all non\-essential command line arguments to the +\fBmysqld\fR +server, except those supplied with +\fB\-\-mysqld\fR +arguemnts, if any\&. Only works in combination with +\fB\-\-start\fR, +\fB\-\-start\-and\-exit\fR +or +\fB\-\-start\-dirty\fR, and only if no test name is given\&. +.sp +The +\fB\-\-user\-args\fR +option was added in MySQL 5\&.1\&.51\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: valgrind option +.\" valgrind option: mysql-test-run.pl +\fB\-\-valgrind\fR +.sp +Run +\fBmysqltest\fR +and +\fBmysqld\fR +with +\fBvalgrind\fR\&. This and the following +\fB\-\-valgrind\fR +options require that the executables have been build with +\fBvalgrind\fR +support\&. +.sp +When the server is run with valgrind, an extra pass over the server log file(s) will be performed after all tests are run, and any report with problems that have been reported at server shutdown will be extracted and printed\&. The most common warnings are memory leaks\&. With each report will also be listed all tests that were run since previous server restart; one of these is likely to have caused the problem\&. This reporting was added in MySQL 5\&.1\&.45\&. +.sp +From MySQL 5\&.5\&.13, a final "pseudo" test named +valgrind_report +is added to the list of tests when the server is run in valgrind\&. This test is reported as failed if any such shutdown warnings were produced by valgrind\&. Pass or failure of this test is also added to the total test count reported\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: valgrind-mysqld option +.\" valgrind-mysqld option: mysql-test-run.pl +\fB\-\-valgrind\-mysqld\fR +.sp +Run the +\fBmysqld\fR +server with +\fBvalgrind\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: valgrind-mysqltest option +.\" valgrind-mysqltest option: mysql-test-run.pl +\fB\-\-valgrind\-mysqltest\fR +.sp +Run +\fBmysqltest\fR +with +\fBvalgrind\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: valgrind-options option +.\" valgrind-options option: mysql-test-run.pl +\fB\-\-valgrind\-option=\fR\fB\fIstr\fR\fR +.sp +Extra options to pass to +\fBvalgrind\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: valgrind-path option +.\" valgrind-path option: mysql-test-run.pl +\fB\-\-valgrind\-path=\fR\fB\fIpath\fR\fR +.sp +Specify the path name to the +\fBvalgrind\fR +executable\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: vardir option +.\" vardir option: mysql-test-run.pl +\fB\-\-vardir=\fR\fB\fIpath\fR\fR +.sp +Specify the path where files generated during the test run are stored\&. The default location is +\&./var\&. The environment variable +MYSQLTEST_VARDIR +will be set to the path for this directory, whether it has the default value or has been set explicitly\&. This may be referred to in tests\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: verbose option +.\" verbose option: mysql-test-run.pl +\fB\-\-verbose\fR +.sp +Give more verbose output regarding test execution\&. Use the option twice to get even more output\&. Note that the output generated within each test case is not affected\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: verbose-restart option +.\" verbose-restart option: mysql-test-run.pl +\fB\-\-verbose\-restart\fR +.sp +Write when and why servers are restarted between test cases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: view-protocol option +.\" view-protocol option: mysql-test-run.pl +\fB\-\-view\-protocol\fR +.sp +Pass the +\fB\-\-view\-protocol\fR +option to +\fBmysqltest\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: vs-config option +.\" vs-config option: mysql-test-run.pl +\fB\-\-vs\-config=\fR\fB\fIconfig_val\fR\fR +.sp +Specify the configuration used to build MySQL (for example, +\fB\-\-vs\-config=debug\fR +\fB\-\-vs\-config=release\fR)\&. This option is for Windows only\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: wait-all option +.\" wait-all option: mysql-test-run.pl +\fB\-\-wait\-all\fR +.sp +If +\fB\-\-start\fR +or +\fB\-\-start\-dirty\fR +is used, wait for all servers to exit before termination\&. Otherise, it will terminate if one (of several) servers is restarted\&. +.sp +This option was added in MySQL 5\&.1\&.36\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: warnings option +.\" warnings option: mysql-test-run.pl +\fB\-\-warnings\fR +.sp +Search the server log for errors or warning after each test and report any suspicious ones; if any are found, the test will be marked as failed\&. This is the default behavior, it may be turned off with +\fB\-\-nowarnings\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: with-ndbcluster-only option +.\" with-ndbcluster-only option: mysql-test-run.pl +\fB\-\-with\-ndbcluster\-only\fR +.sp +Run only test cases that have +ndb +in their name\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 2006, 2014, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql.1 b/man/mysql.1 new file mode 100644 index 000000000000..82a5d551ab87 --- /dev/null +++ b/man/mysql.1 @@ -0,0 +1,3374 @@ +'\" t +.\" Title: \fBmysql\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql +.\" command-line tool +.\" tools: command-line +.\" scripts: SQL +.\" SQL scripts +.\" batch SQL files +.SH "NAME" +mysql \- the MySQL command\-line tool +.SH "SYNOPSIS" +.HP \w'\fBmysql\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\ 'u +\fBmysql [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR +.SH "DESCRIPTION" +.PP +\fBmysql\fR +is a simple SQL shell with input line editing capabilities\&. It supports interactive and noninteractive use\&. When used interactively, query results are presented in an ASCII\-table format\&. When used noninteractively (for example, as a filter), the result is presented in tab\-separated format\&. The output format can be changed using command options\&. +.PP +If you have problems due to insufficient memory for large result sets, use the +\fB\-\-quick\fR +option\&. This forces +\fBmysql\fR +to retrieve results from the server a row at a time rather than retrieving the entire result set and buffering it in memory before displaying it\&. This is done by returning the result set using the +mysql_use_result() +C API function in the client/server library rather than +mysql_store_result()\&. +.PP +Using +\fBmysql\fR +is very easy\&. Invoke it from the prompt of your command interpreter as follows: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql \fR\fB\fIdb_name\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +Or: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql \-\-user=\fR\fB\fIuser_name\fR\fR\fB \-\-password=\fR\fB\fIyour_password\fR\fR\fB \fR\fB\fIdb_name\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +Then type an SQL statement, end it with +\(lq;\(rq, +\eg, or +\eG +and press Enter\&. +.PP +Typing +Control+C +causes +\fBmysql\fR +to attempt to kill the current statement\&. If this cannot be done, or +Control+C +is typed again before the statement is killed, +\fBmysql\fR +exits\&. +.PP +You can execute SQL statements in a script file (batch file) like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql \fR\fB\fIdb_name\fR\fR\fB < \fR\fB\fIscript\&.sql\fR\fR\fB > \fR\fB\fIoutput\&.tab\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +On Unix, the +\fBmysql\fR +client logs statements executed interactively to a history file\&. See +the section called \(lqMYSQL LOGGING\(rq\&. +.SH "MYSQL OPTIONS" +.\" mysql command options +.\" command options: mysql +.\" options: command-line: mysql +.\" startup parameters: mysql +.PP +\fBmysql\fR +supports the following options, which can be specified on the command line or in the +[mysql] +and +[client] +groups of an option file\&. For information about option files used by MySQL programs, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: help option +.\" help option: mysql +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: auto-rehash option +.\" auto-rehash option: mysql +\fB\-\-auto\-rehash\fR +.sp +Enable automatic rehashing\&. This option is on by default, which enables database, table, and column name completion\&. Use +\fB\-\-disable\-auto\-rehash\fR +to disable rehashing\&. That causes +\fBmysql\fR +to start faster, but you must issue the +rehash +command or its +\e# +shortcut if you want to use name completion\&. +.sp +To complete a name, enter the first part and press Tab\&. If the name is unambiguous, +\fBmysql\fR +completes it\&. Otherwise, you can press Tab again to see the possible names that begin with what you have typed so far\&. Completion does not occur if there is no default database\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This feature requires a MySQL client that is compiled with the +\fBreadline\fR +library\&. Typically, the +\fBreadline\fR +library is not available on Windows\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: auto-vertical-output option +.\" auto-vertical-output option: mysql +\fB\-\-auto\-vertical\-output\fR +.sp +Cause result sets to be displayed vertically if they are too wide for the current window, and using normal tabular format otherwise\&. (This applies to statements terminated by +; +or +\eG\&.) This option was added in MySQL 5\&.5\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: batch option +.\" batch option: mysql +\fB\-\-batch\fR, +\fB\-B\fR +.sp +Print results using tab as the column separator, with each row on a new line\&. With this option, +\fBmysql\fR +does not use the history file\&. +.sp +Batch mode results in nontabular output format and escaping of special characters\&. Escaping may be disabled by using raw mode; see the description for the +\fB\-\-raw\fR +option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: bind-address option +.\" bind-address option: mysql +\fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR +.sp +On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. +.sp +This option is supported only in the version of the +\fBmysql\fR +client that is supplied with MySQL Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: character-sets-dir option +.\" character-sets-dir option: mysql +\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory where character sets are installed\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: column-names option +.\" column-names option: mysql +\fB\-\-column\-names\fR +.sp +Write column names in results\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: column-type-info option +.\" column-type-info option: mysql +\fB\-\-column\-type\-info\fR, +\fB\-m\fR +.sp +Display result set metadata\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: comments option +.\" comments option: mysql +\fB\-\-comments\fR, +\fB\-c\fR +.sp +Whether to preserve comments in statements sent to the server\&. The default is \-\-skip\-comments (discard comments), enable with \-\-comments (preserve comments)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: compress option +.\" compress option: mysql +\fB\-\-compress\fR, +\fB\-C\fR +.sp +Compress all information sent between the client and the server if both support compression\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: database option +.\" database option: mysql +\fB\-\-database=\fR\fB\fIdb_name\fR\fR, +\fB\-D \fR\fB\fIdb_name\fR\fR +.sp +The database to use\&. This is useful primarily in an option file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: debug option +.\" debug option: mysql +\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, +\fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:o,\fIfile_name\fR\&. The default is +d:t:o,/tmp/mysql\&.trace\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: debug-check option +.\" debug-check option: mysql +\fB\-\-debug\-check\fR +.sp +Print some debugging information when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: debug-info option +.\" debug-info option: mysql +\fB\-\-debug\-info\fR, +\fB\-T\fR +.sp +Print debugging information and memory and CPU usage statistics when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: default-auth option +.\" default-auth option: mysql +\fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR +.sp +The client\-side authentication plugin to use\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.7\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: default-character-set option +.\" default-character-set option: mysql +\fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR +.sp +Use +\fIcharset_name\fR +as the default character set for the client and connection\&. +.sp +A common issue that can occur when the operating system uses +utf8 +or another multibyte character set is that output from the +\fBmysql\fR +client is formatted incorrectly, due to the fact that the MySQL client uses the +latin1 +character set by default\&. You can usually fix such issues by using this option to force the client to use the system character set instead\&. +.sp +See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq, for more information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: defaults-extra-file option +.\" defaults-extra-file option: mysql +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +.sp +Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: defaults-file option +.\" defaults-file option: mysql +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: defaults-group-suffix option +.\" defaults-group-suffix option: mysql +\fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR +.sp +Read not only the usual option groups, but also groups with the usual names and a suffix of +\fIstr\fR\&. For example, +\fBmysql\fR +normally reads the +[client] +and +[mysql] +groups\&. If the +\fB\-\-defaults\-group\-suffix=_other\fR +option is given, +\fBmysql\fR +also reads the +[client_other] +and +[mysql_other] +groups\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: delimiter option +.\" delimiter option: mysql +\fB\-\-delimiter=\fR\fB\fIstr\fR\fR +.sp +Set the statement delimiter\&. The default is the semicolon character (\(lq;\(rq)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: disable named commands +.\" disable named command: mysql +\fB\-\-disable\-named\-commands\fR +.sp +Disable named commands\&. Use the +\e* +form only, or use named commands only at the beginning of a line ending with a semicolon (\(lq;\(rq)\&. +\fBmysql\fR +starts with this option +\fIenabled\fR +by default\&. However, even with this option, long\-format commands still work from the first line\&. See +the section called \(lqMYSQL COMMANDS\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: enable-cleartext-plugin option +.\" enable-cleartext-plugin option: mysql +\fB\-\-enable\-cleartext\-plugin\fR +.sp +Enable the +mysql_clear_password +cleartext authentication plugin\&. (See +Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: execute option +.\" execute option: mysql +\fB\-\-execute=\fR\fB\fIstatement\fR\fR, +\fB\-e \fR\fB\fIstatement\fR\fR +.sp +Execute the statement and quit\&. The default output format is like that produced with +\fB\-\-batch\fR\&. See +Section\ \&4.2.4, \(lqUsing Options on the Command Line\(rq, for some examples\&. With this option, +\fBmysql\fR +does not use the history file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: force option +.\" force option: mysql +\fB\-\-force\fR, +\fB\-f\fR +.sp +Continue even if an SQL error occurs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: host option +.\" host option: mysql +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +Connect to the MySQL server on the given host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: html option +.\" html option: mysql +\fB\-\-html\fR, +\fB\-H\fR +.sp +Produce HTML output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: ignore-spaces option +.\" ignore-spaces option: mysql +\fB\-\-ignore\-spaces\fR, +\fB\-i\fR +.sp +Ignore spaces after function names\&. The effect of this is described in the discussion for the +IGNORE_SPACE +SQL mode (see +Section\ \&5.1.7, \(lqServer SQL Modes\(rq)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: init-command option +.\" init-command option: mysql +\fB\-\-init\-command=str\fR +.sp +SQL statement to execute after connecting to the server\&. If auto\-reconnect is enabled, the statement is executed again after reconnection occurs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: line-numbers option +.\" line-numbers option: mysql +\fB\-\-line\-numbers\fR +.sp +Write line numbers for errors\&. Disable this with +\fB\-\-skip\-line\-numbers\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: local-infile option +.\" local-infile option: mysql +\fB\-\-local\-infile[={0|1}]\fR +.sp +Enable or disable +LOCAL +capability for +LOAD DATA INFILE\&. With no value, the option enables +LOCAL\&. The option may be given as +\fB\-\-local\-infile=0\fR +or +\fB\-\-local\-infile=1\fR +to explicitly disable or enable +LOCAL\&. Enabling +LOCAL +has no effect if the server does not also support it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: named-commands option +.\" named-commands option: mysql +\fB\-\-named\-commands\fR, +\fB\-G\fR +.sp +Enable named +\fBmysql\fR +commands\&. Long\-format commands are permitted, not just short\-format commands\&. For example, +quit +and +\eq +both are recognized\&. Use +\fB\-\-skip\-named\-commands\fR +to disable named commands\&. See +the section called \(lqMYSQL COMMANDS\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: no-auto-rehash option +.\" no-auto-rehash option: mysql +\fB\-\-no\-auto\-rehash\fR, +\fB\-A\fR +.sp +This has the same effect as +\fB\-\-skip\-auto\-rehash\fR\&. See the description for +\fB\-\-auto\-rehash\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: no-beep option +.\" no-beep option: mysql +\fB\-\-no\-beep\fR, +\fB\-b\fR +.sp +Do not beep when errors occur\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: no-defaults option +.\" no-defaults option: mysql +\fB\-\-no\-defaults\fR +.sp +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: no-named-commands option +.\" no-named-commands option: mysql +\fB\-\-no\-named\-commands\fR, +\fB\-g\fR +.sp +Deprecated, use +\fB\-\-disable\-named\-commands\fR +instead\&. +\fB\-\-no\-named\-commands\fR +was removed in MySQL 5\&.5\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: no-pager option +.\" no-pager option: mysql +\fB\-\-no\-pager\fR +.sp +Deprecated form of +\fB\-\-skip\-pager\fR\&. See the +\fB\-\-pager\fR +option\&. +\fB\-\-no\-pager\fR +was removed in MySQL 5\&.5\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: no-tee option +.\" no-tee option: mysql +\fB\-\-no\-tee\fR +.sp +Deprecated form of +\fB\-\-skip\-tee\fR\&. See the +\fB\-\-tee\fR +option\&. +\fB\-\-no\-tee\fR +is removed in MySQL 5\&.5\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: one-database option +.\" one-database option: mysql +\fB\-\-one\-database\fR, +\fB\-o\fR +.sp +Ignore statements except those that occur while the default database is the one named on the command line\&. This option is rudimentary and should be used with care\&. Statement filtering is based only on +USE +statements\&. +.sp +Initially, +\fBmysql\fR +executes statements in the input because specifying a database +\fIdb_name\fR +on the command line is equivalent to inserting +USE \fIdb_name\fR +at the beginning of the input\&. Then, for each +USE +statement encountered, +\fBmysql\fR +accepts or rejects following statements depending on whether the database named is the one on the command line\&. The content of the statements is immaterial\&. +.sp +Suppose that +\fBmysql\fR +is invoked to process this set of statements: +.sp +.if n \{\ +.RS 4 +.\} +.nf +DELETE FROM db2\&.t2; +USE db2; +DROP TABLE db1\&.t1; +CREATE TABLE db1\&.t1 (i INT); +USE db1; +INSERT INTO t1 (i) VALUES(1); +CREATE TABLE db2\&.t1 (j INT); +.fi +.if n \{\ +.RE +.\} +.sp +If the command line is +\fBmysql \-\-force \-\-one\-database db1\fR, +\fBmysql\fR +handles the input as follows: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The +DELETE +statement is executed because the default database is +db1, even though the statement names a table in a different database\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The +DROP TABLE +and +CREATE TABLE +statements are not executed because the default database is not +db1, even though the statements name a table in +db1\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The +INSERT +and +CREATE TABLE +statements are executed because the default database is +db1, even though the +CREATE TABLE +statement names a table in a different database\&. +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: pager option +.\" pager option: mysql +\fB\-\-pager[=\fR\fB\fIcommand\fR\fR\fB]\fR +.sp +Use the given command for paging query output\&. If the command is omitted, the default pager is the value of your +PAGER +environment variable\&. Valid pagers are +\fBless\fR, +\fBmore\fR, +\fBcat [> filename]\fR, and so forth\&. This option works only on Unix and only in interactive mode\&. To disable paging, use +\fB\-\-skip\-pager\fR\&. +the section called \(lqMYSQL COMMANDS\(rq, discusses output paging further\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: password option +.\" password option: mysql +\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you +\fIcannot\fR +have a space between the option and the password\&. If you omit the +\fIpassword\fR +value following the +\fB\-\-password\fR +or +\fB\-p\fR +option on the command line, +\fBmysql\fR +prompts for one\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: pipe option +.\" pipe option: mysql +\fB\-\-pipe\fR, +\fB\-W\fR +.sp +On Windows, connect to the server using a named pipe\&. This option applies only if the server supports named\-pipe connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: plugin-dir option +.\" plugin-dir option: mysql +\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory in which to look for plugins\&. It may be necessary to specify this option if the +\fB\-\-default\-auth\fR +option is used to specify an authentication plugin but +\fBmysql\fR +does not find it\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.7\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: port option +.\" port option: mysql +.\" TCP/IP +\fB\-\-port=\fR\fB\fIport_num\fR\fR, +\fB\-P \fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for the connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: print-defaults option +.\" print-defaults option: mysql +\fB\-\-print\-defaults\fR +.sp +Print the program name and all options that it gets from option files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: prompt option +.\" prompt option: mysql +\fB\-\-prompt=\fR\fB\fIformat_str\fR\fR +.sp +Set the prompt to the specified format\&. The default is +mysql>\&. The special sequences that the prompt can contain are described in +the section called \(lqMYSQL COMMANDS\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: protocol option +.\" protocol option: mysql +\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR +.sp +The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: quick option +.\" quick option: mysql +\fB\-\-quick\fR, +\fB\-q\fR +.sp +Do not cache each query result, print each row as it is received\&. This may slow down the server if the output is suspended\&. With this option, +\fBmysql\fR +does not use the history file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: raw option +.\" raw option: mysql +\fB\-\-raw\fR, +\fB\-r\fR +.sp +For tabular output, the +\(lqboxing\(rq +around columns enables one column value to be distinguished from another\&. For nontabular output (such as is produced in batch mode or when the +\fB\-\-batch\fR +or +\fB\-\-silent\fR +option is given), special characters are escaped in the output so they can be identified easily\&. Newline, tab, +NUL, and backslash are written as +\en, +\et, +\e0, and +\e\e\&. The +\fB\-\-raw\fR +option disables this character escaping\&. +.sp +The following example demonstrates tabular versus nontabular output and the use of raw mode to disable escaping: +.sp +.if n \{\ +.RS 4 +.\} +.nf +% \fBmysql\fR +mysql> SELECT CHAR(92); ++\-\-\-\-\-\-\-\-\-\-+ +| CHAR(92) | ++\-\-\-\-\-\-\-\-\-\-+ +| \e | ++\-\-\-\-\-\-\-\-\-\-+ +% \fBmysql \-s\fR +mysql> SELECT CHAR(92); +CHAR(92) +\e\e +% \fBmysql \-s \-r\fR +mysql> SELECT CHAR(92); +CHAR(92) +\e +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: reconnect option +.\" reconnect option: mysql +\fB\-\-reconnect\fR +.sp +If the connection to the server is lost, automatically try to reconnect\&. A single reconnect attempt is made each time the connection is lost\&. To suppress reconnection behavior, use +\fB\-\-skip\-reconnect\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: safe-updates option +.\" safe-updates option: mysql +.\" mysql: i-am-a-dummy option +.\" i-am-a-dummy option: mysql +\fB\-\-safe\-updates\fR, +\fB\-\-i\-am\-a\-dummy\fR, +\fB\-U\fR +.sp +Permit only those +UPDATE +and +DELETE +statements that specify which rows to modify by using key values\&. If you have set this option in an option file, you can override it by using +\fB\-\-safe\-updates\fR +on the command line\&. See +the section called \(lqMYSQL TIPS\(rq, for more information about this option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: secure-auth option +.\" secure-auth option: mysql +\fB\-\-secure\-auth\fR +.sp +Do not send passwords to the server in old (pre\-4\&.1) format\&. This prevents connections except for servers that use the newer password format\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: shared-memory-base-name option +.\" shared-memory-base-name option: mysql +\fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR +.sp +On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is +MYSQL\&. The shared\-memory name is case sensitive\&. +.sp +The server must be started with the +\fB\-\-shared\-memory\fR +option to enable shared\-memory connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: show-warnings option +.\" show-warnings option: mysql +\fB\-\-show\-warnings\fR +.sp +Cause warnings to be shown after each statement if there are any\&. This option applies to interactive and batch mode\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: sigint-ignore option +.\" sigint-ignore option: mysql +\fB\-\-sigint\-ignore\fR +.sp +Ignore +SIGINT +signals (typically the result of typing +Control+C)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: silent option +.\" silent option: mysql +\fB\-\-silent\fR, +\fB\-s\fR +.sp +Silent mode\&. Produce less output\&. This option can be given multiple times to produce less and less output\&. +.sp +This option results in nontabular output format and escaping of special characters\&. Escaping may be disabled by using raw mode; see the description for the +\fB\-\-raw\fR +option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: skip-column-names option +.\" skip-column-names option: mysql +\fB\-\-skip\-column\-names\fR, +\fB\-N\fR +.sp +Do not write column names in results\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: skip-line-numbers option +.\" skip-line-numbers option: mysql +\fB\-\-skip\-line\-numbers\fR, +\fB\-L\fR +.sp +Do not write line numbers for errors\&. Useful when you want to compare result files that include error messages\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: socket option +.\" socket option: mysql +\fB\-\-socket=\fR\fB\fIpath\fR\fR, +\fB\-S \fR\fB\fIpath\fR\fR +.sp +For connections to +localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: SSL options +.\" SSL options: mysql +\fB\-\-ssl*\fR +.sp +Options that begin with +\fB\-\-ssl\fR +specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See +Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: table option +.\" table option: mysql +\fB\-\-table\fR, +\fB\-t\fR +.sp +Display output in table format\&. This is the default for interactive use, but can be used to produce table output in batch mode\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: tee option +.\" tee option: mysql +\fB\-\-tee=\fR\fB\fIfile_name\fR\fR +.sp +Append a copy of output to the given file\&. This option works only in interactive mode\&. +the section called \(lqMYSQL COMMANDS\(rq, discusses tee files further\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: unbuffered option +.\" unbuffered option: mysql +\fB\-\-unbuffered\fR, +\fB\-n\fR +.sp +Flush the buffer after each query\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: user option +.\" user option: mysql +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: verbose option +.\" verbose option: mysql +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Produce more output about what the program does\&. This option can be given multiple times to produce more and more output\&. (For example, +\fB\-v \-v \-v\fR +produces table output format even in batch mode\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: version option +.\" version option: mysql +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: vertical option +.\" vertical option: mysql +\fB\-\-vertical\fR, +\fB\-E\fR +.sp +Print query output rows vertically (one line per column value)\&. Without this option, you can specify vertical output for individual statements by terminating them with +\eG\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: wait option +.\" wait option: mysql +\fB\-\-wait\fR, +\fB\-w\fR +.sp +If the connection cannot be established, wait and retry instead of aborting\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: xml option +.\" xml option: mysql +\fB\-\-xml\fR, +\fB\-X\fR +.sp +Produce XML output\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +NULL +.fi +.if n \{\ +.RE +.\} +.sp +The output when +\fB\-\-xml\fR +is used with +\fBmysql\fR +matches that of +\fBmysqldump \fR\fB\fB\-\-xml\fR\fR\&. See +\fBmysqldump\fR(1) +for details\&. +.sp +The XML output also uses an XML namespace, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql \-\-xml \-uroot \-e "SHOW VARIABLES LIKE \*(Aqversion%\*(Aq"\fR + + + +version +5\&.0\&.40\-debug + + +version_comment +Source distribution + + +version_compile_machine +i686 + + +version_compile_os +suse\-linux\-gnu + + +.fi +.if n \{\ +.RE +.\} +.sp +(See Bug #25946\&.) +.RE +.PP +You can also set the following variables by using +\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR\&. The +\fB\-\-set\-variable\fR +format is deprecated and was removed in MySQL 5\&.5\&.3\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" timeout: connect_timeout variable +.\" connect_timeout variable +connect_timeout +.sp +The number of seconds before connection timeout\&. (Default value is +0\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" max_allowed_packet variable +max_allowed_packet +.sp +The maximum size of the buffer for client/server communication\&. The default is 16MB, the maximum is 1GB\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" max_join_size variable +max_join_size +.sp +The automatic limit for rows in a join when using +\fB\-\-safe\-updates\fR\&. (Default value is 1,000,000\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" net_buffer_length variable +net_buffer_length +.sp +The buffer size for TCP/IP and socket communication\&. (Default value is 16KB\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" select_limit variable +select_limit +.sp +The automatic limit for +SELECT +statements when using +\fB\-\-safe\-updates\fR\&. (Default value is 1,000\&.) +.RE +.SH "MYSQL COMMANDS" +.PP +\fBmysql\fR +sends each SQL statement that you issue to the server to be executed\&. There is also a set of commands that +\fBmysql\fR +itself interprets\&. For a list of these commands, type +help +or +\eh +at the +mysql> +prompt: +.\" mysql commands: list of +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBhelp\fR +List of all MySQL commands: +Note that all text commands must be first on line and end with \*(Aq;\*(Aq +? (\e?) Synonym for `help\*(Aq\&. +clear (\ec) Clear command\&. +connect (\er) Reconnect to the server\&. Optional arguments are db and host\&. +delimiter (\ed) Set statement delimiter\&. +edit (\ee) Edit command with $EDITOR\&. +ego (\eG) Send command to mysql server, display result vertically\&. +exit (\eq) Exit mysql\&. Same as quit\&. +go (\eg) Send command to mysql server\&. +help (\eh) Display this help\&. +nopager (\en) Disable pager, print to stdout\&. +notee (\et) Don\*(Aqt write into outfile\&. +pager (\eP) Set PAGER [to_pager]\&. Print the query results via PAGER\&. +print (\ep) Print current command\&. +prompt (\eR) Change your mysql prompt\&. +quit (\eq) Quit mysql\&. +rehash (\e#) Rebuild completion hash\&. +source (\e\&.) Execute an SQL script file\&. Takes a file name as an argument\&. +status (\es) Get status information from the server\&. +system (\e!) Execute a system shell command\&. +tee (\eT) Set outfile [to_outfile]\&. Append everything into given + outfile\&. +use (\eu) Use another database\&. Takes database name as argument\&. +charset (\eC) Switch to another charset\&. Might be needed for processing + binlog with multi\-byte charsets\&. +warnings (\eW) Show warnings after every statement\&. +nowarning (\ew) Don\*(Aqt show warnings after every statement\&. +For server side help, type \*(Aqhelp contents\*(Aq +.fi +.if n \{\ +.RE +.\} +.PP +Each command has both a long and short form\&. The long form is not case sensitive; the short form is\&. The long form can be followed by an optional semicolon terminator, but the short form should not\&. +.PP +The use of short\-form commands within multi\-line +/* \&.\&.\&. */ +comments is not supported\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: help command +.\" help command: mysql +help [\fIarg\fR], +\eh [\fIarg\fR], +\e? [\fIarg\fR], +? [\fIarg\fR] +.sp +Display a help message listing the available +\fBmysql\fR +commands\&. +.sp +If you provide an argument to the +help +command, +\fBmysql\fR +uses it as a search string to access server\-side help from the contents of the MySQL Reference Manual\&. For more information, see +the section called \(lqMYSQL SERVER-SIDE HELP\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: charset command +.\" charset command: mysql +charset \fIcharset_name\fR, +\eC \fIcharset_name\fR +.sp +Change the default character set and issue a +SET NAMES +statement\&. This enables the character set to remain synchronized on the client and server if +\fBmysql\fR +is run with auto\-reconnect enabled (which is not recommended), because the specified character set is used for reconnects\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: clear command +.\" clear command: mysql +clear, +\ec +.sp +Clear the current input\&. Use this if you change your mind about executing the statement that you are entering\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: connect command +.\" connect command: mysql +connect [\fIdb_name\fR \fIhost_name\fR]], +\er [\fIdb_name\fR \fIhost_name\fR]] +.sp +Reconnect to the server\&. The optional database name and host name arguments may be given to specify the default database or the host where the server is running\&. If omitted, the current values are used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: delimiter command +.\" delimiter command: mysql +delimiter \fIstr\fR, +\ed \fIstr\fR +.sp +Change the string that +\fBmysql\fR +interprets as the separator between SQL statements\&. The default is the semicolon character (\(lq;\(rq)\&. +.sp +The delimiter string can be specified as an unquoted or quoted argument on the +delimiter +command line\&. Quoting can be done with either single quote (\*(Aq), double quote ("), or backtick (`) characters\&. To include a quote within a quoted string, either quote the string with a different quote character or escape the quote with a backslash (\(lq\e\(rq) character\&. Backslash should be avoided outside of quoted strings because it is the escape character for MySQL\&. For an unquoted argument, the delimiter is read up to the first space or end of line\&. For a quoted argument, the delimiter is read up to the matching quote on the line\&. +.sp +\fBmysql\fR +interprets instances of the delimiter string as a statement delimiter anywhere it occurs, except within quoted strings\&. Be careful about defining a delimiter that might occur within other words\&. For example, if you define the delimiter as +X, you will be unable to use the word +INDEX +in statements\&. +\fBmysql\fR +interprets this as +INDE +followed by the delimiter +X\&. +.sp +When the delimiter recognized by +\fBmysql\fR +is set to something other than the default of +\(lq;\(rq, instances of that character are sent to the server without interpretation\&. However, the server itself still interprets +\(lq;\(rq +as a statement delimiter and processes statements accordingly\&. This behavior on the server side comes into play for multiple\-statement execution (see +Section\ \&23.8.17, \(lqC API Support for Multiple Statement Execution\(rq), and for parsing the body of stored procedures and functions, triggers, and events (see +Section\ \&20.1, \(lqDefining Stored Programs\(rq)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: edit command +.\" edit command: mysql +edit, +\ee +.sp +Edit the current input statement\&. +\fBmysql\fR +checks the values of the +EDITOR +and +VISUAL +environment variables to determine which editor to use\&. The default editor is +\fBvi\fR +if neither variable is set\&. +.sp +The +edit +command works only in Unix\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: ego command +.\" ego command: mysql +ego, +\eG +.sp +Send the current statement to the server to be executed and display the result using vertical format\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: exit command +.\" exit command: mysql +exit, +\eq +.sp +Exit +\fBmysql\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: go command +.\" go command: mysql +go, +\eg +.sp +Send the current statement to the server to be executed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: nopager command +.\" nopager command: mysql +nopager, +\en +.sp +Disable output paging\&. See the description for +pager\&. +.sp +The +nopager +command works only in Unix\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: notee command +.\" notee command: mysql +notee, +\et +.sp +Disable output copying to the tee file\&. See the description for +tee\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: nowarning command +.\" nowarning command: mysql +nowarning, +\ew +.sp +Disable display of warnings after each statement\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: pager command +.\" pager command: mysql +pager [\fIcommand\fR], +\eP [\fIcommand\fR] +.sp +Enable output paging\&. By using the +\fB\-\-pager\fR +option when you invoke +\fBmysql\fR, it is possible to browse or search query results in interactive mode with Unix programs such as +\fBless\fR, +\fBmore\fR, or any other similar program\&. If you specify no value for the option, +\fBmysql\fR +checks the value of the +PAGER +environment variable and sets the pager to that\&. Pager functionality works only in interactive mode\&. +.sp +Output paging can be enabled interactively with the +pager +command and disabled with +nopager\&. The command takes an optional argument; if given, the paging program is set to that\&. With no argument, the pager is set to the pager that was set on the command line, or +stdout +if no pager was specified\&. +.sp +Output paging works only in Unix because it uses the +popen() +function, which does not exist on Windows\&. For Windows, the +tee +option can be used instead to save query output, although it is not as convenient as +pager +for browsing output in some situations\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: print command +.\" print command: mysql +print, +\ep +.sp +Print the current input statement without executing it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: prompt command +.\" prompt command: mysql +prompt [\fIstr\fR], +\eR [\fIstr\fR] +.sp +Reconfigure the +\fBmysql\fR +prompt to the given string\&. The special character sequences that can be used in the prompt are described later in this section\&. +.sp +If you specify the +prompt +command with no argument, +\fBmysql\fR +resets the prompt to the default of +mysql>\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: quit command +.\" quit command: mysql +quit, +\eq +.sp +Exit +\fBmysql\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: rehash command +.\" rehash command: mysql +rehash, +\e# +.sp +Rebuild the completion hash that enables database, table, and column name completion while you are entering statements\&. (See the description for the +\fB\-\-auto\-rehash\fR +option\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: source command +.\" source command: mysql +source \fIfile_name\fR, +\e\&. \fIfile_name\fR +.sp +Read the named file and executes the statements contained therein\&. On Windows, you can specify path name separators as +/ +or +\e\e\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: status command +.\" status command: mysql +status, +\es +.sp +Provide status information about the connection and the server you are using\&. If you are running in +\fB\-\-safe\-updates\fR +mode, +status +also prints the values for the +\fBmysql\fR +variables that affect your queries\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: system command +.\" system command: mysql +system \fIcommand\fR, +\e! \fIcommand\fR +.sp +Execute the given command using your default command interpreter\&. +.sp +The +system +command works only in Unix\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: tee command +.\" tee command: mysql +tee [\fIfile_name\fR], +\eT [\fIfile_name\fR] +.sp +By using the +\fB\-\-tee\fR +option when you invoke +\fBmysql\fR, you can log statements and their output\&. All the data displayed on the screen is appended into a given file\&. This can be very useful for debugging purposes also\&. +\fBmysql\fR +flushes results to the file after each statement, just before it prints its next prompt\&. Tee functionality works only in interactive mode\&. +.sp +You can enable this feature interactively with the +tee +command\&. Without a parameter, the previous file is used\&. The +tee +file can be disabled with the +notee +command\&. Executing +tee +again re\-enables logging\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: use command +.\" use command: mysql +use \fIdb_name\fR, +\eu \fIdb_name\fR +.sp +Use +\fIdb_name\fR +as the default database\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql: warnings command +.\" warnings command: mysql +warnings, +\eW +.sp +Enable display of warnings after each statement (if there are any)\&. +.RE +.PP +Here are a few tips about the +pager +command: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +You can use it to write to a file and the results go only to the file: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBpager cat > /tmp/log\&.txt\fR +.fi +.if n \{\ +.RE +.\} +.sp +You can also pass any options for the program that you want to use as your pager: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBpager less \-n \-i \-S\fR +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +In the preceding example, note the +\fB\-S\fR +option\&. You may find it very useful for browsing wide query results\&. Sometimes a very wide result set is difficult to read on the screen\&. The +\fB\-S\fR +option to +\fBless\fR +can make the result set much more readable because you can scroll it horizontally using the left\-arrow and right\-arrow keys\&. You can also use +\fB\-S\fR +interactively within +\fBless\fR +to switch the horizontal\-browse mode on and off\&. For more information, read the +\fBless\fR +manual page: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBman less\fR +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The +\fB\-F\fR +and +\fB\-X\fR +options may be used with +\fBless\fR +to cause it to exit if output fits on one screen, which is convenient when no scrolling is necessary: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBpager less \-n \-i \-S \-F \-X\fR +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +You can specify very complex pager commands for handling query output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBpager cat | tee /dr1/tmp/res\&.txt \e\fR + \fB| tee /dr2/tmp/res2\&.txt | less \-n \-i \-S\fR +.fi +.if n \{\ +.RE +.\} +.sp +In this example, the command would send query results to two files in two different directories on two different file systems mounted on +/dr1 +and +/dr2, yet still display the results onscreen using +\fBless\fR\&. +.RE +.PP +You can also combine the +tee +and +pager +functions\&. Have a +tee +file enabled and +pager +set to +\fBless\fR, and you are able to browse the results using the +\fBless\fR +program and still have everything appended into a file the same time\&. The difference between the Unix +tee +used with the +pager +command and the +\fBmysql\fR +built\-in +tee +command is that the built\-in +tee +works even if you do not have the Unix +\fBtee\fR +available\&. The built\-in +tee +also logs everything that is printed on the screen, whereas the Unix +\fBtee\fR +used with +pager +does not log quite that much\&. Additionally, +tee +file logging can be turned on and off interactively from within +\fBmysql\fR\&. This is useful when you want to log some queries to a file, but not others\&. +.\" mysql prompt command +.PP +The +prompt +command reconfigures the default +mysql> +prompt\&. The string for defining the prompt can contain the following special sequences\&. +.TS +allbox tab(:); +lB lB. +T{ +Option +T}:T{ +Description +T} +.T& +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l +l l. +T{ +\ec +T}:T{ +A counter that increments for each statement you issue +T} +T{ +\eD +T}:T{ +The full current date +T} +T{ +\ed +T}:T{ +The default database +T} +T{ +\eh +T}:T{ +The server host +T} +T{ +\el +T}:T{ +The current delimiter +T} +T{ +\em +T}:T{ +Minutes of the current time +T} +T{ +\en +T}:T{ +A newline character +T} +T{ +\eO +T}:T{ +The current month in three\-letter format (Jan, Feb, \&...) +T} +T{ +\eo +T}:T{ +The current month in numeric format +T} +T{ +\eP +T}:T{ +am/pm +T} +T{ +\ep +T}:T{ +The current TCP/IP port or socket file +T} +T{ +\eR +T}:T{ +The current time, in 24\-hour military time (0\(en23) +T} +T{ +\er +T}:T{ +The current time, standard 12\-hour time (1\(en12) +T} +T{ +\eS +T}:T{ +Semicolon +T} +T{ +\es +T}:T{ +Seconds of the current time +T} +T{ +\et +T}:T{ +A tab character +T} +T{ +\eU +T}:T{ +.PP +Your full +\fIuser_name\fR@\fIhost_name\fR +account name +T} +T{ +\eu +T}:T{ +Your user name +T} +T{ +\ev +T}:T{ +The server version +T} +T{ +\ew +T}:T{ +The current day of the week in three\-letter format (Mon, Tue, \&...) +T} +T{ +\eY +T}:T{ +The current year, four digits +T} +T{ +\ey +T}:T{ +The current year, two digits +T} +T{ +\e_ +T}:T{ +A space +T} +T{ +\e\ \& +T}:T{ +A space (a space follows the backslash) +T} +T{ +\e\*(Aq +T}:T{ +Single quote +T} +T{ +\e" +T}:T{ +Double quote +T} +T{ +\e\e +T}:T{ +A literal \(lq\e\(rq backslash character +T} +T{ +\e\fIx\fR +T}:T{ +.PP +\fIx\fR, for any +\(lq\fIx\fR\(rq +not listed above +T} +.TE +.sp 1 +.PP +You can set the prompt in several ways: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIUse an environment variable\&.\fR +You can set the +MYSQL_PS1 +environment variable to a prompt string\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBexport MYSQL_PS1="(\eu@\eh) [\ed]> "\fR +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIUse a command\-line option\&.\fR +You can set the +\fB\-\-prompt\fR +option on the command line to +\fBmysql\fR\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql \-\-prompt="(\eu@\eh) [\ed]> "\fR +(user@host) [database]> +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIUse an option file\&.\fR +You can set the +prompt +option in the +[mysql] +group of any MySQL option file, such as +/etc/my\&.cnf +or the +\&.my\&.cnf +file in your home directory\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[mysql] +prompt=(\e\eu@\e\eh) [\e\ed]>\e\e_ +.fi +.if n \{\ +.RE +.\} +.sp +In this example, note that the backslashes are doubled\&. If you set the prompt using the +prompt +option in an option file, it is advisable to double the backslashes when using the special prompt options\&. There is some overlap in the set of permissible prompt options and the set of special escape sequences that are recognized in option files\&. (The rules for escape sequences in option files are listed in +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&.) The overlap may cause you problems if you use single backslashes\&. For example, +\es +is interpreted as a space rather than as the current seconds value\&. The following example shows how to define a prompt within an option file to include the current time in +HH:MM:SS> +format: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[mysql] +prompt="\e\er:\e\em:\e\es> " +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fISet the prompt interactively\&.\fR +You can change your prompt interactively by using the +prompt +(or +\eR) command\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBprompt (\eu@\eh) [\ed]>\e_\fR +PROMPT set to \*(Aq(\eu@\eh) [\ed]>\e_\*(Aq +(\fIuser\fR@\fIhost\fR) [\fIdatabase\fR]> +(\fIuser\fR@\fIhost\fR) [\fIdatabase\fR]> prompt +Returning to default PROMPT of mysql> +mysql> +.fi +.if n \{\ +.RE +.\} +.RE +.SH "MYSQL LOGGING" +.\" MYSQL_HISTFILE environment variable +.\" environment variable: MYSQL_HISTFILE +.\" HOME environment variable +.\" environment variable: HOME +.\" mysql history file +.\" command-line history: mysql +.\" .mysql_history file +.PP +On Unix, the +\fBmysql\fR +client logs statements executed interactively to a history file\&. By default, this file is named +\&.mysql_history +in your home directory\&. To specify a different file, set the value of the +MYSQL_HISTFILE +environment variable\&. +How Logging Occurs.PP +Statement logging occurs as follows: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Statements are logged only when executed interactively\&. Statements are noninteractive, for example, when read from a file or a pipe\&. It is also possible to suppress statement logging by using the +\fB\-\-batch\fR +or +\fB\-\-execute\fR +option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBmysql\fR +logs each nonempty statement line individually\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If a statement spans multiple lines (not including the terminating delimiter), +\fBmysql\fR +concatenates the lines to form the complete statement, maps newlines to spaces, and logs the result, plus a delimiter\&. +.RE +.PP +Consequently, an input statement that spans multiple lines can be logged twice\&. Consider this input: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBSELECT\fR + \-> \fB\*(AqToday is\*(Aq\fR + \-> \fB,\fR + \-> \fBCONCAT()\fR + \-> \fB;\fR +.fi +.if n \{\ +.RE +.\} +.PP +In this case, +\fBmysql\fR +logs the +\(lqSELECT\(rq, +\(lq\*(AqToday is\*(Aq\(rq, +\(lq,\(rq, +\(lqCONCAT()\(rq, and +\(lq;\(rq +lines as it reads them\&. It also logs the complete statement, after mapping +SELECT\en\*(AqToday is\*(Aq\en,\enCURDATE() +to +SELECT \*(AqToday is\*(Aq , CURDATE(), plus a delimiter\&. Thus, these lines appear in logged output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +SELECT +\*(AqToday is\*(Aq +, +CURDATE() +; +SELECT \*(AqToday is\*(Aq , CURDATE(); +.fi +.if n \{\ +.RE +.\} +.sp +Controlling the History File.PP +The +\&.mysql_history +file should be protected with a restrictive access mode because sensitive information might be written to it, such as the text of SQL statements that contain passwords\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. +.PP +If you do not want to maintain a history file, first remove +\&.mysql_history +if it exists\&. Then use either of the following techniques to prevent it from being created again: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Set the +MYSQL_HISTFILE +environment variable to +/dev/null\&. To cause this setting to take effect each time you log in, put it in one of your shell\*(Aqs startup files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Create +\&.mysql_history +as a symbolic link to +/dev/null; this need be done only once: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBln \-s /dev/null $HOME/\&.mysql_history\fR +.fi +.if n \{\ +.RE +.\} +.RE +.SH "MYSQL SERVER-SIDE HELP" +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBhelp \fR\fB\fIsearch_string\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +If you provide an argument to the +help +command, +\fBmysql\fR +uses it as a search string to access server\-side help from the contents of the MySQL Reference Manual\&. The proper operation of this command requires that the help tables in the +mysql +database be initialized with help topic information (see +Section\ \&5.1.10, \(lqServer-Side Help\(rq)\&. +.PP +If there is no match for the search string, the search fails: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBhelp me\fR +Nothing found +Please try to run \*(Aqhelp contents\*(Aq for a list of all accessible topics +.fi +.if n \{\ +.RE +.\} +.PP +Use +\fBhelp contents\fR +to see a list of the help categories: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBhelp contents\fR +You asked for help about help category: "Contents" +For more information, type \*(Aqhelp \*(Aq, where is one of the +following categories: + Account Management + Administration + Data Definition + Data Manipulation + Data Types + Functions + Functions and Modifiers for Use with GROUP BY + Geographic Features + Language Structure + Plugins + Storage Engines + Stored Routines + Table Maintenance + Transactions + Triggers +.fi +.if n \{\ +.RE +.\} +.PP +If the search string matches multiple items, +\fBmysql\fR +shows a list of matching topics: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBhelp logs\fR +Many help items for your request exist\&. +To make a more specific request, please type \*(Aqhelp \*(Aq, +where is one of the following topics: + SHOW + SHOW BINARY LOGS + SHOW ENGINE + SHOW LOGS +.fi +.if n \{\ +.RE +.\} +.PP +Use a topic as the search string to see the help entry for that topic: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBhelp show binary logs\fR +Name: \*(AqSHOW BINARY LOGS\*(Aq +Description: +Syntax: +SHOW BINARY LOGS +SHOW MASTER LOGS +Lists the binary log files on the server\&. This statement is used as +part of the procedure described in [purge\-binary\-logs], that shows how +to determine which logs can be purged\&. +mysql> SHOW BINARY LOGS; ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ +| Log_name | File_size | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ +| binlog\&.000015 | 724935 | +| binlog\&.000016 | 733481 | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ +.fi +.if n \{\ +.RE +.\} +.PP +The search string can contain the wildcard characters +\(lq%\(rq +and +\(lq_\(rq\&. These have the same meaning as for pattern\-matching operations performed with the +LIKE +operator\&. For example, +HELP rep% +returns a list of topics that begin with +rep: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBHELP rep%\fR +Many help items for your request exist\&. +To make a more specific request, please type \*(Aqhelp \*(Aq, +where is one of the following +topics: + REPAIR TABLE + REPEAT FUNCTION + REPEAT LOOP + REPLACE + REPLACE FUNCTION +.fi +.if n \{\ +.RE +.\} +.SH "EXECUTING SQL STATEMENTS FROM A TEXT FILE" +.\" executing SQL statements from text files +.\" importing: data +.\" data: importing +.\" files: text +.\" text files: importing +.\" source (mysql client command) +.\" \. (mysql client command) +.\" mysql source (command for reading from text files) +.\" mysql \. (command for reading from text files) +.PP +The +\fBmysql\fR +client typically is used interactively, like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql \fR\fB\fIdb_name\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +However, it is also possible to put your SQL statements in a file and then tell +\fBmysql\fR +to read its input from that file\&. To do so, create a text file +\fItext_file\fR +that contains the statements you wish to execute\&. Then invoke +\fBmysql\fR +as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql \fR\fB\fIdb_name\fR\fR\fB < \fR\fB\fItext_file\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +If you place a +USE \fIdb_name\fR +statement as the first statement in the file, it is unnecessary to specify the database name on the command line: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql < text_file\fR +.fi +.if n \{\ +.RE +.\} +.PP +If you are already running +\fBmysql\fR, you can execute an SQL script file using the +source +command or +\e\&. +command: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBsource \fR\fB\fIfile_name\fR\fR +mysql> \fB\e\&. \fR\fB\fIfile_name\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +Sometimes you may want your script to display progress information to the user\&. For this you can insert statements like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +SELECT \*(Aq\*(Aq AS \*(Aq \*(Aq; +.fi +.if n \{\ +.RE +.\} +.PP +The statement shown outputs +\&. +.PP +You can also invoke +\fBmysql\fR +with the +\fB\-\-verbose\fR +option, which causes each statement to be displayed before the result that it produces\&. +.PP +\fBmysql\fR +ignores Unicode byte order mark (BOM) characters at the beginning of input files\&. Previously, it read them and sent them to the server, resulting in a syntax error\&. Presence of a BOM does not cause +\fBmysql\fR +to change its default character set\&. To do that, invoke +\fBmysql\fR +with an option such as +\fB\-\-default\-character\-set=utf8\fR\&. +.PP +For more information about batch mode, see +Section\ \&3.5, \(lqUsing mysql in Batch Mode\(rq\&. +.SH "MYSQL TIPS" +.PP +This section describes some techniques that can help you use +\fBmysql\fR +more effectively\&. +.SS "Input\-Line Editing" +.PP +\fBmysql\fR +supports input\-line editing, which enables you to modify the current input line in place or recall previous input lines\&. For example, the +left\-arrow +and +right\-arrow +keys move horizontally within the current input line, and the +up\-arror +and +down\-arrow +keys move up and down through the set of previously entered lines\&. +Backspace +deletes the character before the cursor and typing new characters enters them at the cursor position\&. To enter the line, press +Enter\&. +.PP +On Windows, the editing key sequences are the same as supported for command editing in console windows\&. On Unix, the key sequences depend on the input library used to build +\fBmysql\fR +(for example, the +libedit +or +readline +library)\&. +.PP +Documentation for the +libedit +and +readline +libraries is available online\&. To change the set of key sequences permitted by a given input library, define key bindings in the library startup file\&. This is a file in your home directory: +\&.editrc +for +libedit +and +\&.inputrc +for +readline\&. +.PP +For example, in +libedit, +Control+W +deletes everything before the current cursor position and +Control+U +deletes the entire line\&. In +readline, +Control+W +deletes the word before the cursor and +Control+U +deletes everything before the current cursor position\&. If +\fBmysql\fR +was built using +libedit, a user who prefers the +readline +behavior for these two keys can put the following lines in the +\&.editrc +file (creating the file if necessary): +.sp +.if n \{\ +.RS 4 +.\} +.nf +bind "^W" ed\-delete\-prev\-word +bind "^U" vi\-kill\-line\-prev +.fi +.if n \{\ +.RE +.\} +.PP +To see the current set of key bindings, temporarily put a line that says only +bind +at the end of +\&.editrc\&. +\fBmysql\fR +will show the bindings when it starts\&. +.SS "Displaying Query Results Vertically" +.PP +Some query results are much more readable when displayed vertically, instead of in the usual horizontal table format\&. Queries can be displayed vertically by terminating the query with \eG instead of a semicolon\&. For example, longer text values that include newlines often are much easier to read with vertical output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBSELECT * FROM mails WHERE LENGTH(txt) < 300 LIMIT 300,1\eG\fR +*************************** 1\&. row *************************** + msg_nro: 3068 + date: 2000\-03\-01 23:29:50 +time_zone: +0200 +mail_from: Monty + reply: monty@no\&.spam\&.com + mail_to: "Thimble Smith" + sbj: UTF\-8 + txt: >>>>> "Thimble" == Thimble Smith writes: +Thimble> Hi\&. I think this is a good idea\&. Is anyone familiar +Thimble> with UTF\-8 or Unicode? Otherwise, I\*(Aqll put this on my +Thimble> TODO list and see what happens\&. +Yes, please do that\&. +Regards, +Monty + file: inbox\-jani\-1 + hash: 190402944 +1 row in set (0\&.09 sec) +.fi +.if n \{\ +.RE +.\} +.SS "Using the \-\-safe\-updates Option" +.\" safe-updates option +.PP +For beginners, a useful startup option is +\fB\-\-safe\-updates\fR +(or +\fB\-\-i\-am\-a\-dummy\fR, which has the same effect)\&. It is helpful for cases when you might have issued a +DELETE FROM \fItbl_name\fR +statement but forgotten the +WHERE +clause\&. Normally, such a statement deletes all rows from the table\&. With +\fB\-\-safe\-updates\fR, you can delete rows only by specifying the key values that identify them\&. This helps prevent accidents\&. +.PP +When you use the +\fB\-\-safe\-updates\fR +option, +\fBmysql\fR +issues the following statement when it connects to the MySQL server: +.sp +.if n \{\ +.RS 4 +.\} +.nf +SET sql_safe_updates=1, sql_select_limit=1000, sql_max_join_size=1000000; +.fi +.if n \{\ +.RE +.\} +.PP +See +Section\ \&5.1.4, \(lqServer System Variables\(rq\&. +.PP +The +SET +statement has the following effects: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +You are not permitted to execute an +UPDATE +or +DELETE +statement unless you specify a key constraint in the +WHERE +clause or provide a +LIMIT +clause (or both)\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +UPDATE \fItbl_name\fR SET \fInot_key_column\fR=\fIval\fR WHERE \fIkey_column\fR=\fIval\fR; +UPDATE \fItbl_name\fR SET \fInot_key_column\fR=\fIval\fR LIMIT 1; +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The server limits all large +SELECT +results to 1,000 rows unless the statement includes a +LIMIT +clause\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The server aborts multiple\-table +SELECT +statements that probably need to examine more than 1,000,000 row combinations\&. +.RE +.PP +To specify limits different from 1,000 and 1,000,000, you can override the defaults by using the +\fB\-\-select_limit\fR +and +\fB\-\-max_join_size\fR +options: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql \-\-safe\-updates \-\-select_limit=500 \-\-max_join_size=10000\fR +.fi +.if n \{\ +.RE +.\} +.SS "Disabling mysql Auto\-Reconnect" +.PP +If the +\fBmysql\fR +client loses its connection to the server while sending a statement, it immediately and automatically tries to reconnect once to the server and send the statement again\&. However, even if +\fBmysql\fR +succeeds in reconnecting, your first connection has ended and all your previous session objects and settings are lost: temporary tables, the autocommit mode, and user\-defined and session variables\&. Also, any current transaction rolls back\&. This behavior may be dangerous for you, as in the following example where the server was shut down and restarted between the first and second statements without you knowing it: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBSET @a=1;\fR +Query OK, 0 rows affected (0\&.05 sec) +mysql> \fBINSERT INTO t VALUES(@a);\fR +ERROR 2006: MySQL server has gone away +No connection\&. Trying to reconnect\&.\&.\&. +Connection id: 1 +Current database: test +Query OK, 1 row affected (1\&.30 sec) +mysql> \fBSELECT * FROM t;\fR ++\-\-\-\-\-\-+ +| a | ++\-\-\-\-\-\-+ +| NULL | ++\-\-\-\-\-\-+ +1 row in set (0\&.05 sec) +.fi +.if n \{\ +.RE +.\} +.PP +The +@a +user variable has been lost with the connection, and after the reconnection it is undefined\&. If it is important to have +\fBmysql\fR +terminate with an error if the connection has been lost, you can start the +\fBmysql\fR +client with the +\fB\-\-skip\-reconnect\fR +option\&. +.PP +For more information about auto\-reconnect and its effect on state information when a reconnection occurs, see +Section\ \&23.8.16, \(lqControlling Automatic Reconnection Behavior\(rq\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql.server.1 b/man/mysql.server.1 new file mode 100644 index 000000000000..5eb79a55f0a1 --- /dev/null +++ b/man/mysql.server.1 @@ -0,0 +1,186 @@ +'\" t +.\" Title: \fBmysql.server\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL\&.SERVER\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql.server +.SH "NAME" +mysql.server \- MySQL server startup script +.SH "SYNOPSIS" +.HP \w'\fBmysql\ {start|stop}\fR\ 'u +\fBmysql {start|stop}\fR +.SH "DESCRIPTION" +.PP +MySQL distributions on Unix include a script named +\fBmysql\&.server\fR\&. It can be used on systems such as Linux and Solaris that use System V\-style run directories to start and stop system services\&. It is also used by the Mac OS X Startup Item for MySQL\&. +.PP +\fBmysql\&.server\fR +can be found in the +support\-files +directory under your MySQL installation directory or in a MySQL source distribution\&. +.PP +If you use the Linux server RPM package (MySQL\-server\-\fIVERSION\fR\&.rpm), the +\fBmysql\&.server\fR +script will be installed in the +/etc/init\&.d +directory with the name +mysql\&. You need not install it manually\&. See +Section\ \&2.5.1, \(lqInstalling MySQL on Linux Using RPM Packages\(rq, for more information on the Linux RPM packages\&. +.PP +Some vendors provide RPM packages that install a startup script under a different name such as +\fBmysqld\fR\&. +.PP +If you install MySQL from a source distribution or using a binary distribution format that does not install +\fBmysql\&.server\fR +automatically, you can install it manually\&. Instructions are provided in +Section\ \&2.10.1.2, \(lqStarting and Stopping MySQL Automatically\(rq\&. +.PP +\fBmysql\&.server\fR +reads options from the +[mysql\&.server] +and +[mysqld] +sections of option files\&. For backward compatibility, it also reads +[mysql_server] +sections, although you should rename such sections to +[mysql\&.server] +when using MySQL 5\&.5\&. +.PP +\fBmysql\&.server\fR +supports the following options\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql.server: basedir option +.\" basedir option: mysql.server +\fB\-\-basedir=\fR\fB\fIpath\fR\fR +.sp +The path to the MySQL installation directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql.server: datadir option +.\" datadir option: mysql.server +\fB\-\-datadir=\fR\fB\fIpath\fR\fR +.sp +The path to the MySQL data directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql.server: pid-file option +.\" pid-file option: mysql.server +\fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR +.sp +The path name of the file in which the server should write its process ID\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql.server: service-startup-timeout option +.\" service-startup-timeout option: mysql.server +\fB\-\-service\-startup\-timeout=\fR\fB\fIseconds\fR\fR +.sp +How long in seconds to wait for confirmation of server startup\&. If the server does not start within this time, +\fBmysql\&.server\fR +exits with an error\&. The default value is 900\&. A value of 0 means not to wait at all for startup\&. Negative values mean to wait forever (no timeout)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql.server: use-mysqld_safe option +.\" use-mysqld_safe option: mysql.server +\fB\-\-use\-mysqld_safe\fR +.sp +Use +\fBmysqld_safe\fR +to start the server\&. This is the default\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql.server: user option +.\" user option: mysql.server +\fB\-\-user=\fR\fB\fIuser_name\fR\fR +.sp +The login user name to use for running +\fBmysqld\fR\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 new file mode 100644 index 000000000000..7106a5c45bd5 --- /dev/null +++ b/man/mysql_client_test.1 @@ -0,0 +1,351 @@ +'\" t +.\" Title: \fBmysql_client_test\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/05/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL +.\" Language: English +.\" +.TH "\FBMYSQL_CLIENT_TEST" "1" "01/05/2015" "MySQL" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_client_test +.\" mysql_client_test_embedded +.SH "NAME" +mysql_client_test \- test client API +.br +mysql_client_test_embedded \- test client API for embedded server +.SH "SYNOPSIS" +.HP \w'\fBmysql_client_test\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fItest_name\fR\fR\fB]\ \&.\&.\&.\fR\ 'u +\fBmysql_client_test [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR +.HP \w'\fBmysql_client_test_embedded\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fItest_name\fR\fR\fB]\ \&.\&.\&.\fR\ 'u +\fBmysql_client_test_embedded [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR +.SH "DESCRIPTION" +.PP +The +\fBmysql_client_test\fR +program is used for testing aspects of the MySQL client API that cannot be tested using +\fBmysqltest\fR +and its test language\&. +\fBmysql_client_test_embedded\fR +is similar but used for testing the embedded server\&. Both programs are run as part of the test suite\&. +.PP +The source code for the programs can be found in in +tests/mysql_client_test\&.c +in a source distribution\&. The program serves as a good source of examples illustrating how to use various features of the client API\&. +.PP +\fBmysql_client_test\fR +is used in a test by the same name in the main tests suite of +\fBmysql\-test\-run\&.pl\fR +but may also be run directly\&. Unlike the other programs listed here, it does not read an external description of what tests to run\&. Instead, all tests are coded into the program, which is written to cover all aspects of the C language API\&. +.PP +\fBmysql_client_test\fR +supports the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_client_test: help option +.\" help option: mysql_client_test +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR, +.\" mysql_client_test: basedir option +.\" basedir option: mysql_client_test +\fB\-b \fR\fB\fIdir_name\fR\fR +.sp +The base directory for the tests\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-count=\fR\fB\fIcount\fR\fR, +.\" mysql_client_test: count option +.\" count option: mysql_client_test +\fB\-t \fR\fB\fIcount\fR\fR +.sp +The number of times to execute the tests\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_client_test: database option +.\" database option: mysql_client_test +\fB\-\-database=\fR\fB\fIdb_name\fR\fR, +\fB\-D \fR\fB\fIdb_name\fR\fR +.sp +The database to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_client_test: debug option +.\" debug option: mysql_client_test +\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, +\fB\-#[\fR\fB\fIdebug_options\fR\fR\fB]\fR +.sp +Write a debugging log if MySQL is built with debugging support\&. The default +\fIdebug_options\fR +value is +\*(Aqd:t:o,/tmp/mysql_client_test\&.trace\*(Aq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-getopt\-ll\-test=\fR\fB\fIoption\fR\fR, +.\" mysql_client_test: getopt-ll-test option +.\" getopt-ll-test option: mysql_client_test +\fB\-g \fR\fB\fIoption\fR\fR +.sp +Option to use for testing bugs in the +getopt +library\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_client_test: host option +.\" host option: mysql_client_test +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +Connect to the MySQL server on the given host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_client_test: password option +.\" password option: mysql_client_test +\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you +\fIcannot\fR +have a space between the option and the password\&. If you omit the +\fIpassword\fR +value following the +.\" mysql_client_test: password option +.\" password option: mysql_client_test +\fB\-\-password\fR +or +\fB\-p\fR +option on the command line, you are prompted for one\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_client_test: port option +.\" port option: mysql_client_test +\fB\-\-port=\fR\fB\fIport_num\fR\fR, +\fB\-P \fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for the connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-server\-arg=\fR\fB\fIarg\fR\fR, +.\" mysql_client_test: server-arg option +.\" server-arg option: mysql_client_test +\fB\-A \fR\fB\fIarg\fR\fR +.sp +Argument to send to the embedded server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-show\-tests\fR, +\fB\-T\fR +.sp +Show all test names\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_client_test: silent option +.\" silent option: mysql_client_test +\fB\-\-silent\fR, +\fB\-s\fR +.sp +Be more silent\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_client_test: socket option +.\" socket option: mysql_client_test +\fB\-\-socket=\fR\fB\fIpath\fR\fR, +\fB\-S \fR\fB\fIpath\fR\fR +.sp +The socket file to use when connecting to +localhost +(which is the default host)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-testcase\fR, +\fB\-c\fR +.sp +The option is used when called from +\fBmysql\-test\-run\&.pl\fR, so that +\fBmysql_client_test\fR +may optionally behave in a different way than if called manually, for example by skipping some tests\&. Currently, there is no difference in behavior but the option is included to make this possible\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_client_test: user option +.\" user option: mysql_client_test +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-v \fR\fB\fIdir_name\fR\fR, +.\" mysql_client_test: vardir option +.\" vardir option: mysql_client_test +\fB\-\-vardir=\fR\fB\fIdir_name\fR\fR +.sp +The data directory for tests\&. The default is +mysql\-test/var\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 2006, 2014, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_client_test_embedded.1 b/man/mysql_client_test_embedded.1 new file mode 100644 index 000000000000..21d9d77b002b --- /dev/null +++ b/man/mysql_client_test_embedded.1 @@ -0,0 +1 @@ +.so man/mysql_client_test.1 diff --git a/man/mysql_config.1 b/man/mysql_config.1 new file mode 100644 index 000000000000..b16fcadd3a7f --- /dev/null +++ b/man/mysql_config.1 @@ -0,0 +1,247 @@ +'\" t +.\" Title: \fBmysql_config\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL_CONFIG\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_config +.SH "NAME" +mysql_config \- display options for compiling clients +.SH "SYNOPSIS" +.HP \w'\fBmysql_config\ \fR\fB\fIoptions\fR\fR\ 'u +\fBmysql_config \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBmysql_config\fR +provides you with useful information for compiling your MySQL client and connecting it to MySQL\&. It is a shell script, so it is available only on Unix and Unix\-like systems\&. +.PP +\fBmysql_config\fR +supports the following options\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_config: cflags option +.\" cflags option: mysql_config +\fB\-\-cflags\fR +.sp +Compiler flags to find include files and critical compiler flags and defines used when compiling the +libmysqlclient +library\&. The options returned are tied to the specific compiler that was used when the library was created and might clash with the settings for your own compiler\&. Use +\fB\-\-include\fR +for more portable options that contain only include paths\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_config: include option +.\" include option: mysql_config +\fB\-\-include\fR +.sp +Compiler options to find MySQL include files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_config: libmysqld-libs option +.\" libmysqld-libs option: mysql_config +.\" mysql_config: embedded option +.\" embedded option: mysql_config +\fB\-\-libmysqld\-libs\fR, +\fB\-\-embedded\fR +.sp +Libraries and options required to link with the MySQL embedded server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_config: libs option +.\" libs option: mysql_config +\fB\-\-libs\fR +.sp +Libraries and options required to link with the MySQL client library\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_config: libs_r option +.\" libs_r option: mysql_config +\fB\-\-libs_r\fR +.sp +Libraries and options required to link with the thread\-safe MySQL client library\&. In MySQL 5\&.5, all client libraries are thread\-safe, so this option need not be used\&. The +\fB\-\-libs\fR +option can be used in all cases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_config: plugindir option +.\" plugindir option: mysql_config +\fB\-\-plugindir\fR +.sp +The default plugin directory path name, defined when configuring MySQL\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_config: port option +.\" port option: mysql_config +\fB\-\-port\fR +.sp +The default TCP/IP port number, defined when configuring MySQL\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_config: socket option +.\" socket option: mysql_config +\fB\-\-socket\fR +.sp +The default Unix socket file, defined when configuring MySQL\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_config: version option +.\" version option: mysql_config +\fB\-\-version\fR +.sp +Version number for the MySQL distribution\&. +.RE +.PP +If you invoke +\fBmysql_config\fR +with no options, it displays a list of all options that it supports, and their values: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_config\fR +Usage: /usr/local/mysql/bin/mysql_config [options] +Options: + \-\-cflags [\-I/usr/local/mysql/include/mysql \-mcpu=pentiumpro] + \-\-include [\-I/usr/local/mysql/include/mysql] + \-\-libs [\-L/usr/local/mysql/lib/mysql \-lmysqlclient + \-lpthread \-lm \-lrt \-lssl \-lcrypto \-ldl] + \-\-libs_r [\-L/usr/local/mysql/lib/mysql \-lmysqlclient_r + \-lpthread \-lm \-lrt \-lssl \-lcrypto \-ldl] + \-\-socket [/tmp/mysql\&.sock] + \-\-port [3306] + \-\-version [5\&.5\&.31] + \-\-libmysqld\-libs [\-L/usr/local/mysql/lib/mysql \-lmysqld + \-lpthread \-lm \-lrt \-lssl \-lcrypto \-ldl \-lcrypt] +.fi +.if n \{\ +.RE +.\} +.PP +You can use +\fBmysql_config\fR +within a command line using backticks to include the output that it produces for a particular option\&. For example, to compile and link a MySQL client program, use +\fBmysql_config\fR +as follows: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBgcc \-c `mysql_config \-\-cflags` progname\&.c\fR +shell> \fBgcc \-o progname progname\&.o `mysql_config \-\-libs`\fR +.fi +.if n \{\ +.RE +.\} +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 new file mode 100644 index 000000000000..7f92da31958a --- /dev/null +++ b/man/mysql_convert_table_format.1 @@ -0,0 +1,241 @@ +'\" t +.\" Title: \fBmysql_convert_table_format\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL_CONVERT_TAB" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_convert_table_format +.SH "NAME" +mysql_convert_table_format \- convert tables to use a given storage engine +.SH "SYNOPSIS" +.HP \w'\fBmysql_convert_table_format\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\ 'u +\fBmysql_convert_table_format [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR +.SH "DESCRIPTION" +.PP +\fBmysql_convert_table_format\fR +converts the tables in a database to use a particular storage engine (MyISAM +by default)\&. +\fBmysql_convert_table_format\fR +is written in Perl and requires that the +DBI +and +DBD::mysql +Perl modules be installed (see +Section\ \&2.13, \(lqPerl Installation Notes\(rq)\&. +.PP +Invoke +\fBmysql_convert_table_format\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_convert_table_format [\fR\fB\fIoptions\fR\fR\fB]\fR\fB\fIdb_name\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +The +\fIdb_name\fR +argument indicates the database containing the tables to be converted\&. +.PP +\fBmysql_convert_table_format\fR +supports the options described in the following list\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_convert_table_format: help option +.\" help option: mysql_convert_table_format +\fB\-\-help\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_convert_table_format: force option +.\" force option: mysql_convert_table_format +\fB\-\-force\fR +.sp +Continue even if errors occur\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_convert_table_format: host option +.\" host option: mysql_convert_table_format +\fB\-\-host=\fR\fB\fIhost_name\fR\fR +.sp +Connect to the MySQL server on the given host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_convert_table_format: password option +.\" password option: mysql_convert_table_format +\fB\-\-password=\fR\fB\fIpassword\fR\fR +.sp +The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_convert_table_format: port option +.\" port option: mysql_convert_table_format +\fB\-\-port=\fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for the connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_convert_table_format: socket option +.\" socket option: mysql_convert_table_format +\fB\-\-socket=\fR\fB\fIpath\fR\fR +.sp +For connections to +localhost, the Unix socket file to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_convert_table_format: type option +.\" type option: mysql_convert_table_format +\fB\-\-type=\fR\fB\fIengine_name\fR\fR +.sp +Specify the storage engine that the tables should be converted to use\&. The default is +MyISAM +if this option is not given\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_convert_table_format: user option +.\" user option: mysql_convert_table_format +\fB\-\-user=\fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_convert_table_format: verbose option +.\" verbose option: mysql_convert_table_format +\fB\-\-verbose\fR +.sp +Verbose mode\&. Print more information about what the program does\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_convert_table_format: version option +.\" version option: mysql_convert_table_format +\fB\-\-version\fR +.sp +Display version information and exit\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 new file mode 100644 index 000000000000..e29601958221 --- /dev/null +++ b/man/mysql_find_rows.1 @@ -0,0 +1,176 @@ +'\" t +.\" Title: \fBmysql_find_rows\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_find_rows +.SH "NAME" +mysql_find_rows \- extract SQL statements from files +.SH "SYNOPSIS" +.HP \w'\fBmysql_find_rows\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIfile_name\fR\fR\fB\ \&.\&.\&.]\fR\ 'u +\fBmysql_find_rows [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIfile_name\fR\fR\fB \&.\&.\&.]\fR +.SH "DESCRIPTION" +.PP +\fBmysql_find_rows\fR +reads files containing SQL statements and extracts statements that match a given regular expression or that contain +USE \fIdb_name\fR +or +SET +statements\&. The utility expects statements to be terminated with semicolon (;) characters\&. +.PP +Invoke +\fBmysql_find_rows\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_find_rows [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIfile_name\fR\fR\fB \&.\&.\&.]\fR +.fi +.if n \{\ +.RE +.\} +.PP +Each +\fIfile_name\fR +argument should be the name of file containing SQL statements\&. If no file names are given, +\fBmysql_find_rows\fR +reads the standard input\&. +.PP +Examples: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql_find_rows \-\-regexp=problem_table \-\-rows=20 < update\&.log +mysql_find_rows \-\-regexp=problem_table update\-log\&.1 update\-log\&.2 +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysql_find_rows\fR +supports the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_find_rows: help option +.\" help option: mysql_find_rows +\fB\-\-help\fR, +\fB\-\-Information\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_find_rows: regexp option +.\" regexp option: mysql_find_rows +\fB\-\-regexp=\fR\fB\fIpattern\fR\fR +.sp +Display queries that match the pattern\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_find_rows: rows option +.\" rows option: mysql_find_rows +\fB\-\-rows=\fR\fB\fIN\fR\fR +.sp +Quit after displaying +\fIN\fR +queries\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_find_rows: skip-use-db option +.\" skip-use-db option: mysql_find_rows +\fB\-\-skip\-use\-db\fR +.sp +Do not include +USE \fIdb_name\fR +statements in the output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_find_rows: start_row option +.\" start_row option: mysql_find_rows +\fB\-\-start_row=\fR\fB\fIN\fR\fR +.sp +Start output from this row\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 new file mode 100644 index 000000000000..33a9ba3daab2 --- /dev/null +++ b/man/mysql_fix_extensions.1 @@ -0,0 +1,86 @@ +'\" t +.\" Title: \fBmysql_fix_extensions\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_fix_extensions +.SH "NAME" +mysql_fix_extensions \- normalize table file name extensions +.SH "SYNOPSIS" +.HP \w'\fBmysql_fix_extensions\ \fR\fB\fIdata_dir\fR\fR\ 'u +\fBmysql_fix_extensions \fR\fB\fIdata_dir\fR\fR +.SH "DESCRIPTION" +.PP +\fBmysql_fix_extensions\fR +converts the extensions for +MyISAM +(or +ISAM) table files to their canonical forms\&. It looks for files with extensions matching any lettercase variant of +\&.frm, +\&.myd, +\&.myi, +\&.isd, and +\&.ism +and renames them to have extensions of +\&.frm, +\&.MYD, +\&.MYI, +\&.ISD, and +\&.ISM, respectively\&. This can be useful after transferring the files from a system with case\-insensitive file names (such as Windows) to a system with case\-sensitive file names\&. +.PP +Invoke +\fBmysql_fix_extensions\fR +like this, where +\fIdata_dir\fR +is the path name to the MySQL data directory\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_fix_extensions \fR\fB\fIdata_dir\fR\fR +.fi +.if n \{\ +.RE +.\} +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 new file mode 100644 index 000000000000..131843e33aa5 --- /dev/null +++ b/man/mysql_install_db.1 @@ -0,0 +1,397 @@ +'\" t +.\" Title: \fBmysql_install_db\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL_INSTALL_DB\" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_install_db +.SH "NAME" +mysql_install_db \- initialize MySQL data directory +.SH "SYNOPSIS" +.HP \w'\fBmysql_install_db\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBmysql_install_db [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBmysql_install_db\fR +initializes the MySQL data directory and creates the system tables that it contains, if they do not exist\&. +\fBmysql_install_db\fR +is a shell script and is available only on Unix platforms\&. (As of MySQL 5\&.6, +\fBmysql_install_db\fR +is a Perl script and can be used on any system with Perl installed\&.) +.PP +To invoke +\fBmysql_install_db\fR, use the following syntax: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_install_db [\fR\fB\fIoptions\fR\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.PP +Because the MySQL server, +\fBmysqld\fR, must access the data directory when it runs later, you should either run +\fBmysql_install_db\fR +from the same system account that will be used for running +\fBmysqld\fR, or run it as +root +and specify the +\fB\-\-user\fR +option to indicate the user name that +\fBmysqld\fR +will run as\&. It might be necessary to specify other options such as +\fB\-\-basedir\fR +or +\fB\-\-datadir\fR +if +\fBmysql_install_db\fR +does not use the correct locations for the installation directory or data directory\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBscripts/mysql_install_db \-\-user=mysql \e\fR + \fB\-\-basedir=/opt/mysql/mysql \e\fR + \fB\-\-datadir=/opt/mysql/mysql/data\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +If you have set a custom +TMPDIR +environment variable when performing the installation, and the specified directory is not accessible, +\fBmysql_install_db\fR +may fail\&. If so, unset +TMPDIR +or set +TMPDIR +to point to the system temporary directory (usually +/tmp)\&. +.sp .5v +.RE +.PP +\fBmysql_install_db\fR +supports the following options, which can be specified on the command line or in the +[mysql_install_db] +group of an option file\&. (Options that are common to +\fBmysqld\fR +can also be specified in the +[mysqld] +group\&.) Other options are passed to +\fBmysqld\fR\&. For information about option files used by MySQL programs, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: help option +.\" help option: mysql_install_db +\fB\-\-help\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: basedir option +.\" basedir option: mysql_install_db +\fB\-\-basedir=\fR\fB\fIpath\fR\fR +.sp +The path to the MySQL installation directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: builddir option +.\" builddir option: mysql_install_db +\fB\-\-builddir=\fR\fB\fIpath\fR\fR +.sp +For use with +\fB\-\-srcdir\fR +and out\-of\-source builds\&. Set this to the location of the directory where the built files reside\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: cross-bootstrap option +.\" cross-bootstrap option: mysql_install_db +\fB\-\-cross\-bootstrap\fR +.sp +For internal use\&. This option is used for building system tables on one host intended for another\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: datadir option +.\" datadir option: mysql_install_db +\fB\-\-datadir=\fR\fB\fIpath\fR\fR +.sp +The path to the MySQL data directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" defaults-extra-file option +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +.sp +Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. +\fIfile_name\fR +is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" defaults-file option +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. +\fIfile_name\fR +is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: force option +.\" force option: mysql_install_db +\fB\-\-force\fR +.sp +Cause +\fBmysql_install_db\fR +to run even if DNS does not work\&. Grant table entries normally created using host names will use IP addresses instead\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: ldata option +.\" ldata option: mysql_install_db +\fB\-\-ldata=\fR\fB\fIpath\fR\fR +.sp +A synonym for +\fB\-\-datadir\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" no-defaults option +\fB\-\-no\-defaults\fR +.sp +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: rpm option +.\" rpm option: mysql_install_db +\fB\-\-rpm\fR +.sp +For internal use\&. This option is used during the MySQL installation process for install operations performed using RPM packages\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: skip-name-resolve option +.\" skip-name-resolve option: mysql_install_db +\fB\-\-skip\-name\-resolve\fR +.sp +Use IP addresses rather than host names when creating grant table entries\&. This option can be useful if your DNS does not work\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: srcdir option +.\" srcdir option: mysql_install_db +\fB\-\-srcdir=\fR\fB\fIpath\fR\fR +.sp +For internal use\&. This option specifies the directory under which +\fBmysql_install_db\fR +looks for support files such as the error message file and the file for populating the help tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: user option +.\" user option: mysql_install_db +\fB\-\-user=\fR\fB\fIuser_name\fR\fR +.sp +The system (login) user name to use for running +\fBmysqld\fR\&. Files and directories created by +\fBmysqld\fR +will be owned by this user\&. You must be the system +root +user to use this option\&. By default, +\fBmysqld\fR +runs using your current login name and files and directories that it creates will be owned by you\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: verbose option +.\" verbose option: mysql_install_db +\fB\-\-verbose\fR +.sp +Verbose mode\&. Print more information about what the program does\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_install_db: windows option +.\" windows option: mysql_install_db +\fB\-\-windows\fR +.sp +For internal use\&. This option is used for creating Windows distributions\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 new file mode 100644 index 000000000000..0be2e13f4245 --- /dev/null +++ b/man/mysql_plugin.1 @@ -0,0 +1,386 @@ +'\" t +.\" Title: \fBmysql_plugin\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL_PLUGIN\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_plugin +.SH "NAME" +mysql_plugin \- configure MySQL server plugins +.SH "SYNOPSIS" +.HP \w'\fBmysql_plugin\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIplugin\fR\fR\fB\ {ENABLE|DISABLE}\fR\ 'u +\fBmysql_plugin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIplugin\fR\fR\fB {ENABLE|DISABLE}\fR +.SH "DESCRIPTION" +.PP +The +\fBmysql_plugin\fR +utility enables MySQL administrators to manage which plugins a MySQL server loads\&. It provides an alternative to manually specifying the +\fB\-\-plugin\-load\fR +option at server startup or using the +INSTALL PLUGIN +and +UNINSTALL PLUGIN +statements at runtime\&. +\fBmysql_plugin\fR +is available as of MySQL 5\&.5\&.16\&. +.PP +Depending on whether +\fBmysql_plugin\fR +is invoked to enable or disable plugins, it inserts or deletes rows in the +mysql\&.plugin +table that serves as a plugin registry\&. (To perform this operation, +\fBmysql_plugin\fR +invokes the MySQL server in bootstrap mode\&. This means that the server must not already be running\&.) For normal server startups, the server loads and enables plugins listed in +mysql\&.plugin +automatically\&. For additional control over plugin activation, use +\fB\-\-\fR\fB\fIplugin_name\fR\fR +options named for specific plugins, as described in +Section\ \&5.1.8.1, \(lqInstalling and Uninstalling Plugins\(rq\&. +.PP +Each invocation of +\fBmysql_plugin\fR +reads a configuration file to determine how to configure the plugins contained in a single plugin library object file\&. To invoke +\fBmysql_plugin\fR, use this syntax: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql_plugin [\fIoptions\fR] \fIplugin\fR {ENABLE|DISABLE} +.fi +.if n \{\ +.RE +.\} +.PP +\fIplugin\fR +is the name of the plugin to configure\&. +ENABLE +or +DISABLE +(not case sensitive) specify whether to enable or disable components of the plugin library named in the configuration file\&. The order of the +\fIplugin\fR +and +ENABLE +or +DISABLE +arguments does not matter\&. +.PP +For example, to configure components of a plugin library file named +myplugins\&.so +on Linux or +myplugins\&.dll +on Windows, specify a +\fIplugin\fR +value of +myplugins\&. Suppose that this plugin library contains three plugins, +plugin1, +plugin2, and +plugin3, all of which should be configured under +\fBmysql_plugin\fR +control\&. By convention, configuration files have a suffix of +\&.ini +and the same basename as the plugin library, so the default configuration file name for this plugin library is +myplugins\&.ini\&. The configuration file contents look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +myplugins +plugin1 +plugin2 +plugin3 +.fi +.if n \{\ +.RE +.\} +.PP +The first line in the +myplugins\&.ini +file is the name of the library object file, without any extension such as +\&.so +or +\&.dll\&. The remaining lines are the names of the components to be enabled or disabled\&. Each value in the file should be on a separate line\&. Lines on which the first character is +\*(Aq#\*(Aq +are taken as comments and ignored\&. +.PP +To enable the plugins listed in the configuration file, invoke +\fBmysql_plugin\fR +this way: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_plugin myplugins ENABLE\fR +.fi +.if n \{\ +.RE +.\} +.PP +To disable the plugins, use +DISABLE +rather than +ENABLE\&. +.PP +An error occurs if +\fBmysql_plugin\fR +cannot find the configuration file or plugin library file, or if +\fBmysql_plugin\fR +cannot start the MySQL server\&. +.PP +\fBmysql_plugin\fR +supports the following options, which can be specified on the command line or in the +[mysqld] +group of any option file\&. For options specified in a +[mysqld] +group, +\fBmysql_plugin\fR +recognizes the +\fB\-\-basedir\fR, +\fB\-\-datadir\fR, and +\fB\-\-plugin\-dir\fR +options and ignores others\&. For information about option files used by MySQL programs, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_plugin: help option +.\" help option: mysql_plugin +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_plugin: basedir option +.\" basedir option: mysql_plugin +\fB\-\-basedir=\fR\fB\fIpath\fR\fR, +\fB\-b \fR\fB\fIpath\fR\fR +.sp +The server base directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_plugin: datadir option +.\" datadir option: mysql_plugin +\fB\-\-datadir=\fR\fB\fIpath\fR\fR, +\fB\-d \fR\fB\fIpath\fR\fR +.sp +The server data directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_plugin: my-print-defaults option +.\" my-print-defaults option: mysql_plugin +\fB\-\-my\-print\-defaults=\fR\fB\fIpath\fR\fR, +\fB\-b \fR\fB\fIpath\fR\fR +.sp +The path to the +\fBmy_print_defaults\fR +program\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_plugin: mysqld option +.\" mysqld option: mysql_plugin +\fB\-\-mysqld=\fR\fB\fIpath\fR\fR, +\fB\-b \fR\fB\fIpath\fR\fR +.sp +The path to the +\fBmysqld\fR +server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_plugin: no-defaults option +.\" no-defaults option: mysql_plugin +\fB\-\-no\-defaults\fR, +\fB\-p\fR +.sp +Do not read values from the configuration file\&. This option enables an administrator to skip reading defaults from the configuration file\&. +.sp +With +\fBmysql_plugin\fR, this option need not be given first on the command line, unlike most other MySQL programs that support +\fB\-\-no\-defaults\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_plugin: plugin-dir option +.\" plugin-dir option: mysql_plugin +\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR, +\fB\-p \fR\fB\fIpath\fR\fR +.sp +The server plugin directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_plugin: plugin-ini option +.\" plugin-ini option: mysql_plugin +\fB\-\-plugin\-ini=\fR\fB\fIfile_name\fR\fR, +\fB\-i \fR\fB\fIfile_name\fR\fR +.sp +The +\fBmysql_plugin\fR +configuration file\&. Relative path names are interpreted relative to the current directory\&. If this option is not given, the default is +\fIplugin\fR\&.ini +in the plugin directory, where +\fIplugin\fR +is the +\fIplugin\fR +argument on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_plugin: print-defaults option +.\" print-defaults option: mysql_plugin +\fB\-\-print\-defaults\fR, +\fB\-P\fR +.sp +Display the default values from the configuration file\&. This option causes +\fBmysql_plugin\fR +to print the defaults for +\fB\-\-basedir\fR, +\fB\-\-datadir\fR, and +\fB\-\-plugin\-dir\fR +if they are found in the configuration file\&. If no value for a variable is found, nothing is shown\&. +.sp +With +\fBmysql_plugin\fR, this option need not be given first on the command line, unlike most other MySQL programs that support +\fB\-\-print\-defaults\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_plugin: verbose option +.\" verbose option: mysql_plugin +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print more information about what the program does\&. This option can be used multiple times to increase the amount of information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_plugin: version option +.\" version option: mysql_plugin +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 new file mode 100644 index 000000000000..b60c01ad2ff5 --- /dev/null +++ b/man/mysql_secure_installation.1 @@ -0,0 +1,126 @@ +'\" t +.\" Title: \fBmysql_secure_installation\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL_SECURE_INST" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_secure_installation +.SH "NAME" +mysql_secure_installation \- improve MySQL installation security +.SH "SYNOPSIS" +.HP \w'\fBmysql_secure_installation\fR\ 'u +\fBmysql_secure_installation\fR +.SH "DESCRIPTION" +.PP +This program enables you to improve the security of your MySQL installation in the following ways: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +You can set a password for +root +accounts\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +You can remove +root +accounts that are accessible from outside the local host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +You can remove anonymous\-user accounts\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +You can remove the +test +database (which by default can be accessed by all users, even anonymous users), and privileges that permit anyone to access databases with names that start with +test_\&. +.RE +.PP +\fBmysql_secure_installation\fR +helps you implement security recommendations similar to those described at +Section\ \&2.10.2, \(lqSecuring the Initial MySQL Accounts\(rq\&. +.PP +Invoke +\fBmysql_secure_installation\fR +without arguments: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_secure_installation\fR +.fi +.if n \{\ +.RE +.\} +.PP +When executed, the script prompts you to determine which actions to perform\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 new file mode 100644 index 000000000000..b85602beca94 --- /dev/null +++ b/man/mysql_setpermission.1 @@ -0,0 +1,188 @@ +'\" t +.\" Title: \fBmysql_setpermission\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL_SETPERMISSI" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_setpermission +.SH "NAME" +mysql_setpermission \- interactively set permissions in grant tables +.SH "SYNOPSIS" +.HP \w'\fBmysql_setpermission\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBmysql_setpermission [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBmysql_setpermission\fR +is a Perl script that was originally written and contributed by Luuk de Boer\&. It interactively sets permissions in the MySQL grant tables\&. +\fBmysql_setpermission\fR +is written in Perl and requires that the +DBI +and +DBD::mysql +Perl modules be installed (see +Section\ \&2.13, \(lqPerl Installation Notes\(rq)\&. +.PP +Invoke +\fBmysql_setpermission\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_setpermission [\fR\fB\fIoptions\fR\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fIoptions\fR +should be either +\fB\-\-help\fR +to display the help message, or options that indicate how to connect to the MySQL server\&. The account used when you connect determines which permissions you have when attempting to modify existing permissions in the grant tables\&. +.PP +\fBmysql_setpermissions\fR +also reads options from the +[client] +and +[perl] +groups in the +\&.my\&.cnf +file in your home directory, if the file exists\&. +.PP +\fBmysql_setpermission\fR +supports the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_setpermission: help option +.\" help option: mysql_setpermission +\fB\-\-help\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_setpermission: host option +.\" host option: mysql_setpermission +\fB\-\-host=\fR\fB\fIhost_name\fR\fR +.sp +Connect to the MySQL server on the given host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_setpermission: password option +.\" password option: mysql_setpermission +\fB\-\-password=\fR\fB\fIpassword\fR\fR +.sp +The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_setpermission: port option +.\" port option: mysql_setpermission +\fB\-\-port=\fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for the connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_setpermission: socket option +.\" socket option: mysql_setpermission +\fB\-\-socket=\fR\fB\fIpath\fR\fR +.sp +For connections to +localhost, the Unix socket file to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_setpermission: user option +.\" user option: mysql_setpermission +\fB\-\-user=\fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 new file mode 100644 index 000000000000..5519a22988d3 --- /dev/null +++ b/man/mysql_tzinfo_to_sql.1 @@ -0,0 +1,138 @@ +'\" t +.\" Title: \fBmysql_tzinfo_to_sql\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_tzinfo_to_sql +.\" time zone tables +.SH "NAME" +mysql_tzinfo_to_sql \- load the time zone tables +.SH "SYNOPSIS" +.HP \w'\fBmysql_tzinfo_to_sql\ \fR\fB\fIarguments\fR\fR\ 'u +\fBmysql_tzinfo_to_sql \fR\fB\fIarguments\fR\fR +.SH "DESCRIPTION" +.PP +The +\fBmysql_tzinfo_to_sql\fR +program loads the time zone tables in the +mysql +database\&. It is used on systems that have a +zoneinfo +database (the set of files describing time zones)\&. Examples of such systems are Linux, FreeBSD, Solaris, and Mac OS X\&. One likely location for these files is the +/usr/share/zoneinfo +directory (/usr/share/lib/zoneinfo +on Solaris)\&. If your system does not have a zoneinfo database, you can use the downloadable package described in +Section\ \&10.6, \(lqMySQL Server Time Zone Support\(rq\&. +.PP +\fBmysql_tzinfo_to_sql\fR +can be invoked several ways: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_tzinfo_to_sql \fR\fB\fItz_dir\fR\fR +shell> \fBmysql_tzinfo_to_sql \fR\fB\fItz_file tz_name\fR\fR +shell> \fBmysql_tzinfo_to_sql \-\-leap \fR\fB\fItz_file\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +For the first invocation syntax, pass the zoneinfo directory path name to +\fBmysql_tzinfo_to_sql\fR +and send the output into the +\fBmysql\fR +program\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_tzinfo_to_sql /usr/share/zoneinfo | mysql \-u root mysql\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysql_tzinfo_to_sql\fR +reads your system\*(Aqs time zone files and generates SQL statements from them\&. +\fBmysql\fR +processes those statements to load the time zone tables\&. +.PP +The second syntax causes +\fBmysql_tzinfo_to_sql\fR +to load a single time zone file +\fItz_file\fR +that corresponds to a time zone name +\fItz_name\fR: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_tzinfo_to_sql \fR\fB\fItz_file\fR\fR\fB \fR\fB\fItz_name\fR\fR\fB | mysql \-u root mysql\fR +.fi +.if n \{\ +.RE +.\} +.PP +If your time zone needs to account for leap seconds, invoke +\fBmysql_tzinfo_to_sql\fR +using the third syntax, which initializes the leap second information\&. +\fItz_file\fR +is the name of your time zone file: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_tzinfo_to_sql \-\-leap \fR\fB\fItz_file\fR\fR\fB | mysql \-u root mysql\fR +.fi +.if n \{\ +.RE +.\} +.PP +After running +\fBmysql_tzinfo_to_sql\fR, it is best to restart the server so that it does not continue to use any previously cached time zone data\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 new file mode 100644 index 000000000000..1285738caf52 --- /dev/null +++ b/man/mysql_upgrade.1 @@ -0,0 +1,824 @@ +'\" t +.\" Title: \fBmysql_upgrade\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL_UPGRADE\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_upgrade +.\" upgrading MySQL +.\" MySQL: upgrading +.SH "NAME" +mysql_upgrade \- check and upgrade MySQL tables +.SH "SYNOPSIS" +.HP \w'\fBmysql_upgrade\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBmysql_upgrade [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBmysql_upgrade\fR +examines all tables in all databases for incompatibilities with the current version of MySQL Server\&. +\fBmysql_upgrade\fR +also upgrades the system tables so that you can take advantage of new privileges or capabilities that might have been added\&. +.PP +If +\fBmysql_upgrade\fR +finds that a table has a possible incompatibility, it performs a table check and, if problems are found, attempts a table repair\&. If the table cannot be repaired, see +Section\ \&2.11.4, \(lqRebuilding or Repairing Tables or Indexes\(rq +for manual table repair strategies\&. +.PP +You should execute +\fBmysql_upgrade\fR +each time you upgrade MySQL\&. +.PP +If you install MySQL from RPM packages on Linux, you must install the server and client RPMs\&. +\fBmysql_upgrade\fR +is included in the server RPM but requires the client RPM because the latter includes +\fBmysqlcheck\fR\&. (See +Section\ \&2.5.1, \(lqInstalling MySQL on Linux Using RPM Packages\(rq\&.) +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +On Windows Server 2008, Vista, and newer, you must run +\fBmysql_upgrade\fR +with administrator privileges\&. You can do this by running a Command Prompt as Administrator and running the command\&. Failure to do so may result in the upgrade failing to execute correctly\&. +.sp .5v +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBCaution\fR +.ps -1 +.br +.PP +You should always back up your current MySQL installation +\fIbefore\fR +performing an upgrade\&. See +Section\ \&7.2, \(lqDatabase Backup Methods\(rq\&. +.PP +Some upgrade incompatibilities may require special handling before you upgrade your MySQL installation and run +\fBmysql_upgrade\fR\&. See +Section\ \&2.11.1, \(lqUpgrading MySQL\(rq, for instructions on determining whether any such incompatibilities apply to your installation and how to handle them\&. +.sp .5v +.RE +.PP +To use +\fBmysql_upgrade\fR, make sure that the server is running\&. Then invoke it like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_upgrade [\fR\fB\fIoptions\fR\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.PP +After running +\fBmysql_upgrade\fR, stop the server and restart it so that any changes made to the system tables take effect\&. +.PP +If you have multiple MySQL server instances running, invoke +\fBmysql_upgrade\fR +with connection parameters appropriate for connecting to the desired server\&. For example, with servers running on the local host on parts 3306 through 3308, upgrade each of them by connecting to the appropriate port: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_upgrade \-\-protocol=tcp \-P 3306 [\fR\fB\fIother_options\fR\fR\fB]\fR +shell> \fBmysql_upgrade \-\-protocol=tcp \-P 3307 [\fR\fB\fIother_options\fR\fR\fB]\fR +shell> \fBmysql_upgrade \-\-protocol=tcp \-P 3308 [\fR\fB\fIother_options\fR\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.PP +For local host connections on Unix, the +\fB\-\-protocol=tcp\fR +option forces a connection using TCP/IP rather than the Unix socket file\&. +.PP +\fBmysql_upgrade\fR +executes the following commands to check and repair tables and to upgrade the system tables: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysqlcheck \-\-no\-defaults \-\-all\-databases + \-\-fix\-db\-names \-\-fix\-table\-names +mysqlcheck \-\-no\-defaults \-\-check\-upgrade \-\-all\-databases + \-\-auto\-repair +mysql < fix_priv_tables +.fi +.if n \{\ +.RE +.\} +.PP +Notes about the preceding commands: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBmysql_upgrade\fR +also adds +\fB\-\-write\-binlog\fR +or +\fB\-\-skip\-write\-binlog\fR +to the +\fBmysqlcheck\fR +commands, depending on whether the +\fB\-\-write\-binlog\fR +option was specified on the +\fBmysql_upgrade\fR +command\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Because +\fBmysql_upgrade\fR +invokes +\fBmysqlcheck\fR +with the +\fB\-\-all\-databases\fR +option, it processes all tables in all databases, which might take a long time to complete\&. Each table is locked and therefore unavailable to other sessions while it is being processed\&. Check and repair operations can be time\-consuming, particularly for large tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +For details about what checks the +\fB\-\-check\-upgrade\fR +option entails, see the description of the +FOR UPGRADE +option of the +CHECK TABLE +statement (see +Section\ \&13.7.2.2, \(lqCHECK TABLE Syntax\(rq)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fIfix_priv_tables\fR +represents a script generated internally by +\fBmysql_upgrade\fR +that contains SQL statements to upgrade the tables in the +mysql +database\&. +.RE +.PP +All checked and repaired tables are marked with the current MySQL version number\&. This ensures that next time you run +\fBmysql_upgrade\fR +with the same version of the server, it can tell whether there is any need to check or repair the table again\&. +.\" mysql_upgrade_info file: mysql_upgrade +.\" mysql_upgrade: mysql_upgrade_info file +.PP +\fBmysql_upgrade\fR +also saves the MySQL version number in a file named +mysql_upgrade_info +in the data directory\&. This is used to quickly check whether all tables have been checked for this release so that table\-checking can be skipped\&. To ignore this file and perform the check regardless, use the +\fB\-\-force\fR +option\&. +.PP +\fBmysql_upgrade\fR +does not upgrade the contents of the help tables\&. For upgrade instructions, see +Section\ \&5.1.10, \(lqServer-Side Help\(rq\&. +.PP +\fBmysql_upgrade\fR +supports the following options, which can be specified on the command line or in the +[mysql_upgrade] +and +[client] +groups of an option file\&. Unrecognized options are passed to +\fBmysqlcheck\fR\&. For information about option files, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: help option +.\" help option: mysql_upgrade +\fB\-\-help\fR +.sp +Display a short help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: basedir option +.\" basedir option: mysql_upgrade +\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR +.sp +The path to the MySQL installation directory\&. This option is accepted for backward compatibility but ignored\&. It is removed in MySQL 5\&.7\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: character-sets-dir option +.\" character-sets-dir option: mysql_upgrade +\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory where character sets are installed\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: compress option +.\" compress option: mysql_upgrade +\fB\-\-compress\fR +.sp +Compress all information sent between the client and the server if both support compression\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: datadir option +.\" datadir option: mysql_upgrade +\fB\-\-datadir=\fR\fB\fIdir_name\fR\fR +.sp +The path to the data directory\&. This option is accepted for backward compatibility but ignored\&. It is removed in MySQL 5\&.7\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: debug option +.\" debug option: mysql_upgrade +\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, +\fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:o,\fIfile_name\fR\&. The default is +d:t:O,/tmp/mysql_upgrade\&.trace\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: debug-check option +.\" debug-check option: mysql_upgrade +\fB\-\-debug\-check\fR +.sp +Print some debugging information when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: debug-info option +.\" debug-info option: mysql_upgrade +\fB\-\-debug\-info\fR, +\fB\-T\fR +.sp +Print debugging information and memory and CPU usage statistics when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: default-auth option +.\" default-auth option: mysql_upgrade +\fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR +.sp +The client\-side authentication plugin to use\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: default-character-set option +.\" default-character-set option: mysql_upgrade +\fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR +.sp +Use +\fIcharset_name\fR +as the default character set\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: defaults-extra-file option +.\" defaults-extra-file option: mysql_upgrade +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +.sp +Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: defaults-file option +.\" defaults-file option: mysql_upgrade +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: defaults-group-suffix option +.\" defaults-group-suffix option: mysql_upgrade +\fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR +.sp +Read not only the usual option groups, but also groups with the usual names and a suffix of +\fIstr\fR\&. For example, +\fBmysql_upgrade\fR +normally reads the +[client] +and +[mysql_upgrade] +groups\&. If the +\fB\-\-defaults\-group\-suffix=_other\fR +option is given, +\fBmysql_upgrade\fR +also reads the +[client_other] +and +[mysql_upgrade_other] +groups\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: force option +.\" force option: mysql_upgrade +\fB\-\-force\fR +.sp +Ignore the +mysql_upgrade_info +file and force execution even if +\fBmysql_upgrade\fR +has already been executed for the current version of MySQL\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: host option +.\" host option: mysql_upgrade +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +Connect to the MySQL server on the given host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: no-defaults option +.\" no-defaults option: mysql_upgrade +\fB\-\-no\-defaults\fR +.sp +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: password option +.\" password option: mysql_upgrade +\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you +\fIcannot\fR +have a space between the option and the password\&. If you omit the +\fIpassword\fR +value following the +\fB\-\-password\fR +or +\fB\-p\fR +option on the command line, +\fBmysql_upgrade\fR +prompts for one\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: pipe option +.\" pipe option: mysql_upgrade +\fB\-\-pipe\fR, +\fB\-W\fR +.sp +On Windows, connect to the server using a named pipe\&. This option applies only if the server supports named\-pipe connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: plugin-dir option +.\" plugin-dir option: mysql_upgrade +\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory in which to look for plugins\&. It may be necessary to specify this option if the +\fB\-\-default\-auth\fR +option is used to specify an authentication plugin but +\fBmysql_upgrade\fR +does not find it\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: port option +.\" port option: mysql_upgrade +\fB\-\-port=\fR\fB\fIport_num\fR\fR, +\fB\-P \fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for the connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: print-defaults option +.\" print-defaults option: mysql_upgrade +\fB\-\-print\-defaults\fR +.sp +Print the program name and all options that it gets from option files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: protocol option +.\" protocol option: mysql_upgrade +\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR +.sp +The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: shared-memory-base-name option +.\" shared-memory-base-name option: mysql_upgrade +\fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR +.sp +On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is +MYSQL\&. The shared\-memory name is case sensitive\&. +.sp +The server must be started with the +\fB\-\-shared\-memory\fR +option to enable shared\-memory connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: socket option +.\" socket option: mysql_upgrade +\fB\-\-socket=\fR\fB\fIpath\fR\fR, +\fB\-S \fR\fB\fIpath\fR\fR +.sp +For connections to +localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: SSL options +.\" SSL options: mysql_upgrade +\fB\-\-ssl*\fR +.sp +Options that begin with +\fB\-\-ssl\fR +specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See +Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: tmpdir option +.\" tmpdir option: mysql_upgrade +\fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, +\fB\-t \fR\fB\fIpath\fR\fR +.sp +The path name of the directory to use for creating temporary files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: upgrade-system-tables option +.\" upgrade-system-tables option: mysql_upgrade +\fB\-\-upgrade\-system\-tables\fR, +\fB\-s\fR +.sp +Upgrade only the system tables, do not upgrade data\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: user option +.\" user option: mysql_upgrade +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. The default user name is +root\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: verbose option +.\" verbose option: mysql_upgrade +\fB\-\-verbose\fR +.sp +Verbose mode\&. Print more information about what the program does\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: version-check option +.\" version-check option: mysql_upgrade +\fB\-\-version\-check\fR, +\fB\-k\fR +.sp +Check the version of the server to which +\fBmysql_upgrade\fR +is connecting to verify that it is the same as the version for which +\fBmysql_upgrade\fR +was built\&. If not, +\fBmysql_upgrade\fR +exits\&. This option is enabled by default; to disable the check, use +\fB\-\-skip\-version\-check\fR\&. This option was added in MySQL 5\&.5\&.32\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_upgrade: write-binlog option +.\" write-binlog option: mysql_upgrade +\fB\-\-write\-binlog\fR +.sp +Cause binary logging to be enabled while +\fBmysql_upgrade\fR +runs\&. This is the default behavior; to disable binary logging during the upgrade, use the inverse of this option (that is, start the program with +\fB\-\-skip\-write\-binlog\fR)\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 new file mode 100644 index 000000000000..1bc815d83252 --- /dev/null +++ b/man/mysql_waitpid.1 @@ -0,0 +1,145 @@ +'\" t +.\" Title: \fBmysql_waitpid\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL_WAITPID\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_waitpid +.SH "NAME" +mysql_waitpid \- kill process and wait for its termination +.SH "SYNOPSIS" +.HP \w'\fBmysql_waitpid\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIpid\fR\fR\fB\ \fR\fB\fIwait_time\fR\fR\ 'u +\fBmysql_waitpid [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIpid\fR\fR\fB \fR\fB\fIwait_time\fR\fR +.SH "DESCRIPTION" +.PP +\fBmysql_waitpid\fR +signals a process to terminate and waits for the process to exit\&. It uses the +kill() +system call and Unix signals, so it runs on Unix and Unix\-like systems\&. +.PP +Invoke +\fBmysql_waitpid\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_waitpid [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIpid\fR\fR\fB \fR\fB\fIwait_time\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysql_waitpid\fR +sends signal 0 to the process identified by +\fIpid\fR +and waits up to +\fIwait_time\fR +seconds for the process to terminate\&. +\fIpid\fR +and +\fIwait_time\fR +must be positive integers\&. +.PP +If process termination occurs within the wait time or the process does not exist, +\fBmysql_waitpid\fR +returns 0\&. Otherwise, it returns 1\&. +.PP +If the +kill() +system call cannot handle signal 0, +\fBmysql_waitpid()\fR +uses signal 1 instead\&. +.PP +\fBmysql_waitpid\fR +supports the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_waitpid: help option +.\" help option: mysql_waitpid +\fB\-\-help\fR, +\fB\-?\fR, +\fB\-I\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_waitpid: verbose option +.\" verbose option: mysql_waitpid +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Display a warning if signal 0 could not be used and signal 1 is used instead\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql_waitpid: version option +.\" version option: mysql_waitpid +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 new file mode 100644 index 000000000000..4186bb7bad46 --- /dev/null +++ b/man/mysql_zap.1 @@ -0,0 +1,141 @@ +'\" t +.\" Title: \fBmysql_zap\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQL_ZAP\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysql_zap +.SH "NAME" +mysql_zap \- kill processes that match a pattern +.SH "SYNOPSIS" +.HP \w'\fBmysql_zap\ [\-\fR\fB\fIsignal\fR\fR\fB]\ [\-?Ift]\ \fR\fB\fIpattern\fR\fR\ 'u +\fBmysql_zap [\-\fR\fB\fIsignal\fR\fR\fB] [\-?Ift] \fR\fB\fIpattern\fR\fR +.SH "DESCRIPTION" +.PP +\fBmysql_zap\fR +kills processes that match a pattern\&. It uses the +\fBps\fR +command and Unix signals, so it runs on Unix and Unix\-like systems\&. +.PP +Invoke +\fBmysql_zap\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql_zap [\-\fR\fB\fIsignal\fR\fR\fB] [\-?Ift] \fR\fB\fIpattern\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +A process matches if its output line from the +\fBps\fR +command contains the pattern\&. By default, +\fBmysql_zap\fR +asks for confirmation for each process\&. Respond +y +to kill the process, or +q +to exit +\fBmysql_zap\fR\&. For any other response, +\fBmysql_zap\fR +does not attempt to kill the process\&. +.PP +If the +\fB\-\fR\fB\fIsignal\fR\fR +option is given, it specifies the name or number of the signal to send to each process\&. Otherwise, +\fBmysql_zap\fR +tries first with +TERM +(signal 15) and then with +KILL +(signal 9)\&. +.PP +\fBmysql_zap\fR +supports the following additional options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-help\fR, +\fB\-?\fR, +\fB\-I\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-f\fR +.sp +Force mode\&. +\fBmysql_zap\fR +attempts to kill each process without confirmation\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-t\fR +.sp +Test mode\&. Display information about each process but do not kill it\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 new file mode 100644 index 000000000000..2395c03a65a2 --- /dev/null +++ b/man/mysqlaccess.1 @@ -0,0 +1,448 @@ +'\" t +.\" Title: \fBmysqlaccess\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLACCESS\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqlaccess +.SH "NAME" +mysqlaccess \- client for checking access privileges +.SH "SYNOPSIS" +.HP \w'\fBmysqlaccess\ [\fR\fB\fIhost_name\fR\fR\fB\ [\fR\fB\fIuser_name\fR\fR\fB\ [\fR\fB\fIdb_name\fR\fR\fB]]]\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBmysqlaccess [\fR\fB\fIhost_name\fR\fR\fB [\fR\fB\fIuser_name\fR\fR\fB [\fR\fB\fIdb_name\fR\fR\fB]]] [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBmysqlaccess\fR +is a diagnostic tool that Yves Carlier has provided for the MySQL distribution\&. It checks the access privileges for a host name, user name, and database combination\&. Note that +\fBmysqlaccess\fR +checks access using only the +user, +db, and +host +tables\&. It does not check table, column, or routine privileges specified in the +tables_priv, +columns_priv, or +procs_priv +tables\&. +.PP +Invoke +\fBmysqlaccess\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlaccess [\fR\fB\fIhost_name\fR\fR\fB [\fR\fB\fIuser_name\fR\fR\fB [\fR\fB\fIdb_name\fR\fR\fB]]] [\fR\fB\fIoptions\fR\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysqlaccess\fR +supports the following options\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: help option +.\" help option: mysqlaccess +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: brief option +.\" brief option: mysqlaccess +\fB\-\-brief\fR, +\fB\-b\fR +.sp +Generate reports in single\-line tabular format\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: commit option +.\" commit option: mysqlaccess +\fB\-\-commit\fR +.sp +Copy the new access privileges from the temporary tables to the original grant tables\&. The grant tables must be flushed for the new privileges to take effect\&. (For example, execute a +\fBmysqladmin reload\fR +command\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: copy option +.\" copy option: mysqlaccess +\fB\-\-copy\fR +.sp +Reload the temporary grant tables from original ones\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: db option +.\" db option: mysqlaccess +\fB\-\-db=\fR\fB\fIdb_name\fR\fR, +\fB\-d \fR\fB\fIdb_name\fR\fR +.sp +Specify the database name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: debug option +.\" debug option: mysqlaccess +\fB\-\-debug=\fR\fB\fIN\fR\fR +.sp +Specify the debug level\&. +\fIN\fR +can be an integer from 0 to 3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: host option +.\" host option: mysqlaccess +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +The host name to use in the access privileges\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: howto option +.\" howto option: mysqlaccess +\fB\-\-howto\fR +.sp +Display some examples that show how to use +\fBmysqlaccess\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: old_server option +.\" old_server option: mysqlaccess +\fB\-\-old_server\fR +.sp +Assume that the server is an old MySQL server (before MySQL 3\&.21) that does not yet know how to handle full +WHERE +clauses\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: password option +.\" password option: mysqlaccess +\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server\&. If you omit the +\fIpassword\fR +value following the +\fB\-\-password\fR +or +\fB\-p\fR +option on the command line, +\fBmysqlaccess\fR +prompts for one\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: plan option +.\" plan option: mysqlaccess +\fB\-\-plan\fR +.sp +Display suggestions and ideas for future releases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: preview option +.\" preview option: mysqlaccess +\fB\-\-preview\fR +.sp +Show the privilege differences after making changes to the temporary grant tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: relnotes option +.\" relnotes option: mysqlaccess +\fB\-\-relnotes\fR +.sp +Display the release notes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: rhost option +.\" rhost option: mysqlaccess +\fB\-\-rhost=\fR\fB\fIhost_name\fR\fR, +\fB\-H \fR\fB\fIhost_name\fR\fR +.sp +Connect to the MySQL server on the given host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: rollback option +.\" rollback option: mysqlaccess +\fB\-\-rollback\fR +.sp +Undo the most recent changes to the temporary grant tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: spassword option +.\" spassword option: mysqlaccess +\fB\-\-spassword[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-P[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server as the superuser\&. If you omit the +\fIpassword\fR +value following the +\fB\-\-spassword\fR +or +\fB\-p\fR +option on the command line, +\fBmysqlaccess\fR +prompts for one\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: superuser option +.\" superuser option: mysqlaccess +\fB\-\-superuser=\fR\fB\fIuser_name\fR\fR, +\fB\-U \fR\fB\fIuser_name\fR\fR +.sp +Specify the user name for connecting as the superuser\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: table option +.\" table option: mysqlaccess +\fB\-\-table\fR, +\fB\-t\fR +.sp +Generate reports in table format\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: user option +.\" user option: mysqlaccess +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The user name to use in the access privileges\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlaccess: version option +.\" version option: mysqlaccess +\fB\-\-version\fR, +\fB\-v\fR +.sp +Display version information and exit\&. +.RE +.PP +If your MySQL distribution is installed in some nonstandard location, you must change the location where +\fBmysqlaccess\fR +expects to find the +\fBmysql\fR +client\&. Edit the +mysqlaccess +script at approximately line 18\&. Search for a line that looks like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +$MYSQL = \*(Aq/usr/local/bin/mysql\*(Aq; # path to mysql executable +.fi +.if n \{\ +.RE +.\} +.PP +Change the path to reflect the location where +\fBmysql\fR +actually is stored on your system\&. If you do not do this, a +Broken pipe +error will occur when you run +\fBmysqlaccess\fR\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 new file mode 100644 index 000000000000..2df3cee8359f --- /dev/null +++ b/man/mysqladmin.1 @@ -0,0 +1,1298 @@ +'\" t +.\" Title: \fBmysqladmin\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLADMIN\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqladmin +.\" administration: server +.\" server administration +.SH "NAME" +mysqladmin \- client for administering a MySQL server +.SH "SYNOPSIS" +.HP \w'\fBmysqladmin\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIcommand\fR\fR\fB\ [\fR\fB\fIcommand\-options\fR\fR\fB]\ [\fR\fB\fIcommand\fR\fR\fB\ [\fR\fB\fIcommand\-options\fR\fR\fB]]\ \&.\&.\&.\fR\ 'u +\fBmysqladmin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-options\fR\fR\fB] [\fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-options\fR\fR\fB]] \&.\&.\&.\fR +.SH "DESCRIPTION" +.PP +\fBmysqladmin\fR +is a client for performing administrative operations\&. You can use it to check the server\*(Aqs configuration and current status, to create and drop databases, and more\&. +.PP +Invoke +\fBmysqladmin\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqladmin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-arg\fR\fR\fB] [\fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-arg\fR\fR\fB]] \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysqladmin\fR +supports the following commands\&. Some of the commands take an argument following the command name\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +create \fIdb_name\fR +.sp +Create a new database named +\fIdb_name\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +debug +.sp +Tell the server to write debug information to the error log\&. Format and content of this information is subject to change\&. +.sp +This includes information about the Event Scheduler\&. See +Section\ \&20.4.5, \(lqEvent Scheduler Status\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +drop \fIdb_name\fR +.sp +Delete the database named +\fIdb_name\fR +and all its tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +extended\-status +.sp +Display the server status variables and their values\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +flush\-hosts +.sp +Flush all information in the host cache\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +flush\-logs +.sp +Flush all logs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +flush\-privileges +.sp +Reload the grant tables (same as +reload)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +flush\-status +.sp +Clear status variables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +flush\-tables +.sp +Flush all tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +flush\-threads +.sp +Flush the thread cache\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +kill \fIid\fR,\fIid\fR,\&.\&.\&. +.sp +Kill server threads\&. If multiple thread ID values are given, there must be no spaces in the list\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +old\-password \fInew\-password\fR +.sp +This is like the +password +command but stores the password using the old (pre\-4\&.1) password\-hashing format\&. (See +Section\ \&6.1.2.4, \(lqPassword Hashing in MySQL\(rq\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +password \fInew\-password\fR +.sp +Set a new password\&. This changes the password to +\fInew\-password\fR +for the account that you use with +\fBmysqladmin\fR +for connecting to the server\&. Thus, the next time you invoke +\fBmysqladmin\fR +(or any other client program) using the same account, you will need to specify the new password\&. +.sp +If the +\fInew\-password\fR +value contains spaces or other characters that are special to your command interpreter, you need to enclose it within quotation marks\&. On Windows, be sure to use double quotation marks rather than single quotation marks; single quotation marks are not stripped from the password, but rather are interpreted as part of the password\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqladmin password "my new password"\fR +.fi +.if n \{\ +.RE +.\} +.sp +As of MySQL 5\&.5\&.3, the new password can be omitted following the +password +command\&. In this case, +\fBmysqladmin\fR +prompts for the password value, which enables you to avoid specifying the password on the command line\&. Omitting the password value should be done only if +password +is the final command on the +\fBmysqladmin\fR +command line\&. Otherwise, the next argument is taken as the password\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBCaution\fR +.ps -1 +.br +Do not use this command used if the server was started with the +\fB\-\-skip\-grant\-tables\fR +option\&. No password change will be applied\&. This is true even if you precede the +password +command with +flush\-privileges +on the same command line to re\-enable the grant tables because the flush operation occurs after you connect\&. However, you can use +\fBmysqladmin flush\-privileges\fR +to re\-enable the grant table and then use a separate +\fBmysqladmin password\fR +command to change the password\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ping +.sp +Check whether the server is available\&. The return status from +\fBmysqladmin\fR +is 0 if the server is running, 1 if it is not\&. This is 0 even in case of an error such as +Access denied, because this means that the server is running but refused the connection, which is different from the server not running\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +processlist +.sp +Show a list of active server threads\&. This is like the output of the +SHOW PROCESSLIST +statement\&. If the +\fB\-\-verbose\fR +option is given, the output is like that of +SHOW FULL PROCESSLIST\&. (See +Section\ \&13.7.5.30, \(lqSHOW PROCESSLIST Syntax\(rq\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +reload +.sp +Reload the grant tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +refresh +.sp +Flush all tables and close and open log files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +shutdown +.sp +Stop the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +start\-slave +.sp +Start replication on a slave server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +status +.sp +Display a short server status message\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +stop\-slave +.sp +Stop replication on a slave server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +variables +.sp +Display the server system variables and their values\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +version +.sp +Display version information from the server\&. +.RE +.PP +All commands can be shortened to any unique prefix\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqladmin proc stat\fR ++\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| Id | User | Host | db | Command | Time | State | Info | ++\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| 51 | monty | localhost | | Query | 0 | | show processlist | ++\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +Uptime: 1473624 Threads: 1 Questions: 39487 +Slow queries: 0 Opens: 541 Flush tables: 1 +Open tables: 19 Queries per second avg: 0\&.0268 +.fi +.if n \{\ +.RE +.\} +.sp +.\" status command: results +.PP +The +\fBmysqladmin status\fR +command result displays the following values: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" uptime +Uptime +.sp +The number of seconds the MySQL server has been running\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" threads +Threads +.sp +The number of active threads (clients)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" questions +Questions +.sp +The number of questions (queries) from clients since the server was started\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" slow queries +Slow queries +.sp +The number of queries that have taken more than +long_query_time +seconds\&. See +Section\ \&5.2.5, \(lqThe Slow Query Log\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" opens +Opens +.sp +The number of tables the server has opened\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" flush tables +.\" tables: flush +Flush tables +.sp +The number of +flush\-*, +refresh, and +reload +commands the server has executed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" open tables +Open tables +.sp +The number of tables that currently are open\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" memory use +Memory in use +.sp +The amount of memory allocated directly by +\fBmysqld\fR\&. This value is displayed only when MySQL has been compiled with +safemalloc, which is available only before MySQL 5\&.5\&.6\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" maximum memory used +Maximum memory used +.sp +The maximum amount of memory allocated directly by +\fBmysqld\fR\&. This value is displayed only when MySQL has been compiled with +safemalloc, which is available only before MySQL 5\&.5\&.6\&. +.RE +.PP +If you execute +\fBmysqladmin shutdown\fR +when connecting to a local server using a Unix socket file, +\fBmysqladmin\fR +waits until the server\*(Aqs process ID file has been removed, to ensure that the server has stopped properly\&. +.\" mysqladmin command options +.\" command options: mysqladmin +.\" options: command-line: mysqladmin +.\" startup parameters: mysqladmin +.PP +\fBmysqladmin\fR +supports the following options, which can be specified on the command line or in the +[mysqladmin] +and +[client] +groups of an option file\&. For information about option files used by MySQL programs, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: help option +.\" help option: mysqladmin +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: bind-address option +.\" bind-address option: mysqladmin +\fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR +.sp +On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. +.sp +This option is supported only in the version of +\fBmysqladmin\fR +that is supplied with MySQL Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: character-sets-dir option +.\" character-sets-dir option: mysqladmin +\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory where character sets are installed\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: compress option +.\" compress option: mysqladmin +\fB\-\-compress\fR, +\fB\-C\fR +.sp +Compress all information sent between the client and the server if both support compression\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: count option +.\" count option: mysqladmin +\fB\-\-count=\fR\fB\fIN\fR\fR, +\fB\-c \fR\fB\fIN\fR\fR +.sp +The number of iterations to make for repeated command execution if the +\fB\-\-sleep\fR +option is given\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: debug option +.\" debug option: mysqladmin +\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, +\fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:o,\fIfile_name\fR\&. The default is +d:t:o,/tmp/mysqladmin\&.trace\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: debug-check option +.\" debug-check option: mysqladmin +\fB\-\-debug\-check\fR +.sp +Print some debugging information when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: debug-info option +.\" debug-info option: mysqladmin +\fB\-\-debug\-info\fR +.sp +Print debugging information and memory and CPU usage statistics when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: default-auth option +.\" default-auth option: mysqladmin +\fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR +.sp +The client\-side authentication plugin to use\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.9\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: default-character-set option +.\" default-character-set option: mysqladmin +\fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR +.sp +Use +\fIcharset_name\fR +as the default character set\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: defaults-extra-file option +.\" defaults-extra-file option: mysqladmin +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +.sp +Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: defaults-file option +.\" defaults-file option: mysqladmin +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: defaults-group-suffix option +.\" defaults-group-suffix option: mysqladmin +\fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR +.sp +Read not only the usual option groups, but also groups with the usual names and a suffix of +\fIstr\fR\&. For example, +\fBmysqladmin\fR +normally reads the +[client] +and +[mysqladmin] +groups\&. If the +\fB\-\-defaults\-group\-suffix=_other\fR +option is given, +\fBmysqladmin\fR +also reads the +[client_other] +and +[mysqladmin_other] +groups\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: enable-cleartext-plugin option +.\" enable-cleartext-plugin option: mysqladmin +\fB\-\-enable\-cleartext\-plugin\fR +.sp +Enable the +mysql_clear_password +cleartext authentication plugin\&. (See +Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: force option +.\" force option: mysqladmin +\fB\-\-force\fR, +\fB\-f\fR +.sp +Do not ask for confirmation for the +drop \fIdb_name\fR +command\&. With multiple commands, continue even if an error occurs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: host option +.\" host option: mysqladmin +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +Connect to the MySQL server on the given host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: no-beep option +.\" no-beep option: mysqladmin +\fB\-\-no\-beep\fR, +\fB\-b\fR +.sp +Suppress the warning beep that is emitted by default for errors such as a failure to connect to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: no-defaults option +.\" no-defaults option: mysqladmin +\fB\-\-no\-defaults\fR +.sp +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: password option +.\" password option: mysqladmin +\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you +\fIcannot\fR +have a space between the option and the password\&. If you omit the +\fIpassword\fR +value following the +\fB\-\-password\fR +or +\fB\-p\fR +option on the command line, +\fBmysqladmin\fR +prompts for one\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: pipe option +.\" pipe option: mysqladmin +\fB\-\-pipe\fR, +\fB\-W\fR +.sp +On Windows, connect to the server using a named pipe\&. This option applies only if the server supports named\-pipe connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: plugin-dir option +.\" plugin-dir option: mysqladmin +\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory in which to look for plugins\&. It may be necessary to specify this option if the +\fB\-\-default\-auth\fR +option is used to specify an authentication plugin but +\fBmysqladmin\fR +does not find it\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.9\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: port option +.\" port option: mysqladmin +\fB\-\-port=\fR\fB\fIport_num\fR\fR, +\fB\-P \fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for the connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: print-defaults option +.\" print-defaults option: mysqladmin +\fB\-\-print\-defaults\fR +.sp +Print the program name and all options that it gets from option files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: protocol option +.\" protocol option: mysqladmin +\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR +.sp +The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: relative option +.\" relative option: mysqladmin +\fB\-\-relative\fR, +\fB\-r\fR +.sp +Show the difference between the current and previous values when used with the +\fB\-\-sleep\fR +option\&. This option works only with the +extended\-status +command\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: shared-memory-base-name option +.\" shared-memory-base-name option: mysqladmin +\fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR +.sp +On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is +MYSQL\&. The shared\-memory name is case sensitive\&. +.sp +The server must be started with the +\fB\-\-shared\-memory\fR +option to enable shared\-memory connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: silent option +.\" silent option: mysqladmin +\fB\-\-silent\fR, +\fB\-s\fR +.sp +Exit silently if a connection to the server cannot be established\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: sleep option +.\" sleep option: mysqladmin +\fB\-\-sleep=\fR\fB\fIdelay\fR\fR, +\fB\-i \fR\fB\fIdelay\fR\fR +.sp +Execute commands repeatedly, sleeping for +\fIdelay\fR +seconds in between\&. The +\fB\-\-count\fR +option determines the number of iterations\&. If +\fB\-\-count\fR +is not given, +\fBmysqladmin\fR +executes commands indefinitely until interrupted\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: socket option +.\" socket option: mysqladmin +\fB\-\-socket=\fR\fB\fIpath\fR\fR, +\fB\-S \fR\fB\fIpath\fR\fR +.sp +For connections to +localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: SSL options +.\" SSL options: mysqladmin +\fB\-\-ssl*\fR +.sp +Options that begin with +\fB\-\-ssl\fR +specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See +Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: user option +.\" user option: mysqladmin +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: verbose option +.\" verbose option: mysqladmin +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print more information about what the program does\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: version option +.\" version option: mysqladmin +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: vertical option +.\" vertical option: mysqladmin +\fB\-\-vertical\fR, +\fB\-E\fR +.sp +Print output vertically\&. This is similar to +\fB\-\-relative\fR, but prints output vertically\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqladmin: wait option +.\" wait option: mysqladmin +\fB\-\-wait[=\fR\fB\fIcount\fR\fR\fB]\fR, +\fB\-w[\fR\fB\fIcount\fR\fR\fB]\fR +.sp +If the connection cannot be established, wait and retry instead of aborting\&. If a +\fIcount\fR +value is given, it indicates the number of times to retry\&. The default is one time\&. +.RE +.PP +You can also set the following variables by using +\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR +The +\fB\-\-set\-variable\fR +format is deprecated and was removed in MySQL 5\&.5\&.3\&. syntax: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" connect_timeout variable +.\" timeout: connect_timeout variable +connect_timeout +.sp +The maximum number of seconds before connection timeout\&. The default value is 43200 (12 hours)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" shutdown_timeout variable +.\" timeout: shutdown_timeout variable +shutdown_timeout +.sp +The maximum number of seconds to wait for server shutdown\&. The default value is 3600 (1 hour)\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 new file mode 100644 index 000000000000..39b2f8b3a009 --- /dev/null +++ b/man/mysqlbinlog.1 @@ -0,0 +1,2262 @@ +'\" t +.\" Title: \fBmysqlbinlog\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLBINLOG\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqlbinlog +.SH "NAME" +mysqlbinlog \- utility for processing binary log files +.SH "SYNOPSIS" +.HP \w'\fBmysqlbinlog\ [\fR\fBoptions\fR\fB]\ \fR\fB\fIlog_file\fR\fR\fB\ \&.\&.\&.\fR\ 'u +\fBmysqlbinlog [\fR\fBoptions\fR\fB] \fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.\fR +.SH "DESCRIPTION" +.PP +The server\*(Aqs binary log consists of files containing +\(lqevents\(rq +that describe modifications to database contents\&. The server writes these files in binary format\&. To display their contents in text format, use the +\fBmysqlbinlog\fR +utility\&. You can also use +\fBmysqlbinlog\fR +to display the contents of relay log files written by a slave server in a replication setup because relay logs have the same format as binary logs\&. The binary log and relay log are discussed further in +Section\ \&5.2.4, \(lqThe Binary Log\(rq, and +Section\ \&17.2.2, \(lqReplication Relay and Status Logs\(rq\&. +.PP +Invoke +\fBmysqlbinlog\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.PP +For example, to display the contents of the binary log file named +binlog\&.000003, use this command: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog binlog\&.0000003\fR +.fi +.if n \{\ +.RE +.\} +.PP +The output includes events contained in +binlog\&.000003\&. For statement\-based logging, event information includes the SQL statement, the ID of the server on which it was executed, the timestamp when the statement was executed, how much time it took, and so forth\&. For row\-based logging, the event indicates a row change rather than an SQL statement\&. See +Section\ \&17.1.2, \(lqReplication Formats\(rq, for information about logging modes\&. +.PP +Events are preceded by header comments that provide additional information\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +# at 141 +#100309 9:28:36 server id 123 end_log_pos 245 + Query thread_id=3350 exec_time=11 error_code=0 +.fi +.if n \{\ +.RE +.\} +.PP +In the first line, the number following +at +indicates the file offset, or starting position, of the event in the binary log file\&. +.PP +The second line starts with a date and time indicating when the statement started on the server where the event originated\&. For replication, this timestamp is propagated to slave servers\&. +server id +is the +server_id +value of the server where the event originated\&. +end_log_pos +indicates where the next event starts (that is, it is the end position of the current event + 1)\&. +thread_id +indicates which thread executed the event\&. +exec_time +is the time spent executing the event, on a master server\&. On a slave, it is the difference of the end execution time on the slave minus the beginning execution time on the master\&. The difference serves as an indicator of how much replication lags behind the master\&. +error_code +indicates the result from executing the event\&. Zero means that no error occurred\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +When using event groups, the file offsets of events may be grouped together and the comments of events may be grouped together\&. Do not mistake these grouped events for blank file offsets\&. +.sp .5v +.RE +.PP +The output from +\fBmysqlbinlog\fR +can be re\-executed (for example, by using it as input to +\fBmysql\fR) to redo the statements in the log\&. This is useful for recovery operations after a server crash\&. For other usage examples, see the discussion later in this section and in +Section\ \&7.5, \(lqPoint-in-Time (Incremental) Recovery Using the Binary Log\(rq\&. +.PP +Normally, you use +\fBmysqlbinlog\fR +to read binary log files directly and apply them to the local MySQL server\&. It is also possible to read binary logs from a remote server by using the +\fB\-\-read\-from\-remote\-server\fR +option\&. To read remote binary logs, the connection parameter options can be given to indicate how to connect to the server\&. These options are +\fB\-\-host\fR, +\fB\-\-password\fR, +\fB\-\-port\fR, +\fB\-\-protocol\fR, +\fB\-\-socket\fR, and +\fB\-\-user\fR; they are ignored except when you also use the +\fB\-\-read\-from\-remote\-server\fR +option\&. +.PP +When running +\fBmysqlbinlog\fR +against a large binary log, be careful that the filesystem has enough space for the resulting files\&. To configure the directory that +\fBmysqlbinlog\fR +uses for temporary files, use the +TMPDIR +environment variable\&. +.PP +\fBmysqlbinlog\fR +supports the following options, which can be specified on the command line or in the +[mysqlbinlog] +and +[client] +groups of an option file\&. For information about option files used by MySQL programs, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: help option +.\" help option: mysqlbinlog +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: base64-output option +.\" base64-output option: mysqlbinlog +\fB\-\-base64\-output[=\fR\fB\fIvalue\fR\fR\fB]\fR +.sp +This option determines when events should be displayed encoded as base\-64 strings using +BINLOG +statements\&. The option has these permissible values (not case sensitive): +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +AUTO +("automatic") or +UNSPEC +("unspecified") displays +BINLOG +statements automatically when necessary (that is, for format description events and row events)\&. If no +\fB\-\-base64\-output\fR +option is given, the effect is the same as +\fB\-\-base64\-output=AUTO\fR\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +Automatic +BINLOG +display is the only safe behavior if you intend to use the output of +\fBmysqlbinlog\fR +to re\-execute binary log file contents\&. The other option values are intended only for debugging or testing purposes because they may produce output that does not include all events in executable form\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ALWAYS +displays +BINLOG +statements whenever possible\&. If the +\fB\-\-base64\-output\fR +option is given without a value, the effect is the same as +\fB\-\-base64\-output=ALWAYS\fR\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +Changes to replication in MySQL 5\&.6 make output generated by this option unusable, so +ALWAYS +is deprecated as of MySQL 5\&.5\&.8 and will be an invalid value in MySQL 5\&.6 +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NEVER +causes +BINLOG +statements not to be displayed\&. +\fBmysqlbinlog\fR +exits with an error if a row event is found that must be displayed using +BINLOG\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +DECODE\-ROWS +specifies to +\fBmysqlbinlog\fR +that you intend for row events to be decoded and displayed as commented SQL statements by also specifying the +\fB\-\-verbose\fR +option\&. Like +NEVER, +DECODE\-ROWS +suppresses display of +BINLOG +statements, but unlike +NEVER, it does not exit with an error if a row event is found\&. +.RE +.sp +For examples that show the effect of +\fB\-\-base64\-output\fR +and +\fB\-\-verbose\fR +on row event output, see +the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: bind-address option +.\" bind-address option: mysqlbinlog +\fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR +.sp +On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. +.sp +This option is supported beginning with MySQL 5\&.5\&.8\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: character-sets-dir option +.\" character-sets-dir option: mysqlbinlog +\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory where character sets are installed\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: database option +.\" database option: mysqlbinlog +\fB\-\-database=\fR\fB\fIdb_name\fR\fR, +\fB\-d \fR\fB\fIdb_name\fR\fR +.sp +This option causes +\fBmysqlbinlog\fR +to output entries from the binary log (local log only) that occur while +\fIdb_name\fR +is been selected as the default database by +USE\&. +.sp +The +\fB\-\-database\fR +option for +\fBmysqlbinlog\fR +is similar to the +\fB\-\-binlog\-do\-db\fR +option for +\fBmysqld\fR, but can be used to specify only one database\&. If +\fB\-\-database\fR +is given multiple times, only the last instance is used\&. +.sp +The effects of this option depend on whether the statement\-based or row\-based logging format is in use, in the same way that the effects of +\fB\-\-binlog\-do\-db\fR +depend on whether statement\-based or row\-based logging is in use\&. +.PP +\fBStatement-based logging\fR. The +\fB\-\-database\fR +option works as follows: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +While +\fIdb_name\fR +is the default database, statements are output whether they modify tables in +\fIdb_name\fR +or a different database\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Unless +\fIdb_name\fR +is selected as the default database, statements are not output, even if they modify tables in +\fIdb_name\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +There is an exception for +CREATE DATABASE, +ALTER DATABASE, and +DROP DATABASE\&. The database being +\fIcreated, altered, or dropped\fR +is considered to be the default database when determining whether to output the statement\&. +.RE +.sp +Suppose that the binary log was created by executing these statements using statement\-based\-logging: +.sp +.if n \{\ +.RS 4 +.\} +.nf +INSERT INTO test\&.t1 (i) VALUES(100); +INSERT INTO db2\&.t2 (j) VALUES(200); +USE test; +INSERT INTO test\&.t1 (i) VALUES(101); +INSERT INTO t1 (i) VALUES(102); +INSERT INTO db2\&.t2 (j) VALUES(201); +USE db2; +INSERT INTO test\&.t1 (i) VALUES(103); +INSERT INTO db2\&.t2 (j) VALUES(202); +INSERT INTO t2 (j) VALUES(203); +.fi +.if n \{\ +.RE +.\} +.sp +\fBmysqlbinlog \-\-database=test\fR +does not output the first two +INSERT +statements because there is no default database\&. It outputs the three +INSERT +statements following +USE test, but not the three +INSERT +statements following +USE db2\&. +.sp +\fBmysqlbinlog \-\-database=db2\fR +does not output the first two +INSERT +statements because there is no default database\&. It does not output the three +INSERT +statements following +USE test, but does output the three +INSERT +statements following +USE db2\&. +.PP +\fBRow-based logging\fR. +\fBmysqlbinlog\fR +outputs only entries that change tables belonging to +\fIdb_name\fR\&. The default database has no effect on this\&. Suppose that the binary log just described was created using row\-based logging rather than statement\-based logging\&. +\fBmysqlbinlog \-\-database=test\fR +outputs only those entries that modify +t1 +in the test database, regardless of whether +USE +was issued or what the default database is\&. +If a server is running with +binlog_format +set to +MIXED +and you want it to be possible to use +\fBmysqlbinlog\fR +with the +\fB\-\-database\fR +option, you must ensure that tables that are modified are in the database selected by +USE\&. (In particular, no cross\-database updates should be used\&.) +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +Prior to MySQL Cluster NDB 7\&.2\&.2, this option did not work correctly with MySQL Cluster tables unless, unless the binary log was generated using +\fB\-\-log\-bin\-use\-v1\-row\-events=0\fR\&. (Bug #13067813) +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: debug option +.\" debug option: mysqlbinlog +\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, +\fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:o,\fIfile_name\fR\&. The default is +d:t:o,/tmp/mysqlbinlog\&.trace\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: debug-check option +.\" debug-check option: mysqlbinlog +\fB\-\-debug\-check\fR +.sp +Print some debugging information when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: debug-info option +.\" debug-info option: mysqlbinlog +\fB\-\-debug\-info\fR +.sp +Print debugging information and memory and CPU usage statistics when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: default-auth option +.\" default-auth option: mysqlbinlog +\fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR +.sp +The client\-side authentication plugin to use\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: defaults-extra-file option +.\" defaults-extra-file option: mysqlbinlog +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +.sp +Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: defaults-file option +.\" defaults-file option: mysqlbinlog +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: defaults-group-suffix option +.\" defaults-group-suffix option: mysqlbinlog +\fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR +.sp +Read not only the usual option groups, but also groups with the usual names and a suffix of +\fIstr\fR\&. For example, +\fBmysqlbinlog\fR +normally reads the +[client] +and +[mysqlbinlog] +groups\&. If the +\fB\-\-defaults\-group\-suffix=_other\fR +option is given, +\fBmysqlbinlog\fR +also reads the +[client_other] +and +[mysqlbinlog_other] +groups\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: disable-log-bin option +.\" disable-log-bin option: mysqlbinlog +\fB\-\-disable\-log\-bin\fR, +\fB\-D\fR +.sp +Disable binary logging\&. This is useful for avoiding an endless loop if you use the +\fB\-\-to\-last\-log\fR +option and are sending the output to the same MySQL server\&. This option also is useful when restoring after a crash to avoid duplication of the statements you have logged\&. +.sp +This option requires that you have the +SUPER +privilege\&. It causes +\fBmysqlbinlog\fR +to include a +SET sql_log_bin = 0 +statement in its output to disable binary logging of the remaining output\&. The +SET +statement is ineffective unless you have the +SUPER +privilege\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: force-if-open option +.\" force-if-open option: mysqlbinlog +\fB\-\-force\-if\-open\fR, +\fB\-F\fR +.sp +Read binary log files even if they are open or were not closed properly\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: force-read option +.\" force-read option: mysqlbinlog +\fB\-\-force\-read\fR, +\fB\-f\fR +.sp +With this option, if +\fBmysqlbinlog\fR +reads a binary log event that it does not recognize, it prints a warning, ignores the event, and continues\&. Without this option, +\fBmysqlbinlog\fR +stops if it reads such an event\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: hexdump option +.\" hexdump option: mysqlbinlog +\fB\-\-hexdump\fR, +\fB\-H\fR +.sp +Display a hex dump of the log in comments, as described in +the section called \(lqMYSQLBINLOG HEX DUMP FORMAT\(rq\&. The hex output can be helpful for replication debugging\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: host option +.\" host option: mysqlbinlog +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +Get the binary log from the MySQL server on the given host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: local-load option +.\" local-load option: mysqlbinlog +\fB\-\-local\-load=\fR\fB\fIpath\fR\fR, +\fB\-l \fR\fB\fIpath\fR\fR +.sp +Prepare local temporary files for +LOAD DATA INFILE +in the specified directory\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +These temporary files are not automatically removed by +\fBmysqlbinlog\fR +or any other MySQL program\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: no-defaults option +.\" no-defaults option: mysqlbinlog +\fB\-\-no\-defaults\fR +.sp +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: offset option +.\" offset option: mysqlbinlog +\fB\-\-offset=\fR\fB\fIN\fR\fR, +\fB\-o \fR\fB\fIN\fR\fR +.sp +Skip the first +\fIN\fR +entries in the log\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: password option +.\" password option: mysqlbinlog +\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you +\fIcannot\fR +have a space between the option and the password\&. If you omit the +\fIpassword\fR +value following the +\fB\-\-password\fR +or +\fB\-p\fR +option on the command line, +\fBmysqlbinlog\fR +prompts for one\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: plugin-dir option +.\" plugin-dir option: mysqlbinlog +\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory in which to look for plugins\&. It may be necessary to specify this option if the +\fB\-\-default\-auth\fR +option is used to specify an authentication plugin but +\fBmysqlbinlog\fR +does not find it\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: port option +.\" port option: mysqlbinlog +\fB\-\-port=\fR\fB\fIport_num\fR\fR, +\fB\-P \fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for connecting to a remote server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: position option +.\" position option: mysqlbinlog +\fB\-\-position=\fR\fB\fIN\fR\fR +.sp +Deprecated\&. Use +\fB\-\-start\-position\fR +instead\&. +\fB\-\-position\fR +was removed in MySQL 5\&.5\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: print-defaults option +.\" print-defaults option: mysqlbinlog +\fB\-\-print\-defaults\fR +.sp +Print the program name and all options that it gets from option files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: protocol option +.\" protocol option: mysqlbinlog +\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR +.sp +The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: read-from-remote-server option +.\" read-from-remote-server option: mysqlbinlog +\fB\-\-read\-from\-remote\-server\fR, +\fB\-R\fR +.sp +Read the binary log from a MySQL server rather than reading a local log file\&. Any connection parameter options are ignored unless this option is given as well\&. These options are +\fB\-\-host\fR, +\fB\-\-password\fR, +\fB\-\-port\fR, +\fB\-\-protocol\fR, +\fB\-\-socket\fR, and +\fB\-\-user\fR\&. +.sp +This option requires that the remote server be running\&. It works only for binary log files on the remote server, not relay log files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: result-file option +.\" result-file option: mysqlbinlog +\fB\-\-result\-file=\fR\fB\fIname\fR\fR, +\fB\-r \fR\fB\fIname\fR\fR +.sp +Direct output to the given file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: server-id option +.\" server-id option: mysqlbinlog +\fB\-\-server\-id=\fR\fB\fIid\fR\fR +.sp +Display only those events created by the server having the given server ID\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: server-id-bits option +.\" server-id-bits option: mysqlbinlog +\fB\-\-server\-id\-bits=\fR\fB\fIN\fR\fR +.sp +Use only the first +\fIN\fR +bits of the +server_id +to identify the server\&. If the binary log was written by a +\fBmysqld\fR +with server\-id\-bits set to less than 32 and user data stored in the most significant bit, running +\fBmysqlbinlog\fR +with +\fB\-\-server\-id\-bits\fR +set to 32 enables this data to be seen\&. +.sp +This option is supported only by the versions of +\fBmysqlbinlog\fR +supplied with the MySQL Cluster distribution, or built from the MySQL Cluster sources\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: set-charset option +.\" set-charset option: mysqlbinlog +\fB\-\-set\-charset=\fR\fB\fIcharset_name\fR\fR +.sp +Add a +SET NAMES \fIcharset_name\fR +statement to the output to specify the character set to be used for processing log files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: shared-memory-base-name option +.\" shared-memory-base-name option: mysqlbinlog +\fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR +.sp +On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is +MYSQL\&. The shared\-memory name is case sensitive\&. +.sp +The server must be started with the +\fB\-\-shared\-memory\fR +option to enable shared\-memory connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: short-form option +.\" short-form option: mysqlbinlog +\fB\-\-short\-form\fR, +\fB\-s\fR +.sp +Display only the statements contained in the log, without any extra information or row\-based events\&. This is for testing only, and should not be used in production systems\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: socket option +.\" socket option: mysqlbinlog +\fB\-\-socket=\fR\fB\fIpath\fR\fR, +\fB\-S \fR\fB\fIpath\fR\fR +.sp +For connections to +localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: start-datetime option +.\" start-datetime option: mysqlbinlog +\fB\-\-start\-datetime=\fR\fB\fIdatetime\fR\fR +.sp +Start reading the binary log at the first event having a timestamp equal to or later than the +\fIdatetime\fR +argument\&. The +\fIdatetime\fR +value is relative to the local time zone on the machine where you run +\fBmysqlbinlog\fR\&. The value should be in a format accepted for the +DATETIME +or +TIMESTAMP +data types\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog \-\-start\-datetime="2005\-12\-25 11:25:56" binlog\&.000003\fR +.fi +.if n \{\ +.RE +.\} +.sp +This option is useful for point\-in\-time recovery\&. See +Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: start-position option +.\" start-position option: mysqlbinlog +\fB\-\-start\-position=\fR\fB\fIN\fR\fR, +\fB\-j \fR\fB\fIN\fR\fR +.sp +Start reading the binary log at the first event having a position equal to or greater than +\fIN\fR\&. This option applies to the first log file named on the command line\&. +.sp +This option is useful for point\-in\-time recovery\&. See +Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: stop-datetime option +.\" stop-datetime option: mysqlbinlog +\fB\-\-stop\-datetime=\fR\fB\fIdatetime\fR\fR +.sp +Stop reading the binary log at the first event having a timestamp equal to or later than the +\fIdatetime\fR +argument\&. This option is useful for point\-in\-time recovery\&. See the description of the +\fB\-\-start\-datetime\fR +option for information about the +\fIdatetime\fR +value\&. +.sp +This option is useful for point\-in\-time recovery\&. See +Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: stop-position option +.\" stop-position option: mysqlbinlog +\fB\-\-stop\-position=\fR\fB\fIN\fR\fR +.sp +Stop reading the binary log at the first event having a position equal to or greater than +\fIN\fR\&. This option applies to the last log file named on the command line\&. +.sp +This option is useful for point\-in\-time recovery\&. See +Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: to-last-log option +.\" to-last-log option: mysqlbinlog +\fB\-\-to\-last\-log\fR, +\fB\-t\fR +.sp +Do not stop at the end of the requested binary log from a MySQL server, but rather continue printing until the end of the last binary log\&. If you send the output to the same MySQL server, this may lead to an endless loop\&. This option requires +\fB\-\-read\-from\-remote\-server\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: user option +.\" user option: mysqlbinlog +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to a remote server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: verbose option +.\" verbose option: mysqlbinlog +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Reconstruct row events and display them as commented SQL statements\&. If this option is given twice, the output includes comments to indicate column data types and some metadata\&. +.sp +For examples that show the effect of +\fB\-\-base64\-output\fR +and +\fB\-\-verbose\fR +on row event output, see +the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlbinlog: version option +.\" version option: mysqlbinlog +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.sp +In MySQL 5\&.5, the version number shown for +\fBmysqlbinlog\fR +is always 3\&.3\&. +.RE +.PP +You can also set the following variable by using +\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR +syntax: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" open_files_limit variable +open_files_limit +.sp +Specify the number of open file descriptors to reserve\&. +.RE +.PP +You can pipe the output of +\fBmysqlbinlog\fR +into the +\fBmysql\fR +client to execute the events contained in the binary log\&. This technique is used to recover from a crash when you have an old backup (see +Section\ \&7.5, \(lqPoint-in-Time (Incremental) Recovery Using the Binary Log\(rq)\&. For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog binlog\&.000001 | mysql \-u root \-p\fR +.fi +.if n \{\ +.RE +.\} +.PP +Or: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog binlog\&.[0\-9]* | mysql \-u root \-p\fR +.fi +.if n \{\ +.RE +.\} +.PP +You can also redirect the output of +\fBmysqlbinlog\fR +to a text file instead, if you need to modify the statement log first (for example, to remove statements that you do not want to execute for some reason)\&. After editing the file, execute the statements that it contains by using it as input to the +\fBmysql\fR +program: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog binlog\&.000001 > tmpfile\fR +shell> \&.\&.\&. \fIedit tmpfile\fR \&.\&.\&. +shell> \fBmysql \-u root \-p < tmpfile\fR +.fi +.if n \{\ +.RE +.\} +.PP +When +\fBmysqlbinlog\fR +is invoked with the +\fB\-\-start\-position\fR +option, it displays only those events with an offset in the binary log greater than or equal to a given position (the given position must match the start of one event)\&. It also has options to stop and start when it sees an event with a given date and time\&. This enables you to perform point\-in\-time recovery using the +\fB\-\-stop\-datetime\fR +option (to be able to say, for example, +\(lqroll forward my databases to how they were today at 10:30 a\&.m\&.\(rq)\&. +.PP +If you have more than one binary log to execute on the MySQL server, the safe method is to process them all using a single connection to the server\&. Here is an example that demonstrates what may be +\fIunsafe\fR: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog binlog\&.000001 | mysql \-u root \-p # DANGER!!\fR +shell> \fBmysqlbinlog binlog\&.000002 | mysql \-u root \-p # DANGER!!\fR +.fi +.if n \{\ +.RE +.\} +.PP +Processing binary logs this way using multiple connections to the server causes problems if the first log file contains a +CREATE TEMPORARY TABLE +statement and the second log contains a statement that uses the temporary table\&. When the first +\fBmysql\fR +process terminates, the server drops the temporary table\&. When the second +\fBmysql\fR +process attempts to use the table, the server reports +\(lqunknown table\&.\(rq +.PP +To avoid problems like this, use a +\fIsingle\fR +\fBmysql\fR +process to execute the contents of all binary logs that you want to process\&. Here is one way to do so: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog binlog\&.000001 binlog\&.000002 | mysql \-u root \-p\fR +.fi +.if n \{\ +.RE +.\} +.PP +Another approach is to write all the logs to a single file and then process the file: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog binlog\&.000001 > /tmp/statements\&.sql\fR +shell> \fBmysqlbinlog binlog\&.000002 >> /tmp/statements\&.sql\fR +shell> \fBmysql \-u root \-p \-e "source /tmp/statements\&.sql"\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysqlbinlog\fR +can produce output that reproduces a +LOAD DATA INFILE +operation without the original data file\&. +\fBmysqlbinlog\fR +copies the data to a temporary file and writes a +LOAD DATA LOCAL INFILE +statement that refers to the file\&. The default location of the directory where these files are written is system\-specific\&. To specify a directory explicitly, use the +\fB\-\-local\-load\fR +option\&. +.PP +Because +\fBmysqlbinlog\fR +converts +LOAD DATA INFILE +statements to +LOAD DATA LOCAL INFILE +statements (that is, it adds +LOCAL), both the client and the server that you use to process the statements must be configured with the +LOCAL +capability enabled\&. See +Section\ \&6.1.6, \(lqSecurity Issues with LOAD DATA LOCAL\(rq\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +.PP +The temporary files created for +LOAD DATA LOCAL +statements are +\fInot\fR +automatically deleted because they are needed until you actually execute those statements\&. You should delete the temporary files yourself after you no longer need the statement log\&. The files can be found in the temporary file directory and have names like +\fIoriginal_file_name\-#\-#\fR\&. +.sp .5v +.RE +.SH "MYSQLBINLOG HEX DUMP FORMAT" +.PP +The +\fB\-\-hexdump\fR +option causes +\fBmysqlbinlog\fR +to produce a hex dump of the binary log contents: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog \-\-hexdump master\-bin\&.000001\fR +.fi +.if n \{\ +.RE +.\} +.PP +The hex output consists of comment lines beginning with +#, so the output might look like this for the preceding command: +.sp +.if n \{\ +.RS 4 +.\} +.nf +/*!40019 SET @@session\&.max_insert_delayed_threads=0*/; +/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; +# at 4 +#051024 17:24:13 server id 1 end_log_pos 98 +# Position Timestamp Type Master ID Size Master Pos Flags +# 00000004 9d fc 5c 43 0f 01 00 00 00 5e 00 00 00 62 00 00 00 00 00 +# 00000017 04 00 35 2e 30 2e 31 35 2d 64 65 62 75 67 2d 6c |\&.\&.5\&.0\&.15\&.debug\&.l| +# 00000027 6f 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |og\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.| +# 00000037 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.| +# 00000047 00 00 00 00 9d fc 5c 43 13 38 0d 00 08 00 12 00 |\&.\&.\&.\&.\&.\&.\&.C\&.8\&.\&.\&.\&.\&.\&.| +# 00000057 04 04 04 04 12 00 00 4b 00 04 1a |\&.\&.\&.\&.\&.\&.\&.K\&.\&.\&.| +# Start: binlog v 4, server v 5\&.0\&.15\-debug\-log created 051024 17:24:13 +# at startup +ROLLBACK; +.fi +.if n \{\ +.RE +.\} +.PP +Hex dump output currently contains the elements in the following list\&. This format is subject to change\&. (For more information about binary log format, see +\m[blue]\fBMySQL Internals: The Binary Log\fR\m[]\&\s-2\u[1]\d\s+2\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Position: The byte position within the log file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Timestamp: The event timestamp\&. In the example shown, +\*(Aq9d fc 5c 43\*(Aq +is the representation of +\*(Aq051024 17:24:13\*(Aq +in hexadecimal\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Type: The event type code\&. In the example shown, +\*(Aq0f\*(Aq +indicates a +FORMAT_DESCRIPTION_EVENT\&. The following table lists the possible type codes\&. +.TS +allbox tab(:); +lB lB lB. +T{ +Type +T}:T{ +Name +T}:T{ +Meaning +T} +.T& +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l. +T{ +00 +T}:T{ +UNKNOWN_EVENT +T}:T{ +This event should never be present in the log\&. +T} +T{ +01 +T}:T{ +START_EVENT_V3 +T}:T{ +This indicates the start of a log file written by MySQL 4 or earlier\&. +T} +T{ +02 +T}:T{ +QUERY_EVENT +T}:T{ +The most common type of events\&. These contain statements executed on the + master\&. +T} +T{ +03 +T}:T{ +STOP_EVENT +T}:T{ +Indicates that master has stopped\&. +T} +T{ +04 +T}:T{ +ROTATE_EVENT +T}:T{ +Written when the master switches to a new log file\&. +T} +T{ +05 +T}:T{ +INTVAR_EVENT +T}:T{ +Used for AUTO_INCREMENT values or when the + LAST_INSERT_ID() + function is used in the statement\&. +T} +T{ +06 +T}:T{ +LOAD_EVENT +T}:T{ +Used for LOAD DATA + INFILE in MySQL 3\&.23\&. +T} +T{ +07 +T}:T{ +SLAVE_EVENT +T}:T{ +Reserved for future use\&. +T} +T{ +08 +T}:T{ +CREATE_FILE_EVENT +T}:T{ +Used for LOAD DATA + INFILE statements\&. This indicates the + start of execution of such a statement\&. A temporary + file is created on the slave\&. Used in MySQL 4 only\&. +T} +T{ +09 +T}:T{ +APPEND_BLOCK_EVENT +T}:T{ +Contains data for use in a + LOAD DATA + INFILE statement\&. The data is stored in + the temporary file on the slave\&. +T} +T{ +0a +T}:T{ +EXEC_LOAD_EVENT +T}:T{ +Used for LOAD DATA + INFILE statements\&. The contents of the + temporary file is stored in the table on the slave\&. + Used in MySQL 4 only\&. +T} +T{ +0b +T}:T{ +DELETE_FILE_EVENT +T}:T{ +Rollback of a LOAD DATA + INFILE statement\&. The temporary file + should be deleted on the slave\&. +T} +T{ +0c +T}:T{ +NEW_LOAD_EVENT +T}:T{ +Used for LOAD DATA + INFILE in MySQL 4 and earlier\&. +T} +T{ +0d +T}:T{ +RAND_EVENT +T}:T{ +Used to send information about random values if the + RAND() function is + used in the statement\&. +T} +T{ +0e +T}:T{ +USER_VAR_EVENT +T}:T{ +Used to replicate user variables\&. +T} +T{ +0f +T}:T{ +FORMAT_DESCRIPTION_EVENT +T}:T{ +This indicates the start of a log file written by MySQL 5 or later\&. +T} +T{ +10 +T}:T{ +XID_EVENT +T}:T{ +Event indicating commit of an XA transaction\&. +T} +T{ +11 +T}:T{ +BEGIN_LOAD_QUERY_EVENT +T}:T{ +Used for LOAD DATA + INFILE statements in MySQL 5 and later\&. +T} +T{ +12 +T}:T{ +EXECUTE_LOAD_QUERY_EVENT +T}:T{ +Used for LOAD DATA + INFILE statements in MySQL 5 and later\&. +T} +T{ +13 +T}:T{ +TABLE_MAP_EVENT +T}:T{ +Information about a table definition\&. Used in MySQL 5\&.1\&.5 and later\&. +T} +T{ +14 +T}:T{ +PRE_GA_WRITE_ROWS_EVENT +T}:T{ +Row data for a single table that should be created\&. Used in MySQL 5\&.1\&.5 + to 5\&.1\&.17\&. +T} +T{ +15 +T}:T{ +PRE_GA_UPDATE_ROWS_EVENT +T}:T{ +Row data for a single table that needs to be updated\&. Used in MySQL + 5\&.1\&.5 to 5\&.1\&.17\&. +T} +T{ +16 +T}:T{ +PRE_GA_DELETE_ROWS_EVENT +T}:T{ +Row data for a single table that should be deleted\&. Used in MySQL 5\&.1\&.5 + to 5\&.1\&.17\&. +T} +T{ +17 +T}:T{ +WRITE_ROWS_EVENT +T}:T{ +Row data for a single table that should be created\&. Used in MySQL 5\&.1\&.18 + and later\&. +T} +T{ +18 +T}:T{ +UPDATE_ROWS_EVENT +T}:T{ +Row data for a single table that needs to be updated\&. Used in MySQL + 5\&.1\&.18 and later\&. +T} +T{ +19 +T}:T{ +DELETE_ROWS_EVENT +T}:T{ +Row data for a single table that should be deleted\&. Used in MySQL 5\&.1\&.18 + and later\&. +T} +T{ +1a +T}:T{ +INCIDENT_EVENT +T}:T{ +Something out of the ordinary happened\&. Added in MySQL 5\&.1\&.18\&. +T} +.TE +.sp 1 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Master ID: The server ID of the master that created the event\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Size: The size in bytes of the event\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Master Pos: The position of the next event in the original master log file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Flags: 16 flags\&. Currently, the following flags are used\&. The others are reserved for future use\&. +.TS +allbox tab(:); +lB lB lB. +T{ +Flag +T}:T{ +Name +T}:T{ +Meaning +T} +.T& +l l l +l l l +l l l +l l l. +T{ +01 +T}:T{ +LOG_EVENT_BINLOG_IN_USE_F +T}:T{ +Log file correctly closed\&. (Used only in + FORMAT_DESCRIPTION_EVENT\&.) If + this flag is set (if the flags are, for example, + \*(Aq01 00\*(Aq) in a + FORMAT_DESCRIPTION_EVENT, the log + file has not been properly closed\&. Most probably + this is because of a master crash (for example, due + to power failure)\&. +T} +T{ +02 +T}:T{ +\ \& +T}:T{ +Reserved for future use\&. +T} +T{ +04 +T}:T{ +LOG_EVENT_THREAD_SPECIFIC_F +T}:T{ +Set if the event is dependent on the connection it was executed in (for + example, \*(Aq04 00\*(Aq), for example, + if the event uses temporary tables\&. +T} +T{ +08 +T}:T{ +LOG_EVENT_SUPPRESS_USE_F +T}:T{ +Set in some circumstances when the event is not dependent on the default + database\&. +T} +.TE +.sp 1 +.RE +.SH "MYSQLBINLOG ROW EVENT DISPLAY" +.\" BINLOG statement: mysqlbinlog output +.PP +The following examples illustrate how +\fBmysqlbinlog\fR +displays row events that specify data modifications\&. These correspond to events with the +WRITE_ROWS_EVENT, +UPDATE_ROWS_EVENT, and +DELETE_ROWS_EVENT +type codes\&. The +\fB\-\-base64\-output=DECODE\-ROWS\fR +and +\fB\-\-verbose\fR +options may be used to affect row event output\&. +.PP +Suppose that the server is using row\-based binary logging and that you execute the following sequence of statements: +.sp +.if n \{\ +.RS 4 +.\} +.nf +CREATE TABLE t +( + id INT NOT NULL, + name VARCHAR(20) NOT NULL, + date DATE NULL +) ENGINE = InnoDB; +START TRANSACTION; +INSERT INTO t VALUES(1, \*(Aqapple\*(Aq, NULL); +UPDATE t SET name = \*(Aqpear\*(Aq, date = \*(Aq2009\-01\-01\*(Aq WHERE id = 1; +DELETE FROM t WHERE id = 1; +COMMIT; +.fi +.if n \{\ +.RE +.\} +.PP +By default, +\fBmysqlbinlog\fR +displays row events encoded as base\-64 strings using +BINLOG +statements\&. Omitting extraneous lines, the output for the row events produced by the preceding statement sequence looks like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog \fR\fB\fIlog_file\fR\fR +\&.\&.\&. +# at 218 +#080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F +BINLOG \*(Aq +fAS3SBMBAAAALAAAANoAAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ= +fAS3SBcBAAAAKAAAAAIBAAAQABEAAAAAAAEAA//8AQAAAAVhcHBsZQ== +\*(Aq/*!*/; +\&.\&.\&. +# at 302 +#080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F +BINLOG \*(Aq +fAS3SBMBAAAALAAAAC4BAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ= +fAS3SBgBAAAANgAAAGQBAAAQABEAAAAAAAEAA////AEAAAAFYXBwbGX4AQAAAARwZWFyIbIP +\*(Aq/*!*/; +\&.\&.\&. +# at 400 +#080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F +BINLOG \*(Aq +fAS3SBMBAAAALAAAAJABAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ= +fAS3SBkBAAAAKgAAALoBAAAQABEAAAAAAAEAA//4AQAAAARwZWFyIbIP +\*(Aq/*!*/; +.fi +.if n \{\ +.RE +.\} +.PP +To see the row events as comments in the form of +\(lqpseudo\-SQL\(rq +statements, run +\fBmysqlbinlog\fR +with the +\fB\-\-verbose\fR +or +\fB\-v\fR +option\&. The output will contain lines beginning with +###: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog \-v \fR\fB\fIlog_file\fR\fR +\&.\&.\&. +# at 218 +#080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F +BINLOG \*(Aq +fAS3SBMBAAAALAAAANoAAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ= +fAS3SBcBAAAAKAAAAAIBAAAQABEAAAAAAAEAA//8AQAAAAVhcHBsZQ== +\*(Aq/*!*/; +### INSERT INTO test\&.t +### SET +### @1=1 +### @2=\*(Aqapple\*(Aq +### @3=NULL +\&.\&.\&. +# at 302 +#080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F +BINLOG \*(Aq +fAS3SBMBAAAALAAAAC4BAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ= +fAS3SBgBAAAANgAAAGQBAAAQABEAAAAAAAEAA////AEAAAAFYXBwbGX4AQAAAARwZWFyIbIP +\*(Aq/*!*/; +### UPDATE test\&.t +### WHERE +### @1=1 +### @2=\*(Aqapple\*(Aq +### @3=NULL +### SET +### @1=1 +### @2=\*(Aqpear\*(Aq +### @3=\*(Aq2009:01:01\*(Aq +\&.\&.\&. +# at 400 +#080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F +BINLOG \*(Aq +fAS3SBMBAAAALAAAAJABAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ= +fAS3SBkBAAAAKgAAALoBAAAQABEAAAAAAAEAA//4AQAAAARwZWFyIbIP +\*(Aq/*!*/; +### DELETE FROM test\&.t +### WHERE +### @1=1 +### @2=\*(Aqpear\*(Aq +### @3=\*(Aq2009:01:01\*(Aq +.fi +.if n \{\ +.RE +.\} +.PP +Specify +\fB\-\-verbose\fR +or +\fB\-v\fR +twice to also display data types and some metadata for each column\&. The output will contain an additional comment following each column change: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog \-vv \fR\fB\fIlog_file\fR\fR +\&.\&.\&. +# at 218 +#080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F +BINLOG \*(Aq +fAS3SBMBAAAALAAAANoAAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ= +fAS3SBcBAAAAKAAAAAIBAAAQABEAAAAAAAEAA//8AQAAAAVhcHBsZQ== +\*(Aq/*!*/; +### INSERT INTO test\&.t +### SET +### @1=1 /* INT meta=0 nullable=0 is_null=0 */ +### @2=\*(Aqapple\*(Aq /* VARSTRING(20) meta=20 nullable=0 is_null=0 */ +### @3=NULL /* VARSTRING(20) meta=0 nullable=1 is_null=1 */ +\&.\&.\&. +# at 302 +#080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F +BINLOG \*(Aq +fAS3SBMBAAAALAAAAC4BAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ= +fAS3SBgBAAAANgAAAGQBAAAQABEAAAAAAAEAA////AEAAAAFYXBwbGX4AQAAAARwZWFyIbIP +\*(Aq/*!*/; +### UPDATE test\&.t +### WHERE +### @1=1 /* INT meta=0 nullable=0 is_null=0 */ +### @2=\*(Aqapple\*(Aq /* VARSTRING(20) meta=20 nullable=0 is_null=0 */ +### @3=NULL /* VARSTRING(20) meta=0 nullable=1 is_null=1 */ +### SET +### @1=1 /* INT meta=0 nullable=0 is_null=0 */ +### @2=\*(Aqpear\*(Aq /* VARSTRING(20) meta=20 nullable=0 is_null=0 */ +### @3=\*(Aq2009:01:01\*(Aq /* DATE meta=0 nullable=1 is_null=0 */ +\&.\&.\&. +# at 400 +#080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F +BINLOG \*(Aq +fAS3SBMBAAAALAAAAJABAAAAABEAAAAAAAAABHRlc3QAAXQAAwMPCgIUAAQ= +fAS3SBkBAAAAKgAAALoBAAAQABEAAAAAAAEAA//4AQAAAARwZWFyIbIP +\*(Aq/*!*/; +### DELETE FROM test\&.t +### WHERE +### @1=1 /* INT meta=0 nullable=0 is_null=0 */ +### @2=\*(Aqpear\*(Aq /* VARSTRING(20) meta=20 nullable=0 is_null=0 */ +### @3=\*(Aq2009:01:01\*(Aq /* DATE meta=0 nullable=1 is_null=0 */ +.fi +.if n \{\ +.RE +.\} +.PP +You can tell +\fBmysqlbinlog\fR +to suppress the +BINLOG +statements for row events by using the +\fB\-\-base64\-output=DECODE\-ROWS\fR +option\&. This is similar to +\fB\-\-base64\-output=NEVER\fR +but does not exit with an error if a row event is found\&. The combination of +\fB\-\-base64\-output=DECODE\-ROWS\fR +and +\fB\-\-verbose\fR +provides a convenient way to see row events only as SQL statements: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlbinlog \-v \-\-base64\-output=DECODE\-ROWS \fR\fB\fIlog_file\fR\fR +\&.\&.\&. +# at 218 +#080828 15:03:08 server id 1 end_log_pos 258 Write_rows: table id 17 flags: STMT_END_F +### INSERT INTO test\&.t +### SET +### @1=1 +### @2=\*(Aqapple\*(Aq +### @3=NULL +\&.\&.\&. +# at 302 +#080828 15:03:08 server id 1 end_log_pos 356 Update_rows: table id 17 flags: STMT_END_F +### UPDATE test\&.t +### WHERE +### @1=1 +### @2=\*(Aqapple\*(Aq +### @3=NULL +### SET +### @1=1 +### @2=\*(Aqpear\*(Aq +### @3=\*(Aq2009:01:01\*(Aq +\&.\&.\&. +# at 400 +#080828 15:03:08 server id 1 end_log_pos 442 Delete_rows: table id 17 flags: STMT_END_F +### DELETE FROM test\&.t +### WHERE +### @1=1 +### @2=\*(Aqpear\*(Aq +### @3=\*(Aq2009:01:01\*(Aq +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +You should not suppress +BINLOG +statements if you intend to re\-execute +\fBmysqlbinlog\fR +output\&. +.sp .5v +.RE +.PP +The SQL statements produced by +\fB\-\-verbose\fR +for row events are much more readable than the corresponding +BINLOG +statements\&. However, they do not correspond exactly to the original SQL statements that generated the events\&. The following limitations apply: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The original column names are lost and replaced by +@\fIN\fR, where +\fIN\fR +is a column number\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Character set information is not available in the binary log, which affects string column display: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +There is no distinction made between corresponding binary and nonbinary string types (BINARY +and +CHAR, +VARBINARY +and +VARCHAR, +BLOB +and +TEXT)\&. The output uses a data type of +STRING +for fixed\-length strings and +VARSTRING +for variable\-length strings\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +For multibyte character sets, the maximum number of bytes per character is not present in the binary log, so the length for string types is displayed in bytes rather than in characters\&. For example, +STRING(4) +will be used as the data type for values from either of these column types: +.sp +.if n \{\ +.RS 4 +.\} +.nf +CHAR(4) CHARACTER SET latin1 +CHAR(2) CHARACTER SET ucs2 +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Due to the storage format for events of type +UPDATE_ROWS_EVENT, +UPDATE +statements are displayed with the +WHERE +clause preceding the +SET +clause\&. +.RE +.RE +.PP +Proper interpretation of row events requires the information from the format description event at the beginning of the binary log\&. Because +\fBmysqlbinlog\fR +does not know in advance whether the rest of the log contains row events, by default it displays the format description event using a +BINLOG +statement in the initial part of the output\&. +.PP +If the binary log is known not to contain any events requiring a +BINLOG +statement (that is, no row events), the +\fB\-\-base64\-output=NEVER\fR +option can be used to prevent this header from being written\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +MySQL Internals: The Binary Log +.RS 4 +\%http://dev.mysql.com/doc/internals/en/binary-log.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqlbug.1 b/man/mysqlbug.1 new file mode 100644 index 000000000000..12b9a23c0d1b --- /dev/null +++ b/man/mysqlbug.1 @@ -0,0 +1,58 @@ +'\" t +.\" Title: \fBmysqlbug\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLBUG\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqlbug +.SH "NAME" +mysqlbug \- generate bug report +.SH "SYNOPSIS" +.HP \w'\fBmysqlbug\fR\ 'u +\fBmysqlbug\fR +.SH "DESCRIPTION" +.PP +This program is obsolete\&. +.PP +The normal way to report bugs is to visit +\m[blue]\fB\%http://bugs.mysql.com/\fR\m[], which is the address for our bugs database\&. This database is public and can be browsed and searched by anyone\&. If you log in to the system, you can enter new reports\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 new file mode 100644 index 000000000000..dc7f20615441 --- /dev/null +++ b/man/mysqlcheck.1 @@ -0,0 +1,1077 @@ +'\" t +.\" Title: \fBmysqlcheck\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLCHECK\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqlcheck +.\" maintenance: tables +.\" repair: tables +.\" tables: maintenance +.\" tables: repair +.SH "NAME" +mysqlcheck \- a table maintenance program +.SH "SYNOPSIS" +.HP \w'\fBmysqlcheck\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB\ \&.\&.\&.]]\fR\ 'u +\fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.]]\fR +.SH "DESCRIPTION" +.PP +The +\fBmysqlcheck\fR +client performs table maintenance: It checks, repairs, optimizes, or analyzes tables\&. +.PP +Each table is locked and therefore unavailable to other sessions while it is being processed, although for check operations, the table is locked with a +READ +lock only (see +Section\ \&13.3.5, \(lqLOCK TABLES and UNLOCK TABLES Syntax\(rq, for more information about +READ +and +WRITE +locks)\&. Table maintenance operations can be time\-consuming, particularly for large tables\&. If you use the +\fB\-\-databases\fR +or +\fB\-\-all\-databases\fR +option to process all tables in one or more databases, an invocation of +\fBmysqlcheck\fR +might take a long time\&. (This is also true for +\fBmysql_upgrade\fR +because that program invokes +\fBmysqlcheck\fR +to check all tables and repair them if necessary\&.) +.PP +\fBmysqlcheck\fR +is similar in function to +\fBmyisamchk\fR, but works differently\&. The main operational difference is that +\fBmysqlcheck\fR +must be used when the +\fBmysqld\fR +server is running, whereas +\fBmyisamchk\fR +should be used when it is not\&. The benefit of using +\fBmysqlcheck\fR +is that you do not have to stop the server to perform table maintenance\&. +.PP +\fBmysqlcheck\fR +uses the SQL statements +CHECK TABLE, +REPAIR TABLE, +ANALYZE TABLE, and +OPTIMIZE TABLE +in a convenient way for the user\&. It determines which statements to use for the operation you want to perform, and then sends the statements to the server to be executed\&. For details about which storage engines each statement works with, see the descriptions for those statements in +Section\ \&13.7.2, \(lqTable Maintenance Statements\(rq\&. +.PP +The +MyISAM +storage engine supports all four maintenance operations, so +\fBmysqlcheck\fR +can be used to perform any of them on +MyISAM +tables\&. Other storage engines do not necessarily support all operations\&. In such cases, an error message is displayed\&. For example, if +test\&.t +is a +MEMORY +table, an attempt to check it produces this result: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlcheck test t\fR +test\&.t +note : The storage engine for the table doesn\*(Aqt support check +.fi +.if n \{\ +.RE +.\} +.PP +If +\fBmysqlcheck\fR +is unable to repair a table, see +Section\ \&2.11.4, \(lqRebuilding or Repairing Tables or Indexes\(rq +for manual table repair strategies\&. This will be the case, for example, for +InnoDB +tables, which can be checked with +CHECK TABLE, but not repaired with +REPAIR TABLE\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBCaution\fR +.ps -1 +.br +.PP +It is best to make a backup of a table before performing a table repair operation; under some circumstances the operation might cause data loss\&. Possible causes include but are not limited to file system errors\&. +.sp .5v +.RE +.PP +There are three general ways to invoke +\fBmysqlcheck\fR: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.]\fR +shell> \fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] \-\-databases \fR\fB\fIdb_name\fR\fR\fB \&.\&.\&.\fR +shell> \fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] \-\-all\-databases\fR +.fi +.if n \{\ +.RE +.\} +.PP +If you do not name any tables following +\fIdb_name\fR +or if you use the +\fB\-\-databases\fR +or +\fB\-\-all\-databases\fR +option, entire databases are checked\&. +.PP +\fBmysqlcheck\fR +has a special feature compared to other client programs\&. The default behavior of checking tables (\fB\-\-check\fR) can be changed by renaming the binary\&. If you want to have a tool that repairs tables by default, you should just make a copy of +\fBmysqlcheck\fR +named +\fBmysqlrepair\fR, or make a symbolic link to +\fBmysqlcheck\fR +named +\fBmysqlrepair\fR\&. If you invoke +\fBmysqlrepair\fR, it repairs tables\&. +.PP +The names shown in the following table can be used to change +\fBmysqlcheck\fR +default behavior\&. +.TS +allbox tab(:); +lB lB. +T{ +Command +T}:T{ +Meaning +T} +.T& +l l +l l +l l. +T{ +\fBmysqlrepair\fR +T}:T{ +The default option is \fB\-\-repair\fR +T} +T{ +\fBmysqlanalyze\fR +T}:T{ +The default option is \fB\-\-analyze\fR +T} +T{ +\fBmysqloptimize\fR +T}:T{ +The default option is \fB\-\-optimize\fR +T} +.TE +.sp 1 +.PP +\fBmysqlcheck\fR +supports the following options, which can be specified on the command line or in the +[mysqlcheck] +and +[client] +groups of an option file\&. For information about option files used by MySQL programs, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: help option +.\" help option: mysqlcheck +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: all-databases option +.\" all-databases option: mysqlcheck +\fB\-\-all\-databases\fR, +\fB\-A\fR +.sp +Check all tables in all databases\&. This is the same as using the +\fB\-\-databases\fR +option and naming all the databases on the command line, except that the +INFORMATION_SCHEMA +and +performace_schema +databases are not dumped\&. They can be dumped by explicitly naming them with the +\fB\-\-databases\fR +option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: all-in-1 option +.\" all-in-1 option: mysqlcheck +\fB\-\-all\-in\-1\fR, +\fB\-1\fR +.sp +Instead of issuing a statement for each table, execute a single statement for each database that names all the tables from that database to be processed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: analyze option +.\" analyze option: mysqlcheck +\fB\-\-analyze\fR, +\fB\-a\fR +.sp +Analyze the tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: auto-repair option +.\" auto-repair option: mysqlcheck +\fB\-\-auto\-repair\fR +.sp +If a checked table is corrupted, automatically fix it\&. Any necessary repairs are done after all tables have been checked\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: bind-address option +.\" bind-address option: mysqlcheck +\fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR +.sp +On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. +.sp +This option is supported only in the version of +\fBmysqlcheck\fR +that is supplied with MySQL Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: character-sets-dir option +.\" character-sets-dir option: mysqlcheck +\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory where character sets are installed\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: check option +.\" check option: mysqlcheck +\fB\-\-check\fR, +\fB\-c\fR +.sp +Check the tables for errors\&. This is the default operation\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: check-only-changed option +.\" check-only-changed option: mysqlcheck +\fB\-\-check\-only\-changed\fR, +\fB\-C\fR +.sp +Check only tables that have changed since the last check or that have not been closed properly\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: check-upgrade option +.\" check-upgrade option: mysqlcheck +\fB\-\-check\-upgrade\fR, +\fB\-g\fR +.sp +Invoke +CHECK TABLE +with the +FOR UPGRADE +option to check tables for incompatibilities with the current version of the server\&. This option automatically enables the +\fB\-\-fix\-db\-names\fR +and +\fB\-\-fix\-table\-names\fR +options\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: compress option +.\" compress option: mysqlcheck +\fB\-\-compress\fR +.sp +Compress all information sent between the client and the server if both support compression\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: databases option +.\" databases option: mysqlcheck +\fB\-\-databases\fR, +\fB\-B\fR +.sp +Process all tables in the named databases\&. Normally, +\fBmysqlcheck\fR +treats the first name argument on the command line as a database name and following names as table names\&. With this option, it treats all name arguments as database names\&. +.sp +This option may be used to dump the +INFORMATION_SCHEMA +and +performace_schema +databases, which normally are not dumped even with the +\fB\-\-all\-databases\fR +option\&. (Also use the +\fB\-\-skip\-lock\-tables\fR +option\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: debug option +.\" debug option: mysqlcheck +\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, +\fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:o,\fIfile_name\fR\&. The default is +d:t:o\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: debug-check option +.\" debug-check option: mysqlcheck +\fB\-\-debug\-check\fR +.sp +Print some debugging information when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: debug-info option +.\" debug-info option: mysqlcheck +\fB\-\-debug\-info\fR +.sp +Print debugging information and memory and CPU usage statistics when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: default-character-set option +.\" default-character-set option: mysqlcheck +\fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR +.sp +Use +\fIcharset_name\fR +as the default character set\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: defaults-extra-file option +.\" defaults-extra-file option: mysqlcheck +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +.sp +Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: defaults-file option +.\" defaults-file option: mysqlcheck +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: defaults-group-suffix option +.\" defaults-group-suffix option: mysqlcheck +\fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR +.sp +Read not only the usual option groups, but also groups with the usual names and a suffix of +\fIstr\fR\&. For example, +\fBmysqlcheck\fR +normally reads the +[client] +and +[mysqlcheck] +groups\&. If the +\fB\-\-defaults\-group\-suffix=_other\fR +option is given, +\fBmysqlcheck\fR +also reads the +[client_other] +and +[mysqlcheck_other] +groups\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: extended option +.\" extended option: mysqlcheck +\fB\-\-extended\fR, +\fB\-e\fR +.sp +If you are using this option to check tables, it ensures that they are 100% consistent but takes a long time\&. +.sp +If you are using this option to repair tables, it runs an extended repair that may not only take a long time to execute, but may produce a lot of garbage rows also! +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: default-auth option +.\" default-auth option: mysqlcheck +\fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR +.sp +The client\-side authentication plugin to use\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: fast option +.\" fast option: mysqlcheck +\fB\-\-fast\fR, +\fB\-F\fR +.sp +Check only tables that have not been closed properly\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: fix-db-names option +.\" fix-db-names option: mysqlcheck +\fB\-\-fix\-db\-names\fR +.sp +Convert database names to 5\&.1 format\&. Only database names that contain special characters are affected\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: fix-table-names option +.\" fix-table-names option: mysqlcheck +\fB\-\-fix\-table\-names\fR +.sp +Convert table names to 5\&.1 format\&. Only table names that contain special characters are affected\&. This option also applies to views\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: force option +.\" force option: mysqlcheck +\fB\-\-force\fR, +\fB\-f\fR +.sp +Continue even if an SQL error occurs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: host option +.\" host option: mysqlcheck +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +Connect to the MySQL server on the given host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: medium-check option +.\" medium-check option: mysqlcheck +\fB\-\-medium\-check\fR, +\fB\-m\fR +.sp +Do a check that is faster than an +\fB\-\-extended\fR +operation\&. This finds only 99\&.99% of all errors, which should be good enough in most cases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: no-defaults option +.\" no-defaults option: mysqlcheck +\fB\-\-no\-defaults\fR +.sp +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: optimize option +.\" optimize option: mysqlcheck +\fB\-\-optimize\fR, +\fB\-o\fR +.sp +Optimize the tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: password option +.\" password option: mysqlcheck +\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you +\fIcannot\fR +have a space between the option and the password\&. If you omit the +\fIpassword\fR +value following the +\fB\-\-password\fR +or +\fB\-p\fR +option on the command line, +\fBmysqlcheck\fR +prompts for one\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: pipe option +.\" pipe option: mysql +\fB\-\-pipe\fR, +\fB\-W\fR +.sp +On Windows, connect to the server using a named pipe\&. This option applies only if the server supports named\-pipe connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: plugin-dir option +.\" plugin-dir option: mysqlcheck +\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory in which to look for plugins\&. It may be necessary to specify this option if the +\fB\-\-default\-auth\fR +option is used to specify an authentication plugin but +\fBmysqlcheck\fR +does not find it\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: port option +.\" port option: mysqlcheck +\fB\-\-port=\fR\fB\fIport_num\fR\fR, +\fB\-P \fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for the connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: print-defaults option +.\" print-defaults option: mysqlcheck +\fB\-\-print\-defaults\fR +.sp +Print the program name and all options that it gets from option files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: protocol option +.\" protocol option: mysqlcheck +\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR +.sp +The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: quick option +.\" quick option: mysqlcheck +\fB\-\-quick\fR, +\fB\-q\fR +.sp +If you are using this option to check tables, it prevents the check from scanning the rows to check for incorrect links\&. This is the fastest check method\&. +.sp +If you are using this option to repair tables, it tries to repair only the index tree\&. This is the fastest repair method\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: repair option +.\" repair option: mysqlcheck +\fB\-\-repair\fR, +\fB\-r\fR +.sp +Perform a repair that can fix almost anything except unique keys that are not unique\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: shared-memory-base-name option +.\" shared-memory-base-name option: mysqlcheck +\fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR +.sp +On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is +MYSQL\&. The shared\-memory name is case sensitive\&. +.sp +The server must be started with the +\fB\-\-shared\-memory\fR +option to enable shared\-memory connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: silent option +.\" silent option: mysqlcheck +\fB\-\-silent\fR, +\fB\-s\fR +.sp +Silent mode\&. Print only error messages\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: socket option +.\" socket option: mysqlcheck +\fB\-\-socket=\fR\fB\fIpath\fR\fR, +\fB\-S \fR\fB\fIpath\fR\fR +.sp +For connections to +localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: SSL options +.\" SSL options: mysqlcheck +\fB\-\-ssl*\fR +.sp +Options that begin with +\fB\-\-ssl\fR +specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See +Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: tables option +.\" tables option: mysqlcheck +\fB\-\-tables\fR +.sp +Override the +\fB\-\-databases\fR +or +\fB\-B\fR +option\&. All name arguments following the option are regarded as table names\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: use-frm option +.\" use-frm option: mysqlcheck +\fB\-\-use\-frm\fR +.sp +For repair operations on +MyISAM +tables, get the table structure from the +\&.frm +file so that the table can be repaired even if the +\&.MYI +header is corrupted\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: user option +.\" user option: mysqlcheck +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: verbose option +.\" verbose option: mysqlcheck +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print information about the various stages of program operation\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: version option +.\" version option: mysqlcheck +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlcheck: write-binlog option +.\" write-binlog option: mysqlcheck +\fB\-\-write\-binlog\fR +.sp +This option is enabled by default, so that +ANALYZE TABLE, +OPTIMIZE TABLE, and +REPAIR TABLE +statements generated by +\fBmysqlcheck\fR +are written to the binary log\&. Use +\fB\-\-skip\-write\-binlog\fR +to cause +NO_WRITE_TO_BINLOG +to be added to the statements so that they are not logged\&. Use the +\fB\-\-skip\-write\-binlog\fR +when these statements should not be sent to replication slaves or run when using the binary logs for recovery from backup\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqld.8 b/man/mysqld.8 new file mode 100644 index 000000000000..7eed14d07377 --- /dev/null +++ b/man/mysqld.8 @@ -0,0 +1,78 @@ +'\" t +.\" Title: \fBmysqld\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLD\FR" "8" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqld: MySQL server +.\" MySQL server: mysqld +.SH "NAME" +mysqld \- the MySQL server +.SH "SYNOPSIS" +.HP \w'\fBmysqld\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBmysqld [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBmysqld\fR, also known as MySQL Server, is the main program that does most of the work in a MySQL installation\&. MySQL Server manages access to the MySQL data directory that contains databases and tables\&. The data directory is also the default location for other information such as log files and status files\&. +.PP +When MySQL server starts, it listens for network connections from client programs and manages access to databases on behalf of those clients\&. +.PP +The +\fBmysqld\fR +program has many options that can be specified at startup\&. For a complete list of options, run this command: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqld \-\-verbose \-\-help\fR +.fi +.if n \{\ +.RE +.\} +.PP +MySQL Server also has a set of system variables that affect its operation as it runs\&. System variables can be set at server startup, and many of them can be changed at runtime to effect dynamic server reconfiguration\&. MySQL Server also has a set of status variables that provide information about its operation\&. You can monitor these status variables to access runtime performance characteristics\&. +.PP +For a full description of MySQL Server command options, system variables, and status variables, see +Section\ \&5.1, \(lqThe MySQL Server\(rq\&. For information about installing MySQL and setting up the initial configuration, see +Chapter\ \&2, Installing and Upgrading MySQL\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 new file mode 100644 index 000000000000..7874907ac511 --- /dev/null +++ b/man/mysqld_multi.1 @@ -0,0 +1,721 @@ +'\" t +.\" Title: \fBmysqld_multi\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLD_MULTI\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqld_multi +.\" tools: mysqld_multi +.\" scripts +.\" multi mysqld +.SH "NAME" +mysqld_multi \- manage multiple MySQL servers +.SH "SYNOPSIS" +.HP \w'\fBmysqld_multi\ [\fR\fB\fIoptions\fR\fR\fB]\ {start|stop|report}\ [\fR\fB\fIGNR\fR\fR\fB[,\fR\fB\fIGNR\fR\fR\fB]\ \&.\&.\&.]\fR\ 'u +\fBmysqld_multi [\fR\fB\fIoptions\fR\fR\fB] {start|stop|report} [\fR\fB\fIGNR\fR\fR\fB[,\fR\fB\fIGNR\fR\fR\fB] \&.\&.\&.]\fR +.SH "DESCRIPTION" +.PP +\fBmysqld_multi\fR +is designed to manage several +\fBmysqld\fR +processes that listen for connections on different Unix socket files and TCP/IP ports\&. It can start or stop servers, or report their current status\&. +.PP +\fBmysqld_multi\fR +searches for groups named +[mysqld\fIN\fR] +in +my\&.cnf +(or in the file named by the +\fB\-\-defaults\-file\fR +option)\&. +\fIN\fR +can be any positive integer\&. This number is referred to in the following discussion as the option group number, or +\fIGNR\fR\&. Group numbers distinguish option groups from one another and are used as arguments to +\fBmysqld_multi\fR +to specify which servers you want to start, stop, or obtain a status report for\&. Options listed in these groups are the same that you would use in the +[mysqld] +group used for starting +\fBmysqld\fR\&. (See, for example, +Section\ \&2.10.1.2, \(lqStarting and Stopping MySQL Automatically\(rq\&.) However, when using multiple servers, it is necessary that each one use its own value for options such as the Unix socket file and TCP/IP port number\&. For more information on which options must be unique per server in a multiple\-server environment, see +Section\ \&5.3, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. +.PP +To invoke +\fBmysqld_multi\fR, use the following syntax: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqld_multi [\fR\fB\fIoptions\fR\fR\fB] {start|stop|report} [\fR\fB\fIGNR\fR\fR\fB[,\fR\fB\fIGNR\fR\fR\fB] \&.\&.\&.]\fR +.fi +.if n \{\ +.RE +.\} +.PP +start, +stop, and +report +indicate which operation to perform\&. You can perform the designated operation for a single server or multiple servers, depending on the +\fIGNR\fR +list that follows the option name\&. If there is no list, +\fBmysqld_multi\fR +performs the operation for all servers in the option file\&. +.PP +Each +\fIGNR\fR +value represents an option group number or range of group numbers\&. The value should be the number at the end of the group name in the option file\&. For example, the +\fIGNR\fR +for a group named +[mysqld17] +is +17\&. To specify a range of numbers, separate the first and last numbers by a dash\&. The +\fIGNR\fR +value +10\-13 +represents groups +[mysqld10] +through +[mysqld13]\&. Multiple groups or group ranges can be specified on the command line, separated by commas\&. There must be no whitespace characters (spaces or tabs) in the +\fIGNR\fR +list; anything after a whitespace character is ignored\&. +.PP +This command starts a single server using option group +[mysqld17]: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqld_multi start 17\fR +.fi +.if n \{\ +.RE +.\} +.PP +This command stops several servers, using option groups +[mysqld8] +and +[mysqld10] +through +[mysqld13]: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqld_multi stop 8,10\-13\fR +.fi +.if n \{\ +.RE +.\} +.PP +For an example of how you might set up an option file, use this command: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqld_multi \-\-example\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysqld_multi\fR +searches for option files as follows: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: no-defaults option +.\" no-defaults option: mysqld_multi +With +\fB\-\-no\-defaults\fR, no option files are read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: defaults-file option +.\" defaults-file option: mysqld_multi +With +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR, only the named file is read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: defaults-extra-file option +.\" defaults-extra-file option: mysqld_multi +Otherwise, option files in the standard list of locations are read, including any file named by the +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +option, if one is given\&. (If the option is given multiple times, the last value is used\&.) +.RE +.PP +Option files read are searched for +[mysqld_multi] +and +[mysqld\fIN\fR] +option groups\&. The +[mysqld_multi] +group can be used for options to +\fBmysqld_multi\fR +itself\&. +[mysqld\fIN\fR] +groups can be used for options passed to specific +\fBmysqld\fR +instances\&. +.PP +The +[mysqld] +or +[mysqld_safe] +groups can be used for common options read by all instances of +\fBmysqld\fR +or +\fBmysqld_safe\fR\&. You can specify a +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +option to use a different configuration file for that instance, in which case the +[mysqld] +or +[mysqld_safe] +groups from that file will be used for that instance\&. +.PP +\fBmysqld_multi\fR +supports the following options\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: help option +.\" help option: mysqld_multi +\fB\-\-help\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: config-file option +.\" config-file option: mysqld_multi +\fB\-\-config\-file=\fR\fB\fIfile_name\fR\fR +.sp +This option is deprecated\&. If given, it is treated the same way as +\fB\-\-defaults\-extra\-file\fR, described earlier\&. +\fB\-\-config\-file\fR +was removed in MySQL 5\&.5\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: example option +.\" example option: mysqld_multi +\fB\-\-example\fR +.sp +Display a sample option file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: log option +.\" log option: mysqld_multi +\fB\-\-log=\fR\fB\fIfile_name\fR\fR +.sp +Specify the name of the log file\&. If the file exists, log output is appended to it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: mysqladmin option +.\" mysqladmin option: mysqld_multi +\fB\-\-mysqladmin=\fR\fB\fIprog_name\fR\fR +.sp +The +\fBmysqladmin\fR +binary to be used to stop servers\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: mysqld option +.\" mysqld option: mysqld_multi +\fB\-\-mysqld=\fR\fB\fIprog_name\fR\fR +.sp +The +\fBmysqld\fR +binary to be used\&. Note that you can specify +\fBmysqld_safe\fR +as the value for this option also\&. If you use +\fBmysqld_safe\fR +to start the server, you can include the +mysqld +or +ledir +options in the corresponding +[mysqld\fIN\fR] +option group\&. These options indicate the name of the server that +\fBmysqld_safe\fR +should start and the path name of the directory where the server is located\&. (See the descriptions for these options in +\fBmysqld_safe\fR(1)\&.) Example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[mysqld38] +mysqld = mysqld\-debug +ledir = /opt/local/mysql/libexec +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: no-log option +.\" no-log option: mysqld_multi +\fB\-\-no\-log\fR +.sp +Print log information to +stdout +rather than to the log file\&. By default, output goes to the log file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: password option +.\" password option: mysqld_multi +\fB\-\-password=\fR\fB\fIpassword\fR\fR +.sp +The password of the MySQL account to use when invoking +\fBmysqladmin\fR\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: silent option +.\" silent option: mysqld_multi +\fB\-\-silent\fR +.sp +Silent mode; disable warnings\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: tcp-ip option +.\" tcp-ip option: mysqld_multi +\fB\-\-tcp\-ip\fR +.sp +Connect to each MySQL server through the TCP/IP port instead of the Unix socket file\&. (If a socket file is missing, the server might still be running, but accessible only through the TCP/IP port\&.) By default, connections are made using the Unix socket file\&. This option affects +stop +and +report +operations\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: user option +.\" user option: mysqld_multi +\fB\-\-user=\fR\fB\fIuser_name\fR\fR +.sp +The user name of the MySQL account to use when invoking +\fBmysqladmin\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: verbose option +.\" verbose option: mysqld_multi +\fB\-\-verbose\fR +.sp +Be more verbose\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_multi: version option +.\" version option: mysqld_multi +\fB\-\-version\fR +.sp +Display version information and exit\&. +.RE +.PP +Some notes about +\fBmysqld_multi\fR: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBMost important\fR: Before using +\fBmysqld_multi\fR +be sure that you understand the meanings of the options that are passed to the +\fBmysqld\fR +servers and +\fIwhy\fR +you would want to have separate +\fBmysqld\fR +processes\&. Beware of the dangers of using multiple +\fBmysqld\fR +servers with the same data directory\&. Use separate data directories, unless you +\fIknow\fR +what you are doing\&. Starting multiple servers with the same data directory does +\fInot\fR +give you extra performance in a threaded system\&. See +Section\ \&5.3, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +Make sure that the data directory for each server is fully accessible to the Unix account that the specific +\fBmysqld\fR +process is started as\&. +\fIDo not\fR +use the Unix +\fIroot\fR +account for this, unless you +\fIknow\fR +what you are doing\&. See +Section\ \&6.1.5, \(lqHow to Run MySQL as a Normal User\(rq\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Make sure that the MySQL account used for stopping the +\fBmysqld\fR +servers (with the +\fBmysqladmin\fR +program) has the same user name and password for each server\&. Also, make sure that the account has the +SHUTDOWN +privilege\&. If the servers that you want to manage have different user names or passwords for the administrative accounts, you might want to create an account on each server that has the same user name and password\&. For example, you might set up a common +multi_admin +account by executing the following commands for each server: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql \-u root \-S /tmp/mysql\&.sock \-p\fR +Enter password: +mysql> \fBGRANT SHUTDOWN ON *\&.*\fR + \-> \fBTO \*(Aqmulti_admin\*(Aq@\*(Aqlocalhost\*(Aq IDENTIFIED BY \*(Aqmultipass\*(Aq;\fR +.fi +.if n \{\ +.RE +.\} +.sp +See +Section\ \&6.2, \(lqThe MySQL Access Privilege System\(rq\&. You have to do this for each +\fBmysqld\fR +server\&. Change the connection parameters appropriately when connecting to each one\&. Note that the host name part of the account name must permit you to connect as +multi_admin +from the host where you want to run +\fBmysqld_multi\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The Unix socket file and the TCP/IP port number must be different for every +\fBmysqld\fR\&. (Alternatively, if the host has multiple network addresses, you can use +\fB\-\-bind\-address\fR +to cause different servers to listen to different interfaces\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The +\fB\-\-pid\-file\fR +option is very important if you are using +\fBmysqld_safe\fR +to start +\fBmysqld\fR +(for example, +\fB\-\-mysqld=mysqld_safe\fR) Every +\fBmysqld\fR +should have its own process ID file\&. The advantage of using +\fBmysqld_safe\fR +instead of +\fBmysqld\fR +is that +\fBmysqld_safe\fR +monitors its +\fBmysqld\fR +process and restarts it if the process terminates due to a signal sent using +kill \-9 +or for other reasons, such as a segmentation fault\&. Please note that the +\fBmysqld_safe\fR +script might require that you start it from a certain place\&. This means that you might have to change location to a certain directory before running +\fBmysqld_multi\fR\&. If you have problems starting, please see the +\fBmysqld_safe\fR +script\&. Check especially the lines: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +MY_PWD=`pwd` +# Check if we are starting this relative (for the binary release) +if test \-d $MY_PWD/data/mysql \-a \e + \-f \&./share/mysql/english/errmsg\&.sys \-a \e + \-x \&./bin/mysqld +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +.fi +.if n \{\ +.RE +.\} +.sp +The test performed by these lines should be successful, or you might encounter problems\&. See +\fBmysqld_safe\fR(1)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +You might want to use the +\fB\-\-user\fR +option for +\fBmysqld\fR, but to do this you need to run the +\fBmysqld_multi\fR +script as the Unix superuser (root)\&. Having the option in the option file doesn\*(Aqt matter; you just get a warning if you are not the superuser and the +\fBmysqld\fR +processes are started under your own Unix account\&. +.RE +.PP +The following example shows how you might set up an option file for use with +\fBmysqld_multi\fR\&. The order in which the +\fBmysqld\fR +programs are started or stopped depends on the order in which they appear in the option file\&. Group numbers need not form an unbroken sequence\&. The first and fifth +[mysqld\fIN\fR] +groups were intentionally omitted from the example to illustrate that you can have +\(lqgaps\(rq +in the option file\&. This gives you more flexibility\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +# This file should probably be in your home dir (~/\&.my\&.cnf) +# or /etc/my\&.cnf +# Version 2\&.1 by Jani Tolonen +[mysqld_multi] +mysqld = /usr/local/bin/mysqld_safe +mysqladmin = /usr/local/bin/mysqladmin +user = multi_admin +password = multipass +[mysqld2] +socket = /tmp/mysql\&.sock2 +port = 3307 +pid\-file = /usr/local/mysql/var2/hostname\&.pid2 +datadir = /usr/local/mysql/var2 +language = /usr/local/share/mysql/english +user = john +[mysqld3] +socket = /tmp/mysql\&.sock3 +port = 3308 +pid\-file = /usr/local/mysql/var3/hostname\&.pid3 +datadir = /usr/local/mysql/var3 +language = /usr/local/share/mysql/swedish +user = monty +[mysqld4] +socket = /tmp/mysql\&.sock4 +port = 3309 +pid\-file = /usr/local/mysql/var4/hostname\&.pid4 +datadir = /usr/local/mysql/var4 +language = /usr/local/share/mysql/estonia +user = tonu +[mysqld6] +socket = /tmp/mysql\&.sock6 +port = 3311 +pid\-file = /usr/local/mysql/var6/hostname\&.pid6 +datadir = /usr/local/mysql/var6 +language = /usr/local/share/mysql/japanese +user = jani +.fi +.if n \{\ +.RE +.\} +.PP +See +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 new file mode 100644 index 000000000000..6d2e08253646 --- /dev/null +++ b/man/mysqld_safe.1 @@ -0,0 +1,889 @@ +'\" t +.\" Title: \fBmysqld_safe\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLD_SAFE\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqld_safe +.\" tools: mysqld_safe +.\" scripts +.SH "NAME" +mysqld_safe \- MySQL server startup script +.SH "SYNOPSIS" +.HP \w'\fBmysqld_safe\ \fR\fB\fIoptions\fR\fR\ 'u +\fBmysqld_safe \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBmysqld_safe\fR +is the recommended way to start a +\fBmysqld\fR +server on Unix\&. +\fBmysqld_safe\fR +adds some safety features such as restarting the server when an error occurs and logging runtime information to an error log file\&. A description of error logging is given later in this section\&. +.PP +\fBmysqld_safe\fR +tries to start an executable named +\fBmysqld\fR\&. To override the default behavior and specify explicitly the name of the server you want to run, specify a +\fB\-\-mysqld\fR +or +\fB\-\-mysqld\-version\fR +option to +\fBmysqld_safe\fR\&. You can also use +\fB\-\-ledir\fR +to indicate the directory where +\fBmysqld_safe\fR +should look for the server\&. +.PP +Many of the options to +\fBmysqld_safe\fR +are the same as the options to +\fBmysqld\fR\&. See +Section\ \&5.1.3, \(lqServer Command Options\(rq\&. +.PP +Options unknown to +\fBmysqld_safe\fR +are passed to +\fBmysqld\fR +if they are specified on the command line, but ignored if they are specified in the +[mysqld_safe] +group of an option file\&. See +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.PP +\fBmysqld_safe\fR +reads all options from the +[mysqld], +[server], and +[mysqld_safe] +sections in option files\&. For example, if you specify a +[mysqld] +section like this, +\fBmysqld_safe\fR +will find and use the +\fB\-\-log\-error\fR +option: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[mysqld] +log\-error=error\&.log +.fi +.if n \{\ +.RE +.\} +.PP +For backward compatibility, +\fBmysqld_safe\fR +also reads +[safe_mysqld] +sections, although it is preferable to rename +[safe_mysqld] +sections to +[mysqld_safe] +sections\&. +.PP +\fBmysqld_safe\fR +supports the following options\&. It also reads option files and supports the options for processing them described at +Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: help option +.\" help option: mysqld_safe +\fB\-\-help\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: basedir option +.\" basedir option: mysqld_safe +\fB\-\-basedir=\fR\fB\fIpath\fR\fR +.sp +The path to the MySQL installation directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: core-file-size option +.\" core-file-size option: mysqld_safe +\fB\-\-core\-file\-size=\fR\fB\fIsize\fR\fR +.sp +The size of the core file that +\fBmysqld\fR +should be able to create\&. The option value is passed to +\fBulimit \-c\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: datadir option +.\" datadir option: mysqld_safe +\fB\-\-datadir=\fR\fB\fIpath\fR\fR +.sp +The path to the data directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: defaults-extra-file option +.\" defaults-extra-file option: mysqld_safe +\fB\-\-defaults\-extra\-file=\fR\fB\fIpath\fR\fR +.sp +The name of an option file to be read in addition to the usual option files\&. This must be the first option on the command line if it is used\&. If the file does not exist or is otherwise inaccessible, the server will exit with an error\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: defaults-file option +.\" defaults-file option: mysqld_safe +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +The name of an option file to be read instead of the usual option files\&. This must be the first option on the command line if it is used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: ledir option +.\" ledir option: mysqld_safe +\fB\-\-ledir=\fR\fB\fIpath\fR\fR +.sp +If +\fBmysqld_safe\fR +cannot find the server, use this option to indicate the path name to the directory where the server is located\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: log-error option +.\" log-error option: mysqld_safe +\fB\-\-log\-error=\fR\fB\fIfile_name\fR\fR +.sp +Write the error log to the given file\&. See +Section\ \&5.2.2, \(lqThe Error Log\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: malloc-lib option +.\" mysqld option: malloc-lib +\fB\-\-malloc\-lib=[\fR\fB\fIlib_name\fR\fR\fB]\fR +.sp +The name of the library to use for memory allocation instead of the system +malloc() +library\&. Any library can be used by specifying its path name, but there is a shortcut form to enable use of the +tcmalloc +library that is shipped with binary MySQL distributions for Linux in MySQL 5\&.5\&. It is possible that the shortcut form will not work under certain configurations, in which case you should specify a path name instead\&. +.sp +The +\fB\-\-malloc\-lib\fR +option works by modifying the +LD_PRELOAD +environment value to affect dynamic linking to enable the loader to find the memory\-allocation library when +\fBmysqld\fR +runs: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If the option is not given, or is given without a value (\fB\-\-malloc\-lib=\fR), +LD_PRELOAD +is not modified and no attempt is made to use +tcmalloc\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If the option is given as +\fB\-\-malloc\-lib=tcmalloc\fR, +\fBmysqld_safe\fR +looks for a +tcmalloc +library in +/usr/lib +and then in the MySQL +pkglibdir +location (for example, +/usr/local/mysql/lib +or whatever is appropriate)\&. If +tmalloc +is found, its path name is added to the beginning of the +LD_PRELOAD +value for +\fBmysqld\fR\&. If +tcmalloc +is not found, +\fBmysqld_safe\fR +aborts with an error\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If the option is given as +\fB\-\-malloc\-lib=\fR\fB\fI/path/to/some/library\fR\fR, that full path is added to the beginning of the +LD_PRELOAD +value\&. If the full path points to a nonexistent or unreadable file, +\fBmysqld_safe\fR +aborts with an error\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +For cases where +\fBmysqld_safe\fR +adds a path name to +LD_PRELOAD, it adds the path to the beginning of any existing value the variable already has\&. +.RE +.sp +Linux users can use the +libtcmalloc_minimal\&.so +included in binary packages by adding these lines to the +my\&.cnf +file: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[mysqld_safe] +malloc\-lib=tcmalloc +.fi +.if n \{\ +.RE +.\} +.sp +Those lines also suffice for users on any platform who have installed a +tcmalloc +package in +/usr/lib\&. To use a specific +tcmalloc +library, specify its full path name\&. Example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[mysqld_safe] +malloc\-lib=/opt/lib/libtcmalloc_minimal\&.so +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: mysqld option +.\" mysqld option: mysqld_safe +\fB\-\-mysqld=\fR\fB\fIprog_name\fR\fR +.sp +The name of the server program (in the +ledir +directory) that you want to start\&. This option is needed if you use the MySQL binary distribution but have the data directory outside of the binary distribution\&. If +\fBmysqld_safe\fR +cannot find the server, use the +\fB\-\-ledir\fR +option to indicate the path name to the directory where the server is located\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: mysqld-version option +.\" mysqld-version option: mysqld_safe +\fB\-\-mysqld\-version=\fR\fB\fIsuffix\fR\fR +.sp +This option is similar to the +\fB\-\-mysqld\fR +option, but you specify only the suffix for the server program name\&. The basename is assumed to be +\fBmysqld\fR\&. For example, if you use +\fB\-\-mysqld\-version=debug\fR, +\fBmysqld_safe\fR +starts the +\fBmysqld\-debug\fR +program in the +ledir +directory\&. If the argument to +\fB\-\-mysqld\-version\fR +is empty, +\fBmysqld_safe\fR +uses +\fBmysqld\fR +in the +ledir +directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: nice option +.\" nice option: mysqld_safe +\fB\-\-nice=\fR\fB\fIpriority\fR\fR +.sp +Use the +nice +program to set the server\*(Aqs scheduling priority to the given value\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: no-defaults option +.\" no-defaults option: mysqld_safe +\fB\-\-no\-defaults\fR +.sp +Do not read any option files\&. This must be the first option on the command line if it is used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: open-files-limit option +.\" open-files-limit option: mysqld_safe +\fB\-\-open\-files\-limit=\fR\fB\fIcount\fR\fR +.sp +The number of files that +\fBmysqld\fR +should be able to open\&. The option value is passed to +\fBulimit \-n\fR\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +You must start +\fBmysqld_safe\fR +as +root +for this to function properly\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: pid-file option +.\" pid-file option: mysqld_safe +\fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR +.sp +The path name of the process ID file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: plugin-dir option +.\" plugin-dir option: mysqld_safe +\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +.sp +The path name of the plugin directory\&. This option was added in MySQL 5\&.5\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: port option +.\" port option: mysqld_safe +\fB\-\-port=\fR\fB\fIport_num\fR\fR +.sp +The port number that the server should use when listening for TCP/IP connections\&. The port number must be 1024 or higher unless the server is started by the +root +system user\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: skip-kill-mysqld option +.\" skip-kill-mysqld option: mysqld_safe +\fB\-\-skip\-kill\-mysqld\fR +.sp +Do not try to kill stray +\fBmysqld\fR +processes at startup\&. This option works only on Linux\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: socket option +.\" socket option: mysqld_safe +\fB\-\-socket=\fR\fB\fIpath\fR\fR +.sp +The Unix socket file that the server should use when listening for local connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: syslog option +.\" syslog option: mysqld_safe +.\" mysqld_safe: skip-syslog option +.\" skip-syslog option: mysqld_safe +\fB\-\-syslog\fR, +\fB\-\-skip\-syslog\fR +.sp +\fB\-\-syslog\fR +causes error messages to be sent to +syslog +on systems that support the +\fBlogger\fR +program\&. +\-\-skip\-syslog +suppresses the use of +syslog; messages are written to an error log file\&. +.sp +When +syslog +is used, the +daemon\&.err +syslog facility/severity is used for all log messages\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: syslog-tag option +.\" syslog-tag option: mysqld_safe +\fB\-\-syslog\-tag=\fR\fB\fItag\fR\fR +.sp +For logging to +syslog, messages from +\fBmysqld_safe\fR +and +\fBmysqld\fR +are written with identifiers of +mysqld_safe +and +mysqld, respectively\&. To specify a suffix for the identifiers, use +\fB\-\-syslog\-tag=\fR\fB\fItag\fR\fR, which modifies the identifiers to be +mysqld_safe\-\fItag\fR +and +mysqld\-\fItag\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: timezone option +.\" timezone option: mysqld_safe +\fB\-\-timezone=\fR\fB\fItimezone\fR\fR +.sp +Set the +TZ +time zone environment variable to the given option value\&. Consult your operating system documentation for legal time zone specification formats\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqld_safe: user option +.\" user option: mysqld_safe +\fB\-\-user={\fR\fB\fIuser_name\fR\fR\fB|\fR\fB\fIuser_id\fR\fR\fB}\fR +.sp +Run the +\fBmysqld\fR +server as the user having the name +\fIuser_name\fR +or the numeric user ID +\fIuser_id\fR\&. (\(lqUser\(rq +in this context refers to a system login account, not a MySQL user listed in the grant tables\&.) +.RE +.PP +If you execute +\fBmysqld_safe\fR +with the +\fB\-\-defaults\-file\fR +or +\fB\-\-defaults\-extra\-file\fR +option to name an option file, the option must be the first one given on the command line or the option file will not be used\&. For example, this command will not use the named option file: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBmysqld_safe \-\-port=\fR\fB\fIport_num\fR\fR\fB \-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +Instead, use the following command: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBmysqld_safe \-\-defaults\-file=\fR\fB\fIfile_name\fR\fR\fB \-\-port=\fR\fB\fIport_num\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +The +\fBmysqld_safe\fR +script is written so that it normally can start a server that was installed from either a source or a binary distribution of MySQL, even though these types of distributions typically install the server in slightly different locations\&. (See +Section\ \&2.1.5, \(lqInstallation Layouts\(rq\&.) +\fBmysqld_safe\fR +expects one of the following conditions to be true: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The server and databases can be found relative to the working directory (the directory from which +\fBmysqld_safe\fR +is invoked)\&. For binary distributions, +\fBmysqld_safe\fR +looks under its working directory for +bin +and +data +directories\&. For source distributions, it looks for +libexec +and +var +directories\&. This condition should be met if you execute +\fBmysqld_safe\fR +from your MySQL installation directory (for example, +/usr/local/mysql +for a binary distribution)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If the server and databases cannot be found relative to the working directory, +\fBmysqld_safe\fR +attempts to locate them by absolute path names\&. Typical locations are +/usr/local/libexec +and +/usr/local/var\&. The actual locations are determined from the values configured into the distribution at the time it was built\&. They should be correct if MySQL is installed in the location specified at configuration time\&. +.RE +.PP +Because +\fBmysqld_safe\fR +tries to find the server and databases relative to its own working directory, you can install a binary distribution of MySQL anywhere, as long as you run +\fBmysqld_safe\fR +from the MySQL installation directory: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBcd \fR\fB\fImysql_installation_directory\fR\fR +shell> \fBbin/mysqld_safe &\fR +.fi +.if n \{\ +.RE +.\} +.PP +If +\fBmysqld_safe\fR +fails, even when invoked from the MySQL installation directory, specify the +\fB\-\-ledir\fR +and +\fB\-\-datadir\fR +options to indicate the directories in which the server and databases are located on your system\&. +.PP +Beginning with MySQL 5\&.5\&.21, +\fBmysqld_safe\fR +tries to use the +\fBsleep\fR +and +\fBdate\fR +system utilities to determine how many times it has attempted to start this second, and\(emif these are present and this is greater than 5 times\(emis forced to wait 1 full second before starting again\&. This is intended to prevent excessive CPU usage in the event of repeated failures\&. (Bug #11761530, Bug #54035) +.PP +When you use +\fBmysqld_safe\fR +to start +\fBmysqld\fR, +\fBmysqld_safe\fR +arranges for error (and notice) messages from itself and from +\fBmysqld\fR +to go to the same destination\&. +.PP +There are several +\fBmysqld_safe\fR +options for controlling the destination of these messages: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-log\-error=\fR\fB\fIfile_name\fR\fR: Write error messages to the named error file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-syslog\fR: Write error messages to +syslog +on systems that support the +\fBlogger\fR +program\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-skip\-syslog\fR: Do not write error messages to +syslog\&. Messages are written to the default error log file (\fIhost_name\fR\&.err +in the data directory), or to a named file if the +\fB\-\-log\-error\fR +option is given\&. +.RE +.PP +If none of these options is given, the default is +\fB\-\-skip\-syslog\fR\&. +.PP +If +\fB\-\-log\-error\fR +and +\fB\-\-syslog\fR +are both given, a warning is issued and +\fB\-\-log\-error\fR +takes precedence\&. +.PP +When +\fBmysqld_safe\fR +writes a message, notices go to the logging destination (syslog +or the error log file) and +stdout\&. Errors go to the logging destination and +stderr\&. +.PP +Normally, you should not edit the +\fBmysqld_safe\fR +script\&. Instead, configure +\fBmysqld_safe\fR +by using command\-line options or options in the +[mysqld_safe] +section of a +my\&.cnf +option file\&. In rare cases, it might be necessary to edit +\fBmysqld_safe\fR +to get it to start the server properly\&. However, if you do this, your modified version of +\fBmysqld_safe\fR +might be overwritten if you upgrade MySQL in the future, so you should make a copy of your edited version that you can reinstall\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqldump.1 b/man/mysqldump.1 new file mode 100644 index 000000000000..4b7b8f7c4433 --- /dev/null +++ b/man/mysqldump.1 @@ -0,0 +1,2680 @@ +'\" t +.\" Title: \fBmysqldump\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLDUMP\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqldump +.\" dumping: databases and tables +.\" backups: databases and tables +.\" databases: dumping +.\" tables: dumping +.SH "NAME" +mysqldump \- a database backup program +.SH "SYNOPSIS" +.HP \w'\fBmysqldump\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB\ \&.\&.\&.]]\fR\ 'u +\fBmysqldump [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.]]\fR +.SH "DESCRIPTION" +.PP +The +\fBmysqldump\fR +client is a utility that performs +logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both\&. It dumps one or more MySQL database for backup or transfer to another SQL server\&. The +\fBmysqldump\fR +command can also generate output in CSV, other delimited text, or XML format\&. +.PP +\fBmysqldump\fR +requires at least the +SELECT +privilege for dumped tables, +SHOW VIEW +for dumped views, +TRIGGER +for dumped triggers, and +LOCK TABLES +if the +\fB\-\-single\-transaction\fR +option is not used\&. Certain options might require other privileges as noted in the option descriptions\&. +.PP +To reload a dump file, you must have the same privileges needed to create each of the dumped objects by issuing +CREATE +statements manually\&. +.PP +\fBmysqldump\fR +output can include +ALTER DATABASE +statements that change the database collation\&. These may be used when dumping stored programs to preserve their character encodings\&. To reload a dump file containing such statements, the +ALTER +privilege for the affected database is required\&. +.PP +If you are performing a backup on the server and your tables all are +MyISAM +tables, you can also use +\fBmysqlhotcopy\fR +for this purpose\&. +Performance and Scalability Considerations.PP +mysqldump +advantages include the convenience and flexibility of viewing or even editing the output before restoring\&. You can clone databases for development and DBA work, or produce slight variations of an existing database for testing\&. It is not intended as a fast or scalable solution for backing up substantial amounts of data\&. With large data sizes, even if the backup step takes a reasonable time, restoring the data can be very slow because replaying the SQL statements involves disk I/O for insertion, index creation, and so on\&. +.PP +For large\-scale backup and restore, a +physical +backup is more appropriate, to copy the data files in their original format that can be restored quickly: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If your tables are primarily +InnoDB +tables, or if you have a mix of +InnoDB +and +MyISAM +tables, consider using the +\fBmysqlbackup\fR +command of the MySQL Enterprise Backup product\&. (Available as part of the Enterprise subscription\&.) It provides the best performance for +InnoDB +backups with minimal disruption; it can also back up tables from +MyISAM +and other storage engines; and it provides a number of convenient options to accommodate different backup scenarios\&. See +Section\ \&25.2, \(lqMySQL Enterprise Backup\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If your tables are primarily +MyISAM +tables, consider using the +\fBmysqlhotcopy\fR +instead, for better performance than +\fBmysqldump\fR +of backup and restore operations\&. See +\fBmysqlhotcopy\fR(1)\&. +.RE +.PP +\fBmysqldump\fR +can retrieve and dump table contents row by row, or it can retrieve the entire content from a table and buffer it in memory before dumping it\&. Buffering in memory can be a problem if you are dumping large tables\&. To dump tables row by row, use the +\fB\-\-quick\fR +option (or +\fB\-\-opt\fR, which enables +\fB\-\-quick\fR)\&. The +\fB\-\-opt\fR +option (and hence +\fB\-\-quick\fR) is enabled by default, so to enable memory buffering, use +\fB\-\-skip\-quick\fR\&. +.PP +If you are using a recent version of +\fBmysqldump\fR +to generate a dump to be reloaded into a very old MySQL server, use the +\fB\-\-skip\-opt\fR +option instead of the +\fB\-\-opt\fR +or +\fB\-\-extended\-insert\fR +option\&. +.PP +For additional information about +\fBmysqldump\fR, see +Section\ \&7.4, \(lqUsing mysqldump for Backups\(rq\&. +Syntax.PP +There are in general three ways to use +\fBmysqldump\fR\(emin order to dump a set of one or more tables, a set of one or more complete databases, or an entire MySQL server\(emas shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqldump [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.]\fR +shell> \fBmysqldump [\fR\fB\fIoptions\fR\fR\fB] \-\-databases \fR\fB\fIdb_name\fR\fR\fB \&.\&.\&.\fR +shell> \fBmysqldump [\fR\fB\fIoptions\fR\fR\fB] \-\-all\-databases\fR +.fi +.if n \{\ +.RE +.\} +.PP +To dump entire databases, do not name any tables following +\fIdb_name\fR, or use the +\fB\-\-databases\fR +or +\fB\-\-all\-databases\fR +option\&. +.PP +\fBmysqldump\fR +does not dump the +INFORMATION_SCHEMA +or +performance_schema +database by default\&. To dump either of these, name it explicitly on the command line and also use the +\fB\-\-skip\-lock\-tables\fR +option\&. You can also name them with the +\fB\-\-databases\fR +option\&. Before MySQL 5\&.5 +\fBmysqldump\fR +silently ignores +INFORMATION_SCHEMA +even if you name it explicitly on the command line\&. +.PP +\fBmysqldump\fR +does not dump the +performance_schema +database\&. +.PP +Before MySQL 5\&.5\&.25, +\fBmysqldump\fR +does not dump the +general_log +or +slow_query_log +tables for dumps of the +mysql +database\&. As of 5\&.5\&.25, the dump includes statements to recreate those tables so that they are not missing after reloading the dump file\&. Log table contents are not dumped\&. +.PP +\fBmysqldump\fR +also does not dump the MySQL Cluster +ndbinfo +information database\&. +.PP +To see a list of the options your version of +\fBmysqldump\fR +supports, execute +\fBmysqldump \-\-help\fR\&. +.PP +Some +\fBmysqldump\fR +options are shorthand for groups of other options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Use of +\fB\-\-opt\fR +is the same as specifying +\fB\-\-add\-drop\-table\fR, +\fB\-\-add\-locks\fR, +\fB\-\-create\-options\fR, +\fB\-\-disable\-keys\fR, +\fB\-\-extended\-insert\fR, +\fB\-\-lock\-tables\fR, +\fB\-\-quick\fR, and +\fB\-\-set\-charset\fR\&. All of the options that +\fB\-\-opt\fR +stands for also are on by default because +\fB\-\-opt\fR +is on by default\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Use of +\fB\-\-compact\fR +is the same as specifying +\fB\-\-skip\-add\-drop\-table\fR, +\fB\-\-skip\-add\-locks\fR, +\fB\-\-skip\-comments\fR, +\fB\-\-skip\-disable\-keys\fR, and +\fB\-\-skip\-set\-charset\fR +options\&. +.RE +.PP +To reverse the effect of a group option, uses its +\fB\-\-skip\-\fR\fB\fIxxx\fR\fR +form (\fB\-\-skip\-opt\fR +or +\fB\-\-skip\-compact\fR)\&. It is also possible to select only part of the effect of a group option by following it with options that enable or disable specific features\&. Here are some examples: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +To select the effect of +\fB\-\-opt\fR +except for some features, use the +\fB\-\-skip\fR +option for each feature\&. To disable extended inserts and memory buffering, use +\fB\-\-opt\fR +\fB\-\-skip\-extended\-insert\fR +\fB\-\-skip\-quick\fR\&. (Actually, +\fB\-\-skip\-extended\-insert\fR +\fB\-\-skip\-quick\fR +is sufficient because +\fB\-\-opt\fR +is on by default\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +To reverse +\fB\-\-opt\fR +for all features except index disabling and table locking, use +\fB\-\-skip\-opt\fR +\fB\-\-disable\-keys\fR +\fB\-\-lock\-tables\fR\&. +.RE +.PP +When you selectively enable or disable the effect of a group option, order is important because options are processed first to last\&. For example, +\fB\-\-disable\-keys\fR +\fB\-\-lock\-tables\fR +\fB\-\-skip\-opt\fR +would not have the intended effect; it is the same as +\fB\-\-skip\-opt\fR +by itself\&. +.PP +\fBmysqldump\fR +can retrieve and dump table contents row by row, or it can retrieve the entire content from a table and buffer it in memory before dumping it\&. Buffering in memory can be a problem if you are dumping large tables\&. To dump tables row by row, use the +\fB\-\-quick\fR +option (or +\fB\-\-opt\fR, which enables +\fB\-\-quick\fR)\&. The +\fB\-\-opt\fR +option (and hence +\fB\-\-quick\fR) is enabled by default, so to enable memory buffering, use +\fB\-\-skip\-quick\fR\&. +.PP +If you are using a recent version of +\fBmysqldump\fR +to generate a dump to be reloaded into a very old MySQL server, you should not use the +\fB\-\-opt\fR +or +\fB\-\-extended\-insert\fR +option\&. Use +\fB\-\-skip\-opt\fR +instead\&. +.PP +For additional information about +\fBmysqldump\fR, see +Section\ \&7.4, \(lqUsing mysqldump for Backups\(rq\&. +.PP +\fBmysqldump\fR +supports the following options, which can be specified on the command line or in the +[mysqldump] +and +[client] +groups of an option file\&. For information about option files used by MySQL programs, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: help option +.\" help option: mysqldump +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: add-drop-database option +.\" add-drop-database option: mysqldump +\fB\-\-add\-drop\-database\fR +.sp +Add a +DROP DATABASE +statement before each +CREATE DATABASE +statement\&. This option is typically used in conjunction with the +\fB\-\-all\-databases\fR +or +\fB\-\-databases\fR +option because no +CREATE DATABASE +statements are written unless one of those options is specified\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: add-drop-table option +.\" add-drop-table option: mysqldump +\fB\-\-add\-drop\-table\fR +.sp +Add a +DROP TABLE +statement before each +CREATE TABLE +statement\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: add-drop-trigger option +.\" add-drop-trigger option: mysqldump +\fB\-\-add\-drop\-trigger\fR +.sp +Add a +DROP TRIGGER +statement before each +CREATE TRIGGER +statement\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This option is supported only by +\fBmysqldump\fR +as supplied with MySQL Cluster\&. It is not available when using MySQL Server 5\&.5\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: add-locks option +.\" add-locks option: mysqldump +\fB\-\-add\-locks\fR +.sp +Surround each table dump with +LOCK TABLES +and +UNLOCK TABLES +statements\&. This results in faster inserts when the dump file is reloaded\&. See +Section\ \&8.2.2.1, \(lqSpeed of INSERT Statements\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: all-databases option +.\" all-databases option: mysqldump +\fB\-\-all\-databases\fR, +\fB\-A\fR +.sp +Dump all tables in all databases\&. This is the same as using the +\fB\-\-databases\fR +option and naming all the databases on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: all-tablespaces option +.\" all-tablespaces option: mysqldump +\fB\-\-all\-tablespaces\fR, +\fB\-Y\fR +.sp +Adds to a table dump all SQL statements needed to create any tablespaces used by an +NDBCLUSTER +table\&. This information is not otherwise included in the output from +\fBmysqldump\fR\&. This option is currently relevant only to MySQL Cluster tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: allow-keywords option +.\" allow-keywords option: mysqldump +\fB\-\-allow\-keywords\fR +.sp +Permit creation of column names that are keywords\&. This works by prefixing each column name with the table name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: apply-slave-statements option +.\" apply-slave-statements option: mysqldump +\fB\-\-apply\-slave\-statements\fR +.sp +For a slave dump produced with the +\fB\-\-dump\-slave\fR +option, add a +STOP SLAVE +statement before the +CHANGE MASTER TO +statement and a +START SLAVE +statement at the end of the output\&. This option was added in MySQL 5\&.5\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: bind-address option +.\" bind-address option: mysqldump +\fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR +.sp +On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. +.sp +This option is supported only in the version of +\fBmysqldump\fR +that is supplied with MySQL Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: character-sets-dir option +.\" character-sets-dir option: mysqldump +\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory where character sets are installed\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: comments option +.\" comments option: mysqldump +\fB\-\-comments\fR, +\fB\-i\fR +.sp +Write additional information in the dump file such as program version, server version, and host\&. This option is enabled by default\&. To suppress this additional information, use +\fB\-\-skip\-comments\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: compact option +.\" compact option: mysqldump +\fB\-\-compact\fR +.sp +Produce more compact output\&. This option enables the +\fB\-\-skip\-add\-drop\-table\fR, +\fB\-\-skip\-add\-locks\fR, +\fB\-\-skip\-comments\fR, +\fB\-\-skip\-disable\-keys\fR, and +\fB\-\-skip\-set\-charset\fR +options\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: compatible option +.\" compatible option: mysqldump +\fB\-\-compatible=\fR\fB\fIname\fR\fR +.sp +Produce output that is more compatible with other database systems or with older MySQL servers\&. The value of +\fIname\fR +can be +ansi, +mysql323, +mysql40, +postgresql, +oracle, +mssql, +db2, +maxdb, +no_key_options, +no_table_options, or +no_field_options\&. To use several values, separate them by commas\&. These values have the same meaning as the corresponding options for setting the server SQL mode\&. See +Section\ \&5.1.7, \(lqServer SQL Modes\(rq\&. +.sp +This option does not guarantee compatibility with other servers\&. It only enables those SQL mode values that are currently available for making dump output more compatible\&. For example, +\fB\-\-compatible=oracle\fR +does not map data types to Oracle types or use Oracle comment syntax\&. +.sp +\fIThis option requires a server version of 4\&.1\&.0 or higher\fR\&. With older servers, it does nothing\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: complete-insert option +.\" complete-insert option: mysqldump +\fB\-\-complete\-insert\fR, +\fB\-c\fR +.sp +Use complete +INSERT +statements that include column names\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: compress option +.\" compress option: mysqldump +\fB\-\-compress\fR, +\fB\-C\fR +.sp +Compress all information sent between the client and the server if both support compression\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: create-options option +.\" create-options option: mysqldump +\fB\-\-create\-options\fR +.sp +Include all MySQL\-specific table options in the +CREATE TABLE +statements\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: databases option +.\" databases option: mysqldump +\fB\-\-databases\fR, +\fB\-B\fR +.sp +Dump several databases\&. Normally, +\fBmysqldump\fR +treats the first name argument on the command line as a database name and following names as table names\&. With this option, it treats all name arguments as database names\&. +CREATE DATABASE +and +USE +statements are included in the output before each new database\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: debug option +.\" debug option: mysqldump +\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, +\fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:o,\fIfile_name\fR\&. The default value is +d:t:o,/tmp/mysqldump\&.trace\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: debug-check option +.\" debug-check option: mysqldump +\fB\-\-debug\-check\fR +.sp +Print some debugging information when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: debug-info option +.\" debug-info option: mysqldump +\fB\-\-debug\-info\fR +.sp +Print debugging information and memory and CPU usage statistics when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: default-auth option +.\" default-auth option: mysqldump +\fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR +.sp +The client\-side authentication plugin to use\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.9\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: default-character-set option +.\" default-character-set option: mysqldump +\fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR +.sp +Use +\fIcharset_name\fR +as the default character set\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. If no character set is specified, +\fBmysqldump\fR +uses +utf8\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: defaults-extra-file option +.\" defaults-extra-file option: mysqldump +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +.sp +Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: defaults-file option +.\" defaults-file option: mysqldump +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: defaults-group-suffix option +.\" defaults-group-suffix option: mysqldump +\fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR +.sp +Read not only the usual option groups, but also groups with the usual names and a suffix of +\fIstr\fR\&. For example, +\fBmysqldump\fR +normally reads the +[client] +and +[mysqldump] +groups\&. If the +\fB\-\-defaults\-group\-suffix=_other\fR +option is given, +\fBmysqldump\fR +also reads the +[client_other] +and +[mysqldump_other] +groups\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: delayed-insert option +.\" delayed-insert option: mysqldump +\fB\-\-delayed\-insert\fR +.sp +Write +INSERT DELAYED +statements rather than +INSERT +statements\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: delete-master-logs option +.\" delete-master-logs option: mysqldump +\fB\-\-delete\-master\-logs\fR +.sp +On a master replication server, delete the binary logs by sending a +PURGE BINARY LOGS +statement to the server after performing the dump operation\&. This option automatically enables +\fB\-\-master\-data\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: disable-keys option +.\" disable-keys option: mysqldump +\fB\-\-disable\-keys\fR, +\fB\-K\fR +.sp +For each table, surround the +INSERT +statements with +/*!40000 ALTER TABLE \fItbl_name\fR DISABLE KEYS */; +and +/*!40000 ALTER TABLE \fItbl_name\fR ENABLE KEYS */; +statements\&. This makes loading the dump file faster because the indexes are created after all rows are inserted\&. This option is effective only for nonunique indexes of +MyISAM +tables\&. It has no effect for other tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: dump-date option +.\" dump-date option: mysqldump +\fB\-\-dump\-date\fR +.sp +If the +\fB\-\-comments\fR +option is given, +\fBmysqldump\fR +produces a comment at the end of the dump of the following form: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-\- Dump completed on \fIDATE\fR +.fi +.if n \{\ +.RE +.\} +.sp +However, the date causes dump files taken at different times to appear to be different, even if the data are otherwise identical\&. +\fB\-\-dump\-date\fR +and +\fB\-\-skip\-dump\-date\fR +control whether the date is added to the comment\&. The default is +\fB\-\-dump\-date\fR +(include the date in the comment)\&. +\fB\-\-skip\-dump\-date\fR +suppresses date printing\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: dump-slave option +.\" dump-slave option: mysqldump +\fB\-\-dump\-slave[=\fR\fB\fIvalue\fR\fR\fB]\fR +.sp +This option is similar to +\fB\-\-master\-data\fR +except that it is used to dump a replication slave server to produce a dump file that can be used to set up another server as a slave that has the same master as the dumped server\&. It causes the dump output to include a +CHANGE MASTER TO +statement that indicates the binary log coordinates (file name and position) of the dumped slave\*(Aqs master\&. These are the master server coordinates from which the slave should start replicating\&. +.sp +\fB\-\-dump\-slave\fR +causes the coordinates from the master to be used rather than those of the dumped server, as is done by the +\fB\-\-master\-data\fR +option\&. In addition, specfiying this option causes the +\fB\-\-master\-data\fR +option to be overridden, if used, and effectively ignored\&. +.sp +The option value is handled the same way as for +\fB\-\-master\-data\fR +(setting no value or 1 causes a +CHANGE MASTER TO +statement to be written to the dump, setting 2 causes the statement to be written but encased in SQL comments) and has the same effect as +\fB\-\-master\-data\fR +in terms of enabling or disabling other options and in how locking is handled\&. +.sp +This option causes +\fBmysqldump\fR +to stop the slave SQL thread before the dump and restart it again after\&. +.sp +In conjunction with +\fB\-\-dump\-slave\fR, the +\fB\-\-apply\-slave\-statements\fR +and +\fB\-\-include\-master\-host\-port\fR +options can also be used\&. +.sp +This option was added in MySQL 5\&.5\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: events option +.\" events option: mysqldump +\fB\-\-events\fR, +\fB\-E\fR +.sp +Include Event Scheduler events for the dumped databases in the output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: extended-insert option +.\" extended-insert option: mysqldump +\fB\-\-extended\-insert\fR, +\fB\-e\fR +.sp +Use multiple\-row +INSERT +syntax that include several +VALUES +lists\&. This results in a smaller dump file and speeds up inserts when the file is reloaded\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: fields-terminated-by option +.\" fields-terminated-by option: mysqldump +\fB\-\-fields\-terminated\-by=\&.\&.\&.\fR, +.\" mysqldump: fields-enclosed-by option +.\" fields-enclosed-by option: mysqldump +\fB\-\-fields\-enclosed\-by=\&.\&.\&.\fR, +.\" mysqldump: fields-optionally-enclosed-by option +.\" fields-optionally-enclosed-by option: mysqldump +\fB\-\-fields\-optionally\-enclosed\-by=\&.\&.\&.\fR, +.\" mysqldump: fields-escaped-by option +.\" fields-escaped-by option: mysqldump +\fB\-\-fields\-escaped\-by=\&.\&.\&.\fR +.sp +These options are used with the +\fB\-\-tab\fR +option and have the same meaning as the corresponding +FIELDS +clauses for +LOAD DATA INFILE\&. See +Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: first-slave option +.\" first-slave option: mysqldump +\fB\-\-first\-slave\fR +.sp +Deprecated\&. Use +\fB\-\-lock\-all\-tables\fR +instead\&. +\fB\-\-first\-slave\fR +was removed in MySQL 5\&.5\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: flush-logs option +.\" flush-logs option: mysqldump +\fB\-\-flush\-logs\fR, +\fB\-F\fR +.sp +Flush the MySQL server log files before starting the dump\&. This option requires the +RELOAD +privilege\&. If you use this option in combination with the +\fB\-\-all\-databases\fR +option, the logs are flushed +\fIfor each database dumped\fR\&. The exception is when using +\fB\-\-lock\-all\-tables\fR, +\fB\-\-master\-data\fR, or (as of MySQL 5\&.5\&.21) +\fB\-\-single\-transaction\fR: In this case, the logs are flushed only once, corresponding to the moment that all tables are locked\&. If you want your dump and the log flush to happen at exactly the same moment, you should use +\fB\-\-flush\-logs\fR +together with +\fB\-\-lock\-all\-tables\fR, +\fB\-\-master\-data\fR, or +\fB\-\-single\-transaction\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: flush-privileges option +.\" flush-privileges option: mysqldump +\fB\-\-flush\-privileges\fR +.sp +Add a +FLUSH PRIVILEGES +statement to the dump output after dumping the +mysql +database\&. This option should be used any time the dump contains the +mysql +database and any other database that depends on the data in the +mysql +database for proper restoration\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: force option +.\" force option: mysqldump +\fB\-\-force\fR, +\fB\-f\fR +.sp +Continue even if an SQL error occurs during a table dump\&. +.sp +One use for this option is to cause +\fBmysqldump\fR +to continue executing even when it encounters a view that has become invalid because the definition refers to a table that has been dropped\&. Without +\fB\-\-force\fR, +\fBmysqldump\fR +exits with an error message\&. With +\fB\-\-force\fR, +\fBmysqldump\fR +prints the error message, but it also writes an SQL comment containing the view definition to the dump output and continues executing\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: host option +.\" host option: mysqldump +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +Dump data from the MySQL server on the given host\&. The default host is +localhost\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: hex-blob option +.\" hex-blob option: mysqldump +\fB\-\-hex\-blob\fR +.sp +Dump binary columns using hexadecimal notation (for example, +\*(Aqabc\*(Aq +becomes +0x616263)\&. The affected data types are +BINARY, +VARBINARY, the +BLOB +types, and +BIT\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: include-master-host-port option +.\" include-master-host-port option: mysqldump +\fB\-\-include\-master\-host\-port\fR +.sp +For the +CHANGE MASTER TO +statement in a slave dump produced with the +\fB\-\-dump\-slave\fR +option, add +MASTER_HOST +and +MASTER_PORT +options for the host name and TCP/IP port number of the slave\*(Aqs master\&. This option was added in MySQL 5\&.5\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: ignore-table option +.\" ignore-table option: mysqldump +\fB\-\-ignore\-table=\fR\fB\fIdb_name\&.tbl_name\fR\fR +.sp +Do not dump the given table, which must be specified using both the database and table names\&. To ignore multiple tables, use this option multiple times\&. This option also can be used to ignore views\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: insert-ignore option +.\" insert-ignore option: mysqldump +\fB\-\-insert\-ignore\fR +.sp +Write +INSERT IGNORE +statements rather than +INSERT +statements\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: lines-terminated-by option +.\" lines-terminated-by option: mysqldump +\fB\-\-lines\-terminated\-by=\&.\&.\&.\fR +.sp +This option is used with the +\fB\-\-tab\fR +option and has the same meaning as the corresponding +LINES +clause for +LOAD DATA INFILE\&. See +Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: lock-all-tables option +.\" lock-all-tables option: mysqldump +\fB\-\-lock\-all\-tables\fR, +\fB\-x\fR +.sp +Lock all tables across all databases\&. This is achieved by acquiring a global read lock for the duration of the whole dump\&. This option automatically turns off +\fB\-\-single\-transaction\fR +and +\fB\-\-lock\-tables\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: lock-tables option +.\" lock-tables option: mysqldump +\fB\-\-lock\-tables\fR, +\fB\-l\fR +.sp +For each dumped database, lock all tables to be dumped before dumping them\&. The tables are locked with +READ LOCAL +to permit concurrent inserts in the case of +MyISAM +tables\&. For transactional tables such as +InnoDB, +\fB\-\-single\-transaction\fR +is a much better option than +\fB\-\-lock\-tables\fR +because it does not need to lock the tables at all\&. +.sp +Because +\fB\-\-lock\-tables\fR +locks tables for each database separately, this option does not guarantee that the tables in the dump file are logically consistent between databases\&. Tables in different databases may be dumped in completely different states\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: log-error option +.\" log-error option: mysqldump +\fB\-\-log\-error=\fR\fB\fIfile_name\fR\fR +.sp +Log warnings and errors by appending them to the named file\&. The default is to do no logging\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: master-data option +.\" master-data option: mysqldump +\fB\-\-master\-data[=\fR\fB\fIvalue\fR\fR\fB]\fR +.sp +Use this option to dump a master replication server to produce a dump file that can be used to set up another server as a slave of the master\&. It causes the dump output to include a +CHANGE MASTER TO +statement that indicates the binary log coordinates (file name and position) of the dumped server\&. These are the master server coordinates from which the slave should start replicating after you load the dump file into the slave\&. +.sp +If the option value is 2, the +CHANGE MASTER TO +statement is written as an SQL comment, and thus is informative only; it has no effect when the dump file is reloaded\&. If the option value is 1, the statement is not written as a comment and takes effect when the dump file is reloaded\&. If no option value is specified, the default value is 1\&. +.sp +This option requires the +RELOAD +privilege and the binary log must be enabled\&. +.sp +The +\fB\-\-master\-data\fR +option automatically turns off +\fB\-\-lock\-tables\fR\&. It also turns on +\fB\-\-lock\-all\-tables\fR, unless +\fB\-\-single\-transaction\fR +also is specified, in which case, a global read lock is acquired only for a short time at the beginning of the dump (see the description for +\fB\-\-single\-transaction\fR)\&. In all cases, any action on logs happens at the exact moment of the dump\&. +.sp +It is also possible to set up a slave by dumping an existing slave of the master\&. In MySQL 5\&.5\&.3 and later, you can create such a dump using the +\fB\-\-dump\-slave\fR +option, which overrides +\fB\-\-master\-data\fR +and causes it to be ignored if both options are used\&. +.sp +In MySQL 5\&.2\&.2 and earlier, use the following procedure on the existing slave: +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +Stop the slave\*(Aqs SQL thread and get its current status: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBSTOP SLAVE SQL_THREAD;\fR +mysql> \fBSHOW SLAVE STATUS;\fR +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +From the output of the +SHOW SLAVE STATUS +statement, the binary log coordinates of the master server from which the new slave should start replicating are the values of the +Relay_Master_Log_File +and +Exec_Master_Log_Pos +fields\&. Denote those values as +\fIfile_name\fR +and +\fIfile_pos\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 3.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 3." 4.2 +.\} +Dump the slave server: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqldump \-\-master\-data=2 \-\-all\-databases > dumpfile\fR +.fi +.if n \{\ +.RE +.\} +.sp +Using +\fB\-\-master\-data=2\fR +works only if binary logging has been enabled on the slave\&. Otherwise, +\fBmysqldump\fR +fails with the error +Binlogging on server not active\&. In this case you must handle any locking issues in another manner, using one or more of +\fB\-\-add\-locks\fR, +\fB\-\-lock\-tables\fR, +\fB\-\-lock\-all\-tables\fR, or +\fB\-\-single\-transaction\fR, as required by your application and environment\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 4.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 4." 4.2 +.\} +Restart the slave: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBSTART SLAVE;\fR +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 5.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 5." 4.2 +.\} +On the new slave, load the dump file: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql < dumpfile\fR +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 6.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 6." 4.2 +.\} +On the new slave, set the replication coordinates to those of the master server obtained earlier: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBCHANGE MASTER TO\fR + \-> \fBMASTER_LOG_FILE = \*(Aq\fR\fB\fIfile_name\fR\fR\fB\*(Aq, MASTER_LOG_POS = \fR\fB\fIfile_pos\fR\fR\fB;\fR +.fi +.if n \{\ +.RE +.\} +.sp +The +CHANGE MASTER TO +statement might also need other parameters, such as +MASTER_HOST +to point the slave to the correct master server host\&. Add any such parameters as necessary\&. +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: no-autocommit option +.\" no-autocommit option: mysqldump +\fB\-\-no\-autocommit\fR +.sp +Enclose the +INSERT +statements for each dumped table within +SET autocommit = 0 +and +COMMIT +statements\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: no-create-db option +.\" no-create-db option: mysqldump +\fB\-\-no\-create\-db\fR, +\fB\-n\fR +.sp +This option suppresses the +CREATE DATABASE +statements that are otherwise included in the output if the +\fB\-\-databases\fR +or +\fB\-\-all\-databases\fR +option is given\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: no-create-info option +.\" no-create-info option: mysqldump +\fB\-\-no\-create\-info\fR, +\fB\-t\fR +.sp +Do not write +CREATE TABLE +statements that re\-create each dumped table\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This option does +\fInot\fR +not exclude statements creating log file groups or tablespaces from +\fBmysqldump\fR +output; however, you can use the +\fB\-\-no\-tablespaces\fR +option for this purpose\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: no-data option +.\" no-data option: mysqldump +\fB\-\-no\-data\fR, +\fB\-d\fR +.sp +Do not write any table row information (that is, do not dump table contents)\&. This is useful if you want to dump only the +CREATE TABLE +statement for the table (for example, to create an empty copy of the table by loading the dump file)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: no-defaults option +.\" no-defaults option: mysqldump +\fB\-\-no\-defaults\fR +.sp +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: no-set-names option +.\" no-set-names option: mysqldump +\fB\-\-no\-set\-names\fR, +\fB\-N\fR +.sp +This has the same effect as +\fB\-\-skip\-set\-charset\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: no-tablespaces option +.\" no-tablespaces option: mysqldump +\fB\-\-no\-tablespaces\fR, +\fB\-y\fR +.sp +This option suppresses all +CREATE LOGFILE GROUP +and +CREATE TABLESPACE +statements in the output of +\fBmysqldump\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: opt option +.\" opt option: mysqldump +\fB\-\-opt\fR +.sp +This option is shorthand\&. It is the same as specifying +\fB\-\-add\-drop\-table\fR +\fB\-\-add\-locks\fR +\fB\-\-create\-options\fR +\fB\-\-disable\-keys\fR +\fB\-\-extended\-insert\fR +\fB\-\-lock\-tables\fR +\fB\-\-quick\fR +\fB\-\-set\-charset\fR\&. It should give you a fast dump operation and produce a dump file that can be reloaded into a MySQL server quickly\&. +.sp +\fIThe \fR\fI\fB\-\-opt\fR\fR\fI option is enabled by default\&. Use \fR\fI\fB\-\-skip\-opt\fR\fR\fI to disable it\&.\fR +See the discussion at the beginning of this section for information about selectively enabling or disabling a subset of the options affected by +\fB\-\-opt\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: order-by-primary option +.\" order-by-primary option: mysqldump +\fB\-\-order\-by\-primary\fR +.sp +Dump each table\*(Aqs rows sorted by its primary key, or by its first unique index, if such an index exists\&. This is useful when dumping a +MyISAM +table to be loaded into an +InnoDB +table, but will make the dump operation take considerably longer\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: password option +.\" password option: mysqldump +\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you +\fIcannot\fR +have a space between the option and the password\&. If you omit the +\fIpassword\fR +value following the +\fB\-\-password\fR +or +\fB\-p\fR +option on the command line, +\fBmysqldump\fR +prompts for one\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: pipe option +.\" pipe option: mysqldump +\fB\-\-pipe\fR, +\fB\-W\fR +.sp +On Windows, connect to the server using a named pipe\&. This option applies only if the server supports named\-pipe connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: plugin-dir option +.\" plugin-dir option: mysqldump +\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory in which to look for plugins\&. It may be necessary to specify this option if the +\fB\-\-default\-auth\fR +option is used to specify an authentication plugin but +\fBmysqldump\fR +does not find it\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.9\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: port option +.\" port option: mysqldump +\fB\-\-port=\fR\fB\fIport_num\fR\fR, +\fB\-P \fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for the connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: print-defaults option +.\" print-defaults option: mysqldump +\fB\-\-print\-defaults\fR +.sp +Print the program name and all options that it gets from option files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: protocol option +.\" protocol option: mysqldump +\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR +.sp +The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: quick option +.\" quick option: mysqldump +\fB\-\-quick\fR, +\fB\-q\fR +.sp +This option is useful for dumping large tables\&. It forces +\fBmysqldump\fR +to retrieve rows for a table from the server a row at a time rather than retrieving the entire row set and buffering it in memory before writing it out\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: quote-names option +.\" quote-names option: mysqldump +\fB\-\-quote\-names\fR, +\fB\-Q\fR +.sp +Quote identifiers (such as database, table, and column names) within +\(lq`\(rq +characters\&. If the +ANSI_QUOTES +SQL mode is enabled, identifiers are quoted within +\(lq"\(rq +characters\&. This option is enabled by default\&. It can be disabled with +\fB\-\-skip\-quote\-names\fR, but this option should be given after any option such as +\fB\-\-compatible\fR +that may enable +\fB\-\-quote\-names\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: replace option +.\" replace option: mysqldump +\fB\-\-replace\fR +.sp +Write +REPLACE +statements rather than +INSERT +statements\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: result-file option +.\" result-file option: mysqldump +\fB\-\-result\-file=\fR\fB\fIfile_name\fR\fR, +\fB\-r \fR\fB\fIfile_name\fR\fR +.sp +Direct output to a given file\&. This option should be used on Windows to prevent newline +\(lq\en\(rq +characters from being converted to +\(lq\er\en\(rq +carriage return/newline sequences\&. The result file is created and its previous contents overwritten, even if an error occurs while generating the dump\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: routines option +.\" routines option: mysqldump +\fB\-\-routines\fR, +\fB\-R\fR +.sp +Include stored routines (procedures and functions) for the dumped databases in the output\&. Use of this option requires the +SELECT +privilege for the +mysql\&.proc +table\&. The output generated by using +\fB\-\-routines\fR +contains +CREATE PROCEDURE +and +CREATE FUNCTION +statements to re\-create the routines\&. However, these statements do not include attributes such as the routine creation and modification timestamps\&. This means that when the routines are reloaded, they will be created with the timestamps equal to the reload time\&. +.sp +If you require routines to be re\-created with their original timestamp attributes, do not use +\fB\-\-routines\fR\&. Instead, dump and reload the contents of the +mysql\&.proc +table directly, using a MySQL account that has appropriate privileges for the +mysql +database\&. +.sp +Prior to MySQL 5\&.5\&.21, this option had no effect when used together with the +\fB\-\-xml\fR +option\&. (Bug #11760384, Bug #52792) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: set-charset option +.\" set-charset option: mysqldump +\fB\-\-set\-charset\fR +.sp +Add +SET NAMES \fIdefault_character_set\fR +to the output\&. This option is enabled by default\&. To suppress the +SET NAMES +statement, use +\fB\-\-skip\-set\-charset\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: shared-memory-base-name option +.\" shared-memory-base-name option: mysqldump +\fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR +.sp +On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is +MYSQL\&. The shared\-memory name is case sensitive\&. +.sp +The server must be started with the +\fB\-\-shared\-memory\fR +option to enable shared\-memory connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: single-transaction option +.\" single-transaction option: mysqldump +\fB\-\-single\-transaction\fR +.sp +This option sets the transaction isolation mode to +REPEATABLE READ +and sends a +START TRANSACTION +SQL statement to the server before dumping data\&. It is useful only with transactional tables such as +InnoDB, because then it dumps the consistent state of the database at the time when +START TRANSACTION +was issued without blocking any applications\&. +.sp +When using this option, you should keep in mind that only +InnoDB +tables are dumped in a consistent state\&. For example, any +MyISAM +or +MEMORY +tables dumped while using this option may still change state\&. +.sp +While a +\fB\-\-single\-transaction\fR +dump is in process, to ensure a valid dump file (correct table contents and binary log coordinates), no other connection should use the following statements: +ALTER TABLE, +CREATE TABLE, +DROP TABLE, +RENAME TABLE, +TRUNCATE TABLE\&. A consistent read is not isolated from those statements, so use of them on a table to be dumped can cause the +SELECT +that is performed by +\fBmysqldump\fR +to retrieve the table contents to obtain incorrect contents or fail\&. +.sp +The +\fB\-\-single\-transaction\fR +option and the +\fB\-\-lock\-tables\fR +option are mutually exclusive because +LOCK TABLES +causes any pending transactions to be committed implicitly\&. +.sp +This option is not supported for MySQL Cluster tables; the results cannot be guaranteed to be consistent due to the fact that the +NDBCLUSTER +storage engine supports only the +READ_COMMITTED +transaction isolation level\&. You should always use +NDB +backup and restore instead\&. +.sp +To dump large tables, combine the +\fB\-\-single\-transaction\fR +option with the +\fB\-\-quick\fR +option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: skip-comments option +.\" skip-comments option: mysqldump +\fB\-\-skip\-comments\fR +.sp +See the description for the +\fB\-\-comments\fR +option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: skip-opt option +.\" skip-opt option: mysqldump +\fB\-\-skip\-opt\fR +.sp +See the description for the +\fB\-\-opt\fR +option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: socket option +.\" socket option: mysqldump +\fB\-\-socket=\fR\fB\fIpath\fR\fR, +\fB\-S \fR\fB\fIpath\fR\fR +.sp +For connections to +localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: SSL options +.\" SSL options: mysqldump +\fB\-\-ssl*\fR +.sp +Options that begin with +\fB\-\-ssl\fR +specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See +Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: tab option +.\" tab option: mysqldump +\fB\-\-tab=\fR\fB\fIpath\fR\fR, +\fB\-T \fR\fB\fIpath\fR\fR +.sp +Produce tab\-separated text\-format data files\&. For each dumped table, +\fBmysqldump\fR +creates a +\fItbl_name\fR\&.sql +file that contains the +CREATE TABLE +statement that creates the table, and the server writes a +\fItbl_name\fR\&.txt +file that contains its data\&. The option value is the directory in which to write the files\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This option should be used only when +\fBmysqldump\fR +is run on the same machine as the +\fBmysqld\fR +server\&. You must have the +FILE +privilege, and the server must have permission to write files in the directory that you specify\&. +.sp .5v +.RE +By default, the +\&.txt +data files are formatted using tab characters between column values and a newline at the end of each line\&. The format can be specified explicitly using the +\fB\-\-fields\-\fR\fB\fIxxx\fR\fR +and +\fB\-\-lines\-terminated\-by\fR +options\&. +.sp +Column values are converted to the character set specified by the +\fB\-\-default\-character\-set\fR +option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: tables option +.\" tables option: mysqldump +\fB\-\-tables\fR +.sp +Override the +\fB\-\-databases\fR +or +\fB\-B\fR +option\&. +\fBmysqldump\fR +regards all name arguments following the option as table names\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: triggers option +.\" triggers option: mysqldump +\fB\-\-triggers\fR +.sp +Include triggers for each dumped table in the output\&. This option is enabled by default; disable it with +\fB\-\-skip\-triggers\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: tz-utc option +.\" tz-utc option: mysqldump +\fB\-\-tz\-utc\fR +.sp +This option enables +TIMESTAMP +columns to be dumped and reloaded between servers in different time zones\&. +\fBmysqldump\fR +sets its connection time zone to UTC and adds +SET TIME_ZONE=\*(Aq+00:00\*(Aq +to the dump file\&. Without this option, +TIMESTAMP +columns are dumped and reloaded in the time zones local to the source and destination servers, which can cause the values to change if the servers are in different time zones\&. +\fB\-\-tz\-utc\fR +also protects against changes due to daylight saving time\&. +\fB\-\-tz\-utc\fR +is enabled by default\&. To disable it, use +\fB\-\-skip\-tz\-utc\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: user option +.\" user option: mysqldump +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: verbose option +.\" verbose option: mysqldump +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print more information about what the program does\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: version option +.\" version option: mysqldump +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: where option +.\" where option: mysqldump +\fB\-\-where=\*(Aq\fR\fB\fIwhere_condition\fR\fR\fB\*(Aq\fR, +\fB\-w \*(Aq\fR\fB\fIwhere_condition\fR\fR\fB\*(Aq\fR +.sp +Dump only rows selected by the given +WHERE +condition\&. Quotes around the condition are mandatory if it contains spaces or other characters that are special to your command interpreter\&. +.sp +Examples: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-\-where="user=\*(Aqjimf\*(Aq" +\-w"userid>1" +\-w"userid<1" +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: xml option +.\" xml option: mysqldump +\fB\-\-xml\fR, +\fB\-X\fR +.sp +Write dump output as well\-formed XML\&. +.sp +\fBNULL\fR\fB, \fR\fB\*(AqNULL\*(Aq\fR\fB, and Empty Values\fR: For a column named +\fIcolumn_name\fR, the +NULL +value, an empty string, and the string value +\*(AqNULL\*(Aq +are distinguished from one another in the output generated by this option as follows\&. +.TS +allbox tab(:); +lB lB. +T{ +Value: +T}:T{ +XML Representation: +T} +.T& +l l +l l +l l. +T{ +NULL (\fIunknown value\fR) +T}:T{ + +T} +T{ +\*(Aq\*(Aq (\fIempty string\fR) +T}:T{ + +T} +T{ +\*(AqNULL\*(Aq (\fIstring value\fR) +T}:T{ +NULL +T} +.TE +.sp 1 +The output from the +\fBmysql\fR +client when run using the +\fB\-\-xml\fR +option also follows the preceding rules\&. (See +the section called \(lqMYSQL OPTIONS\(rq\&.) +.sp +XML output from +\fBmysqldump\fR +includes the XML namespace, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqldump \-\-xml \-u root world City\fR + + + + + + + + + + + + + + +1 +Kabul +AFG +Kabol +1780000 + +\fI\&.\&.\&.\fR + +4079 +Rafah +PSE +Rafah +92020 + + + + +.fi +.if n \{\ +.RE +.\} +.sp +Prior to MySQL 5\&.5\&.21, this option prevented the +\fB\-\-routines\fR +option from working correctly\(emthat is, no stored routines, triggers, or events could be dumped in XML format\&. (Bug #11760384, Bug #52792) +.RE +.PP +You can also set the following variables by using +\fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR +syntax: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +max_allowed_packet +.sp +The maximum size of the buffer for client/server communication\&. The default is 24MB, the maximum is 1GB\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +net_buffer_length +.sp +The initial size of the buffer for client/server communication\&. When creating multiple\-row +INSERT +statements (as with the +\fB\-\-extended\-insert\fR +or +\fB\-\-opt\fR +option), +\fBmysqldump\fR +creates rows up to +net_buffer_length +length\&. If you increase this variable, you should also ensure that the +net_buffer_length +variable in the MySQL server is at least this large\&. +.sp +Some options, such as +\fB\-\-opt\fR, automatically enable +\fB\-\-lock\-tables\fR\&. If you want to override this, use +\fB\-\-skip\-lock\-tables\fR +at the end of the option list\&. +.RE +.PP +A common use of +\fBmysqldump\fR +is for making a backup of an entire database: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqldump \fR\fB\fIdb_name\fR\fR\fB > \fR\fB\fIbackup\-file\&.sql\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +You can load the dump file back into the server like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql \fR\fB\fIdb_name\fR\fR\fB < \fR\fB\fIbackup\-file\&.sql\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +Or like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql \-e "source \fR\fB\fI/path\-to\-backup/backup\-file\&.sql\fR\fR\fB" \fR\fB\fIdb_name\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysqldump\fR +is also very useful for populating databases by copying data from one MySQL server to another: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqldump \-\-opt \fR\fB\fIdb_name\fR\fR\fB | mysql \-\-host=\fR\fB\fIremote_host\fR\fR\fB \-C \fR\fB\fIdb_name\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +It is possible to dump several databases with one command: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqldump \-\-databases \fR\fB\fIdb_name1\fR\fR\fB [\fR\fB\fIdb_name2\fR\fR\fB \&.\&.\&.] > my_databases\&.sql\fR +.fi +.if n \{\ +.RE +.\} +.PP +To dump all databases, use the +\fB\-\-all\-databases\fR +option: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqldump \-\-all\-databases > all_databases\&.sql\fR +.fi +.if n \{\ +.RE +.\} +.PP +For +InnoDB +tables, +\fBmysqldump\fR +provides a way of making an online backup: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqldump \-\-all\-databases \-\-master\-data \-\-single\-transaction > all_databases\&.sql\fR +.fi +.if n \{\ +.RE +.\} +.PP +This backup acquires a global read lock on all tables (using +FLUSH TABLES WITH READ LOCK) at the beginning of the dump\&. As soon as this lock has been acquired, the binary log coordinates are read and the lock is released\&. If long updating statements are running when the +FLUSH +statement is issued, the MySQL server may get stalled until those statements finish\&. After that, the dump becomes lock free and does not disturb reads and writes on the tables\&. If the update statements that the MySQL server receives are short (in terms of execution time), the initial lock period should not be noticeable, even with many updates\&. +.PP +For point\-in\-time recovery (also known as +\(lqroll\-forward,\(rq +when you need to restore an old backup and replay the changes that happened since that backup), it is often useful to rotate the binary log (see +Section\ \&5.2.4, \(lqThe Binary Log\(rq) or at least know the binary log coordinates to which the dump corresponds: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqldump \-\-all\-databases \-\-master\-data=2 > all_databases\&.sql\fR +.fi +.if n \{\ +.RE +.\} +.PP +Or: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqldump \-\-all\-databases \-\-flush\-logs \-\-master\-data=2\fR + \fB> all_databases\&.sql\fR +.fi +.if n \{\ +.RE +.\} +.PP +The +\fB\-\-master\-data\fR +and +\fB\-\-single\-transaction\fR +options can be used simultaneously, which provides a convenient way to make an online backup suitable for use prior to point\-in\-time recovery if tables are stored using the +InnoDB +storage engine\&. +.PP +For more information on making backups, see +Section\ \&7.2, \(lqDatabase Backup Methods\(rq, and +Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. +.\" mysqldump: views +.\" mysqldump: problems +.\" mysqldump: workarounds +.PP +If you encounter problems backing up views, please read the section that covers restrictions on views which describes a workaround for backing up views when this fails due to insufficient privileges\&. See +Section\ \&D.5, \(lqRestrictions on Views\(rq\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 new file mode 100644 index 000000000000..c9e827302152 --- /dev/null +++ b/man/mysqldumpslow.1 @@ -0,0 +1,339 @@ +'\" t +.\" Title: \fBmysqldumpslow\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqldumpslow +.SH "NAME" +mysqldumpslow \- Summarize slow query log files +.SH "SYNOPSIS" +.HP \w'\fBmysqldumpslow\ [\fR\fBoptions\fR\fB]\ [\fR\fB\fIlog_file\fR\fR\fB\ \&.\&.\&.]\fR\ 'u +\fBmysqldumpslow [\fR\fBoptions\fR\fB] [\fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.]\fR +.SH "DESCRIPTION" +.PP +The MySQL slow query log contains information about queries that take a long time to execute (see +Section\ \&5.2.5, \(lqThe Slow Query Log\(rq)\&. +\fBmysqldumpslow\fR +parses MySQL slow query log files and prints a summary of their contents\&. +.PP +Normally, +\fBmysqldumpslow\fR +groups queries that are similar except for the particular values of number and string data values\&. It +\(lqabstracts\(rq +these values to +N +and +\*(AqS\*(Aq +when displaying summary output\&. The +\fB\-a\fR +and +\fB\-n\fR +options can be used to modify value abstracting behavior\&. +.PP +Invoke +\fBmysqldumpslow\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqldumpslow [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.]\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysqldumpslow\fR +supports the following options\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldumpslow: help option +.\" help option: mysqldumpslow +\fB\-\-help\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-a\fR +.sp +Do not abstract all numbers to +N +and strings to +\*(AqS\*(Aq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldumpslow: debug option +.\" debug option: mysqldumpslow +\fB\-\-debug\fR, +\fB\-d\fR +.sp +Run in debug mode\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-g \fR\fB\fIpattern\fR\fR +.sp +Consider only queries that match the (\fBgrep\fR\-style) pattern\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +Host name of MySQL server for +*\-slow\&.log +file name\&. The value can contain a wildcard\&. The default is +* +(match all)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-i \fR\fB\fIname\fR\fR +.sp +Name of server instance (if using +\fBmysql\&.server\fR +startup script)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-l\fR +.sp +Do not subtract lock time from total time\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-n \fR\fB\fIN\fR\fR +.sp +Abstract numbers with at least +\fIN\fR +digits within names\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-r\fR +.sp +Reverse the sort order\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-s \fR\fB\fIsort_type\fR\fR +.sp +How to sort the output\&. The value of +\fIsort_type\fR +should be chosen from the following list: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +t, +at: Sort by query time or average query time +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +l, +al: Sort by lock time or average lock time +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +r, +ar: Sort by rows sent or average rows sent +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +c: Sort by count +.RE +.sp +By default, +\fBmysqldumpslow\fR +sorts by average query time (equivalent to +\fB\-s at\fR)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-t \fR\fB\fIN\fR\fR +.sp +Display only the first +\fIN\fR +queries in the output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldumpslow: verbose option +.\" verbose option: mysqldumpslow +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print more information about what the program does\&. +.RE +.PP +Example of usage: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqldumpslow\fR +Reading mysql slow query log from /usr/local/mysql/data/mysqld51\-apple\-slow\&.log +Count: 1 Time=4\&.32s (4s) Lock=0\&.00s (0s) Rows=0\&.0 (0), root[root]@localhost + insert into t2 select * from t1 +Count: 3 Time=2\&.53s (7s) Lock=0\&.00s (0s) Rows=0\&.0 (0), root[root]@localhost + insert into t2 select * from t1 limit N +Count: 3 Time=2\&.13s (6s) Lock=0\&.00s (0s) Rows=0\&.0 (0), root[root]@localhost + insert into t1 select * from t1 +.fi +.if n \{\ +.RE +.\} +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 new file mode 100644 index 000000000000..63c7cf6d7f31 --- /dev/null +++ b/man/mysqlhotcopy.1 @@ -0,0 +1,560 @@ +'\" t +.\" Title: \fBmysqlhotcopy\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLHOTCOPY\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqlhotcopy +.\" dumping: databases and tables +.\" backups: databases and tables +.\" databases: dumping +.\" tables: dumping +.SH "NAME" +mysqlhotcopy \- a database backup program +.SH "SYNOPSIS" +.HP \w'\fBmysqlhotcopy\ \fR\fB\fIarguments\fR\fR\ 'u +\fBmysqlhotcopy \fR\fB\fIarguments\fR\fR +.SH "DESCRIPTION" +.PP +\fBmysqlhotcopy\fR +is a Perl script that was originally written and contributed by Tim Bunce\&. It uses +FLUSH TABLES, +LOCK TABLES, and +cp +or +scp +to make a database backup\&. It is a fast way to make a backup of the database or single tables, but it can be run only on the same machine where the database directories are located\&. +\fBmysqlhotcopy\fR +works only for backing up +MyISAM +and +ARCHIVE +tables\&. It runs on Unix\&. +.PP +To use +\fBmysqlhotcopy\fR, you must have read access to the files for the tables that you are backing up, the +SELECT +privilege for those tables, the +RELOAD +privilege (to be able to execute +FLUSH TABLES), and the +LOCK TABLES +privilege (to be able to lock the tables)\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlhotcopy \fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fI/path/to/new_directory\fR\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlhotcopy \fR\fB\fIdb_name_1\fR\fR\fB \&.\&.\&. \fR\fB\fIdb_name_n\fR\fR\fB \fR\fB\fI/path/to/new_directory\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +Back up tables in the given database that match a regular expression: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlhotcopy \fR\fB\fIdb_name\fR\fR\fB\&./\fR\fB\fIregex\fR\fR\fB/\fR +.fi +.if n \{\ +.RE +.\} +.PP +The regular expression for the table name can be negated by prefixing it with a tilde (\(lq~\(rq): +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlhotcopy \fR\fB\fIdb_name\fR\fR\fB\&./~\fR\fB\fIregex\fR\fR\fB/\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysqlhotcopy\fR +supports the following options, which can be specified on the command line or in the +[mysqlhotcopy] +and +[client] +groups of an option file\&. For information about option files used by MySQL programs, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: help option +.\" help option: mysqlhotcopy +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: addtodest option +.\" addtodest option: mysqlhotcopy +\fB\-\-addtodest\fR +.sp +Do not rename target directory (if it exists); merely add files to it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: allowold option +.\" allowold option: mysqlhotcopy +\fB\-\-allowold\fR +.sp +Do not abort if a target exists; rename it by adding an +_old +suffix\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: checkpoint option +.\" checkpoint option: mysqlhotcopy +\fB\-\-checkpoint=\fR\fB\fIdb_name\fR\fR\fB\&.\fR\fB\fItbl_name\fR\fR +.sp +Insert checkpoint entries into the specified database +\fIdb_name\fR +and table +\fItbl_name\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: chroot option +.\" chroot option: mysqlhotcopy +\fB\-\-chroot=\fR\fB\fIpath\fR\fR +.sp +Base directory of the +\fBchroot\fR +jail in which +\fBmysqld\fR +operates\&. The +\fIpath\fR +value should match that of the +\fB\-\-chroot\fR +option given to +\fBmysqld\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: debug option +.\" debug option: mysqlhotcopy +\fB\-\-debug\fR +.sp +Enable debug output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: dryrun option +.\" dryrun option: mysqlhotcopy +\fB\-\-dryrun\fR, +\fB\-n\fR +.sp +Report actions without performing them\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: flushlog option +.\" flushlog option: mysqlhotcopy +\fB\-\-flushlog\fR +.sp +Flush logs after all tables are locked\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: host option +.\" host option: mysqlhotcopy +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +The host name of the local host to use for making a TCP/IP connection to the local server\&. By default, the connection is made to +localhost +using a Unix socket file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: keepold option +.\" keepold option: mysqlhotcopy +\fB\-\-keepold\fR +.sp +Do not delete previous (renamed) target when done\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: method option +.\" method option: mysqlhotcopy +\fB\-\-method=\fR\fB\fIcommand\fR\fR +.sp +The method for copying files (cp +or +scp)\&. The default is +cp\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: noindices option +.\" noindices option: mysqlhotcopy +\fB\-\-noindices\fR +.sp +Do not include full index files for +MyISAM +tables in the backup\&. This makes the backup smaller and faster\&. The indexes for reloaded tables can be reconstructed later with +\fBmyisamchk \-rq\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: password option +.\" password option: mysqlhotcopy +\fB\-\-password=\fR\fB\fIpassword\fR\fR, +\fB\-p\fR\fB\fIpassword\fR\fR +.sp +The password to use when connecting to the server\&. The password value is not optional for this option, unlike for other MySQL programs\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: port option +.\" port option: mysqlhotcopy +\fB\-\-port=\fR\fB\fIport_num\fR\fR, +\fB\-P \fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use when connecting to the local server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: old_server option +.\" old_server option: mysqlhotcopy +\fB\-\-old_server\fR +.sp +As of MySQL 5\&.5\&.3, +\fBmysqlhotcopy\fR +uses +FLUSH TABLES \fItbl_list\fR WITH READ LOCK +to flush and lock tables\&. Use the +\fB\-\-old_server\fR +option if the server is older than 5\&.5\&.3, which is when that statement was introduced\&. This option was added in MySQL 5\&.5\&.3\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: quiet option +.\" quiet option: mysqlhotcopy +\fB\-\-quiet\fR, +\fB\-q\fR +.sp +Be silent except for errors\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: record_log_pos option +.\" record_log_pos option: mysqlhotcopy +\fB\-\-record_log_pos=\fR\fB\fIdb_name\fR\fR\fB\&.\fR\fB\fItbl_name\fR\fR +.sp +Record master and slave status in the specified database +\fIdb_name\fR +and table +\fItbl_name\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: regexp option +.\" regexp option: mysqlhotcopy +\fB\-\-regexp=\fR\fB\fIexpr\fR\fR +.sp +Copy all databases with names that match the given regular expression\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: resetmaster option +.\" resetmaster option: mysqlhotcopy +\fB\-\-resetmaster\fR +.sp +Reset the binary log after locking all the tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: resetslave option +.\" resetslave option: mysqlhotcopy +\fB\-\-resetslave\fR +.sp +Reset the +master\&.info +file after locking all the tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: socket option +.\" socket option: mysqlhotcopy +\fB\-\-socket=\fR\fB\fIpath\fR\fR, +\fB\-S \fR\fB\fIpath\fR\fR +.sp +The Unix socket file to use for connections to +localhost\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: suffix option +.\" suffix option: mysqlhotcopy +\fB\-\-suffix=\fR\fB\fIstr\fR\fR +.sp +The suffix to use for names of copied databases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: tmpdir option +.\" tmpdir option: mysqlhotcopy +\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR +.sp +The temporary directory\&. The default is +/tmp\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlhotcopy: user option +.\" user option: mysqlhotcopy +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.PP +Use +perldoc +for additional +\fBmysqlhotcopy\fR +documentation, including information about the structure of the tables needed for the +\fB\-\-checkpoint\fR +and +\fB\-\-record_log_pos\fR +options: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBperldoc mysqlhotcopy\fR +.fi +.if n \{\ +.RE +.\} +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 new file mode 100644 index 000000000000..7fdf393615c4 --- /dev/null +++ b/man/mysqlimport.1 @@ -0,0 +1,840 @@ +'\" t +.\" Title: \fBmysqlimport\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLIMPORT\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqlimport +.\" importing: data +.\" data: importing +.\" files: text +.\" text files: importing +.SH "NAME" +mysqlimport \- a data import program +.SH "SYNOPSIS" +.HP \w'\fBmysqlimport\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\fB\ \fR\fB\fItextfile1\fR\fR\fB\ \&.\&.\&.\fR\ 'u +\fBmysqlimport [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB \fR\fB\fItextfile1\fR\fR\fB \&.\&.\&.\fR +.SH "DESCRIPTION" +.PP +The +\fBmysqlimport\fR +client provides a command\-line interface to the +LOAD DATA INFILE +SQL statement\&. Most options to +\fBmysqlimport\fR +correspond directly to clauses of +LOAD DATA INFILE +syntax\&. See +Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. +.PP +Invoke +\fBmysqlimport\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlimport [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB \fR\fB\fItextfile1\fR\fR\fB [\fR\fB\fItextfile2\fR\fR\fB \&.\&.\&.]\fR +.fi +.if n \{\ +.RE +.\} +.PP +For each text file named on the command line, +\fBmysqlimport\fR +strips any extension from the file name and uses the result to determine the name of the table into which to import the file\*(Aqs contents\&. For example, files named +patient\&.txt, +patient\&.text, and +patient +all would be imported into a table named +patient\&. +.PP +\fBmysqlimport\fR +supports the following options, which can be specified on the command line or in the +[mysqlimport] +and +[client] +groups of an option file\&. For information about option files used by MySQL programs, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: help option +.\" help option: mysqlimport +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: bind-address option +.\" bind-address option: mysqlimport +\fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR +.sp +On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. +.sp +This option is supported only in the version of +\fBmysqlimport\fR +that is supplied with MySQL Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: character-sets-dir option +.\" character-sets-dir option: mysqlimport +\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory where character sets are installed\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: columns option +.\" columns option: mysqlimport +\fB\-\-columns=\fR\fB\fIcolumn_list\fR\fR, +\fB\-c \fR\fB\fIcolumn_list\fR\fR +.sp +This option takes a comma\-separated list of column names as its value\&. The order of the column names indicates how to match data file columns with table columns\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: compress option +.\" compress option: mysqlimport +\fB\-\-compress\fR, +\fB\-C\fR +.sp +Compress all information sent between the client and the server if both support compression\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: debug option +.\" debug option: mysqlimport +\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, +\fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:o,\fIfile_name\fR\&. The default is +d:t:o\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: debug-check option +.\" debug-check option: mysqlimport +\fB\-\-debug\-check\fR +.sp +Print some debugging information when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: debug-info option +.\" debug-info option: mysqlimport +\fB\-\-debug\-info\fR +.sp +Print debugging information and memory and CPU usage statistics when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: default-character-set option +.\" default-character-set option: mysqlimport +\fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR +.sp +Use +\fIcharset_name\fR +as the default character set\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: default-auth option +.\" default-auth option: mysqlimport +\fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR +.sp +The client\-side authentication plugin to use\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: defaults-extra-file option +.\" defaults-extra-file option: mysqlimport +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +.sp +Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: defaults-file option +.\" defaults-file option: mysqlimport +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: defaults-group-suffix option +.\" defaults-group-suffix option: mysqlimport +\fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR +.sp +Read not only the usual option groups, but also groups with the usual names and a suffix of +\fIstr\fR\&. For example, +\fBmysqlimport\fR +normally reads the +[client] +and +[mysqlimport] +groups\&. If the +\fB\-\-defaults\-group\-suffix=_other\fR +option is given, +\fBmysqlimport\fR +also reads the +[client_other] +and +[mysqlimport_other] +groups\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: delete option +.\" delete option: mysqlimport +\fB\-\-delete\fR, +\fB\-D\fR +.sp +Empty the table before importing the text file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: fields-terminated-by option +.\" fields-terminated-by option: mysqldump +\fB\-\-fields\-terminated\-by=\&.\&.\&.\fR, +.\" mysqldump: fields-enclosed-by option +.\" fields-enclosed-by option: mysqldump +\fB\-\-fields\-enclosed\-by=\&.\&.\&.\fR, +.\" mysqldump: fields-optionally-enclosed-by option +.\" fields-optionally-enclosed-by option: mysqldump +\fB\-\-fields\-optionally\-enclosed\-by=\&.\&.\&.\fR, +.\" mysqldump: fields-escaped-by option +.\" fields-escaped-by option: mysqldump +\fB\-\-fields\-escaped\-by=\&.\&.\&.\fR +.sp +These options have the same meaning as the corresponding clauses for +LOAD DATA INFILE\&. See +Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: force option +.\" force option: mysqlimport +\fB\-\-force\fR, +\fB\-f\fR +.sp +Ignore errors\&. For example, if a table for a text file does not exist, continue processing any remaining files\&. Without +\fB\-\-force\fR, +\fBmysqlimport\fR +exits if a table does not exist\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: host option +.\" host option: mysqlimport +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +Import data to the MySQL server on the given host\&. The default host is +localhost\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: ignore option +.\" ignore option: mysqlimport +\fB\-\-ignore\fR, +\fB\-i\fR +.sp +See the description for the +\fB\-\-replace\fR +option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: ignore-lines option +.\" ignore-lines option: mysqlimport +\fB\-\-ignore\-lines=\fR\fB\fIN\fR\fR +.sp +Ignore the first +\fIN\fR +lines of the data file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqldump: lines-terminated-by option +.\" lines-terminated-by option: mysqldump +\fB\-\-lines\-terminated\-by=\&.\&.\&.\fR +.sp +This option has the same meaning as the corresponding clause for +LOAD DATA INFILE\&. For example, to import Windows files that have lines terminated with carriage return/linefeed pairs, use +\fB\-\-lines\-terminated\-by="\er\en"\fR\&. (You might have to double the backslashes, depending on the escaping conventions of your command interpreter\&.) See +Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: local option +.\" local option: mysqlimport +\fB\-\-local\fR, +\fB\-L\fR +.sp +Read input files locally from the client host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: lock-tables option +.\" lock-tables option: mysqlimport +\fB\-\-lock\-tables\fR, +\fB\-l\fR +.sp +Lock +\fIall\fR +tables for writing before processing any text files\&. This ensures that all tables are synchronized on the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: low-priority option +.\" low-priority option: mysqlimport +\fB\-\-low\-priority\fR +.sp +Use +LOW_PRIORITY +when loading the table\&. This affects only storage engines that use only table\-level locking (such as +MyISAM, +MEMORY, and +MERGE)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: no-defaults option +.\" no-defaults option: mysqlimport +\fB\-\-no\-defaults\fR +.sp +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: password option +.\" password option: mysqlimport +\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you +\fIcannot\fR +have a space between the option and the password\&. If you omit the +\fIpassword\fR +value following the +\fB\-\-password\fR +or +\fB\-p\fR +option on the command line, +\fBmysqlimport\fR +prompts for one\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: pipe option +.\" pipe option: mysqlimport +\fB\-\-pipe\fR, +\fB\-W\fR +.sp +On Windows, connect to the server using a named pipe\&. This option applies only if the server supports named\-pipe connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: plugin-dir option +.\" plugin-dir option: mysqlimport +\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory in which to look for plugins\&. It may be necessary to specify this option if the +\fB\-\-default\-auth\fR +option is used to specify an authentication plugin but +\fBmysqlimport\fR +does not find it\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: port option +.\" port option: mysqlimport +\fB\-\-port=\fR\fB\fIport_num\fR\fR, +\fB\-P \fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for the connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: print-defaults option +.\" print-defaults option: mysqlimport +\fB\-\-print\-defaults\fR +.sp +Print the program name and all options that it gets from option files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: protocol option +.\" protocol option: mysqlimport +\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR +.sp +The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: replace option +.\" replace option: mysqlimport +\fB\-\-replace\fR, +\fB\-r\fR +.sp +The +\fB\-\-replace\fR +and +\fB\-\-ignore\fR +options control handling of input rows that duplicate existing rows on unique key values\&. If you specify +\fB\-\-replace\fR, new rows replace existing rows that have the same unique key value\&. If you specify +\fB\-\-ignore\fR, input rows that duplicate an existing row on a unique key value are skipped\&. If you do not specify either option, an error occurs when a duplicate key value is found, and the rest of the text file is ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: shared-memory-base-name option +.\" shared-memory-base-name option: mysqlimport +\fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR +.sp +On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is +MYSQL\&. The shared\-memory name is case sensitive\&. +.sp +The server must be started with the +\fB\-\-shared\-memory\fR +option to enable shared\-memory connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: silent option +.\" silent option: mysqlimport +\fB\-\-silent\fR, +\fB\-s\fR +.sp +Silent mode\&. Produce output only when errors occur\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: socket option +.\" socket option: mysqlimport +\fB\-\-socket=\fR\fB\fIpath\fR\fR, +\fB\-S \fR\fB\fIpath\fR\fR +.sp +For connections to +localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: SSL options +.\" SSL options: mysqlimport +\fB\-\-ssl*\fR +.sp +Options that begin with +\fB\-\-ssl\fR +specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See +Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: user option +.\" user option: mysqlimport +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: use-threads option +.\" use-threads option: mysqlimport +\fB\-\-use\-threads=\fR\fB\fIN\fR\fR +.sp +Load files in parallel using +\fIN\fR +threads\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: verbose option +.\" verbose option: mysqlimport +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print more information about what the program does\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlimport: version option +.\" version option: mysqlimport +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.PP +Here is a sample session that demonstrates use of +\fBmysqlimport\fR: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql \-e \*(AqCREATE TABLE imptest(id INT, n VARCHAR(30))\*(Aq test\fR +shell> \fBed\fR +a +100 Max Sydow +101 Count Dracula +\&. +w imptest\&.txt +32 +q +shell> \fBod \-c imptest\&.txt\fR +0000000 1 0 0 \et M a x S y d o w \en 1 0 +0000020 1 \et C o u n t D r a c u l a \en +0000040 +shell> \fBmysqlimport \-\-local test imptest\&.txt\fR +test\&.imptest: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 +shell> \fBmysql \-e \*(AqSELECT * FROM imptest\*(Aq test\fR ++\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| id | n | ++\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| 100 | Max Sydow | +| 101 | Count Dracula | ++\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +.fi +.if n \{\ +.RE +.\} +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 new file mode 100644 index 000000000000..07cd6f1d200c --- /dev/null +++ b/man/mysqlshow.1 @@ -0,0 +1,681 @@ +'\" t +.\" Title: \fBmysqlshow\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLSHOW\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqlshow +.\" databases: displaying +.\" displaying: database information +.\" tables: displaying +.\" columns: displaying +.\" showing: database information +.SH "NAME" +mysqlshow \- display database, table, and column information +.SH "SYNOPSIS" +.HP \w'\fBmysqlshow\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB\ [\fR\fB\fIcol_name\fR\fR\fB]]]\fR\ 'u +\fBmysqlshow [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB [\fR\fB\fIcol_name\fR\fR\fB]]]\fR +.SH "DESCRIPTION" +.PP +The +\fBmysqlshow\fR +client can be used to quickly see which databases exist, their tables, or a table\*(Aqs columns or indexes\&. +.PP +\fBmysqlshow\fR +provides a command\-line interface to several SQL +SHOW +statements\&. See +Section\ \&13.7.5, \(lqSHOW Syntax\(rq\&. The same information can be obtained by using those statements directly\&. For example, you can issue them from the +\fBmysql\fR +client program\&. +.PP +Invoke +\fBmysqlshow\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlshow [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB [\fR\fB\fIcol_name\fR\fR\fB]]]\fR +.fi +.if n \{\ +.RE +.\} +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If no database is given, a list of database names is shown\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If no table is given, all matching tables in the database are shown\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If no column is given, all matching columns and column types in the table are shown\&. +.RE +.PP +The output displays only the names of those databases, tables, or columns for which you have some privileges\&. +.PP +If the last argument contains shell or SQL wildcard characters (\(lq*\(rq, +\(lq?\(rq, +\(lq%\(rq, or +\(lq_\(rq), only those names that are matched by the wildcard are shown\&. If a database name contains any underscores, those should be escaped with a backslash (some Unix shells require two) to get a list of the proper tables or columns\&. +\(lq*\(rq +and +\(lq?\(rq +characters are converted into SQL +\(lq%\(rq +and +\(lq_\(rq +wildcard characters\&. This might cause some confusion when you try to display the columns for a table with a +\(lq_\(rq +in the name, because in this case, +\fBmysqlshow\fR +shows you only the table names that match the pattern\&. This is easily fixed by adding an extra +\(lq%\(rq +last on the command line as a separate argument\&. +.PP +\fBmysqlshow\fR +supports the following options, which can be specified on the command line or in the +[mysqlshow] +and +[client] +groups of an option file\&. For information about option files used by MySQL programs, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: help option +.\" help option: mysqlshow +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: bind-address option +.\" bind-address option: mysqlshow +\fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR +.sp +On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. +.sp +This option is supported only in the version of +\fBmysqlshow\fR +that is supplied with MySQL Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: character-sets-dir option +.\" character-sets-dir option: mysqlshow +\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory where character sets are installed\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: compress option +.\" compress option: mysqlshow +\fB\-\-compress\fR, +\fB\-C\fR +.sp +Compress all information sent between the client and the server if both support compression\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: count option +.\" count option: mysqlshow +\fB\-\-count\fR +.sp +Show the number of rows per table\&. This can be slow for non\-MyISAM +tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: debug option +.\" debug option: mysqlshow +\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, +\fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:o,\fIfile_name\fR\&. The default is +d:t:o\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: debug-check option +.\" debug-check option: mysqlshow +\fB\-\-debug\-check\fR +.sp +Print some debugging information when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: debug-info option +.\" debug-info option: mysqlshow +\fB\-\-debug\-info\fR +.sp +Print debugging information and memory and CPU usage statistics when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: default-character-set option +.\" default-character-set option: mysqlshow +\fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR +.sp +Use +\fIcharset_name\fR +as the default character set\&. See +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: default-auth option +.\" default-auth option: mysqlshow +\fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR +.sp +The client\-side authentication plugin to use\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: defaults-extra-file option +.\" defaults-extra-file option: mysqlshow +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +.sp +Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: defaults-file option +.\" defaults-file option: mysqlshow +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: defaults-group-suffix option +.\" defaults-group-suffix option: mysqlshow +\fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR +.sp +Read not only the usual option groups, but also groups with the usual names and a suffix of +\fIstr\fR\&. For example, +\fBmysqlshow\fR +normally reads the +[client] +and +[mysqlshow] +groups\&. If the +\fB\-\-defaults\-group\-suffix=_other\fR +option is given, +\fBmysqlshow\fR +also reads the +[client_other] +and +[mysqlshow_other] +groups\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: host option +.\" host option: mysqlshow +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +Connect to the MySQL server on the given host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: keys option +.\" keys option: mysqlshow +\fB\-\-keys\fR, +\fB\-k\fR +.sp +Show table indexes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: no-defaults option +.\" no-defaults option: mysqlshow +\fB\-\-no\-defaults\fR +.sp +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: password option +.\" password option: mysqlshow +\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you +\fIcannot\fR +have a space between the option and the password\&. If you omit the +\fIpassword\fR +value following the +\fB\-\-password\fR +or +\fB\-p\fR +option on the command line, +\fBmysqlshow\fR +prompts for one\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: pipe option +.\" pipe option: mysqlshow +\fB\-\-pipe\fR, +\fB\-W\fR +.sp +On Windows, connect to the server using a named pipe\&. This option applies only if the server supports named\-pipe connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: plugin-dir option +.\" plugin-dir option: mysqlshow +\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory in which to look for plugins\&. It may be necessary to specify this option if the +\fB\-\-default\-auth\fR +option is used to specify an authentication plugin but +\fBmysqlshow\fR +does not find it\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: port option +.\" port option: mysqlshow +\fB\-\-port=\fR\fB\fIport_num\fR\fR, +\fB\-P \fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for the connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: print-defaults option +.\" print-defaults option: mysqlshow +\fB\-\-print\-defaults\fR +.sp +Print the program name and all options that it gets from option files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: protocol option +.\" protocol option: mysqlshow +\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR +.sp +The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: shared-memory-base-name option +.\" shared-memory-base-name option: mysqlshow +\fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR +.sp +On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is +MYSQL\&. The shared\-memory name is case sensitive\&. +.sp +The server must be started with the +\fB\-\-shared\-memory\fR +option to enable shared\-memory connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: show-table-type option +.\" show-table-type option: mysqlshow +\fB\-\-show\-table\-type\fR, +\fB\-t\fR +.sp +Show a column indicating the table type, as in +SHOW FULL TABLES\&. The type is +BASE TABLE +or +VIEW\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: socket option +.\" socket option: mysqlshow +\fB\-\-socket=\fR\fB\fIpath\fR\fR, +\fB\-S \fR\fB\fIpath\fR\fR +.sp +For connections to +localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: SSL options +.\" SSL options: mysqlshow +\fB\-\-ssl*\fR +.sp +Options that begin with +\fB\-\-ssl\fR +specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See +Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: status option +.\" status option: mysqlshow +\fB\-\-status\fR, +\fB\-i\fR +.sp +Display extra information about each table\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: user option +.\" user option: mysqlshow +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: verbose option +.\" verbose option: mysqlshow +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print more information about what the program does\&. This option can be used multiple times to increase the amount of information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlshow: version option +.\" version option: mysqlshow +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 new file mode 100644 index 000000000000..9c9b9b5b9f4f --- /dev/null +++ b/man/mysqlslap.1 @@ -0,0 +1,1129 @@ +'\" t +.\" Title: \fBmysqlslap\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBMYSQLSLAP\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqlslap +.\" load emulation +.SH "NAME" +mysqlslap \- load emulation client +.SH "SYNOPSIS" +.HP \w'\fBmysqlslap\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBmysqlslap [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBmysqlslap\fR +is a diagnostic program designed to emulate client load for a MySQL server and to report the timing of each stage\&. It works as if multiple clients are accessing the server\&. +.PP +Invoke +\fBmysqlslap\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlslap [\fR\fB\fIoptions\fR\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.PP +Some options such as +\fB\-\-create\fR +or +\fB\-\-query\fR +enable you to specify a string containing an SQL statement or a file containing statements\&. If you specify a file, by default it must contain one statement per line\&. (That is, the implicit statement delimiter is the newline character\&.) Use the +\fB\-\-delimiter\fR +option to specify a different delimiter, which enables you to specify statements that span multiple lines or place multiple statements on a single line\&. You cannot include comments in a file; +\fBmysqlslap\fR +does not understand them\&. +.PP +\fBmysqlslap\fR +runs in three stages: +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +Create schema, table, and optionally any stored programs or data to use for the test\&. This stage uses a single client connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +Run the load test\&. This stage can use many client connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 3.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 3." 4.2 +.\} +Clean up (disconnect, drop table if specified)\&. This stage uses a single client connection\&. +.RE +.PP +Examples: +.PP +Supply your own create and query SQL statements, with 50 clients querying and 200 selects for each (enter the command on a single line): +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysqlslap \-\-delimiter=";" + \-\-create="CREATE TABLE a (b int);INSERT INTO a VALUES (23)" + \-\-query="SELECT * FROM a" \-\-concurrency=50 \-\-iterations=200 +.fi +.if n \{\ +.RE +.\} +.PP +Let +\fBmysqlslap\fR +build the query SQL statement with a table of two +INT +columns and three +VARCHAR +columns\&. Use five clients querying 20 times each\&. Do not create the table or insert the data (that is, use the previous test\*(Aqs schema and data): +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysqlslap \-\-concurrency=5 \-\-iterations=20 + \-\-number\-int\-cols=2 \-\-number\-char\-cols=3 + \-\-auto\-generate\-sql +.fi +.if n \{\ +.RE +.\} +.PP +Tell the program to load the create, insert, and query SQL statements from the specified files, where the +create\&.sql +file has multiple table creation statements delimited by +\*(Aq;\*(Aq +and multiple insert statements delimited by +\*(Aq;\*(Aq\&. The +\fB\-\-query\fR +file will have multiple queries delimited by +\*(Aq;\*(Aq\&. Run all the load statements, then run all the queries in the query file with five clients (five times each): +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysqlslap \-\-concurrency=5 + \-\-iterations=5 \-\-query=query\&.sql \-\-create=create\&.sql + \-\-delimiter=";" +.fi +.if n \{\ +.RE +.\} +.PP +\fBmysqlslap\fR +supports the following options, which can be specified on the command line or in the +[mysqlslap] +and +[client] +groups of an option file\&. For information about option files used by MySQL programs, see +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: help option +.\" help option: mysqlslap +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: auto-generate-sql option +.\" auto-generate-sql option: mysqlslap +\fB\-\-auto\-generate\-sql\fR, +\fB\-a\fR +.sp +Generate SQL statements automatically when they are not supplied in files or using command options\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: auto-generate-sql-add-autoincrement option +.\" auto-generate-sql-add-autoincrement option: mysqlslap +\fB\-\-auto\-generate\-sql\-add\-autoincrement\fR +.sp +Add an +AUTO_INCREMENT +column to automatically generated tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: auto-generate-sql-execute-number option +.\" auto-generate-sql-execute-number option: mysqlslap +\fB\-\-auto\-generate\-sql\-execute\-number=\fR\fB\fIN\fR\fR +.sp +Specify how many queries to generate automatically\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: auto-generate-sql-guid-primary option +.\" auto-generate-sql-guid-primary option: mysqlslap +\fB\-\-auto\-generate\-sql\-guid\-primary\fR +.sp +Add a GUID\-based primary key to automatically generated tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: auto-generate-sql-load-type option +.\" auto-generate-sql-load-type option: mysqlslap +\fB\-\-auto\-generate\-sql\-load\-type=\fR\fB\fItype\fR\fR +.sp +Specify the test load type\&. The permissible values are +read +(scan tables), +write +(insert into tables), +key +(read primary keys), +update +(update primary keys), or +mixed +(half inserts, half scanning selects)\&. The default is +mixed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: auto-generate-sql-secondary-indexes option +.\" auto-generate-sql-secondary-indexes option: mysqlslap +\fB\-\-auto\-generate\-sql\-secondary\-indexes=\fR\fB\fIN\fR\fR +.sp +Specify how many secondary indexes to add to automatically generated tables\&. By default, none are added\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: auto-generate-sql-unique-query-number option +.\" auto-generate-sql-unique-query-number option: mysqlslap +\fB\-\-auto\-generate\-sql\-unique\-query\-number=\fR\fB\fIN\fR\fR +.sp +How many different queries to generate for automatic tests\&. For example, if you run a +key +test that performs 1000 selects, you can use this option with a value of 1000 to run 1000 unique queries, or with a value of 50 to perform 50 different selects\&. The default is 10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: auto-generate-sql-unique-write-number option +.\" auto-generate-sql-unique-write-number option: mysqlslap +\fB\-\-auto\-generate\-sql\-unique\-write\-number=\fR\fB\fIN\fR\fR +.sp +How many different queries to generate for +\fB\-\-auto\-generate\-sql\-write\-number\fR\&. The default is 10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: auto-generate-sql-write-number option +.\" auto-generate-sql-write-number option: mysqlslap +\fB\-\-auto\-generate\-sql\-write\-number=\fR\fB\fIN\fR\fR +.sp +How many row inserts to perform on each thread\&. The default is 100\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: commit option +.\" commit option: mysqlslap +\fB\-\-commit=\fR\fB\fIN\fR\fR +.sp +How many statements to execute before committing\&. The default is 0 (no commits are done)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: compress option +.\" compress option: mysqlslap +\fB\-\-compress\fR, +\fB\-C\fR +.sp +Compress all information sent between the client and the server if both support compression\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: concurrency option +.\" concurrency option: mysqlslap +\fB\-\-concurrency=\fR\fB\fIN\fR\fR, +\fB\-c \fR\fB\fIN\fR\fR +.sp +The number of clients to simulate when issuing the +SELECT +statement\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: create option +.\" create option: mysqlslap +\fB\-\-create=\fR\fB\fIvalue\fR\fR +.sp +The file or string containing the statement to use for creating the table\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: create-schema option +.\" create-schema option: mysqlslap +\fB\-\-create\-schema=\fR\fB\fIvalue\fR\fR +.sp +The schema in which to run the tests\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If the +\fB\-\-auto\-generate\-sql\fR +option is also given, +\fBmysqlslap\fR +drops the schema at the end of the test run\&. To avoid this, use the +\fB\-\-no\-drop\fR +option as well\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: csv option +.\" csv option: mysqlslap +\fB\-\-csv[=\fR\fB\fIfile_name\fR\fR\fB]\fR +.sp +Generate output in comma\-separated values format\&. The output goes to the named file, or to the standard output if no file is given\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: debug option +.\" debug option: mysqlslap +\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, +\fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR +.sp +Write a debugging log\&. A typical +\fIdebug_options\fR +string is +d:t:o,\fIfile_name\fR\&. The default is +d:t:o,/tmp/mysqlslap\&.trace\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: debug-check option +.\" debug-check option: mysqlslap +\fB\-\-debug\-check\fR +.sp +Print some debugging information when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: debug-info option +.\" debug-info option: mysqlslap +\fB\-\-debug\-info\fR, +\fB\-T\fR +.sp +Print debugging information and memory and CPU usage statistics when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: default-auth option +.\" default-auth option: mysqlslap +\fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR +.sp +The client\-side authentication plugin to use\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: defaults-extra-file option +.\" defaults-extra-file option: mysqlslap +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR +.sp +Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: defaults-file option +.\" defaults-file option: mysqlslap +\fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR +.sp +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, +\fIfile_name\fR +must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is interpreted relative to the current directory if given as a relative path name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: defaults-group-suffix option +.\" defaults-group-suffix option: mysqlslap +\fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR +.sp +Read not only the usual option groups, but also groups with the usual names and a suffix of +\fIstr\fR\&. For example, +\fBmysqlslap\fR +normally reads the +[client] +and +[mysqlslap] +groups\&. If the +\fB\-\-defaults\-group\-suffix=_other\fR +option is given, +\fBmysqlslap\fR +also reads the +[client_other] +and +[mysqlslap_other] +groups\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: delimiter option +.\" delimiter option: mysqlslap +\fB\-\-delimiter=\fR\fB\fIstr\fR\fR, +\fB\-F \fR\fB\fIstr\fR\fR +.sp +The delimiter to use in SQL statements supplied in files or using command options\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: detach option +.\" detach option: mysqlslap +\fB\-\-detach=\fR\fB\fIN\fR\fR +.sp +Detach (close and reopen) each connection after each +\fIN\fR +statements\&. The default is 0 (connections are not detached)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: enable-cleartext-plugin option +.\" enable-cleartext-plugin option: mysqlslap +\fB\-\-enable\-cleartext\-plugin\fR +.sp +Enable the +mysql_clear_password +cleartext authentication plugin\&. (See +Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: engine option +.\" engine option: mysqlslap +\fB\-\-engine=\fR\fB\fIengine_name\fR\fR, +\fB\-e \fR\fB\fIengine_name\fR\fR +.sp +The storage engine to use for creating tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: host option +.\" host option: mysqlslap +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +Connect to the MySQL server on the given host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: iterations option +.\" iterations option: mysqlslap +\fB\-\-iterations=\fR\fB\fIN\fR\fR, +\fB\-i \fR\fB\fIN\fR\fR +.sp +The number of times to run the tests\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: no-drop option +.\" no-drop option: mysqlslap +\fB\-\-no\-drop\fR +.sp +Prevent +\fBmysqlslap\fR +from dropping any schema it creates during the test run\&. This option was added in MySQL 5\&.5\&.12\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: no-defaults option +.\" no-defaults option: mysqlslap +\fB\-\-no\-defaults\fR +.sp +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: number-char-cols option +.\" number-char-cols option: mysqlslap +\fB\-\-number\-char\-cols=\fR\fB\fIN\fR\fR, +\fB\-x \fR\fB\fIN\fR\fR +.sp +The number of +VARCHAR +columns to use if +\fB\-\-auto\-generate\-sql\fR +is specified\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: number-int-cols option +.\" number-int-cols option: mysqlslap +\fB\-\-number\-int\-cols=\fR\fB\fIN\fR\fR, +\fB\-y \fR\fB\fIN\fR\fR +.sp +The number of +INT +columns to use if +\fB\-\-auto\-generate\-sql\fR +is specified\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: number-of-queries option +.\" number-of-queries option: mysqlslap +\fB\-\-number\-of\-queries=\fR\fB\fIN\fR\fR +.sp +Limit each client to approximately this many queries\&. Query counting takes into account the statement delimiter\&. For example, if you invoke +\fBmysqlslap\fR +as follows, the +; +delimiter is recognized so that each instance of the query string counts as two queries\&. As a result, 5 rows (not 10) are inserted\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqlslap \-\-delimiter=";" \-\-number\-of\-queries=10\fR + \fB\-\-query="use test;insert into t values(null)"\fR +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: only-print option +.\" only-print option: mysqlslap +\fB\-\-only\-print\fR +.sp +Do not connect to databases\&. +\fBmysqlslap\fR +only prints what it would have done\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: password option +.\" password option: mysqlslap +\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you +\fIcannot\fR +have a space between the option and the password\&. If you omit the +\fIpassword\fR +value following the +\fB\-\-password\fR +or +\fB\-p\fR +option on the command line, +\fBmysqlslap\fR +prompts for one\&. +.sp +Specifying a password on the command line should be considered insecure\&. See +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: pipe option +.\" pipe option: mysqlslap +\fB\-\-pipe\fR, +\fB\-W\fR +.sp +On Windows, connect to the server using a named pipe\&. This option applies only if the server supports named\-pipe connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: plugin-dir option +.\" plugin-dir option: mysqlslap +\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory in which to look for plugins\&. It may be necessary to specify this option if the +\fB\-\-default\-auth\fR +option is used to specify an authentication plugin but +\fBmysqlslap\fR +does not find it\&. See +Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. +.sp +This option was added in MySQL 5\&.5\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: port option +.\" port option: mysqlslap +\fB\-\-port=\fR\fB\fIport_num\fR\fR, +\fB\-P \fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for the connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: post-query option +.\" post-query option: mysqlslap +\fB\-\-post\-query=\fR\fB\fIvalue\fR\fR +.sp +The file or string containing the statement to execute after the tests have completed\&. This execution is not counted for timing purposes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: post-system option +.\" post-system option: mysqlslap +\fB\-\-post\-system=\fR\fB\fIstr\fR\fR +.sp +The string to execute using +system() +after the tests have completed\&. This execution is not counted for timing purposes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: pre-query option +.\" pre-query option: mysqlslap +\fB\-\-pre\-query=\fR\fB\fIvalue\fR\fR +.sp +The file or string containing the statement to execute before running the tests\&. This execution is not counted for timing purposes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: pre-system option +.\" pre-system option: mysqlslap +\fB\-\-pre\-system=\fR\fB\fIstr\fR\fR +.sp +The string to execute using +system() +before running the tests\&. This execution is not counted for timing purposes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: print-defaults option +.\" print-defaults option: mysqlslap +\fB\-\-print\-defaults\fR +.sp +Print the program name and all options that it gets from option files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: protocol option +.\" protocol option: mysqlslap +\fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR +.sp +The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: query option +.\" query option: mysqlslap +\fB\-\-query=\fR\fB\fIvalue\fR\fR, +\fB\-q \fR\fB\fIvalue\fR\fR +.sp +The file or string containing the +SELECT +statement to use for retrieving data\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: shared-memory-base-name option +.\" shared-memory-base-name option: mysqlslap +\fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR +.sp +On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. This option applies only if the server supports shared\-memory connections\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: silent option +.\" silent option: mysqlslap +\fB\-\-silent\fR, +\fB\-s\fR +.sp +Silent mode\&. No output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: socket option +.\" socket option: mysqlslap +\fB\-\-socket=\fR\fB\fIpath\fR\fR, +\fB\-S \fR\fB\fIpath\fR\fR +.sp +For connections to +localhost, the Unix socket file to use, or, on Windows, the name of the named pipe to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: SSL options +.\" SSL options: mysqlslap +\fB\-\-ssl*\fR +.sp +Options that begin with +\fB\-\-ssl\fR +specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See +Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: user option +.\" user option: mysqlslap +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: verbose option +.\" verbose option: mysqlslap +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print more information about what the program does\&. This option can be used multiple times to increase the amount of information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqlslap: version option +.\" version option: mysqlslap +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqltest.1 b/man/mysqltest.1 new file mode 100644 index 000000000000..63ff2c115025 --- /dev/null +++ b/man/mysqltest.1 @@ -0,0 +1,931 @@ +'\" t +.\" Title: \fBmysqltest\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/05/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL +.\" Language: English +.\" +.TH "\FBMYSQLTEST\FR" "1" "01/05/2015" "MySQL" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" mysqltest +.\" mysqltest_embedded +.SH "NAME" +mysqltest \- program to run test cases +.br +mysqltest_embedded \- program to run embedded test cases +.SH "SYNOPSIS" +.HP \w'\fBmysqltest\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB]\fR\ 'u +\fBmysqltest [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB]\fR +.HP \w'\fBmysqltest_embedded\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB]\fR\ 'u +\fBmysqltest_embedded [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +The +\fBmysqltest\fR +program runs a test case against a MySQL server and optionally compares the output with a result file\&. This program reads input written in a special test language\&. Typically, you invoke +\fBmysqltest\fR +using +\fBmysql\-test\-run\&.pl\fR +rather than invoking it directly\&. +.PP +\fBmysqltest_embedded\fR +is similar but is built with support for the +libmysqld +embedded server\&. +.PP +Features of +\fBmysqltest\fR: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Can send SQL statements to MySQL servers for execution +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Can execute external shell commands +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Can test whether the result from an SQL statement or shell command is as expected +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Can connect to one or more standalone +\fBmysqld\fR +servers and switch between connections +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Can connect to an embedded server (libmysqld), if MySQL is compiled with support for +libmysqld\&. (In this case, the executable is named +\fBmysqltest_embedded\fR +rather than +\fBmysqltest\fR\&.) +.RE +.PP +By default, +\fBmysqltest\fR +reads the test case on the standard input\&. To run +\fBmysqltest\fR +this way, you normally invoke it like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysqltest [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB] < \fR\fB\fItest_file\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +You can also name the test case file with a +\fB\-\-test\-file=\fR\fB\fIfile_name\fR\fR +option\&. +.PP +The exit value from +\fBmysqltest\fR +is 0 for success, 1 for failure, and 62 if it skips the test case (for example, if after checking some preconditions it decides not to run the test)\&. +.PP +\fBmysqltest\fR +supports the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: help option +.\" help option: mysqltest +\fB\-\-help\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: basedir option +.\" basedir option: mysqltest +\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR, +\fB\-b \fR\fB\fIdir_name\fR\fR +.sp +The base directory for tests\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: character-sets-dir option +.\" character-sets-dir option: mysqltest +\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory where character sets are installed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: compress option +.\" compress option: mysqltest +\fB\-\-compress\fR, +\fB\-C\fR +.sp +Compress all information sent between the client and the server if both support compression\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: currsor-protocol option +.\" cursor-protocol option: mysqltest +\fB\-\-cursor\-protocol\fR +.sp +Use cursors for prepared statements\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: database option +.\" database option: mysqltest +\fB\-\-database=\fR\fB\fIdb_name\fR\fR, +\fB\-D \fR\fB\fIdb_name\fR\fR +.sp +The default database to use\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: debug option +.\" debug option: mysqltest +\fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, +\fB\-#[\fR\fB\fIdebug_options\fR\fR\fB]\fR +.sp +Write a debugging log if MySQL is built with debugging support\&. The default +\fIdebug_options\fR +value is +\*(Aqd:t:S:i:O,/tmp/mysqltest\&.trace\*(Aq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: debug-check option +.\" debug-check option: mysqltest +\fB\-\-debug\-check\fR +.sp +Print some debugging information when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: debug-info option +.\" debug-info option: mysqltest +\fB\-\-debug\-info\fR +.sp +Print debugging information and memory and CPU usage statistics when the program exits\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: host option +.\" host option: mysqltest +\fB\-\-host=\fR\fB\fIhost_name\fR\fR, +\fB\-h \fR\fB\fIhost_name\fR\fR +.sp +Connect to the MySQL server on the given host\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: include option +.\" include option: mysqltest +\fB\-\-include=\fR\fB\fIfile_name\fR\fR, +\fB\-i \fR\fB\fIfile_name\fR\fR +.sp +Include the contents of the given file before processing the contents of the test file\&. The included file should have the same format as other +\fBmysqltest\fR +test files\&. This option has the same effect as putting a +\-\-source \fIfile_name\fR +command as the first line of the test file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: logdir option +.\" logdir option: mysqltest +\fB\-\-logdir=\fR\fB\fIdir_name\fR\fR +.sp +The directory to use for log files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: mark-progress option +.\" mark-progress option: mysqltest +\fB\-\-mark\-progress\fR +.sp +Write the line number and elapsed time to +\fItest_file\fR\&.progress\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: max-connect-retries option +.\" max-connect-retries option: mysqltest +\fB\-\-max\-connect\-retries=\fR\fB\fInum\fR\fR +.sp +The maximum number of connection attempts when connecting to server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: max-connections option +.\" max-connections option: mysqltest +\fB\-\-max\-connections=\fR\fB\fInum\fR\fR +.sp +The maximum number of simultaneous server connections per client (that is, per test)\&. If not set, the maximum is 128\&. Minimum allowed limit is 8, maximum is 5120\&. +.sp +This option is available from MySQL 5\&.1\&.45\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: no-defaults option +.\" no-defaults option: mysqltest +\fB\-\-no\-defaults\fR +.sp +Do not read default options from any option files\&. If used, this must be the first option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: plugin-dir option +.\" plugin-dir option: mysqltest +\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +.sp +The directory in which to look for plugins\&. It may be necessary to specify this option if the +\fIdefault_auth\fR +argument is used for the +connect() +command to specify an authentication plugin but +\fBmysqltest\fR +does not find it\&. This option was added in MySQL 5\&.5\&.7\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: password option +.\" password option: mysqltest +\fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, +\fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR +.sp +The password to use when connecting to the server\&. If you use the short option form (\fB\-p\fR), you +\fIcannot\fR +have a space between the option and the password\&. If you omit the +\fIpassword\fR +value following the +\fB\-\-password\fR +or +\fB\-p\fR +option on the command line, you are prompted for one\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: port option +.\" port option: mysqltest +\fB\-\-port=\fR\fB\fIport_num\fR\fR, +\fB\-P \fR\fB\fIport_num\fR\fR +.sp +The TCP/IP port number to use for the connection\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: protocol option +.\" protocol option: mysqltest +\fB\-\-protocol=\fR\fB{TCP|SOCKET|PIPE|MEMORY}\fR +.sp +Choose the protocol for communication with the server\&. +SOCKET +is default\&. +.sp +The +\fB\-\-protocol\fR +option is available from MySQL 5\&.1\&.51\&. It is ignored if running with the embedded server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: ps-protocol option +.\" ps-protocol option: mysqltest +\fB\-\-ps\-protocol\fR +.sp +Use the prepared\-statement protocol for communication\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: quiet option +.\" quiet option: mysqltest +\fB\-\-quiet\fR +.sp +Suppress all normal output\&. This is a synonym for +.\" mysqltest: silent option +.\" silent option: mysqltest +\fB\-\-silent\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: record option +.\" record option: mysqltest +\fB\-\-record\fR, +\fB\-r\fR +.sp +Record the output that results from running the test file into the file named by the +\fB\-\-result\-file\fR +option, if that option is given\&. It is an error to use this option without also using +\fB\-\-result\-file\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: result-file option +.\" result-file option: mysqltest +\fB\-\-result\-file=\fR\fB\fIfile_name\fR\fR, +\fB\-R \fR\fB\fIfile_name\fR\fR +.sp +This option specifies the file for test case expected results\&. +\fB\-\-result\-file\fR, together with +\fB\-\-record\fR, determines how +\fBmysqltest\fR +treats the test actual and expected results for a test case: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +If the test produces no results, +\fBmysqltest\fR +exits with an error message to that effect, unless +\fB\-\-result\-file\fR +is given and the named file is an empty file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Otherwise, if +\fB\-\-result\-file\fR +is not given, +\fBmysqltest\fR +sends test results to the standard output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +With +\fB\-\-result\-file\fR +but not +\fB\-\-record\fR, +\fBmysqltest\fR +reads the expected results from the given file and compares them with the actual results\&. If the results do not match, +\fBmysqltest\fR +writes a +\&.reject +file in the same directory as the result file, outputs a diff of the two files, and exits with an error\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +With both +\fB\-\-result\-file\fR +and +\fB\-\-record\fR, +\fBmysqltest\fR +updates the given file by writing the actual test results to it\&. +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: server-arg option +.\" server-arg option: mysqltest +\fB\-\-server\-arg=\fR\fB\fIvalue\fR\fR, +\fB\-A \fR\fB\fIvalue\fR\fR +.sp +Pass the argument as an argument to the embedded server\&. For example, +\fB\-\-server\-arg=\-\-tmpdir=/tmp\fR +or +\fB\-\-server\-arg=\-\-core\fR\&. Up to 64 arguments can be given\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: server-file option +.\" server-file option: mysqltest +\fB\-\-server\-file=\fR\fB\fIfile_name\fR\fR, +\fB\-F \fR\fB\fIfile_name\fR\fR +.sp +Read arguments for the embedded server from the given file\&. The file should contain one argument per line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: server-public-key-path option +.\" server-public-key-path option: mysqltest +\fB\-\-server\-public\-key\-path=\fR\fBfile_name\fR +.sp +The path name to a file containing the server RSA public key\&. The file must be in PEM format\&. The public key is used for RSA encryption of the client password for connections to the server made using accounts that authenticate with the +sha256_password +plugin\&. This option is ignored for client accounts that do not authenticate with that plugin\&. It is also ignored if password encryption is not needed, as is the case when the client connects to the server using an SSL connection\&. +.sp +The server sends the public key to the client as needed, so it is not necessary to use this option for RSA password encryption to occur\&. It is more efficient to do so because then the server need not send the key\&. +.sp +For additional discussion regarding use of the +sha256_password +plugin, including how to get the RSA public key, see +\m[blue]\fBThe SHA\-256 Authentication Plugin\fR\m[]\&\s-2\u[1]\d\s+2\&. +.sp +This option is available only if MySQL was built using OpenSSL\&. It was added in MySQL 5\&.6\&.6 under the name +\fB\-\-server\-public\-key\fR +and renamed in 5\&.6\&.7 to +\fB\-\-server\-public\-key\-path\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: silent option +.\" silent option: mysqltest +\fB\-\-silent\fR, +\fB\-s\fR +.sp +Suppress all normal output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: skip-safemalloc option +.\" skip-safemalloc option: mysqltest +\fB\-\-skip\-safemalloc\fR +.sp +Do not use memory allocation checking\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: sleep option +.\" sleep option: mysqltest +\fB\-\-sleep=\fR\fB\fInum\fR\fR, +\fB\-T \fR\fB\fInum\fR\fR +.sp +Cause all +sleep +commands in the test case file to sleep +\fInum\fR +seconds\&. This option does not affect +real_sleep +commands\&. +.sp +As of MySQL 5\&.0\&.23, an option value of 0 can be used, which effectively disables +sleep +commands in the test case\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: socket option +.\" socket option: mysqltest +\fB\-\-socket=\fR\fB\fIpath\fR\fR, +\fB\-S \fR\fB\fIpath\fR\fR +.sp +The socket file to use when connecting to +localhost +(which is the default host)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: sp-protocol option +.\" sp-protocol option: mysqltest +\fB\-\-sp\-protocol\fR +.sp +Execute DML statements within a stored procedure\&. For every DML statement, +\fBmysqltest\fR +creates and invokes a stored procedure that executes the statement rather than executing the statement directly\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: tail-lines option +.\" tail-lines option: mysqltest +\fB\-\-tail\-lines=\fR\fB\fInn\fR\fR +.sp +Specify how many lines of the result to include in the output if the test fails because an SQL statement fails\&. The default is 0, meaning no lines of result printed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: test-file option +.\" test-file option: mysqltest +\fB\-\-test\-file=\fR\fB\fIfile_name\fR\fR, +\fB\-x \fR\fB\fIfile_name\fR\fR +.sp +Read test input from this file\&. The default is to read from the standard input\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: timer-file option +.\" timer-file option: mysqltest +\fB\-\-timer\-file=\fR\fB\fIfile_name\fR\fR, +\fB\-m \fR\fB\fIfile_name\fR\fR +.sp +If given, the number of millisecond spent running the test will be written to this file\&. This is used by +\fBmysql\-test\-run\&.pl\fR +for its reporting\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: tmpdir option +.\" tmpdir option: mysqltest +\fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, +\fB\-t \fR\fB\fIdir_name\fR\fR +.sp +The temporary directory where socket files are created\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: user option +.\" user option: mysqltest +\fB\-\-user=\fR\fB\fIuser_name\fR\fR, +\fB\-u \fR\fB\fIuser_name\fR\fR +.sp +The MySQL user name to use when connecting to the server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: verbose option +.\" verbose option: mysqltest +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print out more information about what the program does\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: version option +.\" version option: mysqltest +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysqltest: view-protocol option +.\" view-protocol option: mysqltest +\fB\-\-view\-protocol\fR +.sp +Every +SELECT +statement is wrapped inside a view\&. This option was added in MySQL 5\&.0\&.19\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 2006, 2014, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +The SHA-256 Authentication Plugin +.RS 4 +\%http://dev.mysql.com/doc/refman/5.7/en/sha256-authentication-plugin.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/mysqltest_embedded.1 b/man/mysqltest_embedded.1 new file mode 100644 index 000000000000..1ac6945674cd --- /dev/null +++ b/man/mysqltest_embedded.1 @@ -0,0 +1 @@ +.so man/mysqltest.1 diff --git a/man/ndb-common-options.1 b/man/ndb-common-options.1 new file mode 100644 index 000000000000..f8975fcd1a77 --- /dev/null +++ b/man/ndb-common-options.1 @@ -0,0 +1,603 @@ +'\" t +.\" Title: Options Common to MySQL Cluster Programs +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "OPTIONS COMMON TO MY" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" MySQL Cluster: administration +.\" command-line options (MySQL Cluster) +.\" program options (MySQL Cluster) +.\" MySQL Cluster: ndbd +.\" MySQL Cluster: mgm +.\" MySQL Cluster: mgmd +.SH "NAME" +ndb-common-options \- MySQL Cluster Common Program Options +.SH "DESCRIPTION" +.PP +All MySQL Cluster programs accept the options described in this section, with the following exceptions: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBmysqld\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBndb_print_backup_file\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBndb_print_schema_file\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBndb_print_sys_file\fR +.RE +.PP +Users of earlier MySQL Cluster versions should note that some of these options have been changed to make them consistent with one another as well as with +\fBmysqld\fR\&. You can use the +\fB\-\-help\fR +option with any MySQL Cluster program\(emwith the exception of +\fBndb_print_backup_file\fR, +\fBndb_print_schema_file\fR, and +\fBndb_print_sys_file\fR\(emto view a list of the options which the program supports\&. +.PP +The options in the following table are common to all MySQL Cluster executables (except those noted previously in this section)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.88.\ \& This table describes command-line options common to all MySQL Cluster programs +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l. +T{ +.PP +--help, +.PP +--usage, +.PP +-? +T}:T{ +Display help message and exit +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--ndb-connectstring=connectstring, +.PP +--connect-string=connectstring, +.PP +-c +T}:T{ +Set connection string for connecting to ndb_mgmd. Syntax: + [nodeid=;][host=][:]. + Overrides entries specified in NDB_CONNECTSTRING or my.cnf. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--ndb-mgmd-host=host[:port] +T}:T{ +Set the host (and port, if desired) for connecting to management + server +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--ndb-nodeid=# +T}:T{ +Set node id for this node +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--ndb-optimized-node-selection +T}:T{ +Select nodes for transactions in a more optimal way +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--character-sets-dir=path +T}:T{ +Directory where character sets are installed +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--debug=options +T}:T{ +Enable output from debug calls. Can be used only for versions + compiled with debugging enabled +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--core-file +T}:T{ +Write core on errors (defaults to TRUE in debug builds) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--version, +.PP +-V +T}:T{ +Output version information and exit +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.PP +For options specific to individual MySQL Cluster programs, see +Section\ \&18.4, \(lqMySQL Cluster Programs\(rq\&. +.PP +See +Section\ \&18.3.4.2, \(lqMySQL Server Options for MySQL Cluster\(rq, for +\fBmysqld\fR +options relating to MySQL Cluster\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" help option (MySQL Cluster programs) +.\" usage option (MySQL Cluster programs) +.\" -? option (MySQL Cluster programs) +\fB\-\-help\fR, +\fB\-\-usage\fR, +\fB\-?\fR +.TS +allbox tab(:); +l l s s +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-help +T} +T{ +\ \& +T}:T{ +\-\-usage +T} +.TE +.sp 1 +Prints a short list with descriptions of the available command options\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" character-sets-dir option (MySQL Cluster programs) +.\" character-sets-dir option (MySQL Cluster programs) +\fB\-\-character\-sets\-dir=\fR\fB\fIname\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-character\-sets\-dir=path +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Tells the program where to find character set information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb-connectstring option (MySQL Cluster programs) +.\" connect-string option (MySQL Cluster programs) +.\" -c option (MySQL Cluster programs) +\fB\-\-ndb\-connectstring=\fR\fB\fIconnect_string\fR\fR, +\fB\-\-connect\-string=\fR\fB\fIconnect_string\fR\fR, +\fB\-c \fR\fB\fIconnect_string\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-connectstring=connectstring +T} +T{ +\ \& +T}:T{ +\-\-connect\-string=connectstring +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +localhost:1186 +T} +.TE +.sp 1 +This option takes a MySQL Cluster connection string that specifies the management server for the application to connect to, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbd \-\-ndb\-connectstring="nodeid=2;host=ndb_mgmd\&.mysql\&.com:1186"\fR +.fi +.if n \{\ +.RE +.\} +.sp +For more information, see +Section\ \&18.3.2.3, \(lqMySQL Cluster Connection Strings\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" core-file option (MySQL Cluster programs) +\fB\-\-core\-file\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-core\-file +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Write a core file if the program dies\&. The name and location of the core file are system\-dependent\&. (For MySQL Cluster programs nodes running on Linux, the default location is the program\*(Aqs working directory\(emfor a data node, this is the node\*(Aqs +DataDir\&.) For some systems, there may be restrictions or limitations; for example, it might be necessary to execute +\fBulimit \-c unlimited\fR +before starting the server\&. Consult your system documentation for detailed information\&. +.sp +If MySQL Cluster was built using the +\fB\-\-debug\fR +option for +\fBconfigure\fR, then +\fB\-\-core\-file\fR +is enabled by default\&. For regular builds, +\fB\-\-core\-file\fR +is disabled by default\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" debug option (MySQL Cluster programs) +\fB\-\-debug[=\fR\fB\fIoptions\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-debug=options +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +d:t:O,/tmp/ndb_restore\&.trace +T} +.TE +.sp 1 +This option can be used only for versions compiled with debugging enabled\&. It is used to enable output from debug calls in the same manner as for the +\fBmysqld\fR +process\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb-mgmd-host option (MySQL Cluster programs) +\fB\-\-ndb\-mgmd\-host=\fR\fB\fIhost\fR\fR\fB[:\fR\fB\fIport\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-mgmd\-host=host[:port] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +localhost:1186 +T} +.TE +.sp 1 +Can be used to set the host and port number of a single management server for the program to connect to\&. If the program requires node IDs or references to multiple management servers (or both) in its connection information, use the +\fB\-\-ndb\-connectstring\fR +option instead\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb-nodeid option (MySQL Cluster programs) +\fB\-\-ndb\-nodeid=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-nodeid=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +.TE +.sp 1 +Sets this node\*(Aqs MySQL Cluster node ID\&. +\fIThe range of permitted values depends on the node\*(Aqs type (data, management, or API) and the MySQL Cluster software version\fR\&. See +Section\ \&18.1.6.2, \(lqLimits and Differences of MySQL Cluster from Standard MySQL Limits\(rq, for more information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb-optimized-node-selection option (MySQL Cluster) +\fB\-\-ndb\-optimized\-node\-selection\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-optimized\-node\-selection +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Optimize selection of nodes for transactions\&. Enabled by default\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" version option (MySQL Cluster programs) +.\" -V option (MySQL Cluster programs) +\fB\-\-version\fR, +\fB\-V\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-version +T} +.TE +.sp 1 +Prints the MySQL Cluster version number of the executable\&. The version number is relevant because not all versions can be used together, and the MySQL Cluster startup process verifies that the versions of the binaries being used can co\-exist in the same cluster\&. This is also important when performing an online (rolling) software upgrade or downgrade of MySQL Cluster\&. +.sp +See +Section\ \&18.5.5, \(lqPerforming a Rolling Restart of a MySQL Cluster\(rq), for more information\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_blob_tool.1 b/man/ndb_blob_tool.1 new file mode 100644 index 000000000000..8f25774f0498 --- /dev/null +++ b/man/ndb_blob_tool.1 @@ -0,0 +1,466 @@ +'\" t +.\" Title: \fBndb_blob_tool\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_BLOB_TOOL\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_blob_tool +.SH "NAME" +ndb_blob_tool \- check and repair BLOB and TEXT columns of MySQL Cluster tables +.SH "SYNOPSIS" +.HP \w'\fBndb_blob_tool\ \fR\fB\fIoptions\fR\fR\fB\ \fR\fB\fItable\fR\fR\fB\ [\fR\fB\fIcolumn\fR\fR\fB,\ \&.\&.\&.]\fR\ 'u +\fBndb_blob_tool \fR\fB\fIoptions\fR\fR\fB \fR\fB\fItable\fR\fR\fB [\fR\fB\fIcolumn\fR\fR\fB, \&.\&.\&.]\fR +.SH "DESCRIPTION" +.PP +This tool can be used to check for and remove orphaned BLOB column parts from +NDB +tables, as well as to generate a file listing any orphaned parts\&. It is sometimes useful in diagnosing and repairing corrupted or damaged +NDB +tables containing +BLOB +or +TEXT +columns\&. +.PP +The basic syntax for +\fBndb_blob_tool\fR +is shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_blob_tool [\fIoptions\fR] \fItable\fR [\fIcolumn\fR, \&.\&.\&.] +.fi +.if n \{\ +.RE +.\} +.PP +Unless you use the +\fB\-\-help\fR +option, you must specify an action to be performed by including one or more of the options +\fB\-\-check\-orphans\fR, +\fB\-\-delete\-orphans\fR, or +\fB\-\-dump\-file\fR\&. These options cause +\fBndb_blob_tool\fR +to check for orphaned BLOB parts, remove any orphaned BLOB parts, and generate a dump file listing orphaned BLOB parts, respectively, and are described in more detail later in this section\&. +.PP +You must also specify the name of a table when invoking +\fBndb_blob_tool\fR\&. In addition, you can optionally follow the table name with the (comma\-separated) names of one or more +BLOB +or +TEXT +columns from that table\&. If no columns are listed, the tool works on all of the table\*(Aqs +BLOB +and +TEXT +columns\&. If you need to specify a database, use the +\fB\-\-database\fR +(\fB\-d\fR) option\&. +.PP +The +\fB\-\-verbose\fR +option provides additional information in the output about the tool\*(Aqs progress\&. +.PP +The following table includes options that are specific to +\fBndb_blob_tool\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_blob_tool\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.73.\ \& This table describes command-line options for the ndb_blob_tool program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l +l l l. +T{ +.PP +--check-orphans +T}:T{ +Check for orphan blob parts +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--database=db_name, +.PP +-d +T}:T{ +Database to find the table in. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--delete-orphans +T}:T{ +Delete orphan blob parts +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--dump-file=file +T}:T{ +Write orphan keys to specified file +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--verbose, +.PP +-v +T}:T{ +Verbose output +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_blob_tool: check-orphans option +.\" check-orphans option: ndb_blob_tool +\fB\-\-check\-orphans\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-check\-orphans +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Check for orphaned BLOB parts in MySQL Cluster tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_blob_tool: database option +.\" database option: ndb_blob_tool +\fB\-\-database=\fR\fB\fIdb_name\fR\fR, +\fB\-d\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-database=db_name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Specify the database to find the table in\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_blob_tool: delete-orphans option +.\" delete-orphans option: ndb_blob_tool +\fB\-\-delete\-orphans\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-delete\-orphans +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Remove orphaned BLOB parts from MySQL Cluster tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_blob_tool: dump-file option +.\" dump-file option: ndb_blob_tool +\fB\-\-dump\-file=\fR\fB\fIfile\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-dump\-file=file +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Writes a list of orphaned BLOB column parts to +\fIfile\fR\&. The information written to the file includes the table key and BLOB part number for each orphaned BLOB part\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_blob_tool: verbose option +.\" verbose option: ndb_blob_tool +\fB\-\-verbose\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-verbose +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Provide extra information in the tool\*(Aqs output regarding its progress\&. +.RE +Example.PP +First we create an +NDB +table in the +test +database, using the +CREATE TABLE +statement shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +USE test; +CREATE TABLE btest ( + c0 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + c1 TEXT, + c2 BLOB +) ENGINE=NDB; +.fi +.if n \{\ +.RE +.\} +.PP +Then we insert a few rows into this table, using a series of statements similar to this one: +.sp +.if n \{\ +.RS 4 +.\} +.nf +INSERT INTO btest VALUES (NULL, \*(Aqx\*(Aq, REPEAT(\*(Aqx\*(Aq, 1000)); +.fi +.if n \{\ +.RE +.\} +.PP +When run with +\fB\-\-check\-orphans\fR +against this table, +\fBndb_blob_tool\fR +generates the following output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_blob_tool \-\-check\-orphans \-\-verbose \-d test btest\fR +connected +processing 2 blobs +processing blob #0 c1 NDB$BLOB_19_1 +NDB$BLOB_19_1: nextResult: res=1 +total parts: 0 +orphan parts: 0 +processing blob #1 c2 NDB$BLOB_19_2 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=1 +total parts: 10 +orphan parts: 0 +disconnected +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +The tool reports that there are no +NDB +BLOB column parts associated with column +c1, even though +c1 +is a +TEXT +column\&. This is due to the fact that, in an +NDB +table, only the first 256 bytes of a +BLOB +or +TEXT +column value are stored inline, and only the excess, if any, is stored separately; thus, if there are no values using more than 256 bytes in a given column of one of these types, no +BLOB +column parts are created by +NDB +for this column\&. See +Section\ \&11.7, \(lqData Type Storage Requirements\(rq, for more information\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_config.1 b/man/ndb_config.1 new file mode 100644 index 000000000000..879839600433 --- /dev/null +++ b/man/ndb_config.1 @@ -0,0 +1,1451 @@ +'\" t +.\" Title: \fBndb_config\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_CONFIG\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_config +.SH "NAME" +ndb_config \- extract MySQL Cluster configuration information +.SH "SYNOPSIS" +.HP \w'\fBndb_config\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_config \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +This tool extracts current configuration information for data nodes, SQL nodes, and API nodes from one of a number of sources: a MySQL Cluster management node, or its +config\&.ini +or +my\&.cnf +file\&. By default, the management node is the source for the configuration data; to override the default, execute ndb_config with the +\fB\-\-config\-file\fR +or +\fB\-\-mycnf\fR +option\&. It is also possible to use a data node as the source by specifying its node ID with +\fB\-\-config_from_node=\fR\fB\fInode_id\fR\fR\&. +.PP +\fBndb_config\fR +can also provide an offline dump of all configuration parameters which can be used, along with their default, maximum, and minimum values and other information\&. The dump can be produced in either text or XML format; for more information, see the discussion of the +\fB\-\-configinfo\fR +and +\fB\-\-xml\fR +options later in this section)\&. +.PP +You can filter the results by section (DB, +SYSTEM, or +CONNECTIONS) using one of the options +\fB\-\-nodes\fR, +\fB\-\-system\fR, or +\fB\-\-connections\fR\&. +.PP +The following table includes options that are specific to +\fBndb_config\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_config\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.74.\ \& This table describes command-line options for the ndb_config program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l. +T{ +.PP +--nodes +T}:T{ +Print node information (DB section) only. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--connections +T}:T{ +Print CONNECTIONS section information only. Cannot be used with + --nodes or --system option. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--query=string, +.PP +-q +T}:T{ +One or more query options (attributes) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--host=name +T}:T{ +Specify host +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--type=name +T}:T{ +Specify node type +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--nodeid, +.PP +--id +T}:T{ +Get configuration of node with this ID +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--fields=string, +.PP +-f +T}:T{ +Field separator +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--rows=string, +.PP +-r +T}:T{ +Row separator +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--config-file=path +T}:T{ +Set the path to config.ini file +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--mycnf +T}:T{ +Read configuration data from my.cnf file +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +-c +T}:T{ +Short form for --ndb-connectstring +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--configinfo +T}:T{ +Dumps information about all NDB configuration parameters in text + format with default, maximum, and minimum values. Use with --xml + to obtain XML output. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--configinfo --xml +T}:T{ +Use --xml with --configinfo to obtain a dump of all NDB + configuration parameters in XML format with default, maximum, and + minimum values. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--system +T}:T{ +Print SYSTEM section information only. Cannot be used with --nodes + or --connections option. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--config_from_node=# +T}:T{ +Obtain configuration data from the node having this ID (must be a + data node). +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: usage option +.\" usage option: ndb_config +\fB\-\-usage\fR, +\fB\-\-help\fR, or +\fB\-?\fR +.TS +allbox tab(:); +l l s s +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-help +T} +T{ +\ \& +T}:T{ +\-\-usage +T} +.TE +.sp 1 +Causes +\fBndb_config\fR +to print a list of available options, and then exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: config_from_node option +.\" config_from_node option: ndb_config +\fB\-\-config_from_node=#\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-config_from_node=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +none +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +48 +T} +.TE +.sp 1 +Obtain the cluster\*(Aqs configuration data from the data node that has this ID\&. +.sp +If the node having this ID is not a data node, +\fBndb_config\fR +fails with an error\&. (To obtain configuration data from the management node instead, simply omit this option\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: version option +.\" version option: ndb_config +\fB\-\-version\fR, +\fB\-V\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-version +T} +.TE +.sp 1 +Causes +\fBndb_config\fR +to print a version information string, and then exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: ndb-connectstring option +.\" ndb-connectstring option: ndb_config +\fB\-\-ndb\-connectstring=\fR\fB\fIconnect_string\fR\fR, +\fB\-c \fR\fB\fIconnect_string\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-connectstring=connectstring +T} +T{ +\ \& +T}:T{ +\-\-connect\-string=connectstring +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +localhost:1186 +T} +.TE +.sp 1 +Specifies the connection string to use in connecting to the management server\&. The format for the connection string is the same as described in +Section\ \&18.3.2.3, \(lqMySQL Cluster Connection Strings\(rq, and defaults to +localhost:1186\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: config-file option +.\" config-file option: ndb_config +\fB\-\-config\-file=\fR\fB\fIpath\-to\-file\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-config\-file=path +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Gives the path to the management server\*(Aqs configuration file (config\&.ini)\&. This may be a relative or absolute path\&. If the management node resides on a different host from the one on which +\fBndb_config\fR +is invoked, then an absolute path must be used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: mycnf option +.\" mycnf option: ndb_config +\fB\-\-mycnf\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-mycnf +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Read configuration data from the +my\&.cnf +file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: query option +.\" query option: ndb_config +\fB\-\-query=\fR\fB\fIquery\-options\fR\fR, +\fB\-q\fR +\fIquery\-options\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-query=string +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +This is a comma\-delimited list of +query options\(emthat is, a list of one or more node attributes to be returned\&. These include +id +(node ID), type (node type\(emthat is, +ndbd, +mysqld, or +ndb_mgmd), and any configuration parameters whose values are to be obtained\&. +.sp +For example, +.\" ndb_config: query option +.\" query option: ndb_config +\fB\-\-query=id,type,indexmemory,datamemory\fR +returns the node ID, node type, +DataMemory, and +IndexMemory +for each node\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If a given parameter is not applicable to a certain type of node, than an empty string is returned for the corresponding value\&. See the examples later in this section for more information\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: host option +.\" host option: ndb_config +\fB\-\-host=\fR\fB\fIhostname\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-host=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Specifies the host name of the node for which configuration information is to be obtained\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +While the hostname +localhost +usually resolves to the IP address +127\&.0\&.0\&.1, this may not necessarily be true for all operating platforms and configurations\&. This means that it is possible, when +localhost +is used in +config\&.ini, for +\fBndb_config \fR\fB\fB\-\-host=localhost\fR\fR +to fail if +\fBndb_config\fR +is run on a different host where +localhost +resolves to a different address (for example, on some versions of SUSE Linux, this is +127\&.0\&.0\&.2)\&. In general, for best results, you should use numeric IP addresses for all MySQL Cluster configuration values relating to hosts, or verify that all MySQL Cluster hosts handle +localhost +in the same fashion\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: id option +.\" id option: ndb_config +\fB\-\-id=\fR\fB\fInode_id\fR\fR +.sp +.\" ndb_config: nodeid option +.\" nodeid option: ndb_config +\fB\-\-nodeid=\fR\fB\fInode_id\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-nodeid=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +.TE +.sp 1 +Either of these options can be used to specify the node ID of the node for which configuration information is to be obtained\&. +\fB\-\-nodeid\fR +is the preferred form\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: nodes option +.\" nodes option: ndb_config +\fB\-\-nodes\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nodes +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Tells +\fBndb_config\fR +to print information from parameters defined in +DB +sections only\&. This option cannot be used together with +\fB\-\-connections\fR +or +\fB\-\-system\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: connections option +.\" connections option: ndb_config +\fB\-\-connections\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connections +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Tells +\fBndb_config\fR +to print +CONNECTIONS +information only\&. This option cannot be used together with +\fB\-\-nodes\fR +or +\fB\-\-system\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: system option +.\" system option: ndb_config +\fB\-\-system\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-system +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Tells +\fBndb_config\fR +to print +SYSTEM +information only\&. +.sp +This option cannot be used together with the +\fB\-\-nodes\fR +or +\fB\-\-system\fR +options\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: type option +.\" type option: ndb_config +\fB\-\-type=\fR\fB\fInode_type\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ lt l s +^ ^ l s +^ ^ l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-type=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +enumeration +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +:T{ +\fBValid Values\fR +T}:T{ +ndbd +T} +::T{ +mysqld +T} +::T{ +ndb_mgmd +T} +.TE +.sp 1 +Filters results so that only configuration values applying to nodes of the specified +\fInode_type\fR +(ndbd, +mysqld, or +ndb_mgmd) are returned\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: fields option +.\" fields option: ndb_config +\fB\-\-fields=\fR\fB\fIdelimiter\fR\fR, +\fB\-f\fR +\fIdelimiter\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields=string +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Specifies a +\fIdelimiter\fR +string used to separate the fields in the result\&. The default is +\(lq,\(rq +(the comma character)\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If the +\fIdelimiter\fR +contains spaces or escapes (such as +\en +for the linefeed character), then it must be quoted\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: rows option +.\" rows option: ndb_config +\fB\-\-rows=\fR\fB\fIseparator\fR\fR, +\fB\-r\fR +\fIseparator\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-rows=string +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Specifies a +\fIseparator\fR +string used to separate the rows in the result\&. The default is a space character\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If the +\fIseparator\fR +contains spaces or escapes (such as +\en +for the linefeed character), then it must be quoted\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_config: configinfo option +.\" configinfo option: ndb_config +\fB\-\-configinfo\fR +.sp +The +\fB\-\-configinfo\fR +option causes +\fBndb_config\fR +to dump a list of each MySQL Cluster configuration parameter supported by the MySQL Cluster distribution of which +\fBndb_config\fR +is a part, including the following information: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A brief description of each parameter\*(Aqs purpose, effects, and usage +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The section of the +config\&.ini +file where the parameter may be used +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The parameter\*(Aqs data type or unit of measurement +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Where applicable, the parameter\*(Aqs default, minimum, and maximum values +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A brief description of the parameter\*(Aqs purpose, effects, and usage +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +MySQL Cluster release version and build information +.RE +.sp +By default, this output is in text format\&. Part of this output is shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_config \-\-configinfo\fR +****** SYSTEM ****** +Name (String) +Name of system (NDB Cluster) +MANDATORY +PrimaryMGMNode (Non\-negative Integer) +Node id of Primary ndb_mgmd(MGM) node +Default: 0 (Min: 0, Max: 4294967039) +ConfigGenerationNumber (Non\-negative Integer) +Configuration generation number +Default: 0 (Min: 0, Max: 4294967039) +****** DB ****** +MaxNoOfSubscriptions (Non\-negative Integer) +Max no of subscriptions (default 0 == MaxNoOfTables) +Default: 0 (Min: 0, Max: 4294967039) +MaxNoOfSubscribers (Non\-negative Integer) +Max no of subscribers (default 0 == 2 * MaxNoOfTables) +Default: 0 (Min: 0, Max: 4294967039) +\&... +.fi +.if n \{\ +.RE +.\} +.sp +.\" ndb_config: xml option +.\" xml option: ndb_config +\fB\-\-configinfo\fR +\fB\-\-xml\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-configinfo \-\-xml +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +.TE +.sp 1 +You can obtain the output of +\fBndb_config\fR +\fB\-\-configinfo\fR +as XML by adding the +\fB\-\-xml\fR +option\&. A portion of the resulting output is shown in this example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_config \-\-configinfo \-\-xml\fR + +
+ + + +
+
+ + + \&... +
+ \&... +
+.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +Normally, the XML output produced by +\fBndb_config\fR +\fB\-\-configinfo\fR +\fB\-\-xml\fR +is formatted using one line per element; we have added extra whitespace in the previous example, as well as the next one, for reasons of legibility\&. This should not make any difference to applications using this output, since most XML processors either ignore nonessential whitespace as a matter of course, or can be instructed to do so\&. +.sp .5v +.RE +The XML output also indicates when changing a given parameter requires that data nodes be restarted using the +\fB\-\-initial\fR +option\&. This is shown by the presence of an +initial="true" +attribute in the corresponding + +element\&. In addition, the restart type (system +or +node) is also shown; if a given parameter requires a system restart, this is indicated by the presence of a +restart="system" +attribute in the corresponding + +element\&. For example, changing the value set for the +Diskless +parameter requires a system initial restart, as shown here (with the +restart +and +initial +attributes highlighted for visibility): +.sp +.if n \{\ +.RS 4 +.\} +.nf + +.fi +.if n \{\ +.RE +.\} +.sp +Currently, no +initial +attribute is included in the XML output for + +elements corresponding to parameters which do not require initial restarts; in other words, +initial="false" +is the default, and the value +false +should be assumed if the attribute is not present\&. Similarly, the default restart type is +node +(that is, an online or +\(lqrolling\(rq +restart of the cluster), but the +restart +attribute is included only if the restart type is +system +(meaning that all cluster nodes must be shut down at the same time, then restarted)\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +The +\fB\-\-xml\fR +option can be used only with the +\fB\-\-configinfo\fR +option\&. Using +\fB\-\-xml\fR +without +\fB\-\-configinfo\fR +fails with an error\&. +.sp .5v +.RE +Unlike the options used with this program to obtain current configuration data, +\fB\-\-configinfo\fR +and +\fB\-\-xml\fR +use information obtained from the MySQL Cluster sources when +\fBndb_config\fR +was compiled\&. For this reason, no connection to a running MySQL Cluster or access to a +config\&.ini +or +my\&.cnf +file is required for these two options\&. +.sp +Combining other +\fBndb_config\fR +options (such as +\fB\-\-query\fR +or +\fB\-\-type\fR) with +\fB\-\-configinfo\fR +or +\fB\-\-xml\fR +is not supported\&. Currently, if you attempt to do so, the usual result is that all other options besides +\fB\-\-configinfo\fR +or +\fB\-\-xml\fR +are simply ignored\&. +\fIHowever, this behavior is not guaranteed and is subject to change at any time\fR\&. In addition, since +\fBndb_config\fR, when used with the +\fB\-\-configinfo\fR +option, does not access the MySQL Cluster or read any files, trying to specify additional options such as +\fB\-\-ndb\-connectstring\fR +or +\fB\-\-config\-file\fR +with +\fB\-\-configinfo\fR +serves no purpose\&. +.RE +Examples +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +To obtain the node ID and type of each node in the cluster: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_config \-\-query=id,type \-\-fields=\*(Aq:\*(Aq \-\-rows=\*(Aq\en\*(Aq\fR +1:ndbd +2:ndbd +3:ndbd +4:ndbd +5:ndb_mgmd +6:mysqld +7:mysqld +8:mysqld +9:mysqld +.fi +.if n \{\ +.RE +.\} +.sp +In this example, we used the +\fB\-\-fields\fR +options to separate the ID and type of each node with a colon character (:), and the +\fB\-\-rows\fR +options to place the values for each node on a new line in the output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +To produce a connection string that can be used by data, SQL, and API nodes to connect to the management server: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_config \-\-config\-file=usr/local/mysql/cluster\-data/config\&.ini \e +\-\-query=hostname,portnumber \-\-fields=: \-\-rows=, \-\-type=ndb_mgmd\fR +192\&.168\&.0\&.179:1186 +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 3.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 3." 4.2 +.\} +This invocation of +\fBndb_config\fR +checks only data nodes (using the +\fB\-\-type\fR +option), and shows the values for each node\*(Aqs ID and host name, as well as the values set for its +DataMemory, +IndexMemory, and +DataDir +parameters: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_config \-\-type=ndbd \-\-query=id,host,datamemory,indexmemory,datadir \-f \*(Aq : \*(Aq \-r \*(Aq\en\*(Aq\fR +1 : 192\&.168\&.0\&.193 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data +2 : 192\&.168\&.0\&.112 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data +3 : 192\&.168\&.0\&.176 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data +4 : 192\&.168\&.0\&.119 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data +.fi +.if n \{\ +.RE +.\} +.sp +In this example, we used the short options +\fB\-f\fR +and +\fB\-r\fR +for setting the field delimiter and row separator, respectively\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 4.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 4." 4.2 +.\} +To exclude results from any host except one in particular, use the +\fB\-\-host\fR +option: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_config \-\-host=192\&.168\&.0\&.176 \-f : \-r \*(Aq\en\*(Aq \-q id,type\fR +3:ndbd +5:ndb_mgmd +.fi +.if n \{\ +.RE +.\} +.sp +In this example, we also used the short form +\fB\-q\fR +to determine the attributes to be queried\&. +.sp +Similarly, you can limit results to a node with a specific ID using the +\fB\-\-id\fR +or +\fB\-\-nodeid\fR +option\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_cpcd.1 b/man/ndb_cpcd.1 new file mode 100644 index 000000000000..dc0be31c33f0 --- /dev/null +++ b/man/ndb_cpcd.1 @@ -0,0 +1,55 @@ +'\" t +.\" Title: \fBndb_cpcd\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_CPCD\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_cpcd +.SH "NAME" +ndb_cpcd \- automate testing of NDB (development use only) +.SH "SYNOPSIS" +.HP \w'\fBndb_cpcd\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_cpcd \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +A utility having this name was formerly part of an internal automated test framework used in testing and debugging MySQL Cluster\&. It was deprecated in MySQL Cluster NDB 7\&.0, and removed from MySQL Cluster distributions provided by Oracle beginning with MySQL Cluster NDB 7\&.2\&.1\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_delete_all.1 b/man/ndb_delete_all.1 new file mode 100644 index 000000000000..7f2d35eb7a01 --- /dev/null +++ b/man/ndb_delete_all.1 @@ -0,0 +1,179 @@ +'\" t +.\" Title: \fBndb_delete_all\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_DELETE_ALL\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_delete_all +.SH "NAME" +ndb_delete_all \- delete all rows from an NDB table +.SH "SYNOPSIS" +.HP \w'\fBndb_delete_all\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_delete_all \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_delete_all\fR +deletes all rows from the given +NDB +table\&. In some cases, this can be much faster than +DELETE +or even +TRUNCATE TABLE\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_delete_all \-c \fIconnect_string\fR \fItbl_name\fR \-d \fIdb_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +This deletes all rows from the table named +\fItbl_name\fR +in the database named +\fIdb_name\fR\&. It is exactly equivalent to executing +TRUNCATE \fIdb_name\fR\&.\fItbl_name\fR +in MySQL\&. +.PP +The following table includes options that are specific to +\fBndb_delete_all\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_delete_all\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.75.\ \& This table describes command-line options for the ndb_delete_all program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l. +T{ +.PP +--database=dbname, +.PP +-d +T}:T{ +Name of the database in which the table is found +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--transactional, +.PP +-t +T}:T{ +Perform the delete in a single transaction (may run out of + operations) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--tupscan +T}:T{ +Run tup scan +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--diskscan +T}:T{ +Run disk scan +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_delete_all: transactional option +.\" transactional option: ndb_delete_all +\fB\-\-transactional\fR, +\fB\-t\fR +.sp +Use of this option causes the delete operation to be performed as a single transaction\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +With very large tables, using this option may cause the number of operations available to the cluster to be exceeded\&. +.sp .5v +.RE +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_desc.1 b/man/ndb_desc.1 new file mode 100644 index 000000000000..8502dd81ddb0 --- /dev/null +++ b/man/ndb_desc.1 @@ -0,0 +1,585 @@ +'\" t +.\" Title: \fBndb_desc\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_DESC\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_desc +.SH "NAME" +ndb_desc \- describe NDB tables +.SH "SYNOPSIS" +.HP \w'\fBndb_desc\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_desc \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_desc\fR +provides a detailed description of one or more +NDB +tables\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_desc \-c \fIconnect_string\fR \fItbl_name\fR \-d \fIdb_name\fR [\-p] +.fi +.if n \{\ +.RE +.\} +.PP +(\fIMySQL Cluster NDB 7\&.2\&.9 and later:\fR) +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_desc \-c \fIconnect_string\fR \fIindex_name\fR \-d \fIdb_name\fR \-t \fItbl_name\fR +.fi +.if n \{\ +.RE +.\} +.sp +Sample Output.PP +MySQL table creation and population statements: +.sp +.if n \{\ +.RS 4 +.\} +.nf +USE test; +CREATE TABLE fish ( + id INT(11) NOT NULL AUTO_INCREMENT, + name VARCHAR(20) NOT NULL, + length_mm INT(11) NOT NULL, + weight_gm INT(11) NOT NULL, + PRIMARY KEY pk (id), + UNIQUE KEY uk (name) +) ENGINE=NDB; +INSERT INTO fish VALUES + (\*(Aq\*(Aq,\*(Aqguppy\*(Aq, 35, 2), (\*(Aq\*(Aq,\*(Aqtuna\*(Aq, 2500, 150000), + (\*(Aq\*(Aq,\*(Aqshark\*(Aq, 3000, 110000), (\*(Aq\*(Aq,\*(Aqmanta ray\*(Aq, 1500, 50000), + (\*(Aq\*(Aq,\*(Aqgrouper\*(Aq, 900, 125000), (\*(Aq\*(Aq,\*(Aqpuffer\*(Aq, 250, 2500); +.fi +.if n \{\ +.RE +.\} +.PP +Output from +\fBndb_desc\fR: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_desc \-c localhost fish \-d test \-p\fR +\-\- fish \-\- +Version: 2 +Fragment type: 9 +K Value: 6 +Min load factor: 78 +Max load factor: 80 +Temporary table: no +Number of attributes: 4 +Number of primary keys: 1 +Length of frm data: 311 +Row Checksum: 1 +Row GCI: 1 +SingleUserMode: 0 +ForceVarPart: 1 +FragmentCount: 2 +TableStatus: Retrieved +\-\- Attributes \-\- +id Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR +name Varchar(20;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY +length_mm Int NOT NULL AT=FIXED ST=MEMORY +weight_gm Int NOT NULL AT=FIXED ST=MEMORY +\-\- Indexes \-\- +PRIMARY KEY(id) \- UniqueHashIndex +PRIMARY(id) \- OrderedIndex +uk$unique(name) \- UniqueHashIndex +uk(name) \- OrderedIndex +\-\- Per partition info \-\- +Partition Row count Commit count Frag fixed memory \&.\&.\&. +0 2 2 32768 \&.\&.\&. +1 4 4 32768 \&.\&.\&. +\&.\&.\&. Frag varsized memory Extent_space Free extent_space +\&.\&.\&. 32768 0 0 +\&.\&.\&. 32768 0 0 +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +Information about multiple tables can be obtained in a single invocation of +\fBndb_desc\fR +by using their names, separated by spaces\&. All of the tables must be in the same database\&. +.PP +Beginning with MySQL Cluster NDB 7\&.2\&.9, it is possible to obtain additional information about a specific index using the +\fB\-\-table\fR +(short form: +\fB\-t\fR) option introduced in this version and supplying the name of the index as the first argument to +\fBndb_desc\fR, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_desc uk \-d test \-t fish\fR +\-\- uk \-\- +Version: 3 +Base table: fish +Number of attributes: 1 +Logging: 0 +Index type: OrderedIndex +Index status: Retrieved +\-\- Attributes \-\- +name Varchar(20;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY +\-\- IndexTable 10/uk \-\- +Version: 3 +Fragment type: FragUndefined +K Value: 6 +Min load factor: 78 +Max load factor: 80 +Temporary table: yes +Number of attributes: 2 +Number of primary keys: 1 +Length of frm data: 0 +Row Checksum: 1 +Row GCI: 1 +SingleUserMode: 2 +ForceVarPart: 0 +FragmentCount: 4 +ExtraRowGciBits: 0 +ExtraRowAuthorBits: 0 +TableStatus: Retrieved +\-\- Attributes \-\- +name Varchar(20;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY +NDB$TNODE Unsigned [64] PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY +\-\- Indexes \-\- +PRIMARY KEY(NDB$TNODE) \- UniqueHashIndex +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +When an index is specified in this way, the +\fB\-\-extra\-partition\-info\fR +and +\fB\-\-extra\-node\-info\fR +options have no effect\&. +.PP +The +Version +column in the output contains the table\*(Aqs schema object version\&. For information about interpreting this value, see +\m[blue]\fBNDB Schema Object Versions\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +The +Extent_space +and +Free extent_space +columns are applicable only to +NDB +tables having columns on disk; for tables having only in\-memory columns, these columns always contain the value +0\&. +.PP +To illustrate their use, we modify the previous example\&. First, we must create the necessary Disk Data objects, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +CREATE LOGFILE GROUP lg_1 + ADD UNDOFILE \*(Aqundo_1\&.log\*(Aq + INITIAL_SIZE 16M + UNDO_BUFFER_SIZE 2M + ENGINE NDB; +ALTER LOGFILE GROUP lg_1 + ADD UNDOFILE \*(Aqundo_2\&.log\*(Aq + INITIAL_SIZE 12M + ENGINE NDB; +CREATE TABLESPACE ts_1 + ADD DATAFILE \*(Aqdata_1\&.dat\*(Aq + USE LOGFILE GROUP lg_1 + INITIAL_SIZE 32M + ENGINE NDB; +ALTER TABLESPACE ts_1 + ADD DATAFILE \*(Aqdata_2\&.dat\*(Aq + INITIAL_SIZE 48M + ENGINE NDB; +.fi +.if n \{\ +.RE +.\} +.PP +(For more information on the statements just shown and the objects created by them, see +Section\ \&18.5.12.1, \(lqMySQL Cluster Disk Data Objects\(rq, as well as +Section\ \&13.1.14, \(lqCREATE LOGFILE GROUP Syntax\(rq, and +Section\ \&13.1.18, \(lqCREATE TABLESPACE Syntax\(rq\&.) +.PP +Now we can create and populate a version of the +fish +table that stores 2 of its columns on disk (deleting the previous version of the table first, if it already exists): +.sp +.if n \{\ +.RS 4 +.\} +.nf +CREATE TABLE fish ( + id INT(11) NOT NULL AUTO_INCREMENT, + name VARCHAR(20) NOT NULL, + length_mm INT(11) NOT NULL, + weight_gm INT(11) NOT NULL, + PRIMARY KEY pk (id), + UNIQUE KEY uk (name) +) TABLESPACE ts_1 STORAGE DISK +ENGINE=NDB; +INSERT INTO fish VALUES + (\*(Aq\*(Aq,\*(Aqguppy\*(Aq, 35, 2), (\*(Aq\*(Aq,\*(Aqtuna\*(Aq, 2500, 150000), + (\*(Aq\*(Aq,\*(Aqshark\*(Aq, 3000, 110000), (\*(Aq\*(Aq,\*(Aqmanta ray\*(Aq, 1500, 50000), + (\*(Aq\*(Aq,\*(Aqgrouper\*(Aq, 900, 125000), (\*(Aq\*(Aq,\*(Aqpuffer\*(Aq, 250, 2500); +.fi +.if n \{\ +.RE +.\} +.PP +When run against this version of the table, +\fBndb_desc\fR +displays the following output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_desc \-c localhost fish \-d test \-p\fR +\-\- fish \-\- +Version: 3 +Fragment type: 9 +K Value: 6 +Min load factor: 78 +Max load factor: 80 +Temporary table: no +Number of attributes: 4 +Number of primary keys: 1 +Length of frm data: 321 +Row Checksum: 1 +Row GCI: 1 +SingleUserMode: 0 +ForceVarPart: 1 +FragmentCount: 2 +TableStatus: Retrieved +\-\- Attributes \-\- +id Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR +name Varchar(20;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY +length_mm Int NOT NULL AT=FIXED ST=DISK +weight_gm Int NOT NULL AT=FIXED ST=DISK +\-\- Indexes \-\- +PRIMARY KEY(id) \- UniqueHashIndex +PRIMARY(id) \- OrderedIndex +uk$unique(name) \- UniqueHashIndex +uk(name) \- OrderedIndex +\-\- Per partition info \-\- +Partition Row count Commit count Frag fixed memory \&.\&.\&. +0 2 2 32768 \&.\&.\&. +1 4 4 32768 \&.\&.\&. +\&.\&.\&. Frag varsized memory Extent_space Free extent_space +\&.\&.\&. 32768 0 0 +\&.\&.\&. 32768 0 0 +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +This means that 1048576 bytes are allocated from the tablespace for this table on each partition, of which 1044440 bytes remain free for additional storage\&. In other words, 1048576 \- 1044440 = 4136 bytes per partition is currently being used to store the data from this table\*(Aqs disk\-based columns\&. The number of bytes shown as +Free extent_space +is available for storing on\-disk column data from the +fish +table only; for this reason, it is not visible when selecting from the +INFORMATION_SCHEMA\&.FILES +table\&. +.PP +The following table includes options that are specific to +\fBndb_desc\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_desc\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.76.\ \& This table describes command-line options for the ndb_desc program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l +l l l +l l l +l l l. +T{ +.PP +--blob-info, +.PP +-b +T}:T{ +Include partition information for BLOB tables in output. Requires + that the -p option also be used +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--database=dbname, +.PP +-d +T}:T{ +Name of database containing table +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--extra-node-info, +.PP +-n +T}:T{ +Include partition-to-data-node mappings in output. Requires that + the -p option also be used +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--extra-partition-info, +.PP +-p +T}:T{ +Display information about partitions +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--retries=#, +.PP +-r +T}:T{ +Number of times to retry the connection (once per second) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--table=tbl_name, +.PP +-t +T}:T{ +Specify the table in which to find an index. When this option is + used, -p and -n have no effect and are ignored. +T}:T{ +.PP +ADDED: NDB 7.2.9 +T} +T{ +.PP +--unqualified, +.PP +-u +T}:T{ +Use unqualified table names +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_desc: blob-info option +.\" blob-info option: ndb_desc +\fB\-\-blob\-info\fR, +\fB\-b\fR +.sp +Include information about subordinate +BLOB +and +TEXT +columns\&. +.sp +Use of this option also requires the use of the +\fB\-\-extra\-partition\-info\fR +(\fB\-p\fR) option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_desc: database option +.\" database option: ndb_desc +\fB\-\-database=\fR\fB\fIdb_name\fR\fR, +\fB\-d\fR +.sp +Specify the database in which the table should be found\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_desc: extra-node-info option +.\" extra-node-info option: ndb_desc +\fB\-\-extra\-node\-info\fR, +\fB\-n\fR +.sp +Include information about the mappings between table partitions and the data nodes upon which they reside\&. This information can be useful for verifying distribution awareness mechanisms and supporting more efficient application access to the data stored in MySQL Cluster\&. +.sp +Use of this option also requires the use of the +\fB\-\-extra\-partition\-info\fR +(\fB\-p\fR) option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_desc: extra-partition-info option +.\" extra-partition-info option: ndb_desc +\fB\-\-extra\-partition\-info\fR, +\fB\-p\fR +.sp +Print additional information about the table\*(Aqs partitions\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_desc: retries option +.\" retries option: ndb_desc +\fB\-\-retries=\fR\fB\fI#\fR\fR, +\fB\-r\fR +.sp +Try to connect this many times before giving up\&. One connect attempt is made per second\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_desc: table option +.\" table option: ndb_desc +\fB\-\-table=\fR\fB\fItbl_name\fR\fR, +\fB\-t\fR +.sp +Specify the table in which to look for an index\&. +.sp +This option was added in MySQL Cluster NDB 7\&.2\&.9\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_desc: unqualified option +.\" unqualified option: ndb_desc +\fB\-\-unqualified\fR, +\fB\-u\fR +.sp +Use unqualified table names\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +NDB Schema Object Versions +.RS 4 +\%http://dev.mysql.com/doc/ndbapi/en/ndb-internals-schema-object-versions.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_drop_index.1 b/man/ndb_drop_index.1 new file mode 100644 index 000000000000..f9219b60c6a3 --- /dev/null +++ b/man/ndb_drop_index.1 @@ -0,0 +1,170 @@ +'\" t +.\" Title: \fBndb_drop_index\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_DROP_INDEX\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_drop_index +.SH "NAME" +ndb_drop_index \- drop index from an NDB table +.SH "SYNOPSIS" +.HP \w'\fBndb_drop_index\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_drop_index \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_drop_index\fR +drops the specified index from an +NDB +table\&. +\fIIt is recommended that you use this utility only as an example for writing NDB API applications\fR\(emsee the Warning later in this section for details\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_drop_index \-c \fIconnect_string\fR \fItable_name\fR \fIindex\fR \-d \fIdb_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +The statement shown above drops the index named +\fIindex\fR +from the +\fItable\fR +in the +\fIdatabase\fR\&. +.PP +The following table includes options that are specific to +\fBndb_drop_index\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_drop_index\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.77.\ \& This table describes command-line options for the ndb_drop_index program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l. +T{ +.PP +--database=dbname, +.PP +-d +T}:T{ +Name of the database in which the table is found +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +.PP +\fIOperations performed on Cluster table indexes using the NDB API are not visible to MySQL and make the table unusable by a MySQL server\fR\&. If you use this program to drop an index, then try to access the table from an SQL node, an error results, as shown here: +.sp .5v +.RE +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_drop_index \-c localhost dogs ix \-d ctest1\fR +Dropping index dogs/idx\&.\&.\&.OK +NDBT_ProgramExit: 0 \- OK +shell> \fB\&./mysql \-u jon \-p ctest1\fR +Enter password: ******* +Reading table information for completion of table and column names +You can turn off this feature to get a quicker startup with \-A +Welcome to the MySQL monitor\&. Commands end with ; or \eg\&. +Your MySQL connection id is 7 to server version: 5\&.5\&.41\-ndb\-7\&.2\&.19 +Type \*(Aqhelp;\*(Aq or \*(Aq\eh\*(Aq for help\&. Type \*(Aq\ec\*(Aq to clear the buffer\&. +mysql> \fBSHOW TABLES;\fR ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| Tables_in_ctest1 | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| a | +| bt1 | +| bt2 | +| dogs | +| employees | +| fish | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +6 rows in set (0\&.00 sec) +mysql> \fBSELECT * FROM dogs;\fR +ERROR 1296 (HY000): Got error 4243 \*(AqIndex not found\*(Aq from NDBCLUSTER +.fi +.if n \{\ +.RE +.\} +.PP +In such a case, your +\fIonly\fR +option for making the table available to MySQL again is to drop the table and re\-create it\&. You can use either the SQL statementDROP TABLE +or the +\fBndb_drop_table\fR +utility (see +\fBndb_drop_table\fR(1)) to drop the table\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_drop_table.1 b/man/ndb_drop_table.1 new file mode 100644 index 000000000000..5ebc26347558 --- /dev/null +++ b/man/ndb_drop_table.1 @@ -0,0 +1,111 @@ +'\" t +.\" Title: \fBndb_drop_table\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_DROP_TABLE\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_drop_table +.SH "NAME" +ndb_drop_table \- drop an NDB table +.SH "SYNOPSIS" +.HP \w'\fBndb_drop_table\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_drop_table \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_drop_table\fR +drops the specified +NDB +table\&. (If you try to use this on a table created with a storage engine other than +NDB, the attempt fails with the error +723: No such table exists\&.) This operation is extremely fast; in some cases, it can be an order of magnitude faster than using a MySQL +DROP TABLE +statement on an +NDB +table\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_drop_table \-c \fIconnect_string\fR \fItbl_name\fR \-d \fIdb_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +The following table includes options that are specific to +\fBndb_drop_table\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_drop_table\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.78.\ \& This table describes command-line options for the ndb_drop_table program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l. +T{ +.PP +--database=dbname, +.PP +-d +T}:T{ +Name of the database in which the table is found +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_error_reporter.1 b/man/ndb_error_reporter.1 new file mode 100644 index 000000000000..d1b36e1cb138 --- /dev/null +++ b/man/ndb_error_reporter.1 @@ -0,0 +1,328 @@ +'\" t +.\" Title: \fBndb_error_reporter\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_ERROR_REPORTE" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_error_reporter +.\" bugs: MySQL Cluster: reporting +.SH "NAME" +ndb_error_reporter \- NDB error\-reporting utility +.SH "SYNOPSIS" +.HP \w'\fBndb_error_reporter\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_error_reporter \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_error_reporter\fR +creates an archive from data node and management node log files that can be used to help diagnose bugs or other problems with a cluster\&. +\fIIt is highly recommended that you make use of this utility when filing reports of bugs in MySQL Cluster\fR\&. +.PP +The following table includes command options specific to the MySQL Cluster program +\fBndb_error_reporter\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_error_reporter\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.PP +\fBndb_error_reporter\fR +did not support the +\fB\-\-help\fR +option prior to MySQL Cluster NDB 7\&.2\&.14 (Bug #11756666, Bug #48606)\&. The +\fB\-\-connection\-timeout\fR +\fB\-\-dry\-scp\fR, and +\fB\-\-skip\-nodegroup\fR +options were also added in this release (Bug #16602002)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.79.\ \& This table describes command-line options for the ndb_error_reporter program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l. +T{ +.PP +--connection-timeout=timeout +T}:T{ +Number of seconds to wait when connecting to nodes before timing + out. +T}:T{ +.PP +ADDED: NDB 7.2.14 +T} +T{ +.PP +--dry-scp +T}:T{ +Disable scp with remote hosts; used only for testing. +T}:T{ +.PP +ADDED: NDB 7.2.14 +T} +T{ +.PP +--fs +T}:T{ +Include file system data in error report; can use a large amount + of disk space +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--skip-nodegroup=nodegroup_id +T}:T{ +Skip all nodes in the node group having this ID. +T}:T{ +.PP +ADDED: NDB 7.2.14 +T} +.TE +.sp 1 +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_error_reporter \fIpath/to/config\-file\fR [\fIusername\fR] [\fIoptions\fR] +.fi +.if n \{\ +.RE +.\} +.PP +This utility is intended for use on a management node host, and requires the path to the management host configuration file (usually named +config\&.ini)\&. Optionally, you can supply the name of a user that is able to access the cluster\*(Aqs data nodes using SSH, to copy the data node log files\&. +\fBndb_error_reporter\fR +then includes all of these files in archive that is created in the same directory in which it is run\&. The archive is named +ndb_error_report_\fIYYYYMMDDHHMMSS\fR\&.tar\&.bz2, where +\fIYYYYMMDDHHMMSS\fR +is a datetime string\&. +.PP +.\" ndb_error_reporter: options +\fBndb_error_reporter\fR +also accepts the options listed here: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" connection-timeout option (ndb_error_reporter) +\fB\-\-connection\-timeout=\fR\fB\fItimeout\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.5\&.34\-ndb\-7\&.2\&.14 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connection\-timeout=timeout +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +.TE +.sp 1 +Wait this many seconds when trying to connect to nodes before timing out\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" dry-scp option (ndb_error_reporter) +\fB\-\-dry\-scp\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.5\&.34\-ndb\-7\&.2\&.14 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-dry\-scp +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Run +\fBndb_error_reporter\fR +without using scp from remote hosts\&. Used for testing only\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" fs option (ndb_error_reporter) +\fB\-\-fs\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fs +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Copy the data node file systems to the management host and include them in the archive\&. +.sp +Because data node file systems can be extremely large, even after being compressed, we ask that you please do +\fInot\fR +send archives created using this option to Oracle unless you are specifically requested to do so\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" skip-nodegroup option (ndb_error_reporter) +\fB\-\-skip\-nodegroup=\fR\fB\fInodegroup_id\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.5\&.34\-ndb\-7\&.2\&.14 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connection\-timeout=timeout +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +.TE +.sp 1 +Skip all nodes belong to the node group having the supplied node group ID\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_index_stat.1 b/man/ndb_index_stat.1 new file mode 100644 index 000000000000..46ec50d3c8a7 --- /dev/null +++ b/man/ndb_index_stat.1 @@ -0,0 +1,1028 @@ +'\" t +.\" Title: \fBndb_index_stat\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_INDEX_STAT\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_index_stat +.SH "NAME" +ndb_index_stat \- NDB index statistics utility +.SH "SYNOPSIS" +.HP \w'\fBndb_index_stat\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_index_stat \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_index_stat\fR +provides per\-fragment statistical information about indexes on +NDB +tables\&. This includes cache version and age, number of index entries per partition, and memory consumption by indexes\&. +Usage.PP +To obtain basic index statistics about a given +NDB +table, invoke +\fBndb_index_stat\fR +as shown here, with the name of the table as the first argument and the name of the database containing this table specified immediately following it, using the +\fB\-\-database\fR +(\fB\-d\fR) option: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_index_stat \fItable\fR \-d \fIdatabase\fR +.fi +.if n \{\ +.RE +.\} +.PP +In this example, we use +\fBndb_index_stat\fR +to obtain such information about an +NDB +table named +mytable +in the +test +database: +.\" ndb_index_stat: interpreting output +.\" ndb_index_stat: example +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_index_stat \-d test mytable\fR +table:City index:PRIMARY fragCount:2 +sampleVersion:3 loadTime:1399585986 sampleCount:1994 keyBytes:7976 +query cache: valid:1 sampleCount:1994 totalBytes:27916 +times in ms: save: 7\&.133 sort: 1\&.974 sort per sample: 0\&.000 +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +sampleVersion +is the version number of the cache from which the statistics data is taken\&. Running +\fBndb_index_stat\fR +with the +\fB\-\-update\fR +option causes sampleVersion to be incremented\&. +.PP +loadTime +shows when the cache was last updated\&. This is expressed as seconds since the Unix Epoch\&. +.PP +sampleCount +is the number of index entries found per partition\&. You can estimate the total number of entries by multiplying this by the number of fragments (shown as +fragCount)\&. +.PP +sampleCount +can be compared with the cardinality of +SHOW INDEX +or +INFORMATION_SCHEMA\&.STATISTICS, although the latter two provide a view of the table as a whole, while +\fBndb_index_stat\fR +provides a per\-fragment average\&. +.PP +keyBytes +is the number of bytes used by the index\&. In this example, the primary key is an integer, which requires four bytes for each index, so +keyBytes +can be calculated in this case as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf + keyBytes = sampleCount * (4 bytes per index) = 1994 * 4 = 7976 +.fi +.if n \{\ +.RE +.\} +.PP +This information can also be obtained using the corresponding column definitions from +INFORMATION_SCHEMA\&.COLUMNS +(this requires a MySQL Server and a MySQL client application)\&. +.PP +totalBytes +is the total memory consumed by all indexes on the table, in bytes\&. +.PP +Timings shown in the preceding examples are specific to each invocation of +\fBndb_index_stat\fR\&. +.PP +The +\fB\-\-verbose\fR +option provides some additional output, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_index_stat \-d test mytable \-\-verbose\fR +random seed 1337010518 +connected +loop 1 of 1 +table:mytable index:PRIMARY fragCount:4 +sampleVersion:2 loadTime:1336751773 sampleCount:0 keyBytes:0 +read stats +query cache created +query cache: valid:1 sampleCount:0 totalBytes:0 +times in ms: save: 20\&.766 sort: 0\&.001 +disconnected +NDBT_ProgramExit: 0 \- OK +shell> +.fi +.if n \{\ +.RE +.\} +.sp +Options.PP +The following table includes options that are specific to the MySQL Cluster +\fBndb_index_stat\fR +utility\&. Additional descriptions are listed following the table\&. For options common to most MySQL Cluster programs (including +\fBndb_index_stat\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.80.\ \& This table describes command-line options for the ndb_index_stat program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l. +T{ +.PP +--database=name, +.PP +-d +T}:T{ +Name of the database containing the table. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--delete +T}:T{ +Delete index statistics for the given table, stopping any + auto-update previously configured. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--update +T}:T{ +Update index statistics for the given table, restarting any + auto-update previously configured. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--dump +T}:T{ +Print the query cache. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--query=# +T}:T{ +Perform a number of random range queries on first key attr (must + be int unsigned). +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--sys-drop +T}:T{ +Drop any statistics tables and events in NDB kernel (all + statistics are lost) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--sys-create +T}:T{ +Create all statistics tables and events in NDB kernel, if none of + them already exist +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--sys-create-if-not-exist +T}:T{ +Create any statistics tables and events in NDB kernel that do not + already exist. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--sys-create-if-not-valid +T}:T{ +Create any statistics tables or events that do not already exist + in the NDB kernel. after dropping any that are invalid. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--sys-check +T}:T{ +Verify that NDB system index statistics and event tables exist. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--sys-skip-tables +T}:T{ +Do not apply sys-* options to tables. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--sys-skip-events +T}:T{ +Do not apply sys-* options to events. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--verbose, +.PP +-v +T}:T{ +Turn on verbose output +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--loops=# +T}:T{ +Set the number of times to perform a given command. Default is 0. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.PP +\fBndb_index_stat statistics options\fR. The following options are used to generate index statistics\&. They work with a given table and database\&. They cannot be mixed with system options (see +ndb_index_stat system options)\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" database option (ndb_index_stat) +.\" -d option (ndb_index_stat) +\fB\-\-database=\fR\fB\fIname\fR\fR, +\fB\-d \fR\fB\fIname\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-database=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +The name of the database that contains the table being queried\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" delete option (ndb_index_stat) +\fB\-\-delete\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-delete +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Delete the index statistics for the given table, stopping any auto\-update that was previously configured\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" update option (ndb_index_stat) +\fB\-\-update\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-update +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Update the index statistics for the given table, and restart any auto\-update that was previously configured\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" dump option (ndb_index_stat) +\fB\-\-dump\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-dump +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Dump the contents of the query cache\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" query option (ndb_index_stat) +\fB\-\-query=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-query=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +MAX_INT +T} +.TE +.sp 1 +Perform random range queries on first key attribute (must be int unsigned)\&. +.RE +.PP +\fBndb_index_stat system options\fR. The following options are used to generate and update the statistics tables in the NDB kernel\&. None of these options can be mixed with statistics options (see +ndb_index_stat statistics options)\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" sys-drop option (ndb_index_stat) +\fB\-\-sys\-drop\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-drop +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Drop all statistics tables and events in the NDB kernel\&. +\fIThis causes all statistics to be lost\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" sys-create option (ndb_index_stat) +\fB\-\-sys\-create\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-create +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Create all statistics tables and events in the NDB kernel\&. This works only if none of them exist previously\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" sys-create-if-not-exist option (ndb_index_stat) +\fBsys\-create\-if\-not\-exist\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-create\-if\-not\-exist +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Create any NDB system statistics tables or events (or both) that do not already exist when the program is invoked\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" sys-create-if-not-valid option (ndb_index_stat) +\fB\-\-sys\-create\-if\-not\-valid\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-create\-if\-not\-valid +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Create any NDB system statistics tables or events that do not already exist, after dropping any that are invalid\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" sys-check option (ndb_index_stat) +\fB\-\-sys\-check\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-check +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Verify that all required system statistics tables and events exist in the NDB kernel\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" sys-skip-tables option (ndb_index_stat) +\fB\-\-sys\-skip\-tables\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-skip\-tables +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Do not apply any +\fB\-\-sys\-*\fR +options to any statistics tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" sys-skip-events option (ndb_index_stat) +\fB\-\-sys\-skip\-events\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-skip\-events +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Do not apply any +\fB\-\-sys\-*\fR +options to any events\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" verbose option (ndb_index_stat) +\fB\-\-verbose\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-verbose +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Turn on verbose output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" loops option (ndb_index_stat) +\fB\-\-loops=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-loops=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +MAX_INT +T} +.TE +.sp 1 +Repeat commands this number of times (for use in testing)\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_mgm.1 b/man/ndb_mgm.1 new file mode 100644 index 000000000000..2d013664f7d0 --- /dev/null +++ b/man/ndb_mgm.1 @@ -0,0 +1,251 @@ +'\" t +.\" Title: \fBndb_mgm\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_MGM\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_mgm +.\" MySQL Cluster: ndb_mgm +.\" MySQL Cluster: management client (ndb_mgm) +.\" management client (MySQL Cluster) +.\" ndb_mgm +.\" MySQL Cluster: administration +.\" administration of MySQL Cluster +.SH "NAME" +ndb_mgm \- the MySQL Cluster management client +.SH "SYNOPSIS" +.HP \w'\fBndb_mgm\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_mgm \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +The +\fBndb_mgm\fR +management client process is actually not needed to run the cluster\&. Its value lies in providing a set of commands for checking the cluster\*(Aqs status, starting backups, and performing other administrative functions\&. The management client accesses the management server using a C API\&. Advanced users can also employ this API for programming dedicated management processes to perform tasks similar to those performed by +\fBndb_mgm\fR\&. +.PP +To start the management client, it is necessary to supply the host name and port number of the management server: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_mgm [\fR\fB\fIhost_name\fR\fR\fB [\fR\fB\fIport_num\fR\fR\fB]]\fR +.fi +.if n \{\ +.RE +.\} +.PP +For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_mgm ndb_mgmd\&.mysql\&.com 1186\fR +.fi +.if n \{\ +.RE +.\} +.PP +The default host name and port number are +localhost +and 1186, respectively\&. +.\" MySQL Cluster: administration +.\" MySQL Cluster: commands +.\" command options (MySQL Cluster): ndb_mgm +.\" MySQL Cluster: mgm process +.PP +The following table includes options that are specific to the MySQL Cluster management client program +\fBndb_mgm\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_mgm\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.72.\ \& This table describes command-line options for the ndb_mgm program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l. +T{ +.PP +--try-reconnect=#, +.PP +-t +T}:T{ +Specify number of tries for connecting to ndb_mgmd (0 = infinite) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--execute=name, +.PP +-e +T}:T{ +Execute command and exit +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" execute option (ndb_mgm) +.\" -e option (ndb_mgm) +\fB\-\-execute=\fR\fBcommand\fR, +\fB\-e \fR\fBcommand\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-execute=name +T} +.TE +.sp 1 +This option can be used to send a command to the MySQL Cluster management client from the system shell\&. For example, either of the following is equivalent to executing +SHOW +in the management client: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_mgm \-e "SHOW"\fR +shell> \fBndb_mgm \-\-execute="SHOW"\fR +.fi +.if n \{\ +.RE +.\} +.sp +This is analogous to how the +\fB\-\-execute\fR +or +\fB\-e\fR +option works with the +\fBmysql\fR +command\-line client\&. See +Section\ \&4.2.4, \(lqUsing Options on the Command Line\(rq\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If the management client command to be passed using this option contains any space characters, then the command +\fImust\fR +be enclosed in quotation marks\&. Either single or double quotation marks may be used\&. If the management client command contains no space characters, the quotation marks are optional\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-try\-reconnect=\fR\fB\fInumber\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-try\-reconnect=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +If the connection to the management server is broken, the node tries to reconnect to it every 5 seconds until it succeeds\&. By using this option, it is possible to limit the number of attempts to +\fInumber\fR +before giving up and reporting an error instead\&. +.RE +.PP +Additional information about using +\fBndb_mgm\fR +can be found in +Section\ \&18.5.2, \(lqCommands in the MySQL Cluster Management Client\(rq\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_mgmd.8 b/man/ndb_mgmd.8 new file mode 100644 index 000000000000..384bb95b1353 --- /dev/null +++ b/man/ndb_mgmd.8 @@ -0,0 +1,1323 @@ +'\" t +.\" Title: \fBndb_mgmd\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_MGMD\FR" "8" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_mgmd (MySQL Cluster process) +.\" MySQL Cluster: ndb_mgmd process +.\" MySQL Cluster: management nodes +.\" management nodes (MySQL Cluster) +.\" ndb_mgmd +.SH "NAME" +ndb_mgmd \- the MySQL Cluster management server daemon +.SH "SYNOPSIS" +.HP \w'\fBndb_mgmd\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_mgmd \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +The management server is the process that reads the cluster configuration file and distributes this information to all nodes in the cluster that request it\&. It also maintains a log of cluster activities\&. Management clients can connect to the management server and check the cluster\*(Aqs status\&. +.\" MySQL Cluster: administration +.\" MySQL Cluster: commands +.\" command options (MySQL Cluster): ndb_mgmd +.\" MySQL Cluster: mgmd process +.PP +The following table includes options that are specific to the MySQL Cluster management server program +\fBndb_mgmd\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_mgmd\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.71.\ \& This table describes command-line options for the ndb_mgmd program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l. +T{ +.PP +--config-file=file, +.PP +-f +T}:T{ +Specify the cluster configuration file; in NDB-6.4.0 and later, + needs --reload or --initial to override configuration cache if + present +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--configdir=directory, +.PP +--config-dir=directory +T}:T{ +Specify the cluster management server's configuration cache + directory +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--bind-address=ip_address +T}:T{ +Local bind address +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--print-full-config, +.PP +-P +T}:T{ +Print full configuration and exit +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--daemon, +.PP +-d +T}:T{ +Run ndb_mgmd in daemon mode (default) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--nodaemon +T}:T{ +Do not run ndb_mgmd as a daemon +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--interactive +T}:T{ +Run ndb_mgmd in interactive mode (not officially supported in + production; for testing purposes only) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--log-name=name +T}:T{ +A name to use when writing messages applying to this node in the + cluster log. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--no-nodeid-checks +T}:T{ +Do not provide any node id checks +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--mycnf +T}:T{ +Read cluster configuration data from the my.cnf file +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--reload +T}:T{ +Causes the management server to compare the configuration file + with its configuration cache +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--initial +T}:T{ +Causes the management server reload its configuration data from + the configuration file, bypassing the configuration cache +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--nowait-nodes=list +T}:T{ +Do not wait for these management nodes when starting this + management server. Also requires --ndb-nodeid to be used. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--config-cache[=TRUE|FALSE] +T}:T{ +Enable the management server configuration cache; TRUE by default. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--install[=name] +T}:T{ +Used to install the management server process as a Windows + service. Does not apply on non-Windows platforms. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--remove[=name] +T}:T{ +Used to remove a management server process that was previously + installed as a Windows service, optionally specifying the name of + the service to be removed. Does not apply on non-Windows + platforms. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" bind-address option (ndb_mgmd) +\fB\-\-bind\-address=\fR\fB\fIhost\fR\fR\fB[:\fR\fB\fIport\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-bind\-address=ip_address +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +When specified, this option limits management server connections by management clients to clients at the specified host name or IP address (and possibly port, if this is also specified)\&. In such cases, a management client attempting to connect to the management server from any other address fails with the error +Unable to setup port: \fIhost\fR:\fIport\fR! +.sp +If the +\fIport\fR +is not specified, the management client attempts to use port 1186\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" no-nodeid-checks option (ndb_mgmd) +\fB\-\-no\-nodeid\-checks\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-no\-nodeid\-checks +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Do not perform any checks of node IDs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" configdir option (ndb_mgmd) +\fB\-\-configdir=\fR\fB\fIpath\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-configdir=directory +T} +T{ +\ \& +T}:T{ +\-\-config\-dir=directory +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +$INSTALLDIR/mysql\-cluster +T} +.TE +.sp 1 +Specifies the cluster management server\*(Aqs configuration cache directory\&. +\fB\-\-config\-dir\fR +is an alias for this option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" config-cache option (ndb_mgmd) +\fB\-\-config\-cache\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-config\-cache[=TRUE|FALSE] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +This option, whose default value is +1 +(or +TRUE, or +ON), can be used to disable the management server\*(Aqs configuration cache, so that it reads its configuration from +config\&.ini +every time it starts (see +Section\ \&18.3.2, \(lqMySQL Cluster Configuration Files\(rq)\&. You can do this by starting the +\fBndb_mgmd\fR +process with any one of the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-cache=0\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-cache=FALSE\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-cache=OFF\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-skip\-config\-cache\fR +.RE +.sp +Using one of the options just listed is effective only if the management server has no stored configuration at the time it is started\&. If the management server finds any configuration cache files, then the +\fB\-\-config\-cache\fR +option or the +\fB\-\-skip\-config\-cache\fR +option is ignored\&. Therefore, to disable configuration caching, the option should be used the +\fIfirst\fR +time that the management server is started\&. Otherwise\(emthat is, if you wish to disable configuration caching for a management server that has +\fIalready\fR +created a configuration cache\(emyou must stop the management server, delete any existing configuration cache files manually, then restart the management server with +\fB\-\-skip\-config\-cache\fR +(or with +\fB\-\-config\-cache\fR +set equal to 0, +OFF, or +FALSE)\&. +.sp +Configuration cache files are normally created in a directory named +mysql\-cluster +under the installation directory (unless this location has been overridden using the +\fB\-\-configdir\fR +option)\&. Each time the management server updates its configuration data, it writes a new cache file\&. The files are named sequentially in order of creation using the following format: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_\fInode\-id\fR_config\&.bin\&.\fIseq\-number\fR +.fi +.if n \{\ +.RE +.\} +.sp +\fInode\-id\fR +is the management server\*(Aqs node ID; +\fIseq\-number\fR +is a sequence number, beginning with 1\&. For example, if the management server\*(Aqs node ID is 5, then the first three configuration cache files would, when they are created, be named +ndb_5_config\&.bin\&.1, +ndb_5_config\&.bin\&.2, and +ndb_5_config\&.bin\&.3\&. +.sp +If your intent is to purge or reload the configuration cache without actually disabling caching, you should start +\fBndb_mgmd\fR +with one of the options +\fB\-\-reload\fR +or +\fB\-\-initial\fR +instead of +\fB\-\-skip\-config\-cache\fR\&. +.sp +To re\-enable the configuration cache, simply restart the management server, but without the +\fB\-\-config\-cache\fR +or +\fB\-\-skip\-config\-cache\fR +option that was used previously to disable the configuration cache\&. +.sp +Beginning with MySQL Cluster NDB 7\&.2\&.5, +\fBndb_mgmd\fR +no longer checks for the configuration directory (\fB\-\-configdir\fR) or attempts to create one when +\fB\-\-skip\-config\-cache\fR +is used\&. (Bug #13428853) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" config-file option (ndb_mgmd) +.\" -f option (ndb_mgmd) +.\" -c option (ndb_mgmd) (OBSOLETE) +\fB\-\-config\-file=\fR\fB\fIfilename\fR\fR, +\fB\-f \fR\fB\fIfilename\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-config\-file=file +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Instructs the management server as to which file it should use for its configuration file\&. By default, the management server looks for a file named +config\&.ini +in the same directory as the +\fBndb_mgmd\fR +executable; otherwise the file name and location must be specified explicitly\&. +.sp +This option has no default value, and is ignored unless the management server is forced to read the configuration file, either because +\fBndb_mgmd\fR +was started with the +\fB\-\-reload\fR +or +\fB\-\-initial\fR +option, or because the management server could not find any configuration cache\&. This option is also read if +\fBndb_mgmd\fR +was started with +\fB\-\-config\-cache=OFF\fR\&. See +Section\ \&18.3.2, \(lqMySQL Cluster Configuration Files\(rq, for more information\&. +.sp +Formerly, using this option together with +\fB\-\-initial\fR +caused removal of the configuration cache even if the file was not found\&. This issue was resolved in MySQL Cluster NDB 7\&.2\&.13\&. (Bug #1299289) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_mgmd: mycnf option +.\" mycnf option: ndb_mgmd +\fB\-\-mycnf\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-mycnf +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Read configuration data from the +my\&.cnf +file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" daemon option (ndb_mgmd) +.\" -d option (ndb_mgmd) +\fB\-\-daemon\fR, +\fB\-d\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-daemon +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Instructs +\fBndb_mgmd\fR +to start as a daemon process\&. This is the default behavior\&. +.sp +This option has no effect when running +\fBndb_mgmd\fR +on Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" interactive option (ndb_mgmd) +\fB\-\-interactive\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-interactive +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Starts +\fBndb_mgmd\fR +in interactive mode; that is, an +\fBndb_mgm\fR +client session is started as soon as the management server is running\&. This option does not start any other MySQL Cluster nodes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" initial option (ndb_mgmd) +\fB\-\-initial\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-initial +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Configuration data is cached internally, rather than being read from the cluster global configuration file each time the management server is started (see +Section\ \&18.3.2, \(lqMySQL Cluster Configuration Files\(rq)\&. Using the +\fB\-\-initial\fR +option overrides this behavior, by forcing the management server to delete any existing cache files, and then to re\-read the configuration data from the cluster configuration file and to build a new cache\&. +.sp +This differs in two ways from the +\fB\-\-reload\fR +option\&. First, +\fB\-\-reload\fR +forces the server to check the configuration file against the cache and reload its data only if the contents of the file are different from the cache\&. Second, +\fB\-\-reload\fR +does not delete any existing cache files\&. +.sp +If +\fBndb_mgmd\fR +is invoked with +\fB\-\-initial\fR +but cannot find a global configuration file, the management server cannot start\&. +.sp +When a management server starts, it checks for another management server in the same MySQL Cluster and tries to use the other management server\*(Aqs configuration data; +\fBndb_mgmd\fR +ignores +\fB\-\-initial\fR +unless it is the only management server running\&. This behavior also has implications when performing a rolling restart of a MySQL Cluster with multiple management nodes\&. See +Section\ \&18.5.5, \(lqPerforming a Rolling Restart of a MySQL Cluster\(rq, for more information\&. +.sp +Formerly, using this option together with the +\fB\-\-config\-file\fR +option caused removal of the configuration cache even if the file was not found\&. Starting with MySQL Cluster NDB 7\&.2\&.13, the cache is cleared in such cases only if the configuration file is actually found\&. (Bug #1299289) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" log-name option (ndb_mgmd) +\fB\-\-log\-name=\fR\fB\fIname\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-log\-name=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +MgmtSrvr +T} +.TE +.sp 1 +Provides a name to be used for this node in the cluster log\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" nodaemon option (ndb_mgmd) +\fB\-\-nodaemon\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nodaemon +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Instructs +\fBndb_mgmd\fR +not to start as a daemon process\&. +.sp +The default behavior for +\fBndb_mgmd\fR +on Windows is to run in the foreground, making this option unnecessary on Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" print-full-config option (ndb_mgmd) +.\" -P option (ndb_mgmd) +\fB\-\-print\-full\-config\fR, +\fB\-P\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-print\-full\-config +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Shows extended information regarding the configuration of the cluster\&. With this option on the command line the +\fBndb_mgmd\fR +process prints information about the cluster setup including an extensive list of the cluster configuration sections as well as parameters and their values\&. Normally used together with the +\fB\-\-config\-file\fR +(\fB\-f\fR) option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" reload option (ndb_mgmd) +\fB\-\-reload\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-reload +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +In MySQL Cluster NDB 7\&.2, configuration data is stored internally rather than being read from the cluster global configuration file each time the management server is started (see +Section\ \&18.3.2, \(lqMySQL Cluster Configuration Files\(rq)\&. Using this option forces the management server to check its internal data store against the cluster configuration file and to reload the configuration if it finds that the configuration file does not match the cache\&. Existing configuration cache files are preserved, but not used\&. +.sp +This differs in two ways from the +\fB\-\-initial\fR +option\&. First, +\fB\-\-initial\fR +causes all cache files to be deleted\&. Second, +\fB\-\-initial\fR +forces the management server to re\-read the global configuration file and construct a new cache\&. +.sp +If the management server cannot find a global configuration file, then the +\fB\-\-reload\fR +option is ignored\&. +.sp +When a management server starts, it checks for another management server in the same MySQL Cluster and tries to use the other management server\*(Aqs configuration data; +\fBndb_mgmd\fR +ignores +\fB\-\-reload\fR +unless it is the only management server running\&. This behavior also has implications when performing a rolling restart of a MySQL Cluster with multiple management nodes\&. See +Section\ \&18.5.5, \(lqPerforming a Rolling Restart of a MySQL Cluster\(rq, for more information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" nowait-nodes option (ndb_mgmd) +\fB\-\-nowait\-nodes\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nowait\-nodes=list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +255 +T} +.TE +.sp 1 +When starting a MySQL Cluster is configured with two management nodes, each management server normally checks to see whether the other +\fBndb_mgmd\fR +is also operational and whether the other management server\*(Aqs configuration is identical to its own\&. However, it is sometimes desirable to start the cluster with only one management node (and perhaps to allow the other +\fBndb_mgmd\fR +to be started later)\&. This option causes the management node to bypass any checks for any other management nodes whose node IDs are passed to this option, permitting the cluster to start as though configured to use only the management node that was started\&. +.sp +For purposes of illustration, consider the following portion of a +config\&.ini +file (where we have omitted most of the configuration parameters that are not relevant to this example): +.sp +.if n \{\ +.RS 4 +.\} +.nf +[ndbd] +NodeId = 1 +HostName = 192\&.168\&.0\&.101 +[ndbd] +NodeId = 2 +HostName = 192\&.168\&.0\&.102 +[ndbd] +NodeId = 3 +HostName = 192\&.168\&.0\&.103 +[ndbd] +NodeId = 4 +HostName = 192\&.168\&.0\&.104 +[ndb_mgmd] +NodeId = 10 +HostName = 192\&.168\&.0\&.150 +[ndb_mgmd] +NodeId = 11 +HostName = 192\&.168\&.0\&.151 +[api] +NodeId = 20 +HostName = 192\&.168\&.0\&.200 +[api] +NodeId = 21 +HostName = 192\&.168\&.0\&.201 +.fi +.if n \{\ +.RE +.\} +.sp +Assume that you wish to start this cluster using only the management server having node ID +10 +and running on the host having the IP address 192\&.168\&.0\&.150\&. (Suppose, for example, that the host computer on which you intend to the other management server is temporarily unavailable due to a hardware failure, and you are waiting for it to be repaired\&.) To start the cluster in this way, use a command line on the machine at 192\&.168\&.0\&.150 to enter the following command: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_mgmd \-\-ndb\-nodeid=10 \-\-nowait\-nodes=11\fR +.fi +.if n \{\ +.RE +.\} +.sp +As shown in the preceding example, when using +\fB\-\-nowait\-nodes\fR, you must also use the +\fB\-\-ndb\-nodeid\fR +option to specify the node ID of this +\fBndb_mgmd\fR +process\&. +.sp +You can then start each of the cluster\*(Aqs data nodes in the usual way\&. If you wish to start and use the second management server in addition to the first management server at a later time without restarting the data nodes, you must start each data node with a connection string that references both management servers, like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbd \-c 192\&.168\&.0\&.150,192\&.168\&.0\&.151\fR +.fi +.if n \{\ +.RE +.\} +.sp +The same is true with regard to the connection string used with any +\fBmysqld\fR +processes that you wish to start as MySQL Cluster SQL nodes connected to this cluster\&. See +Section\ \&18.3.2.3, \(lqMySQL Cluster Connection Strings\(rq, for more information\&. +.sp +When used with +\fBndb_mgmd\fR, this option affects the behavior of the management node with regard to other management nodes only\&. Do not confuse it with the +\fB\-\-nowait\-nodes\fR +option used with +\fBndbd\fR +or +\fBndbmtd\fR +to permit a cluster to start with fewer than its full complement of data nodes; when used with data nodes, this option affects their behavior only with regard to other data nodes\&. +.sp +Multiple management node IDs may be passed to this option as a comma\-separated list\&. Each node ID must be no less than 1 and no greater than 255\&. In practice, it is quite rare to use more than two management servers for the same MySQL Cluster (or to have any need for doing so); in most cases you need to pass to this option only the single node ID for the one management server that you do not wish to use when starting the cluster\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +When you later start the +\(lqmissing\(rq +management server, its configuration must match that of the management server that is already in use by the cluster\&. Otherwise, it fails the configuration check performed by the existing management server, and does not start\&. +.sp .5v +.RE +.RE +.PP +It is not strictly necessary to specify a connection string when starting the management server\&. However, if you are using more than one management server, a connection string should be provided and each node in the cluster should specify its node ID explicitly\&. +.PP +See +Section\ \&18.3.2.3, \(lqMySQL Cluster Connection Strings\(rq, for information about using connection strings\&. +\fBndb_mgmd\fR(8), describes other options for +\fBndb_mgmd\fR\&. +.PP +The following files are created or used by +\fBndb_mgmd\fR +in its starting directory, and are placed in the +DataDir +as specified in the +config\&.ini +configuration file\&. In the list that follows, +\fInode_id\fR +is the unique node identifier\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" MySQL Cluster: configuration +.\" configuring MySQL Cluster +.\" config.ini (MySQL Cluster) +config\&.ini +is the configuration file for the cluster as a whole\&. This file is created by the user and read by the management server\&. +Section\ \&18.3, \(lqConfiguration of MySQL Cluster\(rq, discusses how to set up this file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_cluster\&.log +is the cluster events log file\&. Examples of such events include checkpoint startup and completion, node startup events, node failures, and levels of memory usage\&. A complete listing of cluster events with descriptions may be found in +Section\ \&18.5, \(lqManagement of MySQL Cluster\(rq\&. +.sp +When the size of the cluster log reaches one million bytes, the file is renamed to +ndb_\fInode_id\fR_cluster\&.log\&.\fIseq_id\fR, where +\fIseq_id\fR +is the sequence number of the cluster log file\&. (For example: If files with the sequence numbers 1, 2, and 3 already exist, the next log file is named using the number +4\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_out\&.log +is the file used for +stdout +and +stderr +when running the management server as a daemon\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR\&.pid +is the process ID file used when running the management server as a daemon\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" install option (ndb_mgmd) +\fB\-\-install[=\fR\fB\fIname\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-install[=name] +T} +T{ +\fBPlatform Specific\fR +T}:T{ +Windows +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +ndb_mgmd +T} +.TE +.sp 1 +Causes +\fBndb_mgmd\fR +to be installed as a Windows service\&. Optionally, you can specify a name for the service; if not set, the service name defaults to +ndb_mgmd\&. Although it is preferable to specify other +\fBndb_mgmd\fR +program options in a +my\&.ini +or +my\&.cnf +configuration file, it is possible to use them together with +\fB\-\-install\fR\&. However, in such cases, the +\fB\-\-install\fR +option must be specified first, before any other options are given, for the Windows service installation to succeed\&. +.sp +It is generally not advisable to use this option together with the +\fB\-\-initial\fR +option, since this causes the configuration cache to be wiped and rebuilt every time the service is stopped and started\&. Care should also be taken if you intend to use any other +\fBndb_mgmd\fR +options that affect the starting of the management server, and you should make absolutely certain you fully understand and allow for any possible consequences of doing so\&. +.sp +The +\fB\-\-install\fR +option has no effect on non\-Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" remove option (ndb_mgmd) +\fB\-\-remove[=\fR\fB\fIname\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-remove[=name] +T} +T{ +\fBPlatform Specific\fR +T}:T{ +Windows +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +ndb_mgmd +T} +.TE +.sp 1 +Causes an +\fBndb_mgmd\fR +process that was previously installed as a Windows service to be removed\&. Optionally, you can specify a name for the service to be uninstalled; if not set, the service name defaults to +ndb_mgmd\&. +.sp +The +\fB\-\-remove\fR +option has no effect on non\-Windows platforms\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_print_backup_file.1 b/man/ndb_print_backup_file.1 new file mode 100644 index 000000000000..806f12e641be --- /dev/null +++ b/man/ndb_print_backup_file.1 @@ -0,0 +1,89 @@ +'\" t +.\" Title: \fBndb_print_backup_file\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_PRINT_BACKUP_" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_print_backup_file +.SH "NAME" +ndb_print_backup_file \- print NDB backup file contents +.SH "SYNOPSIS" +.HP \w'\fBndb_print_backup_file\ \fR\fB\fIfile_name\fR\fR\ 'u +\fBndb_print_backup_file \fR\fB\fIfile_name\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_print_backup_file\fR +obtains diagnostic information from a cluster backup file\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_print_backup_file \fIfile_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fIfile_name\fR +is the name of a cluster backup file\&. This can be any of the files (\&.Data, +\&.ctl, or +\&.log +file) found in a cluster backup directory\&. These files are found in the data node\*(Aqs backup directory under the subdirectory +BACKUP\-\fI#\fR, where +\fI#\fR +is the sequence number for the backup\&. For more information about cluster backup files and their contents, see +Section\ \&18.5.3.1, \(lqMySQL Cluster Backup Concepts\(rq\&. +.PP +Like +\fBndb_print_schema_file\fR +and +\fBndb_print_sys_file\fR +(and unlike most of the other +NDB +utilities that are intended to be run on a management server host or to connect to a management server) +\fBndb_print_backup_file\fR +must be run on a cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. +Additional Options.PP +None\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_print_file.1 b/man/ndb_print_file.1 new file mode 100644 index 000000000000..010ecfbcc59a --- /dev/null +++ b/man/ndb_print_file.1 @@ -0,0 +1,123 @@ +'\" t +.\" Title: \fBndb_print_file\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_PRINT_FILE\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_print_file +.SH "NAME" +ndb_print_file \- print NDB Disk Data file contents +.SH "SYNOPSIS" +.HP \w'\fBndb_print_file\ [\-v]\ [\-q]\ \fR\fB\fIfile_name\fR\fR\fB+\fR\ 'u +\fBndb_print_file [\-v] [\-q] \fR\fB\fIfile_name\fR\fR\fB+\fR +.SH "DESCRIPTION" +.PP +\fBndb_print_file\fR +obtains information from a MySQL Cluster Disk Data file\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_print_file [\-v] [\-q] \fIfile_name\fR+ +.fi +.if n \{\ +.RE +.\} +.PP +\fIfile_name\fR +is the name of a MySQL Cluster Disk Data file\&. Multiple filenames are accepted, separated by spaces\&. +.PP +Like +\fBndb_print_schema_file\fR +and +\fBndb_print_sys_file\fR +(and unlike most of the other +NDB +utilities that are intended to be run on a management server host or to connect to a management server) +\fBndb_print_file\fR +must be run on a MySQL Cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. +Additional Options.PP +\fBndb_print_file\fR +supports the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-v\fR: Make output verbose\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-q\fR: Suppress output (quiet mode)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-help\fR, +\fB\-h\fR, +\fB\-?\fR: Suppress output (quiet mode)\&. +.sp +This option did not work correctly prior to MySQL Cluster NDB 7\&.2\&.18\&. (Bug #17069285) +.RE +.PP +For more information, see +Section\ \&18.5.12, \(lqMySQL Cluster Disk Data Tables\(rq\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_print_schema_file.1 b/man/ndb_print_schema_file.1 new file mode 100644 index 000000000000..550cdc9b2edf --- /dev/null +++ b/man/ndb_print_schema_file.1 @@ -0,0 +1,89 @@ +'\" t +.\" Title: \fBndb_print_schema_file\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_PRINT_SCHEMA_" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_print_schema_file +.SH "NAME" +ndb_print_schema_file \- print NDB schema file contents +.SH "SYNOPSIS" +.HP \w'\fBndb_print_schema_file\ \fR\fB\fIfile_name\fR\fR\ 'u +\fBndb_print_schema_file \fR\fB\fIfile_name\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_print_schema_file\fR +obtains diagnostic information from a cluster schema file\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_print_schema_file \fIfile_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fIfile_name\fR +is the name of a cluster schema file\&. For more information about cluster schema files, see +\m[blue]\fBMySQL Cluster Data Node File System Directory Files\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +Like +\fBndb_print_backup_file\fR +and +\fBndb_print_sys_file\fR +(and unlike most of the other +NDB +utilities that are intended to be run on a management server host or to connect to a management server) +\fBndb_schema_backup_file\fR +must be run on a cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. +Additional Options.PP +None\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +MySQL Cluster Data Node File System Directory Files +.RS 4 +\%http://dev.mysql.com/doc/ndbapi/en/ndb-internals-ndbd-filesystemdir-files.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_print_sys_file.1 b/man/ndb_print_sys_file.1 new file mode 100644 index 000000000000..5daab604baad --- /dev/null +++ b/man/ndb_print_sys_file.1 @@ -0,0 +1,92 @@ +'\" t +.\" Title: \fBndb_print_sys_file\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_PRINT_SYS_FIL" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_print_sys_file +.SH "NAME" +ndb_print_sys_file \- print NDB system file contents +.SH "SYNOPSIS" +.HP \w'\fBndb_print_sys_file\ \fR\fB\fIfile_name\fR\fR\ 'u +\fBndb_print_sys_file \fR\fB\fIfile_name\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_print_sys_file\fR +obtains diagnostic information from a MySQL Cluster system file\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_print_sys_file \fIfile_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fIfile_name\fR +is the name of a cluster system file (sysfile)\&. Cluster system files are located in a data node\*(Aqs data directory (DataDir); the path under this directory to system files matches the pattern +ndb_\fI#\fR_fs/D\fI#\fR/DBDIH/P\fI#\fR\&.sysfile\&. In each case, the +\fI#\fR +represents a number (not necessarily the same number)\&. For more information, see +\m[blue]\fBMySQL Cluster Data Node File System Directory Files\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +Like +\fBndb_print_backup_file\fR +and +\fBndb_print_schema_file\fR +(and unlike most of the other +NDB +utilities that are intended to be run on a management server host or to connect to a management server) +\fBndb_print_backup_file\fR +must be run on a cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. +Additional Options.PP +None\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +MySQL Cluster Data Node File System Directory Files +.RS 4 +\%http://dev.mysql.com/doc/ndbapi/en/ndb-internals-ndbd-filesystemdir-files.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_restore.1 b/man/ndb_restore.1 new file mode 100644 index 000000000000..1944e31eb254 --- /dev/null +++ b/man/ndb_restore.1 @@ -0,0 +1,2217 @@ +'\" t +.\" Title: \fBndb_restore\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_RESTORE\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" MySQL Cluster: backups +.\" backups: in MySQL Cluster +.\" MySQL Cluster: restoring backups +.\" restoring backups: in MySQL Cluster +.\" ndb_restore +.SH "NAME" +ndb_restore \- restore a MySQL Cluster backup +.SH "SYNOPSIS" +.HP \w'\fBndb_restore\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_restore \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +The cluster restoration program is implemented as a separate command\-line utility +\fBndb_restore\fR, which can normally be found in the MySQL +bin +directory\&. This program reads the files created as a result of the backup and inserts the stored information into the database\&. +.PP +\fBndb_restore\fR +must be executed once for each of the backup files that were created by the +START BACKUP +command used to create the backup (see +Section\ \&18.5.3.2, \(lqUsing The MySQL Cluster Management Client to Create a Backup\(rq)\&. This is equal to the number of data nodes in the cluster at the time that the backup was created\&. +.\" single user mode (MySQL Cluster): and ndb_restore +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +Before using +\fBndb_restore\fR, it is recommended that the cluster be running in single user mode, unless you are restoring multiple data nodes in parallel\&. See +Section\ \&18.5.8, \(lqMySQL Cluster Single User Mode\(rq, for more information\&. +.sp .5v +.RE +.PP +The following table includes options that are specific to the MySQL Cluster native backup restoration program +\fBndb_restore\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_restore\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.82.\ \& This table describes command-line options for the ndb_restore program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l. +T{ +.PP +--connect, +.PP +-c +T}:T{ +Alias for --connectstring. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--nodeid=#, +.PP +-n +T}:T{ +Back up files from node with this ID +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--backupid=#, +.PP +-b +T}:T{ +Restore from the backup with the given ID +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--restore_data, +.PP +-r +T}:T{ +Restore table data and logs into NDB Cluster using the NDB API +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--restore_meta, +.PP +-m +T}:T{ +Restore metadata to NDB Cluster using the NDB API +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--no-upgrade, +.PP +-u +T}:T{ +Do not upgrade array type for varsize attributes which do not + already resize VAR data, and do not change column attributes +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--promote-attributes, +.PP +-A +T}:T{ +Allow attributes to be promoted when restoring data from backup +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--preserve-trailing-spaces, +.PP +-P +T}:T{ +Allow preservation of trailing spaces (including padding) when + promoting fixed-width string types to variable-width types +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--no-restore-disk-objects, +.PP +-d +T}:T{ +Do not restore objects relating to Disk Data +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--restore_epoch, +.PP +-e +T}:T{ +Restore epoch info into the status table. Convenient on a MySQL + Cluster replication slave for starting replication. The row in + mysql.ndb_apply_status with id 0 will be updated/inserted. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--skip-table-check, +.PP +-s +T}:T{ +Skip table structure check during restoring of data +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--parallelism=#, +.PP +-p +T}:T{ +Number of parallel transactions to use while restoring data +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--print +T}:T{ +Print metadata, data and log to stdout (equivalent to --print_meta + --print_data --print_log) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--print_meta +T}:T{ +Print metadata to stdout +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--print_data +T}:T{ +Print data to stdout +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--print_log +T}:T{ +Print to stdout +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--backup_path=path +T}:T{ +Path to backup files directory +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--dont_ignore_systab_0, +.PP +-f +T}:T{ +Do not ignore system table during restore. Experimental only; not + for production use +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--ndb-nodegroup-map=map, +.PP +-z +T}:T{ +Nodegroup map for NDBCLUSTER storage engine. Syntax: list of + (source_nodegroup, destination_nodegroup) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--fields-enclosed-by=char +T}:T{ +Fields are enclosed with the indicated character +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--fields-terminated-by=char +T}:T{ +Fields are terminated by the indicated character +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--fields-optionally-enclosed-by +T}:T{ +Fields are optionally enclosed with the indicated character +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--lines-terminated-by=char +T}:T{ +Lines are terminated by the indicated character +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--hex +T}:T{ +Print binary types in hexadecimal format +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--tab=path, +.PP +-T +T}:T{ +Creates a tab-separated .txt file for each table in the given path +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--append +T}:T{ +Append data to a tab-delimited file +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--progress-frequency=# +T}:T{ +Print status of restoration each given number of seconds +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--no-binlog +T}:T{ +If a mysqld is connected and using binary logging, do not log the + restored data +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--verbose=# +T}:T{ +Level of verbosity in output +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--include-databases=db-list +T}:T{ +List of one or more databases to restore (excludes those not + named) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--exclude-databases=db-list +T}:T{ +List of one or more databases to exclude (includes those not + named) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--include-tables=table-list +T}:T{ +List of one or more tables to restore (excludes those in same + database that are not named); each table reference must include + the database name +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--exclude-tables=table-list +T}:T{ +List of one or more tables to exclude (includes those in the same + database that are not named); each table reference must include + the database name +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--exclude-missing-columns +T}:T{ +Causes columns from the backup version of a table that are missing + from the version of the table in the database to be ignored. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--exclude-missing-tables +T}:T{ +Causes tables from the backup that are missing from the database + to be ignored. +T}:T{ +.PP +ADDED: NDB 7.2.18 +T} +T{ +.PP +--disable-indexes +T}:T{ +Causes indexes from a backup to be ignored; may decrease time + needed to restore data. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--rebuild-indexes +T}:T{ +Causes multi-threaded rebuilding of ordered indexes found in the + backup. Number of threads used is determined by setting + BuildIndexThreads parameter. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--skip-broken-objects +T}:T{ +Causes missing blob tables in the backup file to be ignored. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--skip-unknown-objects +T}:T{ +Causes schema objects not recognized by ndb_restore to be ignored + when restoring a backup made from a newer MySQL Cluster version to + an older version. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--rewrite-database=olddb,newdb +T}:T{ +Restores to a database with a different name than the original +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--lossy-conversions, +.PP +-L +T}:T{ +Allow lossy conversions of column values (type demotions or + changes in sign) when restoring data from backup +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--restore-privilege-tables +T}:T{ +Restore MySQL privilege tables that were previously moved to NDB. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--exclude-intermediate-sql-tables[=TRUE|FALSE] +T}:T{ +If TRUE (the default), do not restore any intermediate tables + (having names prefixed with '#sql-') that were left over from + copying ALTER TABLE operations. +T}:T{ +.PP +ADDED: NDB 7.2.17 +T} +.TE +.sp 1 +.\" ndb_restore: typical and required options +.PP +Typical options for this utility are shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_restore [\-c \fIconnection_string\fR] \-n \fInode_id\fR \-b \fIbackup_id\fR \e + [\-m] \-r \-\-backup_path=\fI/path/to/backup/files\fR +.fi +.if n \{\ +.RE +.\} +.PP +Normally, when restoring from a MySQL Cluster backup, +\fBndb_restore\fR +requires at a minimum the +\fB\-\-nodeid\fR +(short form: +\fB\-n\fR), +\fB\-\-backupid\fR +(short form: +\fB\-b\fR), and +\fB\-\-backup_path\fR +options\&. +.PP +.\" restore_connect option (ndb_restore) +The +\fB\-c\fR +option is used to specify a connection string which tells +ndb_restore +where to locate the cluster management server\&. (See +Section\ \&18.3.2.3, \(lqMySQL Cluster Connection Strings\(rq, for information on connection strings\&.) If this option is not used, then +\fBndb_restore\fR +attempts to connect to a management server on +localhost:1186\&. This utility acts as a cluster API node, and so requires a free connection +\(lqslot\(rq +to connect to the cluster management server\&. This means that there must be at least one +[api] +or +[mysqld] +section that can be used by it in the cluster +config\&.ini +file\&. It is a good idea to keep at least one empty +[api] +or +[mysqld] +section in +config\&.ini +that is not being used for a MySQL server or other application for this reason (see +Section\ \&18.3.2.7, \(lqDefining SQL and Other API Nodes in a MySQL Cluster\(rq)\&. +.PP +You can verify that +\fBndb_restore\fR +is connected to the cluster by using the +\fBSHOW\fR +command in the +\fBndb_mgm\fR +management client\&. You can also accomplish this from a system shell, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_mgm \-e "SHOW"\fR +.fi +.if n \{\ +.RE +.\} +.PP +.\" restore_nodeid option (ndb_restore) +\fB\-n\fR +is used to specify the node ID of the data node on which the backups were taken\&. +.PP +The first time you run the +\fBndb_restore\fR +restoration program, you also need to restore the metadata\&. In other words, you must re\-create the database tables\(emthis can be done by running it with the +\fB\-\-restore_meta\fR +(\fB\-m\fR) option\&. Restoring the metdata need be done only on a single data node; this is sufficient to restore it to the entire cluster\&. Note that the cluster should have an empty database when starting to restore a backup\&. (In other words, you should start +\fBndbd\fR +with +\fB\-\-initial\fR +prior to performing the restore\&.) +.PP +.\" restore_skip-table-check option (ndb_restore) +It is possible to restore data without restoring table metadata\&. The default behavior when doing this is for +\fBndb_restore\fR +to fail with an error if table data do not match the table schema; this can be overridden using the +\fB\-\-skip\-table\-check\fR +or +\fB\-s\fR +option\&. +.PP +Some of the restrictions on mismatches in column definitions when restoring data using +\fBndb_restore\fR +are relaxed; when one of these types of mismatches is encountered, +\fBndb_restore\fR +does not stop with an error as it did previously, but rather accepts the data and inserts it into the target table while issuing a warning to the user that this is being done\&. This behavior occurs whether or not either of the options +\fB\-\-skip\-table\-check\fR +or +\fB\-\-promote\-attributes\fR +is in use\&. These differences in column definitions are of the following types: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Different +COLUMN_FORMAT +settings (FIXED, +DYNAMIC, +DEFAULT) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Different +STORAGE +settings (MEMORY, +DISK) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Different default values +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Different distribution key settings +.RE +.PP +.\" attribute promotion: ndb_restore +.\" ndb_restore: attribute promotion +.\" promote-attributes option (ndb_restore) +\fBndb_restore\fR +supports limited +attribute promotion +in much the same way that it is supported by MySQL replication; that is, data backed up from a column of a given type can generally be restored to a column using a +\(lqlarger, similar\(rq +type\&. For example, data from a +CHAR(20) +column can be restored to a column declared as +VARCHAR(20), +VARCHAR(30), or +CHAR(30); data from a +MEDIUMINT +column can be restored to a column of type +INT +or +BIGINT\&. See +Section\ \&17.4.1.9.2, \(lqReplication of Columns Having Different Data Types\(rq, for a table of type conversions currently supported by attribute promotion\&. +.PP +Attribute promotion by +\fBndb_restore\fR +must be enabled explicitly, as follows: +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +Prepare the table to which the backup is to be restored\&. +\fBndb_restore\fR +cannot be used to re\-create the table with a different definition from the original; this means that you must either create the table manually, or alter the columns which you wish to promote using +ALTER TABLE +after restoring the table metadata but before restoring the data\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +Invoke +\fBndb_restore\fR +with the +\fB\-\-promote\-attributes\fR +option (short form +\fB\-A\fR) when restoring the table data\&. Attribute promotion does not occur if this option is not used; instead, the restore operation fails with an error\&. +.RE +.PP +Prior to MySQL Cluster NDB 7\&.2\&.14, conversions between character data types and +TEXT +or +BLOB +were not handled correctly (Bug #17325051)\&. +.PP +Prior to MySQL Cluster NDB 7\&.2\&.18, demotion of +TEXT +to +TINYTEXT +was not handled correctly (Bug #18875137)\&. +.PP +When converting between character data types and +TEXT +or +BLOB, only conversions between character types (CHAR +and +VARCHAR) and binary types (BINARY +and +VARBINARY) can be performed at the same time\&. For example, you cannot promote an +INT +column to +BIGINT +while promoting a +VARCHAR +column to +TEXT +in the same invocation of +\fBndb_restore\fR\&. +.PP +Converting between +TEXT +columns using different character sets is not supported\&. Beginning with MySQL Cluster NDB 7\&.2\&.18, it is expressly disallowed (Bug #18875137)\&. +.PP +When performing conversions of character or binary types to +TEXT +or +BLOB +with +\fBndb_restore\fR, you may notice that it creates and uses one or more staging tables named +\fItable_name\fR$ST\fInode_id\fR\&. These tables are not needed afterwards, and are normally deleted by +\fBndb_restore\fR +following a successful restoration\&. +.PP +.\" ndb_restore: lossy-conversions option +.\" lossy-conversions option (ndb_restore) +\fB\-\-lossy\-conversions\fR, +\fB\-L\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-lossy\-conversions +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +.PP +This option is intended to complement the +\fB\-\-promote\-attributes\fR +option\&. Using +\fB\-\-lossy\-conversions\fR +allows lossy conversions of column values (type demotions or changes in sign) when restoring data from backup\&. With some exceptions, the rules governing demotion are the same as for MySQL replication; see +Section\ \&17.4.1.9.2, \(lqReplication of Columns Having Different Data Types\(rq, for information about specific type conversions currently supported by attribute demotion\&. +.PP +\fBndb_restore\fR +reports any truncation of data that it performs during lossy conversions once per attribute and column\&. +.PP +.\" preserve-trailing-spaces option (ndb_restore) +The +\fB\-\-preserve\-trailing\-spaces\fR +option (short form +\fB\-R\fR) causes trailing spaces to be preserved when promoting a fixed\-width character data type to its variable\-width equivalent\(emthat is, when promoting a +CHAR +column value to +VARCHAR +or a +BINARY +column value to +VARBINARY\&. Otherwise, any trailing spaces are dropped from such column values when they are inserted into the new columns\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +Although you can promote +CHAR +columns to +VARCHAR +and +BINARY +columns to +VARBINARY, you cannot promote +VARCHAR +columns to +CHAR +or +VARBINARY +columns to +BINARY\&. +.sp .5v +.RE +.PP +.\" backupid option (ndb_restore) +The +\fB\-b\fR +option is used to specify the ID or sequence number of the backup, and is the same number shown by the management client in the +Backup \fIbackup_id\fR completed +message displayed upon completion of a backup\&. (See +Section\ \&18.5.3.2, \(lqUsing The MySQL Cluster Management Client to Create a Backup\(rq\&.) +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +.PP +When restoring cluster backups, you must be sure to restore all data nodes from backups having the same backup ID\&. Using files from different backups will at best result in restoring the cluster to an inconsistent state, and may fail altogether\&. +.sp .5v +.RE +.PP +.\" restore_epoch option (ndb_restore) +\fB\-\-restore_epoch\fR +(short form: +\fB\-e\fR) adds (or restores) epoch information to the cluster replication status table\&. This is useful for starting replication on a MySQL Cluster replication slave\&. When this option is used, the row in the +mysql\&.ndb_apply_status +having +0 +in the +id +column is updated if it already exists; such a row is inserted if it does not already exist\&. (See +Section\ \&18.6.9, \(lqMySQL Cluster Backups With MySQL Cluster Replication\(rq\&.) +.PP +.\" restore_data option (ndb_restore) +\fB\-\-restore_data\fR +.PP +This option causes +\fBndb_restore\fR +to output +NDB +table data and logs\&. +.PP +.\" restore_meta option (ndb_restore) +\fB\-\-restore_meta\fR +.PP +This option causes +\fBndb_restore\fR +to print +NDB +table metadata\&. Generally, you need only use this option when restoring the first data node of a cluster; additional data nodes can obtain the metadata from the first one\&. +.PP +.\" restore-privilege-tables option (ndb_restore) +.\" ndb_restore: restore-privilege-tables option +\fB\-\-restore\-privilege\-tables\fR +.PP +\fBndb_restore\fR +does not by default restore distributed MySQL privilege tables (MySQL Cluster NDB 7\&.2\&.0 and later)\&. This option causes +\fBndb_restore\fR +to restore the privilege tables\&. +.PP +This works only if the privilege tables were converted to +NDB +before the backup was taken\&. For more information, see +Section\ \&18.5.14, \(lqDistributed MySQL Privileges for MySQL Cluster\(rq\&. +.PP +.\" backup_path option (ndb_restore) +.\" ndb_restore: backup_path option +\fB\-\-backup_path\fR +.PP +The path to the backup directory is required; this is supplied to +\fBndb_restore\fR +using the +\fB\-\-backup_path\fR +option, and must include the subdirectory corresponding to the ID backup of the backup to be restored\&. For example, if the data node\*(Aqs +DataDir +is +/var/lib/mysql\-cluster, then the backup directory is +/var/lib/mysql\-cluster/BACKUP, and the backup files for the backup with the ID 3 can be found in +/var/lib/mysql\-cluster/BACKUP/BACKUP\-3\&. The path may be absolute or relative to the directory in which the +\fBndb_restore\fR +executable is located, and may be optionally prefixed with +\fBbackup_path=\fR\&. +.PP +It is possible to restore a backup to a database with a different configuration than it was created from\&. For example, suppose that a backup with backup ID +12, created in a cluster with two database nodes having the node IDs +2 +and +3, is to be restored to a cluster with four nodes\&. Then +\fBndb_restore\fR +must be run twice\(emonce for each database node in the cluster where the backup was taken\&. However, +\fBndb_restore\fR +cannot always restore backups made from a cluster running one version of MySQL to a cluster running a different MySQL version\&. See +Section\ \&18.2.7, \(lqUpgrading and Downgrading MySQL Cluster NDB 7.2\(rq, for more information\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +.PP +It is not possible to restore a backup made from a newer version of MySQL Cluster using an older version of +\fBndb_restore\fR\&. You can restore a backup made from a newer version of MySQL to an older cluster, but you must use a copy of +\fBndb_restore\fR +from the newer MySQL Cluster version to do so\&. +.PP +For example, to restore a cluster backup taken from a cluster running MySQL Cluster NDB 7\&.2\&.5 to a cluster running MySQL Cluster NDB 7\&.1\&.21, you must use the +\fBndb_restore\fR +that comes with the MySQL Cluster NDB 7\&.2\&.5 distribution\&. +.sp .5v +.RE +.PP +For more rapid restoration, the data may be restored in parallel, provided that there is a sufficient number of cluster connections available\&. That is, when restoring to multiple nodes in parallel, you must have an +[api] +or +[mysqld] +section in the cluster +config\&.ini +file available for each concurrent +\fBndb_restore\fR +process\&. However, the data files must always be applied before the logs\&. +.PP +.\" no-upgrade option (ndb_restore) +.\" ndb_restore: no-upgrade option +\fB\-\-no\-upgrade\fR +.PP +When using +\fBndb_restore\fR +to restore a backup, +VARCHAR +columns created using the old fixed format are resized and recreated using the variable\-width format now employed\&. This behavior can be overridden using the +\fB\-\-no\-upgrade\fR +option (short form: +\fB\-u\fR) when running +\fBndb_restore\fR\&. +.PP +.\" print_data option (ndb_restore) +.\" ndb_restore: print_data option +\fB\-\-print_data\fR +.PP +The +\fB\-\-print_data\fR +option causes +\fBndb_restore\fR +to direct its output to +stdout\&. +.PP +TEXT +and +BLOB +column values are always truncated\&. In MySQL Cluster NDB 7\&.2\&.18 and earlier, such values are truncated to the first 240 bytes in the output; in MySQL Cluster NDB 7\&.2\&.19 and later, they are truncated to 256 bytes\&. (Bug #14571512, Bug #65467) This cannot currently be overridden when using +\fB\-\-print_data\fR\&. +.PP +Several additional options are available for use with the +\fB\-\-print_data\fR +option in generating data dumps, either to +stdout, or to a file\&. These are similar to some of the options used with +\fBmysqldump\fR, and are shown in the following list: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_restore: tab option +.\" tab option (ndb_restore) +\fB\-\-tab\fR, +\fB\-T\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-tab=path +T} +.TE +.sp 1 +This option causes +\fB\-\-print_data\fR +to create dump files, one per table, each named +\fItbl_name\fR\&.txt\&. It requires as its argument the path to the directory where the files should be saved; use +\&. +for the current directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_restore: fields-enclosed-by option +.\" fields-enclosed-by option (ndb_restore) +\fB\-\-fields\-enclosed\-by=\fR\fB\fIstring\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields\-enclosed\-by=char +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Each column values are enclosed by the string passed to this option (regardless of data type; see next item)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_restore: fields-optionally-enclosed-by option +.\" fields-optionally-enclosed-by option (ndb_restore) +\fB\-\-fields\-optionally\-enclosed\-by=\fR\fB\fIstring\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields\-optionally\-enclosed\-by +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +The string passed to this option is used to enclose column values containing character data (such as +CHAR, +VARCHAR, +BINARY, +TEXT, or +ENUM)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_restore: fields-terminated-by option +.\" fields-terminated-by option (ndb_restore) +\fB\-\-fields\-terminated\-by=\fR\fB\fIstring\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields\-terminated\-by=char +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +\et (tab) +T} +.TE +.sp 1 +The string passed to this option is used to separate column values\&. The default value is a tab character (\et)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_restore: hex option +.\" hex option (ndb_restore) +\fB\-\-hex\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-hex +T} +.TE +.sp 1 +If this option is used, all binary values are output in hexadecimal format\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_restore: fields-terminated-by option +.\" fields-terminated-by option (ndb_restore) +\fB\-\-fields\-terminated\-by=\fR\fB\fIstring\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields\-terminated\-by=char +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +\et (tab) +T} +.TE +.sp 1 +This option specifies the string used to end each line of output\&. The default is a linefeed character (\en)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_restore: append option +.\" append option (ndb_restore) +\fB\-\-append\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-append +T} +.TE +.sp 1 +When used with the +\fB\-\-tab\fR +and +\fB\-\-print_data\fR +options, this causes the data to be appended to any existing files having the same names\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +If a table has no explicit primary key, then the output generated when using the +\fB\-\-print_data\fR +option includes the table\*(Aqs hidden primary key\&. +.sp .5v +.RE +.PP +.\" ndb_restore: print_meta option +.\" print_meta option (ndb_restore) +\fB\-\-print_meta\fR +.PP +This option causes +\fBndb_restore\fR +to print all metadata to +stdout\&. +.PP +.\" ndb_restore: print_log option +.\" print_log option (ndb_restore) +\fB\-\-print_log\fR +.PP +The +\fB\-\-print_log\fR +option causes +\fBndb_restore\fR +to output its log to +stdout\&. +.PP +.\" ndb_restore: print option +.\" print option (ndb_restore) +\fB\-\-print\fR +.PP +Causes +\fBndb_restore\fR +to print all data, metadata, and logs to +stdout\&. Equivalent to using the +\fB\-\-print_data\fR, +\fB\-\-print_meta\fR, and +\fB\-\-print_log\fR +options together\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +Use of +\fB\-\-print\fR +or any of the +\fB\-\-print_*\fR +options is in effect performing a dry run\&. Including one or more of these options causes any output to be redirected to +stdout; in such cases, +\fBndb_restore\fR +makes no attempt to restore data or metadata to a MySQL Cluster\&. +.sp .5v +.RE +.PP +.\" ndb_restore: dont_ignore_systab_0 option +.\" dont_ignore_systab_0 option (ndb_restore) +\fB\-\-dont_ignore_systab_0\fR +.PP +Normally, when restoring table data and metadata, +\fBndb_restore\fR +ignores the copy of the +NDB +system table that is present in the backup\&. +\fB\-\-dont_ignore_systab_0\fR +causes the system table to be restored\&. +\fIThis option is intended for experimental and development use only, and is not recommended in a production environment\fR\&. +.PP +.\" ndb_restore: ndb-nodegroup-map option +.\" ndb-nodegroup-map option (ndb_restore) +\fB\-\-ndb\-nodegroup\-map\fR, +\fB\-z\fR +.PP +This option can be used to restore a backup taken from one node group to a different node group\&. Its argument is a list of the form +\fIsource_node_group\fR, \fItarget_node_group\fR\&. +.PP +.\" ndb_restore: no-binlog option +.\" no-binlog option (ndb_restore) +\fB\-\-no\-binlog\fR +.PP +This option prevents any connected SQL nodes from writing data restored by +\fBndb_restore\fR +to their binary logs\&. +.PP +.\" ndb_restore: no-restore-disk-objects option +.\" no-restore-disk-objects option (ndb_restore) +\fB\-\-no\-restore\-disk\-objects\fR, +\fB\-d\fR +.PP +This option stops +\fBndb_restore\fR +from restoring any MySQL Cluster Disk Data objects, such as tablespaces and log file groups; see +Section\ \&18.5.12, \(lqMySQL Cluster Disk Data Tables\(rq, for more information about these\&. +.PP +.\" ndb_restore: parallelism option +.\" parallelism option (ndb_restore) +\fB\-\-parallelism=#\fR, +\fB\-p\fR +.PP +Determines the maximum number of parallel transactions that +\fBndb_restore\fR +tries to use\&. By default, this is 128; the minimum is 1, and the maximum is 1024\&. +.PP +.\" ndb_restore: progress-frequency option +.\" progress-frequency option (ndb_restore) +\fB\-\-progress\-frequency=\fR\fB\fIN\fR\fR +.PP +Print a status report each +\fIN\fR +seconds while the backup is in progress\&. 0 (the default) causes no status reports to be printed\&. The maximum is 65535\&. +.PP +.\" ndb_restore: verbose option +.\" verbose option (ndb_restore) +\fB\-\-verbose=#\fR +.PP +Sets the level for the verbosity of the output\&. The minimum is 0; the maximum is 255\&. The default value is 1\&. +.PP +It is possible to restore only selected databases, or selected tables from a single database, using the syntax shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_restore \fIother_options\fR \fIdb_name\fR,[\fIdb_name\fR[,\&.\&.\&.] | \fItbl_name\fR[,\fItbl_name\fR][,\&.\&.\&.]] +.fi +.if n \{\ +.RE +.\} +.PP +In other words, you can specify either of the following to be restored: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +All tables from one or more databases +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +One or more tables from a single database +.RE +.PP +.\" ndb_restore: include-databases option +.\" include-databases option (ndb_restore) +\fB\-\-include\-databases=\fR\fB\fIdb_name\fR\fR\fB[,\fR\fB\fIdb_name\fR\fR\fB][,\&.\&.\&.]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-include\-databases=db\-list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +.PP +.\" ndb_restore: include-tables option +.\" include-tables option (ndb_restore) +\fB\-\-include\-tables=\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB[,\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB][,\&.\&.\&.]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-include\-tables=table\-list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +.PP +Use the +\fB\-\-include\-databases\fR +option or the +\fB\-\-include\-tables\fR +option for restoring only specific databases or tables, respectively\&. +\fB\-\-include\-databases\fR +takes a comma\-delimited list of databases to be restored\&. +\fB\-\-include\-tables\fR +takes a comma\-delimited list of tables (in +\fIdatabase\fR\&.\fItable\fR +format) to be restored\&. +.PP +When +\fB\-\-include\-databases\fR +or +\fB\-\-include\-tables\fR +is used, only those databases or tables named by the option are restored; all other databases and tables are excluded by +\fBndb_restore\fR, and are not restored\&. +.PP +The following table shows several invocations of +\fBndb_restore\fR +using +\fB\-\-include\-*\fR +options (other options possibly required have been omitted for clarity), and the effects these have on restoring from a MySQL Cluster backup: +.TS +allbox tab(:); +lB lB. +T{ +Option Used +T}:T{ +Result +T} +.T& +l l +l l +l l +l l. +T{ +\fB\-\-include\-databases=db1\fR +T}:T{ +Only tables in database db1 are restored; all tables + in all other databases are ignored +T} +T{ +\fB\-\-include\-databases=db1,db2\fR (or + \fB\-\-include\-databases=db1\fR + \fB\-\-include\-databases=db2\fR) +T}:T{ +Only tables in databases db1 and + db2 are restored; all tables in all + other databases are ignored +T} +T{ +\fB\-\-include\-tables=db1\&.t1\fR +T}:T{ +Only table t1 in database db1 is + restored; no other tables in db1 or + in any other database are restored +T} +T{ +\fB\-\-include\-tables=db1\&.t2,db2\&.t1\fR (or + \fB\-\-include\-tables=db1\&.t2\fR + \fB\-\-include\-tables=db2\&.t1\fR) +T}:T{ +Only the table t2 in database db1 + and the table t1 in database + db2 are restored; no other tables in + db1, db2, or any + other database are restored +T} +.TE +.sp 1 +.PP +You can also use these two options together\&. For example, the following causes all tables in databases +db1 +and +db2, together with the tables +t1 +and +t2 +in database +db3, to be restored (and no other databases or tables): +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_restore [\&.\&.\&.] \-\-include\-databases=db1,db2 \-\-include\-tables=db3\&.t1,db3\&.t2\fR +.fi +.if n \{\ +.RE +.\} +.PP +(Again we have omitted other, possibly required, options in the example just shown\&.) +.PP +.\" ndb_restore: exclude-databases option +.\" exclude-databases option (ndb_restore) +\fB\-\-exclude\-databases=\fR\fB\fIdb_name\fR\fR\fB[,\fR\fB\fIdb_name\fR\fR\fB][,\&.\&.\&.]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-exclude\-databases=db\-list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +.PP +.\" ndb_restore: exclude-tables option +.\" exclude-tables option (ndb_restore) +\fB\-\-exclude\-tables=\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB[,\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB][,\&.\&.\&.]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-exclude\-tables=table\-list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +.PP +It is possible to prevent one or more databases or tables from being restored using the +\fBndb_restore\fR +options +\fB\-\-exclude\-databases\fR +and +\fB\-\-exclude\-tables\fR\&. +\fB\-\-exclude\-databases\fR +takes a comma\-delimited list of one or more databases which should not be restored\&. +\fB\-\-exclude\-tables\fR +takes a comma\-delimited list of one or more tables (using +\fIdatabase\fR\&.\fItable\fR +format) which should not be restored\&. +.PP +When +\fB\-\-exclude\-databases\fR +or +\fB\-\-exclude\-tables\fR +is used, only those databases or tables named by the option are excluded; all other databases and tables are restored by +\fBndb_restore\fR\&. +.PP +This table shows several invocations of +\fBndb_restore\fR +usng +\fB\-\-exclude\-*\fR +options (other options possibly required have been omitted for clarity), and the effects these options have on restoring from a MySQL Cluster backup: +.TS +allbox tab(:); +lB lB. +T{ +Option Used +T}:T{ +Result +T} +.T& +l l +l l +l l +l l. +T{ +\fB\-\-exclude\-databases=db1\fR +T}:T{ +All tables in all databases except db1 are restored; + no tables in db1 are restored +T} +T{ +\fB\-\-exclude\-databases=db1,db2\fR (or + \fB\-\-exclude\-databases=db1\fR + \fB\-\-exclude\-databases=db2\fR) +T}:T{ +All tables in all databases except db1 and + db2 are restored; no tables in + db1 or db2 are + restored +T} +T{ +\fB\-\-exclude\-tables=db1\&.t1\fR +T}:T{ +All tables except t1 in database + db1 are restored; all other tables in + db1 are restored; all tables in all + other databases are restored +T} +T{ +\fB\-\-exclude\-tables=db1\&.t2,db2\&.t1\fR (or + \fB\-\-exclude\-tables=db1\&.t2\fR + \fB\-\-exclude\-tables=db2\&.t1)\fR +T}:T{ +All tables in database db1 except for + t2 and all tables in database + db2 except for table + t1 are restored; no other tables in + db1 or db2 are + restored; all tables in all other databases are restored +T} +.TE +.sp 1 +.PP +You can use these two options together\&. For example, the following causes all tables in all databases +\fIexcept for\fR +databases +db1 +and +db2, along with the tables +t1 +and +t2 +in database +db3, +\fInot\fR +to be restored: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_restore [\&.\&.\&.] \-\-exclude\-databases=db1,db2 \-\-exclude\-tables=db3\&.t1,db3\&.t2\fR +.fi +.if n \{\ +.RE +.\} +.PP +(Again, we have omitted other possibly necessary options in the interest of clarity and brevity from the example just shown\&.) +.PP +You can use +\fB\-\-include\-*\fR +and +\fB\-\-exclude\-*\fR +options together, subject to the following rules: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The actions of all +\fB\-\-include\-*\fR +and +\fB\-\-exclude\-*\fR +options are cumulative\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +All +\fB\-\-include\-*\fR +and +\fB\-\-exclude\-*\fR +options are evaluated in the order passed to ndb_restore, from right to left\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +In the event of conflicting options, the first (rightmost) option takes precedence\&. In other words, the first option (going from right to left) that matches against a given database or table +\(lqwins\(rq\&. +.RE +.PP +For example, the following set of options causes +\fBndb_restore\fR +to restore all tables from database +db1 +except +db1\&.t1, while restoring no other tables from any other databases: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-\-include\-databases=db1 \-\-exclude\-tables=db1\&.t1 +.fi +.if n \{\ +.RE +.\} +.PP +However, reversing the order of the options just given simply causes all tables from database +db1 +to be restored (including +db1\&.t1, but no tables from any other database), because the +\fB\-\-include\-databases\fR +option, being farthest to the right, is the first match against database +db1 +and thus takes precedence over any other option that matches +db1 +or any tables in +db1: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-\-exclude\-tables=db1\&.t1 \-\-include\-databases=db1 +.fi +.if n \{\ +.RE +.\} +.PP +.\" ndb_restore: exclude-missing-columns option +.\" exclude-missing-columns option (ndb_restore) +\fB\-\-exclude\-missing\-columns\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-exclude\-missing\-columns +T} +.TE +.sp 1 +.PP +It is also possible to restore only selected table columns using the +\fB\-\-exclude\-missing\-columns\fR +option\&. When this option is used, +\fBndb_restore\fR +ignores any columns missing from tables being restored as compared to the versions of those tables found in the backup\&. This option applies to all tables being restored\&. If you wish to apply this option only to selected tables or databases, you can use it in combination with one or more of the options described in the previous paragraph to do so, then restore data to the remaining tables using a complementary set of these options\&. +.PP +.\" ndb_restore: exclude-missing-tables option +.\" exclude-missing-tables option (ndb_restore) +\fB\-\-exclude\-missing\-tables\fR +.TS +allbox tab(:); +l l s s +l l s s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.5\&.40\-ndb\-7\&.2\&.18 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-exclude\-missing\-tables +T} +.TE +.sp 1 +.PP +Beginning with MySQL Cluster NDB 7\&.2\&.17, it is also possible to restore only selected tables columns using this option, which causes +\fBndb_restore\fR +to ignore any tables from the backup that are not found in the target database\&. +.PP +.\" ndb_restore: disable-indexes option +.\" disable-indexes option (ndb_restore) +\fB\-\-disable\-indexes\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-disable\-indexes +T} +.TE +.sp 1 +.PP +Disable restoration of indexes during restoration of the data from a native NDB backup\&. Afterwards, you can restore indexes for all tables at once with multi\-threaded building of indexes using +\fB\-\-rebuild\-indexes\fR, which should be faster than rebuilding indexes concurrently for very large tables\&. +.PP +.\" ndb_restore: rebuild-indexes option +.\" rebuild-indexes option (ndb_restore) +\fB\-\-rebuild\-indexes\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-rebuild\-indexes +T} +.TE +.sp 1 +.PP +You can use this option with +\fBndb_restore\fR +to cause multi\-threaded rebuilding of the ordered indexes while restoring a native +NDB +backup\&. The number of threads used for building ordered indexes by +\fBndb_restore\fR +with this option is controlled by the +BuildIndexThreads +data node configuration parameter (MySQL Cluster NDB 6\&.3\&.30 and later; MySQL Cluster NDB 7\&.0\&.11 and later)\&. +.\" indexes: and ndb_restore +.PP +It is necessary to use this option only for the first run of +\fBndb_restore\fR; this causes all ordered indexes to be rebuilt without using +\fB\-\-rebuild\-indexes\fR +again when restoring subsequent nodes\&. You should use this option prior to inserting new rows into the database; otherwise, it is possible for a row to be inserted that later causes a unique constraint violation when trying to rebuild the indexes\&. +.PP +Rebuilding of unique indexes uses disk write bandwidth for redo logging and local checkpointing\&. An insufficient amount of this bandwith can lead to redo buffer overload or log overload errors\&. In such cases you can run +\fBndb_restore\fR +\fB\-\-rebuild\-indexes\fR +again; the process resumes at the point where the error occurred\&. You can also do this when you have encountered temporarary errors\&. You can repeat execution of +\fBndb_restore\fR +\fB\-\-rebuild\-indexes\fR +indefinitely; you may be able to stop such errors by reducing the value of +DiskCheckpointSpeed +to provide additional disk bandwidth to redo logging\&. +.PP +.\" ndb_restore: skip-broken-objects option +.\" skip-broken-objects option (ndb_restore) +\fB\-\-skip\-broken\-objects\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-skip\-broken\-objects +T} +.TE +.sp 1 +.PP +This option causes +\fBndb_restore\fR +to ignore corrupt tables while reading a native +NDB +backup, and to continue restoring any remaining tables (that are not also corrupted)\&. Currently, the +\fB\-\-skip\-broken\-objects\fR +option works only in the case of missing blob parts tables\&. +.PP +.\" ndb_restore: skip-unknown-objects option +.\" skip-unknown-objects option (ndb_restore) +\fB\-\-skip\-unknown\-objects\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-skip\-unknown\-objects +T} +.TE +.sp 1 +.PP +This option causes +\fBndb_restore\fR +to ignore any schema objects it does not recognize while reading a native +NDB +backup\&. This can be used for restoring a backup made from a cluster running MySQL Cluster NDB 7\&.2 to a cluster running MySQL Cluster NDB 7\&.1\&. +.PP +.\" ndb_restore: rewrite-database option +.\" rewrite-database option (ndb_restore) +\fB\-\-rewrite\-database=\fR\fB\fIold_dbname\fR\fR\fB,\fR\fB\fInew_dbname\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-rewrite\-database=olddb,newdb +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +none +T} +.TE +.sp 1 +.PP +This option makes it possible to restore to a database having a different name from that used in the backup\&. For example, if a backup is made of a database named +products, you can restore the data it contains to a database named +inventory, use this option as shown here (omitting any other options that might be required): +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> ndb_restore \-\-rewrite\-database=product,inventory +.fi +.if n \{\ +.RE +.\} +.PP +The option can be employed multiple times in a single invocation of +\fBndb_restore\fR\&. Thus it is possible to restore simultaneously from a database named +db1 +to a database named +db2 +and from a database named +db3 +to one named +db4 +using +\fB\-\-rewrite\-database=db1,db2 \-\-rewrite\-database=db3,db4\fR\&. Other +\fBndb_restore\fR +options may be used between multiple occurrences of +\fB\-\-rewrite\-database\fR\&. +.PP +In the event of conflicts between multiple +\fB\-\-rewrite\-database\fR +options, the last +\fB\-\-rewrite\-database\fR +option used, reading from left to right, is the one that takes effect\&. For example, if +\fB\-\-rewrite\-database=db1,db2 \-\-rewrite\-database=db1,db3\fR +is used, only +\fB\-\-rewrite\-database=db1,db3\fR +is honored, and +\fB\-\-rewrite\-database=db1,db2\fR +is ignored\&. It is also possible to restore from multiple databases to a single database, so that +\fB\-\-rewrite\-database=db1,db3 \-\-rewrite\-database=db2,db3\fR +restores all tables and data from databases +db1 +and +db2 +into database +db3\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +.PP +When restoring from multiple backup databases into a single target database using +\fB\-\-rewrite\-database\fR, no check is made for collisions between table or other object names, and the order in which rows are restored is not guaranteed\&. This means that it is possible in such cases for rows to be overwritten and updates to be lost\&. +.sp .5v +.RE +.PP +.\" ndb_restore: exclude-intermediate-sql-tables option +.\" exclude-intermediate-sql-tables option (ndb_restore) +\fB\-\-exclude\-intermediate\-sql\-tables[=TRUE|FALSE]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.5\&.37\-ndb\-7\&.2\&.17 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-exclude\-intermediate\-sql\-tables[=TRUE|FALSE] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +.PP +When performing copying +ALTER TABLE +operations, +\fBmysqld\fR +creates intermediate tables (whose names are prefixed with +#sql\-)\&. When +TRUE, the +\fB\-\-exclude\-intermediate\-sql\-tables\fR +option keeps +\fBndb_restore\fR +from restoring such tables that may have been left over from such operations\&. This option is +TRUE +by default\&. +.PP +The +\fB\-\-exclude\-intermediate\-sql\-tables\fR +option was introduced in MySQL Cluster NDB 7\&.2\&.17\&. (Bug #17882305) +.PP +\fBError reporting\fR. .\" ndb_restore: errors +\fBndb_restore\fR +reports both temporary and permanent errors\&. In the case of temporary errors, it may able to recover from them, and reports +Restore successful, but encountered temporary error, please look at configuration +in such cases\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +.PP +After using +\fBndb_restore\fR +to initialize a MySQL Cluster for use in circular replication, binary logs on the SQL node acting as the replication slave are not automatically created, and you must cause them to be created manually\&. To cause the binary logs to be created, issue a +SHOW TABLES +statement on that SQL node before running +START SLAVE\&. This is a known issue in MySQL Cluster\&. +.sp .5v +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_select_all.1 b/man/ndb_select_all.1 new file mode 100644 index 000000000000..9f4f9447ab00 --- /dev/null +++ b/man/ndb_select_all.1 @@ -0,0 +1,618 @@ +'\" t +.\" Title: \fBndb_select_all\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_SELECT_ALL\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_select_all +.SH "NAME" +ndb_select_all \- print rows from an NDB table +.SH "SYNOPSIS" +.HP \w'\fBndb_select_all\ \-c\ \fR\fB\fIconnect_string\fR\fR\fB\ \fR\fB\fItbl_name\fR\fR\fB\ \-d\ \fR\fB\fIdb_name\fR\fR\fB\ [>\ \fR\fB\fIfile_name\fR\fR\fB]\fR\ 'u +\fBndb_select_all \-c \fR\fB\fIconnect_string\fR\fR\fB \fR\fB\fItbl_name\fR\fR\fB \-d \fR\fB\fIdb_name\fR\fR\fB [> \fR\fB\fIfile_name\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBndb_select_all\fR +prints all rows from an +NDB +table to +stdout\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_select_all \-c \fIconnect_string\fR \fItbl_name\fR \-d \fIdb_name\fR [> \fIfile_name\fR] +.fi +.if n \{\ +.RE +.\} +.PP +The following table includes options that are specific to the MySQL Cluster native backup restoration program +\fBndb_select_all\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_select_all\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.83.\ \& This table describes command-line options for the ndb_select_all program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l. +T{ +.PP +--database=dbname, +.PP +-d +T}:T{ +Name of the database in which the table is found +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--parallelism=#, +.PP +-p +T}:T{ +Degree of parallelism +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--lock=#, +.PP +-l +T}:T{ +Lock type +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--order=index, +.PP +-o +T}:T{ +Sort resultset according to index whose name is supplied +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--descending, +.PP +-z +T}:T{ +Sort resultset in descending order (requires order flag) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--header, +.PP +-h +T}:T{ +Print header (set to 0|FALSE to disable headers in output) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--useHexFormat, +.PP +-x +T}:T{ +Output numbers in hexadecimal format +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--delimiter=char, +.PP +-D +T}:T{ +Set a column delimiter +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--disk +T}:T{ +Print disk references (useful only for Disk Data tables having + nonindexed columns) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--rowid +T}:T{ +Print rowid +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--gci +T}:T{ +Include GCI in output +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--gci64 +T}:T{ +Include GCI and row epoch in output +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--tup, +.PP +-t +T}:T{ +Scan in tup order +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--nodata +T}:T{ +Do not print table column data +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: database option +\fB\-\-database=\fR\fB\fIdbname\fR\fR, +\fB\-d\fR +\fIdbname\fR +.sp +Name of the database in which the table is found\&. The default value is +TEST_DB\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: parallelism option +\fBparallelism=\fR\fB\fI#\fR\fR, +\fB\-p\fR +\fI#\fR +.sp +Specifies the degree of parallelism\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: lock option +.\" lock option: ndb_select_all +\fB\-\-lock=\fR\fB\fIlock_type\fR\fR, +\fB\-l \fR\fB\fIlock_type\fR\fR +.sp +Employs a lock when reading the table\&. Possible values for +\fIlock_type\fR +are: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +0: Read lock +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +1: Read lock with hold +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +2: Exclusive read lock +.RE +.sp +There is no default value for this option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: order option +.\" order option: ndb_select_all +\fB\-\-order=\fR\fB\fIindex_name\fR\fR, +\fB\-o \fR\fB\fIindex_name\fR\fR +.sp +Orders the output according to the index named +\fIindex_name\fR\&. Note that this is the name of an index, not of a column, and that the index must have been explicitly named when created\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: descending option +.\" descending option: ndb_select_all +\fB\-\-descending\fR, +\fB\-z\fR +.sp +Sorts the output in descending order\&. This option can be used only in conjunction with the +\fB\-o\fR +(\fB\-\-order\fR) option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: header option +.\" header option: ndb_select_all +\fB\-\-header=FALSE\fR +.sp +Excludes column headers from the output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: useHexFormat option +.\" useHexFormat option: ndb_select_all +\fB\-\-useHexFormat\fR +\fB\-x\fR +.sp +Causes all numeric values to be displayed in hexadecimal format\&. This does not affect the output of numerals contained in strings or datetime values\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: delimiter option +.\" delimiter option: ndb_select_all +\fB\-\-delimiter=\fR\fB\fIcharacter\fR\fR, +\fB\-D \fR\fB\fIcharacter\fR\fR +.sp +Causes the +\fIcharacter\fR +to be used as a column delimiter\&. Only table data columns are separated by this delimiter\&. +.sp +The default delimiter is the tab character\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: disk option +.\" disk option: ndb_select_all +\fB\-\-disk\fR +.sp +Adds a disk reference column to the output\&. The column is nonempty only for Disk Data tables having nonindexed columns\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: rowid option +.\" rowid option: ndb_select_all +\fB\-\-rowid\fR +.sp +Adds a +ROWID +column providing information about the fragments in which rows are stored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: gci option +.\" gci option: ndb_select_all +\fB\-\-gci\fR +.sp +Adds a +GCI +column to the output showing the global checkpoint at which each row was last updated\&. See +Section\ \&18.1, \(lqMySQL Cluster Overview\(rq, and +Section\ \&18.5.6.2, \(lqMySQL Cluster Log Events\(rq, for more information about checkpoints\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: gci64 option +.\" gci64 option: ndb_select_all +\fB\-\-gci64\fR +.sp +Adds a +ROW$GCI64 +column to the output showing the global checkpoint at which each row was last updated, as well as the number of the epoch in which this update occurred\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: tupscan option +.\" tupscan option: ndb_select_all +\fB\-\-tupscan\fR, +\fB\-t\fR +.sp +Scan the table in the order of the tuples\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_select_all: nodata option +.\" nodata option: ndb_select_all +\fB\-\-nodata\fR +.sp +Causes any table data to be omitted\&. +.RE +Sample Output.PP +Output from a MySQL +SELECT +statement: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBSELECT * FROM ctest1\&.fish;\fR ++\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ +| id | name | ++\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ +| 3 | shark | +| 6 | puffer | +| 2 | tuna | +| 4 | manta ray | +| 5 | grouper | +| 1 | guppy | ++\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ +6 rows in set (0\&.04 sec) +.fi +.if n \{\ +.RE +.\} +.PP +Output from the equivalent invocation of +\fBndb_select_all\fR: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_select_all \-c localhost fish \-d ctest1\fR +id name +3 [shark] +6 [puffer] +2 [tuna] +4 [manta ray] +5 [grouper] +1 [guppy] +6 rows returned +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +Note that all string values are enclosed by square brackets (\(lq[\&.\&.\&.]\(rq) in the output of +\fBndb_select_all\fR\&. For a further example, consider the table created and populated as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +CREATE TABLE dogs ( + id INT(11) NOT NULL AUTO_INCREMENT, + name VARCHAR(25) NOT NULL, + breed VARCHAR(50) NOT NULL, + PRIMARY KEY pk (id), + KEY ix (name) +) +TABLESPACE ts STORAGE DISK +ENGINE=NDBCLUSTER; +INSERT INTO dogs VALUES + (\*(Aq\*(Aq, \*(AqLassie\*(Aq, \*(Aqcollie\*(Aq), + (\*(Aq\*(Aq, \*(AqScooby\-Doo\*(Aq, \*(AqGreat Dane\*(Aq), + (\*(Aq\*(Aq, \*(AqRin\-Tin\-Tin\*(Aq, \*(AqAlsatian\*(Aq), + (\*(Aq\*(Aq, \*(AqRosscoe\*(Aq, \*(AqMutt\*(Aq); +.fi +.if n \{\ +.RE +.\} +.PP +This demonstrates the use of several additional +\fBndb_select_all\fR +options: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_select_all \-d ctest1 dogs \-o ix \-z \-\-gci \-\-disk\fR +GCI id name breed DISK_REF +834461 2 [Scooby\-Doo] [Great Dane] [ m_file_no: 0 m_page: 98 m_page_idx: 0 ] +834878 4 [Rosscoe] [Mutt] [ m_file_no: 0 m_page: 98 m_page_idx: 16 ] +834463 3 [Rin\-Tin\-Tin] [Alsatian] [ m_file_no: 0 m_page: 34 m_page_idx: 0 ] +835657 1 [Lassie] [Collie] [ m_file_no: 0 m_page: 66 m_page_idx: 0 ] +4 rows returned +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_select_count.1 b/man/ndb_select_count.1 new file mode 100644 index 000000000000..f521431a1d82 --- /dev/null +++ b/man/ndb_select_count.1 @@ -0,0 +1,147 @@ +'\" t +.\" Title: \fBndb_select_count\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_SELECT_COUNT\" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_select_count +.SH "NAME" +ndb_select_count \- print row counts for NDB tables +.SH "SYNOPSIS" +.HP \w'\fBndb_select_count\ [\-c\ \fR\fB\fIconnect_string\fR\fR\fB]\ \-d\ \fR\fB\fIdb_name\fR\fR\fB\ \fR\fB\fItbl_name\fR\fR\fB[\ \fR\fB\fItbl_name2\fR\fR\fB[\ \&.\&.\&.]]\fR\ 'u +\fBndb_select_count [\-c \fR\fB\fIconnect_string\fR\fR\fB] \-d \fR\fB\fIdb_name\fR\fR\fB \fR\fB\fItbl_name\fR\fR\fB[ \fR\fB\fItbl_name2\fR\fR\fB[ \&.\&.\&.]]\fR +.SH "DESCRIPTION" +.PP +\fBndb_select_count\fR +prints the number of rows in one or more +NDB +tables\&. With a single table, the result is equivalent to that obtained by using the MySQL statement +SELECT COUNT(*) FROM \fItbl_name\fR\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_select_count [\-c \fIconnect_string\fR] \-d\fIdb_name\fR \fItbl_name\fR[, \fItbl_name2\fR[, \&.\&.\&.]] +.fi +.if n \{\ +.RE +.\} +.PP +The following table includes options that are specific to the MySQL Cluster native backup restoration program +\fBndb_select_count\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_select_count\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.84.\ \& This table describes command-line options for the ndb_select_count program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l. +T{ +.PP +--database=dbname, +.PP +-d +T}:T{ +Name of the database in which the table is found +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--parallelism=#, +.PP +-p +T}:T{ +Degree of parallelism +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--lock=#, +.PP +-l +T}:T{ +Lock type +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.PP +You can obtain row counts from multiple tables in the same database by listing the table names separated by spaces when invoking this command, as shown under +\fBSample Output\fR\&. +Sample Output +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_select_count \-c localhost \-d ctest1 fish dogs\fR +6 records in table fish +4 records in table dogs +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_show_tables.1 b/man/ndb_show_tables.1 new file mode 100644 index 000000000000..c83760e846cd --- /dev/null +++ b/man/ndb_show_tables.1 @@ -0,0 +1,323 @@ +'\" t +.\" Title: \fBndb_show_tables\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_SHOW_TABLES\F" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_show_tables +.SH "NAME" +ndb_show_tables \- display list of NDB tables +.SH "SYNOPSIS" +.HP \w'\fBndb_show_tables\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBndb_show_tables [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBndb_show_tables\fR +displays a list of all +NDB +database objects in the cluster\&. By default, this includes not only both user\-created tables and +NDB +system tables, but +NDB\-specific indexes, internal triggers, and MySQL Cluster Disk Data objects as well\&. +.PP +The following table includes options that are specific to the MySQL Cluster native backup restoration program +\fBndb_show_tables\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_show_tables\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.85.\ \& This table describes command-line options for the ndb_show_tables program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l +l l l +l l l. +T{ +.PP +--database=string, +.PP +-d +T}:T{ +Specifies the database in which the table is found +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--loops=#, +.PP +-l +T}:T{ +Number of times to repeat output +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--type=#, +.PP +-t +T}:T{ +Limit output to objects of this type +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--unqualified, +.PP +-u +T}:T{ +Do not qualify table names +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--parsable, +.PP +-p +T}:T{ +Return output suitable for MySQL LOAD DATA INFILE statement +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--show-temp-status +T}:T{ +Show table temporary flag +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_show_tables [\-c \fIconnect_string\fR] +.fi +.if n \{\ +.RE +.\} +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_show_tables: database option +.\" database option: ndb_show_tables +\fB\-\-database\fR, +\fB\-d\fR +.sp +Specifies the name of the database in which the tables are found\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_show_tables: loops option +.\" loops option: ndb_show_tables +\fB\-\-loops\fR, +\fB\-l\fR +.sp +Specifies the number of times the utility should execute\&. This is 1 when this option is not specified, but if you do use the option, you must supply an integer argument for it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_show_tables: parsable option +.\" parsable option: ndb_show_tables +\fB\-\-parsable\fR, +\fB\-p\fR +.sp +Using this option causes the output to be in a format suitable for use with +LOAD DATA INFILE\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_show_tables: show-temp-status option +.\" show-temp-status option: ndb_show_tables +\fB\-\-show\-temp\-status\fR +.sp +If specified, this causes temporary tables to be displayed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_show_tables: type option +.\" type option: ndb_show_tables +\fB\-\-type\fR, +\fB\-t\fR +.sp +Can be used to restrict the output to one type of object, specified by an integer type code as shown here: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +1: System table +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +2: User\-created table +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +3: Unique hash index +.RE +.sp +Any other value causes all +NDB +database objects to be listed (the default)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_show_tables: unqualified option +.\" unqualified option: ndb_show_tables +\fB\-\-unqualified\fR, +\fB\-u\fR +.sp +If specified, this causes unqualified object names to be displayed\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +Only user\-created MySQL Cluster tables may be accessed from MySQL; system tables such as +SYSTAB_0 +are not visible to +\fBmysqld\fR\&. However, you can examine the contents of system tables using +NDB +API applications such as +\fBndb_select_all\fR +(see +\fBndb_select_all\fR(1))\&. +.sp .5v +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_size.pl.1 b/man/ndb_size.pl.1 new file mode 100644 index 000000000000..8f4e3ebd100f --- /dev/null +++ b/man/ndb_size.pl.1 @@ -0,0 +1,413 @@ +'\" t +.\" Title: \fBndb_size.pl\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_SIZE\&.PL\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_size.pl +.SH "NAME" +ndb_size.pl \- NDBCLUSTER Size Requirement Estimator +.SH "SYNOPSIS" +.HP \w'\fBndb_size\&.pl\ \fR\fB\fIarguments\fR\fR\ 'u +\fBndb_size\&.pl \fR\fB\fIarguments\fR\fR +.SH "DESCRIPTION" +.PP +This is a Perl script that can be used to estimate the amount of space that would be required by a MySQL database if it were converted to use the +NDBCLUSTER +storage engine\&. Unlike the other utilities discussed in this section, it does not require access to a MySQL Cluster (in fact, there is no reason for it to do so)\&. However, it does need to access the MySQL server on which the database to be tested resides\&. +Requirements +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A running MySQL server\&. The server instance does not have to provide support for MySQL Cluster\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A working installation of Perl\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The +DBI +module, which can be obtained from CPAN if it is not already part of your Perl installation\&. (Many Linux and other operating system distributions provide their own packages for this library\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A MySQL user account having the necessary privileges\&. If you do not wish to use an existing account, then creating one using +GRANT USAGE ON \fIdb_name\fR\&.*\(emwhere +\fIdb_name\fR +is the name of the database to be examined\(emis sufficient for this purpose\&. +.RE +.PP +ndb_size\&.pl +can also be found in the MySQL sources in +storage/ndb/tools\&. +.PP +The following table includes options that are specific to the MySQL Cluster program +\fBndb_size\&.pl\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_size\&.pl\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.86.\ \& This table describes command-line options for the ndb_size.pl program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l. +T{ +.PP +--database=dbname +T}:T{ +The database or databases to examine; accepts a comma-delimited + list; the default is ALL (use all databases found on the server) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--hostname[:port] +T}:T{ +Specify host and optional port as host[:port] +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--socket=file +T}:T{ +Specify a socket to connect to +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--user=string +T}:T{ +Specify a MySQL user name +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--password=string +T}:T{ +Specify a MySQL user password +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--format=string +T}:T{ +Set output format (text or HTML) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--excludetables=tbl_list +T}:T{ +Skip any tables in a comma-separated list of tables +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--excludedbs=db_list +T}:T{ +Skip any databases in a comma-separated list of databases +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--savequeries=file +T}:T{ +Saves all queries to the database into the file specified +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--loadqueries=file +T}:T{ +Loads all queries from the file specified; does not connect to a + database +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--real_table_name=table +T}:T{ +Designates a table to handle unique index size calculations +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +perl ndb_size\&.pl [\-\-database={\fIdb_name\fR|ALL}] [\-\-hostname=\fIhost\fR[:\fIport\fR]] [\-\-socket=\fIsocket\fR] \e + [\-\-user=\fIuser\fR] [\-\-password=\fIpassword\fR] \e + [\-\-help|\-h] [\-\-format={html|text}] \e + [\-\-loadqueries=\fIfile_name\fR] [\-\-savequeries=\fIfile_name\fR] +.fi +.if n \{\ +.RE +.\} +.PP +By default, this utility attempts to analyze all databases on the server\&. You can specify a single database using the +\fB\-\-database\fR +option; the default behavior can be made explicit by using +ALL +for the name of the database\&. You can also exclude one or more databases by using the +\fB\-\-excludedbs\fR +option with a comma\-separated list of the names of the databases to be skipped\&. Similarly, you can cause specific tables to be skipped by listing their names, separated by commas, following the optional +\fB\-\-excludetables\fR +option\&. A host name can be specified using +\fB\-\-hostname\fR; the default is +localhost\&. In MySQL Cluster NDB 7\&.2\&.6 and later, you can specify a port in addition to the host using +\fIhost\fR:\fIport\fR +format for the value of +\fB\-\-hostname\fR\&. The default port number is 3306\&. If necessary, you can also specify a socket; the default is +/var/lib/mysql\&.sock\&. A MySQL user name and password can be specified the corresponding options shown\&. It also possible to control the format of the output using the +\fB\-\-format\fR +option; this can take either of the values +html +or +text, with +text +being the default\&. An example of the text output is shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_size\&.pl \-\-database=test \-\-socket=/tmp/mysql\&.sock\fR +ndb_size\&.pl report for database: \*(Aqtest\*(Aq (1 tables) +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +Connected to: DBI:mysql:host=localhost;mysql_socket=/tmp/mysql\&.sock +Including information for versions: 4\&.1, 5\&.0, 5\&.1 +test\&.t1 +\-\-\-\-\-\-\- +DataMemory for Columns (* means varsized DataMemory): + Column Name Type Varsized Key 4\&.1 5\&.0 5\&.1 + HIDDEN_NDB_PKEY bigint PRI 8 8 8 + c2 varchar(50) Y 52 52 4* + c1 int(11) 4 4 4 + \-\- \-\- \-\- +Fixed Size Columns DM/Row 64 64 12 + Varsize Columns DM/Row 0 0 4 +DataMemory for Indexes: + Index Name Type 4\&.1 5\&.0 5\&.1 + PRIMARY BTREE 16 16 16 + \-\- \-\- \-\- + Total Index DM/Row 16 16 16 +IndexMemory for Indexes: + Index Name 4\&.1 5\&.0 5\&.1 + PRIMARY 33 16 16 + \-\- \-\- \-\- + Indexes IM/Row 33 16 16 +Summary (for THIS table): + 4\&.1 5\&.0 5\&.1 + Fixed Overhead DM/Row 12 12 16 + NULL Bytes/Row 4 4 4 + DataMemory/Row 96 96 48 + (Includes overhead, bitmap and indexes) + Varsize Overhead DM/Row 0 0 8 + Varsize NULL Bytes/Row 0 0 4 + Avg Varside DM/Row 0 0 16 + No\&. Rows 0 0 0 + Rows/32kb DM Page 340 340 680 +Fixedsize DataMemory (KB) 0 0 0 +Rows/32kb Varsize DM Page 0 0 2040 + Varsize DataMemory (KB) 0 0 0 + Rows/8kb IM Page 248 512 512 + IndexMemory (KB) 0 0 0 +Parameter Minimum Requirements +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +* indicates greater than default + Parameter Default 4\&.1 5\&.0 5\&.1 + DataMemory (KB) 81920 0 0 0 + NoOfOrderedIndexes 128 1 1 1 + NoOfTables 128 1 1 1 + IndexMemory (KB) 18432 0 0 0 + NoOfUniqueHashIndexes 64 0 0 0 + NoOfAttributes 1000 3 3 3 + NoOfTriggers 768 5 5 5 +.fi +.if n \{\ +.RE +.\} +.PP +For debugging purposes, the Perl arrays containing the queries run by this script can be read from the file specified using can be saved to a file using +\fB\-\-savequeries\fR; a file containing such arrays to be read in during script execution can be specified using +\fB\-\-loadqueries\fR\&. Neither of these options has a default value\&. +.PP +To produce output in HTML format, use the +\fB\-\-format\fR +option and redirect the output to a file, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_size\&.pl \-\-database=test \-\-socket=/tmp/mysql\&.sock \-\-format=html > ndb_size\&.html\fR +.fi +.if n \{\ +.RE +.\} +.PP +(Without the redirection, the output is sent to +stdout\&.) +.PP +The output from this script includes the following information: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Minimum values for the +DataMemory, +IndexMemory, +MaxNoOfTables, +MaxNoOfAttributes, +MaxNoOfOrderedIndexes, +MaxNoOfUniqueHashIndexes, and +MaxNoOfTriggers +configuration parameters required to accommodate the tables analyzed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Memory requirements for all of the tables, attributes, ordered indexes, and unique hash indexes defined in the database\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The +IndexMemory +and +DataMemory +required per table and table row\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_waiter.1 b/man/ndb_waiter.1 new file mode 100644 index 000000000000..6cfad1e937e9 --- /dev/null +++ b/man/ndb_waiter.1 @@ -0,0 +1,497 @@ +'\" t +.\" Title: \fBndb_waiter\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDB_WAITER\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndb_waiter +.SH "NAME" +ndb_waiter \- wait for MySQL Cluster to reach a given status +.SH "SYNOPSIS" +.HP \w'\fBndb_waiter\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_waiter \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_waiter\fR +repeatedly (each 100 milliseconds) prints out the status of all cluster data nodes until either the cluster reaches a given status or the +\fB\-\-timeout\fR +limit is exceeded, then exits\&. By default, it waits for the cluster to achieve +STARTED +status, in which all nodes have started and connected to the cluster\&. This can be overridden using the +\fB\-\-no\-contact\fR +and +\fB\-\-not\-started\fR +options\&. +.PP +The node states reported by this utility are as follows: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NO_CONTACT: The node cannot be contacted\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +UNKNOWN: The node can be contacted, but its status is not yet known\&. Usually, this means that the node has received a +START +or +RESTART +command from the management server, but has not yet acted on it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NOT_STARTED: The node has stopped, but remains in contact with the cluster\&. This is seen when restarting the node using the management client\*(Aqs +RESTART +command\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +STARTING: The node\*(Aqs +\fBndbd\fR +process has started, but the node has not yet joined the cluster\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +STARTED: The node is operational, and has joined the cluster\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SHUTTING_DOWN: The node is shutting down\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SINGLE USER MODE: This is shown for all cluster data nodes when the cluster is in single user mode\&. +.RE +.PP +The following table includes options that are specific to the MySQL Cluster native backup restoration program +\fBndb_waiter\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_waiter\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.87.\ \& This table describes command-line options for the ndb_waiter program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l +l l l +l l l. +T{ +.PP +--no-contact, +.PP +-n +T}:T{ +Wait for cluster to reach NO CONTACT state +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--not-started +T}:T{ +Wait for cluster to reach NOT STARTED state +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--single-user +T}:T{ +Wait for cluster to enter single user mode +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--timeout=#, +.PP +-t +T}:T{ +Wait this many seconds, then exit whether or not cluster has + reached desired state; default is 2 minutes (120 seconds) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--nowait-nodes=list +T}:T{ +List of nodes not to be waited for. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--wait-nodes=list, +.PP +-w +T}:T{ +List of nodes to be waited for. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_waiter [\-c \fIconnect_string\fR] +.fi +.if n \{\ +.RE +.\} +Additional Options +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_waiter: no-contact option +.\" no-contact option: ndb_waiter +\fB\-\-no\-contact\fR, +\fB\-n\fR +.sp +Instead of waiting for the +STARTED +state, +\fBndb_waiter\fR +continues running until the cluster reaches +NO_CONTACT +status before exiting\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_waiter: not-started option +.\" not-started option: ndb_waiter +\fB\-\-not\-started\fR +.sp +Instead of waiting for the +STARTED +state, +\fBndb_waiter\fR +continues running until the cluster reaches +NOT_STARTED +status before exiting\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_waiter: timeout option +.\" timeout option: ndb_waiter +\fB\-\-timeout=\fR\fB\fIseconds\fR\fR, +\fB\-t \fR\fB\fIseconds\fR\fR +.sp +Time to wait\&. The program exits if the desired state is not achieved within this number of seconds\&. The default is 120 seconds (1200 reporting cycles)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_waiter: single-user option +.\" single-user option: ndb_waiter +\fB\-\-single\-user\fR +.sp +The program waits for the cluster to enter single user mode\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_waiter: nowait-nodes option +.\" nowait-nodes option: ndb_waiter +\fB\-\-nowait\-nodes=\fR\fB\fIlist\fR\fR +.sp +When this option is used, ndb_waiter does not wait for the nodes whose IDs are listed\&. The list is comma\-delimited; ranges can be indicated by dashes, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_waiter \-\-nowait\-nodes=1,3,7\-9\fR +.fi +.if n \{\ +.RE +.\} +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +Do +\fInot\fR +use this option together with the +\fB\-\-wait\-nodes\fR +option\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" ndb_waiter: wait-nodes option +.\" wait-nodes option: ndb_waiter +\fB\-\-wait\-nodes=\fR\fB\fIlist\fR\fR, +\fB\-w \fR\fB\fIlist\fR\fR +.sp +When this option is used, +\fBndb_waiter\fR +waits only for the nodes whose IDs are listed\&. The list is comma\-delimited; ranges can be indicated by dashes, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_waiter \-\-wait\-nodes=2,4\-6,10\fR +.fi +.if n \{\ +.RE +.\} +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +Do +\fInot\fR +use this option together with the +\fB\-\-nowait\-nodes\fR +option\&. +.sp .5v +.RE +.RE +.PP +\fBSample Output\fR. Shown here is the output from +\fBndb_waiter\fR +when run against a 4\-node cluster in which two nodes have been shut down and then started again manually\&. Duplicate reports (indicated by +\(lq\&.\&.\&.\(rq) are omitted\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_waiter \-c localhost\fR +Connecting to mgmsrv at (localhost) +State node 1 STARTED +State node 2 NO_CONTACT +State node 3 STARTED +State node 4 NO_CONTACT +Waiting for cluster enter state STARTED +\&.\&.\&. +State node 1 STARTED +State node 2 UNKNOWN +State node 3 STARTED +State node 4 NO_CONTACT +Waiting for cluster enter state STARTED +\&.\&.\&. +State node 1 STARTED +State node 2 STARTING +State node 3 STARTED +State node 4 NO_CONTACT +Waiting for cluster enter state STARTED +\&.\&.\&. +State node 1 STARTED +State node 2 STARTING +State node 3 STARTED +State node 4 UNKNOWN +Waiting for cluster enter state STARTED +\&.\&.\&. +State node 1 STARTED +State node 2 STARTING +State node 3 STARTED +State node 4 STARTING +Waiting for cluster enter state STARTED +\&.\&.\&. +State node 1 STARTED +State node 2 STARTED +State node 3 STARTED +State node 4 STARTING +Waiting for cluster enter state STARTED +\&.\&.\&. +State node 1 STARTED +State node 2 STARTED +State node 3 STARTED +State node 4 STARTED +Waiting for cluster enter state STARTED +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +If no connection string is specified, then +\fBndb_waiter\fR +tries to connect to a management on +localhost, and reports +Connecting to mgmsrv at (null)\&. +.sp .5v +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndbd.8 b/man/ndbd.8 new file mode 100644 index 000000000000..719bb23c1f8b --- /dev/null +++ b/man/ndbd.8 @@ -0,0 +1,1181 @@ +'\" t +.\" Title: \fBndbd\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDBD\FR" "8" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndbd +.\" MySQL Cluster: ndbd +.\" MySQL Cluster: data nodes +.\" data nodes (MySQL Cluster) +.\" storage nodes - see data nodes, ndbd +.SH "NAME" +ndbd \- the MySQL Cluster data node daemon +.SH "SYNOPSIS" +.HP \w'\fBndbd\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndbd \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndbd\fR +is the process that is used to handle all the data in tables using the NDB Cluster storage engine\&. This is the process that empowers a data node to accomplish distributed transaction handling, node recovery, checkpointing to disk, online backup, and related tasks\&. +.PP +In a MySQL Cluster, a set of +\fBndbd\fR +processes cooperate in handling data\&. These processes can execute on the same computer (host) or on different computers\&. The correspondences between data nodes and Cluster hosts is completely configurable\&. +.\" MySQL Cluster: administration +.\" MySQL Cluster: commands +.\" command options (MySQL Cluster): ndbd +.\" MySQL Cluster: ndbd process +.PP +The following table includes command options specific to the MySQL Cluster data node program +\fBndbd\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndbd\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.69.\ \& This table describes command-line options for the ndbd program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l +l l l. +T{ +.PP +--initial +T}:T{ +Perform initial start of ndbd, including cleaning the file system. + Consult the documentation before using this option +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--nostart, +.PP +-n +T}:T{ +Don't start ndbd immediately; ndbd waits for command to start + from ndb_mgmd +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--daemon, +.PP +-d +T}:T{ +Start ndbd as daemon (default); override with --nodaemon +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--nodaemon +T}:T{ +Do not start ndbd as daemon; provided for testing purposes +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--foreground +T}:T{ +Run ndbd in foreground, provided for debugging purposes (implies + --nodaemon) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--nowait-nodes=list +T}:T{ +Do not wait for these data nodes to start (takes comma-separated + list of node IDs). Also requires --ndb-nodeid to be used. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--initial-start +T}:T{ +Perform partial initial start (requires --nowait-nodes) +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--bind-address=name +T}:T{ +Local bind address +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--install[=name] +T}:T{ +Used to install the data node process as a Windows service. Does + not apply on non-Windows platforms. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--remove[=name] +T}:T{ +Used to remove a data node process that was previously installed + as a Windows service. Does not apply on non-Windows platforms. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--connect-retries=# +T}:T{ +Number of times to try contacting the management server; set to -1 + to keep trying indefinitely +T}:T{ +.PP +ADDED: NDB 7.2.9 +T} +T{ +.PP +--connect-delay=# +T}:T{ +Time to wait between attempts to contact a management server, in + seconds +T}:T{ +.PP +ADDED: NDB 7.2.9 +T} +.TE +.sp 1 +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +All of these options also apply to the multi\-threaded version of this program (\fBndbmtd\fR) and you may substitute +\(lq\fBndbmtd\fR\(rq +for +\(lq\fBndbd\fR\(rq +wherever the latter occurs in this section\&. +.sp .5v +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-bind\-address\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-bind\-address=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Causes +\fBndbd\fR +to bind to a specific network interface (host name or IP address)\&. This option has no default value\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-daemon\fR, +\fB\-d\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-daemon +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Instructs +\fBndbd\fR +or +\fBndbmtd\fR +to execute as a daemon process\&. This is the default behavior\&. +\fB\-\-nodaemon\fR +can be used to prevent the process from running as a daemon\&. +.sp +This option has no effect when running +\fBndbd\fR +or +\fBndbmtd\fR +on Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nodaemon\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nodaemon +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Prevents +\fBndbd\fR +or +\fBndbmtd\fR +from executing as a daemon process\&. This option overrides the +\fB\-\-daemon\fR +option\&. This is useful for redirecting output to the screen when debugging the binary\&. +.sp +The default behavior for +\fBndbd\fR +and +\fBndbmtd\fR +on Windows is to run in the foreground, making this option unnecessary on Windows platforms, where it has no effect\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-foreground\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-foreground +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Causes +\fBndbd\fR +or +\fBndbmtd\fR +to execute as a foreground process, primarily for debugging purposes\&. This option implies the +\fB\-\-nodaemon\fR +option\&. +.sp +This option has no effect when running +\fBndbd\fR +or +\fBndbmtd\fR +on Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" initial option (ndbd) +.\" initial option (ndbmtd) +\fB\-\-initial\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-initial +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Instructs +\fBndbd\fR +to perform an initial start\&. An initial start erases any files created for recovery purposes by earlier instances of +\fBndbd\fR\&. It also re\-creates recovery log files\&. Note that on some operating systems this process can take a substantial amount of time\&. +.sp +An +\fB\-\-initial\fR +start is to be used +\fIonly\fR +when starting the +\fBndbd\fR +process under very special circumstances; this is because this option causes all files to be removed from the MySQL Cluster file system and all redo log files to be re\-created\&. These circumstances are listed here: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +When performing a software upgrade which has changed the contents of any files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +When restarting the node with a new version of +\fBndbd\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +As a measure of last resort when for some reason the node restart or system restart repeatedly fails\&. In this case, be aware that this node can no longer be used to restore data due to the destruction of the data files\&. +.RE +.sp +Use of this option prevents the +StartPartialTimeout +and +StartPartitionedTimeout +configuration parameters from having any effect\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +This option does +\fInot\fR +affect either of the following types of files: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Backup files that have already been created by the affected node +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +MySQL Cluster Disk Data files (see +Section\ \&18.5.12, \(lqMySQL Cluster Disk Data Tables\(rq)\&. +.RE +.sp +This option also has no effect on recovery of data by a data node that is just starting (or restarting) from data nodes that are already running\&. This recovery of data occurs automatically, and requires no user intervention in a MySQL Cluster that is running normally\&. +.sp .5v +.RE +It is permissible to use this option when starting the cluster for the very first time (that is, before any data node files have been created); however, it is +\fInot\fR +necessary to do so\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" initial-start option (ndbd) +.\" initial-start option (ndbmtd) +\fB\-\-initial\-start\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-initial\-start +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +This option is used when performing a partial initial start of the cluster\&. Each node should be started with this option, as well as +\fB\-\-nowait\-nodes\fR\&. +.sp +Suppose that you have a 4\-node cluster whose data nodes have the IDs 2, 3, 4, and 5, and you wish to perform a partial initial start using only nodes 2, 4, and 5\(emthat is, omitting node 3: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbd \-\-ndb\-nodeid=2 \-\-nowait\-nodes=3 \-\-initial\-start\fR +shell> \fBndbd \-\-ndb\-nodeid=4 \-\-nowait\-nodes=3 \-\-initial\-start\fR +shell> \fBndbd \-\-ndb\-nodeid=5 \-\-nowait\-nodes=3 \-\-initial\-start\fR +.fi +.if n \{\ +.RE +.\} +.sp +When using this option, you must also specify the node ID for the data node being started with the +\fB\-\-ndb\-nodeid\fR +option\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +Do not confuse this option with the +\fB\-\-nowait\-nodes\fR +option for +\fBndb_mgmd\fR, which can be used to enable a cluster configured with multiple management servers to be started without all management servers being online\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" nowait-nodes option (ndbd) +.\" nowait-nodes option (ndbmtd) +\fB\-\-nowait\-nodes=\fR\fB\fInode_id_1\fR\fR\fB[, \fR\fB\fInode_id_2\fR\fR\fB[, \&.\&.\&.]]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nowait\-nodes=list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +This option takes a list of data nodes which for which the cluster will not wait for before starting\&. +.sp +This can be used to start the cluster in a partitioned state\&. For example, to start the cluster with only half of the data nodes (nodes 2, 3, 4, and 5) running in a 4\-node cluster, you can start each +\fBndbd\fR +process with +\fB\-\-nowait\-nodes=3,5\fR\&. In this case, the cluster starts as soon as nodes 2 and 4 connect, and does +\fInot\fR +wait +StartPartitionedTimeout +milliseconds for nodes 3 and 5 to connect as it would otherwise\&. +.sp +If you wanted to start up the same cluster as in the previous example without one +\fBndbd\fR +(say, for example, that the host machine for node 3 has suffered a hardware failure) then start nodes 2, 4, and 5 with +\fB\-\-nowait\-nodes=3\fR\&. Then the cluster will start as soon as nodes 2, 4, and 5 connect and will not wait for node 3 to start\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" nostart option (ndbd) +.\" -n option (ndbd) +.\" nostart option (ndbmtd) +.\" -n option (ndbmtd) +\fB\-\-nostart\fR, +\fB\-n\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nostart +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Instructs +\fBndbd\fR +not to start automatically\&. When this option is used, +\fBndbd\fR +connects to the management server, obtains configuration data from it, and initializes communication objects\&. However, it does not actually start the execution engine until specifically requested to do so by the management server\&. This can be accomplished by issuing the proper +START +command in the management client (see +Section\ \&18.5.2, \(lqCommands in the MySQL Cluster Management Client\(rq)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" install option (ndbd) +.\" install option (ndbmtd) +\fB\-\-install[=\fR\fB\fIname\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-install[=name] +T} +T{ +\fBPlatform Specific\fR +T}:T{ +Windows +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +ndbd +T} +.TE +.sp 1 +Causes +\fBndbd\fR +to be installed as a Windows service\&. Optionally, you can specify a name for the service; if not set, the service name defaults to +ndbd\&. Although it is preferable to specify other +\fBndbd\fR +program options in a +my\&.ini +or +my\&.cnf +configuration file, it is possible to use together with +\fB\-\-install\fR\&. However, in such cases, the +\fB\-\-install\fR +option must be specified first, before any other options are given, for the Windows service installation to succeed\&. +.sp +It is generally not advisable to use this option together with the +\fB\-\-initial\fR +option, since this causes the data node file system to be wiped and rebuilt every time the service is stopped and started\&. Extreme care should also be taken if you intend to use any of the other +\fBndbd\fR +options that affect the starting of data nodes\(emincluding +\fB\-\-initial\-start\fR, +\fB\-\-nostart\fR, and +\fB\-\-nowait\-nodes\fR\(emtogether with +\fB\-\-install\fR, and you should make absolutely certain you fully understand and allow for any possible consequences of doing so\&. +.sp +The +\fB\-\-install\fR +option has no effect on non\-Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" remove option (ndbd) +.\" remove option (ndbmtd) +\fB\-\-remove[=\fR\fB\fIname\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-remove[=name] +T} +T{ +\fBPlatform Specific\fR +T}:T{ +Windows +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +ndbd +T} +.TE +.sp 1 +Causes an +\fBndbd\fR +process that was previously installed as a Windows service to be removed\&. Optionally, you can specify a name for the service to be uninstalled; if not set, the service name defaults to +ndbd\&. +.sp +The +\fB\-\-remove\fR +option has no effect on non\-Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" connect-retries option (ndbd) +.\" connect-retries option (ndbmtd) +\fB\-\-connect\-retries=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.5\&.28\-ndb\-7\&.2\&.9 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connect\-retries=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +12 +T} +:T{ +\fBMin Value\fR +T}:T{ +\-1 +T} +:T{ +\fBMax Value\fR +T}:T{ +65535 +T} +.TE +.sp 1 +Determines the number of times that the data node attempts to contact a management server when starting\&. Setting this option to \-1 causes the data node to keep trying to make contact indefinitely\&. The default is 12 attempts\&. The time to wait between attempts is controlled by the +\fB\-\-connect\-delay\fR +option\&. +.sp +This option was added in MySQL Cluster NDB 7\&.2\&.9\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" connect-delay option (ndbd) +.\" connect-delay option (ndbmtd) +\fB\-\-connect\-delay=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.5\&.28\-ndb\-7\&.2\&.9 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connect\-delay=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +5 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +3600 +T} +.TE +.sp 1 +Determines the time to wait between attempts to contact a management server when starting (the time between attempts is controlled by the +\fB\-\-connect\-retries\fR +option)\&. The default is 5 attempts\&. +.sp +This option was added in MySQL Cluster NDB 7\&.2\&.9\&. +.RE +.\" MySQL Cluster: log files +.\" log files (MySQL Cluster) +.PP +\fBndbd\fR +generates a set of log files which are placed in the directory specified by +DataDir +in the +config\&.ini +configuration file\&. +.PP +These log files are listed below\&. +\fInode_id\fR +is the node\*(Aqs unique identifier\&. Note that +\fInode_id\fR +represents the node\*(Aqs unique identifier\&. For example, +ndb_2_error\&.log +is the error log generated by the data node whose node ID is +2\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" MySQL Cluster: error logs +.\" error logs (MySQL Cluster) +ndb_\fInode_id\fR_error\&.log +is a file containing records of all crashes which the referenced +\fBndbd\fR +process has encountered\&. Each record in this file contains a brief error string and a reference to a trace file for this crash\&. A typical entry in this file might appear as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +Date/Time: Saturday 30 July 2004 \- 00:20:01 +Type of error: error +Message: Internal program error (failed ndbrequire) +Fault ID: 2341 +Problem data: DbtupFixAlloc\&.cpp +Object of reference: DBTUP (Line: 173) +ProgramName: NDB Kernel +ProcessID: 14909 +TraceFile: ndb_2_trace\&.log\&.2 +***EOM*** +.fi +.if n \{\ +.RE +.\} +.sp +Listings of possible +\fBndbd\fR +exit codes and messages generated when a data node process shuts down prematurely can be found in +\m[blue]\fBndbd Error Messages\fR\m[]\&\s-2\u[1]\d\s+2\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +\fIThe last entry in the error log file is not necessarily the newest one\fR +(nor is it likely to be)\&. Entries in the error log are +\fInot\fR +listed in chronological order; rather, they correspond to the order of the trace files as determined in the +ndb_\fInode_id\fR_trace\&.log\&.next +file (see below)\&. Error log entries are thus overwritten in a cyclical and not sequential fashion\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" MySQL Cluster: trace files +.\" trace files (MySQL Cluster) +ndb_\fInode_id\fR_trace\&.log\&.\fItrace_id\fR +is a trace file describing exactly what happened just before the error occurred\&. This information is useful for analysis by the MySQL Cluster development team\&. +.sp +It is possible to configure the number of these trace files that will be created before old files are overwritten\&. +\fItrace_id\fR +is a number which is incremented for each successive trace file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_trace\&.log\&.next +is the file that keeps track of the next trace file number to be assigned\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_out\&.log +is a file containing any data output by the +\fBndbd\fR +process\&. This file is created only if +\fBndbd\fR +is started as a daemon, which is the default behavior\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR\&.pid +is a file containing the process ID of the +\fBndbd\fR +process when started as a daemon\&. It also functions as a lock file to avoid the starting of nodes with the same identifier\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_signal\&.log +is a file used only in debug versions of +\fBndbd\fR, where it is possible to trace all incoming, outgoing, and internal messages with their data in the +\fBndbd\fR +process\&. +.RE +.PP +It is recommended not to use a directory mounted through NFS because in some environments this can cause problems whereby the lock on the +\&.pid +file remains in effect even after the process has terminated\&. +.PP +To start +\fBndbd\fR, it may also be necessary to specify the host name of the management server and the port on which it is listening\&. Optionally, one may also specify the node ID that the process is to use\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbd \-\-connect\-string="nodeid=2;host=ndb_mgmd\&.mysql\&.com:1186"\fR +.fi +.if n \{\ +.RE +.\} +.PP +See +Section\ \&18.3.2.3, \(lqMySQL Cluster Connection Strings\(rq, for additional information about this issue\&. +Options Common to MySQL Cluster Programs(1), describes other command\-line options which can be used with +\fBndbd\fR\&. For information about data node configuration parameters, see +Section\ \&18.3.2.6, \(lqDefining MySQL Cluster Data Nodes\(rq\&. +.PP +When +\fBndbd\fR +starts, it actually initiates two processes\&. The first of these is called the +\(lqangel process\(rq; its only job is to discover when the execution process has been completed, and then to restart the +\fBndbd\fR +process if it is configured to do so\&. Thus, if you attempt to kill +\fBndbd\fR +using the Unix +\fBkill\fR +command, it is necessary to kill both processes, beginning with the angel process\&. The preferred method of terminating an +\fBndbd\fR +process is to use the management client and stop the process from there\&. +.PP +The execution process uses one thread for reading, writing, and scanning data, as well as all other activities\&. This thread is implemented asynchronously so that it can easily handle thousands of concurrent actions\&. In addition, a watch\-dog thread supervises the execution thread to make sure that it does not hang in an endless loop\&. A pool of threads handles file I/O, with each thread able to handle one open file\&. Threads can also be used for transporter connections by the transporters in the +\fBndbd\fR +process\&. In a multi\-processor system performing a large number of operations (including updates), the +\fBndbd\fR +process can consume up to 2 CPUs if permitted to do so\&. +.PP +For a machine with many CPUs it is possible to use several +\fBndbd\fR +processes which belong to different node groups; however, such a configuration is still considered experimental and is not supported for MySQL 5\&.5 in a production setting\&. See +Section\ \&18.1.6, \(lqKnown Limitations of MySQL Cluster\(rq\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +ndbd Error Messages +.RS 4 +\%http://dev.mysql.com/doc/ndbapi/en/ndbd-error-messages.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndbd_redo_log_reader.1 b/man/ndbd_redo_log_reader.1 new file mode 100644 index 000000000000..2208fced8744 --- /dev/null +++ b/man/ndbd_redo_log_reader.1 @@ -0,0 +1,253 @@ +'\" t +.\" Title: \fBndbd_redo_log_reader\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDBD_REDO_LOG_REA" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndbd_redo_log_reader +.SH "NAME" +ndbd_redo_log_reader \- check and print content of cluster redo log +.SH "SYNOPSIS" +.HP \w'\fBndbd_redo_log_reader\ \fR\fB\fIfile_name\fR\fR\fB\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBndbd_redo_log_reader \fR\fB\fIfile_name\fR\fR\fB [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +Reads a redo log file, checking it for errors, printing its contents in a human\-readable format, or both\&. +\fBndbd_redo_log_reader\fR +is intended for use primarily by MySQL Cluster developers and Support personnel in debugging and diagnosing problems\&. +.PP +This utility remains under development, and its syntax and behavior are subject to change in future MySQL Cluster releases\&. +.PP +The C++ source files for +\fBndbd_redo_log_reader\fR +can be found in the directory +/storage/ndb/src/kernel/blocks/dblqh/redoLogReader\&. +.PP +The following table includes options that are specific to the MySQL Cluster program +\fBndbd_redo_log_reader\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndbd_redo_log_reader\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.81.\ \& This table describes command-line options for the ndbd_redo_log_reader program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l. +T{ +.PP +-noprint +T}:T{ +Do not print records +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +-nocheck +T}:T{ +Do not check records for errors +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--help +T}:T{ +Print usage information +T}:T{ +.PP +ADDED: NDB 7.2.15 +T} +.TE +.sp 1 +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndbd_redo_log_reader \fIfile_name\fR [\fIoptions\fR] +.fi +.if n \{\ +.RE +.\} +.PP +\fIfile_name\fR +is the name of a cluster redo log file\&. redo log files are located in the numbered directories under the data node\*(Aqs data directory (DataDir); the path under this directory to the redo log files matches the pattern +ndb_\fI#\fR_fs/D\fI#\fR/LCP/\fI#\fR/T\fI#\fRF\fI#\fR\&.Data\&. In each case, the +\fI#\fR +represents a number (not necessarily the same number)\&. For more information, see +\m[blue]\fBMySQL Cluster Data Node File System Directory Files\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +The name of the file to be read may be followed by one or more of the options listed here: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-noprint +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +\fB\-noprint\fR: Do not print the contents of the log file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-nocheck +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +\fB\-nocheck\fR: Do not check the log file for errors\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.TS +allbox tab(:); +l l s s +l l s s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.5\&.35\-ndb\-7\&.2\&.15 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-help +T} +.TE +.sp 1 +\fB\-\-help\fR: Print usage information\&. +.sp +Added in MySQL Cluster NDB 7\&.2\&.15\&. (Bug #11749591, Bug #36805) +.RE +.PP +Like +\fBndb_print_backup_file\fR +and +\fBndb_print_schema_file\fR +(and unlike most of the +NDB +utilities that are intended to be run on a management server host or to connect to a management server) +\fBndbd_redo_log_reader\fR +must be run on a cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +MySQL Cluster Data Node File System Directory Files +.RS 4 +\%http://dev.mysql.com/doc/ndbapi/en/ndb-internals-ndbd-filesystemdir-files.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndbinfo_select_all.1 b/man/ndbinfo_select_all.1 new file mode 100644 index 000000000000..a4a170e34c60 --- /dev/null +++ b/man/ndbinfo_select_all.1 @@ -0,0 +1,304 @@ +'\" t +.\" Title: \fBndbinfo_select_all\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDBINFO_SELECT_AL" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndbinfo_select_all +.\" MySQL Cluster: ndbinfo_select_all +.SH "NAME" +ndbinfo_select_all \- select from ndbinfo tables +.SH "SYNOPSIS" +.HP \w'\fBndbinfo_select_all\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndbinfo_select_all \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndbinfo_select_all\fR +is a client program that selects all rows and columns from one or more tables in the +ndbinfo +database\&. It is included with the MySQL Cluster distribution beginning with MySQL Cluster NDB 7\&.2\&.2\&. +.PP +Not all +ndbinfo +tables can be accessed by this program\&. +ndbinfo_select_all +can access the +counters, +diskpagebuffer, +logbuffers, +logspaces, +nodes, +resources, +threadblocks, +threadstat, +and +transporters +tables\&. +.PP +To select from one or more +ndbinfo +tables using +\fBndbinfo_select_all\fR, it is necessary to supply the names of the tables when invoking the program as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbinfo_select_all \fR\fB\fItable_name1\fR\fR\fB [\fR\fB\fItable_name2\fR\fR\fB] [\&.\&.\&.]\fR +.fi +.if n \{\ +.RE +.\} +.PP +For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbinfo_select_all logbuffers logspaces\fR +== logbuffers == +node_id log_type log_id log_part total used high +5 0 0 0 33554432 262144 0 +6 0 0 0 33554432 262144 0 +7 0 0 0 33554432 262144 0 +8 0 0 0 33554432 262144 0 +== logspaces == +node_id log_type log_id log_part total used high +5 0 0 0 268435456 0 0 +5 0 0 1 268435456 0 0 +5 0 0 2 268435456 0 0 +5 0 0 3 268435456 0 0 +6 0 0 0 268435456 0 0 +6 0 0 1 268435456 0 0 +6 0 0 2 268435456 0 0 +6 0 0 3 268435456 0 0 +7 0 0 0 268435456 0 0 +7 0 0 1 268435456 0 0 +7 0 0 2 268435456 0 0 +7 0 0 3 268435456 0 0 +8 0 0 0 268435456 0 0 +8 0 0 1 268435456 0 0 +8 0 0 2 268435456 0 0 +8 0 0 3 268435456 0 0 +shell> +.fi +.if n \{\ +.RE +.\} +.sp +.\" command options (MySQL Cluster): ndbinfo_select_all +.PP +The following table includes options that are specific to +\fBndbinfo_select_all\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndbinfo_select_all\fR), see +Options Common to MySQL Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.70.\ \& This table describes command-line options for the ndbinfo_select_all program +.TS +allbox tab(:); +lB lB lB. +T{ +Format +T}:T{ +Description +T}:T{ +Added or Removed +T} +.T& +l l l +l l l +l l l +l l l. +T{ +.PP +--delay=# +T}:T{ +Set the delay in seconds between loops. Default is 5. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--loops=#, +.PP +-l +T}:T{ +Set the number of times to perform the select. Default is 1. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--database=db_name, +.PP +-d +T}:T{ +Name of the database where the table located. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +T{ +.PP +--parallelism=#, +.PP +-p +T}:T{ +Set the degree of parallelism. +T}:T{ +.PP +All MySQL 5.5 based releases +T} +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" delay option (ndbinfo_select_all) +\fB\-\-delay=\fR\fBseconds\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-delay=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +5 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +MAX_INT +T} +.TE +.sp 1 +This option sets the number of seconds to wait between executing loops\&. Has no effect if +\fB\-\-loops\fR +is set to 0 or 1\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" loops option (ndbinfo_select_all) +.\" -l option (ndbinfo_select_all) +\fB\-\-loops=\fR\fBnumber\fR, +\fB\-l \fR\fB\fInumber\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-loops=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +1 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +MAX_INT +T} +.TE +.sp 1 +This option sets the number of times to execute the select\&. Use +\fB\-\-delay\fR +to set the time between loops\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndbmtd.8 b/man/ndbmtd.8 new file mode 100644 index 000000000000..da8da2f3a890 --- /dev/null +++ b/man/ndbmtd.8 @@ -0,0 +1,225 @@ +'\" t +.\" Title: \fBndbmtd\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBNDBMTD\FR" "8" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" ndbmtd +.\" MySQL Cluster: ndbmtd +.\" MySQL Cluster: data nodes +.\" data nodes (MySQL Cluster) +.\" storage nodes - see data nodes, ndbd, ndbmtd +.SH "NAME" +ndbmtd \- the MySQL Cluster data node daemon (multi\-threaded version) +.SH "SYNOPSIS" +.HP \w'\fBndbmtd\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndbmtd \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndbmtd\fR +is a multi\-threaded version of +\fBndbd\fR, the process that is used to handle all the data in tables using the +NDBCLUSTER +storage engine\&. +\fBndbmtd\fR +is intended for use on host computers having multiple CPU cores\&. Except where otherwise noted, +\fBndbmtd\fR +functions in the same way as +\fBndbd\fR; therefore, in this section, we concentrate on the ways in which +\fBndbmtd\fR +differs from +\fBndbd\fR, and you should consult +\fBndbd\fR(8), for additional information about running MySQL Cluster data nodes that apply to both the single\-threaded and multi\-threaded versions of the data node process\&. +.PP +Command\-line options and configuration parameters used with +\fBndbd\fR +also apply to +\fBndbmtd\fR\&. For more information about these options and parameters, see +\fBndbd\fR(8), and +Section\ \&18.3.2.6, \(lqDefining MySQL Cluster Data Nodes\(rq, respectively\&. +.PP +\fBndbmtd\fR +is also file system\-compatible with +\fBndbd\fR\&. In other words, a data node running +\fBndbd\fR +can be stopped, the binary replaced with +\fBndbmtd\fR, and then restarted without any loss of data\&. (However, when doing this, you must make sure that +MaxNoOfExecutionThreads +is set to an apppriate value before restarting the node if you wish for +\fBndbmtd\fR +to run in multi\-threaded fashion\&.) Similarly, an +\fBndbmtd\fR +binary can be replaced with +\fBndbd\fR +simply by stopping the node and then starting +\fBndbd\fR +in place of the multi\-threaded binary\&. It is not necessary when switching between the two to start the data node binary using +\fB\-\-initial\fR\&. +.PP +Using +\fBndbmtd\fR +differs from using +\fBndbd\fR +in two key respects: +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +Because +\fBndbmtd\fR +runs by default in single\-threaded mode (that is, it behaves like +\fBndbd\fR), you must configure it to use multiple threads\&. This can be done by setting an appropriate value in the +config\&.ini +file for the +MaxNoOfExecutionThreads +configuration parameter or (in MySQL Cluster NDB 7\&.2\&.3 and later) the +ThreadConfig +configuration parameter\&. Using +MaxNoOfExecutionThreads +is simpler, but +ThreadConfig +offers more flexibility\&. For more information about these configuration parameters and their use, see +Multi-Threading Configuration Parameters (ndbmtd)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +Trace files are generated by critical errors in +\fBndbmtd\fR +processes in a somewhat different fashion from how these are generated by +\fBndbd\fR +failures\&. These differences are discussed in more detail in the next few paragraphs\&. +.RE +.\" ndbmtd: trace files +.\" trace files: ndbmtd +.\" MySQL Cluster: log files +.\" log files (MySQL Cluster): ndbmtd +.\" ndbmtd: trace files +.PP +Like +\fBndbd\fR, +\fBndbmtd\fR +generates a set of log files which are placed in the directory specified by +DataDir +in the +config\&.ini +configuration file\&. Except for trace files, these are generated in the same way and have the same names as those generated by +\fBndbd\fR\&. +.PP +In the event of a critical error, +\fBndbmtd\fR +generates trace files describing what happened just prior to the error\*(Aq occurrence\&. These files, which can be found in the data node\*(Aqs +DataDir, are useful for analysis of problems by the MySQL Cluster Development and Support teams\&. One trace file is generated for each +\fBndbmtd\fR +thread\&. The names of these files have the following pattern: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_\fInode_id\fR_trace\&.log\&.\fItrace_id\fR_t\fIthread_id\fR, +.fi +.if n \{\ +.RE +.\} +.PP +In this pattern, +\fInode_id\fR +stands for the data node\*(Aqs unique node ID in the cluster, +\fItrace_id\fR +is a trace sequence number, and +\fIthread_id\fR +is the thread ID\&. For example, in the event of the failure of an +\fBndbmtd\fR +process running as a MySQL Cluster data node having the node ID 3 and with +MaxNoOfExecutionThreads +equal to 4, four trace files are generated in the data node\*(Aqs data directory\&. If the is the first time this node has failed, then these files are named +ndb_3_trace\&.log\&.1_t1, +ndb_3_trace\&.log\&.1_t2, +ndb_3_trace\&.log\&.1_t3, and +ndb_3_trace\&.log\&.1_t4\&. Internally, these trace files follow the same format as +\fBndbd\fR +trace files\&. +.PP +The +\fBndbd\fR +exit codes and messages that are generated when a data node process shuts down prematurely are also used by +\fBndbmtd\fR\&. See +\m[blue]\fBndbd Error Messages\fR\m[]\&\s-2\u[1]\d\s+2, for a listing of these\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +It is possible to use +\fBndbd\fR +and +\fBndbmtd\fR +concurrently on different data nodes in the same MySQL Cluster\&. However, such configurations have not been tested extensively; thus, we cannot recommend doing so in a production setting at this time\&. +.sp .5v +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +ndbd Error Messages +.RS 4 +\%http://dev.mysql.com/doc/ndbapi/en/ndbd-error-messages.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/perror.1 b/man/perror.1 new file mode 100644 index 000000000000..23f96c887450 --- /dev/null +++ b/man/perror.1 @@ -0,0 +1,206 @@ +'\" t +.\" Title: \fBperror\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBPERROR\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" perror +.\" error messages: displaying +.\" errno +.\" Errcode +.SH "NAME" +perror \- explain error codes +.SH "SYNOPSIS" +.HP \w'\fBperror\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIerrorcode\fR\fR\fB\ \&.\&.\&.\fR\ 'u +\fBperror [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIerrorcode\fR\fR\fB \&.\&.\&.\fR +.SH "DESCRIPTION" +.PP +For most system errors, MySQL displays, in addition to an internal text message, the system error code in one of the following styles: +.sp +.if n \{\ +.RS 4 +.\} +.nf +message \&.\&.\&. (errno: #) +message \&.\&.\&. (Errcode: #) +.fi +.if n \{\ +.RE +.\} +.PP +You can find out what the error code means by examining the documentation for your system or by using the +\fBperror\fR +utility\&. +.PP +\fBperror\fR +prints a description for a system error code or for a storage engine (table handler) error code\&. +.PP +Invoke +\fBperror\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBperror [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIerrorcode\fR\fR\fB \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.PP +Example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBperror 13 64\fR +OS error code 13: Permission denied +OS error code 64: Machine is not on the network +.fi +.if n \{\ +.RE +.\} +.PP +To obtain the error message for a MySQL Cluster error code, invoke +\fBperror\fR +with the +\fB\-\-ndb\fR +option: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBperror \-\-ndb \fR\fB\fIerrorcode\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +Note that the meaning of system error messages may be dependent on your operating system\&. A given error code may mean different things on different operating systems\&. +.PP +\fBperror\fR +supports the following options\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" perror: help option +.\" help option: perror +\fB\-\-help\fR, +\fB\-\-info\fR, +\fB\-I\fR, +\fB\-?\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" perror: ndb option +.\" ndb option: perror +\fB\-\-ndb\fR +.sp +Print the error message for a MySQL Cluster error code\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" perror: silent option +.\" silent option: perror +\fB\-\-silent\fR, +\fB\-s\fR +.sp +Silent mode\&. Print only the error message\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" perror: verbose option +.\" verbose option: perror +\fB\-\-verbose\fR, +\fB\-v\fR +.sp +Verbose mode\&. Print error code and message\&. This is the default behavior\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" perror: version option +.\" version option: perror +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/replace.1 b/man/replace.1 new file mode 100644 index 000000000000..745b8879e716 --- /dev/null +++ b/man/replace.1 @@ -0,0 +1,185 @@ +'\" t +.\" Title: \fBreplace\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBREPLACE\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" replace utility +.\" string replacement: replace utility +.SH "NAME" +replace \- a string\-replacement utility +.SH "SYNOPSIS" +.HP \w'\fBreplace\ \fR\fB\fIarguments\fR\fR\ 'u +\fBreplace \fR\fB\fIarguments\fR\fR +.SH "DESCRIPTION" +.PP +The +\fBreplace\fR +utility program changes strings in place in files or on the standard input\&. +.PP +Invoke +\fBreplace\fR +in one of the following ways: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBreplace \fR\fB\fIfrom\fR\fR\fB \fR\fB\fIto\fR\fR\fB [\fR\fB\fIfrom\fR\fR\fB \fR\fB\fIto\fR\fR\fB] \&.\&.\&. \-\- \fR\fB\fIfile_name\fR\fR\fB [\fR\fB\fIfile_name\fR\fR\fB] \&.\&.\&.\fR +shell> \fBreplace \fR\fB\fIfrom\fR\fR\fB \fR\fB\fIto\fR\fR\fB [\fR\fB\fIfrom\fR\fR\fB \fR\fB\fIto\fR\fR\fB] \&.\&.\&. < \fR\fB\fIfile_name\fR\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fIfrom\fR +represents a string to look for and +\fIto\fR +represents its replacement\&. There can be one or more pairs of strings\&. +.PP +Use the +\fB\-\-\fR +option to indicate where the string\-replacement list ends and the file names begin\&. In this case, any file named on the command line is modified in place, so you may want to make a copy of the original before converting it\&. +\fIreplace\fR +prints a message indicating which of the input files it actually modifies\&. +.PP +If the +\fB\-\-\fR +option is not given, +\fBreplace\fR +reads the standard input and writes to the standard output\&. +.PP +\fBreplace\fR +uses a finite state machine to match longer strings first\&. It can be used to swap strings\&. For example, the following command swaps +a +and +b +in the given files, +file1 +and +file2: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBreplace a b b a \-\- file1 file2 \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.PP +The +\fBreplace\fR +program is used by +\fBmsql2mysql\fR\&. See +\fBmsql2mysql\fR(1)\&. +.PP +\fBreplace\fR +supports the following options\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-?\fR, +\fB\-I\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-#\fR\fB\fIdebug_options\fR\fR +.sp +Enable debugging\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-s\fR +.sp +Silent mode\&. Print less information what the program does\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-v\fR +.sp +Verbose mode\&. Print more information about what the program does\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 new file mode 100644 index 000000000000..54b824c2ad72 --- /dev/null +++ b/man/resolve_stack_dump.1 @@ -0,0 +1,145 @@ +'\" t +.\" Title: \fBresolve_stack_dump\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBRESOLVE_STACK_DUM" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" resolve_stack_dump +.SH "NAME" +resolve_stack_dump \- resolve numeric stack trace dump to symbols +.SH "SYNOPSIS" +.HP \w'\fBresolve_stack_dump\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIsymbols_file\fR\fR\fB\ [\fR\fB\fInumeric_dump_file\fR\fR\fB]\fR\ 'u +\fBresolve_stack_dump [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIsymbols_file\fR\fR\fB [\fR\fB\fInumeric_dump_file\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBresolve_stack_dump\fR +resolves a numeric stack dump to symbols\&. +.PP +Invoke +\fBresolve_stack_dump\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBresolve_stack_dump [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIsymbols_file\fR\fR\fB [\fR\fB\fInumeric_dump_file\fR\fR\fB]\fR +.fi +.if n \{\ +.RE +.\} +.PP +The symbols file should include the output from the +\fBnm \-\-numeric\-sort mysqld\fR +command\&. The numeric dump file should contain a numeric stack track from +\fBmysqld\fR\&. If no numeric dump file is named on the command line, the stack trace is read from the standard input\&. +.PP +\fBresolve_stack_dump\fR +supports the following options\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" resolve_stack_dump: help option +.\" help option: resolve_stack_dump +\fB\-\-help\fR, +\fB\-h\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" resolve_stack_dump: numeric-dump-file option +.\" numeric-dump-file option: resolve_stack_dump +\fB\-\-numeric\-dump\-file=\fR\fB\fIfile_name\fR\fR, +\fB\-n \fR\fB\fIfile_name\fR\fR +.sp +Read the stack trace from the given file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" resolve_stack_dump: symbols-file option +.\" symbols-file option: resolve_stack_dump +\fB\-\-symbols\-file=\fR\fB\fIfile_name\fR\fR, +\fB\-s \fR\fB\fIfile_name\fR\fR +.sp +Use the given symbols file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" resolve_stack_dump: version option +.\" version option: resolve_stack_dump +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.PP +For more information, see +Section\ \&24.4.1.5, \(lqUsing a Stack Trace\(rq\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/resolveip.1 b/man/resolveip.1 new file mode 100644 index 000000000000..a368a7b8de14 --- /dev/null +++ b/man/resolveip.1 @@ -0,0 +1,124 @@ +'\" t +.\" Title: \fBresolveip\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 01/06/2015 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.5 +.\" Language: English +.\" +.TH "\FBRESOLVEIP\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.\" resolveip +.SH "NAME" +resolveip \- resolve host name to IP address or vice versa +.SH "SYNOPSIS" +.HP \w'\fBresolveip\ [\fR\fB\fIoptions\fR\fR\fB]\ {\fR\fB\fIhost_name\fR\fR\fB|\fR\fB\fIip\-addr\fR\fR\fB}\ \&.\&.\&.\fR\ 'u +\fBresolveip [\fR\fB\fIoptions\fR\fR\fB] {\fR\fB\fIhost_name\fR\fR\fB|\fR\fB\fIip\-addr\fR\fR\fB} \&.\&.\&.\fR +.SH "DESCRIPTION" +.PP +The +\fBresolveip\fR +utility resolves host names to IP addresses and vice versa\&. +.PP +Invoke +\fBresolveip\fR +like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBresolveip [\fR\fB\fIoptions\fR\fR\fB] {\fR\fB\fIhost_name\fR\fR\fB|\fR\fB\fIip\-addr\fR\fR\fB} \&.\&.\&.\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBresolveip\fR +supports the following options\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" resolveip: help option +.\" help option: resolveip +\fB\-\-help\fR, +\fB\-\-info\fR, +\fB\-?\fR, +\fB\-I\fR +.sp +Display a help message and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" resolveip: silent option +.\" silent option: resolveip +\fB\-\-silent\fR, +\fB\-s\fR +.sp +Silent mode\&. Produce less output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" resolveip: version option +.\" version option: resolveip +\fB\-\-version\fR, +\fB\-V\fR +.sp +Display version information and exit\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/support-files/cmake-no-wix.patch b/support-files/cmake-no-wix.patch new file mode 100644 index 000000000000..325d97e5400a --- /dev/null +++ b/support-files/cmake-no-wix.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9e235ba..15c3414 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -569,7 +569,8 @@ IF(WIN32) + ELSE() + SET(CPACK_GENERATOR "TGZ") + ENDIF() +-ADD_SUBDIRECTORY(packaging/WiX) ++# Trouble on SLES 11 due to old cmake ... ++# ADD_SUBDIRECTORY(packaging/WiX) + ADD_SUBDIRECTORY(packaging/solaris) + + # Create a single package with "make package" diff --git a/support-files/mysql-rpmlintrc b/support-files/mysql-rpmlintrc new file mode 100644 index 000000000000..72dd6e38a524 --- /dev/null +++ b/support-files/mysql-rpmlintrc @@ -0,0 +1,64 @@ +# allow the traditional name "mysql-shared" even with a so-versioned lib +setBadness('shlib-policy-name-error', 0) + +# Suppress several "false positive" messages which we cannot prevent: +# Oracle text we must not change: +addFilter("MySQL.* invalid-license") +addFilter("mysql.* invalid-license") +addFilter("MySQL.* name-repeated-in-summary") +addFilter("mysql.* name-repeated-in-summary") +addFilter("MySQL.* no-version-in-last-changelog") +addFilter("mysql.* no-version-in-last-changelog") +addFilter("MySQL.*src.* invalid-spec-name") +addFilter("mysql.*src.* invalid-spec-name") +# Oracle code we must not change: +addFilter("MySQL.*shared.* shared-lib-calls-exit /usr/lib64/libmysqlclient") +addFilter("mysql.*shared.* shared-lib-calls-exit /usr/lib64/libmysqlclient") +addFilter("MySQL.*server.* binary-or-shlib-calls-gethostbyname /usr/bin/resolveip") +addFilter("mysql.*server.* binary-or-shlib-calls-gethostbyname /usr/bin/resolveip") +# "obsolete" the Oracle commercial RPMs: +addFilter("MySQL.* obsolete-not-provided mysql[^ ]*advanced") +addFilter("mysql.* obsolete-not-provided mysql[^ ]*advanced") +addFilter("MySQL.* obsolete-not-provided MySQL[^ ]*advanced") +addFilter("mysql.* obsolete-not-provided MySQL[^ ]*advanced") +addFilter("MySQL.* obsolete-not-provided MySQL[^ ]*classic") +addFilter("mysql.* obsolete-not-provided MySQL[^ ]*classic") +addFilter("MySQL.* obsolete-not-provided MySQL[^ ]*community") +addFilter("mysql.* obsolete-not-provided MySQL[^ ]*community") +addFilter("MySQL.* obsolete-not-provided MySQL[^ ]*enterprise") +addFilter("mysql.* obsolete-not-provided MySQL[^ ]*enterprise") +addFilter("MySQL.* obsolete-not-provided MySQL[^ ]*pro") +addFilter("mysql.* obsolete-not-provided MySQL[^ ]*pro") +addFilter("MySQL.* obsolete-not-provided MySQL[^ ]*standard") +addFilter("mysql.* obsolete-not-provided MySQL[^ ]*standard") +# ... and the packages we dropped on intention: +addFilter("MySQL.*devel.* obsolete-not-provided MySQL-embedded-devel") +addFilter("mysql.*devel.* obsolete-not-provided MySQL-embedded-devel") +addFilter("MySQL.*devel.* obsolete-not-provided mysql-embedded-devel") +addFilter("mysql.*devel.* obsolete-not-provided mysql-embedded-devel") +addFilter("MySQL.*test.* obsolete-not-provided MySQL-bench") +addFilter("mysql.*test.* obsolete-not-provided MySQL-bench") +addFilter("MySQL.*test.* obsolete-not-provided mysql-bench") +addFilter("mysql.*test.* obsolete-not-provided mysql-bench") +# Oracle does not strip binaries, and neither will we: +addFilter("MySQL.* unstripped-binary-or-object /usr/s?bin/.*") +addFilter("mysql.* unstripped-binary-or-object /usr/s?bin/.*") +addFilter("MySQL.* unstripped-binary-or-object /usr/lib64/.*") +addFilter("mysql.* unstripped-binary-or-object /usr/lib64/.*") +addFilter("MySQL.*test.* unstripped-binary-or-object /usr/share/mysql-test/lib/.*") +addFilter("mysql.*test.* unstripped-binary-or-object /usr/share/mysql-test/lib/.*") +# Pre-defined certificates are needed for SSL tests, also a binary: +addFilter("MySQL.*test.* pem-certificate") +addFilter("mysql.*test.* pem-certificate") +addFilter("MySQL.*test.* arch-dependent-file-in-usr-share /usr/share/mysql-test/lib/My/SafeProcess/my_safe_process") +addFilter("mysql.*test.* arch-dependent-file-in-usr-share /usr/share/mysql-test/lib/My/SafeProcess/my_safe_process") +# Oracle doesn't have a "check" section (yet): +addFilter("MySQL.* make-check-outside-check-section") +addFilter("mysql.* make-check-outside-check-section") +# Documentation issues: +addFilter("MySQL.*server.* no-manual-page-for-binary mysqld-debug") +addFilter("mysql.*server.* no-manual-page-for-binary mysqld-debug") +# File naming: +addFilter("MySQL.*server.* incoherent-init-script-name mysql") +addFilter("mysql.*server.* incoherent-init-script-name mysql") +# End of the "false positive" messages which we cannot prevent. diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index 751eb22d9b5b..fe97541b216e 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -24,6 +24,11 @@ # Short-Description: start and stop MySQL # Description: MySQL is a very fast and reliable SQL database engine. ### END INIT INFO + +# Prevent OpenSUSE's init scripts from calling systemd, so that +# both 'bootstrap' and 'start' are handled entirely within this script + +SYSTEMD_NO_WRAP=1 # If you install MySQL on some other places than @prefix@, then you # have to do one of the following things for this script to work: diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 0750a2392eb6..04561873a1e2 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -25,12 +25,16 @@ %global mysql_vendor Oracle and/or its affiliates %global mysql_version @VERSION@ +%global wsrep_version @WSREP_VERSION@ +%global wsrep_revision @WSREP_REVISION@ %global mysqld_user mysql %global mysqld_group mysql %global mysqldatadir /var/lib/mysql -%global release 1 +%global release %{wsrep_version} +%global short_product_tag 5.5 + # @@ -68,14 +72,6 @@ # $ rpmbuild --define="option " ... # -# ---------------------------------------------------------------------------- -# wsrep builds -# ---------------------------------------------------------------------------- -%if %{defined with_wsrep} -%define mysql_version @VERSION@_wsrep_@WSREP_API_VERSION@.@WSREP_PATCH_VERSION@ -%define wsrep_version @WSREP_VERSION@ -%endif - # ---------------------------------------------------------------------------- # Commercial builds # ---------------------------------------------------------------------------- @@ -87,9 +83,9 @@ # Source name # ---------------------------------------------------------------------------- %if %{undefined src_base} -%define src_base mysql +%define src_base mysql-wsrep %endif -%define src_dir %{src_base}-%{mysql_version} +%define src_dir %{src_base}-%{mysql_version}-%{wsrep_version} # ---------------------------------------------------------------------------- # Feature set (storage engines, options). Default to community (everything) @@ -124,104 +120,50 @@ %endif # ---------------------------------------------------------------------------- -# Packager +# Distribution support # ---------------------------------------------------------------------------- -%if %{undefined mysql_packager} -%define mysql_packager MySQL Build Team + +# Disable post build checks for time being. +BuildConflicts: post-build-checks + +BuildRequires: gcc-c++ ncurses-devel perl zlib-devel cmake libaio-devel bison flex + +%if 0%{?rhel} == 6 || 0%{?rhel} == 7 || 0%{?fedora} == 20 || 0%{?fedora} == 21 +BuildRequires: time %endif -# ---------------------------------------------------------------------------- -# Distribution support -# ---------------------------------------------------------------------------- -%if %{undefined distro_specific} -%define distro_specific 0 +%if 0%{?suse_version} +%if 0%{?suse_version} == 1110 +BuildRequires: gdbm-devel gperf openldap2-client procps pwdutils %endif -%if %{distro_specific} - %if %(test -f /etc/enterprise-release && echo 1 || echo 0) - %define oelver %(rpm -qf --qf '%%{version}\\n' /etc/enterprise-release | sed -e 's/^\\([0-9]*\\).*/\\1/g') - %if "%oelver" == "4" - %define distro_description Oracle Enterprise Linux 4 - %define distro_releasetag oel4 - %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel cmake libaio-devel - %define distro_requires chkconfig coreutils grep procps shadow-utils net-tools - %else - %if "%oelver" == "5" - %define distro_description Oracle Enterprise Linux 5 - %define distro_releasetag oel5 - %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel cmake libaio-devel - %define distro_requires chkconfig coreutils grep procps shadow-utils net-tools - %else - %{error:Oracle Enterprise Linux %{oelver} is unsupported} - %endif - %endif - %else - %if %(test -f /etc/oracle-release && echo 1 || echo 0) - %define elver %(rpm -qf --qf '%%{version}\\n' /etc/oracle-release | sed -e 's/^\\([0-9]*\\).*/\\1/g') - %if "%elver" == "6" || "%elver" == "7" - %define distro_description Oracle Linux %elver - %define distro_releasetag el%elver - %define distro_buildreq gcc-c++ ncurses-devel perl readline-devel time zlib-devel cmake libaio-devel - %define distro_requires chkconfig coreutils grep procps shadow-utils net-tools - %else - %{error:Oracle Linux %{elver} is unsupported} - %endif - %else - %if %(test -f /etc/redhat-release && echo 1 || echo 0) - %define rhelver %(rpm -qf --qf '%%{version}\\n' /etc/redhat-release | sed -e 's/^\\([0-9]*\\).*/\\1/g') - %if "%rhelver" == "4" - %define distro_description Red Hat Enterprise Linux 4 - %define distro_releasetag rhel4 - %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel cmake libaio-devel - %define distro_requires chkconfig coreutils grep procps shadow-utils net-tools - %else - %if "%rhelver" == "5" - %define distro_description Red Hat Enterprise Linux 5 - %define distro_releasetag rhel5 - %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel cmake libaio-devel - %define distro_requires chkconfig coreutils grep procps shadow-utils net-tools - %else - %if "%rhelver" == "6" - %define distro_description Red Hat Enterprise Linux 6 - %define distro_releasetag rhel6 - %define distro_buildreq gcc-c++ ncurses-devel perl readline-devel time zlib-devel cmake libaio-devel - %define distro_requires chkconfig coreutils grep procps shadow-utils net-tools - %else - %{error:Red Hat Enterprise Linux %{rhelver} is unsupported} - %endif - %endif - %endif - %else - %if %(test -f /etc/SuSE-release && echo 1 || echo 0) - %define susever %(rpm -qf --qf '%%{version}\\n' /etc/SuSE-release | cut -d. -f1) - %if "%susever" == "10" - %define distro_description SUSE Linux Enterprise Server 10 - %define distro_releasetag sles10 - %define distro_buildreq gcc-c++ gdbm-devel gperf ncurses-devel openldap2-client readline-devel zlib-devel cmake libaio-devel - %define distro_requires aaa_base coreutils grep procps pwdutils - %else - %if "%susever" == "11" - %define distro_description SUSE Linux Enterprise Server 11 - %define distro_releasetag sles11 - %define distro_buildreq gcc-c++ gdbm-devel gperf ncurses-devel openldap2-client procps pwdutils readline-devel zlib-devel cmake libaio-devel - %define distro_requires aaa_base coreutils grep procps pwdutils - %else - %{error:SuSE %{susever} is unsupported} - %endif - %endif - %else - %{error:Unsupported distribution} - %endif - %endif - %endif +%if 0%{?suse_version} == 1310 || 0%{?suse_version} == 1315 || 0%{?suse_version} == 1320 +BuildRequires: gperf procps time +%endif +%endif + +# Define dist tag if not given by platform +%if %{undefined dist} + # For suse versions see: + # https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto + %if 0%{?suse_version} == 1110 + %define dist .sle11 + %endif + %if 0%{?suse_version} == 1310 + %define dist .suse13.1 + %endif + %if 0%{?suse_version} == 1315 + %define dist .sle12 + %endif + %if 0%{?suse_version} == 1320 + %define dist .suse13.2 + %endif + # Still missing? + %if %{undefined dist} + %define dist .DIST %endif -%else - %define generic_kernel %(uname -r | cut -d. -f1-2) - %define distro_description Generic Linux (kernel %{generic_kernel}) - %define distro_releasetag linux%{generic_kernel} - %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel - %define distro_requires coreutils grep procps /sbin/chkconfig /usr/sbin/useradd /usr/sbin/groupadd %endif + # Avoid debuginfo RPMs, leaves binaries unstripped %define debug_package %{nil} @@ -246,7 +188,7 @@ %define license_files_server %{src_dir}/LICENSE.mysql %define license_type Commercial %else -%define license_files_server %{src_dir}/COPYING %{src_dir}/README +%define license_files_server COPYING README %define license_type GPL %endif @@ -258,18 +200,20 @@ Name: MySQL%{product_suffix} Summary: MySQL: a very fast and reliable SQL database server Group: Applications/Databases Version: @MYSQL_RPM_VERSION@ -Release: %{release}%{?distro_releasetag:.%{distro_releasetag}} -Distribution: %{distro_description} +Release: %{release}%{dist} +# Distribution: %{distro_description} License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{license_type} license as shown in the Description field. -Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src_dir}.tar.gz +Source: %{src_dir}.tar.gz +Source99: mysql-rpmlintrc +Patch0: cmake-no-wix.patch URL: http://www.mysql.com/ -Packager: MySQL Release Engineering +Packager: Codership Oy Vendor: %{mysql_vendor} -BuildRequires: %{distro_buildreq} -%{?el7:Patch0: mysql-5.5-libmysqlclient-symbols.patch} +# BuildRequires: %{distro_buildreq} +#wsrep_patch_tag # Regression tests may take a long time, override the default to skip them -%{!?runselftest:%global runselftest 1} +%{!?runselftest:%global runselftest 0} # Think about what you use here since the first step is to # run a rm -rf @@ -298,17 +242,41 @@ documentation and the manual for more information. # Sub package definition ############################################################################## -%package -n MySQL-server%{product_suffix} -%if %{defined with_wsrep} -Version: %{mysql_version} -%endif +%package -n mysql-wsrep%{product_suffix} +Summary: MySQL: meta package for a server+client setup +Group: Applications/Databases +Requires: mysql-wsrep-server%{product_suffix} +Requires: mysql-wsrep-client%{product_suffix} + +%description -n mysql-wsrep%{product_suffix} +This meta package ensures the installation of a MySQL server and the necessary +client programs for operation and administration. It does not itself +contain those files but rather causes the installation of the subpackages +"mysql-wsrep-server%{product_suffix}" and "mysql-wsrep-client%{product_suffix}". +As indicated in the name, the server is built with the "wsrep" plugin so that +it can be a node in a MySQL Galera Cluster. + +# ---------------------------------------------------------------------------- + +%package -n mysql-wsrep-server%{product_suffix} Summary: MySQL: a very fast and reliable SQL database server Group: Applications/Databases -%if %{defined with_wsrep} -Requires: %{distro_requires} rsync lsof -%else -Requires: %{distro_requires} +# Distro requirements +# RedHat +%if 0%{?fedora} || 0%{?rhel} +Requires: chkconfig coreutils grep procps shadow-utils net-tools rsync lsof +%if 0%{?rhel} == 7 || 0%{?fedora} >= 20 +Requires: perl-Data-Dumper +%endif +%endif +# SUSE +%if 0%{?suse_version} +Requires: aaa_base coreutils grep procps rsync lsof +%if 0%{suse_version} == 1110 +Requires: pwdutils +%endif %endif + %if 0%{?commercial} Obsoletes: MySQL-server %else @@ -321,7 +289,7 @@ Obsoletes: MySQL-server-advanced-gpl MySQL-server-enterprise-gpl Provides: mysql-server = %{version}-%{release} Provides: mysql-server%{?_isa} = %{version}-%{release} -%description -n MySQL-server%{product_suffix} +%description -n mysql-wsrep-server%{product_suffix} 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 @@ -335,21 +303,20 @@ licenses from %{mysql_vendor} if you do not wish to be bound by the terms of the GPL. See the chapter "Licensing and Support" in the manual for further info. -The MySQL web site (http://www.mysql.com/) provides the latest news and +The MySQL web site (http://www.mysql.com/) provides the latest news and information about the MySQL software. Also please see the documentation and the manual for more information. This package includes the MySQL server binary as well as related utilities to run and administer a MySQL server. -%if %{defined with_wsrep} Built with wsrep patch %{wsrep_version}. -%endif + If you want to access and work with the database, you have to install -package "MySQL-client%{product_suffix}" as well! +package "mysql-wsrep-client%{product_suffix}" as well! # ---------------------------------------------------------------------------- -%package -n MySQL-client%{product_suffix} +%package -n mysql-wsrep-client%{product_suffix} Summary: MySQL - Client Group: Applications/Databases %if 0%{?commercial} @@ -364,13 +331,13 @@ Obsoletes: MySQL-client-advanced-gpl MySQL-client-enterprise-gpl Provides: mysql = %{version}-%{release} Provides: mysql%{?_isa} = %{version}-%{release} -%description -n MySQL-client%{product_suffix} +%description -n mysql-wsrep-client%{product_suffix} This package contains the standard MySQL clients and administration tools. For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ # ---------------------------------------------------------------------------- -%package -n MySQL-test%{product_suffix} +%package -n mysql-wsrep-test%{product_suffix} Summary: MySQL - Test suite Group: Applications/Databases %if 0%{?commercial} @@ -382,20 +349,19 @@ Obsoletes: MySQL-test-advanced %endif Obsoletes: mysql-test < %{version}-%{release} Obsoletes: mysql-test-advanced -Obsoletes: mysql-bench MySQL-bench Obsoletes: MySQL-test-classic MySQL-test-community MySQL-test-enterprise Obsoletes: MySQL-test-advanced-gpl MySQL-test-enterprise-gpl Provides: mysql-test = %{version}-%{release} Provides: mysql-test%{?_isa} = %{version}-%{release} AutoReqProv: no -%description -n MySQL-test%{product_suffix} +%description -n mysql-wsrep-test%{product_suffix} This package contains the MySQL regression test suite. For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ # ---------------------------------------------------------------------------- -%package -n MySQL-devel%{product_suffix} +%package -n mysql-wsrep-devel%{product_suffix} Summary: MySQL - Development header files and libraries Group: Applications/Databases %if 0%{?commercial} @@ -410,14 +376,14 @@ Obsoletes: MySQL-devel-advanced-gpl MySQL-devel-enterprise-gpl Provides: mysql-devel = %{version}-%{release} Provides: mysql-devel%{?_isa} = %{version}-%{release} -%description -n MySQL-devel%{product_suffix} +%description -n mysql-wsrep-devel%{product_suffix} This package contains the development header files and libraries necessary to develop MySQL client applications. For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ # ---------------------------------------------------------------------------- -%package -n MySQL-shared%{product_suffix} +%package -n mysql-wsrep-shared%{product_suffix} Summary: MySQL - Shared libraries Group: Applications/Databases %if 0%{?commercial} @@ -431,48 +397,17 @@ Obsoletes: MySQL-shared-pro-gpl-cert Obsoletes: MySQL-shared-classic MySQL-shared-community MySQL-shared-enterprise Obsoletes: MySQL-shared-advanced-gpl MySQL-shared-enterprise-gpl -%description -n MySQL-shared%{product_suffix} +%description -n mysql-wsrep-shared%{product_suffix} This package contains the shared libraries (*.so*) which certain languages and applications need to dynamically load and use MySQL. -# ---------------------------------------------------------------------------- -%if %{undefined with_wsrep} -%package -n MySQL-embedded%{product_suffix} -Summary: MySQL - Embedded library -Group: Applications/Databases -%if 0%{?commercial} -Requires: MySQL-devel-advanced -Obsoletes: MySQL-embedded -%else -Requires: MySQL-devel -Obsoletes: MySQL-embedded-advanced -%endif -Obsoletes: mysql-embedded < %{version}-%{release} -Obsoletes: mysql-embedded-advanced -Obsoletes: MySQL-embedded-pro -Obsoletes: MySQL-embedded-classic MySQL-embedded-community MySQL-embedded-enterprise -Obsoletes: MySQL-embedded-advanced-gpl MySQL-embedded-enterprise-gpl -Provides: mysql-embedded = %{version}-%{release} -Provides: mysql-emdedded%{?_isa} = %{version}-%{release} - -%description -n MySQL-embedded%{product_suffix} -This package contains the MySQL 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 main benefits are increased -speed and more simple management for embedded applications. - -The API is identical for the embedded MySQL version and the -client/server version. - -For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ -%endif - ############################################################################## %prep -%setup -T -a 0 -c -n %{src_dir} -pushd %{src_dir} -%{?el7:%patch0 -p1} +%setup -n %{src_dir} +# That patch is needed with old cmake only, on SLES 11, but it won't do any harm +# outside Windows, so it may be used in all RPM builds. +%patch0 -p1 +#wsrep_apply_patch_tag ############################################################################## %build @@ -517,7 +452,7 @@ export CFLAGS=${MYSQL_BUILD_CFLAGS:-${CFLAGS:-$RPM_OPT_FLAGS}} export CXXFLAGS=${MYSQL_BUILD_CXXFLAGS:-${CXXFLAGS:-$RPM_OPT_FLAGS -felide-constructors -fno-exceptions -fno-rtti}} export LDFLAGS=${MYSQL_BUILD_LDFLAGS:-${LDFLAGS:-}} export CMAKE=${MYSQL_BUILD_CMAKE:-${CMAKE:-cmake}} -export MAKE_JFLAG=${MYSQL_BUILD_MAKE_JFLAG:-} +export MAKE_JFLAG=${MYSQL_BUILD_MAKE_JFLAG:--j$(ncpu=$(cat /proc/cpuinfo | grep processor | wc -l) && echo $(($ncpu > 4 ? 4 : $ncpu)))} # Build debug mysqld and libmysqld.a mkdir debug @@ -527,6 +462,7 @@ mkdir debug CFLAGS=`echo " ${CFLAGS} " | \ sed -e 's/ -O[0-9]* / /' \ -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /' \ + -e 's/-D_FORTIFY_SOURCE=2/ /' \ -e 's/ -unroll2 / /' \ -e 's/ -ip / /' \ -e 's/^ //' \ @@ -534,22 +470,23 @@ mkdir debug CXXFLAGS=`echo " ${CXXFLAGS} " | \ sed -e 's/ -O[0-9]* / /' \ -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /' \ + -e 's/-D_FORTIFY_SOURCE=2/ /' \ -e 's/ -unroll2 / /' \ -e 's/ -ip / /' \ -e 's/^ //' \ -e 's/ $//'` # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM - ${CMAKE} ../%{src_dir} -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \ + ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \ -DCMAKE_BUILD_TYPE=Debug \ -DENABLE_DTRACE=OFF \ -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ -DFEATURE_SET="%{feature_set}" \ -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \ -%if %{defined with_wsrep} + -DMYSQL_SERVER_SUFFIX="%{server_suffix}" \ -DWITH_WSREP=1 \ -%endif - -DMYSQL_SERVER_SUFFIX="%{server_suffix}" + -DWSREP_VERSION="%{wsrep_version}" \ + -DWSREP_REVISION="%{wsrep_revision}" echo BEGIN_DEBUG_CONFIG ; egrep '^#define' include/config.h ; echo END_DEBUG_CONFIG make ${MAKE_JFLAG} VERBOSE=1 ) @@ -559,16 +496,16 @@ mkdir release cd release # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM - ${CMAKE} ../%{src_dir} -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \ + ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DENABLE_DTRACE=OFF \ -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ -DFEATURE_SET="%{feature_set}" \ -DCOMPILATION_COMMENT="%{compilation_comment_release}" \ -%if %{defined with_wsrep} + -DMYSQL_SERVER_SUFFIX="%{server_suffix}" \ -DWITH_WSREP=1 \ -%endif - -DMYSQL_SERVER_SUFFIX="%{server_suffix}" + -DWSREP_VERSION="%{wsrep_version}" \ + -DWSREP_REVISION="%{wsrep_revision}" echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG make ${MAKE_JFLAG} VERBOSE=1 ) @@ -634,21 +571,17 @@ install -m 755 $MBD/release/support-files/mysql.server $RBR%{_sysconfdir}/init.d # will appreciate that, as all services usually offer this. ln -sf %{_sysconfdir}/init.d/mysql $RBR%{_sbindir}/rcmysql -%if %{defined with_wsrep} # Create a wsrep_sst_rsync_wan symlink. install -d $RBR%{_bindir} ln -sf wsrep_sst_rsync $RBR%{_bindir}/wsrep_sst_rsync_wan -%endif # Touch the place where the my.cnf config file might be located # Just to make sure it's in the file list and marked as a config file touch $RBR%{_sysconfdir}/my.cnf -%if %{defined with_wsrep} touch $RBR%{_sysconfdir}/wsrep.cnf -%endif # Install SELinux files in datadir -install -m 600 $MBD/%{src_dir}/support-files/RHEL4-SElinux/mysql.{fc,te} \ +install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \ $RBR%{_datadir}/mysql/SELinux/RHEL4 %if %{WITH_TCMALLOC} @@ -667,7 +600,7 @@ install -m 644 "%{malloc_lib_source}" \ # Post processing actions, i.e. when installed ############################################################################## -%pre -n MySQL-server%{product_suffix} +%pre -n mysql-wsrep-server%{product_suffix} # This is the code running at the beginning of a RPM upgrade action, # before replacing the old files with the new ones. @@ -802,18 +735,18 @@ NEW_VERSION=%{mysql_version}-%{release} # The "pre" section code is also run on a first installation, # when there is no data directory yet. Protect against error messages. if [ -d $mysql_datadir ] ; then - echo "MySQL RPM upgrade to version $NEW_VERSION" > $STATUS_FILE - echo "'pre' step running at `date`" >> $STATUS_FILE - echo >> $STATUS_FILE - fcount=`ls -ltr $mysql_datadir/*.err 2>/dev/null | wc -l` + echo "MySQL RPM upgrade to version $NEW_VERSION" > $STATUS_FILE + echo "'pre' step running at `date`" >> $STATUS_FILE + echo >> $STATUS_FILE + fcount=`ls -ltr $mysql_datadir/*.err 2>/dev/null | wc -l` if [ $fcount -gt 0 ] ; then - echo "ERR file(s):" >> $STATUS_FILE - ls -ltr $mysql_datadir/*.err >> $STATUS_FILE - echo >> $STATUS_FILE - echo "Latest 'Version' line in latest file:" >> $STATUS_FILE - grep '^Version' `ls -tr $mysql_datadir/*.err | tail -1` | \ - tail -1 >> $STATUS_FILE - echo >> $STATUS_FILE + echo "ERR file(s):" >> $STATUS_FILE + ls -ltr $mysql_datadir/*.err >> $STATUS_FILE + echo >> $STATUS_FILE + echo "Latest 'Version' line in latest file:" >> $STATUS_FILE + grep '^Version' `ls -tr $mysql_datadir/*.err | tail -1` | \ + tail -1 >> $STATUS_FILE + echo >> $STATUS_FILE fi if [ -n "$SERVER_TO_START" ] ; then @@ -843,7 +776,7 @@ if [ -x %{_sysconfdir}/init.d/mysql ] ; then sleep 5 fi -%post -n MySQL-server%{product_suffix} +%post -n mysql-wsrep-server%{product_suffix} # This is the code running at the end of a RPM install or upgrade action, # after the (new) files have been written. @@ -997,7 +930,7 @@ mv -f $STATUS_FILE ${STATUS_FILE}-LAST # for "triggerpostun" #scheduled service packs and more. Visit www.mysql.com/enterprise for more #information." -%preun -n MySQL-server%{product_suffix} +%preun -n mysql-wsrep-server%{product_suffix} # Which '$1' does this refer to? Fedora docs have info: # " ... a count of the number of versions of the package that are installed. @@ -1026,7 +959,7 @@ fi # We do not remove the mysql user since it may still own a lot of # database files. -%triggerpostun -n MySQL-server%{product_suffix} --MySQL-server-community +%triggerpostun -n mysql-wsrep-server%{product_suffix} --MySQL-server-community # Setup: We renamed this package, so any existing "server-community" # package will be removed when this "server" is installed. @@ -1097,21 +1030,23 @@ echo "=====" >> $STATUS_HISTORY # Files section ############################################################################## -%files -n MySQL-server%{product_suffix} -f release/support-files/plugins.files +%files -n mysql-wsrep%{product_suffix} +# Intentionally empty - this is a pure meta package. + +# ---------------------------------------------------------------------------- +%files -n mysql-wsrep-server%{product_suffix} -f release/support-files/plugins.files %defattr(-,root,root,0755) %if %{defined license_files_server} %doc %{license_files_server} %endif -%doc %{src_dir}/Docs/ChangeLog -%doc %{src_dir}/Docs/INFO_SRC* +%doc Docs/ChangeLog +%doc release/Docs/INFO_SRC* %doc release/Docs/INFO_BIN* %doc release/support-files/my-*.cnf -%if %{defined with_wsrep} -%doc %{src_dir}/Docs/README-wsrep +%doc Docs/README-wsrep %doc release/support-files/wsrep.cnf %doc release/support-files/wsrep_notify -%endif %if 0%{?commercial} %doc %attr(644, root, root) %{_infodir}/mysql.info* @@ -1147,9 +1082,7 @@ echo "=====" >> $STATUS_HISTORY %doc %attr(644, root, man) %{_mandir}/man1/resolveip.1* %ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf -%if %{defined with_wsrep} %ghost %config(noreplace,missingok) %{_sysconfdir}/wsrep.cnf -%endif %dir %{_sysconfdir}/my.cnf.d %attr(755, root, root) %{_bindir}/innochecksum @@ -1177,14 +1110,12 @@ echo "=====" >> $STATUS_HISTORY %attr(755, root, root) %{_bindir}/replace %attr(755, root, root) %{_bindir}/resolve_stack_dump %attr(755, root, root) %{_bindir}/resolveip -%if %{defined with_wsrep} %attr(755, root, root) %{_bindir}/wsrep_sst_common %attr(755, root, root) %{_bindir}/wsrep_sst_mysqldump %attr(755, root, root) %{_bindir}/wsrep_sst_rsync %attr(755, root, root) %{_bindir}/wsrep_sst_rsync_wan %attr(755, root, root) %{_bindir}/wsrep_sst_xtrabackup %attr(755, root, root) %{_bindir}/wsrep_sst_xtrabackup-v2 -%endif %attr(755, root, root) %{_sbindir}/mysqld %attr(755, root, root) %{_sbindir}/mysqld-debug @@ -1197,11 +1128,10 @@ echo "=====" >> $STATUS_HISTORY %attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql %attr(755, root, root) %{_sysconfdir}/init.d/mysql - %attr(755, root, root) %{_datadir}/mysql/ # ---------------------------------------------------------------------------- -%files -n MySQL-client%{product_suffix} +%files -n mysql-wsrep-client%{product_suffix} %defattr(-, root, root, 0755) %attr(755, root, root) %{_bindir}/msql2mysql @@ -1233,7 +1163,7 @@ echo "=====" >> $STATUS_HISTORY %doc %attr(644, root, man) %{_mandir}/man1/mysqlslap.1* # ---------------------------------------------------------------------------- -%files -n MySQL-devel%{product_suffix} -f optional-files-devel +%files -n mysql-wsrep-devel%{product_suffix} -f optional-files-devel %defattr(-, root, root, 0755) %doc %attr(644, root, man) %{_mandir}/man1/comp_err.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql_config.1* @@ -1247,47 +1177,52 @@ echo "=====" >> $STATUS_HISTORY %{_libdir}/mysql/libmysqlservices.a # ---------------------------------------------------------------------------- -%files -n MySQL-shared%{product_suffix} +%files -n mysql-wsrep-shared%{product_suffix} %defattr(-, root, root, 0755) # Shared libraries (omit for architectures that don't support them) %{_libdir}/libmysql*.so* -%post -n MySQL-shared%{product_suffix} +%post -n mysql-wsrep-shared%{product_suffix} /sbin/ldconfig -%postun -n MySQL-shared%{product_suffix} +%postun -n mysql-wsrep-shared%{product_suffix} /sbin/ldconfig # ---------------------------------------------------------------------------- -%files -n MySQL-test%{product_suffix} +%files -n mysql-wsrep-test%{product_suffix} %defattr(-, root, root, 0755) %attr(-, root, root) %{_datadir}/mysql-test %attr(755, root, root) %{_bindir}/mysql_client_test -%if %{undefined with_wsrep} -%attr(755, root, root) %{_bindir}/mysql_client_test_embedded -%attr(755, root, root) %{_bindir}/mysqltest_embedded -%endif %doc %attr(644, root, man) %{_mandir}/man1/mysql_client_test.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql-stress-test.pl.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql-test-run.pl.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql_client_test_embedded.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqltest_embedded.1* -# ---------------------------------------------------------------------------- -%if %{undefined with_wsrep} -%files -n MySQL-embedded%{product_suffix} -%defattr(-, root, root, 0755) -%attr(755, root, root) %{_bindir}/mysql_embedded -%attr(644, root, root) %{_libdir}/mysql/libmysqld.a -%attr(644, root, root) %{_libdir}/mysql/libmysqld-debug.a -%endif - ############################################################################## # The spec file changelog only includes changes made to the spec file # itself - note that they must be ordered by date (important when # merging BK trees) ############################################################################## %changelog +* Sat Feb 7 2015 Teemu Ollakka +- Merged OBS changes from 5.6 branch + +* Thu Jan 29 2015 Joerg Bruehe +- Add a meta-package "mysql-wsrep" that requires both "server" and "client". +- Fix the fall-back definition of "dist", it must start with a period. + +* Mon Jan 26 2015 Joerg Bruehe +- Allow "rpmlint", but suppress "post-build-checks" (fail on SuSE 12 + 13). +- Improve handling of undefined "%%{dist}". +- Fix wrong changelog dates, to get rid of warnings about "bogus date". +- Escape percent signs in changelog, to get rid of "rpmlint" warnings. + +* Tue Jan 20 2015 Teemu Ollakka + +- Reworked to build wsrep patched packages exclusively +- OBS compatible + * Wed Jul 02 2014 Bjorn Munch - Disable dtrace unconditionally, breaks after we install Oracle dtrace @@ -1295,7 +1230,7 @@ echo "=====" >> $STATUS_HISTORY - Removed non gpl file docs/mysql.info from community packages * Mon Sep 09 2013 Balasubramanian Kandasamy -- Updated logic to get the correct count of PID files +- Updated logic to get the correct count of PID files * Fri Aug 16 2013 Balasubramanian Kandasamy - Added provides lowercase mysql tags @@ -1314,16 +1249,12 @@ echo "=====" >> $STATUS_HISTORY * Mon Jun 11 2012 Joerg Bruehe - Make sure newly added "SPECIFIC-ULN/" directory does not disturb packaging. - -* Wed Dec 07 2011 Alexey Yurchenko - -- wsrep-related cleanups. * Wed Sep 28 2011 Joerg Bruehe - Fix duplicate mentioning of "mysql_plugin" and its manual page, it is better to keep alphabetic order in the files list (merging!). - + * Wed Sep 14 2011 Joerg Bruehe - Let the RPM capabilities ("obsoletes" etc) ensure that an upgrade may replace @@ -1371,12 +1302,13 @@ echo "=====" >> $STATUS_HISTORY - Fix bug#12561297: Added the MySQL embedded binary * Thu Jul 07 2011 Joerg Bruehe + - Fix bug#45415: "rpm upgrade recreates test database" Let the creation of the "test" database happen only during a new installation, not in an RPM upgrade. This affects both the "mkdir" and the call of "mysql_install_db". -* Wed Feb 09 2011 Joerg Bruehe +* Thu Feb 10 2011 Joerg Bruehe - Fix bug#56581: If an installation deviates from the default file locations ("datadir" and "pid-file"), the mechanism to detect a running server (on upgrade) @@ -1497,7 +1429,7 @@ echo "=====" >> $STATUS_HISTORY - Fix some problems with the directives around "tcmalloc" (experimental), remove erroneous traces of the InnoDB plugin (that is 5.1 only). -* Tue Oct 06 2009 Magnus Blaudd +* Fri Oct 09 2009 Magnus Blaudd - Removed mysql_fix_privilege_tables @@ -1694,7 +1626,7 @@ echo "=====" >> $STATUS_HISTORY - Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS -* Tue Mar 07 2006 Kent Boortz +* Wed Mar 08 2006 Kent Boortz - Changed product name from "Community Edition" to "Community Server" @@ -1789,7 +1721,7 @@ echo "=====" >> $STATUS_HISTORY * Thu Sep 29 2005 Lenz Grimmer -- fixed the removing of the RPM_BUILD_ROOT in the %clean section (the +- fixed the removing of the RPM_BUILD_ROOT in the %%clean section (the $RBR variable did not get expanded, thus leaving old build roots behind) * Thu Aug 04 2005 Lenz Grimmer @@ -1942,7 +1874,7 @@ echo "=====" >> $STATUS_HISTORY - marked /etc/logrotate.d/mysql as a config file (BUG 2156) -* Sat Dec 13 2003 Lenz Grimmer +* Fri Dec 12 2003 Lenz Grimmer - fixed file permissions (BUG 1672) @@ -2084,7 +2016,7 @@ echo "=====" >> $STATUS_HISTORY - Added separate libmysql_r directory; now both a threaded and non-threaded library is shipped. -* Tue Sep 28 1999 David Axmark +* Wed Sep 29 1999 David Axmark - Added the support-files/my-example.cnf to the docs directory. From 21c4ca34acec9affdd0b4f2b7b901df5ec8e7376 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Tue, 10 Feb 2015 18:27:21 +0200 Subject: [PATCH 013/305] refs codership/mysql-wsrep#60 explicit braces around empty body --- sql/wsrep_var.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index b58df860fbdc..12bce1769d4a 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -579,7 +579,9 @@ static void export_wsrep_status_to_mysql(THD* thd) for (wsrep_status_len = 0; thd->wsrep_status_vars[wsrep_status_len].name != NULL; - wsrep_status_len++); + wsrep_status_len++) { + /* */ + } #if DYNAMIC if (wsrep_status_len != mysql_status_len) { From 4a789b3e39ae8ee39cae782f5f6d9364f9304aad Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Wed, 11 Feb 2015 13:04:59 +0200 Subject: [PATCH 014/305] codership/mysql-wsrep#65 fixed binary tarball package name --- cmake/package_name.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/package_name.cmake b/cmake/package_name.cmake index 9511645ea9ce..ab9142f39729 100644 --- a/cmake/package_name.cmake +++ b/cmake/package_name.cmake @@ -134,7 +134,7 @@ IF(NOT VERSION) IF(NOT WSREP_VERSION) MESSAGE(FATAL_ERROR "Variable WSREP_VERSION must be set") ENDIF() - SET(package_name "mysql${PRODUCT_TAG}-${VERSION}_wsrep_${WSREP_VERSION}-${SYSTEM_NAME_AND_PROCESSOR}") + SET(package_name "mysql-wsrep${PRODUCT_TAG}-${VERSION}-${WSREP_VERSION}-${SYSTEM_NAME_AND_PROCESSOR}") ELSE() SET(package_name "mysql${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}") ENDIF() From ad4959e4467689c22fe148e423975984f557c106 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Thu, 12 Feb 2015 18:01:58 +0200 Subject: [PATCH 015/305] codership/mysql-wsrep#45 use getifaddr() for address autoguessing * Ported patches: http://bazaar.launchpad.net/~maria-captains/maria/maria-10.0-galera/revision http://bazaar.launchpad.net/~maria-captains/maria/maria-10.0-galera/revision * Changed loopback detection to be done via ifa->ifa_flags * Removed unused function wsrep_guess_address() Conflicts: sql/wsrep_utils.cc --- cmake/os/WindowsCache.cmake | 1 + config.h.cmake | 1 + configure.cmake | 1 + sql/wsrep_utils.cc | 86 ++++++++++++++----------------------- sql/wsrep_utils.h | 1 - 5 files changed, 35 insertions(+), 55 deletions(-) diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake index bbed14556b92..32e4f78aed41 100644 --- a/cmake/os/WindowsCache.cmake +++ b/cmake/os/WindowsCache.cmake @@ -74,6 +74,7 @@ SET(HAVE_FSYNC CACHE INTERNAL "") SET(HAVE_FTIME 1 CACHE INTERNAL "") SET(HAVE_FTRUNCATE CACHE INTERNAL "") SET(HAVE_GETADDRINFO 1 CACHE INTERNAL "") +SET(HAVE_GETIFADDRS CACHE INTERNAL "") SET(HAVE_GETCWD 1 CACHE INTERNAL "") SET(HAVE_GETHOSTBYADDR_R CACHE INTERNAL "") SET(HAVE_GETHRTIME CACHE INTERNAL "") diff --git a/config.h.cmake b/config.h.cmake index 8c93da072fb2..a66ab5e2caed 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -156,6 +156,7 @@ #cmakedefine HAVE_FSYNC 1 #cmakedefine HAVE_FTIME 1 #cmakedefine HAVE_GETADDRINFO 1 +#cmakedefine HAVE_GETIFADDRS 1 #cmakedefine HAVE_GETCWD 1 #cmakedefine HAVE_GETHOSTBYADDR_R 1 #cmakedefine HAVE_GETHRTIME 1 diff --git a/configure.cmake b/configure.cmake index 28974a84c49c..003c442c15fb 100644 --- a/configure.cmake +++ b/configure.cmake @@ -355,6 +355,7 @@ CHECK_FUNCTION_EXISTS (getpassphrase HAVE_GETPASSPHRASE) CHECK_FUNCTION_EXISTS (getpwnam HAVE_GETPWNAM) CHECK_FUNCTION_EXISTS (getpwuid HAVE_GETPWUID) CHECK_FUNCTION_EXISTS (getrlimit HAVE_GETRLIMIT) +CHECK_FUNCTION_EXISTS (getifaddrs HAVE_GETIFADDRS) CHECK_FUNCTION_EXISTS (getrusage HAVE_GETRUSAGE) CHECK_FUNCTION_EXISTS (getwd HAVE_GETWD) CHECK_FUNCTION_EXISTS (gmtime_r HAVE_GMTIME_R) diff --git a/sql/wsrep_utils.cc b/sql/wsrep_utils.cc index 1108c82a684e..8aab305b89dc 100644 --- a/sql/wsrep_utils.cc +++ b/sql/wsrep_utils.cc @@ -34,6 +34,11 @@ #include #include // getaddrinfo() +#ifdef HAVE_GETIFADDRS +#include +#include +#endif // HAVE_GETIFADDRS + extern char** environ; // environment variables static wsp::string wsrep_PATH; @@ -396,7 +401,7 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len) { size_t ip_len = 0; - if (my_bind_addr_str && strlen(my_bind_addr_str)) + if (my_bind_addr_str && my_bind_addr_str[0] != '\0') { unsigned int const ip_type= wsrep_check_ip(my_bind_addr_str); @@ -405,7 +410,7 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len) return 0; } - if (INADDR_ANY != ip_type) {; + if (INADDR_ANY != ip_type) { strncpy (buf, my_bind_addr_str, buf_len); return strlen(buf); } @@ -430,65 +435,38 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len) return ip_len; } - // try to find the address of the first one -#if (TARGET_OS_LINUX == 1) - const char cmd[] = "ip addr show | grep -E '^\\s*inet' | grep -m1 global |" - " awk '{ print $2 }' | sed 's/\\/.*//'"; -#elif defined(__sun__) - const char cmd[] = "/sbin/ifconfig -a | " - "/usr/gnu/bin/grep -m1 -1 -E 'net[0-9]:' | tail -n 1 | awk '{ print $2 }'"; -#elif defined(__APPLE__) || defined(__FreeBSD__) - const char cmd[] = "/sbin/route -nv get 8.8.8.8 | tail -n1 | awk '{print $(NF)}'"; -#else - char *cmd; -#error "OS not supported" -#endif - wsp::process proc (cmd, "r"); - - if (NULL != proc.pipe()) { - char* ret; - ret = fgets (buf, buf_len, proc.pipe()); - - if (proc.wait()) return 0; +// +// getifaddrs() is avaiable at least on Linux since glib 2.3, FreeBSD +// MAC OS X, opensolaris, Solaris. +// +// On platforms which do not support getifaddrs() this function returns +// a failure and user is prompted to do manual configuration. +// +#if HAVE_GETIFADDRS + struct ifaddrs *ifaddr, *ifa; + if (getifaddrs(&ifaddr) == 0) + { + for (ifa= ifaddr; ifa != NULL; ifa = ifa->ifa_next) + { + if (!ifa->ifa_addr || ifa->ifa_addr->sa_family != AF_INET) // TODO AF_INET6 + continue; - if (NULL == ret) { - WSREP_ERROR("Failed to read output of: '%s'", cmd); - return 0; - } - } - else { - WSREP_ERROR("Failed to execute: '%s'", cmd); - return 0; - } + // Skip loopback interfaces (like lo:127.0.0.1) + if (ifa->ifa_flags & IFF_LOOPBACK) + continue; - // clear possible \n at the end of ip string left by fgets() - ip_len = strlen (buf); - if (ip_len > 0 && '\n' == buf[ip_len - 1]) { - ip_len--; - buf[ip_len] = '\0'; - } + if (vio_getnameinfo(ifa->ifa_addr, buf, buf_len, NULL, 0, NI_NUMERICHOST)) + continue; - if (INADDR_NONE == inet_addr(buf)) { - if (strlen(buf) != 0) { - WSREP_WARN("Shell command returned invalid address: '%s'", buf); + freeifaddrs(ifaddr); + return strlen(buf); } - return 0; - } - - return ip_len; -} - -size_t wsrep_guess_address(char* buf, size_t buf_len) -{ - size_t addr_len = wsrep_guess_ip (buf, buf_len); - - if (addr_len && addr_len < buf_len) { - addr_len += snprintf (buf + addr_len, buf_len - addr_len, - ":%u", mysqld_port); + freeifaddrs(ifaddr); } +#endif // HAVE_GETIFADDRS - return addr_len; + return 0; } /* diff --git a/sql/wsrep_utils.h b/sql/wsrep_utils.h index 337678238f82..dfb68bcd1b7c 100644 --- a/sql/wsrep_utils.h +++ b/sql/wsrep_utils.h @@ -20,7 +20,6 @@ unsigned int wsrep_check_ip (const char* addr); size_t wsrep_guess_ip (char* buf, size_t buf_len); -size_t wsrep_guess_address(char* buf, size_t buf_len); namespace wsp { class node_status From 1d560ec519f09d04089c3a92401ebc5bba889e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Thu, 19 Feb 2015 21:32:20 +0200 Subject: [PATCH 016/305] Imported 5.6/debian from MySQL 5.5.41-0ubuntu0.12.04.1. Removed stupid and dangerous gitignores. --- .gitignore | 2 - debian/README.Maintainer | 114 + debian/additions/Docs__Images__Makefile.in | 6 + debian/additions/Docs__Makefile.in | 6 + debian/additions/debian-start | 32 + debian/additions/debian-start.inc.sh | 72 + debian/additions/echo_stderr | 2 + debian/additions/innotop/changelog.innotop | 357 + debian/additions/innotop/innotop | 10946 ++++++++++++++++ debian/additions/innotop/innotop.1 | 2084 +++ debian/additions/msql2mysql.1 | 16 + debian/additions/my.cnf | 127 + debian/additions/my_print_defaults.1 | 16 + debian/additions/myisam_ftdump.1 | 16 + debian/additions/myisamchk.1 | 17 + debian/additions/myisamlog.1 | 16 + debian/additions/myisampack.1 | 19 + .../additions/mysql-server.lintian-overrides | 2 + debian/additions/mysql_config.1 | 17 + debian/additions/mysql_convert_table_format.1 | 17 + debian/additions/mysql_find_rows.1 | 18 + debian/additions/mysql_fix_extensions.1 | 18 + debian/additions/mysql_install_db.1 | 16 + debian/additions/mysql_secure_installation.1 | 17 + debian/additions/mysql_setpermission.1 | 23 + debian/additions/mysql_tableinfo.1 | 322 + debian/additions/mysql_waitpid.1 | 20 + debian/additions/mysqlbinlog.1 | 17 + debian/additions/mysqlbug.1 | 14 + debian/additions/mysqlcheck.1 | 28 + debian/additions/mysqld_safe_syslog.cnf | 2 + debian/additions/mysqldumpslow.1 | 50 + debian/additions/mysqlimport.1 | 20 + debian/additions/mysqlreport | 1298 ++ debian/additions/mysqlreport.1 | 180 + debian/additions/mysqltest.1 | 16 + debian/additions/pack_isam.1 | 19 + debian/additions/resolve_stack_dump.1 | 16 + debian/additions/resolveip.1 | 16 + debian/apparmor-profile | 45 + debian/changelog | 5 + debian/compat | 1 + debian/control | 198 + debian/copyright | 767 ++ debian/libmysqlclient-dev.README.Maintainer | 4 + debian/libmysqlclient-dev.dirs | 2 + debian/libmysqlclient-dev.examples | 1 + debian/libmysqlclient-dev.files | 11 + debian/libmysqlclient16.postinst | 12 + debian/libmysqlclient18.dirs | 1 + debian/libmysqlclient18.files | 2 + debian/libmysqld-5.5-pic.README.Debian | 5 + debian/libmysqld-5.5-pic.files | 2 + debian/libmysqld-dev.files | 2 + debian/libmysqld-pic.README.Debian | 5 + debian/libmysqld-pic.files | 2 + debian/mysql-client-5.5.README.Debian | 4 + debian/mysql-client-5.5.dirs | 3 + debian/mysql-client-5.5.docs | 2 + debian/mysql-client-5.5.files | 36 + debian/mysql-client-5.5.links | 6 + debian/mysql-client-5.5.lintian-overrides | 5 + debian/mysql-client-core-5.5.files | 4 + debian/mysql-common.dirs | 1 + debian/mysql-common.files | 1 + debian/mysql-common.lintian-overrides | 2 + debian/mysql-common.postrm | 7 + debian/mysql-server-5.5.NEWS | 34 + debian/mysql-server-5.5.README.Debian | 109 + debian/mysql-server-5.5.config | 46 + debian/mysql-server-5.5.dirs | 6 + debian/mysql-server-5.5.files | 59 + debian/mysql-server-5.5.lintian-overrides | 5 + .../mysql-server-5.5.logcheck.ignore.paranoid | 9 + .../mysql-server-5.5.logcheck.ignore.server | 32 + ...sql-server-5.5.logcheck.ignore.workstation | 32 + .../mysql-server-5.5.mysql-server.logrotate | 27 + debian/mysql-server-5.5.mysql.init | 187 + debian/mysql-server-5.5.mysql.upstart | 65 + debian/mysql-server-5.5.postinst | 282 + debian/mysql-server-5.5.postrm | 83 + debian/mysql-server-5.5.preinst | 183 + debian/mysql-server-5.5.prerm | 8 + debian/mysql-server-5.5.py | 58 + debian/mysql-server-5.5.templates | 89 + debian/mysql-server-core-5.5.dirs | 2 + debian/mysql-server-core-5.5.files | 61 + debian/mysql-source-5.5.files | 1 + debian/mysql-testsuite-5.5.dirs | 1 + debian/mysql-testsuite-5.5.files | 1 + ..._mysql_create_system_tables__no_test.patch | 22 + .../38_scripts__mysqld_safe.sh__signals.patch | 40 + ...cripts__mysql_install_db.sh__no_test.patch | 16 + debian/patches/50_mysql-test__db_test.patch | 17 + debian/patches/62_disable_tests.patch | 10 + debian/patches/70_mysql_va_list.patch | 54 + debian/patches/71_disable_rpl_tests.patch | 18 + debian/patches/72_fix_standalone_tests.patch | 19 + .../73_fix_rpl_deadlock_innodb_test.patch | 19 + .../link-clientprograms-dynamically.patch | 86 + debian/patches/series | 9 + debian/po/POTFILES.in | 1 + debian/po/ar.po | 252 + debian/po/ca.po | 227 + debian/po/cs.po | 346 + debian/po/da.po | 382 + debian/po/de.po | 239 + debian/po/es.po | 390 + debian/po/eu.po | 236 + debian/po/fr.po | 251 + debian/po/gl.po | 249 + debian/po/it.po | 223 + debian/po/ja.po | 229 + debian/po/nb.po | 297 + debian/po/nl.po | 290 + debian/po/pt.po | 307 + debian/po/pt_BR.po | 443 + debian/po/ro.po | 319 + debian/po/ru.po | 229 + debian/po/sk.po | 219 + debian/po/sv.po | 229 + debian/po/templates.pot | 187 + debian/po/tr.po | 342 + debian/rules | 352 + debian/source/format | 1 + debian/watch | 3 + 126 files changed, 25061 insertions(+), 2 deletions(-) create mode 100644 debian/README.Maintainer create mode 100644 debian/additions/Docs__Images__Makefile.in create mode 100644 debian/additions/Docs__Makefile.in create mode 100644 debian/additions/debian-start create mode 100644 debian/additions/debian-start.inc.sh create mode 100644 debian/additions/echo_stderr create mode 100644 debian/additions/innotop/changelog.innotop create mode 100644 debian/additions/innotop/innotop create mode 100644 debian/additions/innotop/innotop.1 create mode 100644 debian/additions/msql2mysql.1 create mode 100644 debian/additions/my.cnf create mode 100644 debian/additions/my_print_defaults.1 create mode 100644 debian/additions/myisam_ftdump.1 create mode 100644 debian/additions/myisamchk.1 create mode 100644 debian/additions/myisamlog.1 create mode 100644 debian/additions/myisampack.1 create mode 100644 debian/additions/mysql-server.lintian-overrides create mode 100644 debian/additions/mysql_config.1 create mode 100644 debian/additions/mysql_convert_table_format.1 create mode 100644 debian/additions/mysql_find_rows.1 create mode 100644 debian/additions/mysql_fix_extensions.1 create mode 100644 debian/additions/mysql_install_db.1 create mode 100644 debian/additions/mysql_secure_installation.1 create mode 100644 debian/additions/mysql_setpermission.1 create mode 100644 debian/additions/mysql_tableinfo.1 create mode 100644 debian/additions/mysql_waitpid.1 create mode 100644 debian/additions/mysqlbinlog.1 create mode 100644 debian/additions/mysqlbug.1 create mode 100644 debian/additions/mysqlcheck.1 create mode 100644 debian/additions/mysqld_safe_syslog.cnf create mode 100644 debian/additions/mysqldumpslow.1 create mode 100644 debian/additions/mysqlimport.1 create mode 100644 debian/additions/mysqlreport create mode 100644 debian/additions/mysqlreport.1 create mode 100644 debian/additions/mysqltest.1 create mode 100644 debian/additions/pack_isam.1 create mode 100644 debian/additions/resolve_stack_dump.1 create mode 100644 debian/additions/resolveip.1 create mode 100644 debian/apparmor-profile create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/libmysqlclient-dev.README.Maintainer create mode 100644 debian/libmysqlclient-dev.dirs create mode 100644 debian/libmysqlclient-dev.examples create mode 100644 debian/libmysqlclient-dev.files create mode 100644 debian/libmysqlclient16.postinst create mode 100644 debian/libmysqlclient18.dirs create mode 100644 debian/libmysqlclient18.files create mode 100644 debian/libmysqld-5.5-pic.README.Debian create mode 100644 debian/libmysqld-5.5-pic.files create mode 100644 debian/libmysqld-dev.files create mode 100644 debian/libmysqld-pic.README.Debian create mode 100644 debian/libmysqld-pic.files create mode 100644 debian/mysql-client-5.5.README.Debian create mode 100644 debian/mysql-client-5.5.dirs create mode 100644 debian/mysql-client-5.5.docs create mode 100644 debian/mysql-client-5.5.files create mode 100644 debian/mysql-client-5.5.links create mode 100644 debian/mysql-client-5.5.lintian-overrides create mode 100644 debian/mysql-client-core-5.5.files create mode 100644 debian/mysql-common.dirs create mode 100644 debian/mysql-common.files create mode 100644 debian/mysql-common.lintian-overrides create mode 100644 debian/mysql-common.postrm create mode 100644 debian/mysql-server-5.5.NEWS create mode 100644 debian/mysql-server-5.5.README.Debian create mode 100644 debian/mysql-server-5.5.config create mode 100644 debian/mysql-server-5.5.dirs create mode 100644 debian/mysql-server-5.5.files create mode 100644 debian/mysql-server-5.5.lintian-overrides create mode 100644 debian/mysql-server-5.5.logcheck.ignore.paranoid create mode 100644 debian/mysql-server-5.5.logcheck.ignore.server create mode 100644 debian/mysql-server-5.5.logcheck.ignore.workstation create mode 100644 debian/mysql-server-5.5.mysql-server.logrotate create mode 100644 debian/mysql-server-5.5.mysql.init create mode 100644 debian/mysql-server-5.5.mysql.upstart create mode 100644 debian/mysql-server-5.5.postinst create mode 100644 debian/mysql-server-5.5.postrm create mode 100644 debian/mysql-server-5.5.preinst create mode 100644 debian/mysql-server-5.5.prerm create mode 100644 debian/mysql-server-5.5.py create mode 100644 debian/mysql-server-5.5.templates create mode 100644 debian/mysql-server-core-5.5.dirs create mode 100644 debian/mysql-server-core-5.5.files create mode 100644 debian/mysql-source-5.5.files create mode 100644 debian/mysql-testsuite-5.5.dirs create mode 100644 debian/mysql-testsuite-5.5.files create mode 100644 debian/patches/33_scripts__mysql_create_system_tables__no_test.patch create mode 100644 debian/patches/38_scripts__mysqld_safe.sh__signals.patch create mode 100644 debian/patches/41_scripts__mysql_install_db.sh__no_test.patch create mode 100644 debian/patches/50_mysql-test__db_test.patch create mode 100644 debian/patches/62_disable_tests.patch create mode 100644 debian/patches/70_mysql_va_list.patch create mode 100644 debian/patches/71_disable_rpl_tests.patch create mode 100644 debian/patches/72_fix_standalone_tests.patch create mode 100644 debian/patches/73_fix_rpl_deadlock_innodb_test.patch create mode 100644 debian/patches/link-clientprograms-dynamically.patch create mode 100644 debian/patches/series create mode 100644 debian/po/POTFILES.in create mode 100644 debian/po/ar.po create mode 100644 debian/po/ca.po create mode 100644 debian/po/cs.po create mode 100644 debian/po/da.po create mode 100644 debian/po/de.po create mode 100644 debian/po/es.po create mode 100644 debian/po/eu.po create mode 100644 debian/po/fr.po create mode 100644 debian/po/gl.po create mode 100644 debian/po/it.po create mode 100644 debian/po/ja.po create mode 100644 debian/po/nb.po create mode 100644 debian/po/nl.po create mode 100644 debian/po/pt.po create mode 100644 debian/po/pt_BR.po create mode 100644 debian/po/ro.po create mode 100644 debian/po/ru.po create mode 100644 debian/po/sk.po create mode 100644 debian/po/sv.po create mode 100644 debian/po/templates.pot create mode 100644 debian/po/tr.po create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/.gitignore b/.gitignore index 03c97b42e1cd..b62a1ab4c123 100644 --- a/.gitignore +++ b/.gitignore @@ -519,8 +519,6 @@ dbug/main.r dbug/output*.r dbug/user.ps dbug/user.t -debian/control -debian/defs.mk depcomp emacs.h examples/*.ds? diff --git a/debian/README.Maintainer b/debian/README.Maintainer new file mode 100644 index 000000000000..b1e0a602781a --- /dev/null +++ b/debian/README.Maintainer @@ -0,0 +1,114 @@ + +########################### +## FIXME for 5.1 ## +########################### + +* put this trigger-recreation thing into the init scripts -- what?! + +########################################################################### +# Here are some information that are only of interest for the current and # +# following Debian maintainers of MySQL. # +########################################################################### + +The debian/ directory is under SVN control, see debian/control for URL. + +# +# Preparing a new version +# +The new orig.tar.gz (without non-free documentation) is created in /tmp/ when +running this command: + +debian/rules get-orig-source + +# +# mysqlreport +# +The authors e-mail address is . + +# +# Remarks to dependencies +# +libwrap0-dev (>= 7.6-8.3) + According to bug report 114582 where where build problems on + IA-64/sid with at least two prior versions. +psmisc + /usr/bin/killall in the initscript + +zlib1g in libmysqlclient-dev: + "mysql_config --libs" ads "-lz" + +Build-Dep: + +debhelper (>=4.1.16): + See po-debconf(7). + +autoconf (>= 2.13-20), automake1.7 + Try to get rid of them. + +doxygen, tetex-bin, tetex-extra, gs + for ndb/docs/*tex + +# +# Remarks to the start scripts +# + +## initscripts rely on mysqladmin from a different package +We have the problem that "/etc/init.d/mysql stop" relies on mysqladmin which +is in another package (mysql-client) and a passwordless access that's maybe +only available if the user configured his /root/.my.cnf. Can this be a problem? +* normal mode: not because the user is required to have it. Else: +* purge/remove: not, same as normal mode +* upgrade: not, same as normal mode +* first install: not, it depends on mysql-client which at least is unpacked + so mysqladmin is there (to ping). It is not yet configured + passwordles but if there's a server running then there's a + /root/.my.cnf. Anyways, we simply kill anything that's mysqld. + +## Passwordless access for the maintainer scripts +Another issue is that the scripts needs passwordless access. To ensure this +a debian-sys-maint user is configured which has process and shutdown privs. +The file with the randomly (that's important!) generated password must be +present as long as the databases remain installed because else a new install +would have no access. This file should be used like: + mysqladmin --defaults-file=/etc/mysql/debian.cnf restart +to avoid providing the password in plaintext on a commandline where it would +be visible to any user via the "ps" command. + +## When to start the daemon? +We aim to give the admin full control on when MySQL is running. +Issues to be faced here: +OLD: + 1. Debconf asks whether MySQL should be started on boot so update-rc.d is + only run if the answer has been yes. The admin is likely to forget + this decision but update-rc.d checks for an existing line in + /etc/runlevel.conf and leaves it intact. + 2. On initial install, if the answer is yes, the daemon has to be started. + 3. On upgrades it should only be started if it was already running, everything + else is confusing. Especiall relying on an debconf decision made month ago + is considered suboptimal. See bug #274264 + Implementation so far: + prerm (called on upgrade before stopping the server): + check for a running server and set flag if necessary + preinst (called on initial install and before unpacking when upgrading): + check for the debconf variable and set flag if necessary + postinst (called on initial install and after each upgrade after unpacking): + call update-rc.d if debconf says yes + call invoce-rc.d if the flag has been set + Problems remaining: + dpkg-reconfigure and setting mysql start on boot to yes did not start mysql + (ok "start on boot" literally does not mean "start now" so that might have been ok) +NEW: + 1. --- no debconf anymore for the sake of simplicity. We have runlevel.conf, + the admin should use it + 2. On initial install the server is started. + 3. On upgrades the server is started exactly if it was running before so the + runlevel configuration is irrelevant. It will be preserved by the mean of + update-rc.d's builtin check. + Implementation: + prerm (called on upgrade before stopping the server): + check for a running server and set flag if necessary + preinst (called on initial install and before unpacking when upgrading): + check for $1 beeing (initial) "install" and set flag + postinst (called on initial install and after each upgrade after unpacking): + call update-rc.d + call invoce-rc.d if the flag has been set diff --git a/debian/additions/Docs__Images__Makefile.in b/debian/additions/Docs__Images__Makefile.in new file mode 100644 index 000000000000..f7316d4e3452 --- /dev/null +++ b/debian/additions/Docs__Images__Makefile.in @@ -0,0 +1,6 @@ +all: + +distclean: + -rm -f Makefile + +.PHONY: all distclean clean install check diff --git a/debian/additions/Docs__Makefile.in b/debian/additions/Docs__Makefile.in new file mode 100644 index 000000000000..f7316d4e3452 --- /dev/null +++ b/debian/additions/Docs__Makefile.in @@ -0,0 +1,6 @@ +all: + +distclean: + -rm -f Makefile + +.PHONY: all distclean clean install check diff --git a/debian/additions/debian-start b/debian/additions/debian-start new file mode 100644 index 000000000000..1ea1207a2cd1 --- /dev/null +++ b/debian/additions/debian-start @@ -0,0 +1,32 @@ +#!/bin/bash +# +# This script is executed by "/etc/init.d/mysql" on every (re)start. +# +# Changes to this file will be preserved when updating the Debian package. +# + +source /usr/share/mysql/debian-start.inc.sh + +MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf" +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" +MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf" +MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf" +MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables" +MYCHECK_PARAMS="--all-databases --fast --silent" +MYCHECK_RCPT="root" + +# The following commands should be run when the server is up but in background +# where they do not block the server start and in one shell instance so that +# they run sequentially. They are supposed not to echo anything to stdout. +# If you want to disable the check for crashed tables comment +# "check_for_crashed_tables" out. +# (There may be no output to stdout inside the background process!) +echo "Checking for tables which need an upgrade, are corrupt or were " +echo "not closed cleanly." +( + upgrade_system_tables_if_necessary; + check_root_accounts; + check_for_crashed_tables; +) >&2 & + +exit 0 diff --git a/debian/additions/debian-start.inc.sh b/debian/additions/debian-start.inc.sh new file mode 100644 index 000000000000..f50712882c12 --- /dev/null +++ b/debian/additions/debian-start.inc.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# +# This file is included by /etc/mysql/debian-start +# + +## Check all unclosed tables. +# - Requires the server to be up. +# - Is supposed to run silently in background. +function check_for_crashed_tables() { + set -e + set -u + + # But do it in the background to not stall the boot process. + logger -p daemon.info -i -t$0 "Triggering myisam-recover for all MyISAM tables" + + # Checking for $? is unreliable so the size of the output is checked. + # Some table handlers like HEAP do not support CHECK TABLE. + tempfile=`tempfile` + # We have to use xargs in this case, because a for loop barfs on the + # spaces in the thing to be looped over. + LC_ALL=C $MYSQL --skip-column-names --batch -e ' + select concat('\''select count(*) into @discard from `'\'', + TABLE_SCHEMA, '\''`.`'\'', TABLE_NAME, '\''`'\'') + from information_schema.TABLES where ENGINE='\''MyISAM'\' | \ + xargs -i $MYSQL --skip-column-names --silent --batch \ + --force -e "{}" >$tempfile + if [ -s $tempfile ]; then + ( + /bin/echo -e "\n" \ + "Improperly closed tables are also reported if clients are accessing\n" \ + "the tables *now*. A list of current connections is below.\n"; + $MYADMIN processlist status + ) >> $tempfile + # Check for presence as a dependency on mailx would require an MTA. + if [ -x /usr/bin/mailx ]; then + mailx -e -s"$MYCHECK_SUBJECT" $MYCHECK_RCPT < $tempfile + fi + (echo "$MYCHECK_SUBJECT"; cat $tempfile) | logger -p daemon.warn -i -t$0 + fi + rm $tempfile +} + +## Check for tables needing an upgrade. +# - Requires the server to be up. +# - Is supposed to run silently in background. +function upgrade_system_tables_if_necessary() { + set -e + set -u + + logger -p daemon.info -i -t$0 "Upgrading MySQL tables if necessary." + + # Filter all "duplicate column", "duplicate key" and "unknown column" + # errors as the script is designed to be idempotent. + LC_ALL=C $MYUPGRADE \ + 2>&1 \ + | egrep -v '^(1|@had|ERROR (1054|1060|1061))' \ + | logger -p daemon.warn -i -t$0 +} + +## Check for the presence of both, root accounts with and without password. +# This might have been caused by a bug related to mysql_install_db (#418672). +function check_root_accounts() { + set -e + set -u + + logger -p daemon.info -i -t$0 "Checking for insecure root accounts." + + ret=$( echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='';" | $MYSQL --skip-column-names ) + if [ "$ret" -ne "0" ]; then + logger -p daemon.warn -i -t$0 "WARNING: mysql.user contains $ret root accounts without password!" + fi +} diff --git a/debian/additions/echo_stderr b/debian/additions/echo_stderr new file mode 100644 index 000000000000..67b3ed7cfb34 --- /dev/null +++ b/debian/additions/echo_stderr @@ -0,0 +1,2 @@ +#!/bin/bash +echo "$*" 1>&2 diff --git a/debian/additions/innotop/changelog.innotop b/debian/additions/innotop/changelog.innotop new file mode 100644 index 000000000000..ab4c154d6e6e --- /dev/null +++ b/debian/additions/innotop/changelog.innotop @@ -0,0 +1,357 @@ +Changelog for innotop: + +2009-03-09: version 1.7.1 + + Changes: + * Don't display the CXN column if only one connection is active in + the current view + + Bugs fixed: + * fixed bug where trying to aggregate the time column would result + in a crash if the time column had an undef value in it, which is + the case when a thread is in the 'Connect' state + * updated innotop.spec file to reflect current version + +2009-02-23: version 1.7.0 + + Changes: + * supports a central config (/etc/innotop/innotop.conf) + * changed the default home directory config to ~/.innotop/innotop.conf + (away from .ini) + * embedded InnoDBParser.pm into innotop so it can be run with no + installation + * no longer writes a new config file by default + * added --skipcentral (skip reading central config) and --write (write + a config if none were loaded at start-up) + * if no config file is loaded, connect to a MySQL database on + localhost using mysql_read_default_group=client + * embedded maatkit's DSNParser.pm and added support for --user, + --password, --host, --port + * changed default mode from T (InnoDB Transactions) to Q (Query List) + * in addition to connected threads, now displays running and cached + threads in statusbar + * don't load connections from a config file if any DSN information or + a username or password is specified on the command-line + + Bugs fixed: + * fixed bug preventing utilization of command-line options that + override default config settings if no config file was loaded + * fixed a bug where migrating from an old version of the config will + delete ~/innotop.ini, if it exists. Now uses File::Temp::tempfile(). + +2007-11-09: version 1.6.0 + + * S mode crashed on non-numeric values. + * New user-defined columns crashed upon restart. + * Added --color option to control terminal coloring. + +2007-09-18: version 1.5.2 + + * Added the ability to monitor InnoDB status from a file. + * Changed W mode to L mode; it monitors all locks, not just lock waits. + +2007-09-16: version 1.5.1 + + * Added C (Command Summary) mode. + * Fixed a bug in the 'avg' aggregate function. + +2007-09-10: version 1.5.0 + + Changes: + * Added plugin functionality. + * Added group-by functionality. + * Moved the configuration file to a directory. + * Enhanced filtering and sorting on pivoted tables. + * Many small bug fixes. + +2007-07-16: version 1.4.3 + + Changes: + * Added standard --version command-line option + * Changed colors to cyan instead of blue; more visible on dark terminals. + * Added information to the filter-choosing dialog. + * Added column auto-completion when entering a filter expression. + * Changed Term::ReadKey from optional to mandatory. + * Clarified username in password prompting. + * Ten thousand words of documentation! + + Bugs fixed: + * innotop crashed in W mode when InnoDB status data was truncated. + * innotop didn't display errors in tables if debug was enabled. + * The colored() subroutine wasn't being created in non-interactive mode. + * Don't prompt to save password except the first time. + +2007-05-03: version 1.4.2 + + This version contains all changes to the trunk until revision 239; some + changes in revisions 240:250 are included. + + MAJOR CHANGES: + + * Quick-filters to easily filter any column in any display + * Compatibility with MySQL 3.23 through 6.0 + * Improved error handling when a server is down, permissions denied, etc + * Use additional SHOW INNODB STATUS information in 5.1.x + * Make all modes use tables consistently, so they can all be edited, + filtered, colored and sorted consistently + * Combine V, G and S modes into S mode, with v, g, and s hot-keys + * Let DBD driver read MySQL option files; permit connections without + user/pass/etc + * Compile SQL-like expressions into Perl subroutines; eliminate need to + know Perl + * Do not save all config data to config file, only save user's customizations + * Rewritten and improved command-line option handling + * Added --count, --delay, and other command-line options to support + run-and-exit operation + * Improve built-in variable sets + * Improve help screen with three-part balanced-column layout + * Simplify table-editor and improve hotkey support + * Require Perl to have high-resolution time support (Time::HiRes) + * Help the user choose a query to analyze or kill + * Enable EXPLAIN, show-full-query in T mode just like Q mode + * Let data-extraction access current, previous and incremental data sets + all at once + + MINOR CHANGES: + + * Column stabilizing for Q mode + * New color rules for T, Q, W modes + * Apply slave I/O filter to Q mode + * Improve detection of server version and other meta-data + * Make connection timeout a config variable + * Improve cross-version-compatible SQL syntax + * Get some information from the DBD driver instead of asking MySQL for it + * Improved error messages + * Improve server group creation/editing + * Improve connection/thread killing + * Fix broken key bindings and restore previously mapped hot-keys for + choosing columns + * Some documentation updates (but not nearly enough) + * Allow the user to specify graphing char in S mode (formerly G mode) + * Allow easy switching between variable sets in S mode + * Bind 'n' key globally to choose the 'next' server connection + * Bind '%' key globally to filter displayed tables + * Allow aligning columns on the decimal place for easy readability + * Add hide_hdr config variable to hide column headers in tables + * Add a feature to smartly run PURGE MASTER LOGS in Replication mode + * Enable debug mode as a globally configurable variable + * Improve error messages when an expression or filter doesn't compile or has + a run-time error; die on error when debug is enabled + * Allow user-configurable delays after executing SQL (to let the server + settle down before taking another measurement) + * Add an expression to show how long until a transaction is finished + * Add skip_innodb as a global config variable + * Add '%' after percentages to help disambiguate (user-configurable) + * Add column to M mode to help see how fast slave is catching up to master + + BUG FIXES: + + * T and W modes had wrong value for wait_status column + * Error tracking on connections didn't reset when the connection recovered + * wait_timeout on connections couldn't be set before MySQL 4.0.3 + * There was a crash on 3.23 when wiping deadlocks + * Lettercase changes in some result sets (SHOW MASTER/SLAVE STATUS) between + MySQL versions crashed innotop + * Inactive connections crashed innotop upon access to DBD driver + * set_precision did not respect user defaults for number of digits + * --inc command-line option could not be negated + * InnoDB status parsing was not always parsing all needed information + * S mode (formerly G mode) could crash trying to divide non-numeric data + * M table didn't show Slave_open_temp_tables variable; incorrect lettercase + * DBD drivers with broken AutoCommit would crash innotop + * Some key bindings had incorrect labels + * Some config-file loading routines could load data for things that didn't + exist + * Headers printed too often in S mode + * High-resolution time was not used even when the user had it + * Non-interactive mode printed blank lines sometimes + * Q-mode header and statusbar showed different QPS numbers + * Formulas for key-cache and query-cache hit ratios were wrong + * Mac OS "Darwin" machines were mis-identified as Microsoft Windows + * Some multiplications crashed when given undefined input + * The commify transformation did not check its input and could crash + * Specifying an invalid mode on the command line or config file could crash + innotop + +2007-03-29: version 1.4.1 + + * More tweaks to display of connection errors. + * Fixed a problem with skip-innodb in MySQL 5.1. + * Fix a bug with dead connections in single-connection mode. + * Fix a regex to allow parsing more data from truncated deadlocks. + * Don't load active cxns from the config file if the cxn isn't defined. + +2007-03-03: version 1.4.0 + + * Further tweak error handling and display of connection errors + * More centralization of querying + * Fix forking so it doesn't kill all database connections + * Allow user to run innotop without permissions for GLOBAL variables and status + +2007-02-11: version 1.3.6 + + * Handle some connection failures so innotop doesn't crash because of one server. + * Enable incremental display in more modes. + * Tweaks to colorizing, color editor, and default color rules. + * Tweaks to default sorting rules. + * Use prepared statements for efficiency. + * Bug fixes and code cleanups. + * Data storage is keyed on clock ticks now. + +2007-02-03: version 1.3.5 + + * Bug fixes. + * More tools for editing configuration from within innotop. + * Filters and transformations are constrained to valid values. + * Support for colorizing rows. + * Sorting by multiple columns. + * Compress headers when display is very wide. + * Stabilize and limit column widths. + * Check config file formats when upgrading so upgrades go smoothly. + * Make D mode handle many connections at once. + * Extract simple expressions from data sets in column src property. + This makes innotop more awk-ish. + +2007-01-16: version 1.3 + + * Readline support. + * Can be used unattended, or in a pipe-and-filter mode + where it outputs tab-separated data to standard output. + * You can specify a config file on the command line. + Config files can be marked read-only. + * Monitor multiple servers simultaneously. + * Server groups to help manage many servers conveniently. + * Monitor master/slave status, and control slaves. + * Columns can have user-defined expressions as their data sources. + * Better configuration tools. + * InnoDB status information is merged into SHOW VARIABLES and + SHOW STATUS information, so you can access it all together. + * High-precision time support in more places. + * Lots of tweaks to make things display more readably and compactly. + * Column transformations and filters. + +2007-01-16: version 1.0.1 + * NOTE: innotop is now hosted at Sourceforge, in Subversion not CVS. + The new project homepage is http://sourceforge.net/projects/innotop/ + * Tweak default T/Q mode sort columns to match what people expect. + * Fix broken InnoDBParser.pm documentation (and hence man page). + +2007-01-06: version 1.0 + * NOTE: innotop is now hosted at Sourceforge, in Subversion not CVS. + The new project homepage is http://sourceforge.net/projects/innotop/ + * Prevent control characters from freaking terminal out. + * Set timeout to keep busy servers from closing connection. + * There is only one InnoDB insert buffer. + * Make licenses clear and consistent. + +2006-11-14: innotop 0.1.160, InnoDBParser version 1.69 + * Support for ANSI color on Microsoft Windows (more readable, compact + display; thanks Gisbert W. Selke). + * Better handling of $ENV{HOME} on Windows. + * Added a LICENSE file to the package as per Gentoo bug: + http://bugs.gentoo.org/show_bug.cgi?id=147600 + +2006-11-11: innotop 0.1.157, InnoDBParser version 1.69 + * Add Microsoft Windows support. + +2006-10-19: innotop 0.1.154, InnoDBParser version 1.69 + * Add O (Open Tables) mode + * Add some more checks to handle incomplete InnoDB status information + +2006-09-30: innotop 0.1.152, InnoDBParser version 1.69 + * Figured out what was wrong with package $VERSION variable: it wasn't + after the package declaration! + +2006-09-28: innotop 0.1.152, InnoDBParser version 1.67 + * Make more efforts towards crash-resistance and tolerance of completely + messed-up inputs. If innotop itself is broken, it is now much harder to + tell, because it just keeps on running without complaining. + * Fix a small bug parsing out some information and displaying it. + +2006-09-05: innotop 0.1.149, InnoDBParser version 1.64 + * Try to find and eliminate any parsing code that assumes pattern matches + will succeed. + +2006-09-05: innotop 0.1.149, InnoDBParser version 1.62 + * Make innotop crash-resistant, so I can declare it STABLE finally. + * Instead of using SQL conditional comments, detect MySQL version. + +2006-08-22: innotop 0.1.147, InnoDBParser version 1.60 + * Fix some innotop bugs with undefined values, bad formatting etc. + +2006-08-19: innotop 0.1.146, InnoDBParser version 1.60 + * Make innotop handle some unexpected NULL values in Q mode. + * Add OS wait information to W mode, so it is now "everything that waits." + * Center section captions better. + * Make R mode more readable and compact. + * Make InnoDBParser parse lock waits even when they've been waiting 0 secs. + +2006-08-12: innotop 0.1.139, InnoDBParser version 1.59 + * Add more documentation + * Tweak V mode to show more info in less space. + * Fix a bug in G mode. + +2006-08-10: innotop 0.1.132, InnoDBParser version 1.58 + * Handle yet more types of FK error... it will never end! + * Handle some special cases when DEADLOCK info truncated + * Add a bit more FK info to F mode in innotop + * More tests added to the test suite + +2006-08-07: innotop 0.1.131, InnoDBParser version 1.55 + * Fix another issue with configuration + * Handle another type of FK error + +2006-08-03: innotop 0.1.130, InnoDBParser version 1.54 + * Fix an issue loading config file + * Add heap_no to 'D' (InnoDB Deadlock) mode to ease deadlock debugging. + +2006-08-02: innotop 0.1.128, InnoDBParser version 1.54 + * Parse lock wait information from the TRANSACTION section. + * Even more OS-specific parsing... pain in the butt... + * Add 'W' (InnoDB Lock Wait) mode. + * Fix some minor display issues with statusbar. + +2006-08-02: innotop 0.1.125, InnoDBParser version 1.50 + * Don't try to get references to Perl built-in functions like time() + * Handle more OS-specific variations of InnoDB status text + * Add some more information to various places in innotop + +2006-08-01: innotop 0.1.123, InnoDBParser version 1.47 + + * Enhance S and G modes: clear screen and re-print headers + * Don't crash when deadlock data is truncated + * Make Analyze mode say how to get back to whatever you came from + * Display 'nothing to display' when there is nothing + * Add ability to read InnoDB status text from a file (mostly helps test) + * Add table of Wait Array Information in Row Op/Semaphore mode + * Add table of lock information in InnoDB deadlock mode + * Ensure new features in upgrades don't get masked by existing config files + * Tweak default column choices for T mode + * Enhance foreign key parsing + * Enhance physical record and data tuple parsing + * Enhance lock parsing (handle old-style and new-style formats) + +2006-07-24: innotop 0.1.112, InnoDBParser version 1.36 + + * InnoDBParser enhancements for FK error messages. + * A fix to innotop to prevent it from crashing while trying to display a FK + error message. + * Some minor cosmetic changes to number formatting in innotop. + +2006-07-22: innotop 0.1.106, InnoDBParser version 1.35 + + * InnoDBParser is much more complete and accurate. + * Tons of bug fixes. + * Add partitions to EXPLAIN mode. + * Enhance Q mode header, add T mode header. + * Share some configuration variables across modes. + * Add formatted time columns to Q, T modes. + * Add command-line argument parsing. + * Turn off echo when asking for password. + * Add option to specify port when connecting. + * Let display-optimized-query display multiple notes. + * Lots of small improvements, such as showing more info in statusbar. + +2006-07-02: innotop 0.1.74, InnoDBParser version 1.24 + + * Initial release for public consumption. diff --git a/debian/additions/innotop/innotop b/debian/additions/innotop/innotop new file mode 100644 index 000000000000..646f0d7f0fb8 --- /dev/null +++ b/debian/additions/innotop/innotop @@ -0,0 +1,10946 @@ +#!/usr/bin/perl + +# vim: tw=160:nowrap:expandtab:tabstop=3:shiftwidth=3:softtabstop=3 + +# This program is copyright (c) 2006 Baron Schwartz, baron at xaprb dot com. +# Feedback and improvements are gratefully received. +# +# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +# MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. +# +# 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; OR the Perl Artistic License. On UNIX and similar +# systems, you can issue `man perlgpl' or `man perlartistic' to read these + +# 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 + +use strict; +use warnings FATAL => 'all'; + +our $VERSION = '1.7.1'; + +# Find the home directory; it's different on different OSes. +our $homepath = $ENV{HOME} || $ENV{HOMEPATH} || $ENV{USERPROFILE} || '.'; + +# Configuration files +our $default_home_conf = "$homepath/.innotop/innotop.conf"; +our $default_central_conf = "/etc/innotop/innotop.conf"; +our $conf_file = ""; + +## Begin packages ## + +package DSNParser; + +use DBI; +use Data::Dumper; +$Data::Dumper::Indent = 0; +$Data::Dumper::Quotekeys = 0; +use English qw(-no_match_vars); + +use constant MKDEBUG => $ENV{MKDEBUG}; + +# Defaults are built-in, but you can add/replace items by passing them as +# hashrefs of {key, desc, copy, dsn}. The desc and dsn items are optional. +# You can set properties with the prop() sub. Don't set the 'opts' property. +sub new { + my ( $class, @opts ) = @_; + my $self = { + opts => { + A => { + desc => 'Default character set', + dsn => 'charset', + copy => 1, + }, + D => { + desc => 'Database to use', + dsn => 'database', + copy => 1, + }, + F => { + desc => 'Only read default options from the given file', + dsn => 'mysql_read_default_file', + copy => 1, + }, + h => { + desc => 'Connect to host', + dsn => 'host', + copy => 1, + }, + p => { + desc => 'Password to use when connecting', + dsn => 'password', + copy => 1, + }, + P => { + desc => 'Port number to use for connection', + dsn => 'port', + copy => 1, + }, + S => { + desc => 'Socket file to use for connection', + dsn => 'mysql_socket', + copy => 1, + }, + u => { + desc => 'User for login if not current user', + dsn => 'user', + copy => 1, + }, + }, + }; + foreach my $opt ( @opts ) { + MKDEBUG && _d('Adding extra property ' . $opt->{key}); + $self->{opts}->{$opt->{key}} = { desc => $opt->{desc}, copy => $opt->{copy} }; + } + return bless $self, $class; +} + +# Recognized properties: +# * autokey: which key to treat a bareword as (typically h=host). +# * dbidriver: which DBI driver to use; assumes mysql, supports Pg. +# * required: which parts are required (hashref). +# * setvars: a list of variables to set after connecting +sub prop { + my ( $self, $prop, $value ) = @_; + if ( @_ > 2 ) { + MKDEBUG && _d("Setting $prop property"); + $self->{$prop} = $value; + } + return $self->{$prop}; +} + +sub parse { + my ( $self, $dsn, $prev, $defaults ) = @_; + if ( !$dsn ) { + MKDEBUG && _d('No DSN to parse'); + return; + } + MKDEBUG && _d("Parsing $dsn"); + $prev ||= {}; + $defaults ||= {}; + my %given_props; + my %final_props; + my %opts = %{$self->{opts}}; + my $prop_autokey = $self->prop('autokey'); + + # Parse given props + foreach my $dsn_part ( split(/,/, $dsn) ) { + if ( my ($prop_key, $prop_val) = $dsn_part =~ m/^(.)=(.*)$/ ) { + # Handle the typical DSN parts like h=host, P=3306, etc. + $given_props{$prop_key} = $prop_val; + } + elsif ( $prop_autokey ) { + # Handle barewords + MKDEBUG && _d("Interpreting $dsn_part as $prop_autokey=$dsn_part"); + $given_props{$prop_autokey} = $dsn_part; + } + else { + MKDEBUG && _d("Bad DSN part: $dsn_part"); + } + } + + # Fill in final props from given, previous, and/or default props + foreach my $key ( keys %opts ) { + MKDEBUG && _d("Finding value for $key"); + $final_props{$key} = $given_props{$key}; + if ( !defined $final_props{$key} + && defined $prev->{$key} && $opts{$key}->{copy} ) + { + $final_props{$key} = $prev->{$key}; + MKDEBUG && _d("Copying value for $key from previous DSN"); + } + if ( !defined $final_props{$key} ) { + $final_props{$key} = $defaults->{$key}; + MKDEBUG && _d("Copying value for $key from defaults"); + } + } + + # Sanity check props + foreach my $key ( keys %given_props ) { + die "Unrecognized DSN part '$key' in '$dsn'\n" + unless exists $opts{$key}; + } + if ( (my $required = $self->prop('required')) ) { + foreach my $key ( keys %$required ) { + die "Missing DSN part '$key' in '$dsn'\n" unless $final_props{$key}; + } + } + + return \%final_props; +} + +sub as_string { + my ( $self, $dsn ) = @_; + return $dsn unless ref $dsn; + return join(',', + map { "$_=" . ($_ eq 'p' ? '...' : $dsn->{$_}) } + grep { defined $dsn->{$_} && $self->{opts}->{$_} } + sort keys %$dsn ); +} + +sub usage { + my ( $self ) = @_; + my $usage + = "DSN syntax is key=value[,key=value...] Allowable DSN keys:\n" + . " KEY COPY MEANING\n" + . " === ==== =============================================\n"; + my %opts = %{$self->{opts}}; + foreach my $key ( sort keys %opts ) { + $usage .= " $key " + . ($opts{$key}->{copy} ? 'yes ' : 'no ') + . ($opts{$key}->{desc} || '[No description]') + . "\n"; + } + if ( (my $key = $self->prop('autokey')) ) { + $usage .= " If the DSN is a bareword, the word is treated as the '$key' key.\n"; + } + return $usage; +} + +# Supports PostgreSQL via the dbidriver element of $info, but assumes MySQL by +# default. +sub get_cxn_params { + my ( $self, $info ) = @_; + my $dsn; + my %opts = %{$self->{opts}}; + my $driver = $self->prop('dbidriver') || ''; + if ( $driver eq 'Pg' ) { + $dsn = 'DBI:Pg:dbname=' . ( $info->{D} || '' ) . ';' + . join(';', map { "$opts{$_}->{dsn}=$info->{$_}" } + grep { defined $info->{$_} } + qw(h P)); + } + else { + $dsn = 'DBI:mysql:' . ( $info->{D} || '' ) . ';' + . join(';', map { "$opts{$_}->{dsn}=$info->{$_}" } + grep { defined $info->{$_} } + qw(F h P S A)) + . ';mysql_read_default_group=client'; + } + MKDEBUG && _d($dsn); + return ($dsn, $info->{u}, $info->{p}); +} + + +# Fills in missing info from a DSN after successfully connecting to the server. +sub fill_in_dsn { + my ( $self, $dbh, $dsn ) = @_; + my $vars = $dbh->selectall_hashref('SHOW VARIABLES', 'Variable_name'); + my ($user, $db) = $dbh->selectrow_array('SELECT USER(), DATABASE()'); + $user =~ s/@.*//; + $dsn->{h} ||= $vars->{hostname}->{Value}; + $dsn->{S} ||= $vars->{'socket'}->{Value}; + $dsn->{P} ||= $vars->{port}->{Value}; + $dsn->{u} ||= $user; + $dsn->{D} ||= $db; +} + +sub get_dbh { + my ( $self, $cxn_string, $user, $pass, $opts ) = @_; + $opts ||= {}; + my $defaults = { + AutoCommit => 0, + RaiseError => 1, + PrintError => 0, + mysql_enable_utf8 => ($cxn_string =~ m/charset=utf8/ ? 1 : 0), + }; + @{$defaults}{ keys %$opts } = values %$opts; + my $dbh; + my $tries = 2; + while ( !$dbh && $tries-- ) { + eval { + MKDEBUG && _d($cxn_string, ' ', $user, ' ', $pass, ' {', + join(', ', map { "$_=>$defaults->{$_}" } keys %$defaults ), '}'); + $dbh = DBI->connect($cxn_string, $user, $pass, $defaults); + # Immediately set character set and binmode on STDOUT. + if ( my ($charset) = $cxn_string =~ m/charset=(\w+)/ ) { + my $sql = "/*!40101 SET NAMES $charset*/"; + MKDEBUG && _d("$dbh: $sql"); + $dbh->do($sql); + MKDEBUG && _d('Enabling charset for STDOUT'); + if ( $charset eq 'utf8' ) { + binmode(STDOUT, ':utf8') + or die "Can't binmode(STDOUT, ':utf8'): $OS_ERROR"; + } + else { + binmode(STDOUT) or die "Can't binmode(STDOUT): $OS_ERROR"; + } + } + }; + if ( !$dbh && $EVAL_ERROR ) { + MKDEBUG && _d($EVAL_ERROR); + if ( $EVAL_ERROR =~ m/not a compiled character set|character set utf8/ ) { + MKDEBUG && _d("Going to try again without utf8 support"); + delete $defaults->{mysql_enable_utf8}; + } + if ( !$tries ) { + die $EVAL_ERROR; + } + } + } + # If setvars exists and it's MySQL connection, set them + my $setvars = $self->prop('setvars'); + if ( $cxn_string =~ m/mysql/i && $setvars ) { + my $sql = "SET $setvars"; + MKDEBUG && _d("$dbh: $sql"); + eval { + $dbh->do($sql); + }; + if ( $EVAL_ERROR ) { + MKDEBUG && _d($EVAL_ERROR); + } + } + MKDEBUG && _d('DBH info: ', + $dbh, + Dumper($dbh->selectrow_hashref( + 'SELECT DATABASE(), CONNECTION_ID(), VERSION()/*!50038 , @@hostname*/')), + ' Connection info: ', ($dbh->{mysql_hostinfo} || 'undef'), + ' Character set info: ', + Dumper($dbh->selectall_arrayref( + 'SHOW VARIABLES LIKE "character_set%"', { Slice => {}})), + ' $DBD::mysql::VERSION: ', $DBD::mysql::VERSION, + ' $DBI::VERSION: ', $DBI::VERSION, + ); + return $dbh; +} + +# Tries to figure out a hostname for the connection. +sub get_hostname { + my ( $self, $dbh ) = @_; + if ( my ($host) = ($dbh->{mysql_hostinfo} || '') =~ m/^(\w+) via/ ) { + return $host; + } + my ( $hostname, $one ) = $dbh->selectrow_array( + 'SELECT /*!50038 @@hostname, */ 1'); + return $hostname; +} + +# Disconnects a database handle, but complains verbosely if there are any active +# children. These are usually $sth handles that haven't been finish()ed. +sub disconnect { + my ( $self, $dbh ) = @_; + MKDEBUG && $self->print_active_handles($dbh); + $dbh->disconnect; +} + +sub print_active_handles { + my ( $self, $thing, $level ) = @_; + $level ||= 0; + printf("# Active %sh: %s %s %s\n", ($thing->{Type} || 'undef'), "\t" x $level, + $thing, (($thing->{Type} || '') eq 'st' ? $thing->{Statement} || '' : '')) + or die "Cannot print: $OS_ERROR"; + foreach my $handle ( grep {defined} @{ $thing->{ChildHandles} } ) { + $self->print_active_handles( $handle, $level + 1 ); + } +} + +sub _d { + my ($package, undef, $line) = caller 0; + @_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; } + map { defined $_ ? $_ : 'undef' } + @_; + # Use $$ instead of $PID in case the package + # does not use English. + print "# $package:$line $$ ", @_, "\n"; +} + +1; + +package InnoDBParser; + +use Data::Dumper; +$Data::Dumper::Sortkeys = 1; +use English qw(-no_match_vars); +use List::Util qw(max); + +# Some common patterns +my $d = qr/(\d+)/; # Digit +my $f = qr/(\d+\.\d+)/; # Float +my $t = qr/(\d+ \d+)/; # Transaction ID +my $i = qr/((?:\d{1,3}\.){3}\d+)/; # IP address +my $n = qr/([^`\s]+)/; # MySQL object name +my $w = qr/(\w+)/; # Words +my $fl = qr/([\w\.\/]+) line $d/; # Filename and line number +my $h = qr/((?:0x)?[0-9a-f]*)/; # Hex +my $s = qr/(\d{6} .\d:\d\d:\d\d)/; # InnoDB timestamp + +# If you update this variable, also update the SYNOPSIS in the pod. +my %innodb_section_headers = ( + "TRANSACTIONS" => "tx", + "BUFFER POOL AND MEMORY" => "bp", + "SEMAPHORES" => "sm", + "LOG" => "lg", + "ROW OPERATIONS" => "ro", + "INSERT BUFFER AND ADAPTIVE HASH INDEX" => "ib", + "FILE I/O" => "io", + "LATEST DETECTED DEADLOCK" => "dl", + "LATEST FOREIGN KEY ERROR" => "fk", +); + +my %parser_for = ( + tx => \&parse_tx_section, + bp => \&parse_bp_section, + sm => \&parse_sm_section, + lg => \&parse_lg_section, + ro => \&parse_ro_section, + ib => \&parse_ib_section, + io => \&parse_io_section, + dl => \&parse_dl_section, + fk => \&parse_fk_section, +); + +my %fk_parser_for = ( + Transaction => \&parse_fk_transaction_error, + Error => \&parse_fk_bad_constraint_error, + Cannot => \&parse_fk_cant_drop_parent_error, +); + +# A thread's proc_info can be at least 98 different things I've found in the +# source. Fortunately, most of them begin with a gerunded verb. These are +# the ones that don't. +my %is_proc_info = ( + 'After create' => 1, + 'Execution of init_command' => 1, + 'FULLTEXT initialization' => 1, + 'Reopen tables' => 1, + 'Repair done' => 1, + 'Repair with keycache' => 1, + 'System lock' => 1, + 'Table lock' => 1, + 'Thread initialized' => 1, + 'User lock' => 1, + 'copy to tmp table' => 1, + 'discard_or_import_tablespace' => 1, + 'end' => 1, + 'got handler lock' => 1, + 'got old table' => 1, + 'init' => 1, + 'key cache' => 1, + 'locks' => 1, + 'malloc' => 1, + 'query end' => 1, + 'rename result table' => 1, + 'rename' => 1, + 'setup' => 1, + 'statistics' => 1, + 'status' => 1, + 'table cache' => 1, + 'update' => 1, +); + +sub new { + bless {}, shift; +} + +# Parse the status and return it. +# See srv_printf_innodb_monitor in innobase/srv/srv0srv.c +# Pass in the text to parse, whether to be in debugging mode, which sections +# to parse (hashref; if empty, parse all), and whether to parse full info from +# locks and such (probably shouldn't unless you need to). +sub parse_status_text { + my ( $self, $fulltext, $debug, $sections, $full ) = @_; + + die "I can't parse undef" unless defined $fulltext; + $fulltext =~ s/[\r\n]+/\n/g; + + $sections ||= {}; + die '$sections must be a hashref' unless ref($sections) eq 'HASH'; + + my %innodb_data = ( + got_all => 0, # Whether I was able to get the whole thing + ts => '', # Timestamp the server put on it + last_secs => 0, # Num seconds the averages are over + sections => {}, # Parsed values from each section + ); + + if ( $debug ) { + $innodb_data{'fulltext'} = $fulltext; + } + + # Get the most basic info about the status: beginning and end, and whether + # I got the whole thing (if there has been a big deadlock and there are + # too many locks to print, the output might be truncated) + my ( $time_text ) = $fulltext =~ m/^$s INNODB MONITOR OUTPUT$/m; + $innodb_data{'ts'} = [ parse_innodb_timestamp( $time_text ) ]; + $innodb_data{'timestring'} = ts_to_string($innodb_data{'ts'}); + ( $innodb_data{'last_secs'} ) = $fulltext + =~ m/Per second averages calculated from the last $d seconds/; + + ( my $got_all ) = $fulltext =~ m/END OF INNODB MONITOR OUTPUT/; + $innodb_data{'got_all'} = $got_all || 0; + + # Split it into sections. Each section begins with + # ----- + # LABEL + # ----- + my %innodb_sections; + my @matches = $fulltext + =~ m#\n(---+)\n([A-Z /]+)\n\1\n(.*?)(?=\n(---+)\n[A-Z /]+\n\4\n|$)#gs; + while ( my ( $start, $name, $text, $end ) = splice(@matches, 0, 4) ) { + $innodb_sections{$name} = [ $text, $end ? 1 : 0 ]; + } + # The Row Operations section is a special case, because instead of ending + # with the beginning of another section, it ends with the end of the file. + # So this section is complete if the entire file is complete. + $innodb_sections{'ROW OPERATIONS'}->[1] ||= $innodb_data{'got_all'}; + + # Just for sanity's sake, make sure I understand what to do with each + # section + eval { + foreach my $section ( keys %innodb_sections ) { + my $header = $innodb_section_headers{$section}; + die "Unknown section $section in $fulltext\n" + unless $header; + $innodb_data{'sections'}->{ $header } + ->{'fulltext'} = $innodb_sections{$section}->[0]; + $innodb_data{'sections'}->{ $header } + ->{'complete'} = $innodb_sections{$section}->[1]; + } + }; + if ( $EVAL_ERROR ) { + _debug( $debug, $EVAL_ERROR); + } + + # ################################################################ + # Parse the detailed data out of the sections. + # ################################################################ + eval { + foreach my $section ( keys %parser_for ) { + if ( defined $innodb_data{'sections'}->{$section} + && (!%$sections || (defined($sections->{$section} && $sections->{$section})) )) { + $parser_for{$section}->( + $innodb_data{'sections'}->{$section}, + $innodb_data{'sections'}->{$section}->{'complete'}, + $debug, + $full ) + or delete $innodb_data{'sections'}->{$section}; + } + else { + delete $innodb_data{'sections'}->{$section}; + } + } + }; + if ( $EVAL_ERROR ) { + _debug( $debug, $EVAL_ERROR); + } + + return \%innodb_data; +} + +# Parses the status text and returns it flattened out as a single hash. +sub get_status_hash { + my ( $self, $fulltext, $debug, $sections, $full ) = @_; + + # Parse the status text... + my $innodb_status + = $self->parse_status_text($fulltext, $debug, $sections, $full ); + + # Flatten the hierarchical structure into a single list by grabbing desired + # sections from it. + return + (map { 'IB_' . $_ => $innodb_status->{$_} } qw(timestring last_secs got_all)), + (map { 'IB_bp_' . $_ => $innodb_status->{'sections'}->{'bp'}->{$_} } + qw( writes_pending buf_pool_hit_rate total_mem_alloc buf_pool_reads + awe_mem_alloc pages_modified writes_pending_lru page_creates_sec + reads_pending pages_total buf_pool_hits writes_pending_single_page + page_writes_sec pages_read pages_written page_reads_sec + writes_pending_flush_list buf_pool_size add_pool_alloc + dict_mem_alloc pages_created buf_free complete )), + (map { 'IB_tx_' . $_ => $innodb_status->{'sections'}->{'tx'}->{$_} } + qw( num_lock_structs history_list_len purge_done_for transactions + purge_undo_for is_truncated trx_id_counter complete )), + (map { 'IB_ib_' . $_ => $innodb_status->{'sections'}->{'ib'}->{$_} } + qw( hash_table_size hash_searches_s non_hash_searches_s + bufs_in_node_heap used_cells size free_list_len seg_size inserts + merged_recs merges complete )), + (map { 'IB_lg_' . $_ => $innodb_status->{'sections'}->{'lg'}->{$_} } + qw( log_ios_done pending_chkp_writes last_chkp log_ios_s + log_flushed_to log_seq_no pending_log_writes complete )), + (map { 'IB_sm_' . $_ => $innodb_status->{'sections'}->{'sm'}->{$_} } + qw( wait_array_size rw_shared_spins rw_excl_os_waits mutex_os_waits + mutex_spin_rounds mutex_spin_waits rw_excl_spins rw_shared_os_waits + waits signal_count reservation_count complete )), + (map { 'IB_ro_' . $_ => $innodb_status->{'sections'}->{'ro'}->{$_} } + qw( queries_in_queue n_reserved_extents main_thread_state + main_thread_proc_no main_thread_id read_sec del_sec upd_sec ins_sec + read_views_open num_rows_upd num_rows_ins num_rows_read + queries_inside num_rows_del complete )), + (map { 'IB_fk_' . $_ => $innodb_status->{'sections'}->{'fk'}->{$_} } + qw( trigger parent_table child_index parent_index attempted_op + child_db timestring fk_name records col_name reason txn parent_db + type child_table parent_col complete )), + (map { 'IB_io_' . $_ => $innodb_status->{'sections'}->{'io'}->{$_} } + qw( pending_buffer_pool_flushes pending_pwrites pending_preads + pending_normal_aio_reads fsyncs_s os_file_writes pending_sync_ios + reads_s flush_type avg_bytes_s pending_ibuf_aio_reads writes_s + threads os_file_reads pending_aio_writes pending_log_ios os_fsyncs + pending_log_flushes complete )), + (map { 'IB_dl_' . $_ => $innodb_status->{'sections'}->{'dl'}->{$_} } + qw( timestring rolled_back txns complete )); + +} + +sub ts_to_string { + my $parts = shift; + return sprintf('%02d-%02d-%02d %02d:%02d:%02d', @$parts); +} + +sub parse_innodb_timestamp { + my $text = shift; + my ( $y, $m, $d, $h, $i, $s ) + = $text =~ m/^(\d\d)(\d\d)(\d\d) +(\d+):(\d+):(\d+)$/; + die("Can't get timestamp from $text\n") unless $y; + $y += 2000; + return ( $y, $m, $d, $h, $i, $s ); +} + +sub parse_fk_section { + my ( $section, $complete, $debug, $full ) = @_; + my $fulltext = $section->{'fulltext'}; + + return 0 unless $fulltext; + + my ( $ts, $type ) = $fulltext =~ m/^$s\s+(\w+)/m; + $section->{'ts'} = [ parse_innodb_timestamp( $ts ) ]; + $section->{'timestring'} = ts_to_string($section->{'ts'}); + $section->{'type'} = $type; + + # Decide which type of FK error happened, and dispatch to the right parser. + if ( $type && $fk_parser_for{$type} ) { + $fk_parser_for{$type}->( $section, $complete, $debug, $fulltext, $full ); + } + + delete $section->{'fulltext'} unless $debug; + + return 1; +} + +sub parse_fk_cant_drop_parent_error { + my ( $section, $complete, $debug, $fulltext, $full ) = @_; + + # Parse the parent/child table info out + @{$section}{ qw(attempted_op parent_db parent_table) } = $fulltext + =~ m{Cannot $w table `(.*)/(.*)`}m; + @{$section}{ qw(child_db child_table) } = $fulltext + =~ m{because it is referenced by `(.*)/(.*)`}m; + + ( $section->{'reason'} ) = $fulltext =~ m/(Cannot .*)/s; + $section->{'reason'} =~ s/\n(?:InnoDB: )?/ /gm + if $section->{'reason'}; + + # Certain data may not be present. Make them '' if not present. + map { $section->{$_} ||= "" } + qw(child_index fk_name col_name parent_col); +} + +# See dict/dict0dict.c, function dict_foreign_error_report +# I don't care much about these. There are lots of different messages, and +# they come from someone trying to create a foreign key, or similar +# statements. They aren't indicative of some transaction trying to insert, +# delete or update data. Sometimes it is possible to parse out a lot of +# information about the tables and indexes involved, but often the message +# contains the DDL string the user entered, which is way too much for this +# module to try to handle. +sub parse_fk_bad_constraint_error { + my ( $section, $complete, $debug, $fulltext, $full ) = @_; + + # Parse the parent/child table and index info out + @{$section}{ qw(child_db child_table) } = $fulltext + =~ m{Error in foreign key constraint of table (.*)/(.*):$}m; + $section->{'attempted_op'} = 'DDL'; + + # FK name, parent info... if possible. + @{$section}{ qw(fk_name col_name parent_db parent_table parent_col) } + = $fulltext + =~ m/CONSTRAINT `?$n`? FOREIGN KEY \(`?$n`?\) REFERENCES (?:`?$n`?\.)?`?$n`? \(`?$n`?\)/; + + if ( !defined($section->{'fk_name'}) ) { + # Try to parse SQL a user might have typed in a CREATE statement or such + @{$section}{ qw(col_name parent_db parent_table parent_col) } + = $fulltext + =~ m/FOREIGN\s+KEY\s*\(`?$n`?\)\s+REFERENCES\s+(?:`?$n`?\.)?`?$n`?\s*\(`?$n`?\)/i; + } + $section->{'parent_db'} ||= $section->{'child_db'}; + + # Name of the child index (index in the same table where the FK is, see + # definition of dict_foreign_struct in include/dict0mem.h, where it is + # called foreign_index, as opposed to referenced_index which is in the + # parent table. This may not be possible to find. + @{$section}{ qw(child_index) } = $fulltext + =~ m/^The index in the foreign key in table is $n$/m; + + @{$section}{ qw(reason) } = $fulltext =~ m/:\s*([^:]+)(?= Constraint:|$)/ms; + $section->{'reason'} =~ s/\s+/ /g + if $section->{'reason'}; + + # Certain data may not be present. Make them '' if not present. + map { $section->{$_} ||= "" } + qw(child_index fk_name col_name parent_table parent_col); +} + +# see source file row/row0ins.c +sub parse_fk_transaction_error { + my ( $section, $complete, $debug, $fulltext, $full ) = @_; + + # Parse the txn info out + my ( $txn ) = $fulltext + =~ m/Transaction:\n(TRANSACTION.*)\nForeign key constraint fails/s; + if ( $txn ) { + $section->{'txn'} = parse_tx_text( $txn, $complete, $debug, $full ); + } + + # Parse the parent/child table and index info out. There are two types: an + # update or a delete of a parent record leaves a child orphaned + # (row_ins_foreign_report_err), and an insert or update of a child record has + # no matching parent record (row_ins_foreign_report_add_err). + + @{$section}{ qw(reason child_db child_table) } + = $fulltext =~ m{^(Foreign key constraint fails for table `(.*)/(.*)`:)$}m; + + @{$section}{ qw(fk_name col_name parent_db parent_table parent_col) } + = $fulltext + =~ m/CONSTRAINT `$n` FOREIGN KEY \(`$n`\) REFERENCES (?:`$n`\.)?`$n` \(`$n`\)/; + $section->{'parent_db'} ||= $section->{'child_db'}; + + # Special case, which I don't know how to trigger, but see + # innobase/row/row0ins.c row_ins_check_foreign_constraint + if ( $fulltext =~ m/ibd file does not currently exist!/ ) { + my ( $attempted_op, $index, $records ) + = $fulltext =~ m/^Trying to (add to index) `$n` tuple:\n(.*))?/sm; + $section->{'child_index'} = $index; + $section->{'attempted_op'} = $attempted_op || ''; + if ( $records && $full ) { + ( $section->{'records'} ) + = parse_innodb_record_dump( $records, $complete, $debug ); + } + @{$section}{qw(parent_db parent_table)} + =~ m/^But the parent table `$n`\.`$n`$/m; + } + else { + my ( $attempted_op, $which, $index ) + = $fulltext =~ m/^Trying to ([\w ]*) in (child|parent) table, in index `$n` tuple:$/m; + if ( $which ) { + $section->{$which . '_index'} = $index; + $section->{'attempted_op'} = $attempted_op || ''; + + # Parse out the related records in the other table. + my ( $search_index, $records ); + if ( $which eq 'child' ) { + ( $search_index, $records ) = $fulltext + =~ m/^But in parent table [^,]*, in index `$n`,\nthe closest match we can find is record:\n(.*)/ms; + $section->{'parent_index'} = $search_index; + } + else { + ( $search_index, $records ) = $fulltext + =~ m/^But in child table [^,]*, in index `$n`, (?:the record is not available|there is a record:\n(.*))?/ms; + $section->{'child_index'} = $search_index; + } + if ( $records && $full ) { + $section->{'records'} + = parse_innodb_record_dump( $records, $complete, $debug ); + } + else { + $section->{'records'} = ''; + } + } + } + + # Parse out the tuple trying to be updated, deleted or inserted. + my ( $trigger ) = $fulltext =~ m/^(DATA TUPLE: \d+ fields;\n.*)$/m; + if ( $trigger ) { + $section->{'trigger'} = parse_innodb_record_dump( $trigger, $complete, $debug ); + } + + # Certain data may not be present. Make them '' if not present. + map { $section->{$_} ||= "" } + qw(child_index fk_name col_name parent_table parent_col); +} + +# There are new-style and old-style record formats. See rem/rem0rec.c +# TODO: write some tests for this +sub parse_innodb_record_dump { + my ( $dump, $complete, $debug ) = @_; + return undef unless $dump; + + my $result = {}; + + if ( $dump =~ m/PHYSICAL RECORD/ ) { + my $style = $dump =~ m/compact format/ ? 'new' : 'old'; + $result->{'style'} = $style; + + # This is a new-style record. + if ( $style eq 'new' ) { + @{$result}{qw( heap_no type num_fields info_bits )} + = $dump + =~ m/^(?:Record lock, heap no $d )?([A-Z ]+): n_fields $d; compact format; info bits $d$/m; + } + + # OK, it's old-style. Unfortunately there are variations here too. + elsif ( $dump =~ m/-byte offs / ) { + # Older-old style. + @{$result}{qw( heap_no type num_fields byte_offset info_bits )} + = $dump + =~ m/^(?:Record lock, heap no $d )?([A-Z ]+): n_fields $d; $d-byte offs [A-Z]+; info bits $d$/m; + if ( $dump !~ m/-byte offs TRUE/ ) { + $result->{'byte_offset'} = 0; + } + } + else { + # Newer-old style. + @{$result}{qw( heap_no type num_fields byte_offset info_bits )} + = $dump + =~ m/^(?:Record lock, heap no $d )?([A-Z ]+): n_fields $d; $d-byte offsets; info bits $d$/m; + } + + } + else { + $result->{'style'} = 'tuple'; + @{$result}{qw( type num_fields )} + = $dump =~ m/^(DATA TUPLE): $d fields;$/m; + } + + # Fill in default values for things that couldn't be parsed. + map { $result->{$_} ||= 0 } + qw(heap_no num_fields byte_offset info_bits); + map { $result->{$_} ||= '' } + qw(style type ); + + my @fields = $dump =~ m/ (\d+:.*?;?);(?=$| \d+:)/gm; + $result->{'fields'} = [ map { parse_field($_, $complete, $debug ) } @fields ]; + + return $result; +} + +# New/old-style applies here. See rem/rem0rec.c +# $text should not include the leading space or the second trailing semicolon. +sub parse_field { + my ( $text, $complete, $debug ) = @_; + + # Sample fields: + # '4: SQL NULL, size 4 ' + # '1: len 6; hex 000000005601; asc V ;' + # '6: SQL NULL' + # '5: len 30; hex 687474703a2f2f7777772e737765657477617465722e636f6d2f73746f72; asc http://www.sweetwater.com/stor;...(truncated)' + my ( $id, $nullsize, $len, $hex, $asc, $truncated ); + ( $id, $nullsize ) = $text =~ m/^$d: SQL NULL, size $d $/; + if ( !defined($id) ) { + ( $id ) = $text =~ m/^$d: SQL NULL$/; + } + if ( !defined($id) ) { + ( $id, $len, $hex, $asc, $truncated ) + = $text =~ m/^$d: len $d; hex $h; asc (.*);(\.\.\.\(truncated\))?$/; + } + + die "Could not parse this field: '$text'" unless defined $id; + return { + id => $id, + len => defined($len) ? $len : defined($nullsize) ? $nullsize : 0, + 'hex' => defined($hex) ? $hex : '', + asc => defined($asc) ? $asc : '', + trunc => $truncated ? 1 : 0, + }; + +} + +sub parse_dl_section { + my ( $dl, $complete, $debug, $full ) = @_; + return unless $dl; + my $fulltext = $dl->{'fulltext'}; + return 0 unless $fulltext; + + my ( $ts ) = $fulltext =~ m/^$s$/m; + return 0 unless $ts; + + $dl->{'ts'} = [ parse_innodb_timestamp( $ts ) ]; + $dl->{'timestring'} = ts_to_string($dl->{'ts'}); + $dl->{'txns'} = {}; + + my @sections + = $fulltext + =~ m{ + ^\*{3}\s([^\n]*) # *** (1) WAITING FOR THIS... + (.*?) # Followed by anything, non-greedy + (?=(?:^\*{3})|\z) # Followed by another three stars or EOF + }gmsx; + + + # Loop through each section. There are no assumptions about how many + # there are, who holds and wants what locks, and who gets rolled back. + while ( my ($header, $body) = splice(@sections, 0, 2) ) { + my ( $txn_id, $what ) = $header =~ m/^\($d\) (.*):$/; + next unless $txn_id; + $dl->{'txns'}->{$txn_id} ||= {}; + my $txn = $dl->{'txns'}->{$txn_id}; + + if ( $what eq 'TRANSACTION' ) { + $txn->{'tx'} = parse_tx_text( $body, $complete, $debug, $full ); + } + else { + push @{$txn->{'locks'}}, parse_innodb_record_locks( $body, $complete, $debug, $full ); + } + } + + @{ $dl }{ qw(rolled_back) } + = $fulltext =~ m/^\*\*\* WE ROLL BACK TRANSACTION \($d\)$/m; + + # Make sure certain values aren't undef + map { $dl->{$_} ||= '' } qw(rolled_back); + + delete $dl->{'fulltext'} unless $debug; + return 1; +} + +sub parse_innodb_record_locks { + my ( $text, $complete, $debug, $full ) = @_; + my @result; + + foreach my $lock ( $text =~ m/(^(?:RECORD|TABLE) LOCKS?.*$)/gm ) { + my $hash = {}; + @{$hash}{ qw(lock_type space_id page_no n_bits index db table txn_id lock_mode) } + = $lock + =~ m{^(RECORD|TABLE) LOCKS? (?:space id $d page no $d n bits $d index `?$n`? of )?table `$n(?:/|`\.`)$n` trx id $t lock.mode (\S+)}m; + ( $hash->{'special'} ) + = $lock =~ m/^(?:RECORD|TABLE) .*? locks (rec but not gap|gap before rec)/m; + $hash->{'insert_intention'} + = $lock =~ m/^(?:RECORD|TABLE) .*? insert intention/m ? 1 : 0; + $hash->{'waiting'} + = $lock =~ m/^(?:RECORD|TABLE) .*? waiting/m ? 1 : 0; + + # Some things may not be in the text, so make sure they are not + # undef. + map { $hash->{$_} ||= 0 } qw(n_bits page_no space_id); + map { $hash->{$_} ||= "" } qw(index special); + push @result, $hash; + } + + return @result; +} + +sub parse_tx_text { + my ( $txn, $complete, $debug, $full ) = @_; + + my ( $txn_id, $txn_status, $active_secs, $proc_no, $os_thread_id ) + = $txn + =~ m/^(?:---)?TRANSACTION $t, (\D*?)(?: $d sec)?, (?:process no $d, )?OS thread id $d/m; + my ( $thread_status, $thread_decl_inside ) + = $txn + =~ m/OS thread id \d+(?: ([^,]+?))?(?:, thread declared inside InnoDB $d)?$/m; + + # Parsing the line that begins 'MySQL thread id' is complicated. The only + # thing always in the line is the thread and query id. See function + # innobase_mysql_print_thd in InnoDB source file sql/ha_innodb.cc. + my ( $thread_line ) = $txn =~ m/^(MySQL thread id .*)$/m; + my ( $mysql_thread_id, $query_id, $hostname, $ip, $user, $query_status ); + + if ( $thread_line ) { + # These parts can always be gotten. + ( $mysql_thread_id, $query_id ) = $thread_line =~ m/^MySQL thread id $d, query id $d/m; + + # If it's a master/slave thread, "Has (read|sent) all" may be the thread's + # proc_info. In these cases, there won't be any host/ip/user info + ( $query_status ) = $thread_line =~ m/(Has (?:read|sent) all .*$)/m; + if ( defined($query_status) ) { + $user = 'system user'; + } + + # It may be the case that the query id is the last thing in the line. + elsif ( $thread_line =~ m/query id \d+ / ) { + # The IP address is the only non-word thing left, so it's the most + # useful marker for where I have to start guessing. + ( $hostname, $ip ) = $thread_line =~ m/query id \d+(?: ([A-Za-z]\S+))? $i/m; + if ( defined $ip ) { + ( $user, $query_status ) = $thread_line =~ m/$ip $w(?: (.*))?$/; + } + else { # OK, there wasn't an IP address. + # There might not be ANYTHING except the query status. + ( $query_status ) = $thread_line =~ m/query id \d+ (.*)$/; + if ( $query_status !~ m/^\w+ing/ && !exists($is_proc_info{$query_status}) ) { + # The remaining tokens are, in order: hostname, user, query_status. + # It's basically impossible to know which is which. + ( $hostname, $user, $query_status ) = $thread_line + =~ m/query id \d+(?: ([A-Za-z]\S+))?(?: $w(?: (.*))?)?$/m; + } + else { + $user = 'system user'; + } + } + } + } + + my ( $lock_wait_status, $lock_structs, $heap_size, $row_locks, $undo_log_entries ) + = $txn + =~ m/^(?:(\D*) )?$d lock struct\(s\), heap size $d(?:, $d row lock\(s\))?(?:, undo log entries $d)?$/m; + my ( $lock_wait_time ) + = $txn + =~ m/^------- TRX HAS BEEN WAITING $d SEC/m; + + my $locks; + # If the transaction has locks, grab the locks. + if ( $txn =~ m/^TABLE LOCK|RECORD LOCKS/ ) { + $locks = [parse_innodb_record_locks($txn, $complete, $debug, $full)]; + } + + my ( $tables_in_use, $tables_locked ) + = $txn + =~ m/^mysql tables in use $d, locked $d$/m; + my ( $txn_doesnt_see_ge, $txn_sees_lt ) + = $txn + =~ m/^Trx read view will not see trx with id >= $t, sees < $t$/m; + my $has_read_view = defined($txn_doesnt_see_ge); + # Only a certain number of bytes of the query text are included here, at least + # under some circumstances. Some versions include 300, some 600. + my ( $query_text ) + = $txn + =~ m{ + ^MySQL\sthread\sid\s[^\n]+\n # This comes before the query text + (.*?) # The query text + (?= # Followed by any of... + ^Trx\sread\sview + |^-------\sTRX\sHAS\sBEEN\sWAITING + |^TABLE\sLOCK + |^RECORD\sLOCKS\sspace\sid + |^(?:---)?TRANSACTION + |^\*\*\*\s\(\d\) + |\Z + ) + }xms; + if ( $query_text ) { + $query_text =~ s/\s+$//; + } + else { + $query_text = ''; + } + + my %stuff = ( + active_secs => $active_secs, + has_read_view => $has_read_view, + heap_size => $heap_size, + hostname => $hostname, + ip => $ip, + lock_structs => $lock_structs, + lock_wait_status => $lock_wait_status, + lock_wait_time => $lock_wait_time, + mysql_thread_id => $mysql_thread_id, + os_thread_id => $os_thread_id, + proc_no => $proc_no, + query_id => $query_id, + query_status => $query_status, + query_text => $query_text, + row_locks => $row_locks, + tables_in_use => $tables_in_use, + tables_locked => $tables_locked, + thread_decl_inside => $thread_decl_inside, + thread_status => $thread_status, + txn_doesnt_see_ge => $txn_doesnt_see_ge, + txn_id => $txn_id, + txn_sees_lt => $txn_sees_lt, + txn_status => $txn_status, + undo_log_entries => $undo_log_entries, + user => $user, + ); + $stuff{'fulltext'} = $txn if $debug; + $stuff{'locks'} = $locks if $locks; + + # Some things may not be in the txn text, so make sure they are not + # undef. + map { $stuff{$_} ||= 0 } qw(active_secs heap_size lock_structs + tables_in_use undo_log_entries tables_locked has_read_view + thread_decl_inside lock_wait_time proc_no row_locks); + map { $stuff{$_} ||= "" } qw(thread_status txn_doesnt_see_ge + txn_sees_lt query_status ip query_text lock_wait_status user); + $stuff{'hostname'} ||= $stuff{'ip'}; + + return \%stuff; +} + +sub parse_tx_section { + my ( $section, $complete, $debug, $full ) = @_; + return unless $section && $section->{'fulltext'}; + my $fulltext = $section->{'fulltext'}; + $section->{'transactions'} = []; + + # Handle the individual transactions + my @transactions = $fulltext =~ m/(---TRANSACTION \d.*?)(?=\n---TRANSACTION|$)/gs; + foreach my $txn ( @transactions ) { + my $stuff = parse_tx_text( $txn, $complete, $debug, $full ); + delete $stuff->{'fulltext'} unless $debug; + push @{$section->{'transactions'}}, $stuff; + } + + # Handle the general info + @{$section}{ 'trx_id_counter' } + = $fulltext =~ m/^Trx id counter $t$/m; + @{$section}{ 'purge_done_for', 'purge_undo_for' } + = $fulltext =~ m/^Purge done for trx's n:o < $t undo n:o < $t$/m; + @{$section}{ 'history_list_len' } # This isn't present in some 4.x versions + = $fulltext =~ m/^History list length $d$/m; + @{$section}{ 'num_lock_structs' } + = $fulltext =~ m/^Total number of lock structs in row lock hash table $d$/m; + @{$section}{ 'is_truncated' } + = $fulltext =~ m/^\.\.\. truncated\.\.\.$/m ? 1 : 0; + + # Fill in things that might not be present + foreach ( qw(history_list_len) ) { + $section->{$_} ||= 0; + } + + delete $section->{'fulltext'} unless $debug; + return 1; +} + +# I've read the source for this section. +sub parse_ro_section { + my ( $section, $complete, $debug, $full ) = @_; + return unless $section && $section->{'fulltext'}; + my $fulltext = $section->{'fulltext'}; + + # Grab the info + @{$section}{ 'queries_inside', 'queries_in_queue' } + = $fulltext =~ m/^$d queries inside InnoDB, $d queries in queue$/m; + ( $section->{ 'read_views_open' } ) + = $fulltext =~ m/^$d read views open inside InnoDB$/m; + ( $section->{ 'n_reserved_extents' } ) + = $fulltext =~ m/^$d tablespace extents now reserved for B-tree/m; + @{$section}{ 'main_thread_proc_no', 'main_thread_id', 'main_thread_state' } + = $fulltext =~ m/^Main thread (?:process no. $d, )?id $d, state: (.*)$/m; + @{$section}{ 'num_rows_ins', 'num_rows_upd', 'num_rows_del', 'num_rows_read' } + = $fulltext =~ m/^Number of rows inserted $d, updated $d, deleted $d, read $d$/m; + @{$section}{ 'ins_sec', 'upd_sec', 'del_sec', 'read_sec' } + = $fulltext =~ m#^$f inserts/s, $f updates/s, $f deletes/s, $f reads/s$#m; + $section->{'main_thread_proc_no'} ||= 0; + + map { $section->{$_} ||= 0 } qw(read_views_open n_reserved_extents); + delete $section->{'fulltext'} unless $debug; + return 1; +} + +sub parse_lg_section { + my ( $section, $complete, $debug, $full ) = @_; + return unless $section; + my $fulltext = $section->{'fulltext'}; + + # Grab the info + ( $section->{ 'log_seq_no' } ) + = $fulltext =~ m/Log sequence number \s*(\d.*)$/m; + ( $section->{ 'log_flushed_to' } ) + = $fulltext =~ m/Log flushed up to \s*(\d.*)$/m; + ( $section->{ 'last_chkp' } ) + = $fulltext =~ m/Last checkpoint at \s*(\d.*)$/m; + @{$section}{ 'pending_log_writes', 'pending_chkp_writes' } + = $fulltext =~ m/$d pending log writes, $d pending chkp writes/; + @{$section}{ 'log_ios_done', 'log_ios_s' } + = $fulltext =~ m#$d log i/o's done, $f log i/o's/second#; + + delete $section->{'fulltext'} unless $debug; + return 1; +} + +sub parse_ib_section { + my ( $section, $complete, $debug, $full ) = @_; + return unless $section && $section->{'fulltext'}; + my $fulltext = $section->{'fulltext'}; + + # Some servers will output ibuf information for tablespace 0, as though there + # might be many tablespaces with insert buffers. (In practice I believe + # the source code shows there will only ever be one). I have to parse both + # cases here, but I assume there will only be one. + @{$section}{ 'size', 'free_list_len', 'seg_size' } + = $fulltext =~ m/^Ibuf(?: for space 0)?: size $d, free list len $d, seg size $d,$/m; + @{$section}{ 'inserts', 'merged_recs', 'merges' } + = $fulltext =~ m/^$d inserts, $d merged recs, $d merges$/m; + + @{$section}{ 'hash_table_size', 'used_cells', 'bufs_in_node_heap' } + = $fulltext =~ m/^Hash table size $d, used cells $d, node heap has $d buffer\(s\)$/m; + @{$section}{ 'hash_searches_s', 'non_hash_searches_s' } + = $fulltext =~ m{^$f hash searches/s, $f non-hash searches/s$}m; + + delete $section->{'fulltext'} unless $debug; + return 1; +} + +sub parse_wait_array { + my ( $text, $complete, $debug, $full ) = @_; + my %result; + + @result{ qw(thread waited_at_filename waited_at_line waited_secs) } + = $text =~ m/^--Thread $d has waited at $fl for $f seconds/m; + + # Depending on whether it's a SYNC_MUTEX,RW_LOCK_EX,RW_LOCK_SHARED, + # there will be different text output + if ( $text =~ m/^Mutex at/m ) { + $result{'request_type'} = 'M'; + @result{ qw( lock_mem_addr lock_cfile_name lock_cline lock_var) } + = $text =~ m/^Mutex at $h created file $fl, lock var $d$/m; + @result{ qw( waiters_flag )} + = $text =~ m/^waiters flag $d$/m; + } + else { + @result{ qw( request_type lock_mem_addr lock_cfile_name lock_cline) } + = $text =~ m/^(.)-lock on RW-latch at $h created in file $fl$/m; + @result{ qw( writer_thread writer_lock_mode ) } + = $text =~ m/^a writer \(thread id $d\) has reserved it in mode (.*)$/m; + @result{ qw( num_readers waiters_flag )} + = $text =~ m/^number of readers $d, waiters flag $d$/m; + @result{ qw(last_s_file_name last_s_line ) } + = $text =~ m/Last time read locked in file $fl$/m; + @result{ qw(last_x_file_name last_x_line ) } + = $text =~ m/Last time write locked in file $fl$/m; + } + + $result{'cell_waiting'} = $text =~ m/^wait has ended$/m ? 0 : 1; + $result{'cell_event_set'} = $text =~ m/^wait is ending$/m ? 1 : 0; + + # Because there are two code paths, some things won't get set. + map { $result{$_} ||= '' } + qw(last_s_file_name last_x_file_name writer_lock_mode); + map { $result{$_} ||= 0 } + qw(num_readers lock_var last_s_line last_x_line writer_thread); + + return \%result; +} + +sub parse_sm_section { + my ( $section, $complete, $debug, $full ) = @_; + return 0 unless $section && $section->{'fulltext'}; + my $fulltext = $section->{'fulltext'}; + + # Grab the info + @{$section}{ 'reservation_count', 'signal_count' } + = $fulltext =~ m/^OS WAIT ARRAY INFO: reservation count $d, signal count $d$/m; + @{$section}{ 'mutex_spin_waits', 'mutex_spin_rounds', 'mutex_os_waits' } + = $fulltext =~ m/^Mutex spin waits $d, rounds $d, OS waits $d$/m; + @{$section}{ 'rw_shared_spins', 'rw_shared_os_waits', 'rw_excl_spins', 'rw_excl_os_waits' } + = $fulltext =~ m/^RW-shared spins $d, OS waits $d; RW-excl spins $d, OS waits $d$/m; + + # Look for info on waits. + my @waits = $fulltext =~ m/^(--Thread.*?)^(?=Mutex spin|--Thread)/gms; + $section->{'waits'} = [ map { parse_wait_array($_, $complete, $debug) } @waits ]; + $section->{'wait_array_size'} = scalar(@waits); + + delete $section->{'fulltext'} unless $debug; + return 1; +} + +# I've read the source for this section. +sub parse_bp_section { + my ( $section, $complete, $debug, $full ) = @_; + return unless $section && $section->{'fulltext'}; + my $fulltext = $section->{'fulltext'}; + + # Grab the info + @{$section}{ 'total_mem_alloc', 'add_pool_alloc' } + = $fulltext =~ m/^Total memory allocated $d; in additional pool allocated $d$/m; + @{$section}{'dict_mem_alloc'} = $fulltext =~ m/Dictionary memory allocated $d/; + @{$section}{'awe_mem_alloc'} = $fulltext =~ m/$d MB of AWE memory/; + @{$section}{'buf_pool_size'} = $fulltext =~ m/^Buffer pool size\s*$d$/m; + @{$section}{'buf_free'} = $fulltext =~ m/^Free buffers\s*$d$/m; + @{$section}{'pages_total'} = $fulltext =~ m/^Database pages\s*$d$/m; + @{$section}{'pages_modified'} = $fulltext =~ m/^Modified db pages\s*$d$/m; + @{$section}{'pages_read', 'pages_created', 'pages_written'} + = $fulltext =~ m/^Pages read $d, created $d, written $d$/m; + @{$section}{'page_reads_sec', 'page_creates_sec', 'page_writes_sec'} + = $fulltext =~ m{^$f reads/s, $f creates/s, $f writes/s$}m; + @{$section}{'buf_pool_hits', 'buf_pool_reads'} + = $fulltext =~ m{Buffer pool hit rate $d / $d$}m; + if ($fulltext =~ m/^No buffer pool page gets since the last printout$/m) { + @{$section}{'buf_pool_hits', 'buf_pool_reads'} = (0, 0); + @{$section}{'buf_pool_hit_rate'} = '--'; + } + else { + @{$section}{'buf_pool_hit_rate'} + = $fulltext =~ m{Buffer pool hit rate (\d+ / \d+)$}m; + } + @{$section}{'reads_pending'} = $fulltext =~ m/^Pending reads $d/m; + @{$section}{'writes_pending_lru', 'writes_pending_flush_list', 'writes_pending_single_page' } + = $fulltext =~ m/^Pending writes: LRU $d, flush list $d, single page $d$/m; + + map { $section->{$_} ||= 0 } + qw(writes_pending_lru writes_pending_flush_list writes_pending_single_page + awe_mem_alloc dict_mem_alloc); + @{$section}{'writes_pending'} = List::Util::sum( + @{$section}{ qw(writes_pending_lru writes_pending_flush_list writes_pending_single_page) }); + + delete $section->{'fulltext'} unless $debug; + return 1; +} + +# I've read the source for this. +sub parse_io_section { + my ( $section, $complete, $debug, $full ) = @_; + return unless $section && $section->{'fulltext'}; + my $fulltext = $section->{'fulltext'}; + $section->{'threads'} = {}; + + # Grab the I/O thread info + my @threads = $fulltext =~ m<^(I/O thread \d+ .*)$>gm; + foreach my $thread (@threads) { + my ( $tid, $state, $purpose, $event_set ) + = $thread =~ m{I/O thread $d state: (.+?) \((.*)\)(?: ev set)?$}m; + if ( defined $tid ) { + $section->{'threads'}->{$tid} = { + thread => $tid, + state => $state, + purpose => $purpose, + event_set => $event_set ? 1 : 0, + }; + } + } + + # Grab the reads/writes/flushes info + @{$section}{ 'pending_normal_aio_reads', 'pending_aio_writes' } + = $fulltext =~ m/^Pending normal aio reads: $d, aio writes: $d,$/m; + @{$section}{ 'pending_ibuf_aio_reads', 'pending_log_ios', 'pending_sync_ios' } + = $fulltext =~ m{^ ibuf aio reads: $d, log i/o's: $d, sync i/o's: $d$}m; + @{$section}{ 'flush_type', 'pending_log_flushes', 'pending_buffer_pool_flushes' } + = $fulltext =~ m/^Pending flushes \($w\) log: $d; buffer pool: $d$/m; + @{$section}{ 'os_file_reads', 'os_file_writes', 'os_fsyncs' } + = $fulltext =~ m/^$d OS file reads, $d OS file writes, $d OS fsyncs$/m; + @{$section}{ 'reads_s', 'avg_bytes_s', 'writes_s', 'fsyncs_s' } + = $fulltext =~ m{^$f reads/s, $d avg bytes/read, $f writes/s, $f fsyncs/s$}m; + @{$section}{ 'pending_preads', 'pending_pwrites' } + = $fulltext =~ m/$d pending preads, $d pending pwrites$/m; + @{$section}{ 'pending_preads', 'pending_pwrites' } = (0, 0) + unless defined($section->{'pending_preads'}); + + delete $section->{'fulltext'} unless $debug; + return 1; +} + +sub _debug { + my ( $debug, $msg ) = @_; + if ( $debug ) { + die $msg; + } + else { + warn $msg; + } + return 1; +} + +1; + +# end_of_package InnoDBParser + +package main; + +use sigtrap qw(handler finish untrapped normal-signals); + +use Data::Dumper; +use DBI; +use English qw(-no_match_vars); +use File::Basename qw(dirname); +use File::Temp; +use Getopt::Long; +use List::Util qw(max min maxstr sum); +use POSIX qw(ceil); +use Time::HiRes qw(time sleep); +use Term::ReadKey qw(ReadMode ReadKey); + +# License and warranty information. {{{1 +# ########################################################################### + +my $innotop_license = <<"LICENSE"; + +This is innotop version $VERSION, a MySQL and InnoDB monitor. + +This program is copyright (c) 2006 Baron Schwartz. +Feedback and improvements are welcome. + +THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +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; OR the Perl Artistic License. On UNIX and similar +systems, you can issue `man perlgpl' or `man perlartistic' to read these +licenses. + +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. +LICENSE + +# Configuration information and global setup {{{1 +# ########################################################################### + +# Really, really, super-global variables. +my @config_versions = ( + "000-000-000", "001-003-000", # config file was one big name-value hash. + "001-003-000", "001-004-002", # config file contained non-user-defined stuff. +); + +my $clear_screen_sub; +my $dsn_parser = new DSNParser(); + +# This defines expected properties and defaults for the column definitions that +# eventually end up in tbl_meta. +my %col_props = ( + hdr => '', + just => '-', + dec => 0, # Whether to align the column on the decimal point + num => 0, + label => '', + user => 0, + src => '', + tbl => '', # Helps when writing/reading custom columns in config files + minw => 0, + maxw => 0, + trans => [], + agg => 'first', # Aggregate function + aggonly => 0, # Whether to show only when tbl_meta->{aggregate} is true +); + +# Actual DBI connections to MySQL servers. +my %dbhs; + +# Command-line parameters {{{2 +# ########################################################################### + +my @opt_spec = ( + { s => 'help', d => 'Show this help message' }, + { s => 'color|C!', d => 'Use terminal coloring (default)', c => 'color' }, + { s => 'config|c=s', d => 'Config file to read' }, + { s => 'nonint|n', d => 'Non-interactive, output tab-separated fields' }, + { s => 'count=i', d => 'Number of updates before exiting' }, + { s => 'delay|d=f', d => 'Delay between updates in seconds', c => 'interval' }, + { s => 'mode|m=s', d => 'Operating mode to start in', c => 'mode' }, + { s => 'inc|i!', d => 'Measure incremental differences', c => 'status_inc' }, + { s => 'write|w', d => 'Write running configuration into home directory if no config files were loaded' }, + { s => 'skipcentral|s', d => 'Skip reading the central configuration file' }, + { s => 'version', d => 'Output version information and exit' }, + { s => 'user|u=s', d => 'User for login if not current user' }, + { s => 'password|p=s', d => 'Password to use for connection' }, + { s => 'host|h=s', d => 'Connect to host' }, + { s => 'port|P=i', d => 'Port number to use for connection' }, +); + +# This is the container for the command-line options' values to be stored in +# after processing. Initial values are defaults. +my %opts = ( + n => !( -t STDIN && -t STDOUT ), # If in/out aren't to terminals, we're interactive +); +# Post-process... +my %opt_seen; +foreach my $spec ( @opt_spec ) { + my ( $long, $short ) = $spec->{s} =~ m/^(\w+)(?:\|([^!+=]*))?/; + $spec->{k} = $short || $long; + $spec->{l} = $long; + $spec->{t} = $short; + $spec->{n} = $spec->{s} =~ m/!/; + $opts{$spec->{k}} = undef unless defined $opts{$spec->{k}}; + die "Duplicate option $spec->{k}" if $opt_seen{$spec->{k}}++; +} + +Getopt::Long::Configure('no_ignore_case', 'bundling'); +GetOptions( map { $_->{s} => \$opts{$_->{k}} } @opt_spec) or $opts{help} = 1; + +if ( $opts{version} ) { + print "innotop Ver $VERSION\n"; + exit(0); +} + +if ( $opts{c} and ! -f $opts{c} ) { + print $opts{c} . " doesn't exist. Exiting.\n"; + exit(1); +} +if ( $opts{'help'} ) { + print "Usage: innotop \n\n"; + my $maxw = max(map { length($_->{l}) + ($_->{n} ? 4 : 0)} @opt_spec); + foreach my $spec ( sort { $a->{l} cmp $b->{l} } @opt_spec ) { + my $long = $spec->{n} ? "[no]$spec->{l}" : $spec->{l}; + my $short = $spec->{t} ? "-$spec->{t}" : ''; + printf(" --%-${maxw}s %-4s %s\n", $long, $short, $spec->{d}); + } + print < q{my $host = host || hostname || ''; ($host) = $host =~ m/^((?:[\d.]+(?=:))|(?:[a-zA-Z]\w+))/; return $host || ''}, + Port => q{my ($p) = host =~ m/:(.*)$/; return $p || 0}, + OldVersions => q{dulint_to_int(IB_tx_trx_id_counter) - dulint_to_int(IB_tx_purge_done_for)}, + MaxTxnTime => q/max(map{ $_->{active_secs} } @{ IB_tx_transactions }) || 0/, + NumTxns => q{scalar @{ IB_tx_transactions } }, + DirtyBufs => q{ $cur->{IB_bp_pages_modified} / ($cur->{IB_bp_buf_pool_size} || 1) }, + BufPoolFill => q{ $cur->{IB_bp_pages_total} / ($cur->{IB_bp_buf_pool_size} || 1) }, + ServerLoad => q{ $cur->{Threads_connected}/(Questions||1)/Uptime_hires }, + TxnTimeRemain => q{ defined undo_log_entries && defined $pre->{undo_log_entries} && undo_log_entries < $pre->{undo_log_entries} ? undo_log_entries / (($pre->{undo_log_entries} - undo_log_entries)/((active_secs-$pre->{active_secs})||1))||1 : 0}, + SlaveCatchupRate => ' defined $cur->{seconds_behind_master} && defined $pre->{seconds_behind_master} && $cur->{seconds_behind_master} < $pre->{seconds_behind_master} ? ($pre->{seconds_behind_master}-$cur->{seconds_behind_master})/($cur->{Uptime_hires}-$pre->{Uptime_hires}) : 0', + QcacheHitRatio => q{(Qcache_hits||0)/(((Com_select||0)+(Qcache_hits||0))||1)}, +); + +# ########################################################################### +# Column definitions {{{3 +# Defines every column in every table. A named column has the following +# properties: +# * hdr Column header/title +# * label Documentation for humans. +# * num Whether it's numeric (for sorting). +# * just Alignment; generated from num, user-overridable in tbl_meta +# * minw, maxw Auto-generated, user-overridable. +# Values from this hash are just copied to tbl_meta, which is where everything +# else in the program should read from. +# ########################################################################### + +my %columns = ( + active_secs => { hdr => 'SecsActive', num => 1, label => 'Seconds transaction has been active', }, + add_pool_alloc => { hdr => 'Add\'l Pool', num => 1, label => 'Additonal pool allocated' }, + attempted_op => { hdr => 'Action', num => 0, label => 'The action that caused the error' }, + awe_mem_alloc => { hdr => 'AWE Memory', num => 1, label => '[Windows] AWE memory allocated' }, + binlog_cache_overflow => { hdr => 'Binlog Cache', num => 1, label => 'Transactions too big for binlog cache that went to disk' }, + binlog_do_db => { hdr => 'Binlog Do DB', num => 0, label => 'binlog-do-db setting' }, + binlog_ignore_db => { hdr => 'Binlog Ignore DB', num => 0, label => 'binlog-ignore-db setting' }, + bps_in => { hdr => 'BpsIn', num => 1, label => 'Bytes per second received by the server', }, + bps_out => { hdr => 'BpsOut', num => 1, label => 'Bytes per second sent by the server', }, + buf_free => { hdr => 'Free Bufs', num => 1, label => 'Buffers free in the buffer pool' }, + buf_pool_hit_rate => { hdr => 'Hit Rate', num => 0, label => 'Buffer pool hit rate' }, + buf_pool_hits => { hdr => 'Hits', num => 1, label => 'Buffer pool hits' }, + buf_pool_reads => { hdr => 'Reads', num => 1, label => 'Buffer pool reads' }, + buf_pool_size => { hdr => 'Size', num => 1, label => 'Buffer pool size' }, + bufs_in_node_heap => { hdr => 'Node Heap Bufs', num => 1, label => 'Buffers in buffer pool node heap' }, + bytes_behind_master => { hdr => 'ByteLag', num => 1, label => 'Bytes the slave lags the master in binlog' }, + cell_event_set => { hdr => 'Ending?', num => 1, label => 'Whether the cell event is set' }, + cell_waiting => { hdr => 'Waiting?', num => 1, label => 'Whether the cell is waiting' }, + child_db => { hdr => 'Child DB', num => 0, label => 'The database of the child table' }, + child_index => { hdr => 'Child Index', num => 0, label => 'The index in the child table' }, + child_table => { hdr => 'Child Table', num => 0, label => 'The child table' }, + cmd => { hdr => 'Cmd', num => 0, label => 'Type of command being executed', }, + cnt => { hdr => 'Cnt', num => 0, label => 'Count', agg => 'count', aggonly => 1 }, + connect_retry => { hdr => 'Connect Retry', num => 1, label => 'Slave connect-retry timeout' }, + cxn => { hdr => 'CXN', num => 0, label => 'Connection from which the data came', }, + db => { hdr => 'DB', num => 0, label => 'Current database', }, + dict_mem_alloc => { hdr => 'Dict Mem', num => 1, label => 'Dictionary memory allocated' }, + dirty_bufs => { hdr => 'Dirty Buf', num => 1, label => 'Dirty buffer pool pages' }, + dl_txn_num => { hdr => 'Num', num => 0, label => 'Deadlocked transaction number', }, + event_set => { hdr => 'Evt Set?', num => 1, label => '[Win32] if a wait event is set', }, + exec_master_log_pos => { hdr => 'Exec Master Log Pos', num => 1, label => 'Exec Master Log Position' }, + fk_name => { hdr => 'Constraint', num => 0, label => 'The name of the FK constraint' }, + free_list_len => { hdr => 'Free List Len', num => 1, label => 'Length of the free list' }, + has_read_view => { hdr => 'Rd View', num => 1, label => 'Whether the transaction has a read view' }, + hash_searches_s => { hdr => 'Hash/Sec', num => 1, label => 'Number of hash searches/sec' }, + hash_table_size => { hdr => 'Size', num => 1, label => 'Number of non-hash searches/sec' }, + heap_no => { hdr => 'Heap', num => 1, label => 'Heap number' }, + heap_size => { hdr => 'Heap', num => 1, label => 'Heap size' }, + history_list_len => { hdr => 'History', num => 1, label => 'History list length' }, + host_and_domain => { hdr => 'Host', num => 0, label => 'Hostname/IP and domain' }, + host_and_port => { hdr => 'Host/IP', num => 0, label => 'Hostname or IP address, and port number', }, + hostname => { hdr => 'Host', num => 0, label => 'Hostname' }, + index => { hdr => 'Index', num => 0, label => 'The index involved' }, + index_ref => { hdr => 'Index Ref', num => 0, label => 'Index referenced' }, + info => { hdr => 'Query', num => 0, label => 'Info or the current query', }, + insert_intention => { hdr => 'Ins Intent', num => 1, label => 'Whether the thread was trying to insert' }, + inserts => { hdr => 'Inserts', num => 1, label => 'Inserts' }, + io_bytes_s => { hdr => 'Bytes/Sec', num => 1, label => 'Average I/O bytes/sec' }, + io_flush_type => { hdr => 'Flush Type', num => 0, label => 'I/O Flush Type' }, + io_fsyncs_s => { hdr => 'fsyncs/sec', num => 1, label => 'I/O fsyncs/sec' }, + io_reads_s => { hdr => 'Reads/Sec', num => 1, label => 'Average I/O reads/sec' }, + io_writes_s => { hdr => 'Writes/Sec', num => 1, label => 'Average I/O writes/sec' }, + ip => { hdr => 'IP', num => 0, label => 'IP address' }, + is_name_locked => { hdr => 'Locked', num => 1, label => 'Whether table is name locked', }, + key_buffer_hit => { hdr => 'KCacheHit', num => 1, label => 'Key cache hit ratio', }, + key_len => { hdr => 'Key Length', num => 1, label => 'Number of bytes used in the key' }, + last_chkp => { hdr => 'Last Checkpoint', num => 0, label => 'Last log checkpoint' }, + last_errno => { hdr => 'Last Errno', num => 1, label => 'Last error number' }, + last_error => { hdr => 'Last Error', num => 0, label => 'Last error' }, + last_s_file_name => { hdr => 'S-File', num => 0, label => 'Filename where last read locked' }, + last_s_line => { hdr => 'S-Line', num => 1, label => 'Line where last read locked' }, + last_x_file_name => { hdr => 'X-File', num => 0, label => 'Filename where last write locked' }, + last_x_line => { hdr => 'X-Line', num => 1, label => 'Line where last write locked' }, + last_pct => { hdr => 'Pct', num => 1, label => 'Last Percentage' }, + last_total => { hdr => 'Last Total', num => 1, label => 'Last Total' }, + last_value => { hdr => 'Last Incr', num => 1, label => 'Last Value' }, + load => { hdr => 'Load', num => 1, label => 'Server load' }, + lock_cfile_name => { hdr => 'Crtd File', num => 0, label => 'Filename where lock created' }, + lock_cline => { hdr => 'Crtd Line', num => 1, label => 'Line where lock created' }, + lock_mem_addr => { hdr => 'Addr', num => 0, label => 'The lock memory address' }, + lock_mode => { hdr => 'Mode', num => 0, label => 'The lock mode' }, + lock_structs => { hdr => 'LStrcts', num => 1, label => 'Number of lock structs' }, + lock_type => { hdr => 'Type', num => 0, label => 'The lock type' }, + lock_var => { hdr => 'Lck Var', num => 1, label => 'The lock variable' }, + lock_wait_time => { hdr => 'Wait', num => 1, label => 'How long txn has waited for a lock' }, + log_flushed_to => { hdr => 'Flushed To', num => 0, label => 'Log position flushed to' }, + log_ios_done => { hdr => 'IO Done', num => 1, label => 'Log I/Os done' }, + log_ios_s => { hdr => 'IO/Sec', num => 1, label => 'Average log I/Os per sec' }, + log_seq_no => { hdr => 'Sequence No.', num => 0, label => 'Log sequence number' }, + main_thread_id => { hdr => 'Main Thread ID', num => 1, label => 'Main thread ID' }, + main_thread_proc_no => { hdr => 'Main Thread Proc', num => 1, label => 'Main thread process number' }, + main_thread_state => { hdr => 'Main Thread State', num => 0, label => 'Main thread state' }, + master_file => { hdr => 'File', num => 0, label => 'Master file' }, + master_host => { hdr => 'Master', num => 0, label => 'Master server hostname' }, + master_log_file => { hdr => 'Master Log File', num => 0, label => 'Master log file' }, + master_port => { hdr => 'Master Port', num => 1, label => 'Master port' }, + master_pos => { hdr => 'Position', num => 1, label => 'Master position' }, + master_ssl_allowed => { hdr => 'Master SSL Allowed', num => 0, label => 'Master SSL Allowed' }, + master_ssl_ca_file => { hdr => 'Master SSL CA File', num => 0, label => 'Master SSL Cert Auth File' }, + master_ssl_ca_path => { hdr => 'Master SSL CA Path', num => 0, label => 'Master SSL Cert Auth Path' }, + master_ssl_cert => { hdr => 'Master SSL Cert', num => 0, label => 'Master SSL Cert' }, + master_ssl_cipher => { hdr => 'Master SSL Cipher', num => 0, label => 'Master SSL Cipher' }, + master_ssl_key => { hdr => 'Master SSL Key', num => 0, label => 'Master SSL Key' }, + master_user => { hdr => 'Master User', num => 0, label => 'Master username' }, + max_txn => { hdr => 'MaxTxnTime', num => 1, label => 'MaxTxn' }, + merged_recs => { hdr => 'Merged Recs', num => 1, label => 'Merged records' }, + merges => { hdr => 'Merges', num => 1, label => 'Merges' }, + mutex_os_waits => { hdr => 'Waits', num => 1, label => 'Mutex OS Waits' }, + mutex_spin_rounds => { hdr => 'Rounds', num => 1, label => 'Mutex Spin Rounds' }, + mutex_spin_waits => { hdr => 'Spins', num => 1, label => 'Mutex Spin Waits' }, + mysql_thread_id => { hdr => 'ID', num => 1, label => 'MySQL connection (thread) ID', }, + name => { hdr => 'Name', num => 0, label => 'Variable Name' }, + n_bits => { hdr => '# Bits', num => 1, label => 'Number of bits' }, + non_hash_searches_s => { hdr => 'Non-Hash/Sec', num => 1, label => 'Non-hash searches/sec' }, + num_deletes => { hdr => 'Del', num => 1, label => 'Number of deletes' }, + num_deletes_sec => { hdr => 'Del/Sec', num => 1, label => 'Number of deletes' }, + num_inserts => { hdr => 'Ins', num => 1, label => 'Number of inserts' }, + num_inserts_sec => { hdr => 'Ins/Sec', num => 1, label => 'Number of inserts' }, + num_readers => { hdr => 'Readers', num => 1, label => 'Number of readers' }, + num_reads => { hdr => 'Read', num => 1, label => 'Number of reads' }, + num_reads_sec => { hdr => 'Read/Sec', num => 1, label => 'Number of reads' }, + num_res_ext => { hdr => 'BTree Extents', num => 1, label => 'Number of extents reserved for B-Tree' }, + num_rows => { hdr => 'Row Count', num => 1, label => 'Number of rows estimated to examine' }, + num_times_open => { hdr => 'In Use', num => 1, label => '# times table is opened', }, + num_txns => { hdr => 'Txns', num => 1, label => 'Number of transactions' }, + num_updates => { hdr => 'Upd', num => 1, label => 'Number of updates' }, + num_updates_sec => { hdr => 'Upd/Sec', num => 1, label => 'Number of updates' }, + os_file_reads => { hdr => 'OS Reads', num => 1, label => 'OS file reads' }, + os_file_writes => { hdr => 'OS Writes', num => 1, label => 'OS file writes' }, + os_fsyncs => { hdr => 'OS fsyncs', num => 1, label => 'OS fsyncs' }, + os_thread_id => { hdr => 'OS Thread', num => 1, label => 'The operating system thread ID' }, + p_aio_writes => { hdr => 'Async Wrt', num => 1, label => 'Pending asynchronous I/O writes' }, + p_buf_pool_flushes => { hdr => 'Buffer Pool Flushes', num => 1, label => 'Pending buffer pool flushes' }, + p_ibuf_aio_reads => { hdr => 'IBuf Async Rds', num => 1, label => 'Pending insert buffer asynch I/O reads' }, + p_log_flushes => { hdr => 'Log Flushes', num => 1, label => 'Pending log flushes' }, + p_log_ios => { hdr => 'Log I/Os', num => 1, label => 'Pending log I/O operations' }, + p_normal_aio_reads => { hdr => 'Async Rds', num => 1, label => 'Pending asynchronous I/O reads' }, + p_preads => { hdr => 'preads', num => 1, label => 'Pending p-reads' }, + p_pwrites => { hdr => 'pwrites', num => 1, label => 'Pending p-writes' }, + p_sync_ios => { hdr => 'Sync I/Os', num => 1, label => 'Pending synchronous I/O operations' }, + page_creates_sec => { hdr => 'Creates/Sec', num => 1, label => 'Page creates/sec' }, + page_no => { hdr => 'Page', num => 1, label => 'Page number' }, + page_reads_sec => { hdr => 'Reads/Sec', num => 1, label => 'Page reads per second' }, + page_writes_sec => { hdr => 'Writes/Sec', num => 1, label => 'Page writes per second' }, + pages_created => { hdr => 'Created', num => 1, label => 'Pages created' }, + pages_modified => { hdr => 'Dirty Pages', num => 1, label => 'Pages modified (dirty)' }, + pages_read => { hdr => 'Reads', num => 1, label => 'Pages read' }, + pages_total => { hdr => 'Pages', num => 1, label => 'Pages total' }, + pages_written => { hdr => 'Writes', num => 1, label => 'Pages written' }, + parent_col => { hdr => 'Parent Column', num => 0, label => 'The referred column in the parent table', }, + parent_db => { hdr => 'Parent DB', num => 0, label => 'The database of the parent table' }, + parent_index => { hdr => 'Parent Index', num => 0, label => 'The referred index in the parent table' }, + parent_table => { hdr => 'Parent Table', num => 0, label => 'The parent table' }, + part_id => { hdr => 'Part ID', num => 1, label => 'Sub-part ID of the query' }, + partitions => { hdr => 'Partitions', num => 0, label => 'Query partitions used' }, + pct => { hdr => 'Pct', num => 1, label => 'Percentage' }, + pending_chkp_writes => { hdr => 'Chkpt Writes', num => 1, label => 'Pending log checkpoint writes' }, + pending_log_writes => { hdr => 'Log Writes', num => 1, label => 'Pending log writes' }, + port => { hdr => 'Port', num => 1, label => 'Client port number', }, + possible_keys => { hdr => 'Poss. Keys', num => 0, label => 'Possible keys' }, + proc_no => { hdr => 'Proc', num => 1, label => 'Process number' }, + q_cache_hit => { hdr => 'QCacheHit', num => 1, label => 'Query cache hit ratio', }, + qps => { hdr => 'QPS', num => 1, label => 'How many queries/sec', }, + queries_in_queue => { hdr => 'Queries Queued', num => 1, label => 'Queries in queue' }, + queries_inside => { hdr => 'Queries Inside', num => 1, label => 'Queries inside InnoDB' }, + query_id => { hdr => 'Query ID', num => 1, label => 'Query ID' }, + query_status => { hdr => 'Query Status', num => 0, label => 'The query status' }, + query_text => { hdr => 'Query Text', num => 0, label => 'The query text' }, + questions => { hdr => 'Questions', num => 1, label => 'How many queries the server has gotten', }, + read_master_log_pos => { hdr => 'Read Master Pos', num => 1, label => 'Read master log position' }, + read_views_open => { hdr => 'Rd Views', num => 1, label => 'Number of read views open' }, + reads_pending => { hdr => 'Pending Reads', num => 1, label => 'Reads pending' }, + relay_log_file => { hdr => 'Relay File', num => 0, label => 'Relay log file' }, + relay_log_pos => { hdr => 'Relay Pos', num => 1, label => 'Relay log position' }, + relay_log_size => { hdr => 'Relay Size', num => 1, label => 'Relay log size' }, + relay_master_log_file => { hdr => 'Relay Master File', num => 0, label => 'Relay master log file' }, + replicate_do_db => { hdr => 'Do DB', num => 0, label => 'Replicate-do-db setting' }, + replicate_do_table => { hdr => 'Do Table', num => 0, label => 'Replicate-do-table setting' }, + replicate_ignore_db => { hdr => 'Ignore DB', num => 0, label => 'Replicate-ignore-db setting' }, + replicate_ignore_table => { hdr => 'Ignore Table', num => 0, label => 'Replicate-do-table setting' }, + replicate_wild_do_table => { hdr => 'Wild Do Table', num => 0, label => 'Replicate-wild-do-table setting' }, + replicate_wild_ignore_table => { hdr => 'Wild Ignore Table', num => 0, label => 'Replicate-wild-ignore-table setting' }, + request_type => { hdr => 'Type', num => 0, label => 'Type of lock the thread waits for' }, + reservation_count => { hdr => 'ResCnt', num => 1, label => 'Reservation Count' }, + row_locks => { hdr => 'RLocks', num => 1, label => 'Number of row locks' }, + rw_excl_os_waits => { hdr => 'RW Waits', num => 1, label => 'R/W Excl. OS Waits' }, + rw_excl_spins => { hdr => 'RW Spins', num => 1, label => 'R/W Excl. Spins' }, + rw_shared_os_waits => { hdr => 'Sh Waits', num => 1, label => 'R/W Shared OS Waits' }, + rw_shared_spins => { hdr => 'Sh Spins', num => 1, label => 'R/W Shared Spins' }, + scan_type => { hdr => 'Type', num => 0, label => 'Scan type in chosen' }, + seg_size => { hdr => 'Seg. Size', num => 1, label => 'Segment size' }, + select_type => { hdr => 'Select Type', num => 0, label => 'Type of select used' }, + signal_count => { hdr => 'Signals', num => 1, label => 'Signal Count' }, + size => { hdr => 'Size', num => 1, label => 'Size of the tablespace' }, + skip_counter => { hdr => 'Skip Counter', num => 1, label => 'Skip counter' }, + slave_catchup_rate => { hdr => 'Catchup', num => 1, label => 'How fast the slave is catching up in the binlog' }, + slave_io_running => { hdr => 'Slave-IO', num => 0, label => 'Whether the slave I/O thread is running' }, + slave_io_state => { hdr => 'Slave IO State', num => 0, label => 'Slave I/O thread state' }, + slave_open_temp_tables => { hdr => 'Temp', num => 1, label => 'Slave open temp tables' }, + slave_sql_running => { hdr => 'Slave-SQL', num => 0, label => 'Whether the slave SQL thread is running' }, + slow => { hdr => 'Slow', num => 1, label => 'How many slow queries', }, + space_id => { hdr => 'Space', num => 1, label => 'Tablespace ID' }, + special => { hdr => 'Special', num => 0, label => 'Special/Other info' }, + state => { hdr => 'State', num => 0, label => 'Connection state', maxw => 18, }, + tables_in_use => { hdr => 'Tbl Used', num => 1, label => 'Number of tables in use' }, + tables_locked => { hdr => 'Tbl Lck', num => 1, label => 'Number of tables locked' }, + tbl => { hdr => 'Table', num => 0, label => 'Table', }, + thread => { hdr => 'Thread', num => 1, label => 'Thread number' }, + thread_decl_inside => { hdr => 'Thread Inside', num => 0, label => 'What the thread is declared inside' }, + thread_purpose => { hdr => 'Purpose', num => 0, label => "The thread's purpose" }, + thread_status => { hdr => 'Thread Status', num => 0, label => 'The thread status' }, + time => { hdr => 'Time', num => 1, label => 'Time since the last event', }, + time_behind_master => { hdr => 'TimeLag', num => 1, label => 'Time slave lags master' }, + timestring => { hdr => 'Timestring', num => 0, label => 'Time the event occurred' }, + total => { hdr => 'Total', num => 1, label => 'Total' }, + total_mem_alloc => { hdr => 'Memory', num => 1, label => 'Total memory allocated' }, + truncates => { hdr => 'Trunc', num => 0, label => 'Whether the deadlock is truncating InnoDB status' }, + txn_doesnt_see_ge => { hdr => "Txn Won't See", num => 0, label => 'Where txn read view is limited' }, + txn_id => { hdr => 'ID', num => 0, label => 'Transaction ID' }, + txn_sees_lt => { hdr => 'Txn Sees', num => 1, label => 'Where txn read view is limited' }, + txn_status => { hdr => 'Txn Status', num => 0, label => 'Transaction status' }, + txn_time_remain => { hdr => 'Remaining', num => 1, label => 'Time until txn rollback/commit completes' }, + undo_log_entries => { hdr => 'Undo', num => 1, label => 'Number of undo log entries' }, + undo_for => { hdr => 'Undo', num => 0, label => 'Undo for' }, + until_condition => { hdr => 'Until Condition', num => 0, label => 'Slave until condition' }, + until_log_file => { hdr => 'Until Log File', num => 0, label => 'Slave until log file' }, + until_log_pos => { hdr => 'Until Log Pos', num => 1, label => 'Slave until log position' }, + used_cells => { hdr => 'Cells Used', num => 1, label => 'Number of cells used' }, + used_bufs => { hdr => 'Used Bufs', num => 1, label => 'Number of buffer pool pages used' }, + user => { hdr => 'User', num => 0, label => 'Database username', }, + value => { hdr => 'Value', num => 1, label => 'Value' }, + versions => { hdr => 'Versions', num => 1, label => 'Number of InnoDB MVCC versions unpurged' }, + victim => { hdr => 'Victim', num => 0, label => 'Whether this txn was the deadlock victim' }, + wait_array_size => { hdr => 'Wait Array Size', num => 1, label => 'Wait Array Size' }, + wait_status => { hdr => 'Lock Status', num => 0, label => 'Status of txn locks' }, + waited_at_filename => { hdr => 'File', num => 0, label => 'Filename at which thread waits' }, + waited_at_line => { hdr => 'Line', num => 1, label => 'Line at which thread waits' }, + waiters_flag => { hdr => 'Waiters', num => 1, label => 'Waiters Flag' }, + waiting => { hdr => 'Waiting', num => 1, label => 'Whether lock is being waited for' }, + when => { hdr => 'When', num => 0, label => 'Time scale' }, + writer_lock_mode => { hdr => 'Wrtr Lck Mode', num => 0, label => 'Writer lock mode' }, + writer_thread => { hdr => 'Wrtr Thread', num => 1, label => 'Writer thread ID' }, + writes_pending => { hdr => 'Writes', num => 1, label => 'Number of writes pending' }, + writes_pending_flush_list => { hdr => 'Flush List Writes', num => 1, label => 'Number of flush list writes pending' }, + writes_pending_lru => { hdr => 'LRU Writes', num => 1, label => 'Number of LRU writes pending' }, + writes_pending_single_page => { hdr => '1-Page Writes', num => 1, label => 'Number of 1-page writes pending' }, +); + +# Apply a default property or three. By default, columns are not width-constrained, +# aligned left, and sorted alphabetically, not numerically. +foreach my $col ( values %columns ) { + map { $col->{$_} ||= 0 } qw(num minw maxw); + $col->{just} = $col->{num} ? '' : '-'; +} + +# Filters {{{3 +# This hash defines every filter that can be applied to a table. These +# become part of tbl_meta as well. Each filter is just an expression that +# returns true or false. +# Properties of each entry: +# * func: the subroutine +# * name: the name, repeated +# * user: whether it's a user-defined filter (saved in config) +# * text: text of the subroutine +# * note: explanation +my %filters = (); + +# These are pre-processed to live in %filters above, by compiling them. +my %builtin_filters = ( + hide_self => { + text => <<' END', + return ( !$set->{info} || $set->{info} ne 'SHOW FULL PROCESSLIST' ) + && ( !$set->{query_text} || $set->{query_text} !~ m/INNODB STATUS$/ ); + END + note => 'Removes the innotop processes from the list', + tbls => [qw(innodb_transactions processlist)], + }, + hide_inactive => { + text => <<' END', + return ( !defined($set->{txn_status}) || $set->{txn_status} ne 'not started' ) + && ( !defined($set->{cmd}) || $set->{cmd} !~ m/Sleep|Binlog Dump/ ) + && ( !defined($set->{info}) || $set->{info} =~ m/\S/ ); + END + note => 'Removes processes which are not doing anything', + tbls => [qw(innodb_transactions processlist)], + }, + hide_slave_io => { + text => <<' END', + return !$set->{state} || $set->{state} !~ m/^(?:Waiting for master|Has read all relay)/; + END + note => 'Removes slave I/O threads from the list', + tbls => [qw(processlist slave_io_status)], + }, + table_is_open => { + text => <<' END', + return $set->{num_times_open} + $set->{is_name_locked}; + END + note => 'Removes tables that are not in use or locked', + tbls => [qw(open_tables)], + }, + cxn_is_master => { + text => <<' END', + return $set->{master_file} ? 1 : 0; + END + note => 'Removes servers that are not masters', + tbls => [qw(master_status)], + }, + cxn_is_slave => { + text => <<' END', + return $set->{master_host} ? 1 : 0; + END + note => 'Removes servers that are not slaves', + tbls => [qw(slave_io_status slave_sql_status)], + }, + thd_is_not_waiting => { + text => <<' END', + return $set->{thread_status} !~ m#waiting for i/o request#; + END + note => 'Removes idle I/O threads', + tbls => [qw(io_threads)], + }, +); +foreach my $key ( keys %builtin_filters ) { + my ( $sub, $err ) = compile_filter($builtin_filters{$key}->{text}); + $filters{$key} = { + func => $sub, + text => $builtin_filters{$key}->{text}, + user => 0, + name => $key, # useful for later + note => $builtin_filters{$key}->{note}, + tbls => $builtin_filters{$key}->{tbls}, + } +} + +# Variable sets {{{3 +# Sets (arrayrefs) of variables that are used in S mode. They are read/written to +# the config file. +my %var_sets = ( + general => { + text => join( + ', ', + 'set_precision(Questions/Uptime_hires) as QPS', + 'set_precision(Com_commit/Uptime_hires) as Commit_PS', + 'set_precision((Com_rollback||0)/(Com_commit||1)) as Rollback_Commit', + 'set_precision((' + . join('+', map { "($_||0)" } + qw(Com_delete Com_delete_multi Com_insert Com_insert_select Com_replace + Com_replace_select Com_select Com_update Com_update_multi)) + . ')/(Com_commit||1)) as Write_Commit', + 'set_precision((Com_select+(Qcache_hits||0))/((' + . join('+', map { "($_||0)" } + qw(Com_delete Com_delete_multi Com_insert Com_insert_select Com_replace + Com_replace_select Com_select Com_update Com_update_multi)) + . ')||1)) as R_W_Ratio', + 'set_precision(Opened_tables/Uptime_hires) as Opens_PS', + 'percent($cur->{Open_tables}/($cur->{table_cache})) as Table_Cache_Used', + 'set_precision(Threads_created/Uptime_hires) as Threads_PS', + 'percent($cur->{Threads_cached}/($cur->{thread_cache_size}||1)) as Thread_Cache_Used', + 'percent($cur->{Max_used_connections}/($cur->{max_connections}||1)) as CXN_Used_Ever', + 'percent($cur->{Threads_connected}/($cur->{max_connections}||1)) as CXN_Used_Now', + ), + }, + commands => { + text => join( + ', ', + qw(Uptime Questions Com_delete Com_delete_multi Com_insert + Com_insert_select Com_replace Com_replace_select Com_select Com_update + Com_update_multi) + ), + }, + query_status => { + text => join( + ',', + qw( Uptime Select_full_join Select_full_range_join Select_range + Select_range_check Select_scan Slow_queries Sort_merge_passes + Sort_range Sort_rows Sort_scan) + ), + }, + innodb => { + text => join( + ',', + qw( Uptime Innodb_row_lock_current_waits Innodb_row_lock_time + Innodb_row_lock_time_avg Innodb_row_lock_time_max Innodb_row_lock_waits + Innodb_rows_deleted Innodb_rows_inserted Innodb_rows_read + Innodb_rows_updated) + ), + }, + txn => { + text => join( + ',', + qw( Uptime Com_begin Com_commit Com_rollback Com_savepoint + Com_xa_commit Com_xa_end Com_xa_prepare Com_xa_recover Com_xa_rollback + Com_xa_start) + ), + }, + key_cache => { + text => join( + ',', + qw( Uptime Key_blocks_not_flushed Key_blocks_unused Key_blocks_used + Key_read_requests Key_reads Key_write_requests Key_writes ) + ), + }, + query_cache => { + text => join( + ',', + "percent($exprs{QcacheHitRatio}) as Hit_Pct", + 'set_precision((Qcache_hits||0)/(Qcache_inserts||1)) as Hit_Ins', + 'set_precision((Qcache_lowmem_prunes||0)/Uptime_hires) as Lowmem_Prunes_sec', + 'percent(1-((Qcache_free_blocks||0)/(Qcache_total_blocks||1))) as Blocks_used', + qw( Qcache_free_blocks Qcache_free_memory Qcache_not_cached Qcache_queries_in_cache) + ), + }, + handler => { + text => join( + ',', + qw( Uptime Handler_read_key Handler_read_first Handler_read_next + Handler_read_prev Handler_read_rnd Handler_read_rnd_next Handler_delete + Handler_update Handler_write) + ), + }, + cxns_files_threads => { + text => join( + ',', + qw( Uptime Aborted_clients Aborted_connects Bytes_received Bytes_sent + Compression Connections Created_tmp_disk_tables Created_tmp_files + Created_tmp_tables Max_used_connections Open_files Open_streams + Open_tables Opened_tables Table_locks_immediate Table_locks_waited + Threads_cached Threads_connected Threads_created Threads_running) + ), + }, + prep_stmt => { + text => join( + ',', + qw( Uptime Com_dealloc_sql Com_execute_sql Com_prepare_sql Com_reset + Com_stmt_close Com_stmt_execute Com_stmt_fetch Com_stmt_prepare + Com_stmt_reset Com_stmt_send_long_data ) + ), + }, + innodb_health => { + text => join( + ',', + "$exprs{OldVersions} as OldVersions", + qw(IB_sm_mutex_spin_waits IB_sm_mutex_spin_rounds IB_sm_mutex_os_waits), + "$exprs{NumTxns} as NumTxns", + "$exprs{MaxTxnTime} as MaxTxnTime", + qw(IB_ro_queries_inside IB_ro_queries_in_queue), + "set_precision($exprs{DirtyBufs} * 100) as dirty_bufs", + "set_precision($exprs{BufPoolFill} * 100) as buf_fill", + qw(IB_bp_pages_total IB_bp_pages_read IB_bp_pages_written IB_bp_pages_created) + ), + }, + innodb_health2 => { + text => join( + ', ', + 'percent(1-((Innodb_buffer_pool_pages_free||0)/($cur->{Innodb_buffer_pool_pages_total}||1))) as BP_page_cache_usage', + 'percent(1-((Innodb_buffer_pool_reads||0)/(Innodb_buffer_pool_read_requests||1))) as BP_cache_hit_ratio', + 'Innodb_buffer_pool_wait_free', + 'Innodb_log_waits', + ), + }, + slow_queries => { + text => join( + ', ', + 'set_precision(Slow_queries/Uptime_hires) as Slow_PS', + 'set_precision(Select_full_join/Uptime_hires) as Full_Join_PS', + 'percent(Select_full_join/(Com_select||1)) as Full_Join_Ratio', + ), + }, +); + +# Server sets {{{3 +# Defines sets of servers between which the user can quickly switch. +my %server_groups; + +# Connections {{{3 +# This hash defines server connections. Each connection is a string that can be passed to +# the DBI connection. These are saved in the connections section in the config file. +my %connections; +# Defines the parts of connections. +my @conn_parts = qw(user have_user pass have_pass dsn savepass dl_table); + +# Graph widths {{{3 +# This hash defines the max values seen for various status/variable values, for graphing. +# These are stored in their own section in the config file. These are just initial values: +my %mvs = ( + Com_select => 50, + Com_insert => 50, + Com_update => 50, + Com_delete => 50, + Questions => 100, +); + +# ########################################################################### +# Valid Term::ANSIColor color strings. +# ########################################################################### +my %ansicolors = map { $_ => 1 } + qw( black blink blue bold clear concealed cyan dark green magenta on_black + on_blue on_cyan on_green on_magenta on_red on_white on_yellow red reset + reverse underline underscore white yellow); + +# ########################################################################### +# Valid comparison operators for color rules +# ########################################################################### +my %comp_ops = ( + '==' => 'Numeric equality', + '>' => 'Numeric greater-than', + '<' => 'Numeric less-than', + '>=' => 'Numeric greater-than/equal', + '<=' => 'Numeric less-than/equal', + '!=' => 'Numeric not-equal', + 'eq' => 'String equality', + 'gt' => 'String greater-than', + 'lt' => 'String less-than', + 'ge' => 'String greater-than/equal', + 'le' => 'String less-than/equal', + 'ne' => 'String not-equal', + '=~' => 'Pattern match', + '!~' => 'Negated pattern match', +); + +# ########################################################################### +# Valid aggregate functions. +# ########################################################################### +my %agg_funcs = ( + first => sub { + return $_[0] + }, + count => sub { + return 0 + @_; + }, + avg => sub { + my @args = grep { defined $_ } @_; + return (sum(map { m/([\d\.-]+)/g } @args) || 0) / (scalar(@args) || 1); + }, + sum => sub { + my @args = grep { defined $_ } @_; + return sum(@args); + } +); + +# ########################################################################### +# Valid functions for transformations. +# ########################################################################### +my %trans_funcs = ( + shorten => \&shorten, + secs_to_time => \&secs_to_time, + no_ctrl_char => \&no_ctrl_char, + percent => \&percent, + commify => \&commify, + dulint_to_int => \&dulint_to_int, + set_precision => \&set_precision, +); + +# Table definitions {{{3 +# This hash defines every table that can get displayed in every mode. Each +# table specifies columns and column data sources. The column is +# defined by the %columns hash. +# +# Example: foo => { src => 'bar' } means the foo column (look at +# $columns{foo} for its definition) gets its data from the 'bar' element of +# the current data set, whatever that is. +# +# These columns are post-processed after being defined, because they get stuff +# from %columns. After all the config is loaded for columns, there's more +# post-processing too; the subroutines compiled from src get added to +# the hash elements for extract_values to use. +# ########################################################################### + +my %tbl_meta = ( + adaptive_hash_index => { + capt => 'Adaptive Hash Index', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + hash_table_size => { src => 'IB_ib_hash_table_size', trans => [qw(shorten)], }, + used_cells => { src => 'IB_ib_used_cells' }, + bufs_in_node_heap => { src => 'IB_ib_bufs_in_node_heap' }, + hash_searches_s => { src => 'IB_ib_hash_searches_s' }, + non_hash_searches_s => { src => 'IB_ib_non_hash_searches_s' }, + }, + visible => [ qw(cxn hash_table_size used_cells bufs_in_node_heap hash_searches_s non_hash_searches_s) ], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'ib', + group_by => [], + aggregate => 0, + }, + buffer_pool => { + capt => 'Buffer Pool', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + total_mem_alloc => { src => 'IB_bp_total_mem_alloc', trans => [qw(shorten)], }, + awe_mem_alloc => { src => 'IB_bp_awe_mem_alloc', trans => [qw(shorten)], }, + add_pool_alloc => { src => 'IB_bp_add_pool_alloc', trans => [qw(shorten)], }, + buf_pool_size => { src => 'IB_bp_buf_pool_size', trans => [qw(shorten)], }, + buf_free => { src => 'IB_bp_buf_free' }, + buf_pool_hit_rate => { src => 'IB_bp_buf_pool_hit_rate' }, + buf_pool_reads => { src => 'IB_bp_buf_pool_reads' }, + buf_pool_hits => { src => 'IB_bp_buf_pool_hits' }, + dict_mem_alloc => { src => 'IB_bp_dict_mem_alloc' }, + pages_total => { src => 'IB_bp_pages_total' }, + pages_modified => { src => 'IB_bp_pages_modified' }, + reads_pending => { src => 'IB_bp_reads_pending' }, + writes_pending => { src => 'IB_bp_writes_pending' }, + writes_pending_lru => { src => 'IB_bp_writes_pending_lru' }, + writes_pending_flush_list => { src => 'IB_bp_writes_pending_flush_list' }, + writes_pending_single_page => { src => 'IB_bp_writes_pending_single_page' }, + page_creates_sec => { src => 'IB_bp_page_creates_sec' }, + page_reads_sec => { src => 'IB_bp_page_reads_sec' }, + page_writes_sec => { src => 'IB_bp_page_writes_sec' }, + pages_created => { src => 'IB_bp_pages_created' }, + pages_read => { src => 'IB_bp_pages_read' }, + pages_written => { src => 'IB_bp_pages_written' }, + }, + visible => [ qw(cxn buf_pool_size buf_free pages_total pages_modified buf_pool_hit_rate total_mem_alloc add_pool_alloc)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'bp', + group_by => [], + aggregate => 0, + }, + # TODO: a new step in set_to_tbl: join result to itself, grouped? + # TODO: this would also enable pulling Q and T data together. + # TODO: using a SQL-ish language would also allow pivots to be easier -- treat the pivoted data as a view and SELECT from it. + cmd_summary => { + capt => 'Command Summary', + cust => {}, + cols => { + name => { src => 'name' }, + total => { src => 'total' }, + value => { src => 'value', agg => 'sum'}, + pct => { src => 'value/total', trans => [qw(percent)] }, + last_total => { src => 'last_total' }, + last_value => { src => 'last_value', agg => 'sum'}, + last_pct => { src => 'last_value/last_total', trans => [qw(percent)] }, + }, + visible => [qw(name value pct last_value last_pct)], + filters => [qw()], + sort_cols => '-value', + sort_dir => '1', + innodb => '', + group_by => [qw(name)], + aggregate => 1, + }, + deadlock_locks => { + capt => 'Deadlock Locks', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + mysql_thread_id => { src => 'mysql_thread_id' }, + dl_txn_num => { src => 'dl_txn_num' }, + lock_type => { src => 'lock_type' }, + space_id => { src => 'space_id' }, + page_no => { src => 'page_no' }, + heap_no => { src => 'heap_no' }, + n_bits => { src => 'n_bits' }, + index => { src => 'index' }, + db => { src => 'db' }, + tbl => { src => 'table' }, + lock_mode => { src => 'lock_mode' }, + special => { src => 'special' }, + insert_intention => { src => 'insert_intention' }, + waiting => { src => 'waiting' }, + }, + visible => [ qw(cxn mysql_thread_id waiting lock_mode db tbl index special insert_intention)], + filters => [], + sort_cols => 'cxn mysql_thread_id', + sort_dir => '1', + innodb => 'dl', + group_by => [], + aggregate => 0, + }, + deadlock_transactions => { + capt => 'Deadlock Transactions', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + active_secs => { src => 'active_secs' }, + dl_txn_num => { src => 'dl_txn_num' }, + has_read_view => { src => 'has_read_view' }, + heap_size => { src => 'heap_size' }, + host_and_domain => { src => 'hostname' }, + hostname => { src => $exprs{Host} }, + ip => { src => 'ip' }, + lock_structs => { src => 'lock_structs' }, + lock_wait_time => { src => 'lock_wait_time', trans => [ qw(secs_to_time) ] }, + mysql_thread_id => { src => 'mysql_thread_id' }, + os_thread_id => { src => 'os_thread_id' }, + proc_no => { src => 'proc_no' }, + query_id => { src => 'query_id' }, + query_status => { src => 'query_status' }, + query_text => { src => 'query_text', trans => [ qw(no_ctrl_char) ] }, + row_locks => { src => 'row_locks' }, + tables_in_use => { src => 'tables_in_use' }, + tables_locked => { src => 'tables_locked' }, + thread_decl_inside => { src => 'thread_decl_inside' }, + thread_status => { src => 'thread_status' }, + 'time' => { src => 'active_secs', trans => [ qw(secs_to_time) ] }, + timestring => { src => 'timestring' }, + txn_doesnt_see_ge => { src => 'txn_doesnt_see_ge' }, + txn_id => { src => 'txn_id' }, + txn_sees_lt => { src => 'txn_sees_lt' }, + txn_status => { src => 'txn_status' }, + truncates => { src => 'truncates' }, + undo_log_entries => { src => 'undo_log_entries' }, + user => { src => 'user' }, + victim => { src => 'victim' }, + wait_status => { src => 'lock_wait_status' }, + }, + visible => [ qw(cxn mysql_thread_id timestring user hostname victim time undo_log_entries lock_structs query_text)], + filters => [], + sort_cols => 'cxn mysql_thread_id', + sort_dir => '1', + innodb => 'dl', + group_by => [], + aggregate => 0, + }, + explain => { + capt => 'EXPLAIN Results', + cust => {}, + cols => { + part_id => { src => 'id' }, + select_type => { src => 'select_type' }, + tbl => { src => 'table' }, + partitions => { src => 'partitions' }, + scan_type => { src => 'type' }, + possible_keys => { src => 'possible_keys' }, + index => { src => 'key' }, + key_len => { src => 'key_len' }, + index_ref => { src => 'ref' }, + num_rows => { src => 'rows' }, + special => { src => 'extra' }, + }, + visible => [ qw(select_type tbl partitions scan_type possible_keys index key_len index_ref num_rows special)], + filters => [], + sort_cols => '', + sort_dir => '1', + innodb => '', + group_by => [], + aggregate => 0, + }, + file_io_misc => { + capt => 'File I/O Misc', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + io_bytes_s => { src => 'IB_io_avg_bytes_s' }, + io_flush_type => { src => 'IB_io_flush_type' }, + io_fsyncs_s => { src => 'IB_io_fsyncs_s' }, + io_reads_s => { src => 'IB_io_reads_s' }, + io_writes_s => { src => 'IB_io_writes_s' }, + os_file_reads => { src => 'IB_io_os_file_reads' }, + os_file_writes => { src => 'IB_io_os_file_writes' }, + os_fsyncs => { src => 'IB_io_os_fsyncs' }, + }, + visible => [ qw(cxn os_file_reads os_file_writes os_fsyncs io_reads_s io_writes_s io_bytes_s)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'io', + group_by => [], + aggregate => 0, + }, + fk_error => { + capt => 'Foreign Key Error Info', + cust => {}, + cols => { + timestring => { src => 'IB_fk_timestring' }, + child_db => { src => 'IB_fk_child_db' }, + child_table => { src => 'IB_fk_child_table' }, + child_index => { src => 'IB_fk_child_index' }, + fk_name => { src => 'IB_fk_fk_name' }, + parent_db => { src => 'IB_fk_parent_db' }, + parent_table => { src => 'IB_fk_parent_table' }, + parent_col => { src => 'IB_fk_parent_col' }, + parent_index => { src => 'IB_fk_parent_index' }, + attempted_op => { src => 'IB_fk_attempted_op' }, + }, + visible => [ qw(timestring child_db child_table child_index parent_db parent_table parent_col parent_index fk_name attempted_op)], + filters => [], + sort_cols => '', + sort_dir => '1', + innodb => 'fk', + group_by => [], + aggregate => 0, + }, + insert_buffers => { + capt => 'Insert Buffers', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + inserts => { src => 'IB_ib_inserts' }, + merged_recs => { src => 'IB_ib_merged_recs' }, + merges => { src => 'IB_ib_merges' }, + size => { src => 'IB_ib_size' }, + free_list_len => { src => 'IB_ib_free_list_len' }, + seg_size => { src => 'IB_ib_seg_size' }, + }, + visible => [ qw(cxn inserts merged_recs merges size free_list_len seg_size)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'ib', + group_by => [], + aggregate => 0, + }, + innodb_locks => { + capt => 'InnoDB Locks', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + db => { src => 'db' }, + index => { src => 'index' }, + insert_intention => { src => 'insert_intention' }, + lock_mode => { src => 'lock_mode' }, + lock_type => { src => 'lock_type' }, + lock_wait_time => { src => 'lock_wait_time', trans => [ qw(secs_to_time) ] }, + mysql_thread_id => { src => 'mysql_thread_id' }, + n_bits => { src => 'n_bits' }, + page_no => { src => 'page_no' }, + space_id => { src => 'space_id' }, + special => { src => 'special' }, + tbl => { src => 'table' }, + 'time' => { src => 'active_secs', hdr => 'Active', trans => [ qw(secs_to_time) ] }, + txn_id => { src => 'txn_id' }, + waiting => { src => 'waiting' }, + }, + visible => [ qw(cxn mysql_thread_id lock_type waiting lock_wait_time time lock_mode db tbl index insert_intention special)], + filters => [], + sort_cols => 'cxn -lock_wait_time', + sort_dir => '1', + innodb => 'tx', + colors => [ + { col => 'lock_wait_time', op => '>', arg => 60, color => 'red' }, + { col => 'lock_wait_time', op => '>', arg => 30, color => 'yellow' }, + { col => 'lock_wait_time', op => '>', arg => 10, color => 'green' }, + ], + group_by => [], + aggregate => 0, + }, + innodb_transactions => { + capt => 'InnoDB Transactions', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + active_secs => { src => 'active_secs' }, + has_read_view => { src => 'has_read_view' }, + heap_size => { src => 'heap_size' }, + hostname => { src => $exprs{Host} }, + ip => { src => 'ip' }, + wait_status => { src => 'lock_wait_status' }, + lock_wait_time => { src => 'lock_wait_time', trans => [ qw(secs_to_time) ] }, + lock_structs => { src => 'lock_structs' }, + mysql_thread_id => { src => 'mysql_thread_id' }, + os_thread_id => { src => 'os_thread_id' }, + proc_no => { src => 'proc_no' }, + query_id => { src => 'query_id' }, + query_status => { src => 'query_status' }, + query_text => { src => 'query_text', trans => [ qw(no_ctrl_char) ] }, + txn_time_remain => { src => $exprs{TxnTimeRemain}, trans => [ qw(secs_to_time) ] }, + row_locks => { src => 'row_locks' }, + tables_in_use => { src => 'tables_in_use' }, + tables_locked => { src => 'tables_locked' }, + thread_decl_inside => { src => 'thread_decl_inside' }, + thread_status => { src => 'thread_status' }, + 'time' => { src => 'active_secs', trans => [ qw(secs_to_time) ], agg => 'sum' }, + txn_doesnt_see_ge => { src => 'txn_doesnt_see_ge' }, + txn_id => { src => 'txn_id' }, + txn_sees_lt => { src => 'txn_sees_lt' }, + txn_status => { src => 'txn_status', minw => 10, maxw => 10 }, + undo_log_entries => { src => 'undo_log_entries' }, + user => { src => 'user', maxw => 10 }, + cnt => { src => 'mysql_thread_id', minw => 0 }, + }, + visible => [ qw(cxn cnt mysql_thread_id user hostname txn_status time undo_log_entries query_text)], + filters => [ qw( hide_self hide_inactive ) ], + sort_cols => '-active_secs txn_status cxn mysql_thread_id', + sort_dir => '1', + innodb => 'tx', + hide_caption => 1, + colors => [ + { col => 'wait_status', op => 'eq', arg => 'LOCK WAIT', color => 'black on_red' }, + { col => 'time', op => '>', arg => 600, color => 'red' }, + { col => 'time', op => '>', arg => 300, color => 'yellow' }, + { col => 'time', op => '>', arg => 60, color => 'green' }, + { col => 'time', op => '>', arg => 30, color => 'cyan' }, + { col => 'txn_status', op => 'eq', arg => 'not started', color => 'white' }, + ], + group_by => [ qw(cxn txn_status) ], + aggregate => 0, + }, + io_threads => { + capt => 'I/O Threads', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + thread => { src => 'thread' }, + thread_purpose => { src => 'purpose' }, + event_set => { src => 'event_set' }, + thread_status => { src => 'state' }, + }, + visible => [ qw(cxn thread thread_purpose thread_status)], + filters => [ qw() ], + sort_cols => 'cxn thread', + sort_dir => '1', + innodb => 'io', + group_by => [], + aggregate => 0, + }, + log_statistics => { + capt => 'Log Statistics', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + last_chkp => { src => 'IB_lg_last_chkp' }, + log_flushed_to => { src => 'IB_lg_log_flushed_to' }, + log_ios_done => { src => 'IB_lg_log_ios_done' }, + log_ios_s => { src => 'IB_lg_log_ios_s' }, + log_seq_no => { src => 'IB_lg_log_seq_no' }, + pending_chkp_writes => { src => 'IB_lg_pending_chkp_writes' }, + pending_log_writes => { src => 'IB_lg_pending_log_writes' }, + }, + visible => [ qw(cxn log_seq_no log_flushed_to last_chkp log_ios_done log_ios_s)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'lg', + group_by => [], + aggregate => 0, + }, + master_status => { + capt => 'Master Status', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + binlog_do_db => { src => 'binlog_do_db' }, + binlog_ignore_db => { src => 'binlog_ignore_db' }, + master_file => { src => 'file' }, + master_pos => { src => 'position' }, + binlog_cache_overflow => { src => '(Binlog_cache_disk_use||0)/(Binlog_cache_use||1)', trans => [ qw(percent) ] }, + }, + visible => [ qw(cxn master_file master_pos binlog_cache_overflow)], + filters => [ qw(cxn_is_master) ], + sort_cols => 'cxn', + sort_dir => '1', + innodb => '', + group_by => [], + aggregate => 0, + }, + pending_io => { + capt => 'Pending I/O', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + p_normal_aio_reads => { src => 'IB_io_pending_normal_aio_reads' }, + p_aio_writes => { src => 'IB_io_pending_aio_writes' }, + p_ibuf_aio_reads => { src => 'IB_io_pending_ibuf_aio_reads' }, + p_sync_ios => { src => 'IB_io_pending_sync_ios' }, + p_buf_pool_flushes => { src => 'IB_io_pending_buffer_pool_flushes' }, + p_log_flushes => { src => 'IB_io_pending_log_flushes' }, + p_log_ios => { src => 'IB_io_pending_log_ios' }, + p_preads => { src => 'IB_io_pending_preads' }, + p_pwrites => { src => 'IB_io_pending_pwrites' }, + }, + visible => [ qw(cxn p_normal_aio_reads p_aio_writes p_ibuf_aio_reads p_sync_ios p_log_flushes p_log_ios)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'io', + group_by => [], + aggregate => 0, + }, + open_tables => { + capt => 'Open Tables', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + db => { src => 'database' }, + tbl => { src => 'table' }, + num_times_open => { src => 'in_use' }, + is_name_locked => { src => 'name_locked' }, + }, + visible => [ qw(cxn db tbl num_times_open is_name_locked)], + filters => [ qw(table_is_open) ], + sort_cols => '-num_times_open cxn db tbl', + sort_dir => '1', + innodb => '', + group_by => [], + aggregate => 0, + }, + page_statistics => { + capt => 'Page Statistics', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + pages_read => { src => 'IB_bp_pages_read' }, + pages_written => { src => 'IB_bp_pages_written' }, + pages_created => { src => 'IB_bp_pages_created' }, + page_reads_sec => { src => 'IB_bp_page_reads_sec' }, + page_writes_sec => { src => 'IB_bp_page_writes_sec' }, + page_creates_sec => { src => 'IB_bp_page_creates_sec' }, + }, + visible => [ qw(cxn pages_read pages_written pages_created page_reads_sec page_writes_sec page_creates_sec)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'bp', + group_by => [], + aggregate => 0, + }, + processlist => { + capt => 'MySQL Process List', + cust => {}, + cols => { + cxn => { src => 'cxn', minw => 6, maxw => 10 }, + mysql_thread_id => { src => 'id', minw => 6, maxw => 0 }, + user => { src => 'user', minw => 5, maxw => 8 }, + hostname => { src => $exprs{Host}, minw => 13, maxw => 8, }, + port => { src => $exprs{Port}, minw => 0, maxw => 0, }, + host_and_port => { src => 'host', minw => 0, maxw => 0 }, + db => { src => 'db', minw => 6, maxw => 12 }, + cmd => { src => 'command', minw => 5, maxw => 0 }, + time => { src => 'time', minw => 5, maxw => 0, trans => [ qw(secs_to_time) ], agg => 'sum' }, + state => { src => 'state', minw => 0, maxw => 0 }, + info => { src => 'info', minw => 0, maxw => 0, trans => [ qw(no_ctrl_char) ] }, + cnt => { src => 'id', minw => 0, maxw => 0 }, + }, + visible => [ qw(cxn cmd cnt mysql_thread_id state user hostname db time info)], + filters => [ qw(hide_self hide_inactive hide_slave_io) ], + sort_cols => '-time cxn hostname mysql_thread_id', + sort_dir => '1', + innodb => '', + hide_caption => 1, + colors => [ + { col => 'state', op => 'eq', arg => 'Locked', color => 'black on_red' }, + { col => 'cmd', op => 'eq', arg => 'Sleep', color => 'white' }, + { col => 'user', op => 'eq', arg => 'system user', color => 'white' }, + { col => 'cmd', op => 'eq', arg => 'Connect', color => 'white' }, + { col => 'cmd', op => 'eq', arg => 'Binlog Dump', color => 'white' }, + { col => 'time', op => '>', arg => 600, color => 'red' }, + { col => 'time', op => '>', arg => 120, color => 'yellow' }, + { col => 'time', op => '>', arg => 60, color => 'green' }, + { col => 'time', op => '>', arg => 30, color => 'cyan' }, + ], + group_by => [qw(cxn cmd)], + aggregate => 0, + }, + + # TODO: some more columns: + # kb_used=hdr='BufUsed' minw='0' num='0' src='percent(1 - ((Key_blocks_unused * key_cache_block_size) / (key_buffer_size||1)))' dec='0' trans='' tbl='q_header' just='-' user='1' maxw='0' label='User-defined' + # retries=hdr='Retries' minw='0' num='0' src='Slave_retried_transactions' dec='0' trans='' tbl='slave_sql_status' just='-' user='1' maxw='0' label='User-defined' + # thd=hdr='Thd' minw='0' num='0' src='Threads_connected' dec='0' trans='' tbl='slave_sql_status' just='-' user='1' maxw='0' label='User-defined' + + q_header => { + capt => 'Q-mode Header', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + questions => { src => 'Questions' }, + qps => { src => 'Questions/Uptime_hires', dec => 1, trans => [qw(shorten)] }, + load => { src => $exprs{ServerLoad}, dec => 1, trans => [qw(shorten)] }, + slow => { src => 'Slow_queries', dec => 1, trans => [qw(shorten)] }, + q_cache_hit => { src => $exprs{QcacheHitRatio}, dec => 1, trans => [qw(percent)] }, + key_buffer_hit => { src => '1-(Key_reads/(Key_read_requests||1))', dec => 1, trans => [qw(percent)] }, + bps_in => { src => 'Bytes_received/Uptime_hires', dec => 1, trans => [qw(shorten)] }, + bps_out => { src => 'Bytes_sent/Uptime_hires', dec => 1, trans => [qw(shorten)] }, + when => { src => 'when' }, + }, + visible => [ qw(cxn when load qps slow q_cache_hit key_buffer_hit bps_in bps_out)], + filters => [], + sort_cols => 'when cxn', + sort_dir => '1', + innodb => '', + hide_caption => 1, + group_by => [], + aggregate => 0, + }, + row_operations => { + capt => 'InnoDB Row Operations', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + num_inserts => { src => 'IB_ro_num_rows_ins' }, + num_updates => { src => 'IB_ro_num_rows_upd' }, + num_reads => { src => 'IB_ro_num_rows_read' }, + num_deletes => { src => 'IB_ro_num_rows_del' }, + num_inserts_sec => { src => 'IB_ro_ins_sec' }, + num_updates_sec => { src => 'IB_ro_upd_sec' }, + num_reads_sec => { src => 'IB_ro_read_sec' }, + num_deletes_sec => { src => 'IB_ro_del_sec' }, + }, + visible => [ qw(cxn num_inserts num_updates num_reads num_deletes num_inserts_sec + num_updates_sec num_reads_sec num_deletes_sec)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'ro', + group_by => [], + aggregate => 0, + }, + row_operation_misc => { + capt => 'Row Operation Misc', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + queries_in_queue => { src => 'IB_ro_queries_in_queue' }, + queries_inside => { src => 'IB_ro_queries_inside' }, + read_views_open => { src => 'IB_ro_read_views_open' }, + main_thread_id => { src => 'IB_ro_main_thread_id' }, + main_thread_proc_no => { src => 'IB_ro_main_thread_proc_no' }, + main_thread_state => { src => 'IB_ro_main_thread_state' }, + num_res_ext => { src => 'IB_ro_n_reserved_extents' }, + }, + visible => [ qw(cxn queries_in_queue queries_inside read_views_open main_thread_state)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'ro', + group_by => [], + aggregate => 0, + }, + semaphores => { + capt => 'InnoDB Semaphores', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + mutex_os_waits => { src => 'IB_sm_mutex_os_waits' }, + mutex_spin_rounds => { src => 'IB_sm_mutex_spin_rounds' }, + mutex_spin_waits => { src => 'IB_sm_mutex_spin_waits' }, + reservation_count => { src => 'IB_sm_reservation_count' }, + rw_excl_os_waits => { src => 'IB_sm_rw_excl_os_waits' }, + rw_excl_spins => { src => 'IB_sm_rw_excl_spins' }, + rw_shared_os_waits => { src => 'IB_sm_rw_shared_os_waits' }, + rw_shared_spins => { src => 'IB_sm_rw_shared_spins' }, + signal_count => { src => 'IB_sm_signal_count' }, + wait_array_size => { src => 'IB_sm_wait_array_size' }, + }, + visible => [ qw(cxn mutex_os_waits mutex_spin_waits mutex_spin_rounds + rw_excl_os_waits rw_excl_spins rw_shared_os_waits rw_shared_spins + signal_count reservation_count )], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'sm', + group_by => [], + aggregate => 0, + }, + slave_io_status => { + capt => 'Slave I/O Status', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + connect_retry => { src => 'connect_retry' }, + master_host => { src => 'master_host', hdr => 'Master'}, + master_log_file => { src => 'master_log_file', hdr => 'File' }, + master_port => { src => 'master_port' }, + master_ssl_allowed => { src => 'master_ssl_allowed' }, + master_ssl_ca_file => { src => 'master_ssl_ca_file' }, + master_ssl_ca_path => { src => 'master_ssl_ca_path' }, + master_ssl_cert => { src => 'master_ssl_cert' }, + master_ssl_cipher => { src => 'master_ssl_cipher' }, + master_ssl_key => { src => 'master_ssl_key' }, + master_user => { src => 'master_user' }, + read_master_log_pos => { src => 'read_master_log_pos', hdr => 'Pos' }, + relay_log_size => { src => 'relay_log_space', trans => [qw(shorten)] }, + slave_io_running => { src => 'slave_io_running', hdr => 'On?' }, + slave_io_state => { src => 'slave_io_state', hdr => 'State' }, + }, + visible => [ qw(cxn master_host slave_io_running master_log_file relay_log_size read_master_log_pos slave_io_state)], + filters => [ qw( cxn_is_slave ) ], + sort_cols => 'slave_io_running cxn', + colors => [ + { col => 'slave_io_running', op => 'ne', arg => 'Yes', color => 'black on_red' }, + ], + sort_dir => '1', + innodb => '', + group_by => [], + aggregate => 0, + }, + slave_sql_status => { + capt => 'Slave SQL Status', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + exec_master_log_pos => { src => 'exec_master_log_pos', hdr => 'Master Pos' }, + last_errno => { src => 'last_errno' }, + last_error => { src => 'last_error' }, + master_host => { src => 'master_host', hdr => 'Master' }, + relay_log_file => { src => 'relay_log_file' }, + relay_log_pos => { src => 'relay_log_pos' }, + relay_log_size => { src => 'relay_log_space', trans => [qw(shorten)] }, + relay_master_log_file => { src => 'relay_master_log_file', hdr => 'Master File' }, + replicate_do_db => { src => 'replicate_do_db' }, + replicate_do_table => { src => 'replicate_do_table' }, + replicate_ignore_db => { src => 'replicate_ignore_db' }, + replicate_ignore_table => { src => 'replicate_ignore_table' }, + replicate_wild_do_table => { src => 'replicate_wild_do_table' }, + replicate_wild_ignore_table => { src => 'replicate_wild_ignore_table' }, + skip_counter => { src => 'skip_counter' }, + slave_sql_running => { src => 'slave_sql_running', hdr => 'On?' }, + until_condition => { src => 'until_condition' }, + until_log_file => { src => 'until_log_file' }, + until_log_pos => { src => 'until_log_pos' }, + time_behind_master => { src => 'seconds_behind_master', trans => [ qw(secs_to_time) ] }, + bytes_behind_master => { src => 'master_log_file && master_log_file eq relay_master_log_file ? read_master_log_pos - exec_master_log_pos : 0', trans => [qw(shorten)] }, + slave_catchup_rate => { src => $exprs{SlaveCatchupRate}, trans => [ qw(set_precision) ] }, + slave_open_temp_tables => { src => 'Slave_open_temp_tables' }, + }, + visible => [ qw(cxn master_host slave_sql_running time_behind_master slave_catchup_rate slave_open_temp_tables relay_log_pos last_error)], + filters => [ qw( cxn_is_slave ) ], + sort_cols => 'slave_sql_running cxn', + sort_dir => '1', + innodb => '', + colors => [ + { col => 'slave_sql_running', op => 'ne', arg => 'Yes', color => 'black on_red' }, + { col => 'time_behind_master', op => '>', arg => 600, color => 'red' }, + { col => 'time_behind_master', op => '>', arg => 60, color => 'yellow' }, + { col => 'time_behind_master', op => '==', arg => 0, color => 'white' }, + ], + group_by => [], + aggregate => 0, + }, + t_header => { + capt => 'T-Mode Header', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + dirty_bufs => { src => $exprs{DirtyBufs}, trans => [qw(percent)] }, + history_list_len => { src => 'IB_tx_history_list_len' }, + lock_structs => { src => 'IB_tx_num_lock_structs' }, + num_txns => { src => $exprs{NumTxns} }, + max_txn => { src => $exprs{MaxTxnTime}, trans => [qw(secs_to_time)] }, + undo_for => { src => 'IB_tx_purge_undo_for' }, + used_bufs => { src => $exprs{BufPoolFill}, trans => [qw(percent)]}, + versions => { src => $exprs{OldVersions} }, + }, + visible => [ qw(cxn history_list_len versions undo_for dirty_bufs used_bufs num_txns max_txn lock_structs)], + filters => [ ], + sort_cols => 'cxn', + sort_dir => '1', + innodb => '', + colors => [], + hide_caption => 1, + group_by => [], + aggregate => 0, + }, + var_status => { + capt => 'Variables & Status', + cust => {}, + cols => {}, # Generated from current varset + visible => [], # Generated from current varset + filters => [], + sort_cols => '', + sort_dir => 1, + innodb => '', + temp => 1, # Do not persist to config file. + hide_caption => 1, + pivot => 0, + group_by => [], + aggregate => 0, + }, + wait_array => { + capt => 'InnoDB Wait Array', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + thread => { src => 'thread' }, + waited_at_filename => { src => 'waited_at_filename' }, + waited_at_line => { src => 'waited_at_line' }, + 'time' => { src => 'waited_secs', trans => [ qw(secs_to_time) ] }, + request_type => { src => 'request_type' }, + lock_mem_addr => { src => 'lock_mem_addr' }, + lock_cfile_name => { src => 'lock_cfile_name' }, + lock_cline => { src => 'lock_cline' }, + writer_thread => { src => 'writer_thread' }, + writer_lock_mode => { src => 'writer_lock_mode' }, + num_readers => { src => 'num_readers' }, + lock_var => { src => 'lock_var' }, + waiters_flag => { src => 'waiters_flag' }, + last_s_file_name => { src => 'last_s_file_name' }, + last_s_line => { src => 'last_s_line' }, + last_x_file_name => { src => 'last_x_file_name' }, + last_x_line => { src => 'last_x_line' }, + cell_waiting => { src => 'cell_waiting' }, + cell_event_set => { src => 'cell_event_set' }, + }, + visible => [ qw(cxn thread time waited_at_filename waited_at_line request_type num_readers lock_var waiters_flag cell_waiting cell_event_set)], + filters => [], + sort_cols => 'cxn -time', + sort_dir => '1', + innodb => 'sm', + group_by => [], + aggregate => 0, + }, +); + +# Initialize %tbl_meta from %columns and do some checks. +foreach my $table_name ( keys %tbl_meta ) { + my $table = $tbl_meta{$table_name}; + my $cols = $table->{cols}; + + foreach my $col_name ( keys %$cols ) { + my $col_def = $table->{cols}->{$col_name}; + die "I can't find a column named '$col_name' for '$table_name'" unless $columns{$col_name}; + $columns{$col_name}->{referenced} = 1; + + foreach my $prop ( keys %col_props ) { + # Each column gets non-existing values set from %columns or defaults from %col_props. + if ( !$col_def->{$prop} ) { + $col_def->{$prop} + = defined($columns{$col_name}->{$prop}) + ? $columns{$col_name}->{$prop} + : $col_props{$prop}; + } + } + + # Ensure transformations and aggregate functions are valid + die "Unknown aggregate function '$col_def->{agg}' " + . "for column '$col_name' in table '$table_name'" + unless exists $agg_funcs{$col_def->{agg}}; + foreach my $trans ( @{$col_def->{trans}} ) { + die "Unknown transformation '$trans' " + . "for column '$col_name' in table '$table_name'" + unless exists $trans_funcs{$trans}; + } + } + + # Ensure each column in visible and group_by exists in cols + foreach my $place ( qw(visible group_by) ) { + foreach my $col_name ( @{$table->{$place}} ) { + if ( !exists $cols->{$col_name} ) { + die "Column '$col_name' is listed in '$place' for '$table_name', but doesn't exist"; + } + } + } + + # Compile sort and color subroutines + $table->{sort_func} = make_sort_func($table); + $table->{color_func} = make_color_func($table); +} + +# This is for code cleanup: +{ + my @unused_cols = grep { !$columns{$_}->{referenced} } sort keys %columns; + if ( @unused_cols ) { + die "The following columns are not used: " + . join(' ', @unused_cols); + } +} + +# ########################################################################### +# Operating modes {{{3 +# ########################################################################### +my %modes = ( + B => { + hdr => 'InnoDB Buffers', + cust => {}, + note => 'Shows buffer info from InnoDB', + action_for => { + i => { + action => sub { toggle_config('status_inc') }, + label => 'Toggle incremental status display', + }, + }, + display_sub => \&display_B, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(buffer_pool page_statistics insert_buffers adaptive_hash_index)], + visible_tables => [qw(buffer_pool page_statistics insert_buffers adaptive_hash_index)], + }, + C => { + hdr => 'Command Summary', + cust => {}, + note => 'Shows relative magnitude of variables', + action_for => { + s => { + action => sub { get_config_interactive('cmd_filter') }, + label => 'Choose variable prefix', + }, + }, + display_sub => \&display_C, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(cmd_summary)], + visible_tables => [qw(cmd_summary)], + }, + D => { + hdr => 'InnoDB Deadlocks', + cust => {}, + note => 'View InnoDB deadlock information', + action_for => { + c => { + action => sub { edit_table('deadlock_transactions') }, + label => 'Choose visible columns', + }, + w => { + action => \&create_deadlock, + label => 'Wipe deadlock status info by creating a deadlock', + }, + }, + display_sub => \&display_D, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(deadlock_transactions deadlock_locks)], + visible_tables => [qw(deadlock_transactions deadlock_locks)], + }, + F => { + hdr => 'InnoDB FK Err', + cust => {}, + note => 'View the latest InnoDB foreign key error', + action_for => {}, + display_sub => \&display_F, + connections => [], + server_group => '', + one_connection => 1, + tables => [qw(fk_error)], + visible_tables => [qw(fk_error)], + }, + I => { + hdr => 'InnoDB I/O Info', + cust => {}, + note => 'Shows I/O info (i/o, log...) from InnoDB', + action_for => { + i => { + action => sub { toggle_config('status_inc') }, + label => 'Toggle incremental status display', + }, + }, + display_sub => \&display_I, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(io_threads pending_io file_io_misc log_statistics)], + visible_tables => [qw(io_threads pending_io file_io_misc log_statistics)], + }, + L => { + hdr => 'Locks', + cust => {}, + note => 'Shows transaction locks', + action_for => { + a => { + action => sub { send_cmd_to_servers('CREATE TABLE IF NOT EXISTS test.innodb_lock_monitor(a int) ENGINE=InnoDB', 0, '', []); }, + label => 'Start the InnoDB Lock Monitor', + }, + o => { + action => sub { send_cmd_to_servers('DROP TABLE IF EXISTS test.innodb_lock_monitor', 0, '', []); }, + label => 'Stop the InnoDB Lock Monitor', + }, + }, + display_sub => \&display_L, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(innodb_locks)], + visible_tables => [qw(innodb_locks)], + }, + M => { + hdr => 'Replication Status', + cust => {}, + note => 'Shows replication (master and slave) status', + action_for => { + a => { + action => sub { send_cmd_to_servers('START SLAVE', 0, 'START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE = ?, MASTER_LOG_POS = ?', []); }, + label => 'Start slave(s)', + }, + i => { + action => sub { toggle_config('status_inc') }, + label => 'Toggle incremental status display', + }, + o => { + action => sub { send_cmd_to_servers('STOP SLAVE', 0, '', []); }, + label => 'Stop slave(s)', + }, + b => { + action => sub { purge_master_logs() }, + label => 'Purge unused master logs', + }, + }, + display_sub => \&display_M, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(slave_sql_status slave_io_status master_status)], + visible_tables => [qw(slave_sql_status slave_io_status master_status)], + }, + O => { + hdr => 'Open Tables', + cust => {}, + note => 'Shows open tables in MySQL', + action_for => { + r => { + action => sub { reverse_sort('open_tables'); }, + label => 'Reverse sort order', + }, + s => { + action => sub { choose_sort_cols('open_tables'); }, + label => "Choose sort column", + }, + }, + display_sub => \&display_O, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(open_tables)], + visible_tables => [qw(open_tables)], + }, + Q => { + hdr => 'Query List', + cust => {}, + note => 'Shows queries from SHOW FULL PROCESSLIST', + action_for => { + a => { + action => sub { toggle_filter('processlist', 'hide_self') }, + label => 'Toggle the innotop process', + }, + c => { + action => sub { edit_table('processlist') }, + label => 'Choose visible columns', + }, + e => { + action => sub { analyze_query('e'); }, + label => "Explain a thread's query", + }, + f => { + action => sub { analyze_query('f'); }, + label => "Show a thread's full query", + }, + h => { + action => sub { toggle_visible_table('Q', 'q_header') }, + label => 'Toggle the header on and off', + }, + i => { + action => sub { toggle_filter('processlist', 'hide_inactive') }, + label => 'Toggle idle processes', + }, + k => { + action => sub { kill_query('CONNECTION') }, + label => "Kill a query's connection", + }, + r => { + action => sub { reverse_sort('processlist'); }, + label => 'Reverse sort order', + }, + s => { + action => sub { choose_sort_cols('processlist'); }, + label => "Change the display's sort column", + }, + x => { + action => sub { kill_query('QUERY') }, + label => "Kill a query", + }, + }, + display_sub => \&display_Q, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(q_header processlist)], + visible_tables => [qw(q_header processlist)], + }, + R => { + hdr => 'InnoDB Row Ops', + cust => {}, + note => 'Shows InnoDB row operation and semaphore info', + action_for => { + i => { + action => sub { toggle_config('status_inc') }, + label => 'Toggle incremental status display', + }, + }, + display_sub => \&display_R, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(row_operations row_operation_misc semaphores wait_array)], + visible_tables => [qw(row_operations row_operation_misc semaphores wait_array)], + }, + S => { + hdr => 'Variables & Status', + cust => {}, + note => 'Shows query load statistics a la vmstat', + action_for => { + '>' => { + action => sub { switch_var_set('S_set', 1) }, + label => 'Switch to next variable set', + }, + '<' => { + action => sub { switch_var_set('S_set', -1) }, + label => 'Switch to prev variable set', + }, + c => { + action => sub { + choose_var_set('S_set'); + start_S_mode(); + }, + label => "Choose which set to display", + }, + e => { + action => \&edit_current_var_set, + label => 'Edit the current set of variables', + }, + i => { + action => sub { $clear_screen_sub->(); toggle_config('status_inc') }, + label => 'Toggle incremental status display', + }, + '-' => { + action => sub { set_display_precision(-1) }, + label => 'Decrease fractional display precision', + }, + '+' => { + action => sub { set_display_precision(1) }, + label => 'Increase fractional display precision', + }, + g => { + action => sub { set_s_mode('g') }, + label => 'Switch to graph (tload) view', + }, + s => { + action => sub { set_s_mode('s') }, + label => 'Switch to standard (vmstat) view', + }, + v => { + action => sub { set_s_mode('v') }, + label => 'Switch to pivoted view', + }, + }, + display_sub => \&display_S, + no_clear_screen => 1, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(var_status)], + visible_tables => [qw(var_status)], + }, + T => { + hdr => 'InnoDB Txns', + cust => {}, + note => 'Shows InnoDB transactions in top-like format', + action_for => { + a => { + action => sub { toggle_filter('innodb_transactions', 'hide_self') }, + label => 'Toggle the innotop process', + }, + c => { + action => sub { edit_table('innodb_transactions') }, + label => 'Choose visible columns', + }, + e => { + action => sub { analyze_query('e'); }, + label => "Explain a thread's query", + }, + f => { + action => sub { analyze_query('f'); }, + label => "Show a thread's full query", + }, + h => { + action => sub { toggle_visible_table('T', 't_header') }, + label => 'Toggle the header on and off', + }, + i => { + action => sub { toggle_filter('innodb_transactions', 'hide_inactive') }, + label => 'Toggle inactive transactions', + }, + k => { + action => sub { kill_query('CONNECTION') }, + label => "Kill a transaction's connection", + }, + r => { + action => sub { reverse_sort('innodb_transactions'); }, + label => 'Reverse sort order', + }, + s => { + action => sub { choose_sort_cols('innodb_transactions'); }, + label => "Change the display's sort column", + }, + x => { + action => sub { kill_query('QUERY') }, + label => "Kill a query", + }, + }, + display_sub => \&display_T, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(t_header innodb_transactions)], + visible_tables => [qw(t_header innodb_transactions)], + }, +); + +# ########################################################################### +# Global key mappings {{{3 +# Keyed on a single character, which is read from the keyboard. Uppercase +# letters switch modes. Lowercase letters access commands when in a mode. +# These can be overridden by action_for in %modes. +# ########################################################################### +my %action_for = ( + '$' => { + action => \&edit_configuration, + label => 'Edit configuration settings', + }, + '?' => { + action => \&display_help, + label => 'Show help', + }, + '!' => { + action => \&display_license, + label => 'Show license and warranty', + }, + '^' => { + action => \&edit_table, + label => "Edit the displayed table(s)", + }, + '#' => { + action => \&choose_server_groups, + label => 'Select/create server groups', + }, + '@' => { + action => \&choose_servers, + label => 'Select/create server connections', + }, + '/' => { + action => \&add_quick_filter, + label => 'Quickly filter what you see', + }, + '\\' => { + action => \&clear_quick_filters, + label => 'Clear quick-filters', + }, + '%' => { + action => \&choose_filters, + label => 'Choose and edit table filters', + }, + "\t" => { + action => \&next_server_group, + label => 'Switch to the next server group', + key => 'TAB', + }, + '=' => { + action => \&toggle_aggregate, + label => 'Toggle aggregation', + }, + # TODO: can these be auto-generated from %modes? + B => { + action => sub { switch_mode('B') }, + label => '', + }, + C => { + action => sub { switch_mode('C') }, + label => '', + }, + D => { + action => sub { switch_mode('D') }, + label => '', + }, + F => { + action => sub { switch_mode('F') }, + label => '', + }, + I => { + action => sub { switch_mode('I') }, + label => '', + }, + L => { + action => sub { switch_mode('L') }, + label => '', + }, + M => { + action => sub { switch_mode('M') }, + label => '', + }, + O => { + action => sub { switch_mode('O') }, + label => '', + }, + Q => { + action => sub { switch_mode('Q') }, + label => '', + }, + R => { + action => sub { switch_mode('R') }, + label => '', + }, + S => { + action => \&start_S_mode, + label => '', + }, + T => { + action => sub { switch_mode('T') }, + label => '', + }, + d => { + action => sub { get_config_interactive('interval') }, + label => 'Change refresh interval', + }, + n => { action => \&next_server, label => 'Switch to the next connection' }, + p => { action => \&pause, label => 'Pause innotop', }, + q => { action => \&finish, label => 'Quit innotop', }, +); + +# ########################################################################### +# Sleep times after certain statements {{{3 +# ########################################################################### +my %stmt_sleep_time_for = (); + +# ########################################################################### +# Config editor key mappings {{{3 +# ########################################################################### +my %cfg_editor_action = ( + c => { + note => 'Edit columns, etc in the displayed table(s)', + func => \&edit_table, + }, + g => { + note => 'Edit general configuration', + func => \&edit_configuration_variables, + }, + k => { + note => 'Edit row-coloring rules', + func => \&edit_color_rules, + }, + p => { + note => 'Manage plugins', + func => \&edit_plugins, + }, + s => { + note => 'Edit server groups', + func => \&edit_server_groups, + }, + S => { + note => 'Edit SQL statement sleep delays', + func => \&edit_stmt_sleep_times, + }, + t => { + note => 'Choose which table(s) to display in this mode', + func => \&choose_mode_tables, + }, +); + +# ########################################################################### +# Color editor key mappings {{{3 +# ########################################################################### +my %color_editor_action = ( + n => { + note => 'Create a new color rule', + func => sub { + my ( $tbl, $idx ) = @_; + my $meta = $tbl_meta{$tbl}; + + $clear_screen_sub->(); + my $col; + do { + $col = prompt_list( + 'Choose the target column for the rule', + '', + sub { return keys %{$meta->{cols}} }, + { map { $_ => $meta->{cols}->{$_}->{label} } keys %{$meta->{cols}} }); + } while ( !$col ); + ( $col ) = grep { $_ } split(/\W+/, $col); + return $idx unless $col && exists $meta->{cols}->{$col}; + + $clear_screen_sub->(); + my $op; + do { + $op = prompt_list( + 'Choose the comparison operator for the rule', + '', + sub { return keys %comp_ops }, + { map { $_ => $comp_ops{$_} } keys %comp_ops } ); + } until ( $op ); + $op =~ s/\s+//g; + return $idx unless $op && exists $comp_ops{$op}; + + my $arg; + do { + $arg = prompt('Specify an argument for the comparison'); + } until defined $arg; + + my $color; + do { + $color = prompt_list( + 'Choose the color(s) the row should be when the rule matches', + '', + sub { return keys %ansicolors }, + { map { $_ => $_ } keys %ansicolors } ); + } until defined $color; + $color = join(' ', unique(grep { exists $ansicolors{$_} } split(/\W+/, $color))); + return $idx unless $color; + + push @{$tbl_meta{$tbl}->{colors}}, { + col => $col, + op => $op, + arg => $arg, + color => $color + }; + $tbl_meta{$tbl}->{cust}->{colors} = 1; + + return $idx; + }, + }, + d => { + note => 'Remove the selected rule', + func => sub { + my ( $tbl, $idx ) = @_; + my @rules = @{ $tbl_meta{$tbl}->{colors} }; + return 0 unless @rules > 0 && $idx < @rules && $idx >= 0; + splice(@{$tbl_meta{$tbl}->{colors}}, $idx, 1); + $tbl_meta{$tbl}->{cust}->{colors} = 1; + return $idx == @rules ? $#rules : $idx; + }, + }, + j => { + note => 'Move highlight down one', + func => sub { + my ( $tbl, $idx ) = @_; + my $num_rules = scalar @{$tbl_meta{$tbl}->{colors}}; + return ($idx + 1) % $num_rules; + }, + }, + k => { + note => 'Move highlight up one', + func => sub { + my ( $tbl, $idx ) = @_; + my $num_rules = scalar @{$tbl_meta{$tbl}->{colors}}; + return ($idx - 1) % $num_rules; + }, + }, + '+' => { + note => 'Move selected rule up one', + func => sub { + my ( $tbl, $idx ) = @_; + my $meta = $tbl_meta{$tbl}; + my $dest = $idx == 0 ? scalar(@{$meta->{colors}} - 1) : $idx - 1; + my $temp = $meta->{colors}->[$idx]; + $meta->{colors}->[$idx] = $meta->{colors}->[$dest]; + $meta->{colors}->[$dest] = $temp; + $meta->{cust}->{colors} = 1; + return $dest; + }, + }, + '-' => { + note => 'Move selected rule down one', + func => sub { + my ( $tbl, $idx ) = @_; + my $meta = $tbl_meta{$tbl}; + my $dest = $idx == scalar(@{$meta->{colors}} - 1) ? 0 : $idx + 1; + my $temp = $meta->{colors}->[$idx]; + $meta->{colors}->[$idx] = $meta->{colors}->[$dest]; + $meta->{colors}->[$dest] = $temp; + $meta->{cust}->{colors} = 1; + return $dest; + }, + }, +); + +# ########################################################################### +# Plugin editor key mappings {{{3 +# ########################################################################### +my %plugin_editor_action = ( + '*' => { + note => 'Toggle selected plugin active/inactive', + func => sub { + my ( $plugins, $idx ) = @_; + my $plugin = $plugins->[$idx]; + $plugin->{active} = $plugin->{active} ? 0 : 1; + return $idx; + }, + }, + j => { + note => 'Move highlight down one', + func => sub { + my ( $plugins, $idx ) = @_; + return ($idx + 1) % scalar(@$plugins); + }, + }, + k => { + note => 'Move highlight up one', + func => sub { + my ( $plugins, $idx ) = @_; + return $idx == 0 ? @$plugins - 1 : $idx - 1; + }, + }, +); + +# ########################################################################### +# Table editor key mappings {{{3 +# ########################################################################### +my %tbl_editor_action = ( + a => { + note => 'Add a column to the table', + func => sub { + my ( $tbl, $col ) = @_; + my @visible_cols = @{ $tbl_meta{$tbl}->{visible} }; + my %all_cols = %{ $tbl_meta{$tbl}->{cols} }; + delete @all_cols{@visible_cols}; + my $choice = prompt_list( + 'Choose a column', + '', + sub { return keys %all_cols; }, + { map { $_ => $all_cols{$_}->{label} || $all_cols{$_}->{hdr} } keys %all_cols }); + if ( $all_cols{$choice} ) { + push @{$tbl_meta{$tbl}->{visible}}, $choice; + $tbl_meta{$tbl}->{cust}->{visible} = 1; + return $choice; + } + return $col; + }, + }, + n => { + note => 'Create a new column and add it to the table', + func => sub { + my ( $tbl, $col ) = @_; + + $clear_screen_sub->(); + print word_wrap("Choose a name for the column. This name is not displayed, and is used only " + . "for internal reference. It can contain only lowercase letters, numbers, " + . "and underscores."); + print "\n\n"; + do { + $col = prompt("Enter column name"); + $col = '' if $col =~ m/[^a-z0-9_]/; + } while ( !$col ); + + $clear_screen_sub->(); + my $hdr; + do { + $hdr = prompt("Enter column header"); + } while ( !$hdr ); + + $clear_screen_sub->(); + print "Choose a source for the column's data\n\n"; + my ( $src, $sub, $err ); + do { + if ( $err ) { + print "Error: $err\n\n"; + } + $src = prompt("Enter column source"); + if ( $src ) { + ( $sub, $err ) = compile_expr($src); + } + } until ( !$err); + + # TODO: this duplicates %col_props. + $tbl_meta{$tbl}->{cols}->{$col} = { + hdr => $hdr, + src => $src, + just => '-', + num => 0, + label => 'User-defined', + user => 1, + tbl => $tbl, + minw => 0, + maxw => 0, + trans => [], + func => $sub, + dec => 0, + agg => 0, + aggonly => 0, + }; + + $tbl_meta{$tbl}->{visible} = [ unique(@{$tbl_meta{$tbl}->{visible}}, $col) ]; + $tbl_meta{$tbl}->{cust}->{visible} = 1; + return $col; + }, + }, + d => { + note => 'Remove selected column', + func => sub { + my ( $tbl, $col ) = @_; + my @visible_cols = @{ $tbl_meta{$tbl}->{visible} }; + my $idx = 0; + return $col unless @visible_cols > 1; + while ( $visible_cols[$idx] ne $col ) { + $idx++; + } + $tbl_meta{$tbl}->{visible} = [ grep { $_ ne $col } @visible_cols ]; + $tbl_meta{$tbl}->{cust}->{visible} = 1; + return $idx == $#visible_cols ? $visible_cols[$idx - 1] : $visible_cols[$idx + 1]; + }, + }, + e => { + note => 'Edit selected column', + func => sub { + # TODO: make this editor hotkey-driven and give readline support. + my ( $tbl, $col ) = @_; + $clear_screen_sub->(); + my $meta = $tbl_meta{$tbl}->{cols}->{$col}; + my @prop = qw(hdr label src just num minw maxw trans agg); # TODO redundant + + my $answer; + do { + # Do what the user asked... + if ( $answer && grep { $_ eq $answer } @prop ) { + # Some properties are arrays, others scalars. + my $ini = ref $col_props{$answer} ? join(' ', @{$meta->{$answer}}) : $meta->{$answer}; + my $val = prompt("New value for $answer", undef, $ini); + $val = [ split(' ', $val) ] if ref($col_props{$answer}); + if ( $answer eq 'trans' ) { + $val = [ unique(grep{ exists $trans_funcs{$_} } @$val) ]; + } + @{$meta}{$answer, 'user', 'tbl' } = ( $val, 1, $tbl ); + } + + my @display_lines = ( + '', + "You are editing column $tbl.$col.\n", + ); + + push @display_lines, create_table2( + \@prop, + { map { $_ => $_ } @prop }, + { map { $_ => ref $meta->{$_} eq 'ARRAY' ? join(' ', @{$meta->{$_}}) + : ref $meta->{$_} ? '[expression code]' + : $meta->{$_} + } @prop + }, + { sep => ' ' }); + draw_screen(\@display_lines, { raw => 1 }); + print "\n\n"; # One to add space, one to clear readline artifacts + $answer = prompt('Edit what? (q to quit)'); + } while ( $answer ne 'q' ); + + return $col; + }, + }, + j => { + note => 'Move highlight down one', + func => sub { + my ( $tbl, $col ) = @_; + my @visible_cols = @{ $tbl_meta{$tbl}->{visible} }; + my $idx = 0; + while ( $visible_cols[$idx] ne $col ) { + $idx++; + } + return $visible_cols[ ($idx + 1) % @visible_cols ]; + }, + }, + k => { + note => 'Move highlight up one', + func => sub { + my ( $tbl, $col ) = @_; + my @visible_cols = @{ $tbl_meta{$tbl}->{visible} }; + my $idx = 0; + while ( $visible_cols[$idx] ne $col ) { + $idx++; + } + return $visible_cols[ $idx - 1 ]; + }, + }, + '+' => { + note => 'Move selected column up one', + func => sub { + my ( $tbl, $col ) = @_; + my $meta = $tbl_meta{$tbl}; + my @visible_cols = @{$meta->{visible}}; + my $idx = 0; + while ( $visible_cols[$idx] ne $col ) { + $idx++; + } + if ( $idx ) { + $visible_cols[$idx] = $visible_cols[$idx - 1]; + $visible_cols[$idx - 1] = $col; + $meta->{visible} = \@visible_cols; + } + else { + shift @{$meta->{visible}}; + push @{$meta->{visible}}, $col; + } + $meta->{cust}->{visible} = 1; + return $col; + }, + }, + '-' => { + note => 'Move selected column down one', + func => sub { + my ( $tbl, $col ) = @_; + my $meta = $tbl_meta{$tbl}; + my @visible_cols = @{$meta->{visible}}; + my $idx = 0; + while ( $visible_cols[$idx] ne $col ) { + $idx++; + } + if ( $idx == $#visible_cols ) { + unshift @{$meta->{visible}}, $col; + pop @{$meta->{visible}}; + } + else { + $visible_cols[$idx] = $visible_cols[$idx + 1]; + $visible_cols[$idx + 1] = $col; + $meta->{visible} = \@visible_cols; + } + $meta->{cust}->{visible} = 1; + return $col; + }, + }, + f => { + note => 'Choose filters', + func => sub { + my ( $tbl, $col ) = @_; + choose_filters($tbl); + return $col; + }, + }, + o => { + note => 'Edit color rules', + func => sub { + my ( $tbl, $col ) = @_; + edit_color_rules($tbl); + return $col; + }, + }, + s => { + note => 'Choose sort columns', + func => sub { + my ( $tbl, $col ) = @_; + choose_sort_cols($tbl); + return $col; + }, + }, + g => { + note => 'Choose group-by (aggregate) columns', + func => sub { + my ( $tbl, $col ) = @_; + choose_group_cols($tbl); + return $col; + }, + }, +); + +# ########################################################################### +# Global variables and environment {{{2 +# ########################################################################### + +my @this_term_size; # w_chars, h_chars, w_pix, h_pix +my @last_term_size; # w_chars, h_chars, w_pix, h_pix +my $char; +my $windows = $OSNAME =~ m/MSWin/; +my $have_color = 0; +my $MAX_ULONG = 4294967295; # 2^32-1 +my $num_regex = qr/^[+-]?(?=\d|\.)\d*(?:\.\d+)?(?:E[+-]?\d+|)$/i; +my $int_regex = qr/^\d+$/; +my $bool_regex = qr/^[01]$/; +my $term = undef; +my $file = undef; # File to watch for InnoDB monitor output +my $file_mtime = undef; # Status of watched file +my $file_data = undef; # Last chunk of text read from file +my $innodb_parser = InnoDBParser->new; + +my $nonfatal_errs = join('|', + 'Access denied for user', + 'Unknown MySQL server host', + 'Unknown database', + 'Can\'t connect to local MySQL server through socket', + 'Can\'t connect to MySQL server on', + 'MySQL server has gone away', + 'Cannot call SHOW INNODB STATUS', + 'Access denied', + 'AutoCommit', +); + +if ( !$opts{n} ) { + require Term::ReadLine; + $term = Term::ReadLine->new('innotop'); +} + +# Stores status, variables, innodb status, master/slave status etc. +# Keyed on connection name. Each entry is a hashref of current and past data sets, +# keyed on clock tick. +my %vars; +my %info_gotten = (); # Which things have been retrieved for the current clock tick. + +# Stores info on currently displayed queries: cxn, connection ID, query text. +my @current_queries; + +my $lines_printed = 0; +my $clock = 0; # Incremented with every wake-sleep cycle +my $clearing_deadlocks = 0; + +# If terminal coloring is available, use it. The only function I want from +# the module is the colored() function. +eval { + if ( !$opts{n} ) { + if ( $windows ) { + require Win32::Console::ANSI; + } + require Term::ANSIColor; + import Term::ANSIColor qw(colored); + $have_color = 1; + } +}; +if ( $EVAL_ERROR || $opts{n} ) { + # If there was an error, manufacture my own colored() function that does no + # coloring. + *colored = sub { pop @_; @_; }; +} + +if ( $opts{n} ) { + $clear_screen_sub = sub {}; +} +elsif ( $windows ) { + $clear_screen_sub = sub { $lines_printed = 0; system("cls") }; +} +else { + my $clear = `clear`; + $clear_screen_sub = sub { $lines_printed = 0; print $clear }; +} + +# ########################################################################### +# Config storage. {{{2 +# ########################################################################### +my %config = ( + color => { + val => $have_color, + note => 'Whether to use terminal coloring', + conf => 'ALL', + pat => $bool_regex, + }, + cmd_filter => { + val => 'Com_', + note => 'Prefix for values in C mode', + conf => [qw(C)], + }, + plugin_dir => { + val => "$homepath/.innotop/plugins", + note => 'Directory where plugins can be found', + conf => 'ALL', + }, + show_percent => { + val => 1, + note => 'Show the % symbol after percentages', + conf => 'ALL', + pat => $bool_regex, + }, + skip_innodb => { + val => 0, + note => 'Disable SHOW INNODB STATUS', + conf => 'ALL', + pat => $bool_regex, + }, + S_func => { + val => 's', + note => 'What to display in S mode: graph, status, pivoted status', + conf => [qw(S)], + pat => qr/^[gsv]$/, + }, + cxn_timeout => { + val => 28800, + note => 'Connection timeout for keeping unused connections alive', + conf => 'ALL', + pat => $int_regex, + }, + graph_char => { + val => '*', + note => 'Character for drawing graphs', + conf => [ qw(S) ], + pat => qr/^.$/, + }, + show_cxn_errors_in_tbl => { + val => 1, + note => 'Whether to display connection errors as rows in the table', + conf => 'ALL', + pat => $bool_regex, + }, + hide_hdr => { + val => 0, + note => 'Whether to show column headers', + conf => 'ALL', + pat => $bool_regex, + }, + show_cxn_errors => { + val => 1, + note => 'Whether to print connection errors to STDOUT', + conf => 'ALL', + pat => $bool_regex, + }, + readonly => { + val => 1, + note => 'Whether the config file is read-only', + conf => [ qw() ], + pat => $bool_regex, + }, + global => { + val => 1, + note => 'Whether to show GLOBAL variables and status', + conf => 'ALL', + pat => $bool_regex, + }, + header_highlight => { + val => 'bold', + note => 'How to highlight table column headers', + conf => 'ALL', + pat => qr/^(?:bold|underline)$/, + }, + display_table_captions => { + val => 1, + note => 'Whether to put captions on tables', + conf => 'ALL', + pat => $bool_regex, + }, + charset => { + val => 'ascii', + note => 'What type of characters should be displayed in queries (ascii, unicode, none)', + conf => 'ALL', + pat => qr/^(?:ascii|unicode|none)$/, + }, + auto_wipe_dl => { + val => 0, + note => 'Whether to auto-wipe InnoDB deadlocks', + conf => 'ALL', + pat => $bool_regex, + }, + max_height => { + val => 30, + note => '[Win32] Max window height', + conf => 'ALL', + }, + debug => { + val => 0, + pat => $bool_regex, + note => 'Debug mode (more verbose errors, uses more memory)', + conf => 'ALL', + }, + num_digits => { + val => 2, + pat => $int_regex, + note => 'How many digits to show in fractional numbers and percents', + conf => 'ALL', + }, + debugfile => { + val => "$homepath/.innotop/core_dump", + note => 'A debug file in case you are interested in error output', + }, + show_statusbar => { + val => 1, + pat => $bool_regex, + note => 'Whether to show the status bar in the display', + conf => 'ALL', + }, + mode => { + val => "Q", + note => "Which mode to start in", + cmdline => 1, + }, + status_inc => { + val => 0, + note => 'Whether to show raw or incremental values for status variables', + pat => $bool_regex, + }, + interval => { + val => 10, + pat => qr/^(?:(?:\d*?[1-9]\d*(?:\.\d*)?)|(?:\d*\.\d*?[1-9]\d*))$/, + note => "The interval at which the display will be refreshed. Fractional values allowed.", + }, + num_status_sets => { + val => 9, + pat => $int_regex, + note => 'How many sets of STATUS and VARIABLES values to show', + conf => [ qw(S) ], + }, + S_set => { + val => 'general', + pat => qr/^\w+$/, + note => 'Which set of variables to display in S (Variables & Status) mode', + conf => [ qw(S) ], + }, +); + +# ########################################################################### +# Config file sections {{{2 +# The configuration file is broken up into sections like a .ini file. This +# variable defines those sections and the subroutines responsible for reading +# and writing them. +# ########################################################################### +my %config_file_sections = ( + plugins => { + reader => \&load_config_plugins, + writer => \&save_config_plugins, + }, + group_by => { + reader => \&load_config_group_by, + writer => \&save_config_group_by, + }, + filters => { + reader => \&load_config_filters, + writer => \&save_config_filters, + }, + active_filters => { + reader => \&load_config_active_filters, + writer => \&save_config_active_filters, + }, + visible_tables => { + reader => \&load_config_visible_tables, + writer => \&save_config_visible_tables, + }, + sort_cols => { + reader => \&load_config_sort_cols, + writer => \&save_config_sort_cols, + }, + active_columns => { + reader => \&load_config_active_columns, + writer => \&save_config_active_columns, + }, + tbl_meta => { + reader => \&load_config_tbl_meta, + writer => \&save_config_tbl_meta, + }, + general => { + reader => \&load_config_config, + writer => \&save_config_config, + }, + connections => { + reader => \&load_config_connections, + writer => \&save_config_connections, + }, + active_connections => { + reader => \&load_config_active_connections, + writer => \&save_config_active_connections, + }, + server_groups => { + reader => \&load_config_server_groups, + writer => \&save_config_server_groups, + }, + active_server_groups => { + reader => \&load_config_active_server_groups, + writer => \&save_config_active_server_groups, + }, + max_values_seen => { + reader => \&load_config_mvs, + writer => \&save_config_mvs, + }, + varsets => { + reader => \&load_config_varsets, + writer => \&save_config_varsets, + }, + colors => { + reader => \&load_config_colors, + writer => \&save_config_colors, + }, + stmt_sleep_times => { + reader => \&load_config_stmt_sleep_times, + writer => \&save_config_stmt_sleep_times, + }, +); + +# Config file sections have some dependencies, so they have to be read/written in order. +my @ordered_config_file_sections = qw(general plugins filters active_filters tbl_meta + connections active_connections server_groups active_server_groups max_values_seen + active_columns sort_cols visible_tables varsets colors stmt_sleep_times + group_by); + +# All events for which plugins may register themselves. Entries are arrayrefs. +my %event_listener_for = map { $_ => [] } + qw( + extract_values + set_to_tbl_pre_filter set_to_tbl_pre_sort set_to_tbl_pre_group + set_to_tbl_pre_colorize set_to_tbl_pre_transform set_to_tbl_pre_pivot + set_to_tbl_pre_create set_to_tbl_post_create + draw_screen + ); + +# All variables to which plugins have access. +my %pluggable_vars = ( + action_for => \%action_for, + agg_funcs => \%agg_funcs, + config => \%config, + connections => \%connections, + dbhs => \%dbhs, + filters => \%filters, + modes => \%modes, + server_groups => \%server_groups, + tbl_meta => \%tbl_meta, + trans_funcs => \%trans_funcs, + var_sets => \%var_sets, +); + +# ########################################################################### +# Contains logic to generate prepared statements for a given function for a +# given DB connection. Returns a $sth. +# ########################################################################### +my %stmt_maker_for = ( + INNODB_STATUS => sub { + my ( $dbh ) = @_; + return $dbh->prepare(version_ge( $dbh, '5.0.0' ) + ? 'SHOW ENGINE INNODB STATUS' + : 'SHOW INNODB STATUS'); + }, + SHOW_VARIABLES => sub { + my ( $dbh ) = @_; + return $dbh->prepare($config{global}->{val} && version_ge( $dbh, '4.0.3' ) + ? 'SHOW GLOBAL VARIABLES' + : 'SHOW VARIABLES'); + }, + SHOW_STATUS => sub { + my ( $dbh ) = @_; + return $dbh->prepare($config{global}->{val} && version_ge( $dbh, '5.0.2' ) + ? 'SHOW GLOBAL STATUS' + : 'SHOW STATUS'); + }, + KILL_QUERY => sub { + my ( $dbh ) = @_; + return $dbh->prepare(version_ge( $dbh, '5.0.0' ) + ? 'KILL QUERY ?' + : 'KILL ?'); + }, + SHOW_MASTER_LOGS => sub { + my ( $dbh ) = @_; + return $dbh->prepare('SHOW MASTER LOGS'); + }, + SHOW_MASTER_STATUS => sub { + my ( $dbh ) = @_; + return $dbh->prepare('SHOW MASTER STATUS'); + }, + SHOW_SLAVE_STATUS => sub { + my ( $dbh ) = @_; + return $dbh->prepare('SHOW SLAVE STATUS'); + }, + KILL_CONNECTION => sub { + my ( $dbh ) = @_; + return $dbh->prepare(version_ge( $dbh, '5.0.0' ) + ? 'KILL CONNECTION ?' + : 'KILL ?'); + }, + OPEN_TABLES => sub { + my ( $dbh ) = @_; + return version_ge($dbh, '4.0.0') + ? $dbh->prepare('SHOW OPEN TABLES') + : undef; + }, + PROCESSLIST => sub { + my ( $dbh ) = @_; + return $dbh->prepare('SHOW FULL PROCESSLIST'); + }, +); + +# Plugins! +my %plugins = ( +); + +# ########################################################################### +# Run the program {{{1 +# ########################################################################### + +# This config variable is only useful for MS Windows because its terminal +# can't tell how tall it is. +if ( !$windows ) { + delete $config{max_height}; +} + +# Try to lower my priority. +eval { setpriority(0, 0, getpriority(0, 0) + 10); }; + +# Print stuff to the screen immediately, don't wait for a newline. +$OUTPUT_AUTOFLUSH = 1; + +# Clear the screen and load the configuration. +$clear_screen_sub->(); +load_config(); + +# Override config variables with command-line options +my %cmdline = + map { $_->{c} => $opts{$_->{k}} } + grep { exists $_->{c} && exists $opts{$_->{k}} } + @opt_spec; + +foreach my $name (keys %cmdline) { + next if not defined $cmdline{$name}; + my $val = $cmdline{$name}; + if ( exists($config{$name}) and (!$config{$name}->{pat} or $val =~ m/$config{$name}->{pat}/ )) { + $config{$name}->{val} = $val; + } +} + +post_process_tbl_meta(); + +# Make sure no changes are written to config file in non-interactive mode. +if ( $opts{n} ) { + $config{readonly}->{val} = 1; +} + +eval { + + # Open the file for InnoDB status + if ( @ARGV ) { + my $filename = shift @ARGV; + open $file, "<", $filename + or die "Cannot open '$filename': $OS_ERROR"; + } + + # In certain modes we might have to collect data for two cycles + # before printing anything out, so we need to bump up the count one. + if ( $opts{n} && $opts{count} && $config{status_inc}->{val} + && $config{mode}->{val} =~ m/[S]/ ) + { + $opts{count}++; + } + + while (++$clock) { + + my $mode = $config{mode}->{val} || 'Q'; + if ( !$modes{$mode} ) { + die "Mode '$mode' doesn't exist; try one of these:\n" + . join("\n", map { " $_ $modes{$_}->{hdr}" } sort keys %modes) + . "\n"; + } + + if ( !$opts{n} ) { + @last_term_size = @this_term_size; + @this_term_size = Term::ReadKey::GetTerminalSize(\*STDOUT); + if ( $windows ) { + $this_term_size[0]--; + $this_term_size[1] + = min($this_term_size[1], $config{max_height}->{val}); + } + die("Can't read terminal size") unless @this_term_size; + } + + # If there's no connection to a database server, we need to fix that... + if ( !%connections ) { + print "You have not defined any database connections.\n\n"; + add_new_dsn(); + } + + # See whether there are any connections defined for this mode. If there's only one + # connection total, assume the user wants to just use innotop for a single server + # and don't ask which server to connect to. Also, if we're monitoring from a file, + # we just use the first connection. + if ( !get_connections() ) { + if ( $file || 1 == scalar keys %connections ) { + $modes{$config{mode}->{val}}->{connections} = [ keys %connections ]; + } + else { + choose_connections(); + } + } + + # Term::ReadLine might have re-set $OUTPUT_AUTOFLUSH. + $OUTPUT_AUTOFLUSH = 1; + + # Prune old data + my $sets = $config{num_status_sets}->{val}; + foreach my $store ( values %vars ) { + delete @{$store}{ grep { $_ < $clock - $sets } keys %$store }; + } + %info_gotten = (); + + # Call the subroutine to display this mode. + $modes{$mode}->{display_sub}->(); + + # It may be time to quit now. + if ( $opts{count} && $clock >= $opts{count} ) { + finish(); + } + + # Wait for a bit. + if ( $opts{n} ) { + sleep($config{interval}->{val}); + } + else { + ReadMode('cbreak'); + $char = ReadKey($config{interval}->{val}); + ReadMode('normal'); + } + + # Handle whatever action the key indicates. + do_key_action(); + + } +}; +if ( $EVAL_ERROR ) { + core_dump( $EVAL_ERROR ); +} +finish(); + +# Subroutines {{{1 +# Mode functions{{{2 +# switch_mode {{{3 +sub switch_mode { + my $mode = shift; + $config{mode}->{val} = $mode; +} + +# Prompting functions {{{2 +# prompt_list {{{3 +# Prompts the user for a value, given a question, initial value, +# a completion function and a hashref of hints. +sub prompt_list { + die "Can't call in non-interactive mode" if $opts{n}; + my ( $question, $init, $completion, $hints ) = @_; + if ( $hints ) { + # Figure out how wide the table will be + my $max_name = max(map { length($_) } keys %$hints ); + $max_name ||= 0; + $max_name += 3; + my @meta_rows = create_table2( + [ sort keys %$hints ], + { map { $_ => $_ } keys %$hints }, + { map { $_ => trunc($hints->{$_}, $this_term_size[0] - $max_name) } keys %$hints }, + { sep => ' ' }); + if (@meta_rows > 10) { + # Try to split and stack the meta rows next to each other + my $split = int(@meta_rows / 2); + @meta_rows = stack_next( + [@meta_rows[0..$split - 1]], + [@meta_rows[$split..$#meta_rows]], + { pad => ' | '}, + ); + } + print join( "\n", + '', + map { ref $_ ? colored(@$_) : $_ } create_caption('Choose from', @meta_rows), ''), + "\n"; + } + $term->Attribs->{completion_function} = $completion; + my $answer = $term->readline("$question: ", $init); + $OUTPUT_AUTOFLUSH = 1; + $answer = '' if !defined($answer); + $answer =~ s/\s+$//; + return $answer; +} + +# prompt {{{3 +# Prints out a prompt and reads from the keyboard, then validates with the +# validation regex until the input is correct. +sub prompt { + die "Can't call in non-interactive mode" if $opts{n}; + my ( $prompt, $regex, $init, $completion ) = @_; + my $response; + my $success = 0; + do { + if ( $completion ) { + $term->Attribs->{completion_function} = $completion; + } + $response = $term->readline("$prompt: ", $init); + if ( $regex && $response !~ m/$regex/ ) { + print "Invalid response.\n\n"; + } + else { + $success = 1; + } + } while ( !$success ); + $OUTPUT_AUTOFLUSH = 1; + $response =~ s/\s+$//; + return $response; +} + +# prompt_noecho {{{3 +# Unfortunately, suppressing echo with Term::ReadLine isn't reliable; the user might not +# have that library, or it might not support that feature. +sub prompt_noecho { + my ( $prompt ) = @_; + print colored("$prompt: ", 'underline'); + my $response; + ReadMode('noecho'); + $response = ; + chomp($response); + ReadMode('normal'); + return $response; +} + +# do_key_action {{{3 +# Depending on whether a key was read, do something. Keys have certain +# actions defined in lookup tables. Each mode may have its own lookup table, +# which trumps the global table -- so keys can be context-sensitive. The key +# may be read and written in a subroutine, so it's a global. +sub do_key_action { + if ( defined $char ) { + my $mode = $config{mode}->{val}; + my $action + = defined($modes{$mode}->{action_for}->{$char}) + ? $modes{$mode}->{action_for}->{$char}->{action} + : defined($action_for{$char}) + ? $action_for{$char}->{action} + : sub{}; + $action->(); + } +} + +# pause {{{3 +sub pause { + die "Can't call in non-interactive mode" if $opts{n}; + my $msg = shift; + print defined($msg) ? "\n$msg" : "\nPress any key to continue"; + ReadMode('cbreak'); + my $char = ReadKey(0); + ReadMode('normal'); + return $char; +} + +# reverse_sort {{{3 +sub reverse_sort { + my $tbl = shift; + $tbl_meta{$tbl}->{sort_dir} *= -1; +} + +# select_cxn {{{3 +# Selects connection(s). If the mode (or argument list) has only one, returns +# it without prompt. +sub select_cxn { + my ( $prompt, @cxns ) = @_; + if ( !@cxns ) { + @cxns = get_connections(); + } + if ( @cxns == 1 ) { + return $cxns[0]; + } + my $choices = prompt_list( + $prompt, + $cxns[0], + sub{ return @cxns }, + { map { $_ => $connections{$_}->{dsn} } @cxns }); + my @result = unique(grep { my $a = $_; grep { $_ eq $a } @cxns } split(/\s+/, $choices)); + return @result; +} + +# kill_query {{{3 +# Kills a connection, or on new versions, optionally a query but not connection. +sub kill_query { + my ( $q_or_c ) = @_; + + my $info = choose_thread( + sub { 1 }, + 'Select a thread to kill the ' . $q_or_c, + ); + return unless $info; + return unless pause("Kill $info->{id}?") =~ m/y/i; + + eval { + do_stmt($info->{cxn}, $q_or_c eq 'QUERY' ? 'KILL_QUERY' : 'KILL_CONNECTION', $info->{id} ); + }; + + if ( $EVAL_ERROR ) { + print "\nError: $EVAL_ERROR"; + pause(); + } +} + +# set_display_precision {{{3 +sub set_display_precision { + my $dir = shift; + $config{num_digits}->{val} = min(9, max(0, $config{num_digits}->{val} + $dir)); +} + +sub toggle_visible_table { + my ( $mode, $table ) = @_; + my $visible = $modes{$mode}->{visible_tables}; + if ( grep { $_ eq $table } @$visible ) { + $modes{$mode}->{visible_tables} = [ grep { $_ ne $table } @$visible ]; + } + else { + unshift @$visible, $table; + } + $modes{$mode}->{cust}->{visible_tables} = 1; +} + +# toggle_filter{{{3 +sub toggle_filter { + my ( $tbl, $filter ) = @_; + my $filters = $tbl_meta{$tbl}->{filters}; + if ( grep { $_ eq $filter } @$filters ) { + $tbl_meta{$tbl}->{filters} = [ grep { $_ ne $filter } @$filters ]; + } + else { + push @$filters, $filter; + } + $tbl_meta{$tbl}->{cust}->{filters} = 1; +} + +# toggle_config {{{3 +sub toggle_config { + my ( $key ) = @_; + $config{$key}->{val} ^= 1; +} + +# create_deadlock {{{3 +sub create_deadlock { + $clear_screen_sub->(); + + print "This function will deliberately cause a small deadlock, " + . "clearing deadlock information from the InnoDB monitor.\n\n"; + + my $answer = prompt("Are you sure you want to proceed? Say 'y' if you do"); + return 0 unless $answer eq 'y'; + + my ( $cxn ) = select_cxn('Clear on which server? '); + return unless $cxn && exists($connections{$cxn}); + + clear_deadlock($cxn); +} + +# deadlock_thread {{{3 +sub deadlock_thread { + my ( $id, $tbl, $cxn ) = @_; + + eval { + my $dbh = get_new_db_connection($cxn, 1); + my @stmts = ( + "set transaction isolation level serializable", + (version_ge($dbh, '4.0.11') ? "start transaction" : 'begin'), + "select * from $tbl where a = $id", + "update $tbl set a = $id where a <> $id", + ); + + foreach my $stmt (@stmts[0..2]) { + $dbh->do($stmt); + } + sleep(1 + $id); + $dbh->do($stmts[-1]); + }; + if ( $EVAL_ERROR ) { + if ( $EVAL_ERROR !~ m/Deadlock found/ ) { + die $EVAL_ERROR; + } + } + exit(0); +} + +# Purges unused binlogs on the master, up to but not including the latest log. +# TODO: guess which connections are slaves of a given master. +sub purge_master_logs { + my @cxns = get_connections(); + + get_master_slave_status(@cxns); + + # Toss out the rows that don't have master/slave status... + my @vars = + grep { $_ && ($_->{file} || $_->{master_host}) } + map { $vars{$_}->{$clock} } @cxns; + @cxns = map { $_->{cxn} } @vars; + + # Figure out which master to purge ons. + my @masters = map { $_->{cxn} } grep { $_->{file} } @vars; + my ( $master ) = select_cxn('Which master?', @masters ); + return unless $master; + my ($master_status) = grep { $_->{cxn} eq $master } @vars; + + # Figure out the result order (not lexical order) of master logs. + my @master_logs = get_master_logs($master); + my $i = 0; + my %master_logs = map { $_->{log_name} => $i++ } @master_logs; + + # Ask which slave(s) are reading from this master. + my @slave_status = grep { $_->{master_host} } @vars; + my @slaves = map { $_->{cxn} } @slave_status; + @slaves = select_cxn("Which slaves are reading from $master?", @slaves); + @slave_status = grep { my $item = $_; grep { $item->{cxn} eq $_ } @slaves } @slave_status; + return unless @slave_status; + + # Find the minimum binary log in use. + my $min_log = min(map { $master_logs{$_->{master_log_file}} } @slave_status); + my $log_name = $master_logs[$min_log]->{log_name}; + + my $stmt = "PURGE MASTER LOGS TO '$log_name'"; + send_cmd_to_servers($stmt, 0, 'PURGE {MASTER | BINARY} LOGS {TO "log_name" | BEFORE "date"}', [$master]); +} + +sub send_cmd_to_servers { + my ( $cmd, $all, $hint, $cxns ) = @_; + if ( $all ) { + @$cxns = get_connections(); + } + elsif ( !@$cxns ) { + @$cxns = select_cxn('Which servers?', @$cxns); + } + if ( $hint ) { + print "\nHint: $hint\n"; + } + $cmd = prompt('Command to send', undef, $cmd); + foreach my $cxn ( @$cxns ) { + eval { + my $sth = do_query($cxn, $cmd); + }; + if ( $EVAL_ERROR ) { + print "Error from $cxn: $EVAL_ERROR\n"; + } + else { + print "Success on $cxn\n"; + } + } + pause(); +} + +# Display functions {{{2 + +sub set_s_mode { + my ( $func ) = @_; + $clear_screen_sub->(); + $config{S_func}->{val} = $func; +} + +# start_S_mode {{{3 +sub start_S_mode { + $clear_screen_sub->(); + switch_mode('S'); +} + +# display_B {{{3 +sub display_B { + my @display_lines; + my @cxns = get_connections(); + get_innodb_status(\@cxns); + + my @buffer_pool; + my @page_statistics; + my @insert_buffers; + my @adaptive_hash_index; + my %rows_for = ( + buffer_pool => \@buffer_pool, + page_statistics => \@page_statistics, + insert_buffers => \@insert_buffers, + adaptive_hash_index => \@adaptive_hash_index, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + foreach my $cxn ( @cxns ) { + my $set = $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock-1} || $set; + + if ( $set->{IB_bp_complete} ) { + if ( $wanted{buffer_pool} ) { + push @buffer_pool, extract_values($set, $set, $pre, 'buffer_pool'); + } + if ( $wanted{page_statistics} ) { + push @page_statistics, extract_values($set, $set, $pre, 'page_statistics'); + } + } + if ( $set->{IB_ib_complete} ) { + if ( $wanted{insert_buffers} ) { + push @insert_buffers, extract_values( + $config{status_inc}->{val} ? inc(0, $cxn) : $set, $set, $pre, + 'insert_buffers'); + } + if ( $wanted{adaptive_hash_index} ) { + push @adaptive_hash_index, extract_values($set, $set, $pre, 'adaptive_hash_index'); + } + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_C {{{3 +sub display_C { + my @display_lines; + my @cxns = get_connections(); + get_status_info(@cxns); + + my @cmd_summary; + my %rows_for = ( + cmd_summary => \@cmd_summary, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + # For now, I'm manually pulling these variables out and pivoting. Eventually a SQL-ish + # dialect should let me join a table to a grouped and pivoted table and do this more easily. + # TODO: make it so. + my $prefix = qr/^$config{cmd_filter}->{val}/; # TODO: this is a total hack + my @values; + my ($total, $last_total) = (0, 0); + foreach my $cxn ( @cxns ) { + my $set = $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock-1} || $set; + foreach my $key ( keys %$set ) { + next unless $key =~ m/$prefix/i; + my $val = $set->{$key}; + next unless defined $val && $val =~ m/^\d+$/; + my $last_val = $val - ($pre->{$key} || 0); + $total += $val; + $last_total += $last_val; + push @values, { + name => $key, + value => $val, + last_value => $last_val, + }; + } + } + + # Add aggregation and turn into a real set TODO: total hack + if ( $wanted{cmd_summary} ) { + foreach my $value ( @values ) { + @{$value}{qw(total last_total)} = ($total, $last_total); + push @cmd_summary, extract_values($value, $value, $value, 'cmd_summary'); + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_D {{{3 +sub display_D { + my @display_lines; + my @cxns = get_connections(); + get_innodb_status(\@cxns); + + my @deadlock_transactions; + my @deadlock_locks; + my %rows_for = ( + deadlock_transactions => \@deadlock_transactions, + deadlock_locks => \@deadlock_locks, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + foreach my $cxn ( @cxns ) { + my $innodb_status = $vars{$cxn}->{$clock}; + my $prev_status = $vars{$cxn}->{$clock-1} || $innodb_status; + + if ( $innodb_status->{IB_dl_timestring} ) { + + my $victim = $innodb_status->{IB_dl_rolled_back} || 0; + + if ( %wanted ) { + foreach my $txn_id ( keys %{$innodb_status->{IB_dl_txns}} ) { + my $txn = $innodb_status->{IB_dl_txns}->{$txn_id}; + my $pre = $prev_status->{IB_dl_txns}->{$txn_id} || $txn; + + if ( $wanted{deadlock_transactions} ) { + my $hash = extract_values($txn->{tx}, $txn->{tx}, $pre->{tx}, 'deadlock_transactions'); + $hash->{cxn} = $cxn; + $hash->{dl_txn_num} = $txn_id; + $hash->{victim} = $txn_id == $victim ? 'Yes' : 'No'; + $hash->{timestring} = $innodb_status->{IB_dl_timestring}; + $hash->{truncates} = $innodb_status->{IB_dl_complete} ? 'No' : 'Yes'; + push @deadlock_transactions, $hash; + } + + if ( $wanted{deadlock_locks} ) { + foreach my $lock ( @{$txn->{locks}} ) { + my $hash = extract_values($lock, $lock, $lock, 'deadlock_locks'); + $hash->{dl_txn_num} = $txn_id; + $hash->{cxn} = $cxn; + $hash->{mysql_thread_id} = $txn->{tx}->{mysql_thread_id}; + push @deadlock_locks, $hash; + } + } + + } + } + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_F {{{3 +sub display_F { + my @display_lines; + my ( $cxn ) = get_connections(); + get_innodb_status([$cxn]); + my $innodb_status = $vars{$cxn}->{$clock}; + + if ( $innodb_status->{IB_fk_timestring} ) { + + push @display_lines, 'Reason: ' . $innodb_status->{IB_fk_reason}; + + # Display FK errors caused by invalid DML. + if ( $innodb_status->{IB_fk_txn} ) { + my $txn = $innodb_status->{IB_fk_txn}; + push @display_lines, + '', + "User $txn->{user} from $txn->{hostname}, thread $txn->{mysql_thread_id} was executing:", + '', no_ctrl_char($txn->{query_text}); + } + + my @fk_table = create_table2( + $tbl_meta{fk_error}->{visible}, + meta_to_hdr('fk_error'), + extract_values($innodb_status, $innodb_status, $innodb_status, 'fk_error'), + { just => '-', sep => ' '}); + push @display_lines, '', @fk_table; + + } + else { + push @display_lines, '', 'No foreign key error data.'; + } + draw_screen(\@display_lines, { raw => 1 } ); +} + +# display_I {{{3 +sub display_I { + my @display_lines; + my @cxns = get_connections(); + get_innodb_status(\@cxns); + + my @io_threads; + my @pending_io; + my @file_io_misc; + my @log_statistics; + my %rows_for = ( + io_threads => \@io_threads, + pending_io => \@pending_io, + file_io_misc => \@file_io_misc, + log_statistics => \@log_statistics, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + foreach my $cxn ( @cxns ) { + my $set = $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock-1} || $set; + + if ( $set->{IB_io_complete} ) { + if ( $wanted{io_threads} ) { + my $cur_threads = $set->{IB_io_threads}; + my $pre_threads = $pre->{IB_io_threads} || $cur_threads; + foreach my $key ( sort keys %$cur_threads ) { + my $cur_thd = $cur_threads->{$key}; + my $pre_thd = $pre_threads->{$key} || $cur_thd; + my $hash = extract_values($cur_thd, $cur_thd, $pre_thd, 'io_threads'); + $hash->{cxn} = $cxn; + push @io_threads, $hash; + } + } + if ( $wanted{pending_io} ) { + push @pending_io, extract_values($set, $set, $pre, 'pending_io'); + } + if ( $wanted{file_io_misc} ) { + push @file_io_misc, extract_values( + $config{status_inc}->{val} ? inc(0, $cxn) : $set, + $set, $pre, 'file_io_misc'); + } + } + if ( $set->{IB_lg_complete} && $wanted{log_statistics} ) { + push @log_statistics, extract_values($set, $set, $pre, 'log_statistics'); + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_L {{{3 +sub display_L { + my @display_lines; + my @cxns = get_connections(); + get_innodb_status(\@cxns); + + my @innodb_locks; + my %rows_for = ( + innodb_locks => \@innodb_locks, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + # Get info on locks + foreach my $cxn ( @cxns ) { + my $set = $vars{$cxn}->{$clock} or next; + my $pre = $vars{$cxn}->{$clock-1} || $set; + + if ( $wanted{innodb_locks} && defined $set->{IB_tx_transactions} && @{$set->{IB_tx_transactions}} ) { + + my $cur_txns = $set->{IB_tx_transactions}; + my $pre_txns = $pre->{IB_tx_transactions} || $cur_txns; + my %cur_txns = map { $_->{mysql_thread_id} => $_ } @$cur_txns; + my %pre_txns = map { $_->{mysql_thread_id} => $_ } @$pre_txns; + foreach my $txn ( @$cur_txns ) { + foreach my $lock ( @{$txn->{locks}} ) { + my %hash = map { $_ => $txn->{$_} } qw(txn_id mysql_thread_id lock_wait_time active_secs); + map { $hash{$_} = $lock->{$_} } qw(lock_type space_id page_no n_bits index db table txn_id lock_mode special insert_intention waiting); + $hash{cxn} = $cxn; + push @innodb_locks, extract_values(\%hash, \%hash, \%hash, 'innodb_locks'); + } + } + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_M {{{3 +sub display_M { + my @display_lines; + my @cxns = get_connections(); + get_master_slave_status(@cxns); + get_status_info(@cxns); + + my @slave_sql_status; + my @slave_io_status; + my @master_status; + my %rows_for = ( + slave_sql_status => \@slave_sql_status, + slave_io_status => \@slave_io_status, + master_status => \@master_status, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + foreach my $cxn ( @cxns ) { + my $set = $config{status_inc}->{val} ? inc(0, $cxn) : $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock - 1} || $set; + if ( $wanted{slave_sql_status} ) { + push @slave_sql_status, extract_values($set, $set, $pre, 'slave_sql_status'); + } + if ( $wanted{slave_io_status} ) { + push @slave_io_status, extract_values($set, $set, $pre, 'slave_io_status'); + } + if ( $wanted{master_status} ) { + push @master_status, extract_values($set, $set, $pre, 'master_status'); + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_O {{{3 +sub display_O { + my @display_lines = (''); + my @cxns = get_connections(); + my @open_tables = get_open_tables(@cxns); + my @tables = map { extract_values($_, $_, $_, 'open_tables') } @open_tables; + push @display_lines, set_to_tbl(\@tables, 'open_tables'), get_cxn_errors(@cxns); + draw_screen(\@display_lines); +} + +# display_Q {{{3 +sub display_Q { + my @display_lines; + + my @q_header; + my @processlist; + my %rows_for = ( + q_header => \@q_header, + processlist => \@processlist, + ); + + my @visible = $opts{n} ? 'processlist' : get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + # Get the data + my @cxns = get_connections(); + my @full_processlist = get_full_processlist(@cxns); + + # Create header + if ( $wanted{q_header} ) { + get_status_info(@cxns); + foreach my $cxn ( @cxns ) { + my $set = $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock-1} || $set; + my $hash = extract_values($set, $set, $pre, 'q_header'); + $hash->{cxn} = $cxn; + $hash->{when} = 'Total'; + push @q_header, $hash; + + if ( exists $vars{$cxn}->{$clock - 1} ) { + my $inc = inc(0, $cxn); + my $hash = extract_values($inc, $set, $pre, 'q_header'); + $hash->{cxn} = $cxn; + $hash->{when} = 'Now'; + push @q_header, $hash; + } + } + } + + if ( $wanted{processlist} ) { + # TODO: save prev values + push @processlist, map { extract_values($_, $_, $_, 'processlist') } @full_processlist; + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + next unless $wanted{$tbl}; + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + # Save queries in global variable for analysis. The rows in %rows_for have been + # filtered, etc as a side effect of set_to_tbl(), so they are the same as the rows + # that get pushed to the screen. + @current_queries = map { + my %hash; + @hash{ qw(cxn id db query secs) } = @{$_}{ qw(cxn mysql_thread_id db info secs) }; + \%hash; + } @{$rows_for{processlist}}; + + draw_screen(\@display_lines); +} + +# display_R {{{3 +sub display_R { + my @display_lines; + my @cxns = get_connections(); + get_innodb_status(\@cxns); + + my @row_operations; + my @row_operation_misc; + my @semaphores; + my @wait_array; + my %rows_for = ( + row_operations => \@row_operations, + row_operation_misc => \@row_operation_misc, + semaphores => \@semaphores, + wait_array => \@wait_array, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + my $incvar = $config{status_inc}->{val}; + + foreach my $cxn ( @cxns ) { + my $set = $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock-1} || $set; + my $inc; # Only assigned to if wanted + + if ( $set->{IB_ro_complete} ) { + if ( $wanted{row_operations} ) { + $inc ||= $incvar ? inc(0, $cxn) : $set; + push @row_operations, extract_values($inc, $set, $pre, 'row_operations'); + } + if ( $wanted{row_operation_misc} ) { + push @row_operation_misc, extract_values($set, $set, $pre, 'row_operation_misc'), + } + } + + if ( $set->{IB_sm_complete} && $wanted{semaphores} ) { + $inc ||= $incvar ? inc(0, $cxn) : $set; + push @semaphores, extract_values($inc, $set, $pre, 'semaphores'); + } + + if ( $set->{IB_sm_wait_array_size} && $wanted{wait_array} ) { + foreach my $wait ( @{$set->{IB_sm_waits}} ) { + my $hash = extract_values($wait, $wait, $wait, 'wait_array'); + $hash->{cxn} = $cxn; + push @wait_array, $hash; + } + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_T {{{3 +sub display_T { + my @display_lines; + + my @t_header; + my @innodb_transactions; + my %rows_for = ( + t_header => \@t_header, + innodb_transactions => \@innodb_transactions, + ); + + my @visible = $opts{n} ? 'innodb_transactions' : get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + my @cxns = get_connections(); + + # If the header is to be shown, buffer pool data is required. + get_innodb_status( \@cxns, [ $wanted{t_header} ? qw(bp) : () ] ); + + foreach my $cxn ( get_connections() ) { + my $set = $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock-1} || $set; + + next unless $set->{IB_tx_transactions}; + + if ( $wanted{t_header} ) { + my $hash = extract_values($set, $set, $pre, 't_header'); + push @t_header, $hash; + } + + if ( $wanted{innodb_transactions} ) { + my $cur_txns = $set->{IB_tx_transactions}; + my $pre_txns = $pre->{IB_tx_transactions} || $cur_txns; + my %cur_txns = map { $_->{mysql_thread_id} => $_ } @$cur_txns; + my %pre_txns = map { $_->{mysql_thread_id} => $_ } @$pre_txns; + foreach my $thd_id ( sort keys %cur_txns ) { + my $cur_txn = $cur_txns{$thd_id}; + my $pre_txn = $pre_txns{$thd_id} || $cur_txn; + my $hash = extract_values($cur_txn, $cur_txn, $pre_txn, 'innodb_transactions'); + $hash->{cxn} = $cxn; + push @innodb_transactions, $hash; + } + } + + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + # Save queries in global variable for analysis. The rows in %rows_for have been + # filtered, etc as a side effect of set_to_tbl(), so they are the same as the rows + # that get pushed to the screen. + @current_queries = map { + my %hash; + @hash{ qw(cxn id db query secs) } = @{$_}{ qw(cxn mysql_thread_id db query_text active_secs) }; + \%hash; + } @{$rows_for{innodb_transactions}}; + + draw_screen(\@display_lines); +} + +# display_S {{{3 +sub display_S { + my $fmt = get_var_set('S_set'); + my $func = $config{S_func}->{val}; + my $inc = $func eq 'g' || $config{status_inc}->{val}; + + # The table's meta-data is generated from the compiled var_set. + my ( $cols, $visible ); + if ( $tbl_meta{var_status}->{fmt} && $fmt eq $tbl_meta{var_status}->{fmt} ) { + ( $cols, $visible ) = @{$tbl_meta{var_status}}{qw(cols visible)}; + } + else { + ( $cols, $visible ) = compile_select_stmt($fmt); + + # Apply missing values to columns. Always apply averages across all connections. + map { + $_->{agg} = 'avg'; + $_->{label} = $_->{hdr}; + } values %$cols; + + $tbl_meta{var_status}->{cols} = $cols; + $tbl_meta{var_status}->{visible} = $visible; + $tbl_meta{var_status}->{fmt} = $fmt; + map { $tbl_meta{var_status}->{cols}->{$_}->{just} = ''} @$visible; + } + + my @var_status; + my %rows_for = ( + var_status => \@var_status, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + my @cxns = get_connections(); + + get_status_info(@cxns); + get_innodb_status(\@cxns); + + # Set up whether to pivot and how many sets to extract. + $tbl_meta{var_status}->{pivot} = $func eq 'v'; + + my $num_sets + = $func eq 'v' + ? $config{num_status_sets}->{val} + : 0; + foreach my $set ( 0 .. $num_sets ) { + my @rows; + foreach my $cxn ( @cxns ) { + my $vars = $inc ? inc($set, $cxn) : $vars{$cxn}->{$clock - $set}; + my $cur = $vars{$cxn}->{$clock-$set}; + my $pre = $vars{$cxn}->{$clock-$set-1} || $cur; + next unless $vars && %$vars; + my $hash = extract_values($vars, $cur, $pre, 'var_status'); + push @rows, $hash; + } + @rows = apply_group_by('var_status', [], @rows); + push @var_status, @rows; + } + + # Recompile the sort func. TODO: avoid recompiling at every refresh. + # Figure out whether the data is all numeric and decide on a sort type. + # my $cmp + # = scalar( + # grep { !defined $_ || $_ !~ m/^\d+$/ } + # map { my $col = $_; map { $_->{$col} } @var_status } + # $tbl_meta{var_status}->{sort_cols} =~ m/(\w+)/g) + # ? 'cmp' + # : '<=>'; + $tbl_meta{var_status}->{sort_func} = make_sort_func($tbl_meta{var_status}); + + # ################################################################ + # Now there is specific display code based on $config{S_func} + # ################################################################ + if ( $func =~ m/s|g/ ) { + my $min_width = 4; + + # Clear the screen if the display width changed. + if ( @last_term_size && $this_term_size[0] != $last_term_size[0] ) { + $lines_printed = 0; + $clear_screen_sub->(); + } + + if ( $func eq 's' ) { + # Decide how wide columns should be. + my $num_cols = scalar(@$visible); + my $width = $opts{n} ? 0 : max($min_width, int(($this_term_size[0] - $num_cols + 1) / $num_cols)); + my $g_format = $opts{n} ? ( "%s\t" x $num_cols ) : ( "%-${width}s " x $num_cols ); + + # Print headers every now and then. Headers can get really long, so compact them. + my @hdr = @$visible; + if ( $opts{n} ) { + if ( $lines_printed == 0 ) { + print join("\t", @hdr), "\n"; + $lines_printed++; + } + } + elsif ( $lines_printed == 0 || $lines_printed > $this_term_size[1] - 2 ) { + @hdr = map { donut(crunch($_, $width), $width) } @hdr; + print join(' ', map { sprintf( "%${width}s", donut($_, $width)) } @hdr) . "\n"; + $lines_printed = 1; + } + + # Design a column format for the values. + my $format + = $opts{n} + ? join("\t", map { '%s' } @$visible) . "\n" + : join(' ', map { "%${width}s" } @hdr) . "\n"; + + foreach my $row ( @var_status ) { + printf($format, map { defined $_ ? $_ : '' } @{$row}{ @$visible }); + $lines_printed++; + } + } + else { # 'g' mode + # Design a column format for the values. + my $num_cols = scalar(@$visible); + my $width = $opts{n} ? 0 : int(($this_term_size[0] - $num_cols + 1) / $num_cols); + my $format = $opts{n} ? ( "%s\t" x $num_cols ) : ( "%-${width}s " x $num_cols ); + $format =~ s/\s$/\n/; + + # Print headers every now and then. + if ( $opts{n} ) { + if ( $lines_printed == 0 ) { + print join("\t", @$visible), "\n"; + print join("\t", map { shorten($mvs{$_}) } @$visible), "\n"; + } + } + elsif ( $lines_printed == 0 || $lines_printed > $this_term_size[1] - 2 ) { + printf($format, map { donut(crunch($_, $width), $width) } @$visible); + printf($format, map { shorten($mvs{$_} || 0) } @$visible); + $lines_printed = 2; + } + + # Update the max ever seen, and scale by the max ever seen. + my $set = $var_status[0]; + foreach my $col ( @$visible ) { + $set->{$col} = 1 unless defined $set->{$col} && $set->{$col} =~ m/$num_regex/; + $set->{$col} = ($set->{$col} || 1) / ($set->{Uptime_hires} || 1); + $mvs{$col} = max($mvs{$col} || 1, $set->{$col}); + $set->{$col} /= $mvs{$col}; + } + printf($format, map { ( $config{graph_char}->{val} x int( $width * $set->{$_} )) || '.' } @$visible ); + $lines_printed++; + + } + } + else { # 'v' + my $first_table = 0; + my @display_lines; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + $clear_screen_sub->(); + draw_screen( \@display_lines ); + } +} + +# display_explain {{{3 +sub display_explain { + my $info = shift; + my $cxn = $info->{cxn}; + my $db = $info->{db}; + + my ( $mods, $query ) = rewrite_for_explain($info->{query}); + + my @display_lines; + + if ( $query ) { + + my $part = version_ge($dbhs{$cxn}->{dbh}, '5.1.5') ? 'PARTITIONS' : ''; + $query = "EXPLAIN $part\n" . $query; + + eval { + if ( $db ) { + do_query($cxn, "use $db"); + } + my $sth = do_query($cxn, $query); + + my $res; + while ( $res = $sth->fetchrow_hashref() ) { + map { $res->{$_} ||= '' } ( 'partitions', keys %$res); + my @this_table = create_caption("Sub-Part $res->{id}", + create_table2( + $tbl_meta{explain}->{visible}, + meta_to_hdr('explain'), + extract_values($res, $res, $res, 'explain'))); + @display_lines = stack_next(\@display_lines, \@this_table, { pad => ' ', vsep => 2 }); + } + }; + + if ( $EVAL_ERROR ) { + push @display_lines, + '', + "The query could not be explained. Only SELECT queries can be " + . "explained; innotop tries to rewrite certain REPLACE and INSERT queries " + . "into SELECT, but this doesn't always succeed."; + } + + } + else { + push @display_lines, '', 'The query could not be explained.'; + } + + if ( $mods ) { + push @display_lines, '', '[This query has been re-written to be explainable]'; + } + + unshift @display_lines, no_ctrl_char($query); + draw_screen(\@display_lines, { raw => 1 } ); +} + +# rewrite_for_explain {{{3 +sub rewrite_for_explain { + my $query = shift; + + my $mods = 0; + my $orig = $query; + $mods += $query =~ s/^\s*(?:replace|insert).*?select/select/is; + $mods += $query =~ s/^ + \s*create\s+(?:temporary\s+)?table + \s+(?:\S+\s+)as\s+select/select/xis; + $mods += $query =~ s/\s+on\s+duplicate\s+key\s+update.*$//is; + return ( $mods, $query ); +} + +# show_optimized_query {{{3 +sub show_optimized_query { + my $info = shift; + my $cxn = $info->{cxn}; + my $db = $info->{db}; + my $meta = $dbhs{$cxn}; + + my @display_lines; + + my ( $mods, $query ) = rewrite_for_explain($info->{query}); + + if ( $mods ) { + push @display_lines, '[This query has been re-written to be explainable]'; + } + + if ( $query ) { + push @display_lines, no_ctrl_char($info->{query}); + + eval { + if ( $db ) { + do_query($cxn, "use $db"); + } + do_query( $cxn, 'EXPLAIN EXTENDED ' . $query ) or die "Can't explain query"; + my $sth = do_query($cxn, 'SHOW WARNINGS'); + my $res = $sth->fetchall_arrayref({}); + + if ( $res ) { + foreach my $result ( @$res ) { + push @display_lines, 'Note:', no_ctrl_char($result->{message}); + } + } + else { + push @display_lines, '', 'The query optimization could not be generated.'; + } + }; + + if ( $EVAL_ERROR ) { + push @display_lines, '', "The optimization could not be generated: $EVAL_ERROR"; + } + + } + else { + push @display_lines, '', 'The query optimization could not be generated.'; + } + + draw_screen(\@display_lines, { raw => 1 } ); +} + +# display_help {{{3 +sub display_help { + my $mode = $config{mode}->{val}; + + # Get globally mapped keys, then overwrite them with mode-specific ones. + my %keys = map { + $_ => $action_for{$_}->{label} + } keys %action_for; + foreach my $key ( keys %{$modes{$mode}->{action_for}} ) { + $keys{$key} = $modes{$mode}->{action_for}->{$key}->{label}; + } + delete $keys{'?'}; + + # Split them into three kinds of keys: MODE keys, action keys, and + # magic (special character) keys. + my @modes = sort grep { m/[A-Z]/ } keys %keys; + my @actions = sort grep { m/[a-z]/ } keys %keys; + my @magic = sort grep { m/[^A-Z]/i } keys %keys; + + my @display_lines = ( '', 'Switch to a different mode:' ); + + # Mode keys + my @all_modes = map { "$_ $modes{$_}->{hdr}" } @modes; + my @col1 = splice(@all_modes, 0, ceil(@all_modes/3)); + my @col2 = splice(@all_modes, 0, ceil(@all_modes/2)); + my $max1 = max(map {length($_)} @col1); + my $max2 = max(map {length($_)} @col2); + while ( @col1 ) { + push @display_lines, sprintf(" %-${max1}s %-${max2}s %s", + (shift @col1 || ''), + (shift @col2 || ''), + (shift @all_modes || '')); + } + + # Action keys + my @all_actions = map { "$_ $keys{$_}" } @actions; + @col1 = splice(@all_actions, 0, ceil(@all_actions/2)); + $max1 = max(map {length($_)} @col1); + push @display_lines, '', 'Actions:'; + while ( @col1 ) { + push @display_lines, sprintf(" %-${max1}s %s", + (shift @col1 || ''), + (shift @all_actions || '')); + } + + # Magic keys + my @all_magic = map { sprintf('%4s', $action_for{$_}->{key} || $_) . " $keys{$_}" } @magic; + @col1 = splice(@all_magic, 0, ceil(@all_magic/2)); + $max1 = max(map {length($_)} @col1); + push @display_lines, '', 'Other:'; + while ( @col1 ) { + push @display_lines, sprintf("%-${max1}s%s", + (shift @col1 || ''), + (shift @all_magic || '')); + } + + $clear_screen_sub->(); + draw_screen(\@display_lines, { show_all => 1 } ); + pause(); + $clear_screen_sub->(); +} + +# show_full_query {{{3 +sub show_full_query { + my $info = shift; + my @display_lines = no_ctrl_char($info->{query}); + draw_screen(\@display_lines, { raw => 1 }); +} + +# Formatting functions {{{2 + +# create_table2 {{{3 +# Makes a two-column table, labels on left, data on right. +# Takes refs of @cols, %labels and %data, %user_prefs +sub create_table2 { + my ( $cols, $labels, $data, $user_prefs ) = @_; + my @rows; + + if ( @$cols && %$data ) { + + # Override defaults + my $p = { + just => '', + sep => ':', + just1 => '-', + }; + if ( $user_prefs ) { + map { $p->{$_} = $user_prefs->{$_} } keys %$user_prefs; + } + + # Fix undef values + map { $data->{$_} = '' unless defined $data->{$_} } @$cols; + + # Format the table + my $max_l = max(map{ length($labels->{$_}) } @$cols); + my $max_v = max(map{ length($data->{$_}) } @$cols); + my $format = "%$p->{just}${max_l}s$p->{sep} %$p->{just1}${max_v}s"; + foreach my $col ( @$cols ) { + push @rows, sprintf($format, $labels->{$col}, $data->{$col}); + } + } + return @rows; +} + +# stack_next {{{3 +# Stacks one display section next to the other. Accepts left-hand arrayref, +# right-hand arrayref, and options hashref. Tries to stack as high as +# possible, so +# aaaaaa +# bbb +# can stack ccc next to the bbb. +# NOTE: this DOES modify its arguments, even though it returns a new array. +sub stack_next { + my ( $left, $right, $user_prefs ) = @_; + my @result; + + my $p = { + pad => ' ', + vsep => 0, + }; + if ( $user_prefs ) { + map { $p->{$_} = $user_prefs->{$_} } keys %$user_prefs; + } + + # Find out how wide the LHS can be and still let the RHS fit next to it. + my $pad = $p->{pad}; + my $max_r = max( map { length($_) } @$right) || 0; + my $max_l = $this_term_size[0] - $max_r - length($pad); + + # Find the minimum row on the LHS that the RHS will fit next to. + my $i = scalar(@$left) - 1; + while ( $i >= 0 && length($left->[$i]) <= $max_l ) { + $i--; + } + $i++; + my $offset = $i; + + if ( $i < scalar(@$left) ) { + # Find the max width of the section of the LHS against which the RHS + # will sit. + my $max_i_in_common = min($i + scalar(@$right) - 1, scalar(@$left) - 1); + my $max_width = max( map { length($_) } @{$left}[$i..$max_i_in_common]); + + # Append the RHS onto the LHS until one runs out. + while ( $i < @$left && $i - $offset < @$right ) { + my $format = "%-${max_width}s$pad%${max_r}s"; + $left->[$i] = sprintf($format, $left->[$i], $right->[$i - $offset]); + $i++; + } + while ( $i - $offset < @$right ) { + # There is more RHS to push on the end of the array + push @$left, + sprintf("%${max_width}s$pad%${max_r}s", ' ', $right->[$i - $offset]); + $i++; + } + push @result, @$left; + } + else { + # There is no room to put them side by side. Add them below, with + # a blank line above them if specified. + push @result, @$left; + push @result, (' ' x $this_term_size[0]) if $p->{vsep} && @$left; + push @result, @$right; + } + return @result; +} + +# create_caption {{{3 +sub create_caption { + my ( $caption, @rows ) = @_; + if ( @rows ) { + + # Calculate the width of what will be displayed, so it can be centered + # in that space. When the thing is wider than the display, center the + # caption in the display. + my $width = min($this_term_size[0], max(map { length(ref($_) ? $_->[0] : $_) } @rows)); + + my $cap_len = length($caption); + + # It may be narrow enough to pad the sides with underscores and save a + # line on the screen. + if ( $cap_len <= $width - 6 ) { + my $left = int(($width - 2 - $cap_len) / 2); + unshift @rows, + ("_" x $left) . " $caption " . ("_" x ($width - $left - $cap_len - 2)); + } + + # The caption is too wide to add underscores on each side. + else { + + # Color is supported, so we can use terminal underlining. + if ( $config{color}->{val} ) { + my $left = int(($width - $cap_len) / 2); + unshift @rows, [ + (" " x $left) . $caption . (" " x ($width - $left - $cap_len)), + 'underline', + ]; + } + + # Color is not supported, so we have to add a line underneath to separate the + # caption from whatever it's captioning. + else { + my $left = int(($width - $cap_len) / 2); + unshift @rows, ('-' x $width); + unshift @rows, (" " x $left) . $caption . (" " x ($width - $left - $cap_len)); + } + + # The caption is wider than the thing it labels, so we have to pad the + # thing it labels to a consistent width. + if ( $cap_len > $width ) { + @rows = map { + ref($_) + ? [ sprintf('%-' . $cap_len . 's', $_->[0]), $_->[1] ] + : sprintf('%-' . $cap_len . 's', $_); + } @rows; + } + + } + } + return @rows; +} + +# create_table {{{3 +# Input: an arrayref of columns, hashref of col info, and an arrayref of hashes +# Example: [ 'a', 'b' ] +# { a => spec, b => spec } +# [ { a => 1, b => 2}, { a => 3, b => 4 } ] +# The 'spec' is a hashref of hdr => label, just => ('-' or ''). It also supports min and max-widths +# vi the minw and maxw params. +# Output: an array of strings, one per row. +# Example: +# Column One Column Two +# ---------- ---------- +# 1 2 +# 3 4 +sub create_table { + my ( $cols, $info, $data, $prefs ) = @_; + $prefs ||= {}; + $prefs->{no_hdr} ||= ($opts{n} && $clock != 1); + + # Truncate rows that will surely be off screen even if this is the only table. + if ( !$opts{n} && !$prefs->{raw} && !$prefs->{show_all} && $this_term_size[1] < @$data-1 ) { + $data = [ @$data[0..$this_term_size[1] - 1] ]; + } + + my @rows = (); + + if ( @$cols && %$info ) { + + # Fix undef values, collapse whitespace. + foreach my $row ( @$data ) { + map { $row->{$_} = collapse_ws($row->{$_}) } @$cols; + } + + my $col_sep = $opts{n} ? "\t" : ' '; + + # Find each column's max width. + my %width_for; + if ( !$opts{n} ) { + %width_for = map { + my $col_name = $_; + if ( $info->{$_}->{dec} ) { + # Align along the decimal point + my $max_rodp = max(0, map { $_->{$col_name} =~ m/([^\s\d-].*)$/ ? length($1) : 0 } @$data); + foreach my $row ( @$data ) { + my $col = $row->{$col_name}; + my ( $l, $r ) = $col =~ m/^([\s\d]*)(.*)$/; + $row->{$col_name} = sprintf("%s%-${max_rodp}s", $l, $r); + } + } + my $max_width = max( length($info->{$_}->{hdr}), map { length($_->{$col_name}) } @$data); + if ( $info->{$col_name}->{maxw} ) { + $max_width = min( $max_width, $info->{$col_name}->{maxw} ); + } + if ( $info->{$col_name}->{minw} ) { + $max_width = max( $max_width, $info->{$col_name}->{minw} ); + } + $col_name => $max_width; + } @$cols; + } + + # The table header. + if ( !$config{hide_hdr}->{val} && !$prefs->{no_hdr} ) { + push @rows, $opts{n} + ? join( $col_sep, @$cols ) + : join( $col_sep, map { sprintf( "%-$width_for{$_}s", trunc($info->{$_}->{hdr}, $width_for{$_}) ) } @$cols ); + if ( $config{color}->{val} && $config{header_highlight}->{val} ) { + push @rows, [ pop @rows, $config{header_highlight}->{val} ]; + } + elsif ( !$opts{n} ) { + push @rows, join( $col_sep, map { "-" x $width_for{$_} } @$cols ); + } + } + + # The table data. + if ( $opts{n} ) { + foreach my $item ( @$data ) { + push @rows, join($col_sep, map { $item->{$_} } @$cols ); + } + } + else { + my $format = join( $col_sep, + map { "%$info->{$_}->{just}$width_for{$_}s" } @$cols ); + foreach my $item ( @$data ) { + my $row = sprintf($format, map { trunc($item->{$_}, $width_for{$_}) } @$cols ); + if ( $config{color}->{val} && $item->{_color} ) { + push @rows, [ $row, $item->{_color} ]; + } + else { + push @rows, $row; + } + } + } + } + + return @rows; +} + +# Aggregates a table. If $group_by is an arrayref of columns, the grouping key +# is the specified columns; otherwise it's just the empty string (e.g. +# everything is grouped as one group). +sub apply_group_by { + my ( $tbl, $group_by, @rows ) = @_; + my $meta = $tbl_meta{$tbl}; + my %is_group = map { $_ => 1 } @$group_by; + my @non_grp = grep { !$is_group{$_} } keys %{$meta->{cols}}; + + my %temp_table; + foreach my $row ( @rows ) { + my $group_key + = @$group_by + ? '{' . join('}{', map { defined $_ ? $_ : '' } @{$row}{@$group_by}) . '}' + : ''; + $temp_table{$group_key} ||= []; + push @{$temp_table{$group_key}}, $row; + } + + # Crush the rows together... + my @new_rows; + foreach my $key ( sort keys %temp_table ) { + my $group = $temp_table{$key}; + my %new_row; + @new_row{@$group_by} = @{$group->[0]}{@$group_by}; + foreach my $col ( @non_grp ) { + my $agg = $meta->{cols}->{$col}->{agg} || 'first'; + $new_row{$col} = $agg_funcs{$agg}->( map { $_->{$col} } @$group ); + } + push @new_rows, \%new_row; + } + return @new_rows; +} + +# set_to_tbl {{{3 +# Unifies all the work of filtering, sorting etc. Alters the input. +# TODO: pull all the little pieces out into subroutines and stick events in each of them. +sub set_to_tbl { + my ( $rows, $tbl ) = @_; + my $meta = $tbl_meta{$tbl} or die "No such table $tbl in tbl_meta"; + + # don't show cxn if there's only one connection being displayed + my @visible; + if (scalar @{$modes{$config{mode}->{val}}->{connections}} == 1) { + map { push @visible, $_ if $_ !~ /^cxn$/ } @{$meta->{visible}}; + delete $$rows[0]{cxn} if defined $$rows[0]{cxn}; + } + else { + @visible = @{$meta->{visible}}; + } + + if ( !$meta->{pivot} ) { + + # Hook in event listeners + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_filter}} ) { + $listener->set_to_tbl_pre_filter($rows, $tbl); + } + + # Apply filters. Note that if the table is pivoted, filtering and sorting + # are applied later. + foreach my $filter ( @{$meta->{filters}} ) { + eval { + @$rows = grep { $filters{$filter}->{func}->($_) } @$rows; + }; + if ( $EVAL_ERROR && $config{debug}->{val} ) { + die $EVAL_ERROR; + } + } + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_sort}} ) { + $listener->set_to_tbl_pre_sort($rows, $tbl); + } + + # Sort. Note that if the table is pivoted, sorting might have the wrong + # columns and it could crash. This will only be an issue if it's possible + # to toggle pivoting on and off, which it's not at the moment. + if ( @$rows && $meta->{sort_func} && !$meta->{aggregate} ) { + if ( $meta->{sort_dir} > 0 ) { + @$rows = $meta->{sort_func}->( @$rows ); + } + else { + @$rows = reverse $meta->{sort_func}->( @$rows ); + } + } + + } + + # Stop altering arguments now. + my @rows = @$rows; + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_group}} ) { + $listener->set_to_tbl_pre_group(\@rows, $tbl); + } + + # Apply group-by. + if ( $meta->{aggregate} ) { + @rows = apply_group_by($tbl, $meta->{group_by}, @rows); + + # Sort. Note that if the table is pivoted, sorting might have the wrong + # columns and it could crash. This will only be an issue if it's possible + # to toggle pivoting on and off, which it's not at the moment. + if ( @rows && $meta->{sort_func} ) { + if ( $meta->{sort_dir} > 0 ) { + @rows = $meta->{sort_func}->( @rows ); + } + else { + @rows = reverse $meta->{sort_func}->( @rows ); + } + } + + } + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_colorize}} ) { + $listener->set_to_tbl_pre_colorize(\@rows, $tbl); + } + + if ( !$meta->{pivot} ) { + # Colorize. Adds a _color column to rows. + if ( @rows && $meta->{color_func} ) { + eval { + foreach my $row ( @rows ) { + $row->{_color} = $meta->{color_func}->($row); + } + }; + if ( $EVAL_ERROR ) { + pause($EVAL_ERROR); + } + } + } + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_transform}} ) { + $listener->set_to_tbl_pre_transform(\@rows, $tbl); + } + + # Apply_transformations. + if ( @rows ) { + my $cols = $meta->{cols}; + foreach my $col ( keys %{$rows->[0]} ) { + # Don't auto-vivify $tbl_meta{tbl}-{cols}->{_color}->{trans} + next if $col eq '_color'; + foreach my $trans ( @{$cols->{$col}->{trans}} ) { + map { $_->{$col} = $trans_funcs{$trans}->($_->{$col}) } @rows; + } + } + } + + my ($fmt_cols, $fmt_meta); + + # Pivot. + if ( $meta->{pivot} ) { + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_pivot}} ) { + $listener->set_to_tbl_pre_pivot(\@rows, $tbl); + } + + my @vars = @{$meta->{visible}}; + my @tmp = map { { name => $_ } } @vars; + my @cols = 'name'; + foreach my $i ( 0..@$rows-1 ) { + my $col = "set_$i"; + push @cols, $col; + foreach my $j ( 0..@vars-1 ) { + $tmp[$j]->{$col} = $rows[$i]->{$vars[$j]}; + } + } + $fmt_meta = { map { $_ => { hdr => $_, just => '-' } } @cols }; + $fmt_cols = \@cols; + @rows = @tmp; + + # Hook in event listeners + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_filter}} ) { + $listener->set_to_tbl_pre_filter($rows, $tbl); + } + + # Apply filters. + foreach my $filter ( @{$meta->{filters}} ) { + eval { + @rows = grep { $filters{$filter}->{func}->($_) } @rows; + }; + if ( $EVAL_ERROR && $config{debug}->{val} ) { + die $EVAL_ERROR; + } + } + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_sort}} ) { + $listener->set_to_tbl_pre_sort($rows, $tbl); + } + + # Sort. + if ( @rows && $meta->{sort_func} ) { + if ( $meta->{sort_dir} > 0 ) { + @rows = $meta->{sort_func}->( @rows ); + } + else { + @rows = reverse $meta->{sort_func}->( @rows ); + } + } + + } + else { + # If the table isn't pivoted, just show all columns that are supposed to + # be shown; but eliminate aggonly columns if the table isn't aggregated. + my $aggregated = $meta->{aggregate}; + $fmt_cols = [ grep { $aggregated || !$meta->{cols}->{$_}->{aggonly} } @visible ]; + $fmt_meta = { map { $_ => $meta->{cols}->{$_} } @$fmt_cols }; + + # If the table is aggregated, re-order the group_by columns to the left of + # the display. + if ( $aggregated ) { + my %is_group = map { $_ => 1 } @{$meta->{group_by}}; + $fmt_cols = [ @{$meta->{group_by}}, grep { !$is_group{$_} } @$fmt_cols ]; + } + } + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_create}} ) { + $listener->set_to_tbl_pre_create(\@rows, $tbl); + } + + @rows = create_table( $fmt_cols, $fmt_meta, \@rows); + if ( !$meta->{hide_caption} && !$opts{n} && $config{display_table_captions}->{val} ) { + @rows = create_caption($meta->{capt}, @rows) + } + + foreach my $listener ( @{$event_listener_for{set_to_tbl_post_create}} ) { + $listener->set_to_tbl_post_create(\@rows, $tbl); + } + + return @rows; +} + +# meta_to_hdr {{{3 +sub meta_to_hdr { + my $tbl = shift; + my $meta = $tbl_meta{$tbl}; + my %labels = map { $_ => $meta->{cols}->{$_}->{hdr} } @{$meta->{visible}}; + return \%labels; +} + +# commify {{{3 +# From perlfaq5: add commas. +sub commify { + my ( $num ) = @_; + $num = 0 unless defined $num; + $num =~ s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g; + return $num; +} + +# set_precision {{{3 +# Trim to desired precision. +sub set_precision { + my ( $num, $precision ) = @_; + $precision = $config{num_digits}->{val} if !defined $precision; + sprintf("%.${precision}f", $num); +} + +# percent {{{3 +# Convert to percent +sub percent { + my ( $num ) = @_; + $num = 0 unless defined $num; + my $digits = $config{num_digits}->{val}; + return sprintf("%.${digits}f", $num * 100) + . ($config{show_percent}->{val} ? '%' : ''); +} + +# shorten {{{3 +sub shorten { + my ( $num, $opts ) = @_; + + return $num if !defined($num) || $opts{n} || $num !~ m/$num_regex/; + + $opts ||= {}; + my $pad = defined $opts->{pad} ? $opts->{pad} : ''; + my $num_digits = defined $opts->{num_digits} + ? $opts->{num_digits} + : $config{num_digits}->{val}; + my $force = defined $opts->{force}; + + my $n = 0; + while ( $num >= 1_024 ) { + $num /= 1_024; + ++$n; + } + return sprintf( + $num =~ m/\./ || $n || $force + ? "%.${num_digits}f%s" + : '%d', + $num, ($pad,'k','M','G', 'T')[$n]); + +} + +# Utility functions {{{2 +# unique {{{3 +sub unique { + my %seen; + return grep { !$seen{$_}++ } @_; +} + +# make_color_func {{{3 +sub make_color_func { + my ( $tbl ) = @_; + my @criteria; + foreach my $spec ( @{$tbl->{colors}} ) { + next unless exists $comp_ops{$spec->{op}}; + my $val = $spec->{op} =~ m/^(?:eq|ne|le|ge|lt|gt)$/ ? "'$spec->{arg}'" + : $spec->{op} =~ m/^(?:=~|!~)$/ ? "m/" . quotemeta($spec->{arg}) . "/" + : $spec->{arg}; + push @criteria, + "( defined \$set->{$spec->{col}} && \$set->{$spec->{col}} $spec->{op} $val ) { return '$spec->{color}'; }"; + } + return undef unless @criteria; + my $sub = eval 'sub { my ( $set ) = @_; if ' . join(" elsif ", @criteria) . '}'; + die if $EVAL_ERROR; + return $sub; +} + +# make_sort_func {{{3 +# Gets a list of sort columns from the table, like "+cxn -time" and returns a +# subroutine that will sort that way. +sub make_sort_func { + my ( $tbl ) = @_; + my @criteria; + + # Pivoted tables can be sorted by 'name' and set_x columns; others must be + # sorted by existing columns. TODO: this will crash if you toggle between + # pivoted and nonpivoted. I have several other 'crash' notes about this if + # this ever becomes possible. + + if ( $tbl->{pivot} ) { + # Sort type is not really possible on pivoted columns, because a 'column' + # contains data from an entire non-pivoted row, so there could be a mix of + # numeric and non-numeric data. Thus everything has to be 'cmp' type. + foreach my $col ( split(/\s+/, $tbl->{sort_cols} ) ) { + next unless $col; + my ( $dir, $name ) = $col =~ m/([+-])?(\w+)$/; + next unless $name && $name =~ m/^(?:name|set_\d+)$/; + $dir ||= '+'; + my $op = 'cmp'; + my $df = "''"; + push @criteria, + $dir eq '+' + ? "(\$a->{$name} || $df) $op (\$b->{$name} || $df)" + : "(\$b->{$name} || $df) $op (\$a->{$name} || $df)"; + } + } + else { + foreach my $col ( split(/\s+/, $tbl->{sort_cols} ) ) { + next unless $col; + my ( $dir, $name ) = $col =~ m/([+-])?(\w+)$/; + next unless $name && $tbl->{cols}->{$name}; + $dir ||= '+'; + my $op = $tbl->{cols}->{$name}->{num} ? "<=>" : "cmp"; + my $df = $tbl->{cols}->{$name}->{num} ? "0" : "''"; + push @criteria, + $dir eq '+' + ? "(\$a->{$name} || $df) $op (\$b->{$name} || $df)" + : "(\$b->{$name} || $df) $op (\$a->{$name} || $df)"; + } + } + return sub { return @_ } unless @criteria; + my $sub = eval 'sub { sort {' . join("||", @criteria) . '} @_; }'; + die if $EVAL_ERROR; + return $sub; +} + +# trunc {{{3 +# Shortens text to specified length. +sub trunc { + my ( $text, $len ) = @_; + if ( length($text) <= $len ) { + return $text; + } + return substr($text, 0, $len); +} + +# donut {{{3 +# Takes out the middle of text to shorten it. +sub donut { + my ( $text, $len ) = @_; + return $text if length($text) <= $len; + my $max = length($text) - $len; + my $min = $max - 1; + + # Try to remove a single "word" from somewhere in the center + if ( $text =~ s/_[^_]{$min,$max}_/_/ ) { + return $text; + } + + # Prefer removing the end of a "word" + if ( $text =~ s/([^_]+)[^_]{$max}_/$1_/ ) { + return $text; + } + + $text = substr($text, 0, int($len/2)) + . "_" + . substr($text, int($len/2) + $max + 1); + return $text; +} + +# crunch {{{3 +# Removes vowels and compacts repeated letters to shorten text. +sub crunch { + my ( $text, $len ) = @_; + return $text if $len && length($text) <= $len; + $text =~ s/^IB_\w\w_//; + $text =~ s/(?{val}; + if ( $charset && $charset eq 'unicode' ) { + $text =~ s/ + ("(?:(?!(?{val} ) { + unshift @$display_lines, create_statusbar(); + } + + foreach my $listener ( @{$event_listener_for{draw_screen}} ) { + $listener->draw_screen($display_lines); + } + + $clear_screen_sub->() + if $prefs->{clear} || !$modes{$config{mode}->{val}}->{no_clear_screen}; + if ( $opts{n} || $prefs->{raw} ) { + my $num_lines = 0; + print join("\n", + map { + $num_lines++; + ref $_ + ? colored($_->[0], $_->[1]) + : $_; + } + grep { !$opts{n} || $_ } # Suppress empty lines + @$display_lines); + if ( $opts{n} && $num_lines ) { + print "\n"; + } + } + else { + my $max_lines = $prefs->{show_all} + ? scalar(@$display_lines)- 1 + : min(scalar(@$display_lines), $this_term_size[1]); + print join("\n", + map { + ref $_ + ? colored(substr($_->[0], 0, $this_term_size[0]), $_->[1]) + : substr($_, 0, $this_term_size[0]); + } @$display_lines[0..$max_lines - 1]); + } +} + +# secs_to_time {{{3 +sub secs_to_time { + my ( $secs, $fmt ) = @_; + $secs ||= 0; + return '00:00' unless $secs; + + # Decide what format to use, if not given + $fmt ||= $secs >= 86_400 ? 'd' + : $secs >= 3_600 ? 'h' + : 'm'; + + return + $fmt eq 'd' ? sprintf( + "%d+%02d:%02d:%02d", + int($secs / 86_400), + int(($secs % 86_400) / 3_600), + int(($secs % 3_600) / 60), + $secs % 60) + : $fmt eq 'h' ? sprintf( + "%02d:%02d:%02d", + int(($secs % 86_400) / 3_600), + int(($secs % 3_600) / 60), + $secs % 60) + : sprintf( + "%02d:%02d", + int(($secs % 3_600) / 60), + $secs % 60); +} + +# dulint_to_int {{{3 +# Takes a number that InnoDB formats as two ulint integers, like transaction IDs +# and such, and turns it into a single integer +sub dulint_to_int { + my $num = shift; + return 0 unless $num; + my ( $high, $low ) = $num =~ m/^(\d+) (\d+)$/; + return $low unless $high; + return $low + ( $high * $MAX_ULONG ); +} + +# create_statusbar {{{3 +sub create_statusbar { + my $mode = $config{mode}->{val}; + my @cxns = sort { $a cmp $b } get_connections(); + + my $modeline = ( $config{readonly}->{val} ? '[RO] ' : '' ) + . $modes{$mode}->{hdr} . " (? for help)"; + my $mode_width = length($modeline); + my $remaining_width = $this_term_size[0] - $mode_width - 1; + my $result; + + # The thingie in top-right that says what we're monitoring. + my $cxn = ''; + + if ( 1 == @cxns && $dbhs{$cxns[0]} && $dbhs{$cxns[0]}->{dbh} ) { + $cxn = $dbhs{$cxns[0]}->{dbh}->{mysql_serverinfo} || ''; + } + else { + if ( $modes{$mode}->{server_group} ) { + $cxn = "Servers: " . $modes{$mode}->{server_group}; + my $err_count = grep { $dbhs{$_} && $dbhs{$_}->{err_count} } @cxns; + if ( $err_count ) { + $cxn .= "(" . ( scalar(@cxns) - $err_count ) . "/" . scalar(@cxns) . ")"; + } + } + else { + $cxn = join(' ', map { ($dbhs{$_}->{err_count} ? '!' : '') . $_ } + grep { $dbhs{$_} } @cxns); + } + } + + if ( 1 == @cxns ) { + get_driver_status(@cxns); + my $vars = $vars{$cxns[0]}->{$clock}; + my $inc = inc(0, $cxns[0]); + + # Format server uptime human-readably, calculate QPS... + my $uptime = secs_to_time( $vars->{Uptime_hires} ); + my $qps = ($inc->{Questions}||0) / ($inc->{Uptime_hires}||1); + my $ibinfo = ''; + + if ( exists $vars->{IB_last_secs} ) { + $ibinfo .= "InnoDB $vars->{IB_last_secs}s "; + if ( $vars->{IB_got_all} ) { + if ( ($mode eq 'T' || $mode eq 'W') + && $vars->{IB_tx_is_truncated} ) { + $ibinfo .= ':^|'; + } + else { + $ibinfo .= ':-)'; + } + } + else { + $ibinfo .= ':-('; + } + } + $result = sprintf( + "%-${mode_width}s %${remaining_width}s", + $modeline, + join(', ', grep { $_ } ( + $cxns[0], + $uptime, + $ibinfo, + shorten($qps) . " QPS", + ($vars->{Threads} || 0) . "/" . ($vars->{Threads_running} || 0) . "/" . ($vars->{Threads_cached} || 0) . " con/run/cac thds", + $cxn))); + } + else { + $result = sprintf( + "%-${mode_width}s %${remaining_width}s", + $modeline, + $cxn); + } + + return $config{color}->{val} ? [ $result, 'bold reverse' ] : $result; +} + +# Database connections {{{3 +sub add_new_dsn { + my ( $name, $dsn, $dl_table, $have_user, $user, $have_pass, $pass, $savepass ) = @_; + + if ( defined $name ) { + $name =~ s/[\s:;]//g; + } + + if ( !$name ) { + print word_wrap("Choose a name for the connection. It cannot contain " + . "whitespace, colons or semicolons."), "\n\n"; + do { + $name = prompt("Enter a name"); + $name =~ s/[\s:;]//g; + } until ( $name ); + } + + if ( !$dsn ) { + do { + $clear_screen_sub->(); + print "Typical DSN strings look like\n DBI:mysql:;host=hostname;port=port\n" + . "The db and port are optional and can usually be omitted.\n" + . "If you specify 'mysql_read_default_group=mysql' many options can be read\n" + . "from your mysql options files (~/.my.cnf, /etc/my.cnf).\n\n"; + $dsn = prompt("Enter a DSN string", undef, "DBI:mysql:;mysql_read_default_group=mysql;host=$name"); + } until ( $dsn ); + } + if ( !$dl_table ) { + $clear_screen_sub->(); + my $dl_table = prompt("Optional: enter a table (must not exist) to use when resetting InnoDB deadlock information", + undef, 'test.innotop_dl'); + } + + $connections{$name} = { + dsn => $dsn, + dl_table => $dl_table, + have_user => $have_user, + user => $user, + have_pass => $have_pass, + pass => $pass, + savepass => $savepass + }; +} + +sub add_new_server_group { + my ( $name ) = @_; + + if ( defined $name ) { + $name =~ s/[\s:;]//g; + } + + if ( !$name ) { + print word_wrap("Choose a name for the group. It cannot contain " + . "whitespace, colons or semicolons."), "\n\n"; + do { + $name = prompt("Enter a name"); + $name =~ s/[\s:;]//g; + } until ( $name ); + } + + my @cxns; + do { + $clear_screen_sub->(); + @cxns = select_cxn("Choose servers for $name", keys %connections); + } until ( @cxns ); + + $server_groups{$name} = \@cxns; + return $name; +} + +sub get_var_set { + my ( $name ) = @_; + while ( !$name || !exists($var_sets{$config{$name}->{val}}) ) { + $name = choose_var_set($name); + } + return $var_sets{$config{$name}->{val}}->{text}; +} + +sub add_new_var_set { + my ( $name ) = @_; + + if ( defined $name ) { + $name =~ s/\W//g; + } + + if ( !$name ) { + do { + $name = prompt("Enter a name"); + $name =~ s/\W//g; + } until ( $name ); + } + + my $variables; + do { + $clear_screen_sub->(); + $variables = prompt("Enter variables for $name", undef ); + } until ( $variables ); + + $var_sets{$name} = { text => $variables, user => 1 }; +} + +sub next_server { + my $mode = $config{mode}->{val}; + my @cxns = sort keys %connections; + my ($cur) = get_connections($mode); + $cur ||= $cxns[0]; + my $pos = grep { $_ lt $cur } @cxns; + my $newpos = ($pos + 1) % @cxns; + $modes{$mode}->{server_group} = ''; + $modes{$mode}->{connections} = [ $cxns[$newpos] ]; + $clear_screen_sub->(); +} + +sub next_server_group { + my $mode = shift || $config{mode}->{val}; + my @grps = sort keys %server_groups; + my $curr = $modes{$mode}->{server_group}; + + return unless @grps; + + if ( $curr ) { + # Find the current group's position. + my $pos = 0; + while ( $curr ne $grps[$pos] ) { + $pos++; + } + $modes{$mode}->{server_group} = $grps[ ($pos + 1) % @grps ]; + } + else { + $modes{$mode}->{server_group} = $grps[0]; + } +} + +# Get a list of connection names used in this mode. +sub get_connections { + if ( $file ) { + return qw(file); + } + my $mode = shift || $config{mode}->{val}; + my @connections = $modes{$mode}->{server_group} + ? @{$server_groups{$modes{$mode}->{server_group}}} + : @{$modes{$mode}->{connections}}; + if ( $modes{$mode}->{one_connection} ) { + @connections = @connections ? $connections[0] : (); + } + return unique(@connections); +} + +# Get a list of tables used in this mode. If innotop is running non-interactively, just use the first. +sub get_visible_tables { + my $mode = shift || $config{mode}->{val}; + my @tbls = @{$modes{$mode}->{visible_tables}}; + if ( $opts{n} ) { + return $tbls[0]; + } + else { + return @tbls; + } +} + +# Choose from among available connections or server groups. +# If the mode has a server set in use, prefers that instead. +sub choose_connections { + $clear_screen_sub->(); + my $mode = $config{mode}->{val}; + my $meta = { map { $_ => $connections{$_}->{dsn} } keys %connections }; + foreach my $group ( keys %server_groups ) { + $meta->{"#$group"} = join(' ', @{$server_groups{$group}}); + } + + my $choices = prompt_list("Choose connections or a group for $mode mode", + undef, sub { return keys %$meta }, $meta); + + my @choices = unique(grep { $_ } split(/\s+/, $choices)); + if ( @choices ) { + if ( $choices[0] =~ s/^#// && exists $server_groups{$choices[0]} ) { + $modes{$mode}->{server_group} = $choices[0]; + } + else { + $modes{$mode}->{connections} = [ grep { exists $connections{$_} } @choices ]; + } + } +} + +# Accepts a DB connection name and the name of a prepared query (e.g. status, kill). +# Also a list of params for the prepared query. This allows not storing prepared +# statements globally. Returns a $sth that's been executed. +# ERROR-HANDLING SEMANTICS: if the statement throws an error, propagate, but if the +# connection has gone away or can't connect, DO NOT. Just return undef. +sub do_stmt { + my ( $cxn, $stmt_name, @args ) = @_; + + return undef if $file; + + # Test if the cxn should not even be tried + return undef if $dbhs{$cxn} + && $dbhs{$cxn}->{err_count} + && ( !$dbhs{$cxn}->{dbh} || !$dbhs{$cxn}->{dbh}->{Active} || $dbhs{$cxn}->{mode} eq $config{mode}->{val} ) + && $dbhs{$cxn}->{wake_up} > $clock; + + my $sth; + my $retries = 1; + my $success = 0; + TRY: + while ( $retries-- >= 0 && !$success ) { + + eval { + my $dbh = connect_to_db($cxn); + + # If the prepared query doesn't exist, make it. + if ( !exists $dbhs{$cxn}->{stmts}->{$stmt_name} ) { + $dbhs{$cxn}->{stmts}->{$stmt_name} = $stmt_maker_for{$stmt_name}->($dbh); + } + + $sth = $dbhs{$cxn}->{stmts}->{$stmt_name}; + if ( $sth ) { + $sth->execute(@args); + } + $success = 1; + }; + if ( $EVAL_ERROR ) { + if ( $EVAL_ERROR =~ m/$nonfatal_errs/ ) { + handle_cxn_error($cxn, $EVAL_ERROR); + } + else { + die "$cxn $stmt_name: $EVAL_ERROR"; + } + if ( $retries < 0 ) { + $sth = undef; + } + } + } + + if ( $sth && $sth->{NUM_OF_FIELDS} ) { + sleep($stmt_sleep_time_for{$stmt_name}) if $stmt_sleep_time_for{$stmt_name}; + return $sth; + } +} + +# Keeps track of error count, sleep times till retries, etc etc. +# When there's an error we retry the connection every so often, increasing in +# Fibonacci series to prevent too much banging on the server. +sub handle_cxn_error { + my ( $cxn, $err ) = @_; + my $meta = $dbhs{$cxn}; + $meta->{err_count}++; + + # This is used so errors that have to do with permissions needed by the current + # mode will get displayed as long as we're in this mode, but get ignored if the + # mode changes. + $meta->{mode} = $config{mode}->{val}; + + # Strip garbage from the error text if possible. + $err =~ s/\s+/ /g; + if ( $err =~ m/failed: (.*?) at \S*innotop line/ ) { + $err = $1; + } + + $meta->{last_err} = $err; + my $sleep_time = $meta->{this_sleep} + $meta->{prev_sleep}; + $meta->{prev_sleep} = $meta->{this_sleep}; + $meta->{this_sleep} = $sleep_time; + $meta->{wake_up} = $clock + $sleep_time; + if ( $config{show_cxn_errors}->{val} ) { + print STDERR "Error at tick $clock $cxn $err" if $config{debug}->{val}; + } +} + +# Accepts a DB connection name and a (string) query. Returns a $sth that's been +# executed. +sub do_query { + my ( $cxn, $query ) = @_; + + return undef if $file; + + # Test if the cxn should not even be tried + return undef if $dbhs{$cxn} + && $dbhs{$cxn}->{err_count} + && ( !$dbhs{$cxn}->{dbh} || !$dbhs{$cxn}->{dbh}->{Active} || $dbhs{$cxn}->{mode} eq $config{mode}->{val} ) + && $dbhs{$cxn}->{wake_up} > $clock; + + my $sth; + my $retries = 1; + my $success = 0; + TRY: + while ( $retries-- >= 0 && !$success ) { + + eval { + my $dbh = connect_to_db($cxn); + + $sth = $dbh->prepare($query); + $sth->execute(); + $success = 1; + }; + if ( $EVAL_ERROR ) { + if ( $EVAL_ERROR =~ m/$nonfatal_errs/ ) { + handle_cxn_error($cxn, $EVAL_ERROR); + } + else { + die $EVAL_ERROR; + } + if ( $retries < 0 ) { + $sth = undef; + } + } + } + + return $sth; +} + +sub get_uptime { + my ( $cxn ) = @_; + $dbhs{$cxn}->{start_time} ||= time(); + # Avoid dividing by zero + return (time() - $dbhs{$cxn}->{start_time}) || .001; +} + +sub connect_to_db { + my ( $cxn ) = @_; + + $dbhs{$cxn} ||= { + stmts => {}, # bucket for prepared statements. + prev_sleep => 0, + this_sleep => 1, + wake_up => 0, + start_time => 0, + dbh => undef, + }; + my $href = $dbhs{$cxn}; + + if ( !$href->{dbh} || ref($href->{dbh}) !~ m/DBI/ || !$href->{dbh}->ping ) { + my $dbh = get_new_db_connection($cxn); + @{$href}{qw(dbh err_count wake_up this_sleep start_time prev_sleep)} + = ($dbh, 0, 0, 1, 0, 0); + + # Derive and store the server's start time in hi-res + my $uptime = $dbh->selectrow_hashref("show status like 'Uptime'")->{value}; + $href->{start_time} = time() - $uptime; + + # Set timeouts so an unused connection stays alive. + # For example, a connection might be used in Q mode but idle in T mode. + if ( version_ge($dbh, '4.0.3')) { + my $timeout = $config{cxn_timeout}->{val}; + $dbh->do("set session wait_timeout=$timeout, interactive_timeout=$timeout"); + } + } + return $href->{dbh}; +} + +# Compares versions like 5.0.27 and 4.1.15-standard-log +sub version_ge { + my ( $dbh, $target ) = @_; + my $version = sprintf('%03d%03d%03d', $dbh->{mysql_serverinfo} =~ m/(\d+)/g); + return $version ge sprintf('%03d%03d%03d', $target =~ m/(\d+)/g); +} + +# Extracts status values that can be gleaned from the DBD driver without doing a whole query. +sub get_driver_status { + my @cxns = @_; + if ( !$info_gotten{driver_status}++ ) { + foreach my $cxn ( @cxns ) { + next unless $dbhs{$cxn} && $dbhs{$cxn}->{dbh} && $dbhs{$cxn}->{dbh}->{Active}; + $vars{$cxn}->{$clock} ||= {}; + my $vars = $vars{$cxn}->{$clock}; + my %res = map { $_ =~ s/ +/_/g; $_ } $dbhs{$cxn}->{dbh}->{mysql_stat} =~ m/(\w[^:]+): ([\d\.]+)/g; + map { $vars->{$_} ||= $res{$_} } keys %res; + $vars->{Uptime_hires} ||= get_uptime($cxn); + $vars->{cxn} = $cxn; + } + } +} + +sub get_new_db_connection { + my ( $connection, $destroy ) = @_; + if ( $file ) { + die "You can't connect to a MySQL server while monitoring a file. This is probably a bug."; + } + + my $dsn = $connections{$connection} + or die "No connection named '$connection' is defined in your configuration"; + + # don't ask for a username if mysql_read_default_group=client is in the DSN + if ( !defined $dsn->{have_user} and $dsn->{dsn} !~ /mysql_read_default_group=client/ ) { + my $answer = prompt("Do you want to specify a username for $connection?", undef, 'n'); + $dsn->{have_user} = $answer && $answer =~ m/1|y/i; + } + + # don't ask for a password if mysql_read_default_group=client is in the DSN + if ( !defined $dsn->{have_pass} and $dsn->{dsn} !~ /mysql_read_default_group=client/ ) { + my $answer = prompt("Do you want to specify a password for $connection?", undef, 'n'); + $dsn->{have_pass} = $answer && $answer =~ m/1|y/i; + } + + if ( !$dsn->{user} && $dsn->{have_user} ) { + my $user = $ENV{USERNAME} || $ENV{USER} || getlogin() || getpwuid($REAL_USER_ID) || undef; + $dsn->{user} = prompt("Enter username for $connection", undef, $user); + } + + if ( !defined $dsn->{user} ) { + $dsn->{user} = ''; + } + + if ( !$dsn->{pass} && !$dsn->{savepass} && $dsn->{have_pass} ) { + $dsn->{pass} = prompt_noecho("Enter password for '$dsn->{user}' on $connection"); + print "\n"; + if ( !defined($dsn->{savepass}) ) { + my $answer = prompt("Save password in plain text in the config file?", undef, 'y'); + $dsn->{savepass} = $answer && $answer =~ m/1|y/i; + } + } + + my $dbh = DBI->connect( + $dsn->{dsn}, $dsn->{user}, $dsn->{pass}, + { RaiseError => 1, PrintError => 0, AutoCommit => 1 }); + $dbh->{InactiveDestroy} = 1 unless $destroy; # Can't be set in $db_options + $dbh->{FetchHashKeyName} = 'NAME_lc'; # Lowercases all column names for fetchrow_hashref + return $dbh; +} + +sub get_cxn_errors { + my @cxns = @_; + return () unless $config{show_cxn_errors_in_tbl}->{val}; + return + map { [ $_ . ': ' . $dbhs{$_}->{last_err}, 'red' ] } + grep { $dbhs{$_} && $dbhs{$_}->{err_count} && $dbhs{$_}->{mode} eq $config{mode}->{val} } + @cxns; +} + +# Setup and tear-down functions {{{2 + +# Takes a string and turns it into a hashref you can apply to %tbl_meta tables. The string +# can be in the form 'foo, bar, foo/bar, foo as bar' much like a SQL SELECT statement. +sub compile_select_stmt { + my ($str) = @_; + my @exps = $str =~ m/\s*([^,]+(?i:\s+as\s+[^,\s]+)?)\s*(?=,|$)/g; + my %cols; + my @visible; + foreach my $exp ( @exps ) { + my ( $text, $colname ); + if ( $exp =~ m/as\s+(\w+)\s*/ ) { + $colname = $1; + $exp =~ s/as\s+(\w+)\s*//; + $text = $exp; + } + else { + $text = $colname = $exp; + } + my ($func, $err) = compile_expr($text); + $cols{$colname} = { + src => $text, + hdr => $colname, + num => 0, + func => $func, + }; + push @visible, $colname; + } + return (\%cols, \@visible); +} + +# compile_filter {{{3 +sub compile_filter { + my ( $text ) = @_; + my ( $sub, $err ); + eval "\$sub = sub { my \$set = shift; $text }"; + if ( $EVAL_ERROR ) { + $EVAL_ERROR =~ s/at \(eval.*$//; + $sub = sub { return $EVAL_ERROR }; + $err = $EVAL_ERROR; + } + return ( $sub, $err ); +} + +# compile_expr {{{3 +sub compile_expr { + my ( $expr ) = @_; + # Leave built-in functions alone so they get called as Perl functions, unless + # they are the only word in $expr, in which case treat them as hash keys. + if ( $expr =~ m/\W/ ) { + $expr =~ s/(?{$1}"/eg; + } + else { + $expr = "\$set->{$expr}"; + } + my ( $sub, $err ); + my $quoted = quotemeta($expr); + eval qq{ + \$sub = sub { + my (\$set, \$cur, \$pre) = \@_; + my \$val = eval { $expr }; + if ( \$EVAL_ERROR && \$config{debug}->{val} ) { + \$EVAL_ERROR =~ s/ at \\(eval.*//s; + die "\$EVAL_ERROR in expression $quoted"; + } + return \$val; + } + }; + if ( $EVAL_ERROR ) { + if ( $config{debug}->{val} ) { + die $EVAL_ERROR; + } + $EVAL_ERROR =~ s/ at \(eval.*$//; + $sub = sub { return $EVAL_ERROR }; + $err = $EVAL_ERROR; + } + return ( $sub, $err ); +} + +# finish {{{3 +# This is a subroutine because it's called from a key to quit the program. +sub finish { + save_config(); + ReadMode('normal') unless $opts{n}; + print "\n"; + exit(0); +} + +# core_dump {{{3 +sub core_dump { + my $msg = shift; + if ($config{debugfile}->{val} && $config{debug}->{val}) { + eval { + open my $file, '>>', $config{debugfile}->{val}; + if ( %vars ) { + print $file "Current variables:\n" . Dumper(\%vars); + } + close $file; + }; + } + print $msg; +} + +# migrate_config {{{3 +sub migrate_config { + + my ($old_filename, $new_filename) = @_; + + # don't proceed if old file doesn't exist + if ( ! -f $old_filename ) { + die "Error migrating '$old_filename': file doesn't exist.\n"; + } + # don't migrate files if new file exists + elsif ( -f $new_filename ) { + die "Error migrating '$old_filename' to '$new_filename': new file already exists.\n"; + } + # if migrating from one file to another in the same directory, just rename them + if (dirname($old_filename) eq dirname($new_filename)) { + rename($old_filename, $new_filename) + or die "Can't rename '$old_filename' to '$new_filename': $OS_ERROR"; + } + # otherwise, move the existing conf file to a temp file, make the necessary directory structure, + # and move the temp conf file to its new home + else { + my $tmp = File::Temp->new( TEMPLATE => 'innotopXXXXX', DIR => $homepath, SUFFIX => '.conf'); + my $tmp_filename = $tmp->filename; + my $dirname = dirname($new_filename); + rename($old_filename, $tmp_filename) + or die "Can't rename '$old_filename' to '$tmp_filename': $OS_ERROR"; + mkdir($dirname) or die "Can't create directory '$dirname': $OS_ERROR"; + mkdir("$dirname/plugins") or die "Can't create directory '$dirname/plugins': $OS_ERROR"; + rename($tmp_filename, $new_filename) + or die "Can't rename '$tmp_filename' to '$new_filename': $OS_ERROR"; + } +} + +# load_config {{{3 +sub load_config { + + my ($old_filename, $answer); + + if ( $opts{u} or $opts{p} or $opts{h} or $opts{P} ) { + my @params = $dsn_parser->get_cxn_params(\%opts); # dsn=$params[0] + add_new_dsn($opts{h} || 'localhost', $params[0], 'test.innotop_dl', + $opts{u} ? 1 : 0, $opts{u}, $opts{p} ? 1 : 0, $opts{p}); + } + if ($opts{c}) { + $conf_file = $opts{c}; + } + # innotop got upgraded and this is an old config file. + elsif ( -f "$homepath/.innotop" or -f "$homepath/.innotop/innotop.ini" ) { + $conf_file = $default_home_conf; + if ( -f "$homepath/.innotop") { + $old_filename = "$homepath/.innotop"; + } + elsif ( -f "$homepath/.innotop/innotop.ini" ) { + $old_filename = "$homepath/.innotop/innotop.ini"; + } + $answer = pause("Innotop's default config location has moved to '$conf_file'. Move old config file '$old_filename' there now? y/n"); + if ( lc $answer eq 'y' ) { + migrate_config($old_filename, $conf_file); + } + else { + print "\nInnotop will now exit so you can fix the config file.\n"; + exit(0); + } + } + elsif ( -f $default_home_conf ) { + $conf_file = $default_home_conf; + } + elsif ( -f $default_central_conf and not $opts{s} ) { + $conf_file = $default_central_conf; + } + else { + # If no config file was loaded, set readonly to 0 if the user wants to + # write a config + $config{readonly}->{val} = 0 if $opts{w}; + # If no connections have been defined, connect to a MySQL database + # on localhost using mysql_read_default_group=client + if (!%connections) { + add_new_dsn('localhost', + 'DBI:mysql:;host=localhost;mysql_read_default_group=client', + 'test.innotop_dl'); + } + } + + if ( -f "$conf_file" ) { + open my $file, "<", $conf_file or die("Can't open '$conf_file': $OS_ERROR"); + + # Check config file version. Just ignore if either innotop or the file has + # garbage in the version number. + if ( defined(my $line = <$file>) && $VERSION =~ m/\d/ ) { + chomp $line; + if ( my ($maj, $min, $rev) = $line =~ m/^version=(\d+)\.(\d+)(?:\.(\d+))?$/ ) { + $rev ||= 0; + my $cfg_ver = sprintf('%03d-%03d-%03d', $maj, $min, $rev); + ( $maj, $min, $rev ) = $VERSION =~ m/^(\d+)\.(\d+)(?:\.(\d+))?$/; + $rev ||= 0; + my $innotop_ver = sprintf('%03d-%03d-%03d', $maj, $min, $rev); + + if ( $cfg_ver gt $innotop_ver ) { + pause("The config file is for a newer version of innotop and may not be read correctly."); + } + else { + my @ver_history = @config_versions; + while ( my ($start, $end) = splice(@ver_history, 0, 2) ) { + # If the config file is between the endpoints and innotop is greater than + # the endpoint, innotop has a newer config file format than the file. + if ( $cfg_ver ge $start && $cfg_ver lt $end && $innotop_ver ge $end ) { + my $msg = "innotop's config file format has changed. Overwrite $conf_file? y or n"; + if ( pause($msg) eq 'n' ) { + $config{readonly}->{val} = 1; + print "\ninnotop will not save any configuration changes you make."; + pause(); + print "\n"; + } + close $file; + return; + } + } + } + } + } + + while ( my $line = <$file> ) { + chomp $line; + next unless $line =~ m/^\[([a-z_]+)\]$/; + if ( exists $config_file_sections{$1} ) { + $config_file_sections{$1}->{reader}->($file); + } + else { + warn "Unknown config file section '$1'"; + } + } + close $file or die("Can't close $conf_file: $OS_ERROR"); + } + +} + +# Do some post-processing on %tbl_meta: compile src properties into func etc. +sub post_process_tbl_meta { + foreach my $table ( values %tbl_meta ) { + foreach my $col_name ( keys %{$table->{cols}} ) { + my $col_def = $table->{cols}->{$col_name}; + my ( $sub, $err ) = compile_expr($col_def->{src}); + $col_def->{func} = $sub; + } + } +} + +# load_config_plugins {{{3 +sub load_config_plugins { + my ( $file ) = @_; + + # First, find a list of all plugins that exist on disk, and get information about them. + my $dir = $config{plugin_dir}->{val}; + foreach my $p_file ( <$dir/*.pm> ) { + my ($package, $desc); + eval { + open my $p_in, "<", $p_file or die $OS_ERROR; + while ( my $line = <$p_in> ) { + chomp $line; + if ( $line =~ m/^package\s+(.*?);/ ) { + $package = $1; + } + elsif ( $line =~ m/^# description: (.*)/ ) { + $desc = $1; + } + last if $package && $desc; + } + close $p_in; + }; + if ( $package ) { + $plugins{$package} = { + file => $p_file, + desc => $desc, + class => $package, + active => 0, + }; + if ( $config{debug}->{val} && $EVAL_ERROR ) { + die $EVAL_ERROR; + } + } + } + + # Now read which ones the user has activated. Each line simply represents an active plugin. + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + next unless $line && $plugins{$line}; + + my $obj; + eval { + require $plugins{$line}->{file}; + $obj = $line->new(%pluggable_vars); + foreach my $event ( $obj->register_for_events() ) { + my $queue = $event_listener_for{$event}; + if ( $queue ) { + push @$queue, $obj; + } + } + }; + if ( $config{debug}->{val} && $EVAL_ERROR ) { + die $EVAL_ERROR; + } + if ( $obj ) { + $plugins{$line}->{active} = 1; + $plugins{$line}->{object} = $obj; + } + } +} + +# save_config_plugins {{{3 +sub save_config_plugins { + my $file = shift; + foreach my $class ( sort keys %plugins ) { + next unless $plugins{$class}->{active}; + print $file "$class\n"; + } +} + +# load_config_active_server_groups {{{3 +sub load_config_active_server_groups { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $mode, $group ) = $line =~ m/^(.*?)=(.*)$/; + next unless $mode && $group + && exists $modes{$mode} && exists $server_groups{$group}; + $modes{$mode}->{server_group} = $group; + } +} + +# save_config_active_server_groups {{{3 +sub save_config_active_server_groups { + my $file = shift; + foreach my $mode ( sort keys %modes ) { + print $file "$mode=$modes{$mode}->{server_group}\n"; + } +} + +# load_config_server_groups {{{3 +sub load_config_server_groups { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $name, $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $name && $rest; + my @vars = unique(grep { $_ && exists $connections{$_} } split(/\s+/, $rest)); + next unless @vars; + $server_groups{$name} = \@vars; + } +} + +# save_config_server_groups {{{3 +sub save_config_server_groups { + my $file = shift; + foreach my $set ( sort keys %server_groups ) { + print $file "$set=", join(' ', @{$server_groups{$set}}), "\n"; + } +} + +# load_config_varsets {{{3 +sub load_config_varsets { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $name, $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $name && $rest; + $var_sets{$name} = { + text => $rest, + user => 1, + }; + } +} + +# save_config_varsets {{{3 +sub save_config_varsets { + my $file = shift; + foreach my $varset ( sort keys %var_sets ) { + next unless $var_sets{$varset}->{user}; + print $file "$varset=$var_sets{$varset}->{text}\n"; + } +} + +# load_config_group_by {{{3 +sub load_config_group_by { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $tbl , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $tbl && exists $tbl_meta{$tbl}; + my @parts = unique(grep { exists($tbl_meta{$tbl}->{cols}->{$_}) } split(/\s+/, $rest)); + $tbl_meta{$tbl}->{group_by} = [ @parts ]; + $tbl_meta{$tbl}->{cust}->{group_by} = 1; + } +} + +# save_config_group_by {{{3 +sub save_config_group_by { + my $file = shift; + foreach my $tbl ( sort keys %tbl_meta ) { + next if $tbl_meta{$tbl}->{temp}; + next unless $tbl_meta{$tbl}->{cust}->{group_by}; + my $aref = $tbl_meta{$tbl}->{group_by}; + print $file "$tbl=", join(' ', @$aref), "\n"; + } +} + +# load_config_filters {{{3 +sub load_config_filters { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key, $rest ) = $line =~ m/^(.+?)=(.*)$/; + next unless $key && $rest; + + my %parts = $rest =~ m/(\w+)='((?:(?!(? $sub, + text => $parts{text}, + user => 1, + name => $key, + note => 'User-defined filter', + tbls => \@tbls, + } + } +} + +# save_config_filters {{{3 +sub save_config_filters { + my $file = shift; + foreach my $key ( sort keys %filters ) { + next if !$filters{$key}->{user} || $filters{$key}->{quick}; + my $text = $filters{$key}->{text}; + $text =~ s/([\\'])/\\$1/g; + my $tbls = join(" ", @{$filters{$key}->{tbls}}); + print $file "$key=text='$text' tbls='$tbls'\n"; + } +} + +# load_config_visible_tables {{{3 +sub load_config_visible_tables { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $mode, $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $mode && exists $modes{$mode}; + $modes{$mode}->{visible_tables} = + [ unique(grep { $_ && exists $tbl_meta{$_} } split(/\s+/, $rest)) ]; + $modes{$mode}->{cust}->{visible_tables} = 1; + } +} + +# save_config_visible_tables {{{3 +sub save_config_visible_tables { + my $file = shift; + foreach my $mode ( sort keys %modes ) { + next unless $modes{$mode}->{cust}->{visible_tables}; + my $tables = $modes{$mode}->{visible_tables}; + print $file "$mode=", join(' ', @$tables), "\n"; + } +} + +# load_config_sort_cols {{{3 +sub load_config_sort_cols { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $key && exists $tbl_meta{$key}; + $tbl_meta{$key}->{sort_cols} = $rest; + $tbl_meta{$key}->{cust}->{sort_cols} = 1; + $tbl_meta{$key}->{sort_func} = make_sort_func($tbl_meta{$key}); + } +} + +# save_config_sort_cols {{{3 +sub save_config_sort_cols { + my $file = shift; + foreach my $tbl ( sort keys %tbl_meta ) { + next unless $tbl_meta{$tbl}->{cust}->{sort_cols}; + my $col = $tbl_meta{$tbl}->{sort_cols}; + print $file "$tbl=$col\n"; + } +} + +# load_config_active_filters {{{3 +sub load_config_active_filters { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $tbl , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $tbl && exists $tbl_meta{$tbl}; + my @parts = unique(grep { exists($filters{$_}) } split(/\s+/, $rest)); + @parts = grep { grep { $tbl eq $_ } @{$filters{$_}->{tbls}} } @parts; + $tbl_meta{$tbl}->{filters} = [ @parts ]; + $tbl_meta{$tbl}->{cust}->{filters} = 1; + } +} + +# save_config_active_filters {{{3 +sub save_config_active_filters { + my $file = shift; + foreach my $tbl ( sort keys %tbl_meta ) { + next if $tbl_meta{$tbl}->{temp}; + next unless $tbl_meta{$tbl}->{cust}->{filters}; + my $aref = $tbl_meta{$tbl}->{filters}; + print $file "$tbl=", join(' ', @$aref), "\n"; + } +} + +# load_config_active_columns {{{3 +sub load_config_active_columns { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $key && exists $tbl_meta{$key}; + my @parts = grep { exists($tbl_meta{$key}->{cols}->{$_}) } unique split(/ /, $rest); + $tbl_meta{$key}->{visible} = [ @parts ]; + $tbl_meta{$key}->{cust}->{visible} = 1; + } +} + +# save_config_active_columns {{{3 +sub save_config_active_columns { + my $file = shift; + foreach my $tbl ( sort keys %tbl_meta ) { + next unless $tbl_meta{$tbl}->{cust}->{visible}; + my $aref = $tbl_meta{$tbl}->{visible}; + print $file "$tbl=", join(' ', @$aref), "\n"; + } +} + +# save_config_tbl_meta {{{3 +sub save_config_tbl_meta { + my $file = shift; + foreach my $tbl ( sort keys %tbl_meta ) { + foreach my $col ( keys %{$tbl_meta{$tbl}->{cols}} ) { + my $meta = $tbl_meta{$tbl}->{cols}->{$col}; + next unless $meta->{user}; + print $file "$col=", join( + " ", + map { + # Some properties (trans) are arrays, others scalars + my $val = ref($meta->{$_}) ? join(',', @{$meta->{$_}}) : $meta->{$_}; + $val =~ s/([\\'])/\\$1/g; # Escape backslashes and single quotes + "$_='$val'"; # Enclose in single quotes + } + grep { $_ ne 'func' } + keys %$meta + ), "\n"; + } + } +} + +# save_config_config {{{3 +sub save_config_config { + my $file = shift; + foreach my $key ( sort keys %config ) { + eval { + if ( $key ne 'password' || $config{savepass}->{val} ) { + print $file "# $config{$key}->{note}\n" + or die "Cannot print to file: $OS_ERROR"; + my $val = $config{$key}->{val}; + $val = '' unless defined($val); + if ( ref( $val ) eq 'ARRAY' ) { + print $file "$key=" + . join( " ", @$val ) . "\n" + or die "Cannot print to file: $OS_ERROR"; + } + elsif ( ref( $val ) eq 'HASH' ) { + print $file "$key=" + . join( " ", + map { "$_:$val->{$_}" } keys %$val + ) . "\n"; + } + else { + print $file "$key=$val\n"; + } + } + }; + if ( $EVAL_ERROR ) { print "$EVAL_ERROR in $key"; }; + } + +} + +# load_config_config {{{3 +sub load_config_config { + my ( $file ) = @_; + + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $name, $val ) = $line =~ m/^(.+?)=(.*)$/; + next unless defined $name && defined $val; + + # Validate the incoming values... + if ( $name && exists( $config{$name} ) ) { + if ( !$config{$name}->{pat} || $val =~ m/$config{$name}->{pat}/ ) { + $config{$name}->{val} = $val; + $config{$name}->{read} = 1; + } + } + } +} + +# load_config_tbl_meta {{{3 +sub load_config_tbl_meta { + my ( $file ) = @_; + + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + # Each tbl_meta section has all the properties defined in %col_props. + my ( $col , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $col; + my %parts = $rest =~ m/(\w+)='((?:(?!(?{cols}->{$col} ||= {}; + + foreach my $prop ( keys %col_props ) { + if ( !defined($parts{$prop}) ) { + die "Undefined property $prop for column $col in table $tbl"; + } + + # Un-escape escaping + $parts{$prop} =~ s/\\\\/\\/g; + $parts{$prop} =~ s/\\'/'/g; + + if ( ref $col_props{$prop} ) { + if ( $prop eq 'trans' ) { + $meta->{cols}->{$col}->{trans} + = [ unique(grep { exists $trans_funcs{$_} } split(',', $parts{$prop})) ]; + } + else { + $meta->{cols}->{$col}->{$prop} = [ split(',', $parts{$prop}) ]; + } + } + else { + $meta->{cols}->{$col}->{$prop} = $parts{$prop}; + } + } + + } +} + +# save_config {{{3 +sub save_config { + print "\n"; + return if $config{readonly}->{val}; + # return if no config file was loaded and -w wasn't specified + if (not $conf_file) { + if (not $opts{w}) { + return; + } + else { + # if no config was loaded but -w was specified, + # write to $default_home_conf + $conf_file = $default_home_conf; + } + } + elsif ($conf_file and $opts{w}) { + print "Loaded config file on start-up, so ignoring -w (see --help)\n" + } + + my $dirname = dirname($conf_file); + + # if directories don't exist, create them. This could cause errors + # or warnings if a central config doesn't have readonly=1, but being + # flexible requires giving the user enough rope to hang themselves with. + if ( ! -d $dirname ) { + mkdir $dirname + or die "Can't create directory '$dirname': $OS_ERROR"; + } + if ( ! -d "$dirname/plugins" ) { + mkdir "$dirname/plugins" + or warn "Can't create directory '$dirname/plugins': $OS_ERROR\n"; + } + + # Save to a temp file first, so a crash doesn't destroy the main config file + my $tmpfile = File::Temp->new( TEMPLATE => 'innotopXXXXX', DIR => $dirname, SUFFIX => '.conf.tmp'); + open my $file, "+>", $tmpfile + or die("Can't write to $tmpfile: $OS_ERROR"); + print $file "version=$VERSION\n"; + + foreach my $section ( @ordered_config_file_sections ) { + die "No such config file section $section" unless $config_file_sections{$section}; + print $file "\n[$section]\n\n"; + $config_file_sections{$section}->{writer}->($file); + print $file "\n[/$section]\n"; + } + + # Now clobber the main config file with the temp. + close $file or die("Can't close $tmpfile: $OS_ERROR"); + rename($tmpfile, $conf_file) or die("Can't rename $tmpfile to $conf_file: $OS_ERROR"); +} + +# load_config_connections {{{3 +sub load_config_connections { + return if $opts{u} or $opts{p} or $opts{h} or $opts{P}; # don't load connections if DSN or user/pass options used + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $key; + my %parts = $rest =~ m/(\S+?)=(\S*)/g; + my %conn = map { $_ => $parts{$_} || '' } @conn_parts; + $connections{$key} = \%conn; + } +} + +# save_config_connections {{{3 +sub save_config_connections { + my $file = shift; + foreach my $conn ( sort keys %connections ) { + my $href = $connections{$conn}; + my @keys = $href->{savepass} ? @conn_parts : grep { $_ ne 'pass' } @conn_parts; + print $file "$conn=", join(' ', map { "$_=$href->{$_}" } grep { defined $href->{$_} } @keys), "\n"; + } +} + +sub load_config_colors { + my ( $file ) = @_; + my %rule_set_for; + + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $tbl, $rule ) = $line =~ m/^(.*?)=(.*)$/; + next unless $tbl && $rule; + next unless exists $tbl_meta{$tbl}; + my %parts = $rule =~ m/(\w+)='((?:(?!(?{cols}->{$parts{col}}; + next unless $parts{op} && exists $comp_ops{$parts{op}}; + next unless defined $parts{arg}; + next unless defined $parts{color}; + my @colors = unique(grep { exists $ansicolors{$_} } split(/\W+/, $parts{color})); + next unless @colors; + + # Finally! Enough validation... + $rule_set_for{$tbl} ||= []; + push @{$rule_set_for{$tbl}}, \%parts; + } + + foreach my $tbl ( keys %rule_set_for ) { + $tbl_meta{$tbl}->{colors} = $rule_set_for{$tbl}; + $tbl_meta{$tbl}->{color_func} = make_color_func($tbl_meta{$tbl}); + $tbl_meta{$tbl}->{cust}->{colors} = 1; + } +} + +# save_config_colors {{{3 +sub save_config_colors { + my $file = shift; + foreach my $tbl ( sort keys %tbl_meta ) { + my $meta = $tbl_meta{$tbl}; + next unless $meta->{cust}->{colors}; + foreach my $rule ( @{$meta->{colors}} ) { + print $file "$tbl=", join( + ' ', + map { + my $val = $rule->{$_}; + $val =~ s/([\\'])/\\$1/g; # Escape backslashes and single quotes + "$_='$val'"; # Enclose in single quotes + } + qw(col op arg color) + ), "\n"; + } + } +} + +# load_config_active_connections {{{3 +sub load_config_active_connections { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $key && exists $modes{$key}; + my @parts = grep { exists $connections{$_} } split(/ /, $rest); + $modes{$key}->{connections} = [ @parts ] if exists $modes{$key}; + } +} + +# save_config_active_connections {{{3 +sub save_config_active_connections { + my $file = shift; + foreach my $mode ( sort keys %modes ) { + my @connections = get_connections($mode); + print $file "$mode=", join(' ', @connections), "\n"; + } +} + +# load_config_stmt_sleep_times {{{3 +sub load_config_stmt_sleep_times { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key , $val ) = split('=', $line); + next unless $key && defined $val && $val =~ m/$num_regex/; + $stmt_sleep_time_for{$key} = $val; + } +} + +# save_config_stmt_sleep_times {{{3 +sub save_config_stmt_sleep_times { + my $file = shift; + foreach my $key ( sort keys %stmt_sleep_time_for ) { + print $file "$key=$stmt_sleep_time_for{$key}\n"; + } +} + +# load_config_mvs {{{3 +sub load_config_mvs { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key , $val ) = split('=', $line); + next unless $key && defined $val && $val =~ m/$num_regex/; + $mvs{$key} = $val; + } +} + +# save_config_mvs {{{3 +sub save_config_mvs { + my $file = shift; + foreach my $key ( sort keys %mvs ) { + print $file "$key=$mvs{$key}\n"; + } +} + +# edit_configuration {{{3 +sub edit_configuration { + my $key = ''; + while ( $key ne 'q' ) { + $clear_screen_sub->(); + my @display_lines = ''; + + if ( $key && $cfg_editor_action{$key} ) { + $cfg_editor_action{$key}->{func}->(); + } + + # Show help + push @display_lines, create_caption('What configuration do you want to edit?', + create_table2( + [ sort keys %cfg_editor_action ], + { map { $_ => $_ } keys %cfg_editor_action }, + { map { $_ => $cfg_editor_action{$_}->{note} } keys %cfg_editor_action }, + { sep => ' ' })); + + draw_screen(\@display_lines); + $key = pause(''); + } +} + +# edit_configuration_variables {{{3 +sub edit_configuration_variables { + $clear_screen_sub->(); + my $mode = $config{mode}->{val}; + + my %config_choices + = map { $_ => $config{$_}->{note} || '' } + # Only config values that are marked as applying to this mode. + grep { + my $key = $_; + $config{$key}->{conf} && + ( $config{$key}->{conf} eq 'ALL' + || grep { $mode eq $_ } @{$config{$key}->{conf}} ) + } keys %config; + + my $key = prompt_list( + "Enter the name of the variable you wish to configure", + '', + sub{ return keys %config_choices }, + \%config_choices); + + if ( exists($config_choices{$key}) ) { + get_config_interactive($key); + } +} + +# edit_color_rules {{{3 +sub edit_color_rules { + my ( $tbl ) = @_; + $clear_screen_sub->(); + $tbl ||= choose_visible_table(); + if ( $tbl && exists($tbl_meta{$tbl}) ) { + my $meta = $tbl_meta{$tbl}; + my @cols = ('', qw(col op arg color)); + my $info = { map { $_ => { hdr => $_, just => '-', } } @cols }; + $info->{label}->{maxw} = 30; + my $key; + my $selected_rule; + + # This loop builds a tabular view of the rules. + do { + + # Show help + if ( $key && $key eq '?' ) { + my @display_lines = ''; + push @display_lines, create_caption('Editor key mappings', + create_table2( + [ sort keys %color_editor_action ], + { map { $_ => $_ } keys %color_editor_action }, + { map { $_ => $color_editor_action{$_}->{note} } keys %color_editor_action }, + { sep => ' ' })); + draw_screen(\@display_lines); + pause(); + $key = ''; + } + else { + + # Do the action specified + $selected_rule ||= 0; + if ( $key && $color_editor_action{$key} ) { + $selected_rule = $color_editor_action{$key}->{func}->($tbl, $selected_rule); + $selected_rule ||= 0; + } + + # Build the table of rules. If the terminal has color, the selected rule + # will be highlighted; otherwise a > at the left will indicate. + my $data = $meta->{colors} || []; + foreach my $i ( 0..@$data - 1 ) { + $data->[$i]->{''} = $i == $selected_rule ? '>' : ''; + } + my @display_lines = create_table(\@cols, $info, $data); + + # Highlight selected entry + for my $i ( 0 .. $#display_lines ) { + if ( $display_lines[$i] =~ m/^>/ ) { + $display_lines[$i] = [ $display_lines[$i], 'reverse' ]; + } + } + + # Draw the screen and wait for a command. + unshift @display_lines, '', + "Editing color rules for $meta->{capt}. Press ? for help, q to " + . "quit.", ''; + draw_screen(\@display_lines); + print "\n\n", word_wrap('Rules are applied in order from top to ' + . 'bottom. The first matching rule wins and prevents the ' + . 'rest of the rules from being applied.'); + $key = pause(''); + } + } while ( $key ne 'q' ); + $meta->{color_func} = make_color_func($meta); + } +} + +# add_quick_filter {{{3 +sub add_quick_filter { + my $tbl = choose_visible_table(); + if ( $tbl && exists($tbl_meta{$tbl}) ) { + print "\n"; + my $response = prompt_list( + "Enter column name and filter text", + '', + sub { return keys %{$tbl_meta{$tbl}->{cols}} }, + () + ); + my ( $col, $text ) = split(/\s+/, $response, 2); + + # You can't filter on a nonexistent column. But if you filter on a pivoted + # table, the columns are different, so on a pivoted table, allow filtering + # on the 'name' column. + # NOTE: if a table is pivoted and un-pivoted, this will likely cause crashes. + # Currently not an issue since there's no way to toggle pivot/nopivot. + return unless $col && $text && + (exists($tbl_meta{$tbl}->{cols}->{$col}) + || ($tbl_meta{$tbl}->{pivot} && $col eq 'name')); + + my ( $sub, $err ) = compile_filter( "defined \$set->{$col} && \$set->{$col} =~ m/$text/" ); + return if !$sub || $err; + my $name = "quick_$tbl.$col"; + $filters{$name} = { + func => $sub, + text => $text, + user => 1, + quick => 1, + name => $name, + note => 'Quick-filter', + tbls => [$tbl], + }; + push @{$tbl_meta{$tbl}->{filters}}, $name; + } +} + +# clear_quick_filters {{{3 +sub clear_quick_filters { + my $tbl = choose_visible_table( + # Only tables that have quick-filters + sub { + my ( $tbl ) = @_; + return scalar grep { $filters{$_}->{quick} } @{ $tbl_meta{$tbl}->{filters} }; + } + ); + if ( $tbl && exists($tbl_meta{$tbl}) ) { + my @current = @{$tbl_meta{$tbl}->{filters}}; + @current = grep { !$filters{$_}->{quick} } @current; + $tbl_meta{$tbl}->{filters} = \@current; + } +} + +sub edit_plugins { + $clear_screen_sub->(); + + my @cols = ('', qw(class desc active)); + my $info = { map { $_ => { hdr => $_, just => '-', } } @cols }; + my @rows = map { $plugins{$_} } sort keys %plugins; + my $key; + my $selected; + + # This loop builds a tabular view of the plugins. + do { + + # Show help + if ( $key && $key eq '?' ) { + my @display_lines = ''; + push @display_lines, create_caption('Editor key mappings', + create_table2( + [ sort keys %plugin_editor_action ], + { map { $_ => $_ } keys %plugin_editor_action }, + { map { $_ => $plugin_editor_action{$_}->{note} } keys %plugin_editor_action }, + { sep => ' ' })); + draw_screen(\@display_lines); + pause(); + $key = ''; + } + + # Do the action specified + else { + $selected ||= 0; + if ( $key && $plugin_editor_action{$key} ) { + $selected = $plugin_editor_action{$key}->{func}->(\@rows, $selected); + $selected ||= 0; + } + + # Build the table of plugins. + foreach my $row ( 0.. $#rows ) { + $rows[$row]->{''} = $row eq $selected ? '>' : ' '; + } + my @display_lines = create_table(\@cols, $info, \@rows); + + # Highlight selected entry + for my $i ( 0 .. $#display_lines ) { + if ( $display_lines[$i] =~ m/^>/ ) { + $display_lines[$i] = [ $display_lines[$i], 'reverse' ]; + } + } + + # Draw the screen and wait for a command. + unshift @display_lines, '', + "Plugin Management. Press ? for help, q to quit.", ''; + draw_screen(\@display_lines); + $key = pause(''); + } + } while ( $key ne 'q' ); +} + +# edit_table {{{3 +sub edit_table { + $clear_screen_sub->(); + my ( $tbl ) = @_; + $tbl ||= choose_visible_table(); + if ( $tbl && exists($tbl_meta{$tbl}) ) { + my $meta = $tbl_meta{$tbl}; + my @cols = ('', qw(name hdr label src)); + my $info = { map { $_ => { hdr => $_, just => '-', } } @cols }; + $info->{label}->{maxw} = 30; + my $key; + my $selected_column; + + # This loop builds a tabular view of the tbl_meta's structure, showing each column + # in the entry as a row. + do { + + # Show help + if ( $key && $key eq '?' ) { + my @display_lines = ''; + push @display_lines, create_caption('Editor key mappings', + create_table2( + [ sort keys %tbl_editor_action ], + { map { $_ => $_ } keys %tbl_editor_action }, + { map { $_ => $tbl_editor_action{$_}->{note} } keys %tbl_editor_action }, + { sep => ' ' })); + draw_screen(\@display_lines); + pause(); + $key = ''; + } + else { + + # Do the action specified + $selected_column ||= $meta->{visible}->[0]; + if ( $key && $tbl_editor_action{$key} ) { + $selected_column = $tbl_editor_action{$key}->{func}->($tbl, $selected_column); + $selected_column ||= $meta->{visible}->[0]; + } + + # Build the pivoted view of the table's meta-data. If the terminal has color, + # The selected row will be highlighted; otherwise a > at the left will indicate. + my $data = []; + foreach my $row ( @{$meta->{visible}} ) { + my %hash; + @hash{ @cols } = @{$meta->{cols}->{$row}}{@cols}; + $hash{src} = '' if ref $hash{src}; + $hash{name} = $row; + $hash{''} = $row eq $selected_column ? '>' : ' '; + push @$data, \%hash; + } + my @display_lines = create_table(\@cols, $info, $data); + + # Highlight selected entry + for my $i ( 0 .. $#display_lines ) { + if ( $display_lines[$i] =~ m/^>/ ) { + $display_lines[$i] = [ $display_lines[$i], 'reverse' ]; + } + } + + # Draw the screen and wait for a command. + unshift @display_lines, '', + "Editing table definition for $meta->{capt}. Press ? for help, q to quit.", ''; + draw_screen(\@display_lines, { clear => 1 }); + $key = pause(''); + } + } while ( $key ne 'q' ); + } +} + +# choose_mode_tables {{{3 +# Choose which table(s), and in what order, to display in a given mode. +sub choose_mode_tables { + my $mode = $config{mode}->{val}; + my @tbls = @{$modes{$mode}->{visible_tables}}; + my $new = prompt_list( + "Choose tables to display", + join(' ', @tbls), + sub { return @{$modes{$mode}->{tables}} }, + { map { $_ => $tbl_meta{$_}->{capt} } @{$modes{$mode}->{tables}} } + ); + $modes{$mode}->{visible_tables} = + [ unique(grep { $_ && exists $tbl_meta{$_} } split(/\s+/, $new)) ]; + $modes{$mode}->{cust}->{visible_tables} = 1; +} + +# choose_visible_table {{{3 +sub choose_visible_table { + my ( $grep_cond ) = @_; + my $mode = $config{mode}->{val}; + my @tbls + = grep { $grep_cond ? $grep_cond->($_) : 1 } + @{$modes{$mode}->{visible_tables}}; + my $tbl = $tbls[0]; + if ( @tbls > 1 ) { + $tbl = prompt_list( + "Choose a table", + '', + sub { return @tbls }, + { map { $_ => $tbl_meta{$_}->{capt} } @tbls } + ); + } + return $tbl; +} + +sub toggle_aggregate { + my ( $tbl ) = @_; + $tbl ||= choose_visible_table(); + return unless $tbl && exists $tbl_meta{$tbl}; + my $meta = $tbl_meta{$tbl}; + $meta->{aggregate} ^= 1; +} + +sub choose_filters { + my ( $tbl ) = @_; + $tbl ||= choose_visible_table(); + return unless $tbl && exists $tbl_meta{$tbl}; + my $meta = $tbl_meta{$tbl}; + $clear_screen_sub->(); + + print "Choose filters for $meta->{capt}:\n"; + + my $ini = join(' ', @{$meta->{filters}}); + my $val = prompt_list( + 'Choose filters', + $ini, + sub { return keys %filters }, + { + map { $_ => $filters{$_}->{note} } + grep { grep { $tbl eq $_ } @{$filters{$_}->{tbls}} } + keys %filters + } + ); + + my @choices = unique(split(/\s+/, $val)); + foreach my $new ( grep { !exists($filters{$_}) } @choices ) { + my $answer = prompt("There is no filter called '$new'. Create it?", undef, 'y'); + if ( $answer eq 'y' ) { + create_new_filter($new, $tbl); + } + } + @choices = grep { exists $filters{$_} } @choices; + @choices = grep { grep { $tbl eq $_ } @{$filters{$_}->{tbls}} } @choices; + $meta->{filters} = [ @choices ]; + $meta->{cust}->{filters} = 1; +} + +sub choose_group_cols { + my ( $tbl ) = @_; + $tbl ||= choose_visible_table(); + return unless $tbl && exists $tbl_meta{$tbl}; + $clear_screen_sub->(); + my $meta = $tbl_meta{$tbl}; + my $curr = join(', ', @{$meta->{group_by}}); + my $val = prompt_list( + 'Group-by columns', + $curr, + sub { return keys %{$meta->{cols}} }, + { map { $_ => $meta->{cols}->{$_}->{label} } keys %{$meta->{cols}} }); + if ( $curr ne $val ) { + $meta->{group_by} = [ grep { exists $meta->{cols}->{$_} } $val =~ m/(\w+)/g ]; + $meta->{cust}->{group_by} = 1; + } +} + +sub choose_sort_cols { + my ( $tbl ) = @_; + $tbl ||= choose_visible_table(); + return unless $tbl && exists $tbl_meta{$tbl}; + $clear_screen_sub->(); + my $meta = $tbl_meta{$tbl}; + + my ( $cols, $hints ); + if ( $meta->{pivot} ) { + $cols = sub { qw(name set_0) }; + $hints = { name => 'name', set_0 => 'set_0' }; + } + else { + $cols = sub { return keys %{$meta->{cols}} }; + $hints = { map { $_ => $meta->{cols}->{$_}->{label} } keys %{$meta->{cols}} }; + } + + my $val = prompt_list( + 'Sort columns (reverse sort with -col)', + $meta->{sort_cols}, + $cols, + $hints ); + if ( $meta->{sort_cols} ne $val ) { + $meta->{sort_cols} = $val; + $meta->{cust}->{sort_cols} = 1; + $tbl_meta{$tbl}->{sort_func} = make_sort_func($tbl_meta{$tbl}); + } +} + +# create_new_filter {{{3 +sub create_new_filter { + my ( $filter, $tbl ) = @_; + $clear_screen_sub->(); + + if ( !$filter || $filter =~ m/\W/ ) { + print word_wrap("Choose a name for the filter. This name is not displayed, and is only used " + . "for internal reference. It can only contain lowercase letters, numbers, and underscores."); + print "\n\n"; + do { + $filter = prompt("Enter filter name"); + } while ( !$filter || $filter =~ m/\W/ ); + } + + my $completion = sub { keys %{$tbl_meta{$tbl}->{cols}} }; + my ( $err, $sub, $body ); + do { + $clear_screen_sub->(); + print word_wrap("A filter is a Perl subroutine that accepts a hashref of columns " + . "called \$set, and returns a true value if the filter accepts the row. Example:\n" + . " \$set->{active_secs} > 5\n" + . "will only allow rows if their active_secs column is greater than 5."); + print "\n\n"; + if ( $err ) { + print "There's an error in your filter expression: $err\n\n"; + } + $body = prompt("Enter subroutine body", undef, undef, $completion); + ( $sub, $err ) = compile_filter($body); + } while ( $err ); + + $filters{$filter} = { + func => $sub, + text => $body, + user => 1, + name => $filter, + note => 'User-defined filter', + tbls => [$tbl], + }; +} + +# get_config_interactive {{{3 +sub get_config_interactive { + my $key = shift; + $clear_screen_sub->(); + + # Print help first. + print "Enter a new value for '$key' ($config{$key}->{note}).\n"; + + my $current = ref($config{$key}->{val}) ? join(" ", @{$config{$key}->{val}}) : $config{$key}->{val}; + + my $new_value = prompt('Enter a value', $config{$key}->{pat}, $current); + $config{$key}->{val} = $new_value; +} + +sub edit_current_var_set { + my $mode = $config{mode}->{val}; + my $name = $config{"${mode}_set"}->{val}; + my $variables = $var_sets{$name}->{text}; + + my $new = $variables; + do { + $clear_screen_sub->(); + $new = prompt("Enter variables for $name", undef, $variables); + } until ( $new ); + + if ( $new ne $variables ) { + @{$var_sets{$name}}{qw(text user)} = ( $new, 1); + } +} + + +sub choose_var_set { + my ( $key ) = @_; + $clear_screen_sub->(); + + my $new_value = prompt_list( + 'Choose a set of values to display, or enter the name of a new one', + $config{$key}->{val}, + sub { return keys %var_sets }, + { map { $_ => $var_sets{$_}->{text} } keys %var_sets }); + + if ( !exists $var_sets{$new_value} ) { + add_new_var_set($new_value); + } + + $config{$key}->{val} = $new_value if exists $var_sets{$new_value}; +} + +sub switch_var_set { + my ( $cfg_var, $dir ) = @_; + my @var_sets = sort keys %var_sets; + my $cur = $config{$cfg_var}->{val}; + my $pos = grep { $_ lt $cur } @var_sets; + my $newpos = ($pos + $dir) % @var_sets; + $config{$cfg_var}->{val} = $var_sets[$newpos]; + $clear_screen_sub->(); +} + +# Online configuration and prompting functions {{{2 + +# edit_stmt_sleep_times {{{3 +sub edit_stmt_sleep_times { + $clear_screen_sub->(); + my $stmt = prompt_list('Specify a statement', '', sub { return sort keys %stmt_maker_for }); + return unless $stmt && exists $stmt_maker_for{$stmt}; + $clear_screen_sub->(); + my $curr_val = $stmt_sleep_time_for{$stmt} || 0; + my $new_val = prompt('Specify a sleep delay after calling this SQL', $num_regex, $curr_val); + if ( $new_val ) { + $stmt_sleep_time_for{$stmt} = $new_val; + } + else { + delete $stmt_sleep_time_for{$stmt}; + } +} + +# edit_server_groups {{{3 +# Choose which server connections are in a server group. First choose a group, +# then choose which connections are in it. +sub edit_server_groups { + $clear_screen_sub->(); + my $mode = $config{mode}->{val}; + my $group = $modes{$mode}->{server_group}; + my %curr = %server_groups; + my $new = choose_or_create_server_group($group, 'to edit'); + $clear_screen_sub->(); + if ( exists $curr{$new} ) { + # Don't do this step if the user just created a new server group, + # because part of that process was to choose connections. + my $cxns = join(' ', @{$server_groups{$new}}); + my @conns = choose_or_create_connection($cxns, 'for this group'); + $server_groups{$new} = \@conns; + } +} + +# choose_server_groups {{{3 +sub choose_server_groups { + $clear_screen_sub->(); + my $mode = $config{mode}->{val}; + my $group = $modes{$mode}->{server_group}; + my $new = choose_or_create_server_group($group, 'for this mode'); + $modes{$mode}->{server_group} = $new if exists $server_groups{$new}; +} + +sub choose_or_create_server_group { + my ( $group, $prompt ) = @_; + my $new = ''; + + my @available = sort keys %server_groups; + + if ( @available ) { + print "You can enter the name of a new group to create it.\n"; + + $new = prompt_list( + "Choose a server group $prompt", + $group, + sub { return @available }, + { map { $_ => join(' ', @{$server_groups{$_}}) } @available }); + + $new =~ s/\s.*//; + + if ( !exists $server_groups{$new} ) { + my $answer = prompt("There is no server group called '$new'. Create it?", undef, "y"); + if ( $answer eq 'y' ) { + add_new_server_group($new); + } + } + } + else { + $new = add_new_server_group(); + } + return $new; +} + +sub choose_or_create_connection { + my ( $cxns, $prompt ) = @_; + print "You can enter the name of a new connection to create it.\n"; + + my @available = sort keys %connections; + my $new_cxns = prompt_list( + "Choose connections $prompt", + $cxns, + sub { return @available }, + { map { $_ => $connections{$_}->{dsn} } @available }); + + my @new = unique(grep { !exists $connections{$_} } split(/\s+/, $new_cxns)); + foreach my $new ( @new ) { + my $answer = prompt("There is no connection called '$new'. Create it?", undef, "y"); + if ( $answer eq 'y' ) { + add_new_dsn($new); + } + } + + return unique(grep { exists $connections{$_} } split(/\s+/, $new_cxns)); +} + +# choose_servers {{{3 +sub choose_servers { + $clear_screen_sub->(); + my $mode = $config{mode}->{val}; + my $cxns = join(' ', get_connections()); + my @chosen = choose_or_create_connection($cxns, 'for this mode'); + $modes{$mode}->{connections} = \@chosen; + $modes{$mode}->{server_group} = ''; # Clear this because it overrides {connections} +} + +# display_license {{{3 +sub display_license { + $clear_screen_sub->(); + + print $innotop_license; + + pause(); +} + +# Data-retrieval functions {{{2 +# get_status_info {{{3 +# Get SHOW STATUS and SHOW VARIABLES together. +sub get_status_info { + my @cxns = @_; + if ( !$info_gotten{status}++ ) { + foreach my $cxn ( @cxns ) { + $vars{$cxn}->{$clock} ||= {}; + my $vars = $vars{$cxn}->{$clock}; + + my $sth = do_stmt($cxn, 'SHOW_STATUS') or next; + my $res = $sth->fetchall_arrayref(); + map { $vars->{$_->[0]} = $_->[1] || 0 } @$res; + + # Calculate hi-res uptime and add cxn to the hash. This duplicates get_driver_status, + # but it's most important to have consistency. + $vars->{Uptime_hires} ||= get_uptime($cxn); + $vars->{cxn} = $cxn; + + # Add SHOW VARIABLES to the hash + $sth = do_stmt($cxn, 'SHOW_VARIABLES') or next; + $res = $sth->fetchall_arrayref(); + map { $vars->{$_->[0]} = $_->[1] || 0 } @$res; + } + } +} + +# Chooses a thread for explaining, killing, etc... +# First arg is a func that can be called in grep. +sub choose_thread { + my ( $grep_cond, $prompt ) = @_; + + # Narrow the list to queries that can be explained. + my %thread_for = map { + # Eliminate innotop's own threads. + $_ => $dbhs{$_}->{dbh} ? $dbhs{$_}->{dbh}->{mysql_thread_id} : 0 + } keys %connections; + + my @candidates = grep { + $_->{id} != $thread_for{$_->{cxn}} && $grep_cond->($_) + } @current_queries; + return unless @candidates; + + # Find out which server. + my @cxns = unique map { $_->{cxn} } @candidates; + my ( $cxn ) = select_cxn('On which server', @cxns); + return unless $cxn && exists($connections{$cxn}); + + # Re-filter the list of candidates to only those on this server + @candidates = grep { $_->{cxn} eq $cxn } @candidates; + + # Find out which thread to do. + my $info; + if ( @candidates > 1 ) { + + # Sort longest-active first, then longest-idle. + my $sort_func = sub { + my ( $a, $b ) = @_; + return $a->{query} && !$b->{query} ? 1 + : $b->{query} && !$a->{query} ? -1 + : ($a->{time} || 0) <=> ($b->{time} || 0); + }; + my @threads = map { $_->{id} } reverse sort { $sort_func->($a, $b) } @candidates; + + print "\n"; + my $thread = prompt_list($prompt, + $threads[0], + sub { return @threads }); + return unless $thread && $thread =~ m/$int_regex/; + + # Find the info hash of that query on that server. + ( $info ) = grep { $thread == $_->{id} } @candidates; + } + else { + $info = $candidates[0]; + } + return $info; +} + +# analyze_query {{{3 +# Allows the user to show fulltext, explain, show optimized... +sub analyze_query { + my ( $action ) = @_; + + my $info = choose_thread( + sub { $_[0]->{query} }, + 'Select a thread to analyze', + ); + return unless $info; + + my %actions = ( + e => \&display_explain, + f => \&show_full_query, + o => \&show_optimized_query, + ); + do { + $actions{$action}->($info); + print "\n"; + $action = pause('Press e to explain, f for full query, o for optimized query'); + } while ( exists($actions{$action}) ); +} + +# inc {{{3 +# Returns the difference between two sets of variables/status/innodb stuff. +sub inc { + my ( $offset, $cxn ) = @_; + my $vars = $vars{$cxn}; + if ( $offset < 0 ) { + return $vars->{$clock}; + } + elsif ( exists $vars{$clock - $offset} && !exists $vars->{$clock - $offset - 1} ) { + return $vars->{$clock - $offset}; + } + my $cur = $vars->{$clock - $offset}; + my $pre = $vars->{$clock - $offset - 1}; + return { + # Numeric variables get subtracted, non-numeric get passed straight through. + map { + $_ => + ( (defined $cur->{$_} && $cur->{$_} =~ m/$num_regex/) + ? $cur->{$_} - ($pre->{$_} || 0) + : $cur->{$_} ) + } keys %{$cur} + }; +} + +# extract_values {{{3 +# Arguments are a set of values (which may be incremental, derived from +# current and previous), current, and previous values. +# TODO: there are a few places that don't remember prev set so can't pass it. +sub extract_values { + my ( $set, $cur, $pre, $tbl ) = @_; + + # Hook in event listeners + foreach my $listener ( @{$event_listener_for{extract_values}} ) { + $listener->extract_values($set, $cur, $pre, $tbl); + } + + my $result = {}; + my $meta = $tbl_meta{$tbl}; + my $cols = $meta->{cols}; + foreach my $key ( keys %$cols ) { + my $info = $cols->{$key} + or die "Column '$key' doesn't exist in $tbl"; + die "No func defined for '$key' in $tbl" + unless $info->{func}; + eval { + $result->{$key} = $info->{func}->($set, $cur, $pre) + }; + if ( $EVAL_ERROR ) { + if ( $config{debug}->{val} ) { + die $EVAL_ERROR; + } + $result->{$key} = $info->{num} ? 0 : ''; + } + } + return $result; +} + +# get_full_processlist {{{3 +sub get_full_processlist { + my @cxns = @_; + my @result; + foreach my $cxn ( @cxns ) { + my $stmt = do_stmt($cxn, 'PROCESSLIST') or next; + my $arr = $stmt->fetchall_arrayref({}); + push @result, map { $_->{cxn} = $cxn; $_ } @$arr; + } + return @result; +} + +# get_open_tables {{{3 +sub get_open_tables { + my @cxns = @_; + my @result; + foreach my $cxn ( @cxns ) { + my $stmt = do_stmt($cxn, 'OPEN_TABLES') or next; + my $arr = $stmt->fetchall_arrayref({}); + push @result, map { $_->{cxn} = $cxn; $_ } @$arr; + } + return @result; +} + +# get_innodb_status {{{3 +sub get_innodb_status { + my ( $cxns, $addl_sections ) = @_; + if ( !$config{skip_innodb}->{val} && !$info_gotten{innodb_status}++ ) { + + # Determine which sections need to be parsed + my %sections_required = + map { $tbl_meta{$_}->{innodb} => 1 } + grep { $_ && $tbl_meta{$_}->{innodb} } + get_visible_tables(); + + # Add in any other sections the caller requested. + foreach my $sec ( @$addl_sections ) { + $sections_required{$sec} = 1; + } + + foreach my $cxn ( @$cxns ) { + my $innodb_status_text; + + if ( $file ) { # Try to fetch status text from the file. + my @stat = stat($file); + + # Initialize the file. + if ( !$file_mtime ) { + # Initialize to 130k from the end of the file (because the limit + # on the size of innodb status is 128k even with Google's patches) + # and try to grab the last status from the file. + sysseek($file, (-128 * 1_024), 2); + } + + # Read from the file. + my $buffer; + if ( !$file_mtime || $file_mtime != $stat[9] ) { + $file_data = ''; + while ( sysread($file, $buffer, 4096) ) { + $file_data .= $buffer; + } + $file_mtime = $stat[9]; + } + + # Delete everything but the last InnoDB status text from the file. + $file_data =~ s/\A.*(?=^=====================================\n...... ........ INNODB MONITOR OUTPUT)//ms; + $innodb_status_text = $file_data; + } + + else { + my $stmt = do_stmt($cxn, 'INNODB_STATUS') or next; + $innodb_status_text = $stmt->fetchrow_hashref()->{status}; + } + + next unless $innodb_status_text + && substr($innodb_status_text, 0, 100) =~ m/INNODB MONITOR OUTPUT/; + + # Parse and merge into %vars storage + my %innodb_status = ( + $innodb_parser->get_status_hash( + $innodb_status_text, + $config{debug}->{val}, + \%sections_required, + 0, # don't parse full lock information + ) + ); + if ( !$innodb_status{IB_got_all} && $config{auto_wipe_dl}->{val} ) { + clear_deadlock($cxn); + } + + # Merge using a hash slice, which is the fastest way + $vars{$cxn}->{$clock} ||= {}; + my $hash = $vars{$cxn}->{$clock}; + @{$hash}{ keys %innodb_status } = values %innodb_status; + $hash->{cxn} = $cxn; + $hash->{Uptime_hires} ||= get_uptime($cxn); + } + } +} + +# clear_deadlock {{{3 +sub clear_deadlock { + my ( $cxn ) = @_; + return if $clearing_deadlocks++; + my $tbl = $connections{$cxn}->{dl_table}; + return unless $tbl; + + eval { + # Set up the table for creating a deadlock. + my $engine = version_ge($dbhs{$cxn}->{dbh}, '4.1.2') ? 'engine' : 'type'; + return unless do_query($cxn, "drop table if exists $tbl"); + return unless do_query($cxn, "create table $tbl(a int) $engine=innodb"); + return unless do_query($cxn, "delete from $tbl"); + return unless do_query($cxn, "insert into $tbl(a) values(0), (1)"); + return unless do_query($cxn, "commit"); # Or the children will block against the parent + + # Fork off two children to deadlock against each other. + my %children; + foreach my $child ( 0..1 ) { + my $pid = fork(); + if ( defined($pid) && $pid == 0 ) { # I am a child + deadlock_thread( $child, $tbl, $cxn ); + } + elsif ( !defined($pid) ) { + die("Unable to fork for clearing deadlocks!\n"); + } + # I already exited if I'm a child, so I'm the parent. + $children{$child} = $pid; + } + + # Wait for the children to exit. + foreach my $child ( keys %children ) { + my $pid = waitpid($children{$child}, 0); + } + + # Clean up. + do_query($cxn, "drop table $tbl"); + }; + if ( $EVAL_ERROR ) { + print $EVAL_ERROR; + pause(); + } + + $clearing_deadlocks = 0; +} + +sub get_master_logs { + my @cxns = @_; + my @result; + if ( !$info_gotten{master_logs}++ ) { + foreach my $cxn ( @cxns ) { + my $stmt = do_stmt($cxn, 'SHOW_MASTER_LOGS') or next; + push @result, @{$stmt->fetchall_arrayref({})}; + } + } + return @result; +} + +# get_master_slave_status {{{3 +sub get_master_slave_status { + my @cxns = @_; + if ( !$info_gotten{replication_status}++ ) { + foreach my $cxn ( @cxns ) { + $vars{$cxn}->{$clock} ||= {}; + my $vars = $vars{$cxn}->{$clock}; + $vars->{cxn} = $cxn; + + my $stmt = do_stmt($cxn, 'SHOW_MASTER_STATUS') or next; + my $res = $stmt->fetchall_arrayref({})->[0]; + @{$vars}{ keys %$res } = values %$res; + $stmt = do_stmt($cxn, 'SHOW_SLAVE_STATUS') or next; + $res = $stmt->fetchall_arrayref({})->[0]; + @{$vars}{ keys %$res } = values %$res; + $vars->{Uptime_hires} ||= get_uptime($cxn); + } + } +} + +sub is_func { + my ( $word ) = @_; + return defined(&$word) + || eval "my \$x= sub { $word }; 1" + || $EVAL_ERROR !~ m/^Bareword/; +} + +# Documentation {{{1 +# ############################################################################ +# I put this last as per the Dog book. +# ############################################################################ +=pod + +=head1 NAME + +innotop - MySQL and InnoDB transaction/status monitor. + +=head1 SYNOPSIS + +To monitor servers normally: + + innotop + +To monitor InnoDB status information from a file: + + innotop /var/log/mysql/mysqld.err + +To run innotop non-interactively in a pipe-and-filter configuration: + + innotop --count 5 -d 1 -n + +To monitor a database on another system using a particular username and password: + + innotop -u -p -h + +=head1 DESCRIPTION + +innotop monitors MySQL servers. Each of its modes shows you a different aspect +of what's happening in the server. For example, there's a mode for monitoring +replication, one for queries, and one for transactions. innotop refreshes its +data periodically, so you see an updating view. + +innotop has lots of features for power users, but you can start and run it with +virtually no configuration. If you're just getting started, see +L<"QUICK-START">. Press '?' at any time while running innotop for +context-sensitive help. + +=head1 QUICK-START + +To start innotop, open a terminal or command prompt. If you have installed +innotop on your system, you should be able to just type "innotop" and press +Enter; otherwise, you will need to change to innotop's directory and type "perl +innotop". + +With no options specified, innotop will attempt to connect to a MySQL server on +localhost using mysql_read_default_group=client for other connection +parameters. If you need to specify a different username and password, use the +-u and -p options, respectively. To monitor a MySQL database on another +host, use the -h option. + +After you've connected, innotop should show you something like the following: + + [RO] Query List (? for help) localhost, 01:11:19, 449.44 QPS, 14/7/163 con/run + + CXN When Load QPS Slow QCacheHit KCacheHit BpsIn BpsOut + localhost Total 0.00 1.07k 697 0.00% 98.17% 476.83k 242.83k + + CXN Cmd ID User Host DB Time Query + localhost Query 766446598 test 10.0.0.1 foo 00:02 INSERT INTO table ( + + +(This sample is truncated at the right so it will fit on a terminal when running +'man innotop') + +If your server is busy, you'll see more output. Notice the first line on the +screen, which tells you that readonly is set to true ([RO]), what mode you're +in and what server you're connected to. You can change to other modes with +keystrokes; press 'T' to switch to a list of InnoDB transactions, for example. + +Press the '?' key to see what keys are active in the current mode. You can +press any of these keys and innotop will either take the requested action or +prompt you for more input. If your system has Term::ReadLine support, you can +use TAB and other keys to auto-complete and edit input. + +To quit innotop, press the 'q' key. + +=head1 OPTIONS + +innotop is mostly configured via its configuration file, but some of the +configuration options can come from the command line. You can also specify a +file to monitor for InnoDB status output; see L<"MONITORING A FILE"> for more +details. + +You can negate some options by prefixing the option name with --no. For +example, --noinc (or --no-inc) negates L<"--inc">. + +=over + +=item --color + +Enable or disable terminal coloring. Corresponds to the L<"color"> config file +setting. + +=item --config + +Specifies a configuration file to read. This option is non-sticky, that is to +say it does not persist to the configuration file itself. + +=item --count + +Refresh only the specified number of times (ticks) before exiting. Each refresh +is a pause for L<"interval"> seconds, followed by requesting data from MySQL +connections and printing it to the terminal. + +=item --delay + +Specifies the amount of time to pause between ticks (refreshes). Corresponds to +the configuration option L<"interval">. + +=item --help + +Print a summary of command-line usage and exit. + +=item --host + +Host to connect to. + +=item --inc + +Specifies whether innotop should display absolute numbers or relative numbers +(offsets from their previous values). Corresponds to the configuration option +L<"status_inc">. + +=item --mode + +Specifies the mode in which innotop should start. Corresponds to the +configuration option L<"mode">. + +=item --nonint + +Enable non-interactive operation. See L<"NON-INTERACTIVE OPERATION"> for more. + +=item --password + +Password to use for connection. + +=item --port + +Port to use for connection. + +=item --skipcentral + +Don't read the central configuration file. + +=item --user + +User to use for connection. + +=item --version + +Output version information and exit. + +=item --write + +Sets the configuration option L<"readonly"> to 0, making innotop write the +running configuration to ~/.innotop/innotop.conf on exit, if no configuration +file was loaded at start-up. + +=back + +=head1 HOTKEYS + +innotop is interactive, and you control it with key-presses. + +=over + +=item * + +Uppercase keys switch between modes. + +=item * + +Lowercase keys initiate some action within the current mode. + +=item * + +Other keys do something special like change configuration or show the +innotop license. + +=back + +Press '?' at any time to see the currently active keys and what they do. + +=head1 MODES + +Each of innotop's modes retrieves and displays a particular type of data from +the servers you're monitoring. You switch between modes with uppercase keys. +The following is a brief description of each mode, in alphabetical order. To +switch to the mode, press the key listed in front of its heading in the +following list: + +=over + +=item B: InnoDB Buffers + +This mode displays information about the InnoDB buffer pool, page statistics, +insert buffer, and adaptive hash index. The data comes from SHOW INNODB STATUS. + +This mode contains the L<"buffer_pool">, L<"page_statistics">, +L<"insert_buffers">, and L<"adaptive_hash_index"> tables by default. + +=item C: Command Summary + +This mode is similar to mytop's Command Summary mode. It shows the +L<"cmd_summary"> table, which looks something like the following: + + Command Summary (? for help) localhost, 25+07:16:43, 2.45 QPS, 3 thd, 5.0.40 + _____________________ Command Summary _____________________ + Name Value Pct Last Incr Pct + Select_scan 3244858 69.89% 2 100.00% + Select_range 1354177 29.17% 0 0.00% + Select_full_join 39479 0.85% 0 0.00% + Select_full_range_join 4097 0.09% 0 0.00% + Select_range_check 0 0.00% 0 0.00% + +The command summary table is built by extracting variables from +L<"STATUS_VARIABLES">. The variables must be numeric and must match the prefix +given by the L<"cmd_filter"> configuration variable. The variables are then +sorted by value descending and compared to the last variable, as shown above. +The percentage columns are percentage of the total of all variables in the +table, so you can see the relative weight of the variables. + +The example shows what you see if the prefix is "Select_". The default +prefix is "Com_". You can choose a prefix with the 's' key. + +It's rather like running SHOW VARIABLES LIKE "prefix%" with memory and +nice formatting. + +Values are aggregated across all servers. The Pct columns are not correctly +aggregated across multiple servers. This is a known limitation of the grouping +algorithm that may be fixed in the future. + +=item D: InnoDB Deadlocks + +This mode shows the transactions involved in the last InnoDB deadlock. A second +table shows the locks each transaction held and waited for. A deadlock is +caused by a cycle in the waits-for graph, so there should be two locks held and +one waited for unless the deadlock information is truncated. + +InnoDB puts deadlock information before some other information in the SHOW +INNODB STATUS output. If there are a lot of locks, the deadlock information can +grow very large, and there is a limit on the size of the SHOW INNODB +STATUS output. A large deadlock can fill the entire output, or even be +truncated, and prevent you from seeing other information at all. If you are +running innotop in another mode, for example T mode, and suddenly you don't see +anything, you might want to check and see if a deadlock has wiped out the data +you need. + +If it has, you can create a small deadlock to replace the large one. Use the +'w' key to 'wipe' the large deadlock with a small one. This will not work +unless you have defined a deadlock table for the connection (see L<"SERVER +CONNECTIONS">). + +You can also configure innotop to automatically detect when a large deadlock +needs to be replaced with a small one (see L<"auto_wipe_dl">). + +This mode displays the L<"deadlock_transactions"> and L<"deadlock_locks"> tables +by default. + +=item F: InnoDB Foreign Key Errors + +This mode shows the last InnoDB foreign key error information, such as the +table where it happened, when and who and what query caused it, and so on. + +InnoDB has a huge variety of foreign key error messages, and many of them are +just hard to parse. innotop doesn't always do the best job here, but there's +so much code devoted to parsing this messy, unparseable output that innotop is +likely never to be perfect in this regard. If innotop doesn't show you what +you need to see, just look at the status text directly. + +This mode displays the L<"fk_error"> table by default. + +=item I: InnoDB I/O Info + +This mode shows InnoDB's I/O statistics, including the I/O threads, pending I/O, +file I/O miscellaneous, and log statistics. It displays the L<"io_threads">, +L<"pending_io">, L<"file_io_misc">, and L<"log_statistics"> tables by default. + +=item L: Locks + +This mode shows information about current locks. At the moment only InnoDB +locks are supported, and by default you'll only see locks for which transactions +are waiting. This information comes from the TRANSACTIONS section of the InnoDB +status text. If you have a very busy server, you may have frequent lock waits; +it helps to be able to see which tables and indexes are the "hot spot" for +locks. If your server is running pretty well, this mode should show nothing. + +You can configure MySQL and innotop to monitor not only locks for which a +transaction is waiting, but those currently held, too. You can do this with the +InnoDB Lock Monitor (L). It's +not documented in the MySQL manual, but creating the lock monitor with the +following statement also affects the output of SHOW INNODB STATUS, which innotop +uses: + + CREATE TABLE innodb_lock_monitor(a int) ENGINE=INNODB; + +This causes InnoDB to print its output to the MySQL file every 16 seconds or so, +as stated in the manual, but it also makes the normal SHOW INNODB STATUS output +include lock information, which innotop can parse and display (that's the +undocumented feature). + +This means you can do what may have seemed impossible: to a limited extent +(InnoDB truncates some information in the output), you can see which transaction +holds the locks something else is waiting for. You can also enable and disable +the InnoDB Lock Monitor with the key mappings in this mode. + +This mode displays the L<"innodb_locks"> table by default. Here's a sample of +the screen when one connection is waiting for locks another connection holds: + + _________________________________ InnoDB Locks __________________________ + CXN ID Type Waiting Wait Active Mode DB Table Index + localhost 12 RECORD 1 00:10 00:10 X test t1 PRIMARY + localhost 12 TABLE 0 00:10 00:10 IX test t1 + localhost 12 RECORD 1 00:10 00:10 X test t1 PRIMARY + localhost 11 TABLE 0 00:00 00:25 IX test t1 + localhost 11 RECORD 0 00:00 00:25 X test t1 PRIMARY + +You can see the first connection, ID 12, is waiting for a lock on the PRIMARY +key on test.t1, and has been waiting for 10 seconds. The second connection +isn't waiting, because the Waiting column is 0, but it holds locks on the same +index. That tells you connection 11 is blocking connection 12. + +=item M: Master/Slave Replication Status + +This mode shows the output of SHOW SLAVE STATUS and SHOW MASTER STATUS in three +tables. The first two divide the slave's status into SQL and I/O thread status, +and the last shows master status. Filters are applied to eliminate non-slave +servers from the slave tables, and non-master servers from the master table. + +This mode displays the L<"slave_sql_status">, L<"slave_io_status">, and +L<"master_status"> tables by default. + +=item O: Open Tables + +This section comes from MySQL's SHOW OPEN TABLES command. By default it is +filtered to show tables which are in use by one or more queries, so you can +get a quick look at which tables are 'hot'. You can use this to guess which +tables might be locked implicitly. + +This mode displays the L<"open_tables"> mode by default. + +=item Q: Query List + +This mode displays the output from SHOW FULL PROCESSLIST, much like B's +query list mode. This mode does B show InnoDB-related information. This +is probably one of the most useful modes for general usage. + +There is an informative header that shows general status information about +your server. You can toggle it on and off with the 'h' key. By default, +innotop hides inactive processes and its own process. You can toggle these on +and off with the 'i' and 'a' keys. + +You can EXPLAIN a query from this mode with the 'e' key. This displays the +query's full text, the results of EXPLAIN, and in newer MySQL versions, even +the optimized query resulting from EXPLAIN EXTENDED. innotop also tries to +rewrite certain queries to make them EXPLAIN-able. For example, INSERT/SELECT +statements are rewritable. + +This mode displays the L<"q_header"> and L<"processlist"> tables by default. + +=item R: InnoDB Row Operations and Semaphores + +This mode shows InnoDB row operations, row operation miscellaneous, semaphores, +and information from the wait array. It displays the L<"row_operations">, +L<"row_operation_misc">, L<"semaphores">, and L<"wait_array"> tables by default. + +=item S: Variables & Status + +This mode calculates statistics, such as queries per second, and prints them out +in several different styles. You can show absolute values, or incremental values +between ticks. + +You can switch between the views by pressing a key. The 's' key prints a +single line each time the screen updates, in the style of B. The 'g' +key changes the view to a graph of the same numbers, sort of like B. +The 'v' key changes the view to a pivoted table of variable names on the left, +with successive updates scrolling across the screen from left to right. You can +choose how many updates to put on the screen with the L<"num_status_sets"> +configuration variable. + +Headers may be abbreviated to fit on the screen in interactive operation. You +choose which variables to display with the 'c' key, which selects from +predefined sets, or lets you create your own sets. You can edit the current set +with the 'e' key. + +This mode doesn't really display any tables like other modes. Instead, it uses +a table definition to extract and format the data, but it then transforms the +result in special ways before outputting it. It uses the L<"var_status"> table +definition for this. + +=item T: InnoDB Transactions + +This mode shows transactions from the InnoDB monitor's output, in B-like +format. This mode is the reason I wrote innotop. + +You can kill queries or processes with the 'k' and 'x' keys, and EXPLAIN a query +with the 'e' or 'f' keys. InnoDB doesn't print the full query in transactions, +so explaining may not work right if the query is truncated. + +The informational header can be toggled on and off with the 'h' key. By +default, innotop hides inactive transactions and its own transaction. You can +toggle this on and off with the 'i' and 'a' keys. + +This mode displays the L<"t_header"> and L<"innodb_transactions"> tables by +default. + +=back + +=head1 INNOTOP STATUS + +The first line innotop displays is a "status bar" of sorts. What it contains +depends on the mode you're in, and what servers you're monitoring. The first +few words are always [RO] (if readonly is set to 1), the innotop mode, such as +"InnoDB Txns" for T mode, followed by a reminder to press '?' for help at any +time. + +=head2 ONE SERVER + +The simplest case is when you're monitoring a single server. In this case, the +name of the connection is next on the status line. This is the name you gave +when you created the connection -- most likely the MySQL server's hostname. +This is followed by the server's uptime. + +If you're in an InnoDB mode, such as T or B, the next word is "InnoDB" followed +by some information about the SHOW INNODB STATUS output used to render the +screen. The first word is the number of seconds since the last SHOW INNODB +STATUS, which InnoDB uses to calculate some per-second statistics. The next is +a smiley face indicating whether the InnoDB output is truncated. If the smiley +face is a :-), all is well; there is no truncation. A :^| means the transaction +list is so long, InnoDB has only printed out some of the transactions. Finally, +a frown :-( means the output is incomplete, which is probably due to a deadlock +printing too much lock information (see L<"D: InnoDB Deadlocks">). + +The next two words indicate the server's queries per second (QPS) and how many +threads (connections) exist. Finally, the server's version number is the last +thing on the line. + +=head2 MULTIPLE SERVERS + +If you are monitoring multiple servers (see L<"SERVER CONNECTIONS">), the status +line does not show any details about individual servers. Instead, it shows the +names of the connections that are active. Again, these are connection names you +specified, which are likely to be the server's hostname. A connection that has +an error is prefixed with an exclamation point. + +If you are monitoring a group of servers (see L<"SERVER GROUPS">), the status +line shows the name of the group. If any connection in the group has an +error, the group's name is followed by the fraction of the connections that +don't have errors. + +See L<"ERROR HANDLING"> for more details about innotop's error handling. + +=head2 MONITORING A FILE + +If you give a filename on the command line, innotop will not connect to ANY +servers at all. It will watch the specified file for InnoDB status output and +use that as its data source. It will always show a single connection called +'file'. And since it can't connect to a server, it can't determine how long the +server it's monitoring has been up; so it calculates the server's uptime as time +since innotop started running. + +=head1 SERVER ADMINISTRATION + +While innotop is primarily a monitor that lets you watch and analyze your +servers, it can also send commands to servers. The most frequently useful +commands are killing queries and stopping or starting slaves. + +You can kill a connection, or in newer versions of MySQL kill a query but not a +connection, from L<"Q: Query List"> and L<"T: InnoDB Transactions"> modes. +Press 'k' to issue a KILL command, or 'x' to issue a KILL QUERY command. +innotop will prompt you for the server and/or connection ID to kill (innotop +does not prompt you if there is only one possible choice for any input). +innotop pre-selects the longest-running query, or the oldest connection. +Confirm the command with 'y'. + +In L<"M: Master/Slave Replication Status"> mode, you can start and stop slaves +with the 'a' and 'o' keys, respectively. You can send these commands to many +slaves at once. innotop fills in a default command of START SLAVE or STOP SLAVE +for you, but you can actually edit the command and send anything you wish, such +as SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1 to make the slave skip one binlog event +when it starts. + +You can also ask innotop to calculate the earliest binlog in use by any slave +and issue a PURGE MASTER LOGS on the master. Use the 'b' key for this. innotop +will prompt you for a master to run the command on, then prompt you for the +connection names of that master's slaves (there is no way for innotop to +determine this reliably itself). innotop will find the minimum binlog in use by +these slave connections and suggest it as the argument to PURGE MASTER LOGS. + +=head1 SERVER CONNECTIONS + +When you create a server connection using '@', innotop asks you for a series of +inputs, as follows: + +=over + +=item DSN + +A DSN is a Data Source Name, which is the initial argument passed to the DBI +module for connecting to a server. It is usually of the form + + DBI:mysql:;mysql_read_default_group=mysql;host=HOSTNAME + +Since this DSN is passed to the DBD::mysql driver, you should read the driver's +documentation at L<"http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm"> for +the exact details on all the options you can pass the driver in the DSN. You +can read more about DBI at L, and especially at +L. + +The mysql_read_default_group=mysql option lets the DBD driver read your MySQL +options files, such as ~/.my.cnf on UNIX-ish systems. You can use this to avoid +specifying a username or password for the connection. + +=item InnoDB Deadlock Table + +This optional item tells innotop a table name it can use to deliberately create +a small deadlock (see L<"D: InnoDB Deadlocks">). If you specify this option, +you just need to be sure the table doesn't exist, and that innotop can create +and drop the table with the InnoDB storage engine. You can safely omit or just +accept the default if you don't intend to use this. + +=item Username + +innotop will ask you if you want to specify a username. If you say 'y', it will +then prompt you for a user name. If you have a MySQL option file that specifies +your username, you don't have to specify a username. + +The username defaults to your login name on the system you're running innotop on. + +=item Password + +innotop will ask you if you want to specify a password. Like the username, the +password is optional, but there's an additional prompt that asks if you want to +save the password in the innotop configuration file. If you don't save it in +the configuration file, innotop will prompt you for a password each time it +starts. Passwords in the innotop configuration file are saved in plain text, +not encrypted in any way. + +=back + +Once you finish answering these questions, you should be connected to a server. +But innotop isn't limited to monitoring a single server; you can define many +server connections and switch between them by pressing the '@' key. See +L<"SWITCHING BETWEEN CONNECTIONS">. + +=head1 SERVER GROUPS + +If you have multiple MySQL instances, you can put them into named groups, such +as 'all', 'masters', and 'slaves', which innotop can monitor all together. + +You can choose which group to monitor with the '#' key, and you can press the +TAB key to switch to the next group. If you're not currently monitoring a +group, pressing TAB selects the first group. + +To create a group, press the '#' key and type the name of your new group, then +type the names of the connections you want the group to contain. + +=head1 SWITCHING BETWEEN CONNECTIONS + +innotop lets you quickly switch which servers you're monitoring. The most basic +way is by pressing the '@' key and typing the name(s) of the connection(s) you +want to use. This setting is per-mode, so you can monitor different connections +in each mode, and innotop remembers which connections you choose. + +You can quickly switch to the 'next' connection in alphabetical order with the +'n' key. If you're monitoring a server group (see L<"SERVER GROUPS">) this will +switch to the first connection. + +You can also type many connection names, and innotop will fetch and display data +from them all. Just separate the connection names with spaces, for example +"server1 server2." Again, if you type the name of a connection that doesn't +exist, innotop will prompt you for connection information and create the +connection. + +Another way to monitor multiple connections at once is with server groups. You +can use the TAB key to switch to the 'next' group in alphabetical order, or if +you're not monitoring any groups, TAB will switch to the first group. + +innotop does not fetch data in parallel from connections, so if you are +monitoring a large group or many connections, you may notice increased delay +between ticks. + +When you monitor more than one connection, innotop's status bar changes. See +L<"INNOTOP STATUS">. + +=head1 ERROR HANDLING + +Error handling is not that important when monitoring a single connection, but is +crucial when you have many active connections. A crashed server or lost +connection should not crash innotop. As a result, innotop will continue to run +even when there is an error; it just won't display any information from the +connection that had an error. Because of this, innotop's behavior might confuse +you. It's a feature, not a bug! + +innotop does not continue to query connections that have errors, because they +may slow innotop and make it hard to use, especially if the error is a problem +connecting and causes a long time-out. Instead, innotop retries the connection +occasionally to see if the error still exists. If so, it will wait until some +point in the future. The wait time increases in ticks as the Fibonacci series, +so it tries less frequently as time passes. + +Since errors might only happen in certain modes because of the SQL commands +issued in those modes, innotop keeps track of which mode caused the error. If +you switch to a different mode, innotop will retry the connection instead of +waiting. + +By default innotop will display the problem in red text at the bottom of the +first table on the screen. You can disable this behavior with the +L<"show_cxn_errors_in_tbl"> configuration option, which is enabled by default. +If the L<"debug"> option is enabled, innotop will display the error at the +bottom of every table, not just the first. And if L<"show_cxn_errors"> is +enabled, innotop will print the error text to STDOUT as well. Error messages +might only display in the mode that caused the error, depending on the mode and +whether innotop is avoiding querying that connection. + +=head1 NON-INTERACTIVE OPERATION + +You can run innotop in non-interactive mode, in which case it is entirely +controlled from the configuration file and command-line options. To start +innotop in non-interactive mode, give the L"<--nonint"> command-line option. +This changes innotop's behavior in the following ways: + +=over + +=item * + +Certain Perl modules are not loaded. Term::Readline is not loaded, since +innotop doesn't prompt interactively. Term::ANSIColor and Win32::Console::ANSI +modules are not loaded. Term::ReadKey is still used, since innotop may have to +prompt for connection passwords when starting up. + +=item * + +innotop does not clear the screen after each tick. + +=item * + +innotop does not persist any changes to the configuration file. + +=item * + +If L<"--count"> is given and innotop is in incremental mode (see L<"status_inc"> +and L<"--inc">), innotop actually refreshes one more time than specified so it +can print incremental statistics. This suppresses output during the first +tick, so innotop may appear to hang. + +=item * + +innotop only displays the first table in each mode. This is so the output can +be easily processed with other command-line utilities such as awk and sed. To +change which tables display in each mode, see L<"TABLES">. Since L<"Q: Query +List"> mode is so important, innotop automatically disables the L<"q_header"> +table. This ensures you'll see the L<"processlist"> table, even if you have +innotop configured to show the q_header table during interactive operation. +Similarly, in L<"T: InnoDB Transactions"> mode, the L<"t_header"> table is +suppressed so you see only the L<"innodb_transactions"> table. + +=item * + +All output is tab-separated instead of being column-aligned with whitespace, and +innotop prints the full contents of each table instead of only printing one +screenful at a time. + +=item * + +innotop only prints column headers once instead of every tick (see +L<"hide_hdr">). innotop does not print table captions (see +L<"display_table_captions">). innotop ensures there are no empty lines in the +output. + +=item * + +innotop does not honor the L<"shorten"> transformation, which normally shortens +some numbers to human-readable formats. + +=item * + +innotop does not print a status line (see L<"INNOTOP STATUS">). + +=back + +=head1 CONFIGURING + +Nearly everything about innotop is configurable. Most things are possible to +change with built-in commands, but you can also edit the configuration file. + +While running innotop, press the '$' key to bring up the configuration editing +dialog. Press another key to select the type of data you want to edit: + +=over + +=item S: Statement Sleep Times + +Edits SQL statement sleep delays, which make innotop pause for the specified +amount of time after executing a statement. See L<"SQL STATEMENTS"> for a +definition of each statement and what it does. By default innotop does not +delay after any statements. + +This feature is included so you can customize the side-effects caused by +monitoring your server. You may not see any effects, but some innotop users +have noticed that certain MySQL versions under very high load with InnoDB +enabled take longer than usual to execute SHOW GLOBAL STATUS. If innotop calls +SHOW FULL PROCESSLIST immediately afterward, the processlist contains more +queries than the machine actually averages at any given moment. Configuring +innotop to pause briefly after calling SHOW GLOBAL STATUS alleviates this +effect. + +Sleep times are stored in the L<"stmt_sleep_times"> section of the configuration +file. Fractional-second sleeps are supported, subject to your hardware's +limitations. + +=item c: Edit Columns + +Starts the table editor on one of the displayed tables. See L<"TABLE EDITOR">. +An alternative way to start the table editor without entering the configuration +dialog is with the '^' key. + +=item g: General Configuration + +Starts the configuration editor to edit global and mode-specific configuration +variables (see L<"MODES">). innotop prompts you to choose a variable from among +the global and mode-specific ones depending on the current mode. + +=item k: Row-Coloring Rules + +Starts the row-coloring rules editor on one of the displayed table(s). See +L<"COLORS"> for details. + +=item p: Manage Plugins + +Starts the plugin configuration editor. See L<"PLUGINS"> for details. + +=item s: Server Groups + +Lets you create and edit server groups. See L<"SERVER GROUPS">. + +=item t: Choose Displayed Tables + +Lets you choose which tables to display in this mode. See L<"MODES"> and +L<"TABLES">. + +=back + +=head1 CONFIGURATION FILE + +innotop's default configuration file locations are $HOME/.innotop and +/etc/innotop/innotop.conf, and they are looked for in that order. If the first +configuration file exists, the second will not be processed. Those can be +overridden with the L<"--config"> command-line option. You can edit it by hand +safely, however innotop reads the configuration file when it starts, and, if +readonly is set to 0, writes it out again when it exits. Thus, if readonly is +set to 0, any changes you make by hand while innotop is running will be lost. + +innotop doesn't store its entire configuration in the configuration file. It +has a huge set of default configuration values that it holds only in memory, +and the configuration file only overrides these defaults. When you customize a +default setting, innotop notices, and then stores the customizations into the +file. This keeps the file size down, makes it easier to edit, and makes +upgrades easier. + +A configuration file is read-only be default. You can override that with +L<"--write">. See L<"readonly">. + +The configuration file is arranged into sections like an INI file. Each +section begins with [section-name] and ends with [/section-name]. Each +section's entries have a different syntax depending on the data they need to +store. You can put comments in the file; any line that begins with a # +character is a comment. innotop will not read the comments, so it won't write +them back out to the file when it exits. Comments in read-only configuration +files are still useful, though. + +The first line in the file is innotop's version number. This lets innotop +notice when the file format is not backwards-compatible, and upgrade smoothly +without destroying your customized configuration. + +The following list describes each section of the configuration file and the data +it contains: + +=over + +=item general + +The 'general' section contains global configuration variables and variables that +may be mode-specific, but don't belong in any other section. The syntax is a +simple key=value list. innotop writes a comment above each value to help you +edit the file by hand. + +=over + +=item S_func + +Controls S mode presentation (see L<"S: Variables & Status">). If g, values are +graphed; if s, values are like vmstat; if p, values are in a pivoted table. + +=item S_set + +Specifies which set of variables to display in L<"S: Variables & Status"> mode. +See L<"VARIABLE SETS">. + +=item auto_wipe_dl + +Instructs innotop to automatically wipe large deadlocks when it notices them. +When this happens you may notice a slight delay. At the next tick, you will +usually see the information that was being truncated by the large deadlock. + +=item charset + +Specifies what kind of characters to allow through the L<"no_ctrl_char"> +transformation. This keeps non-printable characters from confusing a +terminal when you monitor queries that contain binary data, such as images. + +The default is 'ascii', which considers anything outside normal ASCII to be a +control character. The other allowable values are 'unicode' and 'none'. 'none' +considers every character a control character, which can be useful for +collapsing ALL text fields in queries. + +=item cmd_filter + +This is the prefix that filters variables in L<"C: Command Summary"> mode. + +=item color + +Whether terminal coloring is permitted. + +=item cxn_timeout + +On MySQL versions 4.0.3 and newer, this variable is used to set the connection's +timeout, so MySQL doesn't close the connection if it is not used for a while. +This might happen because a connection isn't monitored in a particular mode, for +example. + +=item debug + +This option enables more verbose errors and makes innotop more strict in some +places. It can help in debugging filters and other user-defined code. It also +makes innotop write a lot of information to L<"debugfile"> when there is a +crash. + +=item debugfile + +A file to which innotop will write information when there is a crash. See +L<"FILES">. + +=item display_table_captions + +innotop displays a table caption above most tables. This variable suppresses or +shows captions on all tables globally. Some tables are configured with the +hide_caption property, which overrides this. + +=item global + +Whether to show GLOBAL variables and status. innotop only tries to do this on +servers which support the GLOBAL option to SHOW VARIABLES and SHOW STATUS. In +some MySQL versions, you need certain privileges to do this; if you don't have +them, innotop will not be able to fetch any variable and status data. This +configuration variable lets you run innotop and fetch what data you can even +without the elevated privileges. + +I can no longer find or reproduce the situation where GLOBAL wasn't allowed, but +I know there was one. + +=item graph_char + +Defines the character to use when drawing graphs in L<"S: Variables & Status"> +mode. + +=item header_highlight + +Defines how to highlight column headers. This only works if Term::ANSIColor is +available. Valid values are 'bold' and 'underline'. + +=item hide_hdr + +Hides column headers globally. + +=item interval + +The interval at which innotop will refresh its data (ticks). The interval is +implemented as a sleep time between ticks, so the true interval will vary +depending on how long it takes innotop to fetch and render data. + +This variable accepts fractions of a second. + +=item mode + +The mode in which innotop should start. Allowable arguments are the same as the +key presses that select a mode interactively. See L<"MODES">. + +=item num_digits + +How many digits to show in fractional numbers and percents. This variable's +range is between 0 and 9 and can be set directly from L<"S: Variables & Status"> +mode with the '+' and '-' keys. It is used in the L<"set_precision">, +L<"shorten">, and L<"percent"> transformations. + +=item num_status_sets + +Controls how many sets of status variables to display in pivoted L<"S: Variables +& Status"> mode. It also controls the number of old sets of variables innotop +keeps in its memory, so the larger this variable is, the more memory innotop +uses. + +=item plugin_dir + +Specifies where plugins can be found. By default, innotop stores plugins in the +'plugins' subdirectory of your innotop configuration directory. + +=item readonly + +Whether the configuration file is readonly. This cannot be set interactively. + +=item show_cxn_errors + +Makes innotop print connection errors to STDOUT. See L<"ERROR HANDLING">. + +=item show_cxn_errors_in_tbl + +Makes innotop display connection errors as rows in the first table on screen. +See L<"ERROR HANDLING">. + +=item show_percent + +Adds a '%' character after the value returned by the L<"percent"> +transformation. + +=item show_statusbar + +Controls whether to show the status bar in the display. See L<"INNOTOP +STATUS">. + +=item skip_innodb + +Disables fetching SHOW INNODB STATUS, in case your server(s) do not have InnoDB +enabled and you don't want innotop to try to fetch it. This can also be useful +when you don't have the SUPER privilege, required to run SHOW INNODB STATUS. + +=item status_inc + +Whether to show absolute or incremental values for status variables. +Incremental values are calculated as an offset from the last value innotop saw +for that variable. This is a global setting, but will probably become +mode-specific at some point. Right now it is honored a bit inconsistently; some +modes don't pay attention to it. + +=back + +=item plugins + +This section holds a list of package names of active plugins. If the plugin +exists, innotop will activate it. See L<"PLUGINS"> for more information. + +=item filters + +This section holds user-defined filters (see L<"FILTERS">). Each line is in the +format filter_name=text='filter text' tbls='table list'. + +The filter text is the text of the subroutine's code. The table list is a list +of tables to which the filter can apply. By default, user-defined filters apply +to the table for which they were created, but you can manually override that by +editing the definition in the configuration file. + +=item active_filters + +This section stores which filters are active on each table. Each line is in the +format table_name=filter_list. + +=item tbl_meta + +This section stores user-defined or user-customized columns (see L<"COLUMNS">). +Each line is in the format col_name=properties, where the properties are a +name=quoted-value list. + +=item connections + +This section holds the server connections you have defined. Each line is in +the format name=properties, where the properties are a name=value list. The +properties are self-explanatory, and the only one that is treated specially is +'pass' which is only present if 'savepass' is set. This section of the +configuration file will be skipped if any DSN, username, or password +command-line options are used. See L<"SERVER CONNECTIONS">. + +=item active_connections + +This section holds a list of which connections are active in each mode. Each +line is in the format mode_name=connection_list. + +=item server_groups + +This section holds server groups. Each line is in the format +name=connection_list. See L<"SERVER GROUPS">. + +=item active_server_groups + +This section holds a list of which server group is active in each mode. Each +line is in the format mode_name=server_group. + +=item max_values_seen + +This section holds the maximum values seen for variables. This is used to scale +the graphs in L<"S: Variables & Status"> mode. Each line is in the format +name=value. + +=item active_columns + +This section holds table column lists. Each line is in the format +tbl_name=column_list. See L<"COLUMNS">. + +=item sort_cols + +This section holds the sort definition. Each line is in the format +tbl_name=column_list. If a column is prefixed with '-', that column sorts +descending. See L<"SORTING">. + +=item visible_tables + +This section defines which tables are visible in each mode. Each line is in the +format mode_name=table_list. See L<"TABLES">. + +=item varsets + +This section defines variable sets for use in L<"S: Status & Variables"> mode. +Each line is in the format name=variable_list. See L<"VARIABLE SETS">. + +=item colors + +This section defines colorization rules. Each line is in the format +tbl_name=property_list. See L<"COLORS">. + +=item stmt_sleep_times + +This section contains statement sleep times. Each line is in the format +statement_name=sleep_time. See L<"S: Statement Sleep Times">. + +=item group_by + +This section contains column lists for table group_by expressions. Each line is +in the format tbl_name=column_list. See L<"GROUPING">. + +=back + +=head1 CUSTOMIZING + +You can customize innotop a great deal. For example, you can: + +=over + +=item * + +Choose which tables to display, and in what order. + +=item * + +Choose which columns are in those tables, and create new columns. + +=item * + +Filter which rows display with built-in filters, user-defined filters, and +quick-filters. + +=item * + +Sort the rows to put important data first or group together related rows. + +=item * + +Highlight rows with color. + +=item * + +Customize the alignment, width, and formatting of columns, and apply +transformations to columns to extract parts of their values or format the values +as you wish (for example, shortening large numbers to familiar units). + +=item * + +Design your own expressions to extract and combine data as you need. This gives +you unlimited flexibility. + +=back + +All these and more are explained in the following sections. + +=head2 TABLES + +A table is what you'd expect: a collection of columns. It also has some other +properties, such as a caption. Filters, sorting rules, and colorization rules +belong to tables and are covered in later sections. + +Internally, table meta-data is defined in a data structure called %tbl_meta. +This hash holds all built-in table definitions, which contain a lot of default +instructions to innotop. The meta-data includes the caption, a list of columns +the user has customized, a list of columns, a list of visible columns, a list of +filters, color rules, a sort-column list, sort direction, and some information +about the table's data sources. Most of this is customizable via the table +editor (see L<"TABLE EDITOR">). + +You can choose which tables to show by pressing the '$' key. See L<"MODES"> and +L<"TABLES">. + +The table life-cycle is as follows: + +=over + +=item * + +Each table begins with a data source, which is an array of hashes. See below +for details on data sources. + +=item * + +Each element of the data source becomes a row in the final table. + +=item * + +For each element in the data source, innotop extracts values from the source and +creates a row. This row is another hash, which later steps will refer to as +$set. The values innotop extracts are determined by the table's columns. Each +column has an extraction subroutine, compiled from an expression (see +L<"EXPRESSIONS">). The resulting row is a hash whose keys are named the same as +the column name. + +=item * + +innotop filters the rows, removing those that don't need to be displayed. See +L<"FILTERS">. + +=item * + +innotop sorts the rows. See L<"SORTING">. + +=item * + +innotop groups the rows together, if specified. See L<"GROUPING">. + +=item * + +innotop colorizes the rows. See L<"COLORS">. + +=item * + +innotop transforms the column values in each row. See L<"TRANSFORMATIONS">. + +=item * + +innotop optionally pivots the rows (see L<"PIVOTING">), then filters and sorts +them. + +=item * + +innotop formats and justifies the rows as a table. During this step, innotop +applies further formatting to the column values, including alignment, maximum +and minimum widths. innotop also does final error checking to ensure there are +no crashes due to undefined values. innotop then adds a caption if specified, +and the table is ready to print. + +=back + +The lifecycle is slightly different if the table is pivoted, as noted above. To +clarify, if the table is pivoted, the process is extract, group, transform, +pivot, filter, sort, create. If it's not pivoted, the process is extract, +filter, sort, group, color, transform, create. This slightly convoluted process +doesn't map all that well to SQL, but pivoting complicates things pretty +thoroughly. Roughly speaking, filtering and sorting happen as late as needed to +effect the final result as you might expect, but as early as possible for +efficiency. + +Each built-in table is described below: + +=over + +=item adaptive_hash_index + +Displays data about InnoDB's adaptive hash index. Data source: +L<"STATUS_VARIABLES">. + +=item buffer_pool + +Displays data about InnoDB's buffer pool. Data source: L<"STATUS_VARIABLES">. + +=item cmd_summary + +Displays weighted status variables. Data source: L<"STATUS_VARIABLES">. + +=item deadlock_locks + +Shows which locks were held and waited for by the last detected deadlock. Data +source: L<"DEADLOCK_LOCKS">. + +=item deadlock_transactions + +Shows transactions involved in the last detected deadlock. Data source: +L<"DEADLOCK_TRANSACTIONS">. + +=item explain + +Shows the output of EXPLAIN. Data source: L<"EXPLAIN">. + +=item file_io_misc + +Displays data about InnoDB's file and I/O operations. Data source: +L<"STATUS_VARIABLES">. + +=item fk_error + +Displays various data about InnoDB's last foreign key error. Data source: +L<"STATUS_VARIABLES">. + +=item innodb_locks + +Displays InnoDB locks. Data source: L<"INNODB_LOCKS">. + +=item innodb_transactions + +Displays data about InnoDB's current transactions. Data source: +L<"INNODB_TRANSACTIONS">. + +=item insert_buffers + +Displays data about InnoDB's insert buffer. Data source: L<"STATUS_VARIABLES">. + +=item io_threads + +Displays data about InnoDB's I/O threads. Data source: L<"IO_THREADS">. + +=item log_statistics + +Displays data about InnoDB's logging system. Data source: L<"STATUS_VARIABLES">. + +=item master_status + +Displays replication master status. Data source: L<"STATUS_VARIABLES">. + +=item open_tables + +Displays open tables. Data source: L<"OPEN_TABLES">. + +=item page_statistics + +Displays InnoDB page statistics. Data source: L<"STATUS_VARIABLES">. + +=item pending_io + +Displays InnoDB pending I/O operations. Data source: L<"STATUS_VARIABLES">. + +=item processlist + +Displays current MySQL processes (threads/connections). Data source: +L<"PROCESSLIST">. + +=item q_header + +Displays various status values. Data source: L<"STATUS_VARIABLES">. + +=item row_operation_misc + +Displays data about InnoDB's row operations. Data source: +L<"STATUS_VARIABLES">. + +=item row_operations + +Displays data about InnoDB's row operations. Data source: +L<"STATUS_VARIABLES">. + +=item semaphores + +Displays data about InnoDB's semaphores and mutexes. Data source: +L<"STATUS_VARIABLES">. + +=item slave_io_status + +Displays data about the slave I/O thread. Data source: +L<"STATUS_VARIABLES">. + +=item slave_sql_status + +Displays data about the slave SQL thread. Data source: L<"STATUS_VARIABLES">. + +=item t_header + +Displays various InnoDB status values. Data source: L<"STATUS_VARIABLES">. + +=item var_status + +Displays user-configurable data. Data source: L<"STATUS_VARIABLES">. + +=item wait_array + +Displays data about InnoDB's OS wait array. Data source: L<"OS_WAIT_ARRAY">. + +=back + +=head2 COLUMNS + +Columns belong to tables. You can choose a table's columns by pressing the '^' +key, which starts the L<"TABLE EDITOR"> and lets you choose and edit columns. +Pressing 'e' from within the table editor lets you edit the column's properties: + +=over + +=item * + +hdr: a column header. This appears in the first row of the table. + +=item * + +just: justification. '-' means left-justified and '' means right-justified, +just as with printf formatting codes (not a coincidence). + +=item * + +dec: whether to further align the column on the decimal point. + +=item * + +num: whether the column is numeric. This affects how values are sorted +(lexically or numerically). + +=item * + +label: a small note about the column, which appears in dialogs that help the +user choose columns. + +=item * + +src: an expression that innotop uses to extract the column's data from its +source (see L<"DATA SOURCES">). See L<"EXPRESSIONS"> for more on expressions. + +=item * + +minw: specifies a minimum display width. This helps stabilize the display, +which makes it easier to read if the data is changing frequently. + +=item * + +maxw: similar to minw. + +=item * + +trans: a list of column transformations. See L<"TRANSFORMATIONS">. + +=item * + +agg: an aggregate function. See L<"GROUPING">. The default is L<"first">. + +=item * + +aggonly: controls whether the column only shows when grouping is enabled on the +table (see L<"GROUPING">). By default, this is disabled. This means columns +will always be shown by default, whether grouping is enabled or not. If a +column's aggonly is set true, the column will appear when you toggle grouping on +the table. Several columns are set this way, such as the count column on +L<"processlist"> and L<"innodb_transactions">, so you don't see a count when the +grouping isn't enabled, but you do when it is. + +=back + +=head2 FILTERS + +Filters remove rows from the display. They behave much like a WHERE clause in +SQL. innotop has several built-in filters, which remove irrelevant information +like inactive queries, but you can define your own as well. innotop also lets +you create quick-filters, which do not get saved to the configuration file, and +are just an easy way to quickly view only some rows. + +You can enable or disable a filter on any table. Press the '%' key (mnemonic: % +looks kind of like a line being filtered between two circles) and choose which +table you want to filter, if asked. You'll then see a list of possible filters +and a list of filters currently enabled for that table. Type the names of +filters you want to apply and press Enter. + +=head3 USER-DEFINED FILTERS + +If you type a name that doesn't exist, innotop will prompt you to create the +filter. Filters are easy to create if you know Perl, and not hard if you don't. +What you're doing is creating a subroutine that returns true if the row should +be displayed. The row is a hash reference passed to your subroutine as $set. + +For example, imagine you want to filter the processlist table so you only see +queries that have been running more than five minutes. Type a new name for your +filter, and when prompted for the subroutine body, press TAB to initiate your +terminal's auto-completion. You'll see the names of the columns in the +L<"processlist"> table (innotop generally tries to help you with auto-completion +lists). You want to filter on the 'time' column. Type the text "$set->{time} > +300" to return true when the query is more than five minutes old. That's all +you need to do. + +In other words, the code you're typing is surrounded by an implicit context, +which looks like this: + + sub filter { + my ( $set ) = @_; + # YOUR CODE HERE + } + +If your filter doesn't work, or if something else suddenly behaves differently, +you might have made an error in your filter, and innotop is silently catching +the error. Try enabling L<"debug"> to make innotop throw an error instead. + +=head3 QUICK-FILTERS + +innotop's quick-filters are a shortcut to create a temporary filter that doesn't +persist when you restart innotop. To create a quick-filter, press the '/' key. +innotop will prompt you for the column name and filter text. Again, you can use +auto-completion on column names. The filter text can be just the text you want +to "search for." For example, to filter the L<"processlist"> table on queries +that refer to the products table, type '/' and then 'info product'. + +The filter text can actually be any Perl regular expression, but of course a +literal string like 'product' works fine as a regular expression. + +Behind the scenes innotop compiles the quick-filter into a specially tagged +filter that is otherwise like any other filter. It just isn't saved to the +configuration file. + +To clear quick-filters, press the '\' key and innotop will clear them all at +once. + +=head2 SORTING + +innotop has sensible built-in defaults to sort the most important rows to the +top of the table. Like anything else in innotop, you can customize how any +table is sorted. + +To start the sort dialog, start the L<"TABLE EDITOR"> with the '^' key, choose a +table if necessary, and press the 's' key. You'll see a list of columns you can +use in the sort expression and the current sort expression, if any. Enter a +list of columns by which you want to sort and press Enter. If you want to +reverse sort, prefix the column name with a minus sign. For example, if you +want to sort by column a ascending, then column b descending, type 'a -b'. You +can also explicitly add a + in front of columns you want to sort ascending, but +it's not required. + +Some modes have keys mapped to open this dialog directly, and to quickly reverse +sort direction. Press '?' as usual to see which keys are mapped in any mode. + +=head2 GROUPING + +innotop can group, or aggregate, rows together (the terms are used +interchangeably). This is quite similar to an SQL GROUP BY clause. You can +specify to group on certain columns, or if you don't specify any, the entire set +of rows is treated as one group. This is quite like SQL so far, but unlike SQL, +you can also select un-grouped columns. innotop actually aggregates every +column. If you don't explicitly specify a grouping function, the default is +'first'. This is basically a convenience so you don't have to specify an +aggregate function for every column you want in the result. + +You can quickly toggle grouping on a table with the '=' key, which toggles its +aggregate property. This property doesn't persist to the config file. + +The columns by which the table is grouped are specified in its group_by +property. When you turn grouping on, innotop places the group_by columns at the +far left of the table, even if they're not supposed to be visible. The rest of +the visible columns appear in order after them. + +Two tables have default group_by lists and a count column built in: +L<"processlist"> and L<"innodb_transactions">. The grouping is by connection +and status, so you can quickly see how many queries or transactions are in a +given status on each server you're monitoring. The time columns are aggregated +as a sum; other columns are left at the default 'first' aggregation. + +By default, the table shown in L<"S: Variables & Status"> mode also uses +grouping so you can monitor variables and status across many servers. The +default aggregation function in this mode is 'avg'. + +Valid grouping functions are defined in the %agg_funcs hash. They include + +=over + +=item first + +Returns the first element in the group. + +=item count + +Returns the number of elements in the group, including undefined elements, much +like SQL's COUNT(*). + +=item avg + +Returns the average of defined elements in the group. + +=item sum + +Returns the sum of elements in the group. + +=back + +Here's an example of grouping at work. Suppose you have a very busy server with +hundreds of open connections, and you want to see how many connections are in +what status. Using the built-in grouping rules, you can press 'Q' to enter +L<"Q: Query List"> mode. Press '=' to toggle grouping (if necessary, select the +L<"processlist"> table when prompted). + +Your display might now look like the following: + + Query List (? for help) localhost, 32:33, 0.11 QPS, 1 thd, 5.0.38-log + + CXN Cmd Cnt ID User Host Time Query + localhost Query 49 12933 webusr localhost 19:38 SELECT * FROM + localhost Sending Da 23 2383 webusr localhost 12:43 SELECT col1, + localhost Sleep 120 140 webusr localhost 5:18:12 + localhost Statistics 12 19213 webusr localhost 01:19 SELECT * FROM + +That's actually quite a worrisome picture. You've got a lot of idle connections +(Sleep), and some connections executing queries (Query and Sending Data). +That's okay, but you also have a lot in Statistics status, collectively spending +over a minute. That means the query optimizer is having a really hard time +optimizing your statements. Something is wrong; it should normally take +milliseconds to optimize queries. You might not have seen this pattern if you +didn't look at your connections in aggregate. (This is a made-up example, but +it can happen in real life). + +=head2 PIVOTING + +innotop can pivot a table for more compact display, similar to a Pivot Table in +a spreadsheet (also known as a crosstab). Pivoting a table makes columns into +rows. Assume you start with this table: + + foo bar + === === + 1 3 + 2 4 + +After pivoting, the table will look like this: + + name set0 set1 + ==== ==== ==== + foo 1 2 + bar 3 4 + +To get reasonable results, you might need to group as well as pivoting. +innotop currently does this for L<"S: Variables & Status"> mode. + +=head2 COLORS + +By default, innotop highlights rows with color so you can see at a glance which +rows are more important. You can customize the colorization rules and add your +own to any table. Open the table editor with the '^' key, choose a table if +needed, and press 'o' to open the color editor dialog. + +The color editor dialog displays the rules applied to the table, in the order +they are evaluated. Each row is evaluated against each rule to see if the rule +matches the row; if it does, the row gets the specified color, and no further +rules are evaluated. The rules look like the following: + + state eq Locked black on_red + cmd eq Sleep white + user eq system user white + cmd eq Connect white + cmd eq Binlog Dump white + time > 600 red + time > 120 yellow + time > 60 green + time > 30 cyan + +This is the default rule set for the L<"processlist"> table. In order of +priority, these rules make locked queries black on a red background, "gray out" +connections from replication and sleeping queries, and make queries turn from +cyan to red as they run longer. + +(For some reason, the ANSI color code "white" is actually a light gray. Your +terminal's display may vary; experiment to find colors you like). + +You can use keystrokes to move the rules up and down, which re-orders their +priority. You can also delete rules and add new ones. If you add a new rule, +innotop prompts you for the column, an operator for the comparison, a value +against which to compare the column, and a color to assign if the rule matches. +There is auto-completion and prompting at each step. + +The value in the third step needs to be correctly quoted. innotop does not try +to quote the value because it doesn't know whether it should treat the value as +a string or a number. If you want to compare the column against a string, as +for example in the first rule above, you should enter 'Locked' surrounded by +quotes. If you get an error message about a bareword, you probably should have +quoted something. + +=head2 EXPRESSIONS + +Expressions are at the core of how innotop works, and are what enables you to +extend innotop as you wish. Recall the table lifecycle explained in +L<"TABLES">. Expressions are used in the earliest step, where it extracts +values from a data source to form rows. + +It does this by calling a subroutine for each column, passing it the source data +set, a set of current values, and a set of previous values. These are all +needed so the subroutine can calculate things like the difference between this +tick and the previous tick. + +The subroutines that extract the data from the set are compiled from +expressions. This gives significantly more power than just naming the values to +fill the columns, because it allows the column's value to be calculated from +whatever data is necessary, but avoids the need to write complicated and lengthy +Perl code. + +innotop begins with a string of text that can look as simple as a value's name +or as complicated as a full-fledged Perl expression. It looks at each +'bareword' token in the string and decides whether it's supposed to be a key +into the $set hash. A bareword is an unquoted value that isn't already +surrounded by code-ish things like dollar signs or curly brackets. If innotop +decides that the bareword isn't a function or other valid Perl code, it converts +it into a hash access. After the whole string is processed, innotop compiles a +subroutine, like this: + + sub compute_column_value { + my ( $set, $cur, $pre ) = @_; + my $val = # EXPANDED STRING GOES HERE + return $val; + } + +Here's a concrete example, taken from the header table L<"q_header"> in L<"Q: +Query List"> mode. This expression calculates the qps, or Queries Per Second, +column's values, from the values returned by SHOW STATUS: + + Questions/Uptime_hires + +innotop decides both words are barewords, and transforms this expression into +the following Perl code: + + $set->{Questions}/$set->{Uptime_hires} + +When surrounded by the rest of the subroutine's code, this is executable Perl +that calculates a high-resolution queries-per-second value. + +The arguments to the subroutine are named $set, $cur, and $pre. In most cases, +$set and $cur will be the same values. However, if L<"status_inc"> is set, $cur +will not be the same as $set, because $set will already contain values that are +the incremental difference between $cur and $pre. + +Every column in innotop is computed by subroutines compiled in the same fashion. +There is no difference between innotop's built-in columns and user-defined +columns. This keeps things consistent and predictable. + +=head2 TRANSFORMATIONS + +Transformations change how a value is rendered. For example, they can take a +number of seconds and display it in H:M:S format. The following transformations +are defined: + +=over + +=item commify + +Adds commas to large numbers every three decimal places. + +=item dulint_to_int + +Accepts two unsigned integers and converts them into a single longlong. This is +useful for certain operations with InnoDB, which uses two integers as +transaction identifiers, for example. + +=item no_ctrl_char + +Removes quoted control characters from the value. This is affected by the +L<"charset"> configuration variable. + +This transformation only operates within quoted strings, for example, values to +a SET clause in an UPDATE statement. It will not alter the UPDATE statement, +but will collapse the quoted string to [BINARY] or [TEXT], depending on the +charset. + +=item percent + +Converts a number to a percentage by multiplying it by two, formatting it with +L<"num_digits"> digits after the decimal point, and optionally adding a percent +sign (see L<"show_percent">). + +=item secs_to_time + +Formats a number of seconds as time in days+hours:minutes:seconds format. + +=item set_precision + +Formats numbers with L<"num_digits"> number of digits after the decimal point. + +=item shorten + +Formats a number as a unit of 1024 (k/M/G/T) and with L<"num_digits"> number of +digits after the decimal point. + +=back + +=head2 TABLE EDITOR + +The innotop table editor lets you customize tables with keystrokes. You start +the table editor with the '^' key. If there's more than one table on the +screen, it will prompt you to choose one of them. Once you do, innotop will +show you something like this: + + Editing table definition for Buffer Pool. Press ? for help, q to quit. + + name hdr label src + cxn CXN Connection from which cxn + buf_pool_size Size Buffer pool size IB_bp_buf_poo + buf_free Free Bufs Buffers free in the b IB_bp_buf_fre + pages_total Pages Pages total IB_bp_pages_t + pages_modified Dirty Pages Pages modified (dirty IB_bp_pages_m + buf_pool_hit_rate Hit Rate Buffer pool hit rate IB_bp_buf_poo + total_mem_alloc Memory Total memory allocate IB_bp_total_m + add_pool_alloc Add'l Pool Additonal pool alloca IB_bp_add_poo + +The first line shows which table you're editing, and reminds you again to press +'?' for a list of key mappings. The rest is a tabular representation of the +table's columns, because that's likely what you're trying to edit. However, you +can edit more than just the table's columns; this screen can start the filter +editor, color rule editor, and more. + +Each row in the display shows a single column in the table you're editing, along +with a couple of its properties such as its header and source expression (see +L<"EXPRESSIONS">). + +The key mappings are Vim-style, as in many other places. Pressing 'j' and 'k' +moves the highlight up or down. You can then (d)elete or (e)dit the highlighted +column. You can also (a)dd a column to the table. This actually just activates +one of the columns already defined for the table; it prompts you to choose from +among the columns available but not currently displayed. Finally, you can +re-order the columns with the '+' and '-' keys. + +You can do more than just edit the columns with the table editor, you can also +edit other properties, such as the table's sort expression and group-by +expression. Press '?' to see the full list, of course. + +If you want to really customize and create your own column, as opposed to just +activating a built-in one that's not currently displayed, press the (n)ew key, +and innotop will prompt you for the information it needs: + +=over + +=item * + +The column name: this needs to be a word without any funny characters, e.g. just +letters, numbers and underscores. + +=item * + +The column header: this is the label that appears at the top of the column, in +the table header. This can have spaces and funny characters, but be careful not +to make it too wide and waste space on-screen. + +=item * + +The column's data source: this is an expression that determines what data from +the source (see L<"TABLES">) innotop will put into the column. This can just be +the name of an item in the source, or it can be a more complex expression, as +described in L<"EXPRESSIONS">. + +=back + +Once you've entered the required data, your table has a new column. There is no +difference between this column and the built-in ones; it can have all the same +properties and behaviors. innotop will write the column's definition to the +configuration file, so it will persist across sessions. + +Here's an example: suppose you want to track how many times your slaves have +retried transactions. According to the MySQL manual, the +Slave_retried_transactions status variable gives you that data: "The total +number of times since startup that the replication slave SQL thread has retried +transactions. This variable was added in version 5.0.4." This is appropriate to +add to the L<"slave_sql_status"> table. + +To add the column, switch to the replication-monitoring mode with the 'M' key, +and press the '^' key to start the table editor. When prompted, choose +slave_sql_status as the table, then press 'n' to create the column. Type +'retries' as the column name, 'Retries' as the column header, and +'Slave_retried_transactions' as the source. Now the column is created, and you +see the table editor screen again. Press 'q' to exit the table editor, and +you'll see your column at the end of the table. + +=head1 VARIABLE SETS + +Variable sets are used in L<"S: Variables & Status"> mode to define more easily +what variables you want to monitor. Behind the scenes they are compiled to a +list of expressions, and then into a column list so they can be treated just +like columns in any other table, in terms of data extraction and +transformations. However, you're protected from the tedious details by a syntax +that ought to feel very natural to you: a SQL SELECT list. + +The data source for variable sets, and indeed the entire S mode, is the +combination of SHOW STATUS, SHOW VARIABLES, and SHOW INNODB STATUS. Imagine +that you had a huge table with one column per variable returned from those +statements. That's the data source for variable sets. You can now query this +data source just like you'd expect. For example: + + Questions, Uptime, Questions/Uptime as QPS + +Behind the scenes innotop will split that variable set into three expressions, +compile them and turn them into a table definition, then extract as usual. This +becomes a "variable set," or a "list of variables you want to monitor." + +innotop lets you name and save your variable sets, and writes them to the +configuration file. You can choose which variable set you want to see with the +'c' key, or activate the next and previous sets with the '>' and '<' keys. +There are many built-in variable sets as well, which should give you a good +start for creating your own. Press 'e' to edit the current variable set, or +just to see how it's defined. To create a new one, just press 'c' and type its +name. + +You may want to use some of the functions listed in L<"TRANSFORMATIONS"> to help +format the results. In particular, L<"set_precision"> is often useful to limit +the number of digits you see. Extending the above example, here's how: + + Questions, Uptime, set_precision(Questions/Uptime) as QPS + +Actually, this still needs a little more work. If your L<"interval"> is less +than one second, you might be dividing by zero because Uptime is incremental in +this mode by default. Instead, use Uptime_hires: + + Questions, Uptime, set_precision(Questions/Uptime_hires) as QPS + +This example is simple, but it shows how easy it is to choose which variables +you want to monitor. + +=head1 PLUGINS + +innotop has a simple but powerful plugin mechanism by which you can extend +or modify its existing functionality, and add new functionality. innotop's +plugin functionality is event-based: plugins register themselves to be called +when events happen. They then have a chance to influence the event. + +An innotop plugin is a Perl module placed in innotop's L<"plugin_dir"> +directory. On UNIX systems, you can place a symbolic link to the module instead +of putting the actual file there. innotop automatically discovers the file. If +there is a corresponding entry in the L<"plugins"> configuration file section, +innotop loads and activates the plugin. + +The module must conform to innotop's plugin interface. Additionally, the source +code of the module must be written in such a way that innotop can inspect the +file and determine the package name and description. + +=head2 Package Source Convention + +innotop inspects the plugin module's source to determine the Perl package name. +It looks for a line of the form "package Foo;" and if found, considers the +plugin's package name to be Foo. Of course the package name can be a valid Perl +package name, with double semicolons and so on. + +It also looks for a description in the source code, to make the plugin editor +more human-friendly. The description is a comment line of the form "# +description: Foo", where "Foo" is the text innotop will consider to be the +plugin's description. + +=head2 Plugin Interface + +The innotop plugin interface is quite simple: innotop expects the plugin to be +an object-oriented module it can call certain methods on. The methods are + +=over + +=item new(%variables) + +This is the plugin's constructor. It is passed a hash of innotop's variables, +which it can manipulate (see L<"Plugin Variables">). It must return a reference +to the newly created plugin object. + +At construction time, innotop has only loaded the general configuration and +created the default built-in variables with their default contents (which is +quite a lot). Therefore, the state of the program is exactly as in the innotop +source code, plus the configuration variables from the L<"general"> section in +the config file. + +If your plugin manipulates the variables, it is changing global data, which is +shared by innotop and all plugins. Plugins are loaded in the order they're +listed in the config file. Your plugin may load before or after another plugin, +so there is a potential for conflict or interaction between plugins if they +modify data other plugins use or modify. + +=item register_for_events() + +This method must return a list of events in which the plugin is interested, if +any. See L<"Plugin Events"> for the defined events. If the plugin returns an +event that's not defined, the event is ignored. + +=item event handlers + +The plugin must implement a method named the same as each event for which it has +registered. In other words, if the plugin returns qw(foo bar) from +register_for_events(), it must have foo() and bar() methods. These methods are +callbacks for the events. See L<"Plugin Events"> for more details about each +event. + +=back + +=head2 Plugin Variables + +The plugin's constructor is passed a hash of innotop's variables, which it can +manipulate. It is probably a good idea if the plugin object saves a copy of it +for later use. The variables are defined in the innotop variable +%pluggable_vars, and are as follows: + +=over + +=item action_for + +A hashref of key mappings. These are innotop's global hot-keys. + +=item agg_funcs + +A hashref of functions that can be used for grouping. See L<"GROUPING">. + +=item config + +The global configuration hash. + +=item connections + +A hashref of connection specifications. These are just specifications of how to +connect to a server. + +=item dbhs + +A hashref of innotop's database connections. These are actual DBI connection +objects. + +=item filters + +A hashref of filters applied to table rows. See L<"FILTERS"> for more. + +=item modes + +A hashref of modes. See L<"MODES"> for more. + +=item server_groups + +A hashref of server groups. See L<"SERVER GROUPS">. + +=item tbl_meta + +A hashref of innotop's table meta-data, with one entry per table (see +L<"TABLES"> for more information). + +=item trans_funcs + +A hashref of transformation functions. See L<"TRANSFORMATIONS">. + +=item var_sets + +A hashref of variable sets. See L<"VARIABLE SETS">. + +=back + +=head2 Plugin Events + +Each event is defined somewhere in the innotop source code. When innotop runs +that code, it executes the callback function for each plugin that expressed its +interest in the event. innotop passes some data for each event. The events are +defined in the %event_listener_for variable, and are as follows: + +=over + +=item extract_values($set, $cur, $pre, $tbl) + +This event occurs inside the function that extracts values from a data source. +The arguments are the set of values, the current values, the previous values, +and the table name. + +=item set_to_tbl + +Events are defined at many places in this subroutine, which is responsible for +turning an arrayref of hashrefs into an arrayref of lines that can be printed to +the screen. The events all pass the same data: an arrayref of rows and the name +of the table being created. The events are set_to_tbl_pre_filter, +set_to_tbl_pre_sort,set_to_tbl_pre_group, set_to_tbl_pre_colorize, +set_to_tbl_pre_transform, set_to_tbl_pre_pivot, set_to_tbl_pre_create, +set_to_tbl_post_create. + +=item draw_screen($lines) + +This event occurs inside the subroutine that prints the lines to the screen. +$lines is an arrayref of strings. + +=back + +=head2 Simple Plugin Example + +The easiest way to explain the plugin functionality is probably with a simple +example. The following module adds a column to the beginning of every table and +sets its value to 1. + + use strict; + use warnings FATAL => 'all'; + + package Innotop::Plugin::Example; + # description: Adds an 'example' column to every table + + sub new { + my ( $class, %vars ) = @_; + # Store reference to innotop's variables in $self + my $self = bless { %vars }, $class; + + # Design the example column + my $col = { + hdr => 'Example', + just => '', + dec => 0, + num => 1, + label => 'Example', + src => 'example', # Get data from this column in the data source + tbl => '', + trans => [], + }; + + # Add the column to every table. + my $tbl_meta = $vars{tbl_meta}; + foreach my $tbl ( values %$tbl_meta ) { + # Add the column to the list of defined columns + $tbl->{cols}->{example} = $col; + # Add the column to the list of visible columns + unshift @{$tbl->{visible}}, 'example'; + } + + # Be sure to return a reference to the object. + return $self; + } + + # I'd like to be called when a data set is being rendered into a table, please. + sub register_for_events { + my ( $self ) = @_; + return qw(set_to_tbl_pre_filter); + } + + # This method will be called when the event fires. + sub set_to_tbl_pre_filter { + my ( $self, $rows, $tbl ) = @_; + # Set the example column's data source to the value 1. + foreach my $row ( @$rows ) { + $row->{example} = 1; + } + } + + 1; + +=head2 Plugin Editor + +The plugin editor lets you view the plugins innotop discovered and activate or +deactivate them. Start the editor by pressing $ to start the configuration +editor from any mode. Press the 'p' key to start the plugin editor. You'll see +a list of plugins innotop discovered. You can use the 'j' and 'k' keys to move +the highlight to the desired one, then press the * key to toggle it active or +inactive. Exit the editor and restart innotop for the changes to take effect. + +=head1 SQL STATEMENTS + +innotop uses a limited set of SQL statements to retrieve data from MySQL for +display. The statements are customized depending on the server version against +which they are executed; for example, on MySQL 5 and newer, INNODB_STATUS +executes "SHOW ENGINE INNODB STATUS", while on earlier versions it executes +"SHOW INNODB STATUS". The statements are as follows: + + Statement SQL executed + =================== =============================== + INNODB_STATUS SHOW [ENGINE] INNODB STATUS + KILL_CONNECTION KILL + KILL_QUERY KILL QUERY + OPEN_TABLES SHOW OPEN TABLES + PROCESSLIST SHOW FULL PROCESSLIST + SHOW_MASTER_LOGS SHOW MASTER LOGS + SHOW_MASTER_STATUS SHOW MASTER STATUS + SHOW_SLAVE_STATUS SHOW SLAVE STATUS + SHOW_STATUS SHOW [GLOBAL] STATUS + SHOW_VARIABLES SHOW [GLOBAL] VARIABLES + +=head1 DATA SOURCES + +Each time innotop extracts values to create a table (see L<"EXPRESSIONS"> and +L<"TABLES">), it does so from a particular data source. Largely because of the +complex data extracted from SHOW INNODB STATUS, this is slightly messy. SHOW +INNODB STATUS contains a mixture of single values and repeated values that form +nested data sets. + +Whenever innotop fetches data from MySQL, it adds two extra bits to each set: +cxn and Uptime_hires. cxn is the name of the connection from which the data +came. Uptime_hires is a high-resolution version of the server's Uptime status +variable, which is important if your L<"interval"> setting is sub-second. + +Here are the kinds of data sources from which data is extracted: + +=over + +=item STATUS_VARIABLES + +This is the broadest category, into which the most kinds of data fall. It +begins with the combination of SHOW STATUS and SHOW VARIABLES, but other sources +may be included as needed, for example, SHOW MASTER STATUS and SHOW SLAVE +STATUS, as well as many of the non-repeated values from SHOW INNODB STATUS. + +=item DEADLOCK_LOCKS + +This data is extracted from the transaction list in the LATEST DETECTED DEADLOCK +section of SHOW INNODB STATUS. It is nested two levels deep: transactions, then +locks. + +=item DEADLOCK_TRANSACTIONS + +This data is from the transaction list in the LATEST DETECTED DEADLOCK +section of SHOW INNODB STATUS. It is nested one level deep. + +=item EXPLAIN + +This data is from the result set returned by EXPLAIN. + +=item INNODB_TRANSACTIONS + +This data is from the TRANSACTIONS section of SHOW INNODB STATUS. + +=item IO_THREADS + +This data is from the list of threads in the the FILE I/O section of SHOW INNODB +STATUS. + +=item INNODB_LOCKS + +This data is from the TRANSACTIONS section of SHOW INNODB STATUS and is nested +two levels deep. + +=item OPEN_TABLES + +This data is from SHOW OPEN TABLES. + +=item PROCESSLIST + +This data is from SHOW FULL PROCESSLIST. + +=item OS_WAIT_ARRAY + +This data is from the SEMAPHORES section of SHOW INNODB STATUS and is nested one +level deep. It comes from the lines that look like this: + + --Thread 1568861104 has waited at btr0cur.c line 424 .... + +=back + +=head1 MYSQL PRIVILEGES + +=over + +=item * + +You must connect to MySQL as a user who has the SUPER privilege for many of the +functions. + +=item * + +If you don't have the SUPER privilege, you can still run some functions, but you +won't necessarily see all the same data. + +=item * + +You need the PROCESS privilege to see the list of currently running queries in Q +mode. + +=item * + +You need special privileges to start and stop slave servers. + +=item * + +You need appropriate privileges to create and drop the deadlock tables if needed +(see L<"SERVER CONNECTIONS">). + +=back + +=head1 SYSTEM REQUIREMENTS + +You need Perl to run innotop, of course. You also need a few Perl modules: DBI, +DBD::mysql, Term::ReadKey, and Time::HiRes. These should be included with most +Perl distributions, but in case they are not, I recommend using versions +distributed with your operating system or Perl distribution, not from CPAN. +Term::ReadKey in particular has been known to cause problems if installed from +CPAN. + +If you have Term::ANSIColor, innotop will use it to format headers more readably +and compactly. (Under Microsoft Windows, you also need Win32::Console::ANSI for +terminal formatting codes to be honored). If you install Term::ReadLine, +preferably Term::ReadLine::Gnu, you'll get nice auto-completion support. + +I run innotop on Gentoo GNU/Linux, Debian and Ubuntu, and I've had feedback from +people successfully running it on Red Hat, CentOS, Solaris, and Mac OSX. I +don't see any reason why it won't work on other UNIX-ish operating systems, but +I don't know for sure. It also runs on Windows under ActivePerl without +problem. + +innotop has been used on MySQL versions 3.23.58, 4.0.27, 4.1.0, 4.1.22, 5.0.26, +5.1.15, and 5.2.3. If it doesn't run correctly for you, that is a bug that +should be reported. + +=head1 FILES + +$HOMEDIR/.innotop and/or /etc/innotop are used to store +configuration information. Files include the configuration file innotop.conf, +the core_dump file which contains verbose error messages if L<"debug"> is +enabled, and the plugins/ subdirectory. + +=head1 GLOSSARY OF TERMS + +=over + +=item tick + +A tick is a refresh event, when innotop re-fetches data from connections and +displays it. + +=back + +=head1 ACKNOWLEDGEMENTS + +The following people and organizations are acknowledged for various reasons. +Hopefully no one has been forgotten. + +Allen K. Smith, +Aurimas Mikalauskas, +Bartosz Fenski, +Brian Miezejewski, +Christian Hammers, +Cyril Scetbon, +Dane Miller, +David Multer, +Dr. Frank Ullrich, +Giuseppe Maxia, +Google.com Site Reliability Engineers, +Google Code, +Jan Pieter Kunst, +Jari Aalto, +Jay Pipes, +Jeremy Zawodny, +Johan Idren, +Kristian Kohntopp, +Lenz Grimmer, +Maciej Dobrzanski, +Michiel Betel, +MySQL AB, +Paul McCullagh, +Sebastien Estienne, +Sourceforge.net, +Steven Kreuzer, +The Gentoo MySQL Team, +Trevor Price, +Yaar Schnitman, +and probably more people that have not been included. + +(If your name has been misspelled, it's probably out of fear of putting +international characters into this documentation; earlier versions of Perl might +not be able to compile it then). + +=head1 COPYRIGHT, LICENSE AND WARRANTY + +This program is copyright (c) 2006 Baron Schwartz. +Feedback and improvements are welcome. + +THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +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; OR the Perl Artistic License. On UNIX and similar +systems, you can issue `man perlgpl' or `man perlartistic' to read these +licenses. + +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. + +Execute innotop and press '!' to see this information at any time. + +=head1 AUTHOR + +Originally written by Baron Schwartz; currently maintained by Aaron Racine. + +=head1 BUGS + +You can report bugs, ask for improvements, and get other help and support at +L. There are mailing lists, a source code +browser, a bug tracker, etc. Please use these instead of contacting the +maintainer or author directly, as it makes our job easier and benefits others if the +discussions are permanent and public. Of course, if you need to contact us in +private, please do. + +=cut diff --git a/debian/additions/innotop/innotop.1 b/debian/additions/innotop/innotop.1 new file mode 100644 index 000000000000..b2e7fce084eb --- /dev/null +++ b/debian/additions/innotop/innotop.1 @@ -0,0 +1,2084 @@ +.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.07) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "INNOTOP 1" +.TH INNOTOP 1 "2009-03-09" "perl v5.10.0" "User Contributed Perl Documentation" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +innotop \- MySQL and InnoDB transaction/status monitor. +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +To monitor servers normally: +.PP +.Vb 1 +\& innotop +.Ve +.PP +To monitor InnoDB status information from a file: +.PP +.Vb 1 +\& innotop /var/log/mysql/mysqld.err +.Ve +.PP +To run innotop non-interactively in a pipe-and-filter configuration: +.PP +.Vb 1 +\& innotop \-\-count 5 \-d 1 \-n +.Ve +.PP +To monitor a database on another system using a particular username and password: +.PP +.Vb 1 +\& innotop \-u \-p \-h +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +innotop monitors MySQL servers. Each of its modes shows you a different aspect +of what's happening in the server. For example, there's a mode for monitoring +replication, one for queries, and one for transactions. innotop refreshes its +data periodically, so you see an updating view. +.PP +innotop has lots of features for power users, but you can start and run it with +virtually no configuration. If you're just getting started, see +\&\*(L"QUICK-START\*(R". Press '?' at any time while running innotop for +context-sensitive help. +.SH "QUICK-START" +.IX Header "QUICK-START" +To start innotop, open a terminal or command prompt. If you have installed +innotop on your system, you should be able to just type \*(L"innotop\*(R" and press +Enter; otherwise, you will need to change to innotop's directory and type \*(L"perl +innotop\*(R". +.PP +With no options specified, innotop will attempt to connect to a MySQL server on +localhost using mysql_read_default_group=client for other connection +parameters. If you need to specify a different username and password, use the +\&\-u and \-p options, respectively. To monitor a MySQL database on another +host, use the \-h option. +.PP +After you've connected, innotop should show you something like the following: +.PP +.Vb 1 +\& [RO] Query List (? for help) localhost, 01:11:19, 449.44 QPS, 14/7/163 con/run +\& +\& CXN When Load QPS Slow QCacheHit KCacheHit BpsIn BpsOut +\& localhost Total 0.00 1.07k 697 0.00% 98.17% 476.83k 242.83k +\& +\& CXN Cmd ID User Host DB Time Query +\& localhost Query 766446598 test 10.0.0.1 foo 00:02 INSERT INTO table ( +.Ve +.PP +(This sample is truncated at the right so it will fit on a terminal when running +\&'man innotop') +.PP +If your server is busy, you'll see more output. Notice the first line on the +screen, which tells you that readonly is set to true ([\s-1RO\s0]), what mode you're +in and what server you're connected to. You can change to other modes with +keystrokes; press 'T' to switch to a list of InnoDB transactions, for example. +.PP +Press the '?' key to see what keys are active in the current mode. You can +press any of these keys and innotop will either take the requested action or +prompt you for more input. If your system has Term::ReadLine support, you can +use \s-1TAB\s0 and other keys to auto-complete and edit input. +.PP +To quit innotop, press the 'q' key. +.SH "OPTIONS" +.IX Header "OPTIONS" +innotop is mostly configured via its configuration file, but some of the +configuration options can come from the command line. You can also specify a +file to monitor for InnoDB status output; see \*(L"\s-1MONITORING\s0 A \s-1FILE\s0\*(R" for more +details. +.PP +You can negate some options by prefixing the option name with \-\-no. For +example, \-\-noinc (or \-\-no\-inc) negates \*(L"\-\-inc\*(R". +.IP "\-\-color" 4 +.IX Item "--color" +Enable or disable terminal coloring. Corresponds to the \*(L"color\*(R" config file +setting. +.IP "\-\-config" 4 +.IX Item "--config" +Specifies a configuration file to read. This option is non-sticky, that is to +say it does not persist to the configuration file itself. +.IP "\-\-count" 4 +.IX Item "--count" +Refresh only the specified number of times (ticks) before exiting. Each refresh +is a pause for \*(L"interval\*(R" seconds, followed by requesting data from MySQL +connections and printing it to the terminal. +.IP "\-\-delay" 4 +.IX Item "--delay" +Specifies the amount of time to pause between ticks (refreshes). Corresponds to +the configuration option \*(L"interval\*(R". +.IP "\-\-help" 4 +.IX Item "--help" +Print a summary of command-line usage and exit. +.IP "\-\-host" 4 +.IX Item "--host" +Host to connect to. +.IP "\-\-inc" 4 +.IX Item "--inc" +Specifies whether innotop should display absolute numbers or relative numbers +(offsets from their previous values). Corresponds to the configuration option +\&\*(L"status_inc\*(R". +.IP "\-\-mode" 4 +.IX Item "--mode" +Specifies the mode in which innotop should start. Corresponds to the +configuration option \*(L"mode\*(R". +.IP "\-\-nonint" 4 +.IX Item "--nonint" +Enable non-interactive operation. See \*(L"NON-INTERACTIVE \s-1OPERATION\s0\*(R" for more. +.IP "\-\-password" 4 +.IX Item "--password" +Password to use for connection. +.IP "\-\-port" 4 +.IX Item "--port" +Port to use for connection. +.IP "\-\-skipcentral" 4 +.IX Item "--skipcentral" +Don't read the central configuration file. +.IP "\-\-user" 4 +.IX Item "--user" +User to use for connection. +.IP "\-\-version" 4 +.IX Item "--version" +Output version information and exit. +.IP "\-\-write" 4 +.IX Item "--write" +Sets the configuration option \*(L"readonly\*(R" to 0, making innotop write the +running configuration to ~/.innotop/innotop.conf on exit, if no configuration +file was loaded at start-up. +.SH "HOTKEYS" +.IX Header "HOTKEYS" +innotop is interactive, and you control it with key-presses. +.IP "\(bu" 4 +Uppercase keys switch between modes. +.IP "\(bu" 4 +Lowercase keys initiate some action within the current mode. +.IP "\(bu" 4 +Other keys do something special like change configuration or show the +innotop license. +.PP +Press '?' at any time to see the currently active keys and what they do. +.SH "MODES" +.IX Header "MODES" +Each of innotop's modes retrieves and displays a particular type of data from +the servers you're monitoring. You switch between modes with uppercase keys. +The following is a brief description of each mode, in alphabetical order. To +switch to the mode, press the key listed in front of its heading in the +following list: +.IP "B: InnoDB Buffers" 4 +.IX Item "B: InnoDB Buffers" +This mode displays information about the InnoDB buffer pool, page statistics, +insert buffer, and adaptive hash index. The data comes from \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. +.Sp +This mode contains the \*(L"buffer_pool\*(R", \*(L"page_statistics\*(R", +\&\*(L"insert_buffers\*(R", and \*(L"adaptive_hash_index\*(R" tables by default. +.IP "C: Command Summary" 4 +.IX Item "C: Command Summary" +This mode is similar to mytop's Command Summary mode. It shows the +\&\*(L"cmd_summary\*(R" table, which looks something like the following: +.Sp +.Vb 8 +\& Command Summary (? for help) localhost, 25+07:16:43, 2.45 QPS, 3 thd, 5.0.40 +\& _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ Command Summary _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ +\& Name Value Pct Last Incr Pct +\& Select_scan 3244858 69.89% 2 100.00% +\& Select_range 1354177 29.17% 0 0.00% +\& Select_full_join 39479 0.85% 0 0.00% +\& Select_full_range_join 4097 0.09% 0 0.00% +\& Select_range_check 0 0.00% 0 0.00% +.Ve +.Sp +The command summary table is built by extracting variables from +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". The variables must be numeric and must match the prefix +given by the \*(L"cmd_filter\*(R" configuration variable. The variables are then +sorted by value descending and compared to the last variable, as shown above. +The percentage columns are percentage of the total of all variables in the +table, so you can see the relative weight of the variables. +.Sp +The example shows what you see if the prefix is \*(L"Select_\*(R". The default +prefix is \*(L"Com_\*(R". You can choose a prefix with the 's' key. +.Sp +It's rather like running \s-1SHOW\s0 \s-1VARIABLES\s0 \s-1LIKE\s0 \*(L"prefix%\*(R" with memory and +nice formatting. +.Sp +Values are aggregated across all servers. The Pct columns are not correctly +aggregated across multiple servers. This is a known limitation of the grouping +algorithm that may be fixed in the future. +.IP "D: InnoDB Deadlocks" 4 +.IX Item "D: InnoDB Deadlocks" +This mode shows the transactions involved in the last InnoDB deadlock. A second +table shows the locks each transaction held and waited for. A deadlock is +caused by a cycle in the waits-for graph, so there should be two locks held and +one waited for unless the deadlock information is truncated. +.Sp +InnoDB puts deadlock information before some other information in the \s-1SHOW\s0 +\&\s-1INNODB\s0 \s-1STATUS\s0 output. If there are a lot of locks, the deadlock information can +grow very large, and there is a limit on the size of the \s-1SHOW\s0 \s-1INNODB\s0 +\&\s-1STATUS\s0 output. A large deadlock can fill the entire output, or even be +truncated, and prevent you from seeing other information at all. If you are +running innotop in another mode, for example T mode, and suddenly you don't see +anything, you might want to check and see if a deadlock has wiped out the data +you need. +.Sp +If it has, you can create a small deadlock to replace the large one. Use the +\&'w' key to 'wipe' the large deadlock with a small one. This will not work +unless you have defined a deadlock table for the connection (see \*(L"\s-1SERVER\s0 +\&\s-1CONNECTIONS\s0\*(R"). +.Sp +You can also configure innotop to automatically detect when a large deadlock +needs to be replaced with a small one (see \*(L"auto_wipe_dl\*(R"). +.Sp +This mode displays the \*(L"deadlock_transactions\*(R" and \*(L"deadlock_locks\*(R" tables +by default. +.IP "F: InnoDB Foreign Key Errors" 4 +.IX Item "F: InnoDB Foreign Key Errors" +This mode shows the last InnoDB foreign key error information, such as the +table where it happened, when and who and what query caused it, and so on. +.Sp +InnoDB has a huge variety of foreign key error messages, and many of them are +just hard to parse. innotop doesn't always do the best job here, but there's +so much code devoted to parsing this messy, unparseable output that innotop is +likely never to be perfect in this regard. If innotop doesn't show you what +you need to see, just look at the status text directly. +.Sp +This mode displays the \*(L"fk_error\*(R" table by default. +.IP "I: InnoDB I/O Info" 4 +.IX Item "I: InnoDB I/O Info" +This mode shows InnoDB's I/O statistics, including the I/O threads, pending I/O, +file I/O miscellaneous, and log statistics. It displays the \*(L"io_threads\*(R", +\&\*(L"pending_io\*(R", \*(L"file_io_misc\*(R", and \*(L"log_statistics\*(R" tables by default. +.IP "L: Locks" 4 +.IX Item "L: Locks" +This mode shows information about current locks. At the moment only InnoDB +locks are supported, and by default you'll only see locks for which transactions +are waiting. This information comes from the \s-1TRANSACTIONS\s0 section of the InnoDB +status text. If you have a very busy server, you may have frequent lock waits; +it helps to be able to see which tables and indexes are the \*(L"hot spot\*(R" for +locks. If your server is running pretty well, this mode should show nothing. +.Sp +You can configure MySQL and innotop to monitor not only locks for which a +transaction is waiting, but those currently held, too. You can do this with the +InnoDB Lock Monitor (). It's +not documented in the MySQL manual, but creating the lock monitor with the +following statement also affects the output of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0, which innotop +uses: +.Sp +.Vb 1 +\& CREATE TABLE innodb_lock_monitor(a int) ENGINE=INNODB; +.Ve +.Sp +This causes InnoDB to print its output to the MySQL file every 16 seconds or so, +as stated in the manual, but it also makes the normal \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 output +include lock information, which innotop can parse and display (that's the +undocumented feature). +.Sp +This means you can do what may have seemed impossible: to a limited extent +(InnoDB truncates some information in the output), you can see which transaction +holds the locks something else is waiting for. You can also enable and disable +the InnoDB Lock Monitor with the key mappings in this mode. +.Sp +This mode displays the \*(L"innodb_locks\*(R" table by default. Here's a sample of +the screen when one connection is waiting for locks another connection holds: +.Sp +.Vb 7 +\& _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ InnoDB Locks _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ +\& CXN ID Type Waiting Wait Active Mode DB Table Index +\& localhost 12 RECORD 1 00:10 00:10 X test t1 PRIMARY +\& localhost 12 TABLE 0 00:10 00:10 IX test t1 +\& localhost 12 RECORD 1 00:10 00:10 X test t1 PRIMARY +\& localhost 11 TABLE 0 00:00 00:25 IX test t1 +\& localhost 11 RECORD 0 00:00 00:25 X test t1 PRIMARY +.Ve +.Sp +You can see the first connection, \s-1ID\s0 12, is waiting for a lock on the \s-1PRIMARY\s0 +key on test.t1, and has been waiting for 10 seconds. The second connection +isn't waiting, because the Waiting column is 0, but it holds locks on the same +index. That tells you connection 11 is blocking connection 12. +.IP "M: Master/Slave Replication Status" 4 +.IX Item "M: Master/Slave Replication Status" +This mode shows the output of \s-1SHOW\s0 \s-1SLAVE\s0 \s-1STATUS\s0 and \s-1SHOW\s0 \s-1MASTER\s0 \s-1STATUS\s0 in three +tables. The first two divide the slave's status into \s-1SQL\s0 and I/O thread status, +and the last shows master status. Filters are applied to eliminate non-slave +servers from the slave tables, and non-master servers from the master table. +.Sp +This mode displays the \*(L"slave_sql_status\*(R", \*(L"slave_io_status\*(R", and +\&\*(L"master_status\*(R" tables by default. +.IP "O: Open Tables" 4 +.IX Item "O: Open Tables" +This section comes from MySQL's \s-1SHOW\s0 \s-1OPEN\s0 \s-1TABLES\s0 command. By default it is +filtered to show tables which are in use by one or more queries, so you can +get a quick look at which tables are 'hot'. You can use this to guess which +tables might be locked implicitly. +.Sp +This mode displays the \*(L"open_tables\*(R" mode by default. +.IP "Q: Query List" 4 +.IX Item "Q: Query List" +This mode displays the output from \s-1SHOW\s0 \s-1FULL\s0 \s-1PROCESSLIST\s0, much like \fBmytop\fR's +query list mode. This mode does \fBnot\fR show InnoDB-related information. This +is probably one of the most useful modes for general usage. +.Sp +There is an informative header that shows general status information about +your server. You can toggle it on and off with the 'h' key. By default, +innotop hides inactive processes and its own process. You can toggle these on +and off with the 'i' and 'a' keys. +.Sp +You can \s-1EXPLAIN\s0 a query from this mode with the 'e' key. This displays the +query's full text, the results of \s-1EXPLAIN\s0, and in newer MySQL versions, even +the optimized query resulting from \s-1EXPLAIN\s0 \s-1EXTENDED\s0. innotop also tries to +rewrite certain queries to make them EXPLAIN-able. For example, \s-1INSERT/SELECT\s0 +statements are rewritable. +.Sp +This mode displays the \*(L"q_header\*(R" and \*(L"processlist\*(R" tables by default. +.IP "R: InnoDB Row Operations and Semaphores" 4 +.IX Item "R: InnoDB Row Operations and Semaphores" +This mode shows InnoDB row operations, row operation miscellaneous, semaphores, +and information from the wait array. It displays the \*(L"row_operations\*(R", +\&\*(L"row_operation_misc\*(R", \*(L"semaphores\*(R", and \*(L"wait_array\*(R" tables by default. +.IP "S: Variables & Status" 4 +.IX Item "S: Variables & Status" +This mode calculates statistics, such as queries per second, and prints them out +in several different styles. You can show absolute values, or incremental values +between ticks. +.Sp +You can switch between the views by pressing a key. The 's' key prints a +single line each time the screen updates, in the style of \fBvmstat\fR. The 'g' +key changes the view to a graph of the same numbers, sort of like \fBtload\fR. +The 'v' key changes the view to a pivoted table of variable names on the left, +with successive updates scrolling across the screen from left to right. You can +choose how many updates to put on the screen with the \*(L"num_status_sets\*(R" +configuration variable. +.Sp +Headers may be abbreviated to fit on the screen in interactive operation. You +choose which variables to display with the 'c' key, which selects from +predefined sets, or lets you create your own sets. You can edit the current set +with the 'e' key. +.Sp +This mode doesn't really display any tables like other modes. Instead, it uses +a table definition to extract and format the data, but it then transforms the +result in special ways before outputting it. It uses the \*(L"var_status\*(R" table +definition for this. +.IP "T: InnoDB Transactions" 4 +.IX Item "T: InnoDB Transactions" +This mode shows transactions from the InnoDB monitor's output, in \fBtop\fR\-like +format. This mode is the reason I wrote innotop. +.Sp +You can kill queries or processes with the 'k' and 'x' keys, and \s-1EXPLAIN\s0 a query +with the 'e' or 'f' keys. InnoDB doesn't print the full query in transactions, +so explaining may not work right if the query is truncated. +.Sp +The informational header can be toggled on and off with the 'h' key. By +default, innotop hides inactive transactions and its own transaction. You can +toggle this on and off with the 'i' and 'a' keys. +.Sp +This mode displays the \*(L"t_header\*(R" and \*(L"innodb_transactions\*(R" tables by +default. +.SH "INNOTOP STATUS" +.IX Header "INNOTOP STATUS" +The first line innotop displays is a \*(L"status bar\*(R" of sorts. What it contains +depends on the mode you're in, and what servers you're monitoring. The first +few words are always [\s-1RO\s0] (if readonly is set to 1), the innotop mode, such as +\&\*(L"InnoDB Txns\*(R" for T mode, followed by a reminder to press '?' for help at any +time. +.SS "\s-1ONE\s0 \s-1SERVER\s0" +.IX Subsection "ONE SERVER" +The simplest case is when you're monitoring a single server. In this case, the +name of the connection is next on the status line. This is the name you gave +when you created the connection \*(-- most likely the MySQL server's hostname. +This is followed by the server's uptime. +.PP +If you're in an InnoDB mode, such as T or B, the next word is \*(L"InnoDB\*(R" followed +by some information about the \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 output used to render the +screen. The first word is the number of seconds since the last \s-1SHOW\s0 \s-1INNODB\s0 +\&\s-1STATUS\s0, which InnoDB uses to calculate some per-second statistics. The next is +a smiley face indicating whether the InnoDB output is truncated. If the smiley +face is a :\-), all is well; there is no truncation. A :^| means the transaction +list is so long, InnoDB has only printed out some of the transactions. Finally, +a frown :\-( means the output is incomplete, which is probably due to a deadlock +printing too much lock information (see \*(L"D: InnoDB Deadlocks\*(R"). +.PP +The next two words indicate the server's queries per second (\s-1QPS\s0) and how many +threads (connections) exist. Finally, the server's version number is the last +thing on the line. +.SS "\s-1MULTIPLE\s0 \s-1SERVERS\s0" +.IX Subsection "MULTIPLE SERVERS" +If you are monitoring multiple servers (see \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R"), the status +line does not show any details about individual servers. Instead, it shows the +names of the connections that are active. Again, these are connection names you +specified, which are likely to be the server's hostname. A connection that has +an error is prefixed with an exclamation point. +.PP +If you are monitoring a group of servers (see \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R"), the status +line shows the name of the group. If any connection in the group has an +error, the group's name is followed by the fraction of the connections that +don't have errors. +.PP +See \*(L"\s-1ERROR\s0 \s-1HANDLING\s0\*(R" for more details about innotop's error handling. +.SS "\s-1MONITORING\s0 A \s-1FILE\s0" +.IX Subsection "MONITORING A FILE" +If you give a filename on the command line, innotop will not connect to \s-1ANY\s0 +servers at all. It will watch the specified file for InnoDB status output and +use that as its data source. It will always show a single connection called +\&'file'. And since it can't connect to a server, it can't determine how long the +server it's monitoring has been up; so it calculates the server's uptime as time +since innotop started running. +.SH "SERVER ADMINISTRATION" +.IX Header "SERVER ADMINISTRATION" +While innotop is primarily a monitor that lets you watch and analyze your +servers, it can also send commands to servers. The most frequently useful +commands are killing queries and stopping or starting slaves. +.PP +You can kill a connection, or in newer versions of MySQL kill a query but not a +connection, from \*(L"Q: Query List\*(R" and \*(L"T: InnoDB Transactions\*(R" modes. +Press 'k' to issue a \s-1KILL\s0 command, or 'x' to issue a \s-1KILL\s0 \s-1QUERY\s0 command. +innotop will prompt you for the server and/or connection \s-1ID\s0 to kill (innotop +does not prompt you if there is only one possible choice for any input). +innotop pre-selects the longest-running query, or the oldest connection. +Confirm the command with 'y'. +.PP +In \*(L"Slave Replication Status\*(R"\*(L" in \*(R"M: Master mode, you can start and stop slaves +with the 'a' and 'o' keys, respectively. You can send these commands to many +slaves at once. innotop fills in a default command of \s-1START\s0 \s-1SLAVE\s0 or \s-1STOP\s0 \s-1SLAVE\s0 +for you, but you can actually edit the command and send anything you wish, such +as \s-1SET\s0 \s-1GLOBAL\s0 SQL_SLAVE_SKIP_COUNTER=1 to make the slave skip one binlog event +when it starts. +.PP +You can also ask innotop to calculate the earliest binlog in use by any slave +and issue a \s-1PURGE\s0 \s-1MASTER\s0 \s-1LOGS\s0 on the master. Use the 'b' key for this. innotop +will prompt you for a master to run the command on, then prompt you for the +connection names of that master's slaves (there is no way for innotop to +determine this reliably itself). innotop will find the minimum binlog in use by +these slave connections and suggest it as the argument to \s-1PURGE\s0 \s-1MASTER\s0 \s-1LOGS\s0. +.SH "SERVER CONNECTIONS" +.IX Header "SERVER CONNECTIONS" +When you create a server connection using '@', innotop asks you for a series of +inputs, as follows: +.IP "\s-1DSN\s0" 4 +.IX Item "DSN" +A \s-1DSN\s0 is a Data Source Name, which is the initial argument passed to the \s-1DBI\s0 +module for connecting to a server. It is usually of the form +.Sp +.Vb 1 +\& DBI:mysql:;mysql_read_default_group=mysql;host=HOSTNAME +.Ve +.Sp +Since this \s-1DSN\s0 is passed to the DBD::mysql driver, you should read the driver's +documentation at \*(L"/search.cpan.org/dist/DBD\-mysql/lib/DBD/mysql.pm\*(R"\*(L" in \*(R"http: for +the exact details on all the options you can pass the driver in the \s-1DSN\s0. You +can read more about \s-1DBI\s0 at , and especially at +. +.Sp +The mysql_read_default_group=mysql option lets the \s-1DBD\s0 driver read your MySQL +options files, such as ~/.my.cnf on UNIX-ish systems. You can use this to avoid +specifying a username or password for the connection. +.IP "InnoDB Deadlock Table" 4 +.IX Item "InnoDB Deadlock Table" +This optional item tells innotop a table name it can use to deliberately create +a small deadlock (see \*(L"D: InnoDB Deadlocks\*(R"). If you specify this option, +you just need to be sure the table doesn't exist, and that innotop can create +and drop the table with the InnoDB storage engine. You can safely omit or just +accept the default if you don't intend to use this. +.IP "Username" 4 +.IX Item "Username" +innotop will ask you if you want to specify a username. If you say 'y', it will +then prompt you for a user name. If you have a MySQL option file that specifies +your username, you don't have to specify a username. +.Sp +The username defaults to your login name on the system you're running innotop on. +.IP "Password" 4 +.IX Item "Password" +innotop will ask you if you want to specify a password. Like the username, the +password is optional, but there's an additional prompt that asks if you want to +save the password in the innotop configuration file. If you don't save it in +the configuration file, innotop will prompt you for a password each time it +starts. Passwords in the innotop configuration file are saved in plain text, +not encrypted in any way. +.PP +Once you finish answering these questions, you should be connected to a server. +But innotop isn't limited to monitoring a single server; you can define many +server connections and switch between them by pressing the '@' key. See +\&\*(L"\s-1SWITCHING\s0 \s-1BETWEEN\s0 \s-1CONNECTIONS\s0\*(R". +.SH "SERVER GROUPS" +.IX Header "SERVER GROUPS" +If you have multiple MySQL instances, you can put them into named groups, such +as 'all', 'masters', and 'slaves', which innotop can monitor all together. +.PP +You can choose which group to monitor with the '#' key, and you can press the +\&\s-1TAB\s0 key to switch to the next group. If you're not currently monitoring a +group, pressing \s-1TAB\s0 selects the first group. +.PP +To create a group, press the '#' key and type the name of your new group, then +type the names of the connections you want the group to contain. +.SH "SWITCHING BETWEEN CONNECTIONS" +.IX Header "SWITCHING BETWEEN CONNECTIONS" +innotop lets you quickly switch which servers you're monitoring. The most basic +way is by pressing the '@' key and typing the name(s) of the connection(s) you +want to use. This setting is per-mode, so you can monitor different connections +in each mode, and innotop remembers which connections you choose. +.PP +You can quickly switch to the 'next' connection in alphabetical order with the +\&'n' key. If you're monitoring a server group (see \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R") this will +switch to the first connection. +.PP +You can also type many connection names, and innotop will fetch and display data +from them all. Just separate the connection names with spaces, for example +\&\*(L"server1 server2.\*(R" Again, if you type the name of a connection that doesn't +exist, innotop will prompt you for connection information and create the +connection. +.PP +Another way to monitor multiple connections at once is with server groups. You +can use the \s-1TAB\s0 key to switch to the 'next' group in alphabetical order, or if +you're not monitoring any groups, \s-1TAB\s0 will switch to the first group. +.PP +innotop does not fetch data in parallel from connections, so if you are +monitoring a large group or many connections, you may notice increased delay +between ticks. +.PP +When you monitor more than one connection, innotop's status bar changes. See +\&\*(L"\s-1INNOTOP\s0 \s-1STATUS\s0\*(R". +.SH "ERROR HANDLING" +.IX Header "ERROR HANDLING" +Error handling is not that important when monitoring a single connection, but is +crucial when you have many active connections. A crashed server or lost +connection should not crash innotop. As a result, innotop will continue to run +even when there is an error; it just won't display any information from the +connection that had an error. Because of this, innotop's behavior might confuse +you. It's a feature, not a bug! +.PP +innotop does not continue to query connections that have errors, because they +may slow innotop and make it hard to use, especially if the error is a problem +connecting and causes a long time-out. Instead, innotop retries the connection +occasionally to see if the error still exists. If so, it will wait until some +point in the future. The wait time increases in ticks as the Fibonacci series, +so it tries less frequently as time passes. +.PP +Since errors might only happen in certain modes because of the \s-1SQL\s0 commands +issued in those modes, innotop keeps track of which mode caused the error. If +you switch to a different mode, innotop will retry the connection instead of +waiting. +.PP +By default innotop will display the problem in red text at the bottom of the +first table on the screen. You can disable this behavior with the +\&\*(L"show_cxn_errors_in_tbl\*(R" configuration option, which is enabled by default. +If the \*(L"debug\*(R" option is enabled, innotop will display the error at the +bottom of every table, not just the first. And if \*(L"show_cxn_errors\*(R" is +enabled, innotop will print the error text to \s-1STDOUT\s0 as well. Error messages +might only display in the mode that caused the error, depending on the mode and +whether innotop is avoiding querying that connection. +.SH "NON-INTERACTIVE OPERATION" +.IX Header "NON-INTERACTIVE OPERATION" +You can run innotop in non-interactive mode, in which case it is entirely +controlled from the configuration file and command-line options. To start +innotop in non-interactive mode, give the L\*(L"<\-\-nonint\*(R"> command-line option. +This changes innotop's behavior in the following ways: +.IP "\(bu" 4 +Certain Perl modules are not loaded. Term::Readline is not loaded, since +innotop doesn't prompt interactively. Term::ANSIColor and Win32::Console::ANSI +modules are not loaded. Term::ReadKey is still used, since innotop may have to +prompt for connection passwords when starting up. +.IP "\(bu" 4 +innotop does not clear the screen after each tick. +.IP "\(bu" 4 +innotop does not persist any changes to the configuration file. +.IP "\(bu" 4 +If \*(L"\-\-count\*(R" is given and innotop is in incremental mode (see \*(L"status_inc\*(R" +and \*(L"\-\-inc\*(R"), innotop actually refreshes one more time than specified so it +can print incremental statistics. This suppresses output during the first +tick, so innotop may appear to hang. +.IP "\(bu" 4 +innotop only displays the first table in each mode. This is so the output can +be easily processed with other command-line utilities such as awk and sed. To +change which tables display in each mode, see \*(L"\s-1TABLES\s0\*(R". Since \*(L"Q: Query +List\*(R" mode is so important, innotop automatically disables the \*(L"q_header\*(R" +table. This ensures you'll see the \*(L"processlist\*(R" table, even if you have +innotop configured to show the q_header table during interactive operation. +Similarly, in \*(L"T: InnoDB Transactions\*(R" mode, the \*(L"t_header\*(R" table is +suppressed so you see only the \*(L"innodb_transactions\*(R" table. +.IP "\(bu" 4 +All output is tab-separated instead of being column-aligned with whitespace, and +innotop prints the full contents of each table instead of only printing one +screenful at a time. +.IP "\(bu" 4 +innotop only prints column headers once instead of every tick (see +\&\*(L"hide_hdr\*(R"). innotop does not print table captions (see +\&\*(L"display_table_captions\*(R"). innotop ensures there are no empty lines in the +output. +.IP "\(bu" 4 +innotop does not honor the \*(L"shorten\*(R" transformation, which normally shortens +some numbers to human-readable formats. +.IP "\(bu" 4 +innotop does not print a status line (see \*(L"\s-1INNOTOP\s0 \s-1STATUS\s0\*(R"). +.SH "CONFIGURING" +.IX Header "CONFIGURING" +Nearly everything about innotop is configurable. Most things are possible to +change with built-in commands, but you can also edit the configuration file. +.PP +While running innotop, press the '$' key to bring up the configuration editing +dialog. Press another key to select the type of data you want to edit: +.IP "S: Statement Sleep Times" 4 +.IX Item "S: Statement Sleep Times" +Edits \s-1SQL\s0 statement sleep delays, which make innotop pause for the specified +amount of time after executing a statement. See \*(L"\s-1SQL\s0 \s-1STATEMENTS\s0\*(R" for a +definition of each statement and what it does. By default innotop does not +delay after any statements. +.Sp +This feature is included so you can customize the side-effects caused by +monitoring your server. You may not see any effects, but some innotop users +have noticed that certain MySQL versions under very high load with InnoDB +enabled take longer than usual to execute \s-1SHOW\s0 \s-1GLOBAL\s0 \s-1STATUS\s0. If innotop calls +\&\s-1SHOW\s0 \s-1FULL\s0 \s-1PROCESSLIST\s0 immediately afterward, the processlist contains more +queries than the machine actually averages at any given moment. Configuring +innotop to pause briefly after calling \s-1SHOW\s0 \s-1GLOBAL\s0 \s-1STATUS\s0 alleviates this +effect. +.Sp +Sleep times are stored in the \*(L"stmt_sleep_times\*(R" section of the configuration +file. Fractional-second sleeps are supported, subject to your hardware's +limitations. +.IP "c: Edit Columns" 4 +.IX Item "c: Edit Columns" +Starts the table editor on one of the displayed tables. See \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R". +An alternative way to start the table editor without entering the configuration +dialog is with the '^' key. +.IP "g: General Configuration" 4 +.IX Item "g: General Configuration" +Starts the configuration editor to edit global and mode-specific configuration +variables (see \*(L"\s-1MODES\s0\*(R"). innotop prompts you to choose a variable from among +the global and mode-specific ones depending on the current mode. +.IP "k: Row-Coloring Rules" 4 +.IX Item "k: Row-Coloring Rules" +Starts the row-coloring rules editor on one of the displayed table(s). See +\&\*(L"\s-1COLORS\s0\*(R" for details. +.IP "p: Manage Plugins" 4 +.IX Item "p: Manage Plugins" +Starts the plugin configuration editor. See \*(L"\s-1PLUGINS\s0\*(R" for details. +.IP "s: Server Groups" 4 +.IX Item "s: Server Groups" +Lets you create and edit server groups. See \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R". +.IP "t: Choose Displayed Tables" 4 +.IX Item "t: Choose Displayed Tables" +Lets you choose which tables to display in this mode. See \*(L"\s-1MODES\s0\*(R" and +\&\*(L"\s-1TABLES\s0\*(R". +.SH "CONFIGURATION FILE" +.IX Header "CONFIGURATION FILE" +innotop's default configuration file locations are \f(CW$HOME\fR/.innotop and +/etc/innotop/innotop.conf, and they are looked for in that order. If the first +configuration file exists, the second will not be processed. Those can be +overridden with the \*(L"\-\-config\*(R" command-line option. You can edit it by hand +safely, however innotop reads the configuration file when it starts, and, if +readonly is set to 0, writes it out again when it exits. Thus, if readonly is +set to 0, any changes you make by hand while innotop is running will be lost. +.PP +innotop doesn't store its entire configuration in the configuration file. It +has a huge set of default configuration values that it holds only in memory, +and the configuration file only overrides these defaults. When you customize a +default setting, innotop notices, and then stores the customizations into the +file. This keeps the file size down, makes it easier to edit, and makes +upgrades easier. +.PP +A configuration file is read-only be default. You can override that with +\&\*(L"\-\-write\*(R". See \*(L"readonly\*(R". +.PP +The configuration file is arranged into sections like an \s-1INI\s0 file. Each +section begins with [section\-name] and ends with [/section\-name]. Each +section's entries have a different syntax depending on the data they need to +store. You can put comments in the file; any line that begins with a # +character is a comment. innotop will not read the comments, so it won't write +them back out to the file when it exits. Comments in read-only configuration +files are still useful, though. +.PP +The first line in the file is innotop's version number. This lets innotop +notice when the file format is not backwards-compatible, and upgrade smoothly +without destroying your customized configuration. +.PP +The following list describes each section of the configuration file and the data +it contains: +.IP "general" 4 +.IX Item "general" +The 'general' section contains global configuration variables and variables that +may be mode-specific, but don't belong in any other section. The syntax is a +simple key=value list. innotop writes a comment above each value to help you +edit the file by hand. +.RS 4 +.IP "S_func" 4 +.IX Item "S_func" +Controls S mode presentation (see \*(L"S: Variables & Status\*(R"). If g, values are +graphed; if s, values are like vmstat; if p, values are in a pivoted table. +.IP "S_set" 4 +.IX Item "S_set" +Specifies which set of variables to display in \*(L"S: Variables & Status\*(R" mode. +See \*(L"\s-1VARIABLE\s0 \s-1SETS\s0\*(R". +.IP "auto_wipe_dl" 4 +.IX Item "auto_wipe_dl" +Instructs innotop to automatically wipe large deadlocks when it notices them. +When this happens you may notice a slight delay. At the next tick, you will +usually see the information that was being truncated by the large deadlock. +.IP "charset" 4 +.IX Item "charset" +Specifies what kind of characters to allow through the \*(L"no_ctrl_char\*(R" +transformation. This keeps non-printable characters from confusing a +terminal when you monitor queries that contain binary data, such as images. +.Sp +The default is 'ascii', which considers anything outside normal \s-1ASCII\s0 to be a +control character. The other allowable values are 'unicode' and 'none'. 'none' +considers every character a control character, which can be useful for +collapsing \s-1ALL\s0 text fields in queries. +.IP "cmd_filter" 4 +.IX Item "cmd_filter" +This is the prefix that filters variables in \*(L"C: Command Summary\*(R" mode. +.IP "color" 4 +.IX Item "color" +Whether terminal coloring is permitted. +.IP "cxn_timeout" 4 +.IX Item "cxn_timeout" +On MySQL versions 4.0.3 and newer, this variable is used to set the connection's +timeout, so MySQL doesn't close the connection if it is not used for a while. +This might happen because a connection isn't monitored in a particular mode, for +example. +.IP "debug" 4 +.IX Item "debug" +This option enables more verbose errors and makes innotop more strict in some +places. It can help in debugging filters and other user-defined code. It also +makes innotop write a lot of information to \*(L"debugfile\*(R" when there is a +crash. +.IP "debugfile" 4 +.IX Item "debugfile" +A file to which innotop will write information when there is a crash. See +\&\*(L"\s-1FILES\s0\*(R". +.IP "display_table_captions" 4 +.IX Item "display_table_captions" +innotop displays a table caption above most tables. This variable suppresses or +shows captions on all tables globally. Some tables are configured with the +hide_caption property, which overrides this. +.IP "global" 4 +.IX Item "global" +Whether to show \s-1GLOBAL\s0 variables and status. innotop only tries to do this on +servers which support the \s-1GLOBAL\s0 option to \s-1SHOW\s0 \s-1VARIABLES\s0 and \s-1SHOW\s0 \s-1STATUS\s0. In +some MySQL versions, you need certain privileges to do this; if you don't have +them, innotop will not be able to fetch any variable and status data. This +configuration variable lets you run innotop and fetch what data you can even +without the elevated privileges. +.Sp +I can no longer find or reproduce the situation where \s-1GLOBAL\s0 wasn't allowed, but +I know there was one. +.IP "graph_char" 4 +.IX Item "graph_char" +Defines the character to use when drawing graphs in \*(L"S: Variables & Status\*(R" +mode. +.IP "header_highlight" 4 +.IX Item "header_highlight" +Defines how to highlight column headers. This only works if Term::ANSIColor is +available. Valid values are 'bold' and 'underline'. +.IP "hide_hdr" 4 +.IX Item "hide_hdr" +Hides column headers globally. +.IP "interval" 4 +.IX Item "interval" +The interval at which innotop will refresh its data (ticks). The interval is +implemented as a sleep time between ticks, so the true interval will vary +depending on how long it takes innotop to fetch and render data. +.Sp +This variable accepts fractions of a second. +.IP "mode" 4 +.IX Item "mode" +The mode in which innotop should start. Allowable arguments are the same as the +key presses that select a mode interactively. See \*(L"\s-1MODES\s0\*(R". +.IP "num_digits" 4 +.IX Item "num_digits" +How many digits to show in fractional numbers and percents. This variable's +range is between 0 and 9 and can be set directly from \*(L"S: Variables & Status\*(R" +mode with the '+' and '\-' keys. It is used in the \*(L"set_precision\*(R", +\&\*(L"shorten\*(R", and \*(L"percent\*(R" transformations. +.IP "num_status_sets" 4 +.IX Item "num_status_sets" +Controls how many sets of status variables to display in pivoted \*(L"S: Variables +& Status\*(R" mode. It also controls the number of old sets of variables innotop +keeps in its memory, so the larger this variable is, the more memory innotop +uses. +.IP "plugin_dir" 4 +.IX Item "plugin_dir" +Specifies where plugins can be found. By default, innotop stores plugins in the +\&'plugins' subdirectory of your innotop configuration directory. +.IP "readonly" 4 +.IX Item "readonly" +Whether the configuration file is readonly. This cannot be set interactively. +.IP "show_cxn_errors" 4 +.IX Item "show_cxn_errors" +Makes innotop print connection errors to \s-1STDOUT\s0. See \*(L"\s-1ERROR\s0 \s-1HANDLING\s0\*(R". +.IP "show_cxn_errors_in_tbl" 4 +.IX Item "show_cxn_errors_in_tbl" +Makes innotop display connection errors as rows in the first table on screen. +See \*(L"\s-1ERROR\s0 \s-1HANDLING\s0\*(R". +.IP "show_percent" 4 +.IX Item "show_percent" +Adds a '%' character after the value returned by the \*(L"percent\*(R" +transformation. +.IP "show_statusbar" 4 +.IX Item "show_statusbar" +Controls whether to show the status bar in the display. See \*(L"\s-1INNOTOP\s0 +\&\s-1STATUS\s0\*(R". +.IP "skip_innodb" 4 +.IX Item "skip_innodb" +Disables fetching \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0, in case your server(s) do not have InnoDB +enabled and you don't want innotop to try to fetch it. This can also be useful +when you don't have the \s-1SUPER\s0 privilege, required to run \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. +.IP "status_inc" 4 +.IX Item "status_inc" +Whether to show absolute or incremental values for status variables. +Incremental values are calculated as an offset from the last value innotop saw +for that variable. This is a global setting, but will probably become +mode-specific at some point. Right now it is honored a bit inconsistently; some +modes don't pay attention to it. +.RE +.RS 4 +.RE +.IP "plugins" 4 +.IX Item "plugins" +This section holds a list of package names of active plugins. If the plugin +exists, innotop will activate it. See \*(L"\s-1PLUGINS\s0\*(R" for more information. +.IP "filters" 4 +.IX Item "filters" +This section holds user-defined filters (see \*(L"\s-1FILTERS\s0\*(R"). Each line is in the +format filter_name=text='filter text' tbls='table list'. +.Sp +The filter text is the text of the subroutine's code. The table list is a list +of tables to which the filter can apply. By default, user-defined filters apply +to the table for which they were created, but you can manually override that by +editing the definition in the configuration file. +.IP "active_filters" 4 +.IX Item "active_filters" +This section stores which filters are active on each table. Each line is in the +format table_name=filter_list. +.IP "tbl_meta" 4 +.IX Item "tbl_meta" +This section stores user-defined or user-customized columns (see \*(L"\s-1COLUMNS\s0\*(R"). +Each line is in the format col_name=properties, where the properties are a +name=quoted\-value list. +.IP "connections" 4 +.IX Item "connections" +This section holds the server connections you have defined. Each line is in +the format name=properties, where the properties are a name=value list. The +properties are self-explanatory, and the only one that is treated specially is +\&'pass' which is only present if 'savepass' is set. This section of the +configuration file will be skipped if any \s-1DSN\s0, username, or password +command-line options are used. See \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R". +.IP "active_connections" 4 +.IX Item "active_connections" +This section holds a list of which connections are active in each mode. Each +line is in the format mode_name=connection_list. +.IP "server_groups" 4 +.IX Item "server_groups" +This section holds server groups. Each line is in the format +name=connection_list. See \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R". +.IP "active_server_groups" 4 +.IX Item "active_server_groups" +This section holds a list of which server group is active in each mode. Each +line is in the format mode_name=server_group. +.IP "max_values_seen" 4 +.IX Item "max_values_seen" +This section holds the maximum values seen for variables. This is used to scale +the graphs in \*(L"S: Variables & Status\*(R" mode. Each line is in the format +name=value. +.IP "active_columns" 4 +.IX Item "active_columns" +This section holds table column lists. Each line is in the format +tbl_name=column_list. See \*(L"\s-1COLUMNS\s0\*(R". +.IP "sort_cols" 4 +.IX Item "sort_cols" +This section holds the sort definition. Each line is in the format +tbl_name=column_list. If a column is prefixed with '\-', that column sorts +descending. See \*(L"\s-1SORTING\s0\*(R". +.IP "visible_tables" 4 +.IX Item "visible_tables" +This section defines which tables are visible in each mode. Each line is in the +format mode_name=table_list. See \*(L"\s-1TABLES\s0\*(R". +.IP "varsets" 4 +.IX Item "varsets" +This section defines variable sets for use in \*(L"S: Status & Variables\*(R" mode. +Each line is in the format name=variable_list. See \*(L"\s-1VARIABLE\s0 \s-1SETS\s0\*(R". +.IP "colors" 4 +.IX Item "colors" +This section defines colorization rules. Each line is in the format +tbl_name=property_list. See \*(L"\s-1COLORS\s0\*(R". +.IP "stmt_sleep_times" 4 +.IX Item "stmt_sleep_times" +This section contains statement sleep times. Each line is in the format +statement_name=sleep_time. See \*(L"S: Statement Sleep Times\*(R". +.IP "group_by" 4 +.IX Item "group_by" +This section contains column lists for table group_by expressions. Each line is +in the format tbl_name=column_list. See \*(L"\s-1GROUPING\s0\*(R". +.SH "CUSTOMIZING" +.IX Header "CUSTOMIZING" +You can customize innotop a great deal. For example, you can: +.IP "\(bu" 4 +Choose which tables to display, and in what order. +.IP "\(bu" 4 +Choose which columns are in those tables, and create new columns. +.IP "\(bu" 4 +Filter which rows display with built-in filters, user-defined filters, and +quick-filters. +.IP "\(bu" 4 +Sort the rows to put important data first or group together related rows. +.IP "\(bu" 4 +Highlight rows with color. +.IP "\(bu" 4 +Customize the alignment, width, and formatting of columns, and apply +transformations to columns to extract parts of their values or format the values +as you wish (for example, shortening large numbers to familiar units). +.IP "\(bu" 4 +Design your own expressions to extract and combine data as you need. This gives +you unlimited flexibility. +.PP +All these and more are explained in the following sections. +.SS "\s-1TABLES\s0" +.IX Subsection "TABLES" +A table is what you'd expect: a collection of columns. It also has some other +properties, such as a caption. Filters, sorting rules, and colorization rules +belong to tables and are covered in later sections. +.PP +Internally, table meta-data is defined in a data structure called \f(CW%tbl_meta\fR. +This hash holds all built-in table definitions, which contain a lot of default +instructions to innotop. The meta-data includes the caption, a list of columns +the user has customized, a list of columns, a list of visible columns, a list of +filters, color rules, a sort-column list, sort direction, and some information +about the table's data sources. Most of this is customizable via the table +editor (see \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R"). +.PP +You can choose which tables to show by pressing the '$' key. See \*(L"\s-1MODES\s0\*(R" and +\&\*(L"\s-1TABLES\s0\*(R". +.PP +The table life-cycle is as follows: +.IP "\(bu" 4 +Each table begins with a data source, which is an array of hashes. See below +for details on data sources. +.IP "\(bu" 4 +Each element of the data source becomes a row in the final table. +.IP "\(bu" 4 +For each element in the data source, innotop extracts values from the source and +creates a row. This row is another hash, which later steps will refer to as +\&\f(CW$set\fR. The values innotop extracts are determined by the table's columns. Each +column has an extraction subroutine, compiled from an expression (see +\&\*(L"\s-1EXPRESSIONS\s0\*(R"). The resulting row is a hash whose keys are named the same as +the column name. +.IP "\(bu" 4 +innotop filters the rows, removing those that don't need to be displayed. See +\&\*(L"\s-1FILTERS\s0\*(R". +.IP "\(bu" 4 +innotop sorts the rows. See \*(L"\s-1SORTING\s0\*(R". +.IP "\(bu" 4 +innotop groups the rows together, if specified. See \*(L"\s-1GROUPING\s0\*(R". +.IP "\(bu" 4 +innotop colorizes the rows. See \*(L"\s-1COLORS\s0\*(R". +.IP "\(bu" 4 +innotop transforms the column values in each row. See \*(L"\s-1TRANSFORMATIONS\s0\*(R". +.IP "\(bu" 4 +innotop optionally pivots the rows (see \*(L"\s-1PIVOTING\s0\*(R"), then filters and sorts +them. +.IP "\(bu" 4 +innotop formats and justifies the rows as a table. During this step, innotop +applies further formatting to the column values, including alignment, maximum +and minimum widths. innotop also does final error checking to ensure there are +no crashes due to undefined values. innotop then adds a caption if specified, +and the table is ready to print. +.PP +The lifecycle is slightly different if the table is pivoted, as noted above. To +clarify, if the table is pivoted, the process is extract, group, transform, +pivot, filter, sort, create. If it's not pivoted, the process is extract, +filter, sort, group, color, transform, create. This slightly convoluted process +doesn't map all that well to \s-1SQL\s0, but pivoting complicates things pretty +thoroughly. Roughly speaking, filtering and sorting happen as late as needed to +effect the final result as you might expect, but as early as possible for +efficiency. +.PP +Each built-in table is described below: +.IP "adaptive_hash_index" 4 +.IX Item "adaptive_hash_index" +Displays data about InnoDB's adaptive hash index. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "buffer_pool" 4 +.IX Item "buffer_pool" +Displays data about InnoDB's buffer pool. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "cmd_summary" 4 +.IX Item "cmd_summary" +Displays weighted status variables. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "deadlock_locks" 4 +.IX Item "deadlock_locks" +Shows which locks were held and waited for by the last detected deadlock. Data +source: \*(L"\s-1DEADLOCK_LOCKS\s0\*(R". +.IP "deadlock_transactions" 4 +.IX Item "deadlock_transactions" +Shows transactions involved in the last detected deadlock. Data source: +\&\*(L"\s-1DEADLOCK_TRANSACTIONS\s0\*(R". +.IP "explain" 4 +.IX Item "explain" +Shows the output of \s-1EXPLAIN\s0. Data source: \*(L"\s-1EXPLAIN\s0\*(R". +.IP "file_io_misc" 4 +.IX Item "file_io_misc" +Displays data about InnoDB's file and I/O operations. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "fk_error" 4 +.IX Item "fk_error" +Displays various data about InnoDB's last foreign key error. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "innodb_locks" 4 +.IX Item "innodb_locks" +Displays InnoDB locks. Data source: \*(L"\s-1INNODB_LOCKS\s0\*(R". +.IP "innodb_transactions" 4 +.IX Item "innodb_transactions" +Displays data about InnoDB's current transactions. Data source: +\&\*(L"\s-1INNODB_TRANSACTIONS\s0\*(R". +.IP "insert_buffers" 4 +.IX Item "insert_buffers" +Displays data about InnoDB's insert buffer. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "io_threads" 4 +.IX Item "io_threads" +Displays data about InnoDB's I/O threads. Data source: \*(L"\s-1IO_THREADS\s0\*(R". +.IP "log_statistics" 4 +.IX Item "log_statistics" +Displays data about InnoDB's logging system. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "master_status" 4 +.IX Item "master_status" +Displays replication master status. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "open_tables" 4 +.IX Item "open_tables" +Displays open tables. Data source: \*(L"\s-1OPEN_TABLES\s0\*(R". +.IP "page_statistics" 4 +.IX Item "page_statistics" +Displays InnoDB page statistics. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "pending_io" 4 +.IX Item "pending_io" +Displays InnoDB pending I/O operations. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "processlist" 4 +.IX Item "processlist" +Displays current MySQL processes (threads/connections). Data source: +\&\*(L"\s-1PROCESSLIST\s0\*(R". +.IP "q_header" 4 +.IX Item "q_header" +Displays various status values. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "row_operation_misc" 4 +.IX Item "row_operation_misc" +Displays data about InnoDB's row operations. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "row_operations" 4 +.IX Item "row_operations" +Displays data about InnoDB's row operations. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "semaphores" 4 +.IX Item "semaphores" +Displays data about InnoDB's semaphores and mutexes. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "slave_io_status" 4 +.IX Item "slave_io_status" +Displays data about the slave I/O thread. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "slave_sql_status" 4 +.IX Item "slave_sql_status" +Displays data about the slave \s-1SQL\s0 thread. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "t_header" 4 +.IX Item "t_header" +Displays various InnoDB status values. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "var_status" 4 +.IX Item "var_status" +Displays user-configurable data. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "wait_array" 4 +.IX Item "wait_array" +Displays data about InnoDB's \s-1OS\s0 wait array. Data source: \*(L"\s-1OS_WAIT_ARRAY\s0\*(R". +.SS "\s-1COLUMNS\s0" +.IX Subsection "COLUMNS" +Columns belong to tables. You can choose a table's columns by pressing the '^' +key, which starts the \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R" and lets you choose and edit columns. +Pressing 'e' from within the table editor lets you edit the column's properties: +.IP "\(bu" 4 +hdr: a column header. This appears in the first row of the table. +.IP "\(bu" 4 +just: justification. '\-' means left-justified and '' means right-justified, +just as with printf formatting codes (not a coincidence). +.IP "\(bu" 4 +dec: whether to further align the column on the decimal point. +.IP "\(bu" 4 +num: whether the column is numeric. This affects how values are sorted +(lexically or numerically). +.IP "\(bu" 4 +label: a small note about the column, which appears in dialogs that help the +user choose columns. +.IP "\(bu" 4 +src: an expression that innotop uses to extract the column's data from its +source (see \*(L"\s-1DATA\s0 \s-1SOURCES\s0\*(R"). See \*(L"\s-1EXPRESSIONS\s0\*(R" for more on expressions. +.IP "\(bu" 4 +minw: specifies a minimum display width. This helps stabilize the display, +which makes it easier to read if the data is changing frequently. +.IP "\(bu" 4 +maxw: similar to minw. +.IP "\(bu" 4 +trans: a list of column transformations. See \*(L"\s-1TRANSFORMATIONS\s0\*(R". +.IP "\(bu" 4 +agg: an aggregate function. See \*(L"\s-1GROUPING\s0\*(R". The default is \*(L"first\*(R". +.IP "\(bu" 4 +aggonly: controls whether the column only shows when grouping is enabled on the +table (see \*(L"\s-1GROUPING\s0\*(R"). By default, this is disabled. This means columns +will always be shown by default, whether grouping is enabled or not. If a +column's aggonly is set true, the column will appear when you toggle grouping on +the table. Several columns are set this way, such as the count column on +\&\*(L"processlist\*(R" and \*(L"innodb_transactions\*(R", so you don't see a count when the +grouping isn't enabled, but you do when it is. +.SS "\s-1FILTERS\s0" +.IX Subsection "FILTERS" +Filters remove rows from the display. They behave much like a \s-1WHERE\s0 clause in +\&\s-1SQL\s0. innotop has several built-in filters, which remove irrelevant information +like inactive queries, but you can define your own as well. innotop also lets +you create quick-filters, which do not get saved to the configuration file, and +are just an easy way to quickly view only some rows. +.PP +You can enable or disable a filter on any table. Press the '%' key (mnemonic: % +looks kind of like a line being filtered between two circles) and choose which +table you want to filter, if asked. You'll then see a list of possible filters +and a list of filters currently enabled for that table. Type the names of +filters you want to apply and press Enter. +.PP +\fIUSER-DEFINED \s-1FILTERS\s0\fR +.IX Subsection "USER-DEFINED FILTERS" +.PP +If you type a name that doesn't exist, innotop will prompt you to create the +filter. Filters are easy to create if you know Perl, and not hard if you don't. +What you're doing is creating a subroutine that returns true if the row should +be displayed. The row is a hash reference passed to your subroutine as \f(CW$set\fR. +.PP +For example, imagine you want to filter the processlist table so you only see +queries that have been running more than five minutes. Type a new name for your +filter, and when prompted for the subroutine body, press \s-1TAB\s0 to initiate your +terminal's auto-completion. You'll see the names of the columns in the +\&\*(L"processlist\*(R" table (innotop generally tries to help you with auto-completion +lists). You want to filter on the 'time' column. Type the text \*(L"$set\->{time} > +300\*(R" to return true when the query is more than five minutes old. That's all +you need to do. +.PP +In other words, the code you're typing is surrounded by an implicit context, +which looks like this: +.PP +.Vb 4 +\& sub filter { +\& my ( $set ) = @_; +\& # YOUR CODE HERE +\& } +.Ve +.PP +If your filter doesn't work, or if something else suddenly behaves differently, +you might have made an error in your filter, and innotop is silently catching +the error. Try enabling \*(L"debug\*(R" to make innotop throw an error instead. +.PP +\fIQUICK-FILTERS\fR +.IX Subsection "QUICK-FILTERS" +.PP +innotop's quick-filters are a shortcut to create a temporary filter that doesn't +persist when you restart innotop. To create a quick-filter, press the '/' key. +innotop will prompt you for the column name and filter text. Again, you can use +auto-completion on column names. The filter text can be just the text you want +to \*(L"search for.\*(R" For example, to filter the \*(L"processlist\*(R" table on queries +that refer to the products table, type '/' and then 'info product'. +.PP +The filter text can actually be any Perl regular expression, but of course a +literal string like 'product' works fine as a regular expression. +.PP +Behind the scenes innotop compiles the quick-filter into a specially tagged +filter that is otherwise like any other filter. It just isn't saved to the +configuration file. +.PP +To clear quick-filters, press the '\e' key and innotop will clear them all at +once. +.SS "\s-1SORTING\s0" +.IX Subsection "SORTING" +innotop has sensible built-in defaults to sort the most important rows to the +top of the table. Like anything else in innotop, you can customize how any +table is sorted. +.PP +To start the sort dialog, start the \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R" with the '^' key, choose a +table if necessary, and press the 's' key. You'll see a list of columns you can +use in the sort expression and the current sort expression, if any. Enter a +list of columns by which you want to sort and press Enter. If you want to +reverse sort, prefix the column name with a minus sign. For example, if you +want to sort by column a ascending, then column b descending, type 'a \-b'. You +can also explicitly add a + in front of columns you want to sort ascending, but +it's not required. +.PP +Some modes have keys mapped to open this dialog directly, and to quickly reverse +sort direction. Press '?' as usual to see which keys are mapped in any mode. +.SS "\s-1GROUPING\s0" +.IX Subsection "GROUPING" +innotop can group, or aggregate, rows together (the terms are used +interchangeably). This is quite similar to an \s-1SQL\s0 \s-1GROUP\s0 \s-1BY\s0 clause. You can +specify to group on certain columns, or if you don't specify any, the entire set +of rows is treated as one group. This is quite like \s-1SQL\s0 so far, but unlike \s-1SQL\s0, +you can also select un-grouped columns. innotop actually aggregates every +column. If you don't explicitly specify a grouping function, the default is +\&'first'. This is basically a convenience so you don't have to specify an +aggregate function for every column you want in the result. +.PP +You can quickly toggle grouping on a table with the '=' key, which toggles its +aggregate property. This property doesn't persist to the config file. +.PP +The columns by which the table is grouped are specified in its group_by +property. When you turn grouping on, innotop places the group_by columns at the +far left of the table, even if they're not supposed to be visible. The rest of +the visible columns appear in order after them. +.PP +Two tables have default group_by lists and a count column built in: +\&\*(L"processlist\*(R" and \*(L"innodb_transactions\*(R". The grouping is by connection +and status, so you can quickly see how many queries or transactions are in a +given status on each server you're monitoring. The time columns are aggregated +as a sum; other columns are left at the default 'first' aggregation. +.PP +By default, the table shown in \*(L"S: Variables & Status\*(R" mode also uses +grouping so you can monitor variables and status across many servers. The +default aggregation function in this mode is 'avg'. +.PP +Valid grouping functions are defined in the \f(CW%agg_funcs\fR hash. They include +.IP "first" 4 +.IX Item "first" +Returns the first element in the group. +.IP "count" 4 +.IX Item "count" +Returns the number of elements in the group, including undefined elements, much +like \s-1SQL\s0's \s-1COUNT\s0(*). +.IP "avg" 4 +.IX Item "avg" +Returns the average of defined elements in the group. +.IP "sum" 4 +.IX Item "sum" +Returns the sum of elements in the group. +.PP +Here's an example of grouping at work. Suppose you have a very busy server with +hundreds of open connections, and you want to see how many connections are in +what status. Using the built-in grouping rules, you can press 'Q' to enter +\&\*(L"Q: Query List\*(R" mode. Press '=' to toggle grouping (if necessary, select the +\&\*(L"processlist\*(R" table when prompted). +.PP +Your display might now look like the following: +.PP +.Vb 1 +\& Query List (? for help) localhost, 32:33, 0.11 QPS, 1 thd, 5.0.38\-log +\& +\& CXN Cmd Cnt ID User Host Time Query +\& localhost Query 49 12933 webusr localhost 19:38 SELECT * FROM +\& localhost Sending Da 23 2383 webusr localhost 12:43 SELECT col1, +\& localhost Sleep 120 140 webusr localhost 5:18:12 +\& localhost Statistics 12 19213 webusr localhost 01:19 SELECT * FROM +.Ve +.PP +That's actually quite a worrisome picture. You've got a lot of idle connections +(Sleep), and some connections executing queries (Query and Sending Data). +That's okay, but you also have a lot in Statistics status, collectively spending +over a minute. That means the query optimizer is having a really hard time +optimizing your statements. Something is wrong; it should normally take +milliseconds to optimize queries. You might not have seen this pattern if you +didn't look at your connections in aggregate. (This is a made-up example, but +it can happen in real life). +.SS "\s-1PIVOTING\s0" +.IX Subsection "PIVOTING" +innotop can pivot a table for more compact display, similar to a Pivot Table in +a spreadsheet (also known as a crosstab). Pivoting a table makes columns into +rows. Assume you start with this table: +.PP +.Vb 4 +\& foo bar +\& === === +\& 1 3 +\& 2 4 +.Ve +.PP +After pivoting, the table will look like this: +.PP +.Vb 4 +\& name set0 set1 +\& ==== ==== ==== +\& foo 1 2 +\& bar 3 4 +.Ve +.PP +To get reasonable results, you might need to group as well as pivoting. +innotop currently does this for \*(L"S: Variables & Status\*(R" mode. +.SS "\s-1COLORS\s0" +.IX Subsection "COLORS" +By default, innotop highlights rows with color so you can see at a glance which +rows are more important. You can customize the colorization rules and add your +own to any table. Open the table editor with the '^' key, choose a table if +needed, and press 'o' to open the color editor dialog. +.PP +The color editor dialog displays the rules applied to the table, in the order +they are evaluated. Each row is evaluated against each rule to see if the rule +matches the row; if it does, the row gets the specified color, and no further +rules are evaluated. The rules look like the following: +.PP +.Vb 9 +\& state eq Locked black on_red +\& cmd eq Sleep white +\& user eq system user white +\& cmd eq Connect white +\& cmd eq Binlog Dump white +\& time > 600 red +\& time > 120 yellow +\& time > 60 green +\& time > 30 cyan +.Ve +.PP +This is the default rule set for the \*(L"processlist\*(R" table. In order of +priority, these rules make locked queries black on a red background, \*(L"gray out\*(R" +connections from replication and sleeping queries, and make queries turn from +cyan to red as they run longer. +.PP +(For some reason, the \s-1ANSI\s0 color code \*(L"white\*(R" is actually a light gray. Your +terminal's display may vary; experiment to find colors you like). +.PP +You can use keystrokes to move the rules up and down, which re-orders their +priority. You can also delete rules and add new ones. If you add a new rule, +innotop prompts you for the column, an operator for the comparison, a value +against which to compare the column, and a color to assign if the rule matches. +There is auto-completion and prompting at each step. +.PP +The value in the third step needs to be correctly quoted. innotop does not try +to quote the value because it doesn't know whether it should treat the value as +a string or a number. If you want to compare the column against a string, as +for example in the first rule above, you should enter 'Locked' surrounded by +quotes. If you get an error message about a bareword, you probably should have +quoted something. +.SS "\s-1EXPRESSIONS\s0" +.IX Subsection "EXPRESSIONS" +Expressions are at the core of how innotop works, and are what enables you to +extend innotop as you wish. Recall the table lifecycle explained in +\&\*(L"\s-1TABLES\s0\*(R". Expressions are used in the earliest step, where it extracts +values from a data source to form rows. +.PP +It does this by calling a subroutine for each column, passing it the source data +set, a set of current values, and a set of previous values. These are all +needed so the subroutine can calculate things like the difference between this +tick and the previous tick. +.PP +The subroutines that extract the data from the set are compiled from +expressions. This gives significantly more power than just naming the values to +fill the columns, because it allows the column's value to be calculated from +whatever data is necessary, but avoids the need to write complicated and lengthy +Perl code. +.PP +innotop begins with a string of text that can look as simple as a value's name +or as complicated as a full-fledged Perl expression. It looks at each +\&'bareword' token in the string and decides whether it's supposed to be a key +into the \f(CW$set\fR hash. A bareword is an unquoted value that isn't already +surrounded by code-ish things like dollar signs or curly brackets. If innotop +decides that the bareword isn't a function or other valid Perl code, it converts +it into a hash access. After the whole string is processed, innotop compiles a +subroutine, like this: +.PP +.Vb 5 +\& sub compute_column_value { +\& my ( $set, $cur, $pre ) = @_; +\& my $val = # EXPANDED STRING GOES HERE +\& return $val; +\& } +.Ve +.PP +Here's a concrete example, taken from the header table \*(L"q_header\*(R" in \*(L"Q: +Query List\*(R" mode. This expression calculates the qps, or Queries Per Second, +column's values, from the values returned by \s-1SHOW\s0 \s-1STATUS:\s0 +.PP +.Vb 1 +\& Questions/Uptime_hires +.Ve +.PP +innotop decides both words are barewords, and transforms this expression into +the following Perl code: +.PP +.Vb 1 +\& $set\->{Questions}/$set\->{Uptime_hires} +.Ve +.PP +When surrounded by the rest of the subroutine's code, this is executable Perl +that calculates a high-resolution queries-per-second value. +.PP +The arguments to the subroutine are named \f(CW$set\fR, \f(CW$cur\fR, and \f(CW$pre\fR. In most cases, +\&\f(CW$set\fR and \f(CW$cur\fR will be the same values. However, if \*(L"status_inc\*(R" is set, \f(CW$cur\fR +will not be the same as \f(CW$set\fR, because \f(CW$set\fR will already contain values that are +the incremental difference between \f(CW$cur\fR and \f(CW$pre\fR. +.PP +Every column in innotop is computed by subroutines compiled in the same fashion. +There is no difference between innotop's built-in columns and user-defined +columns. This keeps things consistent and predictable. +.SS "\s-1TRANSFORMATIONS\s0" +.IX Subsection "TRANSFORMATIONS" +Transformations change how a value is rendered. For example, they can take a +number of seconds and display it in H:M:S format. The following transformations +are defined: +.IP "commify" 4 +.IX Item "commify" +Adds commas to large numbers every three decimal places. +.IP "dulint_to_int" 4 +.IX Item "dulint_to_int" +Accepts two unsigned integers and converts them into a single longlong. This is +useful for certain operations with InnoDB, which uses two integers as +transaction identifiers, for example. +.IP "no_ctrl_char" 4 +.IX Item "no_ctrl_char" +Removes quoted control characters from the value. This is affected by the +\&\*(L"charset\*(R" configuration variable. +.Sp +This transformation only operates within quoted strings, for example, values to +a \s-1SET\s0 clause in an \s-1UPDATE\s0 statement. It will not alter the \s-1UPDATE\s0 statement, +but will collapse the quoted string to [\s-1BINARY\s0] or [\s-1TEXT\s0], depending on the +charset. +.IP "percent" 4 +.IX Item "percent" +Converts a number to a percentage by multiplying it by two, formatting it with +\&\*(L"num_digits\*(R" digits after the decimal point, and optionally adding a percent +sign (see \*(L"show_percent\*(R"). +.IP "secs_to_time" 4 +.IX Item "secs_to_time" +Formats a number of seconds as time in days+hours:minutes:seconds format. +.IP "set_precision" 4 +.IX Item "set_precision" +Formats numbers with \*(L"num_digits\*(R" number of digits after the decimal point. +.IP "shorten" 4 +.IX Item "shorten" +Formats a number as a unit of 1024 (k/M/G/T) and with \*(L"num_digits\*(R" number of +digits after the decimal point. +.SS "\s-1TABLE\s0 \s-1EDITOR\s0" +.IX Subsection "TABLE EDITOR" +The innotop table editor lets you customize tables with keystrokes. You start +the table editor with the '^' key. If there's more than one table on the +screen, it will prompt you to choose one of them. Once you do, innotop will +show you something like this: +.PP +.Vb 1 +\& Editing table definition for Buffer Pool. Press ? for help, q to quit. +\& +\& name hdr label src +\& cxn CXN Connection from which cxn +\& buf_pool_size Size Buffer pool size IB_bp_buf_poo +\& buf_free Free Bufs Buffers free in the b IB_bp_buf_fre +\& pages_total Pages Pages total IB_bp_pages_t +\& pages_modified Dirty Pages Pages modified (dirty IB_bp_pages_m +\& buf_pool_hit_rate Hit Rate Buffer pool hit rate IB_bp_buf_poo +\& total_mem_alloc Memory Total memory allocate IB_bp_total_m +\& add_pool_alloc Add\*(Aql Pool Additonal pool alloca IB_bp_add_poo +.Ve +.PP +The first line shows which table you're editing, and reminds you again to press +\&'?' for a list of key mappings. The rest is a tabular representation of the +table's columns, because that's likely what you're trying to edit. However, you +can edit more than just the table's columns; this screen can start the filter +editor, color rule editor, and more. +.PP +Each row in the display shows a single column in the table you're editing, along +with a couple of its properties such as its header and source expression (see +\&\*(L"\s-1EXPRESSIONS\s0\*(R"). +.PP +The key mappings are Vim-style, as in many other places. Pressing 'j' and 'k' +moves the highlight up or down. You can then (d)elete or (e)dit the highlighted +column. You can also (a)dd a column to the table. This actually just activates +one of the columns already defined for the table; it prompts you to choose from +among the columns available but not currently displayed. Finally, you can +re-order the columns with the '+' and '\-' keys. +.PP +You can do more than just edit the columns with the table editor, you can also +edit other properties, such as the table's sort expression and group-by +expression. Press '?' to see the full list, of course. +.PP +If you want to really customize and create your own column, as opposed to just +activating a built-in one that's not currently displayed, press the (n)ew key, +and innotop will prompt you for the information it needs: +.IP "\(bu" 4 +The column name: this needs to be a word without any funny characters, e.g. just +letters, numbers and underscores. +.IP "\(bu" 4 +The column header: this is the label that appears at the top of the column, in +the table header. This can have spaces and funny characters, but be careful not +to make it too wide and waste space on-screen. +.IP "\(bu" 4 +The column's data source: this is an expression that determines what data from +the source (see \*(L"\s-1TABLES\s0\*(R") innotop will put into the column. This can just be +the name of an item in the source, or it can be a more complex expression, as +described in \*(L"\s-1EXPRESSIONS\s0\*(R". +.PP +Once you've entered the required data, your table has a new column. There is no +difference between this column and the built-in ones; it can have all the same +properties and behaviors. innotop will write the column's definition to the +configuration file, so it will persist across sessions. +.PP +Here's an example: suppose you want to track how many times your slaves have +retried transactions. According to the MySQL manual, the +Slave_retried_transactions status variable gives you that data: \*(L"The total +number of times since startup that the replication slave \s-1SQL\s0 thread has retried +transactions. This variable was added in version 5.0.4.\*(R" This is appropriate to +add to the \*(L"slave_sql_status\*(R" table. +.PP +To add the column, switch to the replication-monitoring mode with the 'M' key, +and press the '^' key to start the table editor. When prompted, choose +slave_sql_status as the table, then press 'n' to create the column. Type +\&'retries' as the column name, 'Retries' as the column header, and +\&'Slave_retried_transactions' as the source. Now the column is created, and you +see the table editor screen again. Press 'q' to exit the table editor, and +you'll see your column at the end of the table. +.SH "VARIABLE SETS" +.IX Header "VARIABLE SETS" +Variable sets are used in \*(L"S: Variables & Status\*(R" mode to define more easily +what variables you want to monitor. Behind the scenes they are compiled to a +list of expressions, and then into a column list so they can be treated just +like columns in any other table, in terms of data extraction and +transformations. However, you're protected from the tedious details by a syntax +that ought to feel very natural to you: a \s-1SQL\s0 \s-1SELECT\s0 list. +.PP +The data source for variable sets, and indeed the entire S mode, is the +combination of \s-1SHOW\s0 \s-1STATUS\s0, \s-1SHOW\s0 \s-1VARIABLES\s0, and \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. Imagine +that you had a huge table with one column per variable returned from those +statements. That's the data source for variable sets. You can now query this +data source just like you'd expect. For example: +.PP +.Vb 1 +\& Questions, Uptime, Questions/Uptime as QPS +.Ve +.PP +Behind the scenes innotop will split that variable set into three expressions, +compile them and turn them into a table definition, then extract as usual. This +becomes a \*(L"variable set,\*(R" or a \*(L"list of variables you want to monitor.\*(R" +.PP +innotop lets you name and save your variable sets, and writes them to the +configuration file. You can choose which variable set you want to see with the +\&'c' key, or activate the next and previous sets with the '>' and '<' keys. +There are many built-in variable sets as well, which should give you a good +start for creating your own. Press 'e' to edit the current variable set, or +just to see how it's defined. To create a new one, just press 'c' and type its +name. +.PP +You may want to use some of the functions listed in \*(L"\s-1TRANSFORMATIONS\s0\*(R" to help +format the results. In particular, \*(L"set_precision\*(R" is often useful to limit +the number of digits you see. Extending the above example, here's how: +.PP +.Vb 1 +\& Questions, Uptime, set_precision(Questions/Uptime) as QPS +.Ve +.PP +Actually, this still needs a little more work. If your \*(L"interval\*(R" is less +than one second, you might be dividing by zero because Uptime is incremental in +this mode by default. Instead, use Uptime_hires: +.PP +.Vb 1 +\& Questions, Uptime, set_precision(Questions/Uptime_hires) as QPS +.Ve +.PP +This example is simple, but it shows how easy it is to choose which variables +you want to monitor. +.SH "PLUGINS" +.IX Header "PLUGINS" +innotop has a simple but powerful plugin mechanism by which you can extend +or modify its existing functionality, and add new functionality. innotop's +plugin functionality is event-based: plugins register themselves to be called +when events happen. They then have a chance to influence the event. +.PP +An innotop plugin is a Perl module placed in innotop's \*(L"plugin_dir\*(R" +directory. On \s-1UNIX\s0 systems, you can place a symbolic link to the module instead +of putting the actual file there. innotop automatically discovers the file. If +there is a corresponding entry in the \*(L"plugins\*(R" configuration file section, +innotop loads and activates the plugin. +.PP +The module must conform to innotop's plugin interface. Additionally, the source +code of the module must be written in such a way that innotop can inspect the +file and determine the package name and description. +.SS "Package Source Convention" +.IX Subsection "Package Source Convention" +innotop inspects the plugin module's source to determine the Perl package name. +It looks for a line of the form \*(L"package Foo;\*(R" and if found, considers the +plugin's package name to be Foo. Of course the package name can be a valid Perl +package name, with double semicolons and so on. +.PP +It also looks for a description in the source code, to make the plugin editor +more human-friendly. The description is a comment line of the form \*(L"# +description: Foo\*(R", where \*(L"Foo\*(R" is the text innotop will consider to be the +plugin's description. +.SS "Plugin Interface" +.IX Subsection "Plugin Interface" +The innotop plugin interface is quite simple: innotop expects the plugin to be +an object-oriented module it can call certain methods on. The methods are +.IP "new(%variables)" 4 +.IX Item "new(%variables)" +This is the plugin's constructor. It is passed a hash of innotop's variables, +which it can manipulate (see \*(L"Plugin Variables\*(R"). It must return a reference +to the newly created plugin object. +.Sp +At construction time, innotop has only loaded the general configuration and +created the default built-in variables with their default contents (which is +quite a lot). Therefore, the state of the program is exactly as in the innotop +source code, plus the configuration variables from the \*(L"general\*(R" section in +the config file. +.Sp +If your plugin manipulates the variables, it is changing global data, which is +shared by innotop and all plugins. Plugins are loaded in the order they're +listed in the config file. Your plugin may load before or after another plugin, +so there is a potential for conflict or interaction between plugins if they +modify data other plugins use or modify. +.IP "\fIregister_for_events()\fR" 4 +.IX Item "register_for_events()" +This method must return a list of events in which the plugin is interested, if +any. See \*(L"Plugin Events\*(R" for the defined events. If the plugin returns an +event that's not defined, the event is ignored. +.IP "event handlers" 4 +.IX Item "event handlers" +The plugin must implement a method named the same as each event for which it has +registered. In other words, if the plugin returns qw(foo bar) from +\&\fIregister_for_events()\fR, it must have \fIfoo()\fR and \fIbar()\fR methods. These methods are +callbacks for the events. See \*(L"Plugin Events\*(R" for more details about each +event. +.SS "Plugin Variables" +.IX Subsection "Plugin Variables" +The plugin's constructor is passed a hash of innotop's variables, which it can +manipulate. It is probably a good idea if the plugin object saves a copy of it +for later use. The variables are defined in the innotop variable +\&\f(CW%pluggable_vars\fR, and are as follows: +.IP "action_for" 4 +.IX Item "action_for" +A hashref of key mappings. These are innotop's global hot-keys. +.IP "agg_funcs" 4 +.IX Item "agg_funcs" +A hashref of functions that can be used for grouping. See \*(L"\s-1GROUPING\s0\*(R". +.IP "config" 4 +.IX Item "config" +The global configuration hash. +.IP "connections" 4 +.IX Item "connections" +A hashref of connection specifications. These are just specifications of how to +connect to a server. +.IP "dbhs" 4 +.IX Item "dbhs" +A hashref of innotop's database connections. These are actual \s-1DBI\s0 connection +objects. +.IP "filters" 4 +.IX Item "filters" +A hashref of filters applied to table rows. See \*(L"\s-1FILTERS\s0\*(R" for more. +.IP "modes" 4 +.IX Item "modes" +A hashref of modes. See \*(L"\s-1MODES\s0\*(R" for more. +.IP "server_groups" 4 +.IX Item "server_groups" +A hashref of server groups. See \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R". +.IP "tbl_meta" 4 +.IX Item "tbl_meta" +A hashref of innotop's table meta-data, with one entry per table (see +\&\*(L"\s-1TABLES\s0\*(R" for more information). +.IP "trans_funcs" 4 +.IX Item "trans_funcs" +A hashref of transformation functions. See \*(L"\s-1TRANSFORMATIONS\s0\*(R". +.IP "var_sets" 4 +.IX Item "var_sets" +A hashref of variable sets. See \*(L"\s-1VARIABLE\s0 \s-1SETS\s0\*(R". +.SS "Plugin Events" +.IX Subsection "Plugin Events" +Each event is defined somewhere in the innotop source code. When innotop runs +that code, it executes the callback function for each plugin that expressed its +interest in the event. innotop passes some data for each event. The events are +defined in the \f(CW%event_listener_for\fR variable, and are as follows: +.ie n .IP "extract_values($set, $cur, $pre, $tbl)" 4 +.el .IP "extract_values($set, \f(CW$cur\fR, \f(CW$pre\fR, \f(CW$tbl\fR)" 4 +.IX Item "extract_values($set, $cur, $pre, $tbl)" +This event occurs inside the function that extracts values from a data source. +The arguments are the set of values, the current values, the previous values, +and the table name. +.IP "set_to_tbl" 4 +.IX Item "set_to_tbl" +Events are defined at many places in this subroutine, which is responsible for +turning an arrayref of hashrefs into an arrayref of lines that can be printed to +the screen. The events all pass the same data: an arrayref of rows and the name +of the table being created. The events are set_to_tbl_pre_filter, +set_to_tbl_pre_sort,set_to_tbl_pre_group, set_to_tbl_pre_colorize, +set_to_tbl_pre_transform, set_to_tbl_pre_pivot, set_to_tbl_pre_create, +set_to_tbl_post_create. +.IP "draw_screen($lines)" 4 +.IX Item "draw_screen($lines)" +This event occurs inside the subroutine that prints the lines to the screen. +\&\f(CW$lines\fR is an arrayref of strings. +.SS "Simple Plugin Example" +.IX Subsection "Simple Plugin Example" +The easiest way to explain the plugin functionality is probably with a simple +example. The following module adds a column to the beginning of every table and +sets its value to 1. +.PP +.Vb 2 +\& use strict; +\& use warnings FATAL => \*(Aqall\*(Aq; +\& +\& package Innotop::Plugin::Example; +\& # description: Adds an \*(Aqexample\*(Aq column to every table +\& +\& sub new { +\& my ( $class, %vars ) = @_; +\& # Store reference to innotop\*(Aqs variables in $self +\& my $self = bless { %vars }, $class; +\& +\& # Design the example column +\& my $col = { +\& hdr => \*(AqExample\*(Aq, +\& just => \*(Aq\*(Aq, +\& dec => 0, +\& num => 1, +\& label => \*(AqExample\*(Aq, +\& src => \*(Aqexample\*(Aq, # Get data from this column in the data source +\& tbl => \*(Aq\*(Aq, +\& trans => [], +\& }; +\& +\& # Add the column to every table. +\& my $tbl_meta = $vars{tbl_meta}; +\& foreach my $tbl ( values %$tbl_meta ) { +\& # Add the column to the list of defined columns +\& $tbl\->{cols}\->{example} = $col; +\& # Add the column to the list of visible columns +\& unshift @{$tbl\->{visible}}, \*(Aqexample\*(Aq; +\& } +\& +\& # Be sure to return a reference to the object. +\& return $self; +\& } +\& +\& # I\*(Aqd like to be called when a data set is being rendered into a table, please. +\& sub register_for_events { +\& my ( $self ) = @_; +\& return qw(set_to_tbl_pre_filter); +\& } +\& +\& # This method will be called when the event fires. +\& sub set_to_tbl_pre_filter { +\& my ( $self, $rows, $tbl ) = @_; +\& # Set the example column\*(Aqs data source to the value 1. +\& foreach my $row ( @$rows ) { +\& $row\->{example} = 1; +\& } +\& } +\& +\& 1; +.Ve +.SS "Plugin Editor" +.IX Subsection "Plugin Editor" +The plugin editor lets you view the plugins innotop discovered and activate or +deactivate them. Start the editor by pressing $ to start the configuration +editor from any mode. Press the 'p' key to start the plugin editor. You'll see +a list of plugins innotop discovered. You can use the 'j' and 'k' keys to move +the highlight to the desired one, then press the * key to toggle it active or +inactive. Exit the editor and restart innotop for the changes to take effect. +.SH "SQL STATEMENTS" +.IX Header "SQL STATEMENTS" +innotop uses a limited set of \s-1SQL\s0 statements to retrieve data from MySQL for +display. The statements are customized depending on the server version against +which they are executed; for example, on MySQL 5 and newer, \s-1INNODB_STATUS\s0 +executes \*(L"\s-1SHOW\s0 \s-1ENGINE\s0 \s-1INNODB\s0 \s-1STATUS\s0\*(R", while on earlier versions it executes +\&\*(L"\s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0\*(R". The statements are as follows: +.PP +.Vb 12 +\& Statement SQL executed +\& =================== =============================== +\& INNODB_STATUS SHOW [ENGINE] INNODB STATUS +\& KILL_CONNECTION KILL +\& KILL_QUERY KILL QUERY +\& OPEN_TABLES SHOW OPEN TABLES +\& PROCESSLIST SHOW FULL PROCESSLIST +\& SHOW_MASTER_LOGS SHOW MASTER LOGS +\& SHOW_MASTER_STATUS SHOW MASTER STATUS +\& SHOW_SLAVE_STATUS SHOW SLAVE STATUS +\& SHOW_STATUS SHOW [GLOBAL] STATUS +\& SHOW_VARIABLES SHOW [GLOBAL] VARIABLES +.Ve +.SH "DATA SOURCES" +.IX Header "DATA SOURCES" +Each time innotop extracts values to create a table (see \*(L"\s-1EXPRESSIONS\s0\*(R" and +\&\*(L"\s-1TABLES\s0\*(R"), it does so from a particular data source. Largely because of the +complex data extracted from \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0, this is slightly messy. \s-1SHOW\s0 +\&\s-1INNODB\s0 \s-1STATUS\s0 contains a mixture of single values and repeated values that form +nested data sets. +.PP +Whenever innotop fetches data from MySQL, it adds two extra bits to each set: +cxn and Uptime_hires. cxn is the name of the connection from which the data +came. Uptime_hires is a high-resolution version of the server's Uptime status +variable, which is important if your \*(L"interval\*(R" setting is sub-second. +.PP +Here are the kinds of data sources from which data is extracted: +.IP "\s-1STATUS_VARIABLES\s0" 4 +.IX Item "STATUS_VARIABLES" +This is the broadest category, into which the most kinds of data fall. It +begins with the combination of \s-1SHOW\s0 \s-1STATUS\s0 and \s-1SHOW\s0 \s-1VARIABLES\s0, but other sources +may be included as needed, for example, \s-1SHOW\s0 \s-1MASTER\s0 \s-1STATUS\s0 and \s-1SHOW\s0 \s-1SLAVE\s0 +\&\s-1STATUS\s0, as well as many of the non-repeated values from \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. +.IP "\s-1DEADLOCK_LOCKS\s0" 4 +.IX Item "DEADLOCK_LOCKS" +This data is extracted from the transaction list in the \s-1LATEST\s0 \s-1DETECTED\s0 \s-1DEADLOCK\s0 +section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. It is nested two levels deep: transactions, then +locks. +.IP "\s-1DEADLOCK_TRANSACTIONS\s0" 4 +.IX Item "DEADLOCK_TRANSACTIONS" +This data is from the transaction list in the \s-1LATEST\s0 \s-1DETECTED\s0 \s-1DEADLOCK\s0 +section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. It is nested one level deep. +.IP "\s-1EXPLAIN\s0" 4 +.IX Item "EXPLAIN" +This data is from the result set returned by \s-1EXPLAIN\s0. +.IP "\s-1INNODB_TRANSACTIONS\s0" 4 +.IX Item "INNODB_TRANSACTIONS" +This data is from the \s-1TRANSACTIONS\s0 section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. +.IP "\s-1IO_THREADS\s0" 4 +.IX Item "IO_THREADS" +This data is from the list of threads in the the \s-1FILE\s0 I/O section of \s-1SHOW\s0 \s-1INNODB\s0 +\&\s-1STATUS\s0. +.IP "\s-1INNODB_LOCKS\s0" 4 +.IX Item "INNODB_LOCKS" +This data is from the \s-1TRANSACTIONS\s0 section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 and is nested +two levels deep. +.IP "\s-1OPEN_TABLES\s0" 4 +.IX Item "OPEN_TABLES" +This data is from \s-1SHOW\s0 \s-1OPEN\s0 \s-1TABLES\s0. +.IP "\s-1PROCESSLIST\s0" 4 +.IX Item "PROCESSLIST" +This data is from \s-1SHOW\s0 \s-1FULL\s0 \s-1PROCESSLIST\s0. +.IP "\s-1OS_WAIT_ARRAY\s0" 4 +.IX Item "OS_WAIT_ARRAY" +This data is from the \s-1SEMAPHORES\s0 section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 and is nested one +level deep. It comes from the lines that look like this: +.Sp +.Vb 1 +\& \-\-Thread 1568861104 has waited at btr0cur.c line 424 .... +.Ve +.SH "MYSQL PRIVILEGES" +.IX Header "MYSQL PRIVILEGES" +.IP "\(bu" 4 +You must connect to MySQL as a user who has the \s-1SUPER\s0 privilege for many of the +functions. +.IP "\(bu" 4 +If you don't have the \s-1SUPER\s0 privilege, you can still run some functions, but you +won't necessarily see all the same data. +.IP "\(bu" 4 +You need the \s-1PROCESS\s0 privilege to see the list of currently running queries in Q +mode. +.IP "\(bu" 4 +You need special privileges to start and stop slave servers. +.IP "\(bu" 4 +You need appropriate privileges to create and drop the deadlock tables if needed +(see \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R"). +.SH "SYSTEM REQUIREMENTS" +.IX Header "SYSTEM REQUIREMENTS" +You need Perl to run innotop, of course. You also need a few Perl modules: \s-1DBI\s0, +DBD::mysql, Term::ReadKey, and Time::HiRes. These should be included with most +Perl distributions, but in case they are not, I recommend using versions +distributed with your operating system or Perl distribution, not from \s-1CPAN\s0. +Term::ReadKey in particular has been known to cause problems if installed from +\&\s-1CPAN\s0. +.PP +If you have Term::ANSIColor, innotop will use it to format headers more readably +and compactly. (Under Microsoft Windows, you also need Win32::Console::ANSI for +terminal formatting codes to be honored). If you install Term::ReadLine, +preferably Term::ReadLine::Gnu, you'll get nice auto-completion support. +.PP +I run innotop on Gentoo GNU/Linux, Debian and Ubuntu, and I've had feedback from +people successfully running it on Red Hat, CentOS, Solaris, and Mac \s-1OSX\s0. I +don't see any reason why it won't work on other UNIX-ish operating systems, but +I don't know for sure. It also runs on Windows under ActivePerl without +problem. +.PP +innotop has been used on MySQL versions 3.23.58, 4.0.27, 4.1.0, 4.1.22, 5.0.26, +5.1.15, and 5.2.3. If it doesn't run correctly for you, that is a bug that +should be reported. +.SH "FILES" +.IX Header "FILES" +\&\f(CW$HOMEDIR\fR/.innotop and/or /etc/innotop are used to store +configuration information. Files include the configuration file innotop.conf, +the core_dump file which contains verbose error messages if \*(L"debug\*(R" is +enabled, and the plugins/ subdirectory. +.SH "GLOSSARY OF TERMS" +.IX Header "GLOSSARY OF TERMS" +.IP "tick" 4 +.IX Item "tick" +A tick is a refresh event, when innotop re-fetches data from connections and +displays it. +.SH "ACKNOWLEDGEMENTS" +.IX Header "ACKNOWLEDGEMENTS" +The following people and organizations are acknowledged for various reasons. +Hopefully no one has been forgotten. +.PP +Allen K. Smith, +Aurimas Mikalauskas, +Bartosz Fenski, +Brian Miezejewski, +Christian Hammers, +Cyril Scetbon, +Dane Miller, +David Multer, +Dr. Frank Ullrich, +Giuseppe Maxia, +Google.com Site Reliability Engineers, +Google Code, +Jan Pieter Kunst, +Jari Aalto, +Jay Pipes, +Jeremy Zawodny, +Johan Idren, +Kristian Kohntopp, +Lenz Grimmer, +Maciej Dobrzanski, +Michiel Betel, +MySQL \s-1AB\s0, +Paul McCullagh, +Sebastien Estienne, +Sourceforge.net, +Steven Kreuzer, +The Gentoo MySQL Team, +Trevor Price, +Yaar Schnitman, +and probably more people that have not been included. +.PP +(If your name has been misspelled, it's probably out of fear of putting +international characters into this documentation; earlier versions of Perl might +not be able to compile it then). +.SH "COPYRIGHT, LICENSE AND WARRANTY" +.IX Header "COPYRIGHT, LICENSE AND WARRANTY" +This program is copyright (c) 2006 Baron Schwartz. +Feedback and improvements are welcome. +.PP +\&\s-1THIS\s0 \s-1PROGRAM\s0 \s-1IS\s0 \s-1PROVIDED\s0 \*(L"\s-1AS\s0 \s-1IS\s0\*(R" \s-1AND\s0 \s-1WITHOUT\s0 \s-1ANY\s0 \s-1EXPRESS\s0 \s-1OR\s0 \s-1IMPLIED\s0 +\&\s-1WARRANTIES\s0, \s-1INCLUDING\s0, \s-1WITHOUT\s0 \s-1LIMITATION\s0, \s-1THE\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0 \s-1OF\s0 +\&\s-1MERCHANTIBILITY\s0 \s-1AND\s0 \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. +.PP +This program is free software; you can redistribute it and/or modify it under +the terms of the \s-1GNU\s0 General Public License as published by the Free Software +Foundation, version 2; \s-1OR\s0 the Perl Artistic License. On \s-1UNIX\s0 and similar +systems, you can issue `man perlgpl' or `man perlartistic' to read these +licenses. +.PP +You should have received a copy of the \s-1GNU\s0 General Public License along with +this program; if not, write to the Free Software Foundation, Inc., 59 Temple +Place, Suite 330, Boston, \s-1MA\s0 02111\-1307 \s-1USA\s0. +.PP +Execute innotop and press '!' to see this information at any time. +.SH "AUTHOR" +.IX Header "AUTHOR" +Originally written by Baron Schwartz; currently maintained by Aaron Racine. +.SH "BUGS" +.IX Header "BUGS" +You can report bugs, ask for improvements, and get other help and support at +. There are mailing lists, a source code +browser, a bug tracker, etc. Please use these instead of contacting the +maintainer or author directly, as it makes our job easier and benefits others if the +discussions are permanent and public. Of course, if you need to contact us in +private, please do. diff --git a/debian/additions/msql2mysql.1 b/debian/additions/msql2mysql.1 new file mode 100644 index 000000000000..8fe05e7415dc --- /dev/null +++ b/debian/additions/msql2mysql.1 @@ -0,0 +1,16 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +msql2mysql \- MySQL importer for msql style data. +.SH SYNOPSIS +msql2mysql [options] +.SH DESCRIPTION +This program imports old msql database files. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/my.cnf b/debian/additions/my.cnf new file mode 100644 index 000000000000..4df5bd081191 --- /dev/null +++ b/debian/additions/my.cnf @@ -0,0 +1,127 @@ +# +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 + +[mysqld] +# +# * Basic Settings +# +user = mysql +pid-file = /var/run/mysqld/mysqld.pid +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +tmpdir = /tmp +lc-messages-dir = /usr/share/mysql +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +bind-address = 127.0.0.1 +# +# * Fine Tuning +# +key_buffer = 16M +max_allowed_packet = 16M +thread_stack = 192K +thread_cache_size = 8 +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched +myisam-recover = BACKUP +#max_connections = 100 +#table_cache = 64 +#thread_concurrency = 10 +# +# * Query Cache Configuration +# +query_cache_limit = 1M +query_cache_size = 16M +# +# * Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 +# +# Error log - should be very few entries. +# +log_error = /var/log/mysql/error.log +# +# Here you can see queries with especially long duration +#log_slow_queries = /var/log/mysql/mysql-slow.log +#long_query_time = 2 +#log-queries-not-using-indexes +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#log_bin = /var/log/mysql/mysql-bin.log +expire_logs_days = 10 +max_binlog_size = 100M +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name +# +# * InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# * Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem + + + +[mysqldump] +quick +quote-names +max_allowed_packet = 16M + +[mysql] +#no-auto-rehash # faster start of mysql but no tab completition + +[isamchk] +key_buffer = 16M + +# +# * IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ diff --git a/debian/additions/my_print_defaults.1 b/debian/additions/my_print_defaults.1 new file mode 100644 index 000000000000..ebef41570160 --- /dev/null +++ b/debian/additions/my_print_defaults.1 @@ -0,0 +1,16 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +my_print_defaults \- MySQL helper script that prints defaults. +.SH SYNOPSIS +my_print_defaults [options] +.SH DESCRIPTION +Prints all arguments that is give to some program using the default files. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/myisam_ftdump.1 b/debian/additions/myisam_ftdump.1 new file mode 100644 index 000000000000..e2de358efcc3 --- /dev/null +++ b/debian/additions/myisam_ftdump.1 @@ -0,0 +1,16 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +myisam_ftdump \- Dumps full text tables. +.SH SYNOPSIS +myisam_ftdump [options] +.SH DESCRIPTION +Dumps information and contents of full text tables. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/myisamchk.1 b/debian/additions/myisamchk.1 new file mode 100644 index 000000000000..fe7f34961e06 --- /dev/null +++ b/debian/additions/myisamchk.1 @@ -0,0 +1,17 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +myisamchk \- Checks MySQL myisam type databases. +.SH SYNOPSIS +myisamchk [options] +.SH DESCRIPTION +Description, check and repair of ISAM tables. +Used without options all tables on the command will be checked for errors + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/myisamlog.1 b/debian/additions/myisamlog.1 new file mode 100644 index 000000000000..959d547df946 --- /dev/null +++ b/debian/additions/myisamlog.1 @@ -0,0 +1,16 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +myisamlog \- MySQL helper script. +.SH SYNOPSIS +myisamlog [options] +.SH DESCRIPTION +Function unknown. Mail to ch@debian.org. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/myisampack.1 b/debian/additions/myisampack.1 new file mode 100644 index 000000000000..93168304a173 --- /dev/null +++ b/debian/additions/myisampack.1 @@ -0,0 +1,19 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +myisampack \- Compresses MySQL database files. +.SH SYNOPSIS +myisampack [options] +.SH DESCRIPTION +Pack a MyISAM-table to take much less space. +Keys are not updated, you must run myisamchk -rq on the datafile +afterwards to update the keys. +You should give the .MYI file as the filename argument. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysql-server.lintian-overrides b/debian/additions/mysql-server.lintian-overrides new file mode 100644 index 000000000000..9d741cf16e98 --- /dev/null +++ b/debian/additions/mysql-server.lintian-overrides @@ -0,0 +1,2 @@ +W: mysql-dfsg source: maintainer-script-lacks-debhelper-token debian/mysql-server.postinst +W: mysql-server: possible-bashism-in-maintainer-script postinst:68 'p{("a".."z","A".."Z",0..9)[int(rand(62))]}' diff --git a/debian/additions/mysql_config.1 b/debian/additions/mysql_config.1 new file mode 100644 index 000000000000..88095e22b9e4 --- /dev/null +++ b/debian/additions/mysql_config.1 @@ -0,0 +1,17 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysqlconfig \- MySQL compile settings. +.SH SYNOPSIS +mysqlconfig [options] +.SH DESCRIPTION +This program is only useful for people who want to compile agains +libmysqlclient. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysql_convert_table_format.1 b/debian/additions/mysql_convert_table_format.1 new file mode 100644 index 000000000000..3c23581df438 --- /dev/null +++ b/debian/additions/mysql_convert_table_format.1 @@ -0,0 +1,17 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysql_convert_table_format \- MySQL table converter. +.SH SYNOPSIS +mysql_convert_table_format [options] +.SH DESCRIPTION +Conversion of a MySQL tables to other table types. +If no tables has been specifed, all tables in the database will be converted. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysql_find_rows.1 b/debian/additions/mysql_find_rows.1 new file mode 100644 index 000000000000..35a70b1f9606 --- /dev/null +++ b/debian/additions/mysql_find_rows.1 @@ -0,0 +1,18 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysql_find_rows \- MySQL shell skript for searching in update logs. +.SH SYNOPSIS +mysql_find_rows [options] +.SH DESCRIPTION +Prints all SQL queries that matches a regexp or contains a 'use +database' or 'set ..' command to stdout. A SQL query may contain +newlines. This is useful to find things in a MySQL update log. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysql_fix_extensions.1 b/debian/additions/mysql_fix_extensions.1 new file mode 100644 index 000000000000..3f0a028ca3f9 --- /dev/null +++ b/debian/additions/mysql_fix_extensions.1 @@ -0,0 +1,18 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysql_fix_extensions \- Corrects MySQL database file names. +.SH SYNOPSIS +mysql_fix_extensions +.SH DESCRIPTION +Makes .frm lowercase and .MYI/MYD/ISM/ISD uppercase +useful when datafiles are copied from windows. +Does not work with RAID, with InnoDB or BDB tables. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (8) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysql_install_db.1 b/debian/additions/mysql_install_db.1 new file mode 100644 index 000000000000..11f1f2967a2e --- /dev/null +++ b/debian/additions/mysql_install_db.1 @@ -0,0 +1,16 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysql_install_db \- MySQL helper program. +.SH SYNOPSIS +mysql_install_db [options] +.SH DESCRIPTION +This program is normally not needed by any user. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysql_secure_installation.1 b/debian/additions/mysql_secure_installation.1 new file mode 100644 index 000000000000..d65b7f5d09d9 --- /dev/null +++ b/debian/additions/mysql_secure_installation.1 @@ -0,0 +1,17 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysql_secure_installation \- Secures the MySQL access control lists. +.SH SYNOPSIS +mysql_secure_installation [options] +.SH DESCRIPTION +This interactive programm suggests changes like removing anonymous users that +are supposed to make your installation more secure. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (8) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysql_setpermission.1 b/debian/additions/mysql_setpermission.1 new file mode 100644 index 000000000000..77167e0d58f5 --- /dev/null +++ b/debian/additions/mysql_setpermission.1 @@ -0,0 +1,23 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysql_setpermission \- Adds MySQL users or changes passwords. +.SH SYNOPSIS +mysql_setpermission [options] +.SH DESCRIPTION +The permission setter is a little program which can help you add users +or databases or change passwords in MySQL. Keep in mind that we don't +check permissions which already been set in MySQL. So if you can't +connect to MySQL using the permission you just added, take a look at +the permissions which have already been set in MySQL. + +The permission setter first reads your .my.cnf file in your Home +directory if it exists. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysql_tableinfo.1 b/debian/additions/mysql_tableinfo.1 new file mode 100644 index 000000000000..1de4f5d59433 --- /dev/null +++ b/debian/additions/mysql_tableinfo.1 @@ -0,0 +1,322 @@ +.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MYSQL_TABLEINFO 1" +.TH MYSQL_TABLEINFO 1 "2003-04-05" "perl v5.8.0" "User Contributed Perl Documentation" +.SH "NAME" +mysql_tableinfo \- creates and populates information tables with +the output of SHOW DATABASES, SHOW TABLES (or SHOW TABLE STATUS), +SHOW COLUMNS and SHOW INDEX. +.PP +This is version 1.1. +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +.Vb 1 +\& mysql_tableinfo [OPTIONS] database_to_write [database_like_wild] [table_like_wild] +.Ve +.PP +.Vb 2 +\& Do not backquote (``) database_to_write, +\& and do not quote ('') database_like_wild or table_like_wild +.Ve +.PP +.Vb 1 +\& Examples: +.Ve +.PP +.Vb 1 +\& mysql_tableinfo info +.Ve +.PP +.Vb 1 +\& mysql_tableinfo info this_db +.Ve +.PP +.Vb 1 +\& mysql_tableinfo info %a% b% +.Ve +.PP +.Vb 1 +\& mysql_tableinfo info --clear-only +.Ve +.PP +.Vb 1 +\& mysql_tableinfo info --col --idx --table-status +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +mysql_tableinfo asks a MySQL server information about its +databases, tables, table columns and index, and stores this +in tables called `db`, `tbl` (or `tbl_status`), `col`, `idx` +(with an optional prefix specified with \-\-prefix). +After that, you can query these information tables, for example +to build your admin scripts with \s-1SQL\s0 queries, like +.PP +\&\s-1SELECT\s0 \s-1CONCAT\s0(\*(L"\s-1CHECK\s0 \s-1TABLE\s0 \*(R",`database`,\*(L".\*(R",`table`,\*(L" \s-1EXTENDED\s0;\*(R") +\&\s-1FROM\s0 info.tbl \s-1WHERE\s0 ... ; +.PP +as people usually do with some other \s-1RDBMS\s0 +(note: to increase the speed of your queries on the info tables, +you may add some index on them). +.PP +The database_like_wild and table_like_wild instructs the program +to gather information only about databases and tables +whose names match these patterns. If the info +tables already exist, their rows matching the patterns are simply +deleted and replaced by the new ones. That is, +old rows not matching the patterns are not touched. +If the database_like_wild and table_like_wild arguments +are not specified on the command-line they default to \*(L"%\*(R". +.PP +The program : +.PP +\&\- does \s-1CREATE\s0 \s-1DATABASE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write +where database_to_write is the database name specified on the command\-line. +.PP +\&\- does \s-1CREATE\s0 \s-1TABLE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write.`db` +.PP +\&\- fills database_to_write.`db` with the output of +\&\s-1SHOW\s0 \s-1DATABASES\s0 \s-1LIKE\s0 database_like_wild +.PP +\&\- does \s-1CREATE\s0 \s-1TABLE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write.`tbl` +(respectively database_to_write.`tbl_status` +if the \-\-tbl\-status option is on) +.PP +\&\- for every found database, +fills database_to_write.`tbl` (respectively database_to_write.`tbl_status`) +with the output of +\&\s-1SHOW\s0 \s-1TABLES\s0 \s-1FROM\s0 found_db \s-1LIKE\s0 table_like_wild +(respectively \s-1SHOW\s0 \s-1TABLE\s0 \s-1STATUS\s0 \s-1FROM\s0 found_db \s-1LIKE\s0 table_like_wild) +.PP +\&\- if the \-\-col option is on, + * does \s-1CREATE\s0 \s-1TABLE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write.`col` + * for every found table, + fills database_to_write.`col` with the output of + \s-1SHOW\s0 \s-1COLUMNS\s0 \s-1FROM\s0 found_tbl \s-1FROM\s0 found_db +.PP +\&\- if the \-\-idx option is on, + * does \s-1CREATE\s0 \s-1TABLE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write.`idx` + * for every found table, + fills database_to_write.`idx` with the output of + \s-1SHOW\s0 \s-1INDEX\s0 \s-1FROM\s0 found_tbl \s-1FROM\s0 found_db +.PP +Some options may modify this general scheme (see below). +.PP +As mentioned, the contents of the info tables are the output of +\&\s-1SHOW\s0 commands. In fact the contents are slightly more complete : +.PP +\&\- the `tbl` (or `tbl_status`) info table + has an extra column which contains the database name, +.PP +\&\- the `col` info table + has an extra column which contains the table name, + and an extra column which contains, for each described column, + the number of this column in the table owning it (this extra column + is called `Seq_in_table`). `Seq_in_table` makes it possible for you + to retrieve your columns in sorted order, when you are querying + the `col` table. +.PP +\&\- the `index` info table + has an extra column which contains the database name. +.PP +Caution: info tables contain certain columns (e.g. +Database, Table, Null...) whose names, as they are MySQL reserved words, +need to be backquoted (`...`) when used in \s-1SQL\s0 statements. +.PP +Caution: as information fetching and info tables filling happen at the +same time, info tables may contain inaccurate information about +themselves. +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\-\-clear" 4 +.IX Item "--clear" +Does \s-1DROP\s0 \s-1TABLE\s0 on the info tables (only those that the program is +going to fill, for example if you do not use \-\-col it won't drop +the `col` table) and processes normally. Does not drop database_to_write. +.IP "\-\-clear\-only" 4 +.IX Item "--clear-only" +Same as \-\-clear but exits after the DROPs. +.IP "\-\-col" 4 +.IX Item "--col" +Adds columns information (into table `col`). +.IP "\-\-idx" 4 +.IX Item "--idx" +Adds index information (into table `idx`). +.IP "\-\-prefix prefix" 4 +.IX Item "--prefix prefix" +The info tables are named from the concatenation of prefix and, +respectively, db, tbl (or tbl_status), col, idx. Do not quote ('') +or backquote (``) prefix. +.IP "\-q, \-\-quiet" 4 +.IX Item "-q, --quiet" +Does not warn you about what the script is going to do (\s-1DROP\s0 \s-1TABLE\s0 etc) +and does not ask for a confirmation before starting. +.IP "\-\-tbl\-status" 4 +.IX Item "--tbl-status" +Instead of using \s-1SHOW\s0 \s-1TABLES\s0, uses \s-1SHOW\s0 \s-1TABLE\s0 \s-1STATUS\s0 +(much more complete information, but slower). +.IP "\-\-help" 4 +.IX Item "--help" +Display helpscreen and exit +.IP "\-u, \-\-user=#" 4 +.IX Item "-u, --user=#" +user for database login if not current user. Give a user +who has sufficient privileges (\s-1CREATE\s0, ...). +.IP "\-p, \-\-password=# (INSECURE)" 4 +.IX Item "-p, --password=# (INSECURE)" +password to use when connecting to server. +WARNING: Providing a password on command line is insecure as it is visible through /proc to anyone for a short time. +.IP "\-h, \-\-host=#" 4 +.IX Item "-h, --host=#" +host to connect to +.IP "\-P, \-\-port=#" 4 +.IX Item "-P, --port=#" +port to use when connecting to server +.IP "\-S, \-\-socket=#" 4 +.IX Item "-S, --socket=#" +\&\s-1UNIX\s0 domain socket to use when connecting to server +.SH "WARRANTY" +.IX Header "WARRANTY" +This software is free and comes without warranty of any kind. You +should never trust backup software without studying the code yourself. +Study the code inside this script and only rely on it if \fIyou\fR believe +that it does the right thing for you. +.Sp +Patches adding bug fixes, documentation and new features are welcome. +.SH "TO DO" +.IX Header "TO DO" +Use extended inserts to be faster (for servers with many databases +or tables). But to do that, must care about net\-buffer\-length. +.SH "AUTHOR" +.IX Header "AUTHOR" +2002\-06\-18 Guilhem Bichot (guilhem.bichot@mines\-paris.org) +.Sp +And all the authors of mysqlhotcopy, which served as a model for +the structure of the program. diff --git a/debian/additions/mysql_waitpid.1 b/debian/additions/mysql_waitpid.1 new file mode 100644 index 000000000000..f6877865ba8d --- /dev/null +++ b/debian/additions/mysql_waitpid.1 @@ -0,0 +1,20 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysql_waitpid \- Waits a specified amount of seconds for a PID to terminate. +.SH SYNOPSIS +mysql_waitpid [options] +.SH DESCRIPTION +Description: Waits for a program, which program id is #pid, to +terminate within #time seconds. If the program terminates within +this time, or if the #pid no longer exists, value 0 is returned. +Otherwise 1 is returned. Both #pid and #time must be positive +integer arguments. + +See mysql_waitpid for options. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysqlbinlog.1 b/debian/additions/mysqlbinlog.1 new file mode 100644 index 000000000000..fcdf2a083f4f --- /dev/null +++ b/debian/additions/mysqlbinlog.1 @@ -0,0 +1,17 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysqlbinlog \- Dumps MySQL binary logs. +.SH SYNOPSIS +mysqlbinlog [options] +.SH DESCRIPTION +Dumps a MySQL binary log in a format usable for viewing or for pipeing to +the mysql command line client + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysqlbug.1 b/debian/additions/mysqlbug.1 new file mode 100644 index 000000000000..133330dd8974 --- /dev/null +++ b/debian/additions/mysqlbug.1 @@ -0,0 +1,14 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysqlbug \- MySQL bug reporting tool. +.SH SYNOPSIS +mysqlbug [options] +.SH DESCRIPTION +Interactive bug reporting tool. Use reportbug on Debian systems. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysqlcheck.1 b/debian/additions/mysqlcheck.1 new file mode 100644 index 000000000000..b36ba2d1eb14 --- /dev/null +++ b/debian/additions/mysqlcheck.1 @@ -0,0 +1,28 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysqlcheck \- MySQL program for repairing, checking and optimizing tables. +.SH SYNOPSIS +mysqlcheck | mysqlanalyze | mysqloptimize [options] +.SH DESCRIPTION +This program can be used to CHECK (-c,-m,-C), REPAIR (-r), ANALYZE (-a) +or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be +used same time. It works on MyISAM and in some cases on BDB tables. +Please consult the MySQL manual for latest information about the +above. The options -c,-r,-a and -o are exclusive to each other, which +means that the last option will be used, if several was specified. + +The option -c will be used by default, if none was specified. You +can change the default behavior by making a symbolic link, or +copying this file somewhere with another name, the alternatives are: +mysqlrepair: The default option will be -r +mysqlanalyze: The default option will be -a +mysqloptimize: The default option will be -o + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (8) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysqld_safe_syslog.cnf b/debian/additions/mysqld_safe_syslog.cnf new file mode 100644 index 000000000000..3b0445d6bd82 --- /dev/null +++ b/debian/additions/mysqld_safe_syslog.cnf @@ -0,0 +1,2 @@ +[mysqld_safe] +syslog diff --git a/debian/additions/mysqldumpslow.1 b/debian/additions/mysqldumpslow.1 new file mode 100644 index 000000000000..0431ef04cbb7 --- /dev/null +++ b/debian/additions/mysqldumpslow.1 @@ -0,0 +1,50 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysqldumpslow \- Parse and summarize the MySQL slow query log. +.SH SYNOPSIS +mysqldumpslow [options] +.SH DESCRIPTION +This program parses and summarizes a 'slow query log'. + +.TP +\fB\-v\fR +verbose +.TP +\fB\-d\fR +debug +.TP +\fB\-s=WORD\fR +what to sort by (t, at, l, al, r, ar etc) +.TP +\fB\-r\fR +reverse the sort order (largest last instead of first) +.TP +\fB\-t=NUMBER\fR +just show the top n queries +.TP +\fB\-a\fR +don't abstract all numbers to N and strings to 'S' +.TP +\fB\-n=NUMBER\fR +abstract numbers with at least n digits within names +.TP +\fB\-g=WORD\fR +grep: only consider stmts that include this string +.TP +\fB\-h=WORD\fR +hostname of db server for *-slow.log filename (can be wildcard) +.TP +\fB\-i=WORD\fR +name of server instance (if using mysql.server startup script) +.TP +\fB\-l\fR +don't subtract lock time from total time + +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers based on +the commends in the code. + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysqlimport.1 b/debian/additions/mysqlimport.1 new file mode 100644 index 000000000000..9007307a3284 --- /dev/null +++ b/debian/additions/mysqlimport.1 @@ -0,0 +1,20 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysqlimport \- Imports text files with MySQL database queries. +.SH SYNOPSIS +mysqlimport [options] +.SH DESCRIPTION +Loads tables from text files in various formats. The base name of the +text file must be the name of the table that should be used. +If one uses sockets to connect to the MySQL server, the server will open and +read the text file directly. In other cases the client will open the text +file. The SQL command 'LOAD DATA INFILE' is used to import the rows. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/mysqlreport b/debian/additions/mysqlreport new file mode 100644 index 000000000000..402a5be835d5 --- /dev/null +++ b/debian/additions/mysqlreport @@ -0,0 +1,1298 @@ +#!/usr/bin/perl -w + +# mysqlreport v3.5 Apr 16 2008 +# http://hackmysql.com/mysqlreport + +# mysqlreport makes an easy-to-read report of important MySQL status values. +# Copyright 2006-2008 Daniel Nichter +# +# 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; either version 2 +# of the License, or (at your option) any later version. +# +# 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. +# +# The GNU General Public License is available at: +# http://www.gnu.org/copyleft/gpl.html + +use strict; +use File::Temp qw(tempfile); +use DBI; +use Getopt::Long; +eval { require Term::ReadKey; }; +my $RK = ($@ ? 0 : 1); + +sub have_op; + +my $WIN = ($^O eq 'MSWin32' ? 1 : 0); +my %op; +my %mycnf; # ~/.my.cnf +my ($tmpfile_fh, $tmpfile); +my ($stat_name, $stat_val, $stat_label); +my $MySQL_version; +my (%stats, %vars); # SHOW STATUS, SHOW VARIABLES +my (%DMS_vals, %Com_vals, %ib_vals); +my ($dbh, $query); +my ($questions, $key_read_ratio, $key_write_ratio, $dms, $slow_query_t); +my ($key_cache_block_size, $key_buffer_used, $key_buffer_usage); +my ($qc_mem_used, $qc_hi_r, $qc_ip_r); # Query Cache +my $have_innodb_vals; +my ($ib_bp_used, $ib_bp_total, $ib_bp_read_ratio); +my ($relative_live, $relative_infiles); +my $real_uptime; +my (%stats_present, %stats_past); # For relative reports + +GetOptions ( + \%op, + "user=s", + "password:s", + "host=s", + "port=s", + "socket=s", + "no-mycnf", + "infile|in=s", + "outfile=s", + "flush-status", + "email=s", + "r|relative:i", + "c|report-count=i", + "detach", + "help|?", + "debug" +); + +show_help_and_exit() if $op{'help'}; + +get_user_mycnf() unless $op{'no-mycnf'}; + +# Command line options override ~/.my.cnf +$mycnf{'host'} = $op{'host'} if have_op 'host'; +$mycnf{'port'} = $op{'port'} if have_op 'port'; +$mycnf{'socket'} = $op{'socket'} if have_op 'socket'; +$mycnf{'user'} = $op{'user'} if have_op 'user'; + +$mycnf{'user'} ||= $ENV{'USER'}; + +if(exists $op{'password'}) +{ + if($op{'password'} eq '') # Prompt for password + { + Term::ReadKey::ReadMode(2) if $RK; + print "Password for database user $mycnf{'user'}: "; + chomp($mycnf{'pass'} = ); + Term::ReadKey::ReadMode(0), print "\n" if $RK; + } + else { $mycnf{'pass'} = $op{'password'}; } # Use password given on command line +} + +$op{'com'} ||= 3; +$op{'c'} ||= 1; # Used in collect_reports() if --r given integer value + +$relative_live = 0; +$relative_infiles = 0; + +if(defined $op{'r'}) +{ + if($op{r}) { $relative_live = 1; } # if -r was given an integer value + else { $relative_infiles = 1; } +} + +# The report is written to a tmp file first. +# Later it will be moved to $op{'outfile'} or emailed $op{'email'} if needed. +($tmpfile_fh, $tmpfile) = tempfile() or die "Cannot open temporary file for writing: $!\n"; + +if($op{'detach'}) +{ + $SIG{'TERM'} = 'sig_handler'; + + if(fork()) + { + print "mysqlreport has forked and detached.\n"; + print "While running detached, mysqlreport writes reports to '$tmpfile'.\n"; + + exit; + } + + open(STDIN, " $tmpfile") or die "Cannot dup STDOUT: $!\n"; + open(STDERR, "> $tmpfile") or die "Cannot dup STDERR: $!\n"; +} + +select $tmpfile_fh; +$| = 1 if ($op{'detach'} || $relative_live); + +print "tmp file: $tmpfile\n" if $op{debug}; + +# Connect to MySQL +if(!$op{'infile'} && !$relative_infiles) +{ + connect_to_MySQL(); +} + +$have_innodb_vals = 1; # This might be set to 0 later in get_MySQL_version() + +if(defined $op{'r'}) +{ + if($relative_live) + { + print STDERR "mysqlreport is writing relative reports to '$tmpfile'.\n" unless $op{'detach'}; + get_MySQL_version(); + collect_reports(); + } + + if($relative_infiles) { read_relative_infiles(); } +} +else +{ + if(!$op{'infile'}) + { + get_MySQL_version(); + get_vals(); + get_vars(); + } + else + { + read_infile($op{'infile'}); + } + + get_Com_values(); + + set_myisam_vals(); + set_ib_vals() if $have_innodb_vals; + + write_report(); +} + +exit_tasks_and_cleanup(); + +exit; + +# +# Subroutines +# +sub show_help_and_exit +{ + print <<"HELP"; +mysqlreport v3.5 Apr 16 2008 +mysqlreport makes an easy-to-read report of important MySQL status values. + +Command line options (abbreviations work): + --user USER Connect to MySQL as USER + --password PASS Use PASS or prompt for MySQL user's password + --host ADDRESS Connect to MySQL at ADDRESS + --port PORT Connect to MySQL at PORT + --socket SOCKET Connect to MySQL at SOCKET + --no-mycnf Don't read ~/.my.cnf + --infile FILE Read status values from FILE instead of MySQL + --outfile FILE Write report to FILE + --email ADDRESS Email report to ADDRESS (doesn't work on Windows) + --flush-status Issue FLUSH STATUS; after getting current values + --relative X Generate relative reports. If X is an integer, + reports are live from the MySQL server X seconds apart. + If X is a list of infiles (file1 file2 etc.), + reports are generated from the infiles in the order + that they are given. + --report-count N Collect N number of live relative reports (default 1) + --detach Fork and detach from terminal (run in background) + --help Prints this + --debug Print debugging information + +Visit http://hackmysql.com/mysqlreport for more information. +HELP + + exit; +} + +sub get_user_mycnf +{ + print "get_user_mycnf\n" if $op{debug}; + + return if $WIN; + open MYCNF, "$ENV{HOME}/.my.cnf" or return; + while() + { + if(/^(.+?)\s*=\s*"?(.+?)"?\s*$/) + { + $mycnf{$1} = $2; + print "get_user_mycnf: read '$1 = $2'\n" if $op{debug}; + } + } + $mycnf{'pass'} ||= $mycnf{'password'} if exists $mycnf{'password'}; + close MYCNF; +} + +sub connect_to_MySQL +{ + print "connect_to_MySQL\n" if $op{debug}; + + my $dsn; + + if($mycnf{'socket'} && -S $mycnf{'socket'}) + { + $dsn = "DBI:mysql:mysql_socket=$mycnf{socket}"; + } + elsif($mycnf{'host'}) + { + $dsn = "DBI:mysql:host=$mycnf{host}" . ($mycnf{port} ? ";port=$mycnf{port}" : ""); + } + else + { + $dsn = "DBI:mysql:host=localhost"; + } + + print "connect_to_MySQL: DBI DSN: $dsn\n" if $op{debug}; + + $dbh = DBI->connect($dsn, $mycnf{'user'}, $mycnf{'pass'}) or die; +} + +sub collect_reports +{ + print "collect_reports\n" if $op{debug}; + + my $i; + + get_vals(); + get_vars(); + + get_Com_values(); + + %stats_past = %stats; + + set_myisam_vals(); + set_ib_vals() if $have_innodb_vals; + + print "#\n# Beginning report, 0 0:0:0\n#\n"; + + write_report(); + + for($i = 0; $i < $op{'c'}; $i++) + { + $dbh->disconnect(); + + sleep($op{'r'}); + + connect_to_MySQL(); + + print "\n#\n# Interval report " , $i + 1 , ", +", sec_to_dhms(($i + 1) * $op{'r'}), "\n#\n"; + + get_vals(); + + write_relative_report(); + } +} + +sub read_relative_infiles +{ + print "read_relative_infiles\n" if $op{debug}; + + my $slurp; # Used to check infiles for multiple sets of status values + my $n_stats; # Number of multiple sets of status values in an infile + my $infile; + my $report_n; # Report number + + $report_n = 1; + + foreach $infile (@ARGV) + { + # Read all of infile into $slurp + open INFILE, "< $infile" or warn and next; + $slurp = do { local $/; }; + close INFILE; + + $n_stats = 0; + + # Count number of status value sets + $n_stats++ while $slurp =~ /Aborted_clients/g; + + print "read_relative_infiles: found $n_stats sets of status values in file '$infile'\n" + if $op{debug}; + + if($n_stats == 1) + { + read_infile($infile); + relative_infile_report($report_n++); + } + + if($n_stats > 1) + { + my @tmpfile_fh; + my @tmpfile_name; + my $i; + my $stat_n; # Status value set number + + # Create a tmp file for each set of status values + for($i = 0; $i < $n_stats; $i++) + { + my ($fh, $name) = tempfile() + or die "read_relative_infiles: cannot open temporary file for writing: $!\n"; + + push(@tmpfile_fh, $fh); + push(@tmpfile_name, $name); + + print "read_relative_infiles: created tmp file '$name' for set $i\n" if $op{debug}; + } + + $i = 0; + $stat_n = 0; + + select $tmpfile_fh[$i]; + + # Read infile again and copy each set of status values to seperate tmp files + open INFILE, "< $infile" or warn and next; + while() + { + next if /^\+/; + next if /^$/; + + # The infile must begin with the system variable values. + # Therefore, the first occurance of Aborted_clients indicates the beginning + # of the first set of status values if no sets have occured yet ($stat_n == 0). + # In this case, the following status values are printed to the current fh, + # along with the system variable values read thus far, until Aborted_clients + # occurs again. Then begins the second and subsequent sets of status values. + + if(/Aborted_clients/) + { + print and next if $stat_n++ == 0; + select $tmpfile_fh[++$i]; + } + + print; + } + close INFILE; + + # Re-select the main tmp file into which the reports are being written. + select $tmpfile_fh; + + for($i = 0; $i < $n_stats; $i++) + { + close $tmpfile_fh[$i]; + + print "read_relative_infiles: reading set $i tmp file '$tmpfile_name[$i]'\n" + if $op{debug}; + + read_infile($tmpfile_name[$i]); + relative_infile_report($report_n++); + + if($WIN) { `del $tmpfile_name[$i]`; } + else { `rm -f $tmpfile_name[$i]`; } + + print "read_relative_infiles: deleted set $i tmp file '$tmpfile_name[$i]'\n" + if $op{debug}; + } + + } # if($n_stats > 1) + } # foreach $infile (@files) +} + +sub relative_infile_report +{ + print "relative_infile_report\n" if $op{debug}; + + my $report_n = shift; + + if($report_n == 1) + { + get_Com_values(); + + %stats_past = %stats; + + set_myisam_vals(); + set_ib_vals() if $have_innodb_vals; + + print "#\n# Beginning report, 0 0:0:0\n#\n"; + + write_report(); + } + else + { + print "\n#\n# Interval report ", $report_n - 1, ", +", + sec_to_dhms($stats{Uptime} - $stats_past{Uptime}), + "\n#\n"; + + write_relative_report(); + } +} + +sub get_vals +{ + print "get_vals\n" if $op{debug}; + + my @row; + + # Get status values + if($MySQL_version >= 50002) + { + $query = $dbh->prepare("SHOW GLOBAL STATUS;"); + } + else + { + $query = $dbh->prepare("SHOW STATUS;"); + } + $query->execute(); + while(@row = $query->fetchrow_array()) { $stats{$row[0]} = $row[1]; } + + $real_uptime = $stats{'Uptime'}; +} + +sub get_vars +{ + print "get_vars\n" if $op{debug}; + + my @row; + + # Get server system variables + $query = $dbh->prepare("SHOW VARIABLES;"); + $query->execute(); + while(@row = $query->fetchrow_array()) { $vars{$row[0]} = $row[1]; } + + # table_cache was renamed to table_open_cache in MySQL 5.1.3 + if($MySQL_version >= 50103) + { + $vars{'table_cache'} = $vars{'table_open_cache'}; + } +} + +sub read_infile +{ + print "read_infile\n" if $op{debug}; + + my $infile = shift; + + # Default required system variable values if not set in INFILE. + # As of mysqlreport v3.5 the direct output from SHOW VARIABLES; + # can be put into INFILE instead. See http://hackmysql.com/mysqlreportdoc + # for details. + $vars{'version'} = "0.0.0" if !exists $vars{'version'}; + $vars{'table_cache'} = 64 if !exists $vars{'table_cache'}; + $vars{'max_connections'} = 100 if !exists $vars{'max_connections'}; + $vars{'key_buffer_size'} = 8388600 if !exists $vars{'key_buffer_size'}; # 8M + $vars{'thread_cache_size'} = 0 if !exists $vars{'thread_cache_size'}; + $vars{'tmp_table_size'} = 0 if !exists $vars{'tmp_table_size'}; + $vars{'long_query_time'} = '?' if !exists $vars{'long_query_time'}; + $vars{'log_slow_queries'} = '?' if !exists $vars{'log_slow_queries'}; + + # One should also add: + # key_cache_block_size + # query_cache_size + # to INFILE if needed. + + open INFILE, "< $infile" or die "Cannot open INFILE '$infile': $!\n"; + + while() + { + last if !defined $_; + + next if /^\+/; # skip divider lines + next if /^$/; # skip blank lines + + next until /(Aborted_clients|back_log|=)/; + + if($1 eq 'Aborted_clients') # status values + { + print "read_infile: start stats\n" if $op{debug}; + + while($_) + { + chomp; + if(/([A-Za-z_]+)[\s\t|]+(\d+)/) + { + $stats{$1} = $2; + print "read_infile: save $1 = $2\n" if $op{debug}; + } + else { print "read_infile: ignore '$_'\n" if $op{debug}; } + + last if $1 eq 'Uptime'; # exit while() if end of status values + $_ = ; # otherwise, read next line of status values + } + } + elsif($1 eq 'back_log') # system variable values + { + print "read_infile: start vars\n" if $op{debug}; + + while($_) + { + chomp; + if(/([A-Za-z_]+)[\s\t|]+([\w\.\-]+)/) # This will exclude some vars + { # like pid_file which we don't need + $vars{$1} = $2; + print "read_infile: save $1 = $2\n" if $op{debug}; + } + else { print "read_infile: ignore '$_'\n" if $op{debug}; } + + last if $1 eq 'wait_timeout'; # exit while() if end of vars + $_ = ; # otherwise, read next line of vars + } + } + elsif($1 eq '=') # old style, manually added system variable values + { + print "read_infile: start old vars\n" if $op{debug}; + + while($_ && $_ =~ /=/) + { + chomp; + if(/^\s*(\w+)\s*=\s*([0-9.]+)(M*)\s*$/) # e.g.: key_buffer_size = 128M + { + $vars{$1} = ($3 ? $2 * 1024 * 1024 : $2); + print "read_infile: read '$_' as $1 = $vars{$1}\n" if $op{debug}; + } + else { print "read_infile: ignore '$_'\n" if $op{debug}; } + + $_ = ; # otherwise, read next line of old vars + } + + redo; + } + else + { + print "read_infile: unrecognized line: '$_'\n" if $op{debug}; + } + } + + close INFILE; + + $real_uptime = $stats{'Uptime'}; + + $vars{'table_cache'} = $vars{'table_open_cache'} if exists $vars{'table_open_cache'}; + + get_MySQL_version(); +} + +sub get_MySQL_version +{ + print "get_MySQL_version\n" if $op{debug}; + + return if $MySQL_version; + + my ($major, $minor, $patch); + + if($op{'infile'} || $relative_infiles) + { + ($major, $minor, $patch) = ($vars{'version'} =~ /(\d{1,2})\.(\d{1,2})\.(\d{1,2})/); + } + else + { + my @row; + + $query = $dbh->prepare("SHOW VARIABLES LIKE 'version';"); + $query->execute(); + @row = $query->fetchrow_array(); + ($major, $minor, $patch) = ($row[1] =~ /(\d{1,2})\.(\d{1,2})\.(\d{1,2})/); + } + + $MySQL_version = sprintf("%d%02d%02d", $major, $minor, $patch); + + # Innodb_ status values were added in 5.0.2 + if($MySQL_version < 50002) + { + $have_innodb_vals = 0; + print "get_MySQL_version: no InnoDB reports because MySQL version is older than 5.0.2\n" if $op{debug}; + } +} + +sub set_myisam_vals +{ + print "set_myisam_vals\n" if $op{debug}; + + $questions = $stats{'Questions'}; + + $key_read_ratio = sprintf "%.2f", + ($stats{'Key_read_requests'} ? + 100 - ($stats{'Key_reads'} / $stats{'Key_read_requests'}) * 100 : + 0); + + $key_write_ratio = sprintf "%.2f", + ($stats{'Key_write_requests'} ? + 100 - ($stats{'Key_writes'} / $stats{'Key_write_requests'}) * 100 : + 0); + + $key_cache_block_size = (defined $vars{'key_cache_block_size'} ? + $vars{'key_cache_block_size'} : + 1024); + + $key_buffer_used = $stats{'Key_blocks_used'} * $key_cache_block_size; + + if(defined $stats{'Key_blocks_unused'}) # MySQL 4.1.2+ + { + $key_buffer_usage = $vars{'key_buffer_size'} - + ($stats{'Key_blocks_unused'} * $key_cache_block_size); + } + else { $key_buffer_usage = -1; } + + # Data Manipulation Statements: http://dev.mysql.com/doc/refman/5.0/en/data-manipulation.html + %DMS_vals = + ( + SELECT => $stats{'Com_select'}, + INSERT => $stats{'Com_insert'} + $stats{'Com_insert_select'}, + REPLACE => $stats{'Com_replace'} + $stats{'Com_replace_select'}, + UPDATE => $stats{'Com_update'} + + (exists $stats{'Com_update_multi'} ? $stats{'Com_update_multi'} : 0), + DELETE => $stats{'Com_delete'} + + (exists $stats{'Com_delete_multi'} ? $stats{'Com_delete_multi'} : 0) + ); + + $dms = $DMS_vals{SELECT} + $DMS_vals{INSERT} + $DMS_vals{REPLACE} + $DMS_vals{UPDATE} + $DMS_vals{DELETE}; + + $slow_query_t = format_u_time($vars{long_query_time}); + +} + +sub set_ib_vals +{ + print "set_ib_vals\n" if $op{debug}; + + $ib_bp_used = ($stats{'Innodb_buffer_pool_pages_total'} - + $stats{'Innodb_buffer_pool_pages_free'}) * + $stats{'Innodb_page_size'}; + + $ib_bp_total = $stats{'Innodb_buffer_pool_pages_total'} * $stats{'Innodb_page_size'}; + + $ib_bp_read_ratio = sprintf "%.2f", + ($stats{'Innodb_buffer_pool_read_requests'} ? + 100 - ($stats{'Innodb_buffer_pool_reads'} / + $stats{'Innodb_buffer_pool_read_requests'}) * 100 : + 0); +} + +sub write_relative_report +{ + print "write_relative_report\n" if $op{debug}; + + %stats_present = %stats; + + for(keys %stats) + { + if($stats_past{$_} =~ /\d+/) + { + if($stats_present{$_} >= $stats_past{$_}) # Avoid negative values + { + $stats{$_} = $stats_present{$_} - $stats_past{$_}; + } + } + } + + # These values are either "at present" or "high water marks". + # Therefore, it is more logical to not relativize these values. + # Doing otherwise causes strange and misleading values. + $stats{'Key_blocks_used'} = $stats_present{'Key_blocks_used'}; + $stats{'Open_tables'} = $stats_present{'Open_tables'}; + $stats{'Max_used_connections'} = $stats_present{'Max_used_connections'}; + $stats{'Threads_running'} = $stats_present{'Threads_running'}; + $stats{'Threads_connected'} = $stats_present{'Threads_connected'}; + $stats{'Threads_cached'} = $stats_present{'Threads_cached'}; + $stats{'Qcache_free_blocks'} = $stats_present{'Qcache_free_blocks'}; + $stats{'Qcache_total_blocks'} = $stats_present{'Qcache_total_blocks'}; + $stats{'Qcache_free_memory'} = $stats_present{'Qcache_free_memory'}; + if($have_innodb_vals) + { + $stats{'Innodb_page_size'} = $stats_present{'Innodb_page_size'}; + $stats{'Innodb_buffer_pool_pages_data'} = $stats_present{'Innodb_buffer_pool_pages_data'}; + $stats{'Innodb_buffer_pool_pages_dirty'} = $stats_present{'Innodb_buffer_pool_pages_dirty'}; + $stats{'Innodb_buffer_pool_pages_free'} = $stats_present{'Innodb_buffer_pool_pages_free'}; + $stats{'Innodb_buffer_pool_pages_latched'} = $stats_present{'Innodb_buffer_pool_pages_latched'}; + $stats{'Innodb_buffer_pool_pages_misc'} = $stats_present{'Innodb_buffer_pool_pages_misc'}; + $stats{'Innodb_buffer_pool_pages_total'} = $stats_present{'Innodb_buffer_pool_pages_total'}; + $stats{'Innodb_data_pending_fsyncs'} = $stats_present{'Innodb_data_pending_fsyncs'}; + $stats{'Innodb_data_pending_reads'} = $stats_present{'Innodb_data_pending_reads'}; + $stats{'Innodb_data_pending_writes'} = $stats_present{'Innodb_data_pending_writes'}; + + # Innodb_row_lock_ values were added in MySQL 5.0.3 + if($MySQL_version >= 50003) + { + $stats{'Innodb_row_lock_current_waits'} = $stats_present{'Innodb_row_lock_current_waits'}; + $stats{'Innodb_row_lock_time_avg'} = $stats_present{'Innodb_row_lock_time_avg'}; + $stats{'Innodb_row_lock_time_max'} = $stats_present{'Innodb_row_lock_time_max'}; + } + } + + get_Com_values(); + + %stats_past = %stats_present; + + set_myisam_vals(); + set_ib_vals() if $have_innodb_vals; + + write_report(); +} + +sub write_report +{ + print "write_report\n" if $op{debug}; + + $~ = 'MYSQL_TIME', write; + $~ = 'KEY_BUFF_MAX', write; + if($key_buffer_usage != -1) { $~ = 'KEY_BUFF_USAGE', write } + $~ = 'KEY_RATIOS', write; + write_DTQ(); + $~ = 'SLOW_DMS', write; + write_DMS(); + write_Com(); + $~ = 'SAS', write; + write_qcache(); + $~ = 'REPORT_END', write; + $~ = 'TAB', write; + + write_InnoDB() if $have_innodb_vals; +} + +sub sec_to_dhms # Seconds to days hours:minutes:seconds +{ + my $s = shift; + my ($d, $h, $m) = (0, 0, 0); + + return '0 0:0:0' if $s <= 0; + + if($s >= 86400) + { + $d = int $s / 86400; + $s -= $d * 86400; + } + + if($s >= 3600) + { + $h = int $s / 3600; + $s -= $h * 3600; + } + + $m = int $s / 60; + $s -= $m * 60; + + return "$d $h:$m:$s"; +} + +sub make_short +{ + my ($number, $kb, $d) = @_; + my $n = 0; + my $short; + + $d ||= 2; + + if($kb) { while ($number > 1023) { $number /= 1024; $n++; }; } + else { while ($number > 999) { $number /= 1000; $n++; }; } + + $short = sprintf "%.${d}f%s", $number, ('','k','M','G','T')[$n]; + if($short =~ /^(.+)\.(00)$/) { return $1; } # 12.00 -> 12 but not 12.00k -> 12k + + return $short; +} + +# What began as a simple but great idea has become the new standard: +# long_query_time in microseconds. For MySQL 5.1.21+ and 6.0.4+ this +# is now standard. For 4.1 and 5.0 patches, the architects of this +# idea provide: http://www.mysqlperformanceblog.com/mysql-patches/ +# Relevant notes in MySQL manual: +# http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html +# http://dev.mysql.com/doc/refman/6.0/en/slow-query-log.html +# +# The format_u_time sub simply beautifies long_query_time. + +sub format_u_time # format microsecond (µ) time value +{ + # 0.000000 - 0.000999 = 0 - 999 µ + # 0.001000 - 0.999999 = 1 ms - 999.999 ms + # 1.000000 - n.nnnnnn = 1 s - n.nnnnn s + + my $t = shift; + my $f; # formatted µ time + my $u = chr(($WIN ? 230 : 181)); + + $t = 0 if $t < 0; + + if($t > 0 && $t <= 0.000999) + { + $f = ($t * 1000000) . " $u"; + } + elsif($t >= 0.001000 && $t <= 0.999999) + { + $f = ($t * 1000) . ' ms'; + } + elsif($t >= 1) + { + $f = ($t * 1) . ' s'; # * 1 to remove insignificant zeros + } + else + { + $f = 0; # $t should = 0 at this point + } + + return $f; +} + +sub perc # Percentage +{ + my($is, $of) = @_; + $is = 0 if (not defined $is); + return sprintf "%.2f", ($is * 100) / ($of ||= 1); +} + +sub t # Time average per second +{ + my $val = shift; + return 0 if !$val; + return(make_short($val / $stats{'Uptime'}, 0, 1)); +} + +sub email_report # Email given report to $op{'email'} +{ + print "email_report\n" if $op{debug}; + + return if $WIN; + + my $report = shift; + + open SENDMAIL, "|/usr/sbin/sendmail -t"; + print SENDMAIL "From: mysqlreport\n"; + print SENDMAIL "To: $op{email}\n"; + print SENDMAIL "Subject: MySQL status report on " . ($mycnf{'host'} || 'localhost') . "\n\n"; + print SENDMAIL `cat $report`; + close SENDMAIL; +} + +sub cat_report # Print given report to screen +{ + print "cat_report\n" if $op{debug}; + + my $report = shift; + my @report; + + open REPORT, "< $report"; + @report = ; + close REPORT; + print @report; +} + +sub get_Com_values +{ + print "get_Com_values\n" if $op{debug}; + + %Com_vals = (); + + # Make copy of just the Com_ values + for(keys %stats) + { + if(grep /^Com_/, $_ and $stats{$_} > 0) + { + /^Com_(.*)/; + $Com_vals{$1} = $stats{$_}; + } + } + + # Remove DMS values + delete $Com_vals{'select'}; + delete $Com_vals{'insert'}; + delete $Com_vals{'insert_select'}; + delete $Com_vals{'replace'}; + delete $Com_vals{'replace_select'}; + delete $Com_vals{'update'}; + delete $Com_vals{'update_multi'} if exists $Com_vals{'update_multi'}; + delete $Com_vals{'delete'}; + delete $Com_vals{'delete_multi'} if exists $Com_vals{'delete_multi'}; +} + +sub write_DTQ # Write DTQ report in descending order by values +{ + print "write_DTQ\n" if $op{debug}; + + $~ = 'DTQ'; + + my %DTQ; + my $first = 1; + + # Total Com values + $stat_val = 0; + for(values %Com_vals) { $stat_val += $_; } + $DTQ{'Com_'} = $stat_val; + + $DTQ{'DMS'} = $dms; + $DTQ{'QC Hits'} = $stats{'Qcache_hits'} if $stats{'Qcache_hits'} != 0; + $DTQ{'COM_QUIT'} = int (($stats{'Connections'} - 2) - ($stats{'Aborted_clients'} / 2)); + + $stat_val = 0; + for(values %DTQ) { $stat_val += $_; } + if($questions != $stat_val) + { + $DTQ{($questions > $stat_val ? '+Unknown' : '-Unknown')} = abs $questions - $stat_val; + } + + for(sort { $DTQ{$b} <=> $DTQ{$a} } keys(%DTQ)) + { + if($first) { $stat_label = '%Total:'; $first = 0; } + else { $stat_label = ''; } + + $stat_name = $_; + $stat_val = $DTQ{$_}; + write; + } +} + +sub write_DMS # Write DMS report in descending order by values +{ + print "write_DMS\n" if $op{debug}; + + $~ = 'DMS'; + + for(sort { $DMS_vals{$b} <=> $DMS_vals{$a} } keys(%DMS_vals)) + { + $stat_name = $_; + $stat_val = $DMS_vals{$_}; + write; + } +} + +sub write_Com # Write COM report in descending order by values +{ + print "write_Com\n" if $op{debug}; + + my $i = $op{'com'}; + + $~ = 'COM_1'; + + # Total Com values and write first line of COM report + $stat_label = '%Total:' unless $op{'dtq'}; + $stat_val = 0; + for(values %Com_vals) { $stat_val += $_; } + write; + + $~ = 'COM_2'; + + # Sort remaining Com values, print only the top $op{'com'} number of values + for(sort { $Com_vals{$b} <=> $Com_vals{$a} } keys(%Com_vals)) + { + $stat_name = $_; + $stat_val = $Com_vals{$_}; + write; + + last if !(--$i); + } +} + +sub write_qcache +{ + print "write_qcache\n" if $op{debug}; + + # Query cache was added in 4.0.1, but have_query_cache was added in 4.0.2, + # ergo this method is slightly more reliable + return if not exists $vars{'query_cache_size'}; + return if $vars{'query_cache_size'} == 0; + + $qc_mem_used = $vars{'query_cache_size'} - $stats{'Qcache_free_memory'}; + $qc_hi_r = sprintf "%.2f", $stats{'Qcache_hits'} / ($stats{'Qcache_inserts'} ||= 1); + $qc_ip_r = sprintf "%.2f", $stats{'Qcache_inserts'} / ($stats{'Qcache_lowmem_prunes'} ||= 1); + + $~ = 'QCACHE'; + write; +} + +sub write_InnoDB +{ + print "write_InnoDB\n" if $op{debug}; + + return if not defined $stats{'Innodb_page_size'}; + + $stats{'Innodb_buffer_pool_pages_latched'} = 0 if not defined $stats{'Innodb_buffer_pool_pages_latched'}; + + $~ = 'IB'; + write; + + # Innodb_row_lock_ values were added in MySQL 5.0.3 + if($MySQL_version >= 50003) + { + $~ = 'IB_LOCK'; + write; + } + + # Data, Pages, Rows + $~ = 'IB_DPR'; + write; +} + +sub have_op +{ + my $key = shift; + return 1 if (exists $op{$key} && $op{$key} ne ''); + return 0; +} + +sub sig_handler +{ + print "\nReceived signal at " , scalar localtime , "\n"; + exit_tasks_and_cleanup(); + exit; +} + +sub exit_tasks_and_cleanup +{ + print "exit_tasks_and_cleanup\n" if $op{debug}; + + close $tmpfile_fh; + select STDOUT unless $op{'detach'}; + + email_report($tmpfile) if $op{'email'}; + + cat_report($tmpfile) unless $op{'detach'}; + + if($op{'outfile'}) + { + if($WIN) { `move $tmpfile $op{outfile}`; } + else { `mv $tmpfile $op{outfile}`; } + } + else + { + if($WIN) { `del $tmpfile`; } + else { `rm -f $tmpfile`; } + } + + if(!$op{'infile'} && !$relative_infiles) + { + if($op{'flush-status'}) + { + $query = $dbh->prepare("FLUSH STATUS;"); + $query->execute(); + } + + $query->finish(); + $dbh->disconnect(); + } +} + +# +# Formats +# + +format MYSQL_TIME = +MySQL @<<<<<<<<<<<<<<<< uptime @<<<<<<<<<<< @>>>>>>>>>>>>>>>>>>>>>>>> +$vars{'version'}, sec_to_dhms($real_uptime), (($op{infile} || $relative_infiles) ? '' : scalar localtime) +. + +format KEY_BUFF_MAX = + +__ Key _________________________________________________________________ +Buffer used @>>>>>> of @>>>>>> %Used: @>>>>> +make_short($key_buffer_used, 1), make_short($vars{'key_buffer_size'}, 1), perc($key_buffer_used, $vars{'key_buffer_size'}) +. + +format KEY_BUFF_USAGE = + Current @>>>>>> %Usage: @>>>>> +make_short($key_buffer_usage, 1), perc($key_buffer_usage, $vars{'key_buffer_size'}) +. + +format KEY_RATIOS = +Write hit @>>>>>% +$key_write_ratio +Read hit @>>>>>% +$key_read_ratio + +__ Questions ___________________________________________________________ +Total @>>>>>>>> @>>>>>/s +make_short($questions), t($questions) +. + +format DTQ = + @<<<<<<< @>>>>>>>> @>>>>>/s @>>>>>> @>>>>> +$stat_name, make_short($stat_val), t($stat_val), $stat_label, perc($stat_val, $questions) +. + +format SLOW_DMS = +Slow @<<<<<<< @>>>>>> @>>>>>/s @>>>>> %DMS: @>>>>> Log: @>> +$slow_query_t, make_short($stats{'Slow_queries'}), t($stats{'Slow_queries'}), perc($stats{'Slow_queries'}, $questions), perc($stats{'Slow_queries'}, $dms), $vars{'log_slow_queries'} +DMS @>>>>>>>> @>>>>>/s @>>>>> +make_short($dms), t($dms), perc($dms, $questions) +. + +format DMS = + @<<<<<<< @>>>>>>>> @>>>>>/s @>>>>> @>>>>> +$stat_name, make_short($stat_val), t($stat_val), perc($stat_val, $questions), perc($stat_val, $dms) +. + +format COM_1 = +Com_ @>>>>>>>> @>>>>>/s @>>>>> +make_short($stat_val), t($stat_val), perc($stat_val, $questions) +. + +format COM_2 = + @<<<<<<<<<< @>>>>>> @>>>>>/s @>>>>> +$stat_name, make_short($stat_val), t($stat_val), perc($stat_val, $questions) +. + +format SAS = + +__ SELECT and Sort _____________________________________________________ +Scan @>>>>>> @>>>>/s %SELECT: @>>>>> +make_short($stats{'Select_scan'}), t($stats{'Select_scan'}), perc($stats{'Select_scan'}, $stats{'Com_select'}) +Range @>>>>>> @>>>>/s @>>>>> +make_short($stats{'Select_range'}), t($stats{'Select_range'}), perc($stats{'Select_range'}, $stats{'Com_select'}) +Full join @>>>>>> @>>>>/s @>>>>> +make_short($stats{'Select_full_join'}), t($stats{'Select_full_join'}), perc($stats{'Select_full_join'}, $stats{'Com_select'}) +Range check @>>>>>> @>>>>/s @>>>>> +make_short($stats{'Select_range_check'}), t($stats{'Select_range_check'}), perc($stats{'Select_range_check'}, $stats{'Com_select'}) +Full rng join @>>>>>> @>>>>/s @>>>>> +make_short($stats{'Select_full_range_join'}), t($stats{'Select_full_range_join'}), perc($stats{'Select_full_range_join'}, $stats{'Com_select'}) +Sort scan @>>>>>> @>>>>/s +make_short($stats{'Sort_scan'}), t($stats{'Sort_scan'}) +Sort range @>>>>>> @>>>>/s +make_short($stats{'Sort_range'}), t($stats{'Sort_range'}) +Sort mrg pass @>>>>>> @>>>>/s +make_short($stats{'Sort_merge_passes'}), t($stats{'Sort_merge_passes'}) +. + +format QCACHE = + +__ Query Cache _________________________________________________________ +Memory usage @>>>>>> of @>>>>>> %Used: @>>>>> +make_short($qc_mem_used, 1), make_short($vars{'query_cache_size'}, 1), perc($qc_mem_used, $vars{'query_cache_size'}) +Block Fragmnt @>>>>>% +perc($stats{'Qcache_free_blocks'}, $stats{'Qcache_total_blocks'}) +Hits @>>>>>> @>>>>/s +make_short($stats{'Qcache_hits'}), t($stats{'Qcache_hits'}) +Inserts @>>>>>> @>>>>/s +make_short($stats{'Qcache_inserts'}), t($stats{'Qcache_inserts'}) +Insrt:Prune @>>>>>>:1 @>>>>/s +make_short($qc_ip_r), t($stats{'Qcache_inserts'} - $stats{'Qcache_lowmem_prunes'}) +Hit:Insert @>>>>>>:1 +$qc_hi_r, t($qc_hi_r) +. + +# Not really the end... +format REPORT_END = + +__ Table Locks _________________________________________________________ +Waited @>>>>>>>> @>>>>>/s %Total: @>>>>> +make_short($stats{'Table_locks_waited'}), t($stats{'Table_locks_waited'}), perc($stats{'Table_locks_waited'}, $stats{'Table_locks_waited'} + $stats{'Table_locks_immediate'}); +Immediate @>>>>>>>> @>>>>>/s +make_short($stats{'Table_locks_immediate'}), t($stats{'Table_locks_immediate'}) + +__ Tables ______________________________________________________________ +Open @>>>>>>>> of @>>> %Cache: @>>>>> +$stats{'Open_tables'}, $vars{'table_cache'}, perc($stats{'Open_tables'}, $vars{'table_cache'}) +Opened @>>>>>>>> @>>>>>/s +make_short($stats{'Opened_tables'}), t($stats{'Opened_tables'}) + +__ Connections _________________________________________________________ +Max used @>>>>>>>> of @>>> %Max: @>>>>> +$stats{'Max_used_connections'}, $vars{'max_connections'}, perc($stats{'Max_used_connections'}, $vars{'max_connections'}) +Total @>>>>>>>> @>>>>>/s +make_short($stats{'Connections'}), t($stats{'Connections'}) + +__ Created Temp ________________________________________________________ +Disk table @>>>>>>>> @>>>>>/s +make_short($stats{'Created_tmp_disk_tables'}), t($stats{'Created_tmp_disk_tables'}) +Table @>>>>>>>> @>>>>>/s Size: @>>>>> +make_short($stats{'Created_tmp_tables'}), t($stats{'Created_tmp_tables'}), make_short($vars{'tmp_table_size'}, 1, 1) +File @>>>>>>>> @>>>>>/s +make_short($stats{'Created_tmp_files'}), t($stats{'Created_tmp_files'}) +. + +format TAB = + +__ Threads _____________________________________________________________ +Running @>>>>>>>> of @>>> +$stats{'Threads_running'}, $stats{'Threads_connected'} +Cached @>>>>>>>> of @>>> %Hit: @>>>>> +$stats{'Threads_cached'}, $vars{'thread_cache_size'}, make_short(100 - perc($stats{'Threads_created'}, $stats{'Connections'})) +Created @>>>>>>>> @>>>>>/s +make_short($stats{'Threads_created'}), t($stats{'Threads_created'}) +Slow @>>>>>>>> @>>>>>/s +$stats{'Slow_launch_threads'}, t($stats{'Slow_launch_threads'}) + +__ Aborted _____________________________________________________________ +Clients @>>>>>>>> @>>>>>/s +make_short($stats{'Aborted_clients'}), t($stats{'Aborted_clients'}) +Connects @>>>>>>>> @>>>>>/s +make_short($stats{'Aborted_connects'}), t($stats{'Aborted_connects'}) + +__ Bytes _______________________________________________________________ +Sent @>>>>>>>> @>>>>>/s +make_short($stats{'Bytes_sent'}), t($stats{'Bytes_sent'}) +Received @>>>>>>>> @>>>>>/s +make_short($stats{'Bytes_received'}), t($stats{'Bytes_received'}) +. + +format IB = + +__ InnoDB Buffer Pool __________________________________________________ +Usage @>>>>>> of @>>>>>> %Used: @>>>>> +make_short($ib_bp_used, 1), make_short($ib_bp_total, 1), perc($ib_bp_used, $ib_bp_total) +Read hit @>>>>>% +$ib_bp_read_ratio; +Pages + Free @>>>>>>>> %Total: @>>>>> +make_short($stats{'Innodb_buffer_pool_pages_free'}), perc($stats{'Innodb_buffer_pool_pages_free'}, $stats{'Innodb_buffer_pool_pages_total'}) + Data @>>>>>>>> @>>>>> %Drty: @>>>>> +make_short($stats{'Innodb_buffer_pool_pages_data'}), perc($stats{'Innodb_buffer_pool_pages_data'}, $stats{'Innodb_buffer_pool_pages_total'}), perc($stats{'Innodb_buffer_pool_pages_dirty'}, $stats{'Innodb_buffer_pool_pages_data'}) + Misc @>>>>>>>> @>>>>> + $stats{'Innodb_buffer_pool_pages_misc'}, perc($stats{'Innodb_buffer_pool_pages_misc'}, $stats{'Innodb_buffer_pool_pages_total'}) + Latched @>>>>>>>> @>>>>> +$stats{'Innodb_buffer_pool_pages_latched'}, perc($stats{'Innodb_buffer_pool_pages_latched'}, $stats{'Innodb_buffer_pool_pages_total'}) +Reads @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_buffer_pool_read_requests'}), t($stats{'Innodb_buffer_pool_read_requests'}) + From file @>>>>>>>> @>>>>>/s @>>>>> +make_short($stats{'Innodb_buffer_pool_reads'}), t($stats{'Innodb_buffer_pool_reads'}), perc($stats{'Innodb_buffer_pool_reads'}, $stats{'Innodb_buffer_pool_read_requests'}) + Ahead Rnd @>>>>>>>> @>>>>>/s +$stats{'Innodb_buffer_pool_read_ahead_rnd'}, t($stats{'Innodb_buffer_pool_read_ahead_rnd'}) + Ahead Sql @>>>>>>>> @>>>>>/s +$stats{'Innodb_buffer_pool_read_ahead_seq'}, t($stats{'Innodb_buffer_pool_read_ahead_seq'}) +Writes @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_buffer_pool_write_requests'}), t($stats{'Innodb_buffer_pool_write_requests'}) +Flushes @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_buffer_pool_pages_flushed'}), t($stats{'Innodb_buffer_pool_pages_flushed'}) +Wait Free @>>>>>>>> @>>>>>/s +$stats{'Innodb_buffer_pool_wait_free'}, t($stats{'Innodb_buffer_pool_wait_free'}) +. + +format IB_LOCK = + +__ InnoDB Lock _________________________________________________________ +Waits @>>>>>>>> @>>>>>/s +$stats{'Innodb_row_lock_waits'}, t($stats{'Innodb_row_lock_waits'}) +Current @>>>>>>>> +$stats{'Innodb_row_lock_current_waits'} +Time acquiring + Total @>>>>>>>> ms +$stats{'Innodb_row_lock_time'} + Average @>>>>>>>> ms +$stats{'Innodb_row_lock_time_avg'} + Max @>>>>>>>> ms +$stats{'Innodb_row_lock_time_max'} +. + +format IB_DPR = + +__ InnoDB Data, Pages, Rows ____________________________________________ +Data + Reads @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_data_reads'}), t($stats{'Innodb_data_reads'}) + Writes @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_data_writes'}), t($stats{'Innodb_data_writes'}) + fsync @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_data_fsyncs'}), t($stats{'Innodb_data_fsyncs'}) + Pending + Reads @>>>>>>>> +$stats{'Innodb_data_pending_reads'}, t($stats{'Innodb_data_pending_reads'}) + Writes @>>>>>>>> +$stats{'Innodb_data_pending_writes'}, t($stats{'Innodb_data_pending_writes'}) + fsync @>>>>>>>> +$stats{'Innodb_data_pending_fsyncs'}, t($stats{'Innodb_data_pending_fsyncs'}) + +Pages + Created @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_pages_created'}), t($stats{'Innodb_pages_created'}) + Read @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_pages_read'}), t($stats{'Innodb_pages_read'}) + Written @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_pages_written'}), t($stats{'Innodb_pages_written'}) + +Rows + Deleted @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_rows_deleted'}), t($stats{'Innodb_rows_deleted'}) + Inserted @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_rows_inserted'}), t($stats{'Innodb_rows_inserted'}) + Read @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_rows_read'}), t($stats{'Innodb_rows_read'}) + Updated @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_rows_updated'}), t($stats{'Innodb_rows_updated'}) +. diff --git a/debian/additions/mysqlreport.1 b/debian/additions/mysqlreport.1 new file mode 100644 index 000000000000..5ae6b9e3b92d --- /dev/null +++ b/debian/additions/mysqlreport.1 @@ -0,0 +1,180 @@ +.TH "mysqlreport" "1" "2.5 2006-09-01 (docrev 2006-05-19)" "Daniel Nichter" "MYSQL" +.SH "NAME" +.LP +mysqlreport \- Makes a friendly report of important MySQL status values +.SH "SYNTAX" +.LP +mysqlreport [\fIoptions\fP] +.SH "DESCRIPTION" +.LP +mysqlreport makes a friendly report of important MySQL status values. Actually, +it makes a friendly report of nearly every status value from SHOW STATUS. +Unlike SHOW STATUS which simply dumps over 100 values to screen in one long +list, mysqlreport interprets and formats the values and presents the basic +values and many more inferred values in a human\-readable format. Numerous +example reports are available at the mysqlreport web page at +http://hackmysql.com/mysqlreport. + +The benefit of mysqlreport is that it allows you to very quickly see a wide +array of performance indicators for your MySQL server which would otherwise +need to be calculated by hand from all the various SHOW STATUS values. For +example, the Index Read Ratio is an important value but it's not present in +SHOW STATUS; it's an inferred value (the ratio of Key_reads to +Key_read_requests). + +This documentation outlines all the command line options in mysqlreport, most +of which control which reports are printed. This document does not address +how to interpret these reports; that topic is covered in the document Guide +To Understanding mysqlreport at http://hackmysql.com/mysqlreportguide. + +.SH "OPTIONS" +Technically, command line options are in the form \-\-option, but \-option works +too. All options can be abbreviated if the abbreviation is unique. For example, +option \-\-host can be abbreviated \-\-ho but not \-\-h because \-\-h is ambiguous: it +could mean \-\-host or \-\-help. + +.LP + +.TP +\fB\-\-help\fR +Output help information and exit. + +.TP +\fB\-\-user USER\fR + +.TP +\fB\-\-password\fR +As of version 2.3 \-\-password can take the password on the +command line like "\-\-password FOO". Using \-\-password +alone without giving a password on the command line +causes mysqlreport to prompt for a password. + +.TP +\fB\-\-host ADDRESS\fR + +.TP +\fB\-\-port PORT\fR + +.TP +\fB\-\-socket SOCKET\fR + +.TP +\fB\-\-no\-mycnf\fR +\-\-no\-mycnf makes mysqlreport not read ~/.my.cnf which it does by default +otherwise. \-\-user and \-\-password always override values from ~/.my.cnf. + +.TP +\fB\-\-dtq\fR +Print Distribution of Total Queries (DTQ) report (under +Total in Questions report). Queries (or Questions) can +be divided into four main areas: DMS (see \-\-dms below), +Com_ (see \-\-com below), COM_QUIT (see COM_QUIT and +Questions at http://hackmysql.com/com_quit), and +Unknown. \-\-dtq lists the number of queries in each of +these areas in descending order. + +.TP +\fB\-\-dms\fR +Print Data Manipulation Statements (DMS) report (under +DMS in Questions report). DMS are those from the MySQL +manual section 13.2. Data Manipulation Statements. +(Currently, mysqlreport considers only SELECT, INSERT, +REPLACE, UPDATE, and DELETE.) Each DMS is listed in +descending order by count. + +.TP +\fB\-\-com N\fR +Print top N number of non\-DMS Com_ status values in +descending order (after DMS in Questions report). If N +is not given, default is 3. Such non\-DMS Com_ values +include Com_change_db, Com_show_tables, Com_rollback, +etc. + +.TP +\fB\-\-sas\fR +Print report for Select_ and Sort_ status values (after +Questions report). See MySQL Select and Sort Status +Variables at http://hackmysql.com/selectandsort. + +.TP +\fB\-\-tab\fR +Print Threads, Aborted, and Bytes status reports (after +Created temp report). As of mysqlreport v2.3 the +Threads report reports on all Threads_ status values. + +.TP +\fB\-\-qcache\fR +Print Query Cache report. +.TP +\fB\-\-all\fR +Equivalent to "\-\-dtq \-\-dms \-\-com 3 \-\-sas \-\-qcache". +(Notice \-\-tab is not invoked by \-\-all.) + +.TP +\fB\-\-infile FILE\fR +Instead of getting SHOW STATUS values from MySQL, read +values from FILE. FILE is often a copy of the output of +SHOW STATUS including formatting characters (|, +, \-). +mysqlreport expects FILE to have the format +" value number " where value is only alpha and +underscore characters (A\-Z and _) and number is a +positive integer. Anything before, between, or after +value and number is ignored. mysqlreport also needs +the following MySQL server variables: version, +table_cache, max_connections, key_buffer_size, +query_cache_size. These values can be specified in +INFILE in the format "name = value" where name is one +of the aforementioned server variables and value is a +positive integer with or without a trailing M and +possible periods (for version). For example, to specify +an 18M key_buffer_size: key_buffer_size = 18M. Or, a +256 table_cache: table_cache = 256. The M implies +Megabytes not million, so 18M means 18,874,368 not +18,000,000. If these server variables are not specified +the following defaults are used (respectively) which +may cause strange values to be reported: 0.0.0, 64, +100, 8M, 0. + +.TP +\fB\-\-outfile FILE\fR +After printing the report to screen, print the report +to FILE too. Internally, mysqlreport always writes the +report to a temp file first: /tmp/mysqlreport.PID on +*nix, c:\mysqlreport.PID on Windows (PID is the +script's process ID). Then it prints the temp file to +screen. Then if \-\-outfile is specified, the temp file +is copied to OUTFILE. After \-\-email (below), the temp +file is deleted. + +.TP +\fB\-\-email ADDRESS\fR +After printing the report to screen, email the report +to ADDRESS. This option requires sendmail in +/usr/sbin/, therefore it does not work on Windows. +/usr/sbin/sendmail can be a sym link to qmail, for +example, or any MTA that emulates sendmail's \-t +command line option and operation. The FROM: field is +"mysqlreport", SUBJECT: is "MySQL status report". + +.TP +\fB\-\-flush\-status\fR +Execute a "FLUSH STATUS;" after generating the reports. +If you do not have permissions in MySQL to do this an +error from DBD::mysql::st will be printed after the +reports. + +.SH "AUTHORS" +.LP +Daniel Nichter + +If mysqlreport breaks, send me a message from +http://hackmysql.com/feedback +with the error. + +.SH "SEE ALSO" +.LP +mytop(1) +.LP +The comprehensive Guide To Understanding mysqlreport at +http://hackmysql.com/mysqlreportguide. + diff --git a/debian/additions/mysqltest.1 b/debian/additions/mysqltest.1 new file mode 100644 index 000000000000..3469765fe3bc --- /dev/null +++ b/debian/additions/mysqltest.1 @@ -0,0 +1,16 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +mysqltest \- Regressiontest program for MySQL. +.SH SYNOPSIS +mysqltest [options] +.SH DESCRIPTION +Runs a test against the mysql server and compares output with a results file. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/pack_isam.1 b/debian/additions/pack_isam.1 new file mode 100644 index 000000000000..cad153eedee6 --- /dev/null +++ b/debian/additions/pack_isam.1 @@ -0,0 +1,19 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +myisampack \- Compresses MySQL database files. +.SH SYNOPSIS +myisampack [options] +.SH DESCRIPTION +Pack a ISAM-table to take much smaller space +Keys are not updated, so you must run isamchk -rq on any table +that has keys after you have compressed it +You should give the .ISM file as the filename argument + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/resolve_stack_dump.1 b/debian/additions/resolve_stack_dump.1 new file mode 100644 index 000000000000..2a1e27702750 --- /dev/null +++ b/debian/additions/resolve_stack_dump.1 @@ -0,0 +1,16 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +resolve_stack_dump \- MySQL helper program for reporting bugs. +.SH SYNOPSIS +resolve_stack_dump [options] +.SH DESCRIPTION +Resolve numeric stack strace dump into symbols. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/additions/resolveip.1 b/debian/additions/resolveip.1 new file mode 100644 index 000000000000..7aa9439394dc --- /dev/null +++ b/debian/additions/resolveip.1 @@ -0,0 +1,16 @@ +.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" +.SH NAME +resolveip \- MySQL helper program to retrive IP addresses. +.SH SYNOPSIS +resolveip [options] +.SH DESCRIPTION +Get hostname based on IP-address or IP-address based on hostname. + +For more information start the program with '--help'. +.SH "SEE ALSO" +mysql (1), mysqld (1) +.SH AUTHOR +This manpage was written by Christian Hammers . + +MySQL is available at http://www.mysql.com/. +.\" end of man page diff --git a/debian/apparmor-profile b/debian/apparmor-profile new file mode 100644 index 000000000000..3e1f1b05fa6b --- /dev/null +++ b/debian/apparmor-profile @@ -0,0 +1,45 @@ +# vim:syntax=apparmor +# Last Modified: Tue Jun 19 17:37:30 2007 +#include + +/usr/sbin/mysqld { + #include + #include + #include + #include + #include + + capability dac_override, + capability sys_resource, + capability setgid, + capability setuid, + + network tcp, + + /etc/hosts.allow r, + /etc/hosts.deny r, + + /etc/mysql/*.pem r, + /etc/mysql/conf.d/ r, + /etc/mysql/conf.d/* r, + /etc/mysql/*.cnf r, + /usr/lib/mysql/plugin/ r, + /usr/lib/mysql/plugin/*.so* mr, + /usr/sbin/mysqld mr, + /usr/share/mysql/** r, + /var/log/mysql.log rw, + /var/log/mysql.err rw, + /var/lib/mysql/ r, + /var/lib/mysql/** rwk, + /var/log/mysql/ r, + /var/log/mysql/* rw, + /var/run/mysqld/mysqld.pid rw, + /var/run/mysqld/mysqld.sock w, + /run/mysqld/mysqld.pid rw, + /run/mysqld/mysqld.sock w, + + /sys/devices/system/cpu/ r, + + # Site-specific additions and overrides. See local/README for details. + #include +} diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000000..6f266eb8b43d --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +mysql-wsrep-5.5 (5.5.41-1) UNRELEASED; urgency=medium + + * Initial Debian packaging based on MySQL 5.5.41-0ubuntu0.12.04.1 + + -- Otto Kekäläinen Wed, 21 Fed 2015 08:51:36 -0500 diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000000..ec635144f600 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000000..bbf3134930e3 --- /dev/null +++ b/debian/control @@ -0,0 +1,198 @@ +Source: mysql-wsrep-5.5 +Section: database +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian MySQL Maintainers +Uploaders: Norbert Tretkowski , Clint Byrum +Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper (>= 8.1.3~), file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), libreadline-dev, psmisc, po-debconf, chrpath, doxygen-latex, ghostscript, gawk, bison, lsb-release, hardening-wrapper, cmake, gcc-4.5, g++-4.5, dh-apparmor +Standards-Version: 3.9.2 +Homepage: http://dev.mysql.com/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-mysql/mysql-5.5/ +Vcs-Svn: svn://svn.debian.org/svn/pkg-mysql/mysql-5.5/ + +Package: libmysqlclient18 +Section: libs +Architecture: any +Depends: mysql-common (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: multiarch-support, ${misc:Pre-Depends} +Multi-Arch: same +Description: MySQL database client library + MySQL is a fast, stable and true multi-user, multi-threaded SQL database + server. SQL (Structured Query Language) is the most popular database query + language in the world. The main goals of MySQL are speed, robustness and + ease of use. + . + This package includes the client library. + +Package: libmysqld-pic +Architecture: any +Section: libdevel +Depends: libmysqlclient-dev (>= ${source:Version}), ${misc:Depends} +Description: MySQL database development files + MySQL is a fast, stable and true multi-user, multi-threaded SQL database + server. SQL (Structured Query Language) is the most popular database query + language in the world. The main goals of MySQL are speed, robustness and + ease of use. + . + This package includes the -fPIC version of the embedded server library. + +Package: libmysqld-dev +Architecture: any +Section: libdevel +Depends: libmysqlclient-dev (>= ${source:Version}), ${misc:Depends} +Description: MySQL embedded database development files + MySQL is a fast, stable and true multi-user, multi-threaded SQL database + server. SQL (Structured Query Language) is the most popular database query + language in the world. The main goals of MySQL are speed, robustness and + ease of use. + . + This package includes the embedded server library and header files. + +Package: libmysqlclient-dev +Architecture: any +Section: libdevel +Depends: libmysqlclient18 (= ${binary:Version}), zlib1g-dev, , ${shlibs:Depends}, ${misc:Depends} +Conflicts: libmysqlclient14-dev, libmysqlclient12-dev, libmysqlclient10-dev, libmysqlclient15-dev +Provides: libmysqlclient15-dev +Replaces: libmysqlclient15-dev +Description: MySQL database development files + MySQL is a fast, stable and true multi-user, multi-threaded SQL database + server. SQL (Structured Query Language) is the most popular database query + language in the world. The main goals of MySQL are speed, robustness and + ease of use. + . + This package includes development libraries and header files. + +Package: mysql-common +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Conflicts: mysql-common-4.1 +Provides: mysql-common-4.1 +Replaces: mysql-common-4.1 +Breaks: mysql-server-5.1, mysql-client-5.1, mysql-server-core-5.1, mysql-client-core-5.1 +Multi-Arch: foreign +Description: MySQL database common files, e.g. /etc/mysql/my.cnf + MySQL is a fast, stable and true multi-user, multi-threaded SQL database + server. SQL (Structured Query Language) is the most popular database query + language in the world. The main goals of MySQL are speed, robustness and + ease of use. + . + This package includes files needed by all versions of the client library, + e.g. /etc/mysql/my.cnf. + +Package: mysql-client-core-5.5 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: mysql-client (<< ${source:Version}), mysql-client-5.0, mysql-client-core-5.1 +Replaces: mysql-client (<< ${source:Version}), mysql-client-5.0, mysql-client-core-5.1 +Description: MySQL database core client binaries + MySQL is a fast, stable and true multi-user, multi-threaded SQL database + server. SQL (Structured Query Language) is the most popular database query + language in the world. The main goals of MySQL are speed, robustness and + ease of use. + . + This package includes the core client files, as used by Akonadi. + +Package: mysql-client-5.5 +Architecture: any +Depends: debianutils (>=1.6), libdbi-perl, libdbd-mysql-perl (>= 1.2202), mysql-common (>= ${source:Version}), ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}, mysql-client-core-5.5, libterm-readkey-perl +Provides: virtual-mysql-client, mysql-client, mysql-client-4.1 +Breaks: mysql-client (<< ${source:Version}), mysql-client-5.0, mysql-client-5.1 +Replaces: mysql-client (<< ${source:Version}), mysql-client-5.0, mysql-client-5.1 +Description: MySQL database client binaries + MySQL is a fast, stable and true multi-user, multi-threaded SQL database + server. SQL (Structured Query Language) is the most popular database query + language in the world. The main goals of MySQL are speed, robustness and + ease of use. + . + This package includes the client binaries and the additional tools + innotop and mysqlreport. + +Package: mysql-server-core-5.5 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: mysql-server-5.1, mysql-server-5.0, mysql-server-core-5.1 +Provides: mysql-server-core +Replaces: mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-5.0, mysql-server-5.1, mysql-server-core-5.1 +Description: MySQL database server binaries + MySQL is a fast, stable and true multi-user, multi-threaded SQL database + server. SQL (Structured Query Language) is the most popular database query + language in the world. The main goals of MySQL are speed, robustness and + ease of use. + . + This package includes the server binaries but doesn't contain all the + infrastructure needed to setup system databases. + +Package: mysql-server-5.5 +Architecture: any +Suggests: tinyca, mailx +Recommends: libhtml-template-perl +Pre-Depends: mysql-common (>= ${source:Version}), adduser (>= 3.40), debconf +Depends: mysql-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mysql-server-core-5.5 (= ${binary:Version}), upstart (>= 0.6.7-2) +Breaks: mysql-server (<< ${source:Version}), mysql-server-4.1, mysql-server-5.1, libmysqlclient-dev ( << 5.5.17~ ) +Provides: virtual-mysql-server +Replaces: mysql-server (<< ${source:Version}), mysql-server-5.1, mysql-server-5.0, mysql-server-4.1, libmysqlclient-dev ( << 5.5.17~ ) +Description: MySQL database server binaries and system database setup + MySQL is a fast, stable and true multi-user, multi-threaded SQL database + server. SQL (Structured Query Language) is the most popular database query + language in the world. The main goals of MySQL are speed, robustness and + ease of use. + . + This package contains all the infrastructure needed to setup system + databases. + +Package: mysql-server +Architecture: all +Depends: mysql-server-5.5 +Description: MySQL database server (metapackage depending on the latest version) + This is an empty package that depends on the current "best" version of + mysql-server (currently mysql-server-5.5), as determined by the MySQL + maintainers. Install this package if in doubt about which MySQL + version you need. That will install the version recommended by the + package maintainers. + . + MySQL is a fast, stable and true multi-user, multi-threaded SQL database + server. SQL (Structured Query Language) is the most popular database query + language in the world. The main goals of MySQL are speed, robustness and + ease of use. + +Package: mysql-client +Architecture: all +Depends: mysql-client-5.5 +Description: MySQL database client (metapackage depending on the latest version) + This is an empty package that depends on the current "best" version of + mysql-client (currently mysql-client-5.5), as determined by the MySQL + maintainers. Install this package if in doubt about which MySQL version + you want, as this is the one we consider to be in the best shape. + +Package: mysql-testsuite +Architecture: all +Depends: mysql-testsuite-5.5 +Description: MySQL testsuite + This is an empty package that depends on the current "best" version of + mysql-testsuite (currently mysql-testsuite-5.5), as determined by the + MySQL maintainers. Install this package if in doubt about which MySQL + version you want, as this is the one we consider to be in the best shape. + +Package: mysql-testsuite-5.5 +Architecture: any +Depends: mysql-server, mysql-client, ${misc:Depends}, ${shlibs:Depends} +Conflicts: mysql-testsuite (<< ${source:Version}) +Description: MySQL testsuite + MySQL is a fast, stable, and true multi-user, multi-threaded SQL database + server. SQL (Structured Query Language) is the most popular database query + language in the world. The main goals of MySQL are speed, robustness and + ease of use. + . + This package includes the MySQL testsuite. + +Package: mysql-source-5.5 +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: MySQL source + MySQL is a fast, stable, and true multi-user, multi-threaded SQL database + server. SQL (Structured Query Language) is the most popular database query + language in the world. The main goals of MySQL are speed, robustness and + ease of use. + . + This package includes the MySQL source code as configured before building. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000000..a111d7889b58 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,767 @@ +Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174 +Upstream-Name: MySQL 5.5 +Upstream-Contact: http://bugs.mysql.com/ +Source: http://dev.mysql.com/downloads/mysql/5.5.html +Comments: originally produced by a modified version of licensecheck2dep5 + from CDBS by Clint Byrum . Hand modified to reduce + redundancy in the output and add appropriate license text. + . + Also, MySQL carries the "FOSS License Exception" specified in README + . + Quoting from README: + . + MySQL FOSS License Exception We want free and open source + software applications under certain licenses to be able to use + specified GPL-licensed MySQL client libraries despite the fact + that not all such FOSS licenses are compatible with version + 2 of the GNU General Public License. Therefore there are + special exceptions to the terms and conditions of the GPLv2 + as applied to these client libraries, which are identified + and described in more detail in the FOSS License Exception at + . + . + The text of the Above URL is quoted below, as of Aug 17, 2011. + . + > FOSS License Exception + > . + > Updated July 1, 2010 + > . + > What is the FOSS License Exception? Oracle¿s Free and Open Source + > Software ("FOSS") License Exception (formerly known as the FLOSS + > License Exception) allows developers of FOSS applications to include + > Oracle's MySQL Client Libraries (also referred to as "MySQL Drivers" + > or "MySQL Connectors") with their FOSS applications. MySQL Client + > Libraries are typically licensed pursuant to version 2 of the General + > Public License ("GPL"), but this exception permits distribution of + > certain MySQL Client Libraries with a developer¿s FOSS applications + > licensed under the terms of another FOSS license listed below, + > even though such other FOSS license may be incompatible with the GPL. + > . + > The following terms and conditions describe the circumstances under + > which Oracle¿s FOSS License Exception applies. + > . + > Oracle¿s FOSS License Exception Terms and Conditions Definitions. + > "Derivative Work" means a derivative work, as defined under applicable + > copyright law, formed entirely from the Program and one or more + > FOSS Applications. + > . + > "FOSS Application" means a free and open source software application + > distributed subject to a license listed in the section below titled + > "FOSS License List." + > . + > "FOSS Notice" means a notice placed by Oracle or MySQL in a copy + > of the MySQL Client Libraries stating that such copy of the MySQL + > Client Libraries may be distributed under Oracle's or MySQL¿s FOSS + > (or FLOSS) License Exception. + > . + > "Independent Work" means portions of the Derivative Work that are not + > derived from the Program and can reasonably be considered independent + > and separate works. + > . + > "Program" means a copy of Oracle¿s MySQL Client Libraries that + > contains a FOSS Notice. + > . + > A FOSS application developer ("you" or "your") may distribute a + > Derivative Work provided that you and the Derivative Work meet all + > of the following conditions: You obey the GPL in all respects for + > the Program and all portions (including modifications) of the Program + > included in the Derivative Work (provided that this condition does not + > apply to Independent Works); The Derivative Work does not include any + > work licensed under the GPL other than the Program; You distribute + > Independent Works subject to a license listed in the section below + > titled "FOSS License List"; You distribute Independent Works in + > object code or executable form with the complete corresponding + > machine-readable source code on the same medium and under the same + > FOSS license applying to the object code or executable forms; All + > works that are aggregated with the Program or the Derivative Work + > on a medium or volume of storage are not derivative works of the + > Program, Derivative Work or FOSS Application, and must reasonably + > be considered independent and separate works. Oracle reserves all + > rights not expressly granted in these terms and conditions. If all + > of the above conditions are not met, then this FOSS License Exception + > does not apply to you or your Derivative Work. + > . + > FOSS License List + > . + > License Name Version(s)/Copyright Date + > Release Early Certified Software + > Academic Free License 2.0 + > Apache Software License 1.0/1.1/2.0 + > Apple Public Source License 2.0 + > Artistic license From Perl 5.8.0 + > BSD license "July 22 1999" + > Common Development and Distribution License (CDDL) 1.0 + > Common Public License 1.0 + > Eclipse Public License 1.0 + > European Union Public License (EUPL)[1] 1.1 + > GNU Library or "Lesser" General Public License (LGPL) 2.0/2.1/3.0 + > GNU General Public License (GPL) 3.0 + > IBM Public License 1.0 + > Jabber Open Source License 1.0 + > MIT License (As listed in file MIT-License.txt) - + > Mozilla Public License (MPL) 1.0/1.1 + > Open Software License 2.0 + > OpenSSL license (with original SSLeay license) "2003" ("1998") + > PHP License 3.0/3.01 + > Python license (CNRI Python License) - + > Python Software Foundation License 2.1.1 + > Sleepycat License "1999" + > University of Illinois/NCSA Open Source License - + > W3C License "2001" + > X11 License "2001" + > Zlib/libpng License - + > Zope Public License 2.0 + > [1] When an Independent Work is licensed under a "Compatible License" + > pursuant to the EUPL, the Compatible License rather than the EUPL is + > the applicable license for purposes of these FOSS License Exception + > Terms and Conditions. + . + The above text is subject to this copyright notice: + © 2010, Oracle and/or its affiliats. + +Files: cmd-line-utils/libedit/config.h + dbug/example1.c + dbug/example2.c + dbug/example3.c + dbug/factorial.c + dbug/main.c + dbug/my_main.c + dbug/remove_function_from_trace.pl + dbug/tests.c + dbug/tests-t.pl + extra/yassl/src/dummy.cpp + include/probes_mysql_nodtrace.h + libmysqld/resource.h + mysql-test/* + regex/* + sql-bench/graph-compare-results.sh + storage/ndb/bin/* + storage/ndb/demos/* + support-files/binary-configure.sh + support-files/my-huge.cnf.sh + support-files/my-innodb-heavy-4G.cnf.sh + support-files/my-large.cnf.sh + support-files/my-medium.cnf.sh + support-files/my-small.cnf.sh + support-files/mysqld_multi.server.sh + support-files/mysql-log-rotate.sh + support-files/mysql.server-sys5.sh +Copyright: UNKNOWN +Comment: These files fall under the blanket license specified in the file + COPYING and README +License: GPL-2 + GPLv2 Disclaimer + For the avoidance of doubt, except that if any license choice + other than GPL or LGPL is available it will apply instead, + Oracle elects to use only the General Public License version 2 + (GPLv2) at this time for any software where a choice of GPL + license versions is made available with the language indicating + that GPLv2 or any later version may be used, or where a choice + of which version of the GPL is applied is otherwise unspecified. + +Files: BUILD/* + client/* + client/echo.c + client/get_password.c + cmake/* + dbug/dbug_add_tags.pl + extra/* + include/* + libmysql/* + libmysqld/* + libservices/* + mysql-test/include/have_perfschema.inc + mysql-test/include/have_perfschema.inc + mysql-test/lib/mtr_cases.pm + mysql-test/lib/mtr_gcov.pl + mysql-test/lib/mtr_gprof.pl + mysql-test/lib/mtr_io.pl + mysql-test/lib/mtr_match.pm + mysql-test/lib/mtr_misc.pl + mysql-test/lib/mtr_process.pl + mysql-test/lib/mtr_report.pm + mysql-test/lib/mtr_results.pm + mysql-test/lib/mtr_stress.pl + mysql-test/lib/mtr_unique.pm + mysql-test/lib/My/ConfigFactory.pm + mysql-test/lib/My/Config.pm + mysql-test/lib/My/CoreDump.pm + mysql-test/lib/My/File/* + mysql-test/lib/My/Find.pm + mysql-test/lib/My/Handles.pm + mysql-test/lib/My/Options.pm + mysql-test/lib/My/Platform.pm + mysql-test/lib/My/SafeProcess/Base.pm + mysql-test/lib/My/SafeProcess.pm + mysql-test/lib/My/SafeProcess/safe_kill_win.cc + mysql-test/lib/My/SafeProcess/safe_process.cc + mysql-test/lib/My/SafeProcess/safe_process.pl + mysql-test/lib/My/SafeProcess/safe_process_win.cc + mysql-test/lib/My/SysInfo.pm + mysql-test/lib/My/Test.pm + mysql-test/lib/t/* + mysql-test/lib/v1/mtr_cases.pl + mysql-test/lib/v1/mtr_gcov.pl + mysql-test/lib/v1/mtr_gprof.pl + mysql-test/lib/v1/mtr_im.pl + mysql-test/lib/v1/mtr_io.pl + mysql-test/lib/v1/mtr_match.pl + mysql-test/lib/v1/mtr_misc.pl + mysql-test/lib/v1/mtr_process.pl + mysql-test/lib/v1/mtr_report.pl + mysql-test/lib/v1/mtr_stress.pl + mysql-test/lib/v1/mtr_timer.pl + mysql-test/lib/v1/mtr_unique.pl + mysql-test/lib/v1/My/* + mysql-test/lib/v1/My/* + mysql-test/lib/v1/mysql-test-run.pl + mysql-test/mysql-stress-test.pl + mysql-test/mysql-test-run.pl + mysql-test/std_data/* + mysql-test/suite/perfschema/include/* + mysql-test/suite/perfschema_stress/include/* + mysql-test/suite/perfschema_stress/include/* + mysys/* + packaging/WiX/ca/* + plugin/audit_null/* + plugin/auth/* + plugin/daemon_example/* + plugin/fulltext/* + plugin/semisync/semisync_slave.cc + plugin/semisync/semisync_slave.h + scripts/* + sql/* + sql-common/* + storage/* + strings/* + support-files/config.huge.ini.sh + support-files/config.medium.ini.sh + support-files/config.small.ini.sh + support-files/MacOSX/Description.plist.sh + support-files/MacOSX/Info.plist.sh + support-files/MacOSX/StartupParameters.plist.sh + support-files/MySQL-shared-compat.spec.sh + support-files/mysql.spec.sh + support-files/ndb-config-2-node.ini.sh + tests/* + unittest/* + vio/* +Copyright: 1979-2008 MySQL AB + 1995-2010 MySQL AB Sun Microsystems Inc + 1994-1997,2000-2011 Oracle and/or its affiliates. +License: GPL-2 + +Files: storage/innobase/* +Copyright: 1994-2011 Innobase Oy. +License: GPL-2 + +Files: cmd-line-utils/readline/* +Copyright: 1987-2006 Free Software Foundation Inc +License: GPL-2+ + +Files: cmd-line-utils/libedit/* +Copyright: 1989-1990,1992-1993 The Regents of the University of California. +License: BSD (3 clause) + +Files: cmd-line-utils/libedit/filecomplete.c + cmd-line-utils/libedit/filecomplete.h + cmd-line-utils/libedit/np/fgetln.c + cmd-line-utils/libedit/read.h + cmd-line-utils/libedit/readline.c + cmd-line-utils/libedit/readline/* +Copyright: 1997-2001 The NetBSD Foundation Inc +License: BSD (2 clause) + This code is derived from software contributed to The NetBSD Foundation + by Jaromir Dolecek. + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +Files: client/completion_hash.h + scripts/mysqlaccess.sh + scripts/mysql_fix_extensions.sh + scripts/mysql_setpermission.sh + sql-bench/* + storage/myisam/ftbench/ft-test-run.sh + storage/myisam/mi_test_all.sh + storage/ndb/test/run-test/atrt-analyze-result.sh + storage/ndb/test/run-test/atrt-clear-result.sh + storage/ndb/test/run-test/atrt-gather-result.sh + storage/ndb/test/run-test/atrt-setup.sh + storage/ndb/test/run-test/make-config.sh + storage/ndb/test/run-test/make-html-reports.sh + storage/ndb/test/run-test/make-index.sh + storage/ndb/test/run-test/ndb-autotest.sh + strings/strxmov.c + strings/strxnmov.c + support-files/MacOSX/postflight.sh + support-files/MacOSX/preflight.sh +Copyright: 2000-2009 MySQL AB Sun Microsystems Inc + 2000-2007 MySQL AB +License: LGPL + +Files: storage/archive/azio.c + storage/archive/azlib.h + zlib/* +Copyright: 1995-2005 Jean-loup Gailly and Mark Adler +License: zlib/libpng + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + . + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + . + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +Files: sql-bench/innotest1.sh + sql-bench/innotest1a.sh + sql-bench/innotest1b.sh + sql-bench/innotest2.sh + sql-bench/innotest2a.sh + sql-bench/innotest2b.sh +Copyright: 2000-2002 Innobase Oy & MySQL AB +Comment: These files fall under the blanket license specified in the file COPYING +License: GPL-2 + +Files: storage/innobase/btr/btr0sea.c + storage/innobase/include/log0log.h + storage/innobase/include/os0sync.h + storage/innobase/log/log0log.c + storage/innobase/row/row0sel.c +Copyright: 1995-1997,2009-2010 Innobase Oy. + 2008-2009 Google Inc +License: GPL-2 + +Files: storage/innobase/btr/btr0cur.c + storage/innobase/buf/buf0buf.c + storage/innobase/include/sync0rw.h + storage/innobase/include/sync0sync.h + storage/innobase/sync/* +Copyright: 1994-2011 Oracle and/or its affiliates. + 2008 Google Inc +License: GPL-2 + +Files: storage/myisam/rt_index.h + storage/myisam/rt_key.c + storage/myisam/rt_mbr.c + storage/myisam/rt_mbr.h + storage/myisam/sp_defs.h +Copyright: 2000,2002-2006 MySQL AB & Ramil Kalimullin +License: GPL-2 + +Files: storage/innobase/include/ut0bh.h + storage/innobase/trx/trx0rseg.c + storage/innobase/ut/ut0bh.c + storage/innobase/ut/ut0ut.c +Copyright: 1996,2010-2011 Oracle Corpn. +License: GPL-2 + +Files: plugin/semisync/semisync.cc + plugin/semisync/semisync.h + plugin/semisync/semisync_slave_plugin.cc +Copyright: 2008 MySQL AB + 2007 Google Inc +License: GPL-2 + +Files: strings/ctype-bin.c + strings/ctype-eucjpms.c + strings/ctype-ujis.c +Copyright: 2000,2002,2005-2011 Oracle and/or its affiliates. & tommy@valley.ne.jp +License: LGPL + On Debian and systems the full text of the GNU Library General Public + License version 2 can be found in the file + `/usr/share/common-licenses/LGPL-2` + +Files: scripts/mysqld_safe.sh + support-files/mysql-multi.server.sh + support-files/mysql.server.sh +Copyright: 1996 Abandoned TCX DataKonsult AB & Monty Program KB & Detron HB +License: PD + This file is public domain and comes with NO WARRANTY of any kind + +Files: sql/sql_yacc.cc + sql/sql_yacc.h +Copyright: 1984,1989-1990,2000-2006 Free Software Foundation, Inc. +License: GPL-2+ + +Files: storage/innobase/include/pars0grm.h + storage/innobase/pars/pars0grm.c +Copyright: 1995-2009 Innobase Oy. + 1984,1989-1990,2000-2004 Free Software Foundation Inc. +License: GPL-2 + As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. + . + 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 + +Files: storage/innobase/include/srv0srv.h + storage/innobase/srv/srv0start.c +Copyright: 1995-1996,2010-2011 Innobase Oy. + 2008-2009 Google Inc + 2009 Percona Inc +License: GPL-2 + +Files: plugin/semisync/semisync_master.cc + plugin/semisync/semisync_master_plugin.cc +Copyright: 2008-2009 MySQL AB Sun Microsystems Inc + 2007 Google Inc +License: GPL-2 + +Files: storage/innobase/include/os0file.h + storage/innobase/os/os0file.c +Copyright: 1995-2010 Innobase Oy. + 2009 Percona Inc +License: GPL-2 + +Files: include/t_ctype.h + strings/t_ctype.h +Copyright: 2000 MySQL AB + 1998 Theppitak Karoonboonyanan + 1998-1999 Pruet Boonma +License: GPL-2 + +Files: cmd-line-utils/libedit/np/strlcat.c + cmd-line-utils/libedit/np/strlcpy.c +Copyright: 1998 Todd C. Miller +License: ISC + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + . + THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL + WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE + FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Files: sql/nt_servc.cc + sql/nt_servc.h +Copyright: 1998 Abandoned Irena Pancirov - Irnet Snc +License: PD + This file is public domain and comes with NO WARRANTY of any kind + +Files: dbug/dbug.c + dbug/dbug_long.h +Copyright: 1987 Abandoned Fred Fish +License: UNKNOWN + N O T I C E + . + Copyright Abandoned, 1987, Fred Fish + . + . + This previously copyrighted work has been placed into the public + domain by the author and may be freely used for any purpose, + private or commercial. + . + Because of the number of inquiries I was receiving about the use + of this product in commercially developed works I have decided to + simply make it public domain to further its unrestricted use. I + specifically would be most happy to see this material become a + part of the standard Unix distributions by AT&T and the Berkeley + Computer Science Research Group, and a standard part of the GNU + system from the Free Software Foundation. + . + I would appreciate it, as a courtesy, if this notice is left in + all copies and derivative works. Thank you. + . + The author makes no warranty of any kind with respect to this + product and explicitly disclaims any implied warranties of mer- + chantability or fitness for any particular purpose. + +Files: cmd-line-utils/libedit/np/vis.c +Copyright: 1989-1993 The Regents of the University of California. + 1999-2005 The NetBSD Foundation Inc +License: BSD (3 clause) + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +Files: scripts/dheadgen.pl +Copyright: 2008-2009 Sun Microsystems Inc +License: BSD (3 clause) + +Files: storage/ndb/test/src/getarg.c +Copyright: 1997-2000 - Kungliga Tekniska Högskolan +License: BSD (3 clause) + +Files: storage/ndb/test/include/getarg.h +Copyright: 2003 MySQL AB + 1997-1999 Kungliga Tekniska Högskolan +License: BSD (3 clause) GPL-2 + 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 */ + . + Copyright (c) 1997, 1999 Kungliga Tekniska Högskolan + (Royal Institute of Technology, Stockholm, Sweden). + All rights reserved. + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + 3. Neither the name of the Institute nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +Files: storage/innobase/handler/ha_innodb.cc +Copyright: 2008-2009 Google Inc + 2009 Percona Inc + 2000-2011 MySQL AB & Innobase Oy. +License: GPL-2 + +Files: plugin/semisync/semisync_master.h +Copyright: 2008-2009 MySQL AB Sun Microsystems Inc + 2007 Google Inc +License: GPL-2 + +Files: storage/innobase/srv/srv0srv.c +Copyright: 2008-2009 Google Inc + 1995-2011 Oracle and/or its affiliates. + 2009 Percona Inc +License: GPL-2 + +Files: storage/innobase/ut/ut0rbt.c +Copyright: 2007-2010 Innobase Oy. + 2007 Oracle/Innobase Oy +License: GPL-2 + +Files: strings/ctype-win1250ch.c +Copyright: 2002-2010 Oracle and/or its affiliates. + 2001 Jan Pazdziora +License: GPL-2 + +Files: strings/ctype-tis620.c +Copyright: 1998 Theppitak Karoonboonyanan + 1989-1991 Samphan Raruenrom + 2000-2010 Oracle and/or its affiliates. + 2003 Sathit Jittanupat + 2001 Korakot Chaovavanich and + 1998-1999 Pruet Boonma +License: GPL-2 + +Files: storage/innobase/handler/ha_innodb.h +Copyright: 2000-2010 MySQL AB & Innobase Oy. +License: GPL-2 + +Files: strings/dtoa.c +Copyright: 2007-2010 Oracle and/or its affiliates. + 1991,2000-2001 Lucent Technologies +License: LGPL + +Files: scripts/mysqldumpslow.sh +Copyright: 2000-2002,2005-2009 MySQL AB Sun Microsystems Inc +License: LGPL + +Files: libmysqld/lib_sql.cc +Copyright: 2000 SWsoft company +License: SWsoft + This material is provided "as is", with absolutely no warranty expressed + or implied. Any use is at your own risk. + . + Permission to use or copy this software for any purpose is hereby granted + without fee, provided the above notices are retained on all copies. + Permission to modify the code and to distribute modified code is granted, + provided the above notices are retained, and a notice that the code was + modified is included with the above copyright notice. + +Files: tests/mail_to_db.pl +Copyright: 1998 Abandoned TCX DataKonsult AB & Monty Program KB & Detron HB +License: PD + This file is public domain and comes with NO WARRANTY of any kind + +Files: dbug/dbug_analyze.c +Copyright: 1987 June Binayak Banerjee +License: PD + This program may be freely distributed under the same terms and + conditions as Fred Fish's Dbug package. + +Files: regex/regexp.c +Copyright: 1986 University of Toronto +License: BSD-like + Permission is granted to anyone to use this software for any + purpose on any computer system, and to redistribute it freely, + subject to the following restrictions: + . + 1. The author is not responsible for the consequences of use of + this software, no matter how awful, even if they arise + from defects in it. + . + 2. The origin of this software must not be misrepresented, either + by explicit claim or by omission. + . + 3. Altered versions must be plainly marked as such, and must not + be misrepresented as being the original software. + +License: GPL-2 + 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + . + On Debian and systems the full text of the GNU General Public + License version 2 can be found in the file + `/usr/share/common-licenses/GPL-2` + +License: GPL-2+ + This file is part of GNU Readline, a library for reading lines + of text with interactive input and history editing. + . + Readline 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; either version 2, or (at your option) any + later version. + . + Readline 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 Readline; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + . + On Debian and systems the full text of the GNU General Public + License version 2 can be found in the file + `/usr/share/common-licenses/GPL-2` + +License: LGPL + 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 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. + . + 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., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301, USA + . + On Debian and systems the full text of the GNU Library General Public + License version 2 can be found in the file + `/usr/share/common-licenses/LGPL-2` + +License: BSD (3 clause) + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. diff --git a/debian/libmysqlclient-dev.README.Maintainer b/debian/libmysqlclient-dev.README.Maintainer new file mode 100644 index 000000000000..f24cdcd519d6 --- /dev/null +++ b/debian/libmysqlclient-dev.README.Maintainer @@ -0,0 +1,4 @@ +The examples directory includes files that might be needed by some +developers: +- header files not installed by default +- the example file udf_example.c diff --git a/debian/libmysqlclient-dev.dirs b/debian/libmysqlclient-dev.dirs new file mode 100644 index 000000000000..f6ad28704310 --- /dev/null +++ b/debian/libmysqlclient-dev.dirs @@ -0,0 +1,2 @@ +usr/include/ +usr/lib/ diff --git a/debian/libmysqlclient-dev.examples b/debian/libmysqlclient-dev.examples new file mode 100644 index 000000000000..f1649c311c4b --- /dev/null +++ b/debian/libmysqlclient-dev.examples @@ -0,0 +1 @@ +sql/udf_example.c diff --git a/debian/libmysqlclient-dev.files b/debian/libmysqlclient-dev.files new file mode 100644 index 000000000000..ea5554a3142c --- /dev/null +++ b/debian/libmysqlclient-dev.files @@ -0,0 +1,11 @@ +usr/bin/mysql_config +usr/include/mysql/* +usr/lib/*/libmysqlclient.a +usr/lib/*/libmysqlclient.so +usr/lib/*/libmysqlclient_r.a +usr/lib/*/libmysqlclient_r.so +usr/lib/*/mysql/plugin/ha_example.* +usr/lib/*/mysql/plugin/ha_*_plugin.a +usr/lib/*/mysql/plugin/ha_*_plugin.la +usr/share/aclocal/mysql.m4 +usr/share/man/man1/mysql_config.1 diff --git a/debian/libmysqlclient16.postinst b/debian/libmysqlclient16.postinst new file mode 100644 index 000000000000..29d3b86f978e --- /dev/null +++ b/debian/libmysqlclient16.postinst @@ -0,0 +1,12 @@ +#!/bin/bash -e + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + +# vim: ts=4 + + diff --git a/debian/libmysqlclient18.dirs b/debian/libmysqlclient18.dirs new file mode 100644 index 000000000000..2964de6141b6 --- /dev/null +++ b/debian/libmysqlclient18.dirs @@ -0,0 +1 @@ +usr/lib/ diff --git a/debian/libmysqlclient18.files b/debian/libmysqlclient18.files new file mode 100644 index 000000000000..fc62998bbc52 --- /dev/null +++ b/debian/libmysqlclient18.files @@ -0,0 +1,2 @@ +usr/lib/*/libmysqlclient.so.* +usr/lib/*/libmysqlclient_r.so.* diff --git a/debian/libmysqld-5.5-pic.README.Debian b/debian/libmysqld-5.5-pic.README.Debian new file mode 100644 index 000000000000..4ec22b7ed5bd --- /dev/null +++ b/debian/libmysqld-5.5-pic.README.Debian @@ -0,0 +1,5 @@ +This package was requested in http://bugs.debian.org/508406 because it +is needed by programs want to include the embedded MySQL into their +shared libraries. + +In order to get the full compile flags, use /bin/mysql_config_pic diff --git a/debian/libmysqld-5.5-pic.files b/debian/libmysqld-5.5-pic.files new file mode 100644 index 000000000000..18e5bedf3a8f --- /dev/null +++ b/debian/libmysqld-5.5-pic.files @@ -0,0 +1,2 @@ +usr/lib/mysql/libmysqld_pic.a +usr/bin/mysql_config_pic diff --git a/debian/libmysqld-dev.files b/debian/libmysqld-dev.files new file mode 100644 index 000000000000..11b84fbae27a --- /dev/null +++ b/debian/libmysqld-dev.files @@ -0,0 +1,2 @@ +usr/lib/*/libmysqld.a +usr/lib/*/libmysqlservices.a diff --git a/debian/libmysqld-pic.README.Debian b/debian/libmysqld-pic.README.Debian new file mode 100644 index 000000000000..4ec22b7ed5bd --- /dev/null +++ b/debian/libmysqld-pic.README.Debian @@ -0,0 +1,5 @@ +This package was requested in http://bugs.debian.org/508406 because it +is needed by programs want to include the embedded MySQL into their +shared libraries. + +In order to get the full compile flags, use /bin/mysql_config_pic diff --git a/debian/libmysqld-pic.files b/debian/libmysqld-pic.files new file mode 100644 index 000000000000..18e5bedf3a8f --- /dev/null +++ b/debian/libmysqld-pic.files @@ -0,0 +1,2 @@ +usr/lib/mysql/libmysqld_pic.a +usr/bin/mysql_config_pic diff --git a/debian/mysql-client-5.5.README.Debian b/debian/mysql-client-5.5.README.Debian new file mode 100644 index 000000000000..b245638f9c95 --- /dev/null +++ b/debian/mysql-client-5.5.README.Debian @@ -0,0 +1,4 @@ +FAQ: + +Q: My completition is gone, why? +A: You have "no-auto-rehash" in the "[mysql]" section of /etc/mysql/my.cnf! diff --git a/debian/mysql-client-5.5.dirs b/debian/mysql-client-5.5.dirs new file mode 100644 index 000000000000..ceda5922c5d5 --- /dev/null +++ b/debian/mysql-client-5.5.dirs @@ -0,0 +1,3 @@ +usr/bin/ +usr/share/man/man1/ +usr/share/perl5/ diff --git a/debian/mysql-client-5.5.docs b/debian/mysql-client-5.5.docs new file mode 100644 index 000000000000..21446855f517 --- /dev/null +++ b/debian/mysql-client-5.5.docs @@ -0,0 +1,2 @@ +debian/additions/innotop/changelog.innotop +README diff --git a/debian/mysql-client-5.5.files b/debian/mysql-client-5.5.files new file mode 100644 index 000000000000..e381cad97afa --- /dev/null +++ b/debian/mysql-client-5.5.files @@ -0,0 +1,36 @@ +usr/bin/innochecksum +usr/bin/innotop +usr/bin/myisam_ftdump +usr/bin/mysqlaccess +usr/bin/mysqladmin +usr/bin/mysqlbug +usr/bin/mysql_client_test +usr/bin/mysqldump +usr/bin/mysqldumpslow +usr/bin/mysql_find_rows +usr/bin/mysql_fix_extensions +usr/bin/mysqlimport +usr/bin/mysqlreport +usr/bin/mysqlshow +usr/bin/mysqlslap +usr/bin/mysql_waitpid +usr/bin/mysql_plugin +usr/share/man/man1/innotop.1 +usr/share/man/man1/myisam_ftdump.1 +usr/share/man/man1/mysqlaccess.1 +usr/share/man/man1/mysqladmin.1 +usr/share/man/man1/mysqlbug.1 +usr/share/man/man1/mysql_client_test.1 +usr/share/man/man1/mysql_client_test_embedded.1 +usr/share/man/man1/mysqldump.1 +usr/share/man/man1/mysqldumpslow.1 +usr/share/man/man1/mysql_find_rows.1 +usr/share/man/man1/mysql_fix_extensions.1 +usr/share/man/man1/mysqlimport.1 +usr/share/man/man1/mysqlman.1 +usr/share/man/man1/mysqlreport.1 +usr/share/man/man1/mysqlshow.1 +usr/share/man/man1/mysqlslap.1 +usr/share/man/man1/mysql_tableinfo.1 +usr/share/man/man1/mysql_waitpid.1 +usr/share/man/man1/mysql_plugin.1 diff --git a/debian/mysql-client-5.5.links b/debian/mysql-client-5.5.links new file mode 100644 index 000000000000..0b86e87f2e92 --- /dev/null +++ b/debian/mysql-client-5.5.links @@ -0,0 +1,6 @@ +usr/bin/mysqlcheck usr/bin/mysqlrepair +usr/bin/mysqlcheck usr/bin/mysqlanalyze +usr/bin/mysqlcheck usr/bin/mysqloptimize +usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlrepair.1.gz +usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlanalyze.1.gz +usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqloptimize.1.gz diff --git a/debian/mysql-client-5.5.lintian-overrides b/debian/mysql-client-5.5.lintian-overrides new file mode 100644 index 000000000000..9a59d06948fa --- /dev/null +++ b/debian/mysql-client-5.5.lintian-overrides @@ -0,0 +1,5 @@ +mysql-client-5.5: package-has-a-duplicate-relation +mysql-client-5.5: wrong-name-for-upstream-changelog usr/share/doc/mysql-client-5.5/changelog.innotop.gz +mysql-client-5.5: pkg-not-in-package-test innotop +mysql-client-5.5: binary-without-manpage usr/bin/innochecksum +mysql-client-5.5: binary-without-manpage usr/bin/mysqltest_embedded diff --git a/debian/mysql-client-core-5.5.files b/debian/mysql-client-core-5.5.files new file mode 100644 index 000000000000..a2781309439d --- /dev/null +++ b/debian/mysql-client-core-5.5.files @@ -0,0 +1,4 @@ +usr/bin/mysql +usr/bin/mysqlcheck +usr/share/man/man1/mysql.1 +usr/share/man/man1/mysqlcheck.1 diff --git a/debian/mysql-common.dirs b/debian/mysql-common.dirs new file mode 100644 index 000000000000..a5a88ede9c12 --- /dev/null +++ b/debian/mysql-common.dirs @@ -0,0 +1 @@ +etc/mysql/conf.d/ diff --git a/debian/mysql-common.files b/debian/mysql-common.files new file mode 100644 index 000000000000..f35934286355 --- /dev/null +++ b/debian/mysql-common.files @@ -0,0 +1 @@ +etc/mysql/my.cnf diff --git a/debian/mysql-common.lintian-overrides b/debian/mysql-common.lintian-overrides new file mode 100644 index 000000000000..c6c60ccdc71a --- /dev/null +++ b/debian/mysql-common.lintian-overrides @@ -0,0 +1,2 @@ +script-not-executable ./usr/share/mysql-common/internal-use-only/_etc_init.d_mysql +script-not-executable ./usr/share/mysql-common/internal-use-only/_etc_mysql_debian-start diff --git a/debian/mysql-common.postrm b/debian/mysql-common.postrm new file mode 100644 index 000000000000..0d3f8aed83d5 --- /dev/null +++ b/debian/mysql-common.postrm @@ -0,0 +1,7 @@ +#!/bin/bash -e + +if [ "$1" = "purge" ]; then + rmdir /etc/mysql 2>/dev/null || true +fi + +#DEBHELPER# diff --git a/debian/mysql-server-5.5.NEWS b/debian/mysql-server-5.5.NEWS new file mode 100644 index 000000000000..44baefe3276b --- /dev/null +++ b/debian/mysql-server-5.5.NEWS @@ -0,0 +1,34 @@ +mysql-dfsg-5.1 (5.1.36-1) unstable; urgency=low + + * Please read http://dev.mysql.com/doc/refman/5.1/en/upgrading-from-5-0.html + * Make sure to do a REPAIR TABLE on all tables that use UTF-8 and have a + FULLTEXT index. + + -- Christian Hammers Sat, 4 Jul 2009 02:31:21 +0200 + +mysql-dfsg-5.0 (5.1.14beta-2) unstable; urgency=low + + * The BerkeleyDB Storage Engine is no longer supported. If the options + have-bdb or skip-bdb are found, MySQL will not start. If you have BDB + tables, you should change them to use another storage engine before + upgrading to 5.1. + + -- Monty Taylor Thu, 18 Jan 2007 12:28:21 -0800 + +mysql-dfsg-5.0 (5.0.45-2) unstable; urgency=low + + * Binary logging is now disabled by default. If you really need it (e.g. on + a replication master), remove the comment from the log_bin line in my.cnf. + + -- Norbert Tretkowski Sat, 10 Nov 2007 16:26:35 +0100 + +mysql-dfsg-5.0 (5.0.18-9) unstable; urgency=low + + * Rotation of the binary logs is now configured in /etc/mysql/my.cnf with + "expire-logs-days" which defaults to 20 days. The old file + /etc/mysql/debian-log-rotate.conf should be removed together with + /etc/cron.daily/mysql-server after this value has been adjusted. Note that + the old variable defined the number of files whereas the new one defines + a time span in days. + + -- Christian Hammers Tue, 24 Jan 2006 22:18:21 +0100 diff --git a/debian/mysql-server-5.5.README.Debian b/debian/mysql-server-5.5.README.Debian new file mode 100644 index 000000000000..741243f1ec3f --- /dev/null +++ b/debian/mysql-server-5.5.README.Debian @@ -0,0 +1,109 @@ +* MYSQL WON'T START OR STOP?: +============================= +You may never ever delete the special mysql user "debian-sys-maint". This +user together with the credentials in /etc/mysql/debian.cnf are used by the +init scripts to stop the server as they would require knowledge of the mysql +root users password else. +So in most of the times you can fix the situation by making sure that the +debian.cnf file contains the right password, e.g. by setting a new one +(remember to do a "flush privileges" then). + +* WHAT TO DO AFTER UPGRADES: +============================ +The privilege tables are automatically updated so all there is left is read +the changelogs on dev.mysql.com to see if any changes affect custom apps. + +* WHAT TO DO AFTER INSTALLATION: +================================ +The MySQL manual describes certain steps to do at this stage in a separate +chapter. They are not necessary as the Debian packages does them +automatically. + +The only thing that is left over for the admin is + - setting the passwords + - creating new users and databases + - read the rest of this text + +* DOWNGRADING TO 4.0 or 4.1: +============================ +Unsupported. Period. +But if you do and get problems or make interesting experiences, mail me, it +might help others. +Ok, if you really want, I would recommend to "mysqldump --opt" all tables, +then purge 4.1, delete /var/lib/mysql, install 4.0 and insert the dumps. Be +carefully, though, with the "mysql" table, you might not simply overwrite that +one as the password for the mysql "debian-sys-maint" user is stored in +/etc/mysql/debian.cnf and needed by /etc/init.d/ to start mysql and check if +it's alive. + +* SOME APPLICATION CAN NO LONGER CONNECT: +========================================= +This application is probably linked against libmysqlclient12 or below and +somebody has created a mysql user with new-style passwords. +The old_passwords=1 option in /etc/mysql/my.cnf might help. If not the +application that inserted the user has to be changed or the application that +tries to connect updated to libmysqlclient14 or -15. + +* NETWORKING: +============= +For security reasons, the Debian package has enabled networking only on the +loop-back device using "bind-address" in /etc/mysql/my.cnf. Check with +"netstat -tlnp" where it is listening. If your connection is aborted +immediately see if "mysqld: all" or similar is in /etc/hosts.allow and read +hosts_access(5). + +* WHERE IS THE DOCUMENTATION?: +============================== +Unfortunately due to licensing restrictions, debian currently not able +to provide the mysql-doc package in any format. For the most up to date +documentation, please go to http://dev.mysql.com/doc. + +* PASSWORDS: +============ +It is strongly recommended to set a password for the mysql root user (which + /usr/bin/mysql -u root -D mysql -e "update user set password=password('new-password') where user='root'" + /usr/bin/mysql -u root -e "flush privileges" +If you already had a password set add "-p" before "-u" to the lines above. + + +If you are tired to type the password in every time or want to automate your +scripts you can store it in the file $HOME/.my.cnf. It should be chmod 0600 +(-rw------- username username .my.cnf) to ensure that nobody else can read +it. Every other configuration parameter can be stored there, too. You will +find an example below and more information in the MySQL manual in +/usr/share/doc/mysql-doc or www.mysql.com. + +ATTENTION: It is necessary, that a .my.cnf from root always contains a "user" +line wherever there is a "password" line, else, the Debian maintenance +scripts, that use /etc/mysql/debian.cnf, will use the username +"debian-sys-maint" but the password that is in root's .my.cnf. Also note, +that every change you make in the /root/.my.cnf will affect the mysql cron +script, too. + + # an example of $HOME/.my.cnf + [client] + user = your-mysql-username + password = enter-your-good-new-password-here + +* BIG_ROWS FOR EVEN MORE ROWS IN A TABLE: +========================================= +If you ever run out of rows in a table there is the possibility of building +the package with "-DBIG_ROWS" which, according to a MySQL employee on +packagers@lists.mysql.com should lead to a 64bit row index (I guess > 2^32 +rows) but also to an approx. 5% performance loss. + +* BerkeleyDB Storage Engine +=========================== +Support for BerkeleyDB has been removed in 5.1, and consequently both the +have-bdb and skip-bdb configuration options will cause the server to fail. +Removing the options from /etc/mysql/my.cnf will fix this problem. + +* FURTHER NOTES ON REPLICATION +=============================== +If the MySQL server is acting as a replication slave, you should not +set --tmpdir to point to a directory on a memory-based filesystem or to +a directory that is cleared when the server host restarts. A replication +slave needs some of its temporary files to survive a machine restart so +that it can replicate temporary tables or LOAD DATA INFILE operations. If +files in the temporary file directory are lost when the server restarts, +replication fails. diff --git a/debian/mysql-server-5.5.config b/debian/mysql-server-5.5.config new file mode 100644 index 000000000000..c7eed2d72633 --- /dev/null +++ b/debian/mysql-server-5.5.config @@ -0,0 +1,46 @@ +#!/bin/bash -e + +. /usr/share/debconf/confmodule + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +CNF=/etc/mysql/my.cnf + +# Beware that there are two ypwhich one of them needs the 2>/dev/null! +if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then + db_input high mysql-server-5.5/nis_warning || true + db_go +fi + +# only ask this question on fresh installs, during "reconfiguration" and when +# not upgrading from an existing 5.0 installation. +# there is also an additional check for empty root passwords in the +# postinst script when the tools are available for us to use. +if [ "$1" = "configure" ] && ([ -z "$2" ] && [ ! -e "/var/lib/mysql/debian-5.0.flag" ] ) || [ "$1" = "reconfigure" ]; then + while :; do + RET="" + db_input high mysql-server/root_password || true + db_go + db_get mysql-server/root_password + # if password isn't empty we ask for password verification + if [ -z "$RET" ]; then + db_fset mysql-server/root_password seen false + db_fset mysql-server/root_password_again seen false + break + fi + ROOT_PW="$RET" + db_input high mysql-server/root_password_again || true + db_go + db_get mysql-server/root_password_again + if [ "$RET" == "$ROOT_PW" ]; then + ROOT_PW='' + break + fi + db_fset mysql-server/password_mismatch seen false + db_input critical mysql-server/password_mismatch + db_set mysql-server/root_password "" + db_set mysql-server/root_password_again "" + db_go + done +fi diff --git a/debian/mysql-server-5.5.dirs b/debian/mysql-server-5.5.dirs new file mode 100644 index 000000000000..bca0108e4804 --- /dev/null +++ b/debian/mysql-server-5.5.dirs @@ -0,0 +1,6 @@ +etc/init.d +etc/logrotate.d +etc/mysql/conf.d +usr/bin +usr/share/mysql +var/lib/mysql-upgrade diff --git a/debian/mysql-server-5.5.files b/debian/mysql-server-5.5.files new file mode 100644 index 000000000000..07e801869fa4 --- /dev/null +++ b/debian/mysql-server-5.5.files @@ -0,0 +1,59 @@ +etc/apparmor.d/usr.sbin.mysqld +usr/share/apport/package-hooks/source_mysql-5.5.py +usr/lib/mysql/*so* +usr/lib/mysql/plugin/*.so +etc/mysql/debian-start +etc/mysql/conf.d/mysqld_safe_syslog.cnf +usr/bin/msql2mysql +usr/bin/myisamchk +usr/bin/myisamlog +usr/bin/myisampack +usr/bin/mysql_convert_table_format +usr/bin/mysql_secure_installation +usr/bin/mysql_setpermission +usr/bin/mysql_tzinfo_to_sql +usr/bin/mysql_zap +usr/bin/mysqlbinlog +usr/bin/mysqld_multi +usr/bin/mysqld_safe +usr/bin/mysqlhotcopy +usr/bin/mysqltest +usr/bin/perror +usr/bin/replace +usr/bin/resolve_stack_dump +usr/bin/resolveip +usr/share/doc/mysql-server-5.5/ +usr/share/man/man1/msql2mysql.1 +usr/share/man/man1/myisamchk.1 +usr/share/man/man1/myisamlog.1 +usr/share/man/man1/myisampack.1 +usr/share/man/man1/mysqlbinlog.1 +usr/share/man/man1/mysql_convert_table_format.1 +usr/share/man/man1/mysqld_multi.1 +usr/share/man/man1/mysqld_safe.1 +usr/share/man/man1/mysqlhotcopy.1 +usr/share/man/man1/mysql_secure_installation.1 +usr/share/man/man1/mysql_setpermission.1 +usr/share/man/man1/mysqltest.1 +usr/share/man/man1/mysql_zap.1 +usr/share/man/man1/perror.1 +usr/share/man/man1/replace.1 +usr/share/man/man1/resolveip.1 +usr/share/man/man1/resolve_stack_dump.1 +usr/share/man/man1/innochecksum.1 +usr/share/man/man1/mysqltest_embedded.1 +usr/share/man/man1/mysql_tzinfo_to_sql.1 +usr/share/mysql/debian-start.inc.sh +usr/share/mysql/echo_stderr +usr/share/mysql/errmsg-utf8.txt +usr/share/mysql/mysqld_multi.server +usr/share/mysql/mysql_test_data_timezone.sql +usr/share/mysql/config.huge.ini +usr/share/mysql/config.medium.ini +usr/share/mysql/config.small.ini +usr/share/mysql/ndb-config-2-node.ini +usr/share/mysql/debian-start.inc.sh +usr/share/mysql/echo_stderr +usr/share/mysql/errmsg-utf8.txt +usr/share/mysql/mysqld_multi.server +usr/share/mysql/mysql_test_data_timezone.sql diff --git a/debian/mysql-server-5.5.lintian-overrides b/debian/mysql-server-5.5.lintian-overrides new file mode 100644 index 000000000000..e47fbbf77741 --- /dev/null +++ b/debian/mysql-server-5.5.lintian-overrides @@ -0,0 +1,5 @@ +mysql-server-5.5: command-with-path-in-maintainer-script postinst +mysql-server-5.5: possible-bashism-in-maintainer-script postinst:81 'p{("a".."z","A".."Z",0..9)[int(rand(62))]}' +mysql-server-5.5: possible-bashism-in-maintainer-script preinst:33 '${cmd/ */}' +mysql-server-5.5: statically-linked-binary ./usr/bin/mysql_tzinfo_to_sql +mysql-server-5.5: statically-linked-binary ./usr/sbin/mysqld diff --git a/debian/mysql-server-5.5.logcheck.ignore.paranoid b/debian/mysql-server-5.5.logcheck.ignore.paranoid new file mode 100644 index 000000000000..00cc5c3e29d0 --- /dev/null +++ b/debian/mysql-server-5.5.logcheck.ignore.paranoid @@ -0,0 +1,9 @@ +/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$ +/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$ +mysqld\[[0-9]+\]: $ +mysqld\[[0-9]+\]: Version: .* socket: '/var/run/mysqld/mysqld.sock' port: 3306$ +mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$ +mysqld_safe\[[0-9]+\]: started$ +usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$ +usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$ diff --git a/debian/mysql-server-5.5.logcheck.ignore.server b/debian/mysql-server-5.5.logcheck.ignore.server new file mode 100644 index 000000000000..37f25cb01ea9 --- /dev/null +++ b/debian/mysql-server-5.5.logcheck.ignore.server @@ -0,0 +1,32 @@ +/etc/init.d/mysql\[[0-9]+\]: [0-9]+ processes alive and '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$ +/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$ +mysqld\[[0-9]+\]: ?$ +mysqld\[[0-9]+\]: .*InnoDB: Shutdown completed +mysqld\[[0-9]+\]: .*InnoDB: Started; +mysqld\[[0-9]+\]: .*InnoDB: Starting shutdown\.\.\.$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Normal shutdown$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: ready for connections\.$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Shutdown complete$ +mysqld\[[0-9]+\]: /usr/sbin/mysqld: ready for connections\.$ +mysqld\[[0-9]+\]: .*/usr/sbin/mysqld: Shutdown Complete$ +mysqld\[[0-9]+\]: Version: .* socket +mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$ +mysqld_safe\[[0-9]+\]: ?$ +mysqld_safe\[[0-9]+\]: able to use the new GRANT command!$ +mysqld_safe\[[0-9]+\]: ended$ +mysqld_safe\[[0-9]+\]: http://www.mysql.com$ +mysqld_safe\[[0-9]+\]: NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run$ +mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$ +mysqld_safe\[[0-9]+\]: Please report any problems with the /usr/bin/mysqlbug script!$ +mysqld_safe\[[0-9]+\]: See the manual for more instructions.$ +mysqld_safe\[[0-9]+\]: started$ +mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at https://order.mysql.com$ +mysqld_safe\[[0-9]+\]: The latest information about MySQL is available on the web at$ +mysqld_safe\[[0-9]+\]: the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be$ +mysqld_safe\[[0-9]+\]: To do so, start the server, then issue the following commands:$ +mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root -h app109 password 'new-password'$ +mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root password 'new-password'$ +usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$ +usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$ diff --git a/debian/mysql-server-5.5.logcheck.ignore.workstation b/debian/mysql-server-5.5.logcheck.ignore.workstation new file mode 100644 index 000000000000..37f25cb01ea9 --- /dev/null +++ b/debian/mysql-server-5.5.logcheck.ignore.workstation @@ -0,0 +1,32 @@ +/etc/init.d/mysql\[[0-9]+\]: [0-9]+ processes alive and '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$ +/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$ +mysqld\[[0-9]+\]: ?$ +mysqld\[[0-9]+\]: .*InnoDB: Shutdown completed +mysqld\[[0-9]+\]: .*InnoDB: Started; +mysqld\[[0-9]+\]: .*InnoDB: Starting shutdown\.\.\.$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Normal shutdown$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: ready for connections\.$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Shutdown complete$ +mysqld\[[0-9]+\]: /usr/sbin/mysqld: ready for connections\.$ +mysqld\[[0-9]+\]: .*/usr/sbin/mysqld: Shutdown Complete$ +mysqld\[[0-9]+\]: Version: .* socket +mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$ +mysqld_safe\[[0-9]+\]: ?$ +mysqld_safe\[[0-9]+\]: able to use the new GRANT command!$ +mysqld_safe\[[0-9]+\]: ended$ +mysqld_safe\[[0-9]+\]: http://www.mysql.com$ +mysqld_safe\[[0-9]+\]: NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run$ +mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$ +mysqld_safe\[[0-9]+\]: Please report any problems with the /usr/bin/mysqlbug script!$ +mysqld_safe\[[0-9]+\]: See the manual for more instructions.$ +mysqld_safe\[[0-9]+\]: started$ +mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at https://order.mysql.com$ +mysqld_safe\[[0-9]+\]: The latest information about MySQL is available on the web at$ +mysqld_safe\[[0-9]+\]: the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be$ +mysqld_safe\[[0-9]+\]: To do so, start the server, then issue the following commands:$ +mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root -h app109 password 'new-password'$ +mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root password 'new-password'$ +usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$ +usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$ diff --git a/debian/mysql-server-5.5.mysql-server.logrotate b/debian/mysql-server-5.5.mysql-server.logrotate new file mode 100644 index 000000000000..c20c98968c52 --- /dev/null +++ b/debian/mysql-server-5.5.mysql-server.logrotate @@ -0,0 +1,27 @@ +# - I put everything in one block and added sharedscripts, so that mysql gets +# flush-logs'd only once. +# Else the binary logs would automatically increase by n times every day. +# - The error log is obsolete, messages go to syslog now. +/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/error.log { + daily + rotate 7 + missingok + create 640 mysql adm + compress + sharedscripts + postrotate + test -x /usr/bin/mysqladmin || exit 0 + # If this fails, check debian.conf! + MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" + if [ -z "`$MYADMIN ping 2>/dev/null`" ]; then + # Really no mysqld or rather a missing debian-sys-maint user? + # If this occurs and is not a error please report a bug. + #if ps cax | grep -q mysqld; then + if killall -q -s0 -umysql mysqld; then + exit 1 + fi + else + $MYADMIN flush-logs + fi + endscript +} diff --git a/debian/mysql-server-5.5.mysql.init b/debian/mysql-server-5.5.mysql.init new file mode 100644 index 000000000000..983a8c28d7df --- /dev/null +++ b/debian/mysql-server-5.5.mysql.init @@ -0,0 +1,187 @@ +#!/bin/bash +# +### BEGIN INIT INFO +# Provides: mysql +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Should-Start: $network $time +# Should-Stop: $network $time +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start and stop the mysql database server daemon +# Description: Controls the main MySQL database server daemon "mysqld" +# and its wrapper script "mysqld_safe". +### END INIT INFO +# +set -e +set -u +${DEBIAN_SCRIPT_DEBUG:+ set -v -x} + +test -x /usr/bin/mysqld_safe || exit 0 + +. /lib/lsb/init-functions + +SELF=$(cd $(dirname $0); pwd -P)/$(basename $0) +CONF=/etc/mysql/my.cnf +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" + +# priority can be overriden and "-s" adds output to stderr +ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mysql -i" + +# Safeguard (relative paths, core dumps..) +cd / +umask 077 + +# mysqladmin likes to read /root/.my.cnf. This is usually not what I want +# as many admins e.g. only store a password without a username there and +# so break my scripts. +export HOME=/etc/mysql/ + +## Fetch a particular option from mysql's invocation. +# +# Usage: void mysqld_get_param option +mysqld_get_param() { + /usr/sbin/mysqld --print-defaults \ + | tr " " "\n" \ + | grep -- "--$1" \ + | tail -n 1 \ + | cut -d= -f2 +} + +## Do some sanity checks before even trying to start mysqld. +sanity_checks() { + # check for config file + if [ ! -r /etc/mysql/my.cnf ]; then + log_warning_msg "$0: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" + echo "WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" | $ERR_LOGGER + fi + + # check for diskspace shortage + datadir=`mysqld_get_param datadir` + if LC_ALL=C BLOCKSIZE= df --portability $datadir/. | tail -n 1 | awk '{ exit ($4>4096) }'; then + log_failure_msg "$0: ERROR: The partition with $datadir is too full!" + echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER + exit 1 + fi +} + +## Checks if there is a server running and if so if it is accessible. +# +# check_alive insists on a pingable server +# check_dead also fails if there is a lost mysqld in the process list +# +# Usage: boolean mysqld_status [check_alive|check_dead] [warn|nowarn] +mysqld_status () { + ping_output=`$MYADMIN ping 2>&1`; ping_alive=$(( ! $? )) + + ps_alive=0 + pidfile=`mysqld_get_param pid-file` + if [ -f "$pidfile" ] && ps `cat $pidfile` >/dev/null 2>&1; then ps_alive=1; fi + + if [ "$1" = "check_alive" -a $ping_alive = 1 ] || + [ "$1" = "check_dead" -a $ping_alive = 0 -a $ps_alive = 0 ]; then + return 0 # EXIT_SUCCESS + else + if [ "$2" = "warn" ]; then + echo -e "$ps_alive processes alive and '$MYADMIN ping' resulted in\n$ping_output\n" | $ERR_LOGGER -p daemon.debug + fi + return 1 # EXIT_FAILURE + fi +} + +# +# main() +# + +case "${1:-''}" in + 'start') + sanity_checks; + # Start daemon + log_daemon_msg "Starting MySQL database server" "mysqld" + if mysqld_status check_alive nowarn; then + log_progress_msg "already running" + log_end_msg 0 + else + # Could be removed during boot + test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld + + # Start MySQL! + /usr/bin/mysqld_safe > /dev/null 2>&1 & + + # 6s was reported in #352070 to be too few when using ndbcluster + for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do + sleep 1 + if mysqld_status check_alive nowarn ; then break; fi + log_progress_msg "." + done + if mysqld_status check_alive warn; then + log_end_msg 0 + # Now start mysqlcheck or whatever the admin wants. + output=$(/etc/mysql/debian-start) + [ -n "$output" ] && log_action_msg "$output" + else + log_end_msg 1 + log_failure_msg "Please take a look at the syslog" + fi + fi + ;; + + 'stop') + # * As a passwordless mysqladmin (e.g. via ~/.my.cnf) must be possible + # at least for cron, we can rely on it here, too. (although we have + # to specify it explicit as e.g. sudo environments points to the normal + # users home and not /root) + log_daemon_msg "Stopping MySQL database server" "mysqld" + if ! mysqld_status check_dead nowarn; then + set +e + shutdown_out=`$MYADMIN shutdown 2>&1`; r=$? + set -e + if [ "$r" -ne 0 ]; then + log_end_msg 1 + [ "$VERBOSE" != "no" ] && log_failure_msg "Error: $shutdown_out" + log_daemon_msg "Killing MySQL database server by signal" "mysqld" + killall -15 mysqld + server_down= + for i in 1 2 3 4 5 6 7 8 9 10; do + sleep 1 + if mysqld_status check_dead nowarn; then server_down=1; break; fi + done + if test -z "$server_down"; then killall -9 mysqld; fi + fi + fi + + if ! mysqld_status check_dead warn; then + log_end_msg 1 + log_failure_msg "Please stop MySQL manually and read /usr/share/doc/mysql-server-5.5/README.Debian.gz!" + exit -1 + else + log_end_msg 0 + fi + ;; + + 'restart') + set +e; $SELF stop; set -e + $SELF start + ;; + + 'reload'|'force-reload') + log_daemon_msg "Reloading MySQL database server" "mysqld" + $MYADMIN reload + log_end_msg 0 + ;; + + 'status') + if mysqld_status check_alive nowarn; then + log_action_msg "$($MYADMIN version)" + else + log_action_msg "MySQL is stopped." + exit 3 + fi + ;; + + *) + echo "Usage: $SELF start|stop|restart|reload|force-reload|status" + exit 1 + ;; +esac + diff --git a/debian/mysql-server-5.5.mysql.upstart b/debian/mysql-server-5.5.mysql.upstart new file mode 100644 index 000000000000..d4c0b0736c0c --- /dev/null +++ b/debian/mysql-server-5.5.mysql.upstart @@ -0,0 +1,65 @@ +# MySQL Service + +description "MySQL Server" +author "Mario Limonciello " + +start on runlevel [2345] +stop on starting rc RUNLEVEL=[016] + +respawn +respawn limit 2 5 + +env HOME=/etc/mysql +umask 007 + +# The default of 5 seconds is too low for mysql which needs to flush buffers +kill timeout 300 + +pre-start script + ## Fetch a particular option from mysql's invocation. + # Usage: void mysqld_get_param option + mysqld_get_param() { + /usr/sbin/mysqld --print-defaults \ + | tr " " "\n" \ + | grep -- "--$1" \ + | tail -n 1 \ + | cut -d= -f2 + } + + # priority can be overriden and "-s" adds output to stderr + ERR_LOGGER="logger -p daemon.err -t /etc/init/mysql.conf -i" + + #Sanity checks + [ -r $HOME/my.cnf ] + [ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld + /lib/init/apparmor-profile-load usr.sbin.mysqld + + # check for diskspace shortage + datadir=`mysqld_get_param datadir` + BLOCKSIZE=`LC_ALL=C df --portability $datadir/. | tail -n 1 | awk '{print $4}'` + if [ $BLOCKSIZE -le 4096 ] ; then + echo "$0: ERROR: The partition with $datadir is too full!" >&2 + echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER + exit 1 + fi +end script + +exec /usr/sbin/mysqld + +post-start script + for i in `seq 1 30` ; do + /usr/bin/mysqladmin --defaults-file="${HOME}"/debian.cnf ping && { + exec "${HOME}"/debian-start + # should not reach this line + exit 2 + } + statusnow=`status` + if echo $statusnow | grep -q 'stop/' ; then + exit 0 + elif echo $statusnow | grep -q 'respawn/' ; then + exit 1 + fi + sleep 1 + done + exit 1 +end script diff --git a/debian/mysql-server-5.5.postinst b/debian/mysql-server-5.5.postinst new file mode 100644 index 000000000000..00608a9a0cff --- /dev/null +++ b/debian/mysql-server-5.5.postinst @@ -0,0 +1,282 @@ +#!/bin/bash -e + +. /usr/share/debconf/confmodule + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin + +# This command can be used as pipe to syslog. With "-s" it also logs to stderr. +ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i" + +invoke() { + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d mysql $1 + else + /etc/init.d/mysql $1 + fi +} + +MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables" + +test_mysql_access() { + mysql --no-defaults -u root -h localhost /dev/null 2>&1 +} + +# call with $1 = "online" to connect to the server, otherwise it bootstraps +set_mysql_rootpw() { + # forget we ever saw the password. don't use reset to keep the seen status + db_set mysql-server/root_password "" + db_set mysql-server/root_password_again "" + + tfile=`mktemp` + if [ ! -f "$tfile" ]; then + return 1 + fi + + # this avoids us having to call "test" or "[" on $rootpw + cat << EOF > $tfile +USE mysql; +UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root'; +FLUSH PRIVILEGES; +EOF + if grep -q 'PASSWORD("")' $tfile; then + retval=0 + elif [ "$1" = "online" ]; then + mysql --no-defaults -u root -h localhost <$tfile >/dev/null + retval=$? + else + $MYSQL_BOOTSTRAP <$tfile + retval=$? + fi + rm -f $tfile + return $retval +} + +# This is necessary because mysql_install_db removes the pid file in /var/run +# and because changed configuration options should take effect immediately. +# In case the server wasn't running at all it should be ok if the stop +# script fails. I can't tell at this point because of the cleaned /var/run. +set +e; invoke stop; set -e + +case "$1" in + configure) + mysql_datadir=/usr/share/mysql + mysql_statedir=/var/lib/mysql + mysql_rundir=/var/run/mysqld + mysql_logdir=/var/log + mysql_cfgdir=/etc/mysql + mysql_newlogdir=/var/log/mysql + mysql_upgradedir=/var/lib/mysql-upgrade + + # first things first, if the following symlink exists, it is a preserved + # copy the old data dir from a mysql upgrade that would have otherwise + # been replaced by an empty mysql dir. this should restore it. + for dir in DATADIR LOGDIR; do + if [ "$dir" = "DATADIR" ]; then targetdir=$mysql_statedir; else targetdir=$mysql_newlogdir; fi + savelink="$mysql_upgradedir/$dir.link" + if [ -L "$savelink" ]; then + # If the targetdir was a symlink before we upgraded it is supposed + # to be either still be present or not existing anymore now. + if [ -L "$targetdir" ]; then + rm "$savelink" + elif [ ! -d "$targetdir" ]; then + mv "$savelink" "$targetdir" + else + # this should never even happen, but just in case... + mysql_tmp=`mktemp -d -t mysql-symlink-restore-XXXXXX` + echo "this is very strange! see $mysql_tmp/README..." >&2 + mv "$targetdir" "$mysql_tmp" + cat << EOF > "$mysql_tmp/README" + +if you're reading this, it's most likely because you had replaced /var/lib/mysql +with a symlink, then upgraded to a new version of mysql, and then dpkg +removed your symlink (see #182747 and others). the mysql packages noticed +that this happened, and as a workaround have restored it. however, because +/var/lib/mysql seems to have been re-created in the meantime, and because +we don't want to rm -rf something we don't know as much about, we're going +to leave this unexpected directory here. if your database looks normal, +and this is not a symlink to your database, you should be able to blow +this all away. + +EOF + fi + fi + rmdir $mysql_upgradedir 2>/dev/null || true + done + + # Ensure the existence and right permissions for the database and + # log files. + if [ ! -d "$mysql_statedir" -a ! -L "$mysql_statedir" ]; then mkdir "$mysql_statedir"; fi + if [ ! -d "$mysql_statedir/mysql" -a ! -L "$mysql_statedir/mysql" ]; then mkdir "$mysql_statedir/mysql"; fi + if [ ! -d "$mysql_newlogdir" -a ! -L "$mysql_newlogdir" ]; then mkdir "$mysql_newlogdir"; fi + # When creating an ext3 jounal on an already mounted filesystem like e.g. + # /var/lib/mysql, you get a .journal file that is not modifyable by chown. + # The mysql_datadir must not be writable by the mysql user under any + # circumstances as it contains scripts that are executed by root. + set +e + chown -R 0:0 $mysql_datadir + chown -R mysql $mysql_statedir + chmod 700 $mysql_statedir $mysql_statedir/mysql + if [ ! -d "$mysql_rundir" ]; then mkdir "$mysql_rundir"; fi + chown -R mysql $mysql_rundir + chown -R mysql:adm $mysql_newlogdir; chmod 2750 $mysql_newlogdir; + for i in log err; do + touch $mysql_logdir/mysql.$i + chown mysql:adm $mysql_logdir/mysql.$i + chmod 0640 $mysql_logdir/mysql.$i + done + set -e + + # This is important to avoid dataloss when there is a removed + # mysql-server version from Woody lying around which used the same + # data directory and then somewhen gets purged by the admin. + db_set mysql-server/postrm_remove_database false || true + + # To avoid downgrades. + touch $mysql_statedir/debian-5.5.flag + + # initiate databases. Output is not allowed by debconf :-( + # Debian: beware of the bashisms... + # Debian: can safely run on upgrades with existing databases + set +e + bash /usr/bin/mysql_install_db --rpm 2>&1 | $ERR_LOGGER + if [ "$?" != "0" ]; then + echo "ATTENTION: An error has occured. More info is in the syslog!" + fi + set -e + + ## On every reconfiguration the maintenance user is recreated. + # + # - It is easier to regenerate the password every time but as people + # use fancy rsync scripts and file alteration monitors, the existing + # password is used and existing files not touched. + # - The mysqld statement is like that in mysql_install_db because the + # server is not already running. This has some implications: + # - The amount of newlines and semicolons in the query is important! + # - GRANT is not possible with --skip-grant-tables and "INSERT + # (user,host..) VALUES" is not --ansi compliant + # - The echo is just for readability. ash's buildin has no "-e" so use /bin/echo. + # - The Super_priv, Show_db_priv, Create_tmp_table_priv and Lock_tables_priv + # may not be present as old Woody 3.23 databases did not have it and the + # admin might not already have run mysql_upgrade which adds them. + # As the binlog cron scripts to need at least the Super_priv, I do first + # the old query which always succeeds and then the new which may or may not. + + # recreate the credentials file if not present or without mysql_upgrade stanza + dc=$mysql_cfgdir/debian.cnf; + if [ -e "$dc" -a -n "`fgrep mysql_upgrade $dc 2>/dev/null`" ]; then + pass="`sed -n 's/^[ ]*password *= *// p' $dc | head -n 1`" + else + pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`; + if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi + umask 066 + cat /dev/null > $dc + umask 022 + echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc + echo "[client]" >>$dc + echo "host = localhost" >>$dc + echo "user = debian-sys-maint" >>$dc + echo "password = $pass" >>$dc + echo "socket = $mysql_rundir/mysqld.sock" >>$dc + echo "[mysql_upgrade]" >>$dc + echo "host = localhost" >>$dc + echo "user = debian-sys-maint" >>$dc + echo "password = $pass" >>$dc + echo "socket = $mysql_rundir/mysqld.sock" >>$dc + echo "basedir = /usr" >>$dc + fi + # If this dir chmod go+w then the admin did it. But this file should not. + chown 0:0 $dc + chmod 0600 $dc + + # update privilege tables + password_column_fix_query=`echo -e \ + "USE mysql\n" \ + "ALTER TABLE user CHANGE Password Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL"`; + replace_query=`echo -e \ + "USE mysql\n" \ + "REPLACE INTO user SET " \ + " host='localhost', user='debian-sys-maint', password=password('$pass'), " \ + " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \ + " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \ + " Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \ + " Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\ + " Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\ + " Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\ + " Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\ + " Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y' "`; + fix_privs=`echo -e \ + "USE mysql;\n" \ + "ALTER TABLE user ADD column Create_view_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \ + "ALTER TABLE user ADD column Show_view_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \ + "ALTER TABLE user ADD column Create_routine_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \ + "ALTER TABLE user ADD column Alter_routine_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \ + "ALTER TABLE user ADD column Create_user_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \ + "ALTER TABLE user ADD column Event_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \ + "ALTER TABLE user ADD column Trigger_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " ` + # Engines supported by etch should be installed per default. The query sequence is supposed + # to be aborted if the CREATE TABLE fails due to an already existent table in which case the + # admin might already have chosen to remove one or more plugins. Newlines are necessary. + install_plugins=`echo -e \ + "USE mysql;\n" \ + "CREATE TABLE plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \ + " dl char(128) COLLATE utf8_bin NOT NULL DEFAULT '', " \ + " PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins';\n" \ + "INSERT INTO plugin VALUES ('innodb', 'ha_innodb.so');\n" \ + "INSERT INTO plugin VALUES ('federated', 'ha_federated.so');\n" \ + "INSERT INTO plugin VALUES ('blackhole', 'ha_blackhole.so');\n" \ + "INSERT INTO plugin VALUES ('archive', 'ha_archive.so');" ` + + # Upgrade password column format before the root password gets set. + echo "$password_column_fix_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + + db_get mysql-server/root_password && rootpw="$RET" + if ! set_mysql_rootpw; then + password_error="yes" + fi + + echo "$fix_privs" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + echo "$replace_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + set +e + echo "$install_plugins" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER + set -e + ;; + + abort-upgrade|abort-remove|abort-configure) + ;; + + *) + echo "postinst called with unknown argument '$1'" 1>&2 + exit 1 + ;; +esac + +# here we check to see if we can connect as root without a password +# this should catch upgrades from previous versions where the root +# password wasn't set. if there is a password, or if the connection +# fails for any other reason, nothing happens. +if [ "$1" = "configure" ]; then + if test_mysql_access; then + db_input medium mysql-server/root_password || true + db_go + db_get mysql-server/root_password && rootpw="$RET" + + if ! set_mysql_rootpw "online"; then + password_error="yes" + fi + fi + + if [ "$password_error" = "yes" ]; then + db_input high mysql-server/error_setting_password || true + db_go + fi + +fi + +db_stop # in case invoke failes + +#DEBHELPER# + +exit 0 diff --git a/debian/mysql-server-5.5.postrm b/debian/mysql-server-5.5.postrm new file mode 100644 index 000000000000..717fd88481c1 --- /dev/null +++ b/debian/mysql-server-5.5.postrm @@ -0,0 +1,83 @@ +#!/bin/bash -e + +# It is possible that Debconf has already been removed, too. +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" + +# Try to stop the server in a sane way. If it does not success let the admin +# do it himself. No database directories should be removed while the server +# is running! +stop_server() { + set +e + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d mysql stop + else + /etc/init.d/mysql stop + fi + errno=$? + set -e + + if [ "$?" != 0 ]; then + echo "Trying to stop the MySQL server resulted in exitcode $?." 1>&2 + echo "Stop it yourself and try again!" 1>&2 + exit 1 + fi +} + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then + stop_server + sleep 2 + fi + ;; + *) + echo "postrm called with unknown argument '$1'" 1>&2 + exit 1 + ;; +esac + +# +# - Do NOT purge logs or data if another mysql-sever* package is installed (#307473) +# - Remove the mysql user only after all his owned files are purged. +# +if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; then + # we remove the mysql user only after all his owned files are purged + rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz} + rm -rf /var/log/mysql + + db_input high mysql-server-5.5/postrm_remove_databases || true + db_go || true + db_get mysql-server-5.5/postrm_remove_databases || true + if [ "$RET" = "true" ]; then + # never remove the debian.cnf when the databases are still existing + # else we ran into big trouble on the next install! + rm -f /etc/mysql/debian.cnf + rm -rf /var/lib/mysql + rm -rf /var/run/mysqld + userdel mysql || true + fi + + # (normally) Automatically added by dh_installinit + if [ "$1" = "purge" ] ; then + update-rc.d mysql remove >/dev/null || exit 0 + fi + # (normally) End automatically added section +fi + +# (normally) Automatically added by dh_installdebconf +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +# (normally) End automatically added section + +#DEBHELPER# + +exit 0 diff --git a/debian/mysql-server-5.5.preinst b/debian/mysql-server-5.5.preinst new file mode 100644 index 000000000000..fda225fbca55 --- /dev/null +++ b/debian/mysql-server-5.5.preinst @@ -0,0 +1,183 @@ +#!/bin/bash -e +# +# summary of how this script can be called: +# * install +# * install +# * upgrade +# * abort-upgrade +# + +. /usr/share/debconf/confmodule + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" +DATADIR=/var/lib/mysql +LOGDIR=/var/log/mysql +UPGRADEDIR=/var/lib/mysql-upgrade + +# Try to stop the server in a sane way. If it does not success let the admin +# do it himself. No database directories should be removed while the server +# is running! Another mysqld in e.g. a different chroot is fine for us. +stop_server() { + if [ ! -x /etc/init.d/mysql ]; then return; fi + + set +e + if [ -x /usr/sbin/invoke-rc.d ]; then + cmd="invoke-rc.d mysql stop" + else + cmd="/etc/init.d/mysql stop" + fi + $cmd + errno=$? + set -e + + # 0=ok, 100=no init script (fresh install) + if [ "$errno" != 0 -a "$errno" != 100 ]; then + echo "${cmd/ */} returned $errno" 1>&2 + echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2 + echo "Stop it yourself and try again!" 1>&2 + db_stop + exit 1 + fi +} + +################################ main() ########################## + +this_version=5.5 + +# Abort if an NDB cluster is in use. +if egrep -qi -r '^[^#]*ndb.connectstring|^[[:space:]]*\[[[:space:]]*ndb_mgmd' /etc/mysql/; then + db_fset mysql-server/no_upgrade_when_using_ndb seen false || true + db_input high mysql-server/no_upgrade_when_using_ndb || true + db_go + db_stop + exit 1 +fi + +# Abort if skip-bdb option is enabled, required for 5.0 -> 5.1 upgrades. +#TODO + +# Safe the user from stupidities. +show_downgrade_warning=0 +for i in `ls $DATADIR/debian-*.flag 2>/dev/null`; do + found_version=`echo $i | sed 's/.*debian-\([0-9\.]\+\).flag/\1/'` + if dpkg --compare-versions "$this_version" '<<' "$found_version"; then + show_downgrade_warning=1 + break; + fi +done +if [ "$show_downgrade_warning" = 1 ]; then + db_fset mysql-server-$this_version/really_downgrade seen false || true + db_input medium mysql-server-$this_version/really_downgrade || true + db_go + db_get mysql-server-$this_version/really_downgrade || true + if [ "$RET" = "true" ]; then + rm -f $DATADIR/debian-*.flag + touch $DATADIR/debian-$this_version.flag + else + echo "Aborting downgrade from (at least) $found_version to $this_version." 1>&2 + echo "If are sure you want to downgrade to $this_version, remove the file" 1>&2 + echo "$DATADIR/debian-*.flag and try installing again." 1>&2 + db_stop + exit 1 + fi +fi + +# to be sure +stop_server + +# If we use NIS then errors should be tolerated. It's up to the +# user to ensure that the mysql user is correctly setup. +# Beware that there are two ypwhich one of them needs the 2>/dev/null! +if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then + set +e +fi + +# +# Now we have to ensure the following state: +# /etc/passwd: mysql:x:100:101:MySQL Server:/nonexistent:/bin/false +# /etc/group: mysql:x:101: +# +# Sadly there could any state be present on the system so we have to +# modify everything carefully i.e. not doing a chown before creating +# the user etc... +# + +# creating mysql group if he isn't already there +if ! getent group mysql >/dev/null; then + # Adding system group: mysql. + addgroup --system mysql >/dev/null +fi + +# creating mysql user if he isn't already there +if ! getent passwd mysql >/dev/null; then + # Adding system user: mysql. + adduser \ + --system \ + --disabled-login \ + --ingroup mysql \ + --no-create-home \ + --home /nonexistent \ + --gecos "MySQL Server" \ + --shell /bin/false \ + mysql >/dev/null +fi + +# end of NIS tolerance zone +set -e + +# if there's a symlink, let's store where it's pointing, because otherwise +# it's going to be lost in some situations +for dir in DATADIR LOGDIR; do + checkdir=`eval echo "$"$dir` + if [ -L "$checkdir" ]; then + mkdir -p "$UPGRADEDIR" + cp -d "$checkdir" "$UPGRADEDIR/$dir.link" + fi +done + +# creating mysql home directory +if [ ! -d $DATADIR -a ! -L $DATADIR ]; then + mkdir $DATADIR +fi + +# checking disc space +if LC_ALL=C BLOCKSIZE= df --portability $DATADIR/. | tail -n 1 | awk '{ exit ($4>1000) }'; then + echo "ERROR: There's not enough space in $DATADIR/" 1>&2 + db_stop + exit 1 +fi + +# Since the home directory was created before putting the user into +# the mysql group and moreover we cannot guarantee that the +# permissions were correctly *before* calling this script, we fix them now. +# In case we use NIS and no mysql user is present then this script should +# better fail now than later.. +# The "set +e" is necessary as e.g. a ".journal" of a ext3 partition is +# not chgrp'able (#318435). +set +e +chown mysql:mysql $DATADIR +find $DATADIR -follow -not -group mysql -print0 2>/dev/null \ + | xargs -0 --no-run-if-empty chgrp mysql +set -e + +# Some files below /etc/ were possibly in the mysql-server-5.0/etch package +# before. They get overwritten by current ones to avoid unnecessary dpkg questions. +while read md5 file; do + if [ "`md5sum $file 2>/dev/null`" = "$md5 $file" ]; then + cp /usr/share/mysql-common/internal-use-only/`echo $file | sed 's°/°_°g'` $file + fi +done <&2 } + +#DEBHELPER# diff --git a/debian/mysql-server-5.5.py b/debian/mysql-server-5.5.py new file mode 100644 index 000000000000..e1d022e5bbe7 --- /dev/null +++ b/debian/mysql-server-5.5.py @@ -0,0 +1,58 @@ +'''apport package hook for mysql-5.5 + +(c) 2009 Canonical Ltd. +Author: Mathias Gug +''' + +import os, os.path + +from apport.hookutils import * + +def _add_my_conf_files(report, filename): + key = 'MySQLConf' + path_to_key(filename) + report[key] = "" + for line in read_file(filename).split('\n'): + try: + if 'password' in line.split('=')[0]: + line = "%s = @@APPORTREPLACED@@" % (line.split('=')[0]) + report[key] += line + '\n' + except IndexError: + continue + +def add_info(report): + attach_conffiles(report, 'mysql-server-5.5', conffiles=None) + key = 'Logs' + path_to_key('/var/log/daemon.log') + report[key] = "" + for line in read_file('/var/log/daemon.log').split('\n'): + try: + if 'mysqld' in line.split()[4]: + report[key] += line + '\n' + except IndexError: + continue + key = 'Logs' + path_to_key('/var/log/kern.log') + report[key] = "" + for line in read_file('/var/log/kern.log').split('\n'): + try: + if '/usr/sbin/mysqld' in string.join(line.split()[4:]): + report[key] += line + '\n' + except IndexError: + continue + if os.path.exists('/var/log/mysql/error.log'): + key = 'Logs' + path_to_key('/var/log/mysql/error.log') + report[key] = "" + for line in read_file('/var/log/mysql/error.log').split('\n'): + report[key] += line + '\n' + attach_file(report,'/etc/apparmor.d/usr.sbin.mysqld') + _add_my_conf_files(report, '/etc/mysql/my.cnf') + for f in os.listdir('/etc/mysql/conf.d'): + _add_my_conf_files(report, os.path.join('/etc/mysql/conf.d', f)) + try: + report['MySQLVarLibDirListing'] = unicode(os.listdir('/var/lib/mysql')) + except OSError: + report['MySQLVarLibDirListing'] = unicode(False) + +if __name__ == '__main__': + report = {} + add_info(report) + for key in report: + print '%s: %s' % (key, report[key].split('\n', 1)[0]) diff --git a/debian/mysql-server-5.5.templates b/debian/mysql-server-5.5.templates new file mode 100644 index 000000000000..b104afa47957 --- /dev/null +++ b/debian/mysql-server-5.5.templates @@ -0,0 +1,89 @@ +# These templates have been reviewed by the debian-l10n-english +# team +# +# If modifications/additions/rewording are needed, please ask +# for an advice to debian-l10n-english@lists.debian.org +# +# Even minor modifications require translation updates and such +# changes should be coordinated with translators and reviewers. + +Template: mysql-server-5.5/really_downgrade +Type: boolean +Default: false +_Description: Really proceed with downgrade? + A file named /var/lib/mysql/debian-*.flag exists on this system. + . + Such a file is an indication that a mysql-server package with a higher + version has been installed previously. + . + There is no guarantee that the version you're currently installing + will be able to use the current databases. + +Template: mysql-server-5.5/nis_warning +Type: note +#flag:translate!:3,5 +_Description: Important note for NIS/YP users + Using MySQL under NIS/YP requires a mysql user account to be added on + the local system with: + . + adduser --system --group --home /var/lib/mysql mysql + . + You should also check the permissions and ownership of the + /var/lib/mysql directory: + . + /var/lib/mysql: drwxr-xr-x mysql mysql + +Template: mysql-server-5.5/postrm_remove_databases +Type: boolean +Default: false +_Description: Remove all MySQL databases? + The /var/lib/mysql directory which contains the MySQL databases is about + to be removed. + . + If you're removing the MySQL package in order to later install a more + recent version or if a different mysql-server package is already + using it, the data should be kept. + +Template: mysql-server-5.5/start_on_boot +Type: boolean +Default: true +_Description: Start the MySQL server on boot? + The MySQL server can be launched automatically at boot time or manually + with the '/etc/init.d/mysql start' command. + +Template: mysql-server/root_password +Type: password +_Description: New password for the MySQL "root" user: + While not mandatory, it is highly recommended that you set a password + for the MySQL administrative "root" user. + . + If this field is left blank, the password will not be changed. + +Template: mysql-server/root_password_again +Type: password +_Description: Repeat password for the MySQL "root" user: + +Template: mysql-server/error_setting_password +Type: error +_Description: Unable to set password for the MySQL "root" user + An error occurred while setting the password for the MySQL + administrative user. This may have happened because the account + already has a password, or because of a communication problem with + the MySQL server. + . + You should check the account's password after the package installation. + . + Please read the /usr/share/doc/mysql-server-5.5/README.Debian file + for more information. + +Template: mysql-server/password_mismatch +Type: error +_Description: Password input error + The two passwords you entered were not the same. Please try again. + +Template: mysql-server/no_upgrade_when_using_ndb +Type: error +_Description: NDB Cluster seems to be in use + MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new + mysql-cluster-server package and remove all lines starting with "ndb" from + all config files below /etc/mysql/. diff --git a/debian/mysql-server-core-5.5.dirs b/debian/mysql-server-core-5.5.dirs new file mode 100644 index 000000000000..b174b445af42 --- /dev/null +++ b/debian/mysql-server-core-5.5.dirs @@ -0,0 +1,2 @@ +usr/sbin +usr/share/man/man8 diff --git a/debian/mysql-server-core-5.5.files b/debian/mysql-server-core-5.5.files new file mode 100644 index 000000000000..023381752b46 --- /dev/null +++ b/debian/mysql-server-core-5.5.files @@ -0,0 +1,61 @@ +usr/bin/my_print_defaults +usr/bin/mysql_install_db +usr/bin/mysql_upgrade +usr/sbin/mysqld +usr/share/man/man1/my_print_defaults.1 +usr/share/man/man1/mysql_install_db.1 +usr/share/man/man1/mysql_upgrade.1 +usr/share/man/man8/mysqld.8 +usr/share/mysql/charsets +usr/share/mysql/czech +usr/share/mysql/danish +usr/share/mysql/dutch +usr/share/mysql/english +usr/share/mysql/estonian +usr/share/mysql/french +usr/share/mysql/fill_help_tables.sql +usr/share/mysql/mysql_system_tables.sql +usr/share/mysql/mysql_system_tables_data.sql +usr/share/mysql/german +usr/share/mysql/greek +usr/share/mysql/hungarian +usr/share/mysql/italian +usr/share/mysql/japanese +usr/share/mysql/korean +usr/share/mysql/norwegian +usr/share/mysql/norwegian-ny +usr/share/mysql/polish +usr/share/mysql/portuguese +usr/share/mysql/romanian +usr/share/mysql/russian +usr/share/mysql/serbian +usr/share/mysql/slovak +usr/share/mysql/spanish +usr/share/mysql/swedish +usr/share/mysql/ukrainian +usr/sbin/mysqld +usr/share/man/man8/mysqld.8 +usr/share/mysql/charsets +usr/share/mysql/czech +usr/share/mysql/danish +usr/share/mysql/dutch +usr/share/mysql/english +usr/share/mysql/estonian +usr/share/mysql/french +usr/share/mysql/german +usr/share/mysql/greek +usr/share/mysql/hungarian +usr/share/mysql/italian +usr/share/mysql/japanese +usr/share/mysql/korean +usr/share/mysql/norwegian +usr/share/mysql/norwegian-ny +usr/share/mysql/polish +usr/share/mysql/portuguese +usr/share/mysql/romanian +usr/share/mysql/russian +usr/share/mysql/serbian +usr/share/mysql/slovak +usr/share/mysql/spanish +usr/share/mysql/swedish +usr/share/mysql/ukrainian diff --git a/debian/mysql-source-5.5.files b/debian/mysql-source-5.5.files new file mode 100644 index 000000000000..bd8d2f751443 --- /dev/null +++ b/debian/mysql-source-5.5.files @@ -0,0 +1 @@ +usr/src/mysql/* diff --git a/debian/mysql-testsuite-5.5.dirs b/debian/mysql-testsuite-5.5.dirs new file mode 100644 index 000000000000..c2de800162ce --- /dev/null +++ b/debian/mysql-testsuite-5.5.dirs @@ -0,0 +1 @@ +/usr/lib/mysql-testsuite diff --git a/debian/mysql-testsuite-5.5.files b/debian/mysql-testsuite-5.5.files new file mode 100644 index 000000000000..6952e259ab1a --- /dev/null +++ b/debian/mysql-testsuite-5.5.files @@ -0,0 +1 @@ +/usr/lib/mysql-testsuite/* diff --git a/debian/patches/33_scripts__mysql_create_system_tables__no_test.patch b/debian/patches/33_scripts__mysql_create_system_tables__no_test.patch new file mode 100644 index 000000000000..5972eb154199 --- /dev/null +++ b/debian/patches/33_scripts__mysql_create_system_tables__no_test.patch @@ -0,0 +1,22 @@ +From: ch@debian.org + +--- a/scripts/mysql_system_tables_data.sql ++++ b/scripts/mysql_system_tables_data.sql +@@ -30,8 +30,6 @@ SELECT LOWER( REPLACE((SELECT REPLACE(@@ + -- Fill "db" table with default grants for anyone to + -- access database 'test' and 'test_%' if "db" table didn't exist + CREATE TEMPORARY TABLE tmp_db LIKE db; +-INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); +-INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y'); + INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0; + DROP TABLE tmp_db; + +@@ -43,8 +41,6 @@ INSERT INTO tmp_user VALUES ('localhost' + REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','' FROM dual WHERE @current_hostname != 'localhost'; + REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',''); + REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',''); +-INSERT INTO tmp_user (host,user) VALUES ('localhost',''); +-INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost'; + INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; + DROP TABLE tmp_user; + diff --git a/debian/patches/38_scripts__mysqld_safe.sh__signals.patch b/debian/patches/38_scripts__mysqld_safe.sh__signals.patch new file mode 100644 index 000000000000..257476c8fc4c --- /dev/null +++ b/debian/patches/38_scripts__mysqld_safe.sh__signals.patch @@ -0,0 +1,40 @@ +From: 38_scripts__mysqld_safe.sh__signals.dpatch by +Subject: Executes /etc/init.d/mysql on signals +Bug: http://bugs.mysql.com/bug.php?id=31361 + +Index: mysql-5.5-5.5.29/scripts/mysqld_safe.sh +=================================================================== +--- mysql-5.5-5.5.29.orig/scripts/mysqld_safe.sh 2012-12-10 01:16:24.000000000 -0500 ++++ mysql-5.5-5.5.29/scripts/mysqld_safe.sh 2013-01-16 08:28:47.961776400 -0500 +@@ -29,8 +29,6 @@ + syslog_tag_mysqld=mysqld + syslog_tag_mysqld_safe=mysqld_safe + +-trap '' 1 2 3 15 # we shouldn't let anyone kill us +- + # MySQL-specific environment variable. First off, it's not really a umask, + # it's the desired mode. Second, it follows umask(2), not umask(3) in that + # octal needs to be explicit. Our shell might be a proper sh without printf, +@@ -153,7 +151,7 @@ + # sed buffers output (only GNU sed supports a -u (unbuffered) option) + # which means that messages may not get sent to syslog until the + # mysqld process quits. +- cmd="$cmd 2>&1 | logger -t '$syslog_tag_mysqld' -p daemon.error" ++ cmd="$cmd 2>&1 | logger -t '$syslog_tag_mysqld' -p daemon.error & wait" + ;; + *) + echo "Internal program error (non-fatal):" \ +@@ -740,6 +738,13 @@ + fi + + # ++# From now on, we catch signals to do a proper shutdown of mysqld ++# when signalled to do so. ++# ++trap '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf refresh & wait' 1 # HUP ++trap '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf shutdown' 2 3 15 # INT QUIT and TERM ++ ++# + # Uncomment the following lines if you want all tables to be automatically + # checked and repaired during startup. You should add sensible key_buffer + # and sort_buffer values to my.cnf to improve check performance or require diff --git a/debian/patches/41_scripts__mysql_install_db.sh__no_test.patch b/debian/patches/41_scripts__mysql_install_db.sh__no_test.patch new file mode 100644 index 000000000000..29b35b8d9770 --- /dev/null +++ b/debian/patches/41_scripts__mysql_install_db.sh__no_test.patch @@ -0,0 +1,16 @@ +From: ch@debian.org +Bug: http://bugs.mysql.com/bug.php?id=6901 + +Index: mysql-5.5-5.5.33+dfsg/scripts/mysql_install_db.sh +=================================================================== +--- mysql-5.5-5.5.33+dfsg.orig/scripts/mysql_install_db.sh 2013-09-26 18:57:32.730764845 -0700 ++++ mysql-5.5-5.5.33+dfsg/scripts/mysql_install_db.sh 2013-09-26 18:57:32.726765077 -0700 +@@ -356,7 +356,7 @@ + fi + + # Create database directories +-for dir in $ldata $ldata/mysql $ldata/test ++for dir in $ldata $ldata/mysql + do + if test ! -d $dir + then diff --git a/debian/patches/50_mysql-test__db_test.patch b/debian/patches/50_mysql-test__db_test.patch new file mode 100644 index 000000000000..30be50a80cbe --- /dev/null +++ b/debian/patches/50_mysql-test__db_test.patch @@ -0,0 +1,17 @@ +From: Christian Hammers +Description: restores the rights for anybody to connect to the test + database so that the test suite can function properly. + +--- a/mysql-test/mysql-test-run.pl ++++ b/mysql-test/mysql-test-run.pl +@@ -3355,6 +3355,10 @@ sub mysql_install_db { + mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql", + $bootstrap_sql_file); + ++ mtr_tofile($bootstrap_sql_file, "-- Debian removed the default privileges on the 'test' database\n"); ++ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n"); ++ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n"); ++ + # Add test data for timezone - this is just a subset, on a real + # system these tables will be populated either by mysql_tzinfo_to_sql + # or by downloading the timezone table package from our website diff --git a/debian/patches/62_disable_tests.patch b/debian/patches/62_disable_tests.patch new file mode 100644 index 000000000000..dd82d4aa00b9 --- /dev/null +++ b/debian/patches/62_disable_tests.patch @@ -0,0 +1,10 @@ +Index: mysql-5.5/mysql-test/t/disabled.def +=================================================================== +--- mysql-5.5.orig/mysql-test/t/disabled.def 2012-03-06 13:10:09.085143548 -0800 ++++ mysql-5.5/mysql-test/t/disabled.def 2012-03-06 15:23:22.905149613 -0800 +@@ -15,3 +15,5 @@ + archive-big : Bug#11817185 2011-03-10 Anitha Disabled since this leads to timeout on Solaris Sparc + log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists + mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836 ++partition_rename_longfilename : Fails when building with sbuild and schroots ++file_contents : Fails without bzr revision id diff --git a/debian/patches/70_mysql_va_list.patch b/debian/patches/70_mysql_va_list.patch new file mode 100644 index 000000000000..fc8cfba443ed --- /dev/null +++ b/debian/patches/70_mysql_va_list.patch @@ -0,0 +1,54 @@ +Bug: http://bugs.mysql.com/bug.php?id=62769 +Bug-Ubuntu: http://pad.lv/700982 +Description: make sure va_list usage is portable to fix FTBFS on ARM + +Index: mysql-5.5-5.5.28/sql-common/client_plugin.c +=================================================================== +--- mysql-5.5-5.5.28.orig/sql-common/client_plugin.c 2012-10-18 11:20:32.687380959 -0400 ++++ mysql-5.5-5.5.28/sql-common/client_plugin.c 2012-10-18 11:20:34.455381005 -0400 +@@ -233,11 +233,13 @@ + { + MYSQL mysql; + struct st_mysql_client_plugin **builtin; ++ va_list unused; + + if (initialized) + return 0; + + bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */ ++ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */ + + pthread_mutex_init(&LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW); + init_alloc_root(&mem_root, 128, 128); +@@ -249,7 +251,7 @@ + pthread_mutex_lock(&LOCK_load_client_plugin); + + for (builtin= mysql_client_builtins; *builtin; builtin++) +- add_plugin(&mysql, *builtin, 0, 0, 0); ++ add_plugin(&mysql, *builtin, 0, 0, unused); + + pthread_mutex_unlock(&LOCK_load_client_plugin); + +@@ -293,9 +295,13 @@ + mysql_client_register_plugin(MYSQL *mysql, + struct st_mysql_client_plugin *plugin) + { ++ va_list unused; ++ + if (is_not_initialized(mysql, plugin->name)) + return NULL; + ++ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */ ++ + pthread_mutex_lock(&LOCK_load_client_plugin); + + /* make sure the plugin wasn't loaded meanwhile */ +@@ -307,7 +313,7 @@ + plugin= NULL; + } + else +- plugin= add_plugin(mysql, plugin, 0, 0, 0); ++ plugin= add_plugin(mysql, plugin, 0, 0, unused); + + pthread_mutex_unlock(&LOCK_load_client_plugin); + return plugin; diff --git a/debian/patches/71_disable_rpl_tests.patch b/debian/patches/71_disable_rpl_tests.patch new file mode 100644 index 000000000000..343f53b2887f --- /dev/null +++ b/debian/patches/71_disable_rpl_tests.patch @@ -0,0 +1,18 @@ +From: Clint Byrum +Bug-Ubuntu: http://pad.lv/894146 +Forwarded: no, not needed +Description: disables test to allow build to pass while this is investigated. + +--- + mysql-test/suite/rpl/t/disabled.def | 1 + + 1 file changed, 1 insertion(+) + +Index: b/mysql-test/suite/rpl/t/disabled.def +=================================================================== +--- a/mysql-test/suite/rpl/t/disabled.def ++++ b/mysql-test/suite/rpl/t/disabled.def +@@ -13,3 +13,4 @@ + rpl_row_create_table : Bug#11759274 2010-02-27 andrei failed different way than earlier with bug#45576 + rpl_spec_variables : BUG#11755836 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux + rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock ++rpl_heartbeat_basic : Fails intermittently on AMD64 buildds http://pad.lv/894146 diff --git a/debian/patches/72_fix_standalone_tests.patch b/debian/patches/72_fix_standalone_tests.patch new file mode 100644 index 000000000000..1f9ad054cfc1 --- /dev/null +++ b/debian/patches/72_fix_standalone_tests.patch @@ -0,0 +1,19 @@ +From: Clint Byrum +Description: makes mtr look in the standard location from the + mysql-testsuite-5.5 package. +Forwarded: not-needed + +Index: mysql-5.5-5.5.28/mysql-test/lib/mtr_cases.pm +=================================================================== +--- mysql-5.5-5.5.28.orig/mysql-test/lib/mtr_cases.pm 2012-10-18 11:20:41.735381191 -0400 ++++ mysql-5.5-5.5.28/mysql-test/lib/mtr_cases.pm 2012-10-18 11:20:44.059381249 -0400 +@@ -287,7 +287,8 @@ + else + { + $suitedir= my_find_dir($::basedir, +- ["share/mysql-test/suite", ++ ["lib/mysql-testsuite/suite", ++ "share/mysql-test/suite", + "mysql-test/suite", + "internal/mysql-test/suite", + "mysql-test", diff --git a/debian/patches/73_fix_rpl_deadlock_innodb_test.patch b/debian/patches/73_fix_rpl_deadlock_innodb_test.patch new file mode 100644 index 000000000000..ce3f2398c211 --- /dev/null +++ b/debian/patches/73_fix_rpl_deadlock_innodb_test.patch @@ -0,0 +1,19 @@ +Description: fix failing rpl.rpl_deadlock_innodb test by ignoring warnings +Origin: vendor, http://permalink.gmane.org/gmane.linux.redhat.fedora.extras.cvs/1029971 +Bug: http://bugs.mysql.com/bug.php?id=69458 +Bug: http://bugs.mysql.com/bug.php?id=69455 + +Index: mysql-5.5-5.5.32.orig/mysql-test/include/mtr_warnings.sql +=================================================================== +--- mysql-5.5-5.5.32.orig.orig/mysql-test/include/mtr_warnings.sql 2013-06-19 11:26:28.000000000 -0400 ++++ mysql-5.5-5.5.32.orig/mysql-test/include/mtr_warnings.sql 2013-07-23 14:49:38.233802237 -0400 +@@ -162,6 +162,9 @@ + ("InnoDB: Error: in RENAME TABLE table `test`.`t1`"), + ("InnoDB: Error: table `test`.`t[123]` does not exist in the InnoDB internal"), + ++ /* rpl.rpl_deadlock_innodb fails when trying DROP tables */ ++ ("InnoDB: Error: table `mysqld.2`.`#sql.*` does not exist in the InnoDB internal"), ++ + /* + BUG#32080 - Excessive warnings on Solaris: setrlimit could not + change the size of core files diff --git a/debian/patches/link-clientprograms-dynamically.patch b/debian/patches/link-clientprograms-dynamically.patch new file mode 100644 index 000000000000..b39409367ae0 --- /dev/null +++ b/debian/patches/link-clientprograms-dynamically.patch @@ -0,0 +1,86 @@ +=== modified file 'client/CMakeLists.txt' +--- a/client/CMakeLists.txt 2012-02-15 07:57:46 +0000 ++++ b/client/CMakeLists.txt 2012-02-15 08:10:31 +0000 +@@ -27,45 +27,52 @@ + + ADD_DEFINITIONS(${READLINE_DEFINES}) + ADD_DEFINITIONS(${SSL_DEFINES}) +-MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc) +-TARGET_LINK_LIBRARIES(mysql mysqlclient) ++IF (DISABLE_SHARED) ++ MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc) ++ SET(LIBS mysqlclient) ++ELSE(DISABLE_SHARED) ++ SET(GET_PASSWORD_SRC ../libmysql/get_password.c) ++ MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc ${GET_PASSWORD_SRC}) ++ SET(LIBS libmysql strings mysys ${SSL_LIBRARIES}) ++ENDIF(DISABLE_SHARED) ++TARGET_LINK_LIBRARIES(mysql ${LIBS}) + IF(UNIX) + TARGET_LINK_LIBRARIES(mysql ${READLINE_LIBRARY}) + ENDIF(UNIX) + +-MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test) ++MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc ${GET_PASSWORD_SRC} COMPONENT Test) + SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS") +-TARGET_LINK_LIBRARIES(mysqltest mysqlclient regex) +- +- +-MYSQL_ADD_EXECUTABLE(mysqlcheck mysqlcheck.c) +-TARGET_LINK_LIBRARIES(mysqlcheck mysqlclient) +- +-MYSQL_ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c) +-TARGET_LINK_LIBRARIES(mysqldump mysqlclient) +- +-MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c) +-TARGET_LINK_LIBRARIES(mysqlimport mysqlclient) +- +-MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c) +-TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient) ++TARGET_LINK_LIBRARIES(mysqltest ${LIBS} regex) ++ ++ ++MYSQL_ADD_EXECUTABLE(mysqlcheck mysqlcheck.c ${GET_PASSWORD_SRC}) ++TARGET_LINK_LIBRARIES(mysqlcheck ${LIBS}) ++ ++MYSQL_ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c ${GET_PASSWORD_SRC}) ++TARGET_LINK_LIBRARIES(mysqldump ${LIBS}) ++ ++MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c ${GET_PASSWORD_SRC}) ++TARGET_LINK_LIBRARIES(mysqlimport ${LIBS}) ++ ++MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c ${GET_PASSWORD_SRC}) ++TARGET_LINK_LIBRARIES(mysql_upgrade ${LIBS}) + ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs) + +-MYSQL_ADD_EXECUTABLE(mysqlshow mysqlshow.c) +-TARGET_LINK_LIBRARIES(mysqlshow mysqlclient) ++MYSQL_ADD_EXECUTABLE(mysqlshow mysqlshow.c ${GET_PASSWORD_SRC}) ++TARGET_LINK_LIBRARIES(mysqlshow ${LIBS}) + + MYSQL_ADD_EXECUTABLE(mysql_plugin mysql_plugin.c) +-TARGET_LINK_LIBRARIES(mysql_plugin mysqlclient) +- +-MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc) +-TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient) +- +-MYSQL_ADD_EXECUTABLE(mysqladmin mysqladmin.cc) +-TARGET_LINK_LIBRARIES(mysqladmin mysqlclient) +- +-MYSQL_ADD_EXECUTABLE(mysqlslap mysqlslap.c) ++TARGET_LINK_LIBRARIES(mysql_plugin ${LIBS}) ++ ++MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc ${GET_PASSWORD_SRC}) ++TARGET_LINK_LIBRARIES(mysqlbinlog ${LIBS}) ++ ++MYSQL_ADD_EXECUTABLE(mysqladmin mysqladmin.cc ${GET_PASSWORD_SRC}) ++TARGET_LINK_LIBRARIES(mysqladmin ${LIBS}) ++ ++MYSQL_ADD_EXECUTABLE(mysqlslap mysqlslap.c ${GET_PASSWORD_SRC}) + SET_SOURCE_FILES_PROPERTIES(mysqlslap.c PROPERTIES COMPILE_FLAGS "-DTHREADS") +-TARGET_LINK_LIBRARIES(mysqlslap mysqlclient) ++TARGET_LINK_LIBRARIES(mysqlslap ${LIBS}) + + # "WIN32" also covers 64 bit. "echo" is used in some files below "mysql-test/". + IF(WIN32) + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 000000000000..32235c4bd141 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,9 @@ +38_scripts__mysqld_safe.sh__signals.patch +62_disable_tests.patch +70_mysql_va_list.patch +71_disable_rpl_tests.patch +72_fix_standalone_tests.patch +73_fix_rpl_deadlock_innodb_test.patch +33_scripts__mysql_create_system_tables__no_test.patch +41_scripts__mysql_install_db.sh__no_test.patch +50_mysql-test__db_test.patch diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 000000000000..8f9c82fe2c55 --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] mysql-server-5.5.templates diff --git a/debian/po/ar.po b/debian/po/ar.po new file mode 100644 index 000000000000..29db9f4512db --- /dev/null +++ b/debian/po/ar.po @@ -0,0 +1,252 @@ +# translation of templates.po to Arabic +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Ossama M. Khayat , 2007. +msgid "" +msgstr "" +"Project-Id-Version: templates\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2007-05-01 13:04+0300\n" +"Last-Translator: Ossama M. Khayat \n" +"Language-Team: Arabic \n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=6; plural=n==1 ? 0 : n==0 ? 1 : n==2 ? 2: n%100>=3 && " +"n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" +": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" +": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" +": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" +": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" +": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" +": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "هل Ùعلاً تريد التثبيط؟" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "هناك مل٠مسمى /var/lib/mysql/debian-*.flag موجود على هذا النظام." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"هذا المل٠دلالة على أن نسخة أحدث من حزمة mysql-server تم تثبيتها مسبقاً." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"ليست هناك أية ضمانة أن النسخة التي تقوم بتثبيتها ستكون قادرة على استخدام " +"قواعد البيانات الحالية." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "ملاحظة هامة لمستخدمي NIS/YP" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "عليك أيضاً أن تقوم بالتأكد من صلاحيات مالك المل٠/var/lib/mysql: " + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "إزالة جميع قواعد بيانات MySQLØŸ" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "الدليل /var/lib/mysql الذي يحتوي قواعد بيانات MySQL ستتم إزالته." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"إن كنت تقوم بإزالة حزمة MySQL كي تقوم لاحقاً بتثبيت نسخة أحدث أو إن كانت حزمة " +"mysql-server مختلÙØ© تستخدمها، Ùيجب إبقاء البيانات." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "تشغيل خادم MySQL عند الإقلاع؟" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"يمكن تشغيل خادم MySQL آلياً وقت الإقلاع أو يدوياً باستخدام الأمر '/etc/init.d/" +"mysql start'." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "كلمة المرور الجديدة لمستخد \"root\" الخاص بـMySQL:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"مع أنه ليس إجبارياً، ولكن من المستحسن أن تقوم بتعيين كلمة مرور خاصة بمستخدم " +"MySQL الإداري \"root\"." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "إن ترك الحقل Ùارغاً، Ùلن يتم تغيير كلمة المرور." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +#, fuzzy +#| msgid "New password for the MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "كلمة المرور الجديدة لمستخد \"root\" الخاص بـMySQL:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "تعذر تعيين كلمة مرور للمستخدم \"root\" الخاص بـMySQL." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"حدث خطأ أثناء تعيين كلمة المرور لمستخدم MySQL الإداري. قد يكون هذا حدث بسبب " +"أن حساب المستخدم له كلمة مرور معيّنة مسبقاً، أو بسبب مشكلة ÙÙŠ الاتصال مع خادم " +"MySQL." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "You should check the account's password after tha package installation." +msgid "You should check the account's password after the package installation." +msgstr "يجب عليك التحقق من كلمة مرور الحساب عقب تثبيت الحزمة." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"الرجاء قراءة المل٠/usr/share/doc/mysql-server-5.5/README.Debian للمزيد من " +"المعلومات." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "كي تستخدم MySQLØŒ يجب إضاÙØ© المÙدخلات التالية الخاصة بالمستخدمين والمجموعات " +#~ "إلى النظام:" + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "هل تريد دعم اتصالات MySQL من الأجهزة التي تعمل على ديبيان \"sarge\" أو " +#~ "أقدم؟" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "ÙÙŠ إصدارات عملاء MySQL القديمة من ديبيان، لم تكن كلمات المرور تحÙظ بشكل " +#~ "آمن. ولقد حل هذه المشكلة بعدها، غير أن العملاء (مثل PHP) المتصلين من " +#~ "أجهزة تعمل على ديبيان Sarge 3.1 لن يكونوا قادرين على الاتصال باستخدام " +#~ "الحسابات الحديثة أو الحسابات التي تم تغيير كلمة مرورها." diff --git a/debian/po/ca.po b/debian/po/ca.po new file mode 100644 index 000000000000..0219ffa9772b --- /dev/null +++ b/debian/po/ca.po @@ -0,0 +1,227 @@ +# mysql-dfsg (debconf) translation to Catalan. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# Aleix Badia i Bosch 2004 +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-4.1\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2004-01-31 19:20GMT\n" +"Last-Translator: Aleix Badia i Bosch \n" +"Language-Team: Debian L10n Catalan \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Aquest fitxer indica que anteriorment s'ha instaÅ€lat un paquet mysql-server " +"amb una versió posterior." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"No hi ha cap garantia que la versió que esteu instaÅ€lant actualment puga " +"emprar les bases de dades actuals." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +#, fuzzy +#| msgid "Important note for NIS/YP users!" +msgid "Important note for NIS/YP users" +msgstr "Nota important pels usuaris de NIS/YP" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Si empreu MySQL sota NIS/YP, heu d'afegir un compte d'usuari mysql al " +"sistema local amb:" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"També hauríeu de comprovar els permisos i propietaris del directori /var/" +"lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"El directori /var/lib/mysql que conté les bases de dades de MySQL està a " +"punt deser suprimit." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Si esteu suprimint el paquet MySQL per a posteriorment instaÅ€lar una versió " +"més recent, o si un paquet mysql-server diferent ja l'està emprant, les " +"dades s'haurien de mantenir." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +#, fuzzy +#| msgid "Should MySQL start on boot?" +msgid "Start the MySQL server on boot?" +msgstr "Voleu que el MySQL s'iniciï a l'arrencada ?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +#, fuzzy +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"El MySQL es pot executar automàticament a l'arrencada o manualment amb " +"l'ordre «/etc/init.d/mysql start»." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Tot i que no és requerida, és molt recomanable que establiu una " +"contrasenya per a «root», l'usuari administratiu del MySQL." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"S'ha produït un error en establir la contrasenya de l'usuari administratiu " +"del MySQL. Això pot haver passat perquè el compte ja té una una " +"contrasenya, o per un problema de comunicació amb el servidor de MySQL." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Hauríeu de comprovar la contrasenya del compte després de la instaÅ€lació " +"del paquet." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Llegiu el fitxer /usr/share/doc/mysql-server-5.1/README.Debian per a obtenir " +"més informació." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" +"Les dos contrasenyes que heu introduït no són la mateixa. Proveu-ho de nou." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "MySQL-5.1 no longer provides NDB Cluster support. Please migrate to the " +#~ "new " +#~ msgstr "" +#~ "El MySQL-5.1 ja no implementa el clúster NDB. Migreu al nou paquet mysql-" +#~ "cluster i suprimiu totes les línies que comencen per «ndb» de tots els " +#~ "fitxers de configuració sota /etc/mysql/." diff --git a/debian/po/cs.po b/debian/po/cs.po new file mode 100644 index 000000000000..9488cb46dc7a --- /dev/null +++ b/debian/po/cs.po @@ -0,0 +1,346 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.5\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2007-05-01 13:01+0200\n" +"Last-Translator: Miroslav Kure \n" +"Language-Team: Czech \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Opravdu pokraÄovat v degradaci?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "V systému existuje soubor /var/lib/mysql/debian-*.flag." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "To znamená, že již byl nainstalován balík mysql-server s vyšší verzí." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Neexistuje žádná záruka, že momentálnÄ› instalovaná verze bude umÄ›t pracovat " +"se stávajícími databázemi." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Důležitá poznámka pro uživatele NIS/YP" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Také byste mÄ›li zkontrolovat vlastníka a oprávnÄ›ní adresáře /var/lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Odstranit vÅ¡echny MySQL databáze?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Adresář /var/lib/mysql, ve kterém se nachází MySQL databáze, bude odstranÄ›n." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Jestliže odstraňujete balík MySQL za úÄelem instalace novÄ›jší verze MySQL, " +"nebo pokud tato data souběžnÄ› využívá jiný balík mysql-server, mÄ›li byste " +"data ponechat." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Spustit MySQL server pÅ™i startu systému?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL se může spouÅ¡tÄ›t automaticky pÅ™i startu systému, nebo ruÄnÄ› příkazem '/" +"etc/init.d/mysql start'." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nové heslo MySQL uživatele \"root\":" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"PÅ™estože to není nezbytné, je silnÄ› doporuÄeno nastavit heslo u " +"správcovského MySQL úÄtu \"root\"." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "Ponecháte-li pole prázdné, heslo se nezmÄ›ní." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +#, fuzzy +#| msgid "New password for the MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Nové heslo MySQL uživatele \"root\":" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Nelze nastavit heslo MySQL uživatele \"root\"" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"BÄ›hem nastavování hesla pro správcovského uživatele MySQL se vyskytla chyba. " +"To se mohlo stát tÅ™eba proto, protože uživatel již mÄ›l heslo nastaveno, nebo " +"protože nastal problém v komunikaci s MySQL serverem." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "You should check the account's password after tha package installation." +msgid "You should check the account's password after the package installation." +msgstr "Po instalaci balíku byste mÄ›li heslo ověřit." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Více informací naleznete v /usr/share/doc/mysql-server-5.5/README.Debian." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Abyste mohli MySQL používat, musíte v systému založit následující " +#~ "uživatele a skupiny:" + +#~ msgid "Cannot upgrade if ISAM tables are present!" +#~ msgstr "Aktualizace nelze provést pokud jsou přítomny tabulky ISAM!" + +#~ msgid "" +#~ "Recent versions of MySQL can no longer use the old ISAM table format and " +#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " +#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " +#~ "The installation of mysql-server-5.5 will now abort. In case your old " +#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " +#~ "those tables." +#~ msgstr "" +#~ "Poslední verze MySQL již nemohou používat starý formát tabulek ISAM a " +#~ "pÅ™ed aktualizací je nutné pÅ™evést tyto tabulky napÅ™. do formátu MyISAM " +#~ "pomocí \"mysql_convert_table_format\" nebo \"ALTER TABLE x ENGINE=MyISAM" +#~ "\". Instalace mysql-server-5.5 se nyní pÅ™eruší. V případÄ›, že se mezitím " +#~ "odinstaloval původní mysql-server-4.1, jednoduÅ¡e jej znovu nainstalujte a " +#~ "tabulky pÅ™eveÄte." + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "Podporovat MySQL pÅ™ipojení z poÄítaÄů používajících Debian Sarge nebo " +#~ "starší?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Způsob, jakým se dříve ukládala hesla, nebyl příliÅ¡ bezpeÄný. To se nyní " +#~ "zlepÅ¡ilo, ale nevýhodou je, že se klienti z Debianu 3.1 Sarge (napÅ™. PHP) " +#~ "nebudou moci pÅ™ipojit na nové úÄty, nebo na úÄty, u nichž se heslo " +#~ "zmÄ›nilo." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Abyste mohli mysql používat, musíte do následujících souborů pÅ™idat " +#~ "ekvivalentního uživatele a skupinu a zajistit, že /var/lib/mysql má " +#~ "správná práva (uid/gid se mohou liÅ¡it)." + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "Odstranit databáze používané vÅ¡emi verzemi MySQL?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "Nezadáte-li heslo, žádné zmÄ›ny se s úÄtem neprovedou." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "Po skonÄení instalace byste mÄ›li ověřit, že je úÄet chránÄ›n heslem (více " +#~ "informací naleznete v souboru README.Debian)." + +#~ msgid "Update Hints" +#~ msgstr "Poznámky k aktualizaci" + +#~ msgid "" +#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be " +#~ "corrupted! This script also enhances the privilege tables but is not " +#~ "supposed to give any user more rights that he had before," +#~ msgstr "" +#~ "Po aktualizaci jeÅ¡tÄ› musíte spustit \"mysql_upgrade\", protože jinak by " +#~ "se tabulky mohly naruÅ¡it! Tento skript také rozÅ¡iÅ™uje tabulky privilegií, " +#~ "ovÅ¡em nemÄ›l by uživatelům pÅ™idat více práv, než mÄ›li dosud." + +#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html" +#~ msgstr "Také si pÅ™eÄtÄ›te http://www.mysql.com/doc/en/Upgrade.html" + +#~ msgid "" +#~ "MySQL will only install if you have a non-numeric hostname that is " +#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " +#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " +#~ "myhostname\"." +#~ msgstr "" +#~ "MySQL se nainstaluje pouze v případÄ›, že používáte nenumerické jméno " +#~ "poÄítaÄe, které se dá pÅ™eložit pÅ™es soubor /etc/hosts. NapÅ™. když příkaz " +#~ "\"hostname\" vrátí \"diamond\", tak v /etc/hosts musí existovat obdobný " +#~ "řádek jako \"10.0.0.1 diamond\"." + +#~ msgid "" +#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " +#~ "is used in the start/stop and cron scripts. Don't delete." +#~ msgstr "" +#~ "Bude vytvoÅ™en nový mysql uživatel \"debian-sys-maint\". Tento mysql úÄet " +#~ "se používá ve startovacích, ukonÄovacích a cronových skriptech. Nemažte " +#~ "jej." + +#~ msgid "" +#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" +#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " +#~ "there, never only the password!" +#~ msgstr "" +#~ "Nezapomeňte nastavit heslo pro úÄet administrátora MySQL! Používáte-li /" +#~ "root/.my.cnf, vždy zde zadejte jak řádek \"user\", tak řádek \"password" +#~ "\". Nikdy zde nezadávejte jenom heslo!" + +#~ msgid "" +#~ "Should I remove the complete /var/lib/mysql directory tree which is used " +#~ "by all MySQL versions, not necessarily only the one you are about to " +#~ "purge?" +#~ msgstr "" +#~ "Mám odstranit kompletní adresářový strom /var/lib/mysql, který se používá " +#~ "pro vÅ¡echny verze MySQL, tedy ne nutnÄ› pouze pro verzi, kterou se " +#~ "chystáte vyÄistit?" diff --git a/debian/po/da.po b/debian/po/da.po new file mode 100644 index 000000000000..9bfab1589eda --- /dev/null +++ b/debian/po/da.po @@ -0,0 +1,382 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +# Claus Hindsgaul , 2005, 2006. +# Claus Hindsgaul , 2006, 2007. +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-4.1\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2007-05-30 22:41+0200\n" +"Last-Translator: Claus Hindsgaul \n" +"Language-Team: Danish\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Ønsker du virkelig at fortsætte nedgraderingen?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" +"Der er en fil med navnet /var/lib/mysql/debian-*.flag på dette system." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Sådan en fil tyder på at der tidligere har været installeret en højere " +"version af mysql-server-pakken." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Det kan ikke garanteres at den version, du er ved at installere, kan benytte " +"data fra de eksisterende databaser." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Vigtig oplysning til NIS/YP-brugere" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Du bør også tjekke filrettighederne og ejerskabet af mappen /var/lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Fjern alle MySQL-databaser?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Mappen /var/lib/mysql, der indeholder MySQL-databaserne, er ved at blive " +"fjernet." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Hvis du fjerner MySQL-pakken for senere at installere en nyere version, " +"eller hvis en anden mysql-server-pakke allerede benytter den, bør dataene " +"bevares." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Start MySQL-serveren under systemopstart?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL-serveren kan enten startes op automatisk under systemopstarten, eller " +"manuelt med kommandoen '/etc/init.d/mysql start'." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Ny adgangskode for MySQL's \"root\"-bruger:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Selvom det ikke kræves, anbefales det kraftigt, at du sætter en adgangskode " +"for MySQL's administrationsbruger \"root\"." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "Hvis du lader dette felt stå tomt, vil adgangskoden ikke blive ændret." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +#, fuzzy +#| msgid "New password for the MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Ny adgangskode for MySQL's \"root\"-bruger:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Kunne ikke sætte adgangskoden for MySQL's \"root\"-bruger" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Der opstod en fejl, da adgangskoden for MySQL's administrationsbruger blev " +"forsøgt ændret. Dette kan være sket, fordi brugeren allerede har en " +"adgangskode, eller fordi der var problemer med at kommunikere med MySQL-" +"serveren." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "Du bør tjekke kontoens adgangskode efter pakkeinstallationen." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Se filen /usr/share/doc/mysql-server-5.5/README.Debian for yderligere " +"oplysninger." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Nedenstående linjer for brugere og grupper skal tilføjes dette system for " +#~ "at benytte MySQL:" + +#~ msgid "Cannot upgrade if ISAM tables are present!" +#~ msgstr "Kan ikke opgradere hvis der er ISAM-tabeller!" + +#~ msgid "" +#~ "Recent versions of MySQL can no longer use the old ISAM table format and " +#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " +#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " +#~ "The installation of mysql-server-5.5 will now abort. In case your old " +#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " +#~ "those tables." +#~ msgstr "" +#~ "Nyere versioner af MySQL kan ikke længere benytte det gamle ISAM-" +#~ "tabelformat, og det er derfor nødvendigt at konvertere dine tabeller til " +#~ "f.eks. MyISAM forud for opgraderingen med \"mysql_convert_table_format\" " +#~ "eller \"ALTER TABLE x ENGINE=MyISAM\". Installationen af mysql-server-5.5 " +#~ "afbrydes nu. Skulle din gamle mysql-server-4.1 alligevel bliver " +#~ "afinstalleret, så geninstallér den blot og konverter tabellerne." + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "Understøt MySQL-forbindelser fra maskiner, der kører Debian \"Sarge\" " +#~ "eller ældre?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Gamle udgaver af MySQL-klienter på Debian gemte ikke adgangskoderne " +#~ "sikkert. Dette er blevet forbedret siden da, men klienter (f.eks. PHP) " +#~ "fra maskiner, der kører Debian 3.1 Sarge vil ikke kunne forbinde til " +#~ "nyere konti eller konti, hvis adgangskode er blevet ændret." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "For at kunne bruge mysql skal du installere en bruger og en gruppe, der " +#~ "svarer til nedenstående, og sikre dig at /var/lib/mysql har de rigtige " +#~ "adgangsrettigheder (uid/gid kan afvige)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group: mysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "Fjern de databaser, der benyttes af samtlige MySQL-versioner?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "Hvis du ikke angiver en adgangskode, vil kontoen ikke blive ændret." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "Når installationen afsluttes, bør du tjekke at kontoen er ordentligt " +#~ "beskyttet med en adgangskode (se README.Debian for yderligere " +#~ "oplysninger)." + +#~ msgid "Update Hints" +#~ msgstr "Opdateringstips" + +#~ msgid "" +#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be " +#~ "corrupted! This script also enhances the privilege tables but is not " +#~ "supposed to give any user more rights that he had before," +#~ msgstr "" +#~ "Du skal køre \"mysql_upgrade\" efter opgraderingen, da tabellerne eller " +#~ "kan blive ødelagt! Dette script forbedrer også rettighedstabellerne, men " +#~ "burde ikke give nogen bruger flere rettigheder, end han havde tidligere," + +#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html" +#~ msgstr "Læs også http://www.mysql.com/doc/en/Upgrade.html" + +#~ msgid "Install Hints" +#~ msgstr "Installationstips" + +#~ msgid "" +#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in " +#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and " +#~ "have manually be restored." +#~ msgstr "" +#~ "Ved opgraderinger fra MySQL 3.23, der fulgte med Debian Woody, kan de " +#~ "symbolske /var/lib/mysql or /var/log/mysql blive fjernet ved et uheld, og " +#~ "må genskabes manuelt." + +#~ msgid "" +#~ "MySQL will only install if you have a non-numeric hostname that is " +#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " +#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " +#~ "myhostname\"." +#~ msgstr "" +#~ "MySQL vil kun blive installeret, hvis du har et ikke-numerisk værtsnavn, " +#~ "som kan slås op i filen /ets/hosts. Hvis f.eks. kommandoen \"hostname\" " +#~ "svarer med \"mitvaertsnavn\", skal du have en linje a'la \"10.0.0.1 " +#~ "mitvaertsnavn\" i /etc/hosts." + +#~ msgid "" +#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " +#~ "is used in the start/stop and cron scripts. Don't delete." +#~ msgstr "" +#~ "Det vil blive oprettet en ny mysql-bruger, \"debian-sys-maint\". Denne " +#~ "mysql-konto bruges i start/stop-cron-scripterne. Slet den ikke." + +#~ msgid "" +#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" +#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " +#~ "there, never only the password!" +#~ msgstr "" +#~ "Husk at sætte en ADGANGSKODE for MySQLs root-bruger! Hvis du bruger en /" +#~ "etc/.my.cnf, så skriv altid \"user\"- og \"password\"-linjer ind her, " +#~ "ikke kun adgangskoden!" + +#~ msgid "" +#~ "Should I remove the complete /var/lib/mysql directory tree which is used " +#~ "by all MySQL versions, not necessarily only the one you are about to " +#~ "purge?" +#~ msgstr "" +#~ "Skal jeg fjerne hele mappetræet /var/lib/mysql, som benyttes af alle " +#~ "MySQL-versioner, ikke kun den version, du er ved at slette?" + +#~ msgid "" +#~ "Rarely, e.g. on new major versions, the privilege system is improved. To " +#~ "make use of it mysql_fix_privilege_tables must be executed manually. The " +#~ "script is not supposed to give any user more rights that he had before," +#~ msgstr "" +#~ "En sjælden gang imellem, f.eks. ved nye hovedversioner, sker det at " +#~ "rettighedssystemet forbedres. For at gøre brug af dette, skal " +#~ "mysql_fix_privilege_tables køres manuelt. Scriptet vil ikke give nogen " +#~ "bruger flere rettigheder, end vedkommende havde tidligere," diff --git a/debian/po/de.po b/debian/po/de.po new file mode 100644 index 000000000000..6352e7f047c5 --- /dev/null +++ b/debian/po/de.po @@ -0,0 +1,239 @@ +# translation of mysql-dfsg-5.5_5.5.37-1_de.po to Deutsch +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +# Alwin Meschede , 2006, 2007. +# Thomas Mueller , 2009. +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.5_5.5.37-1_de\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2009-08-27 22:41+0200\n" +"Last-Translator: Thomas Mueller \n" +"Language-Team: german \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Möchten Sie wirklich eine ältere Version einspielen?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" +"Auf diesem System existiert eine Datei mit dem Namen /var/lib/mysql/debian-*." +"flag" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Diese Datei ist ein Hinweis darauf, dass früher ein MySQL-Server-Paket mit " +"einer höheren Version installiert war." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Es kann nicht garantiert werden, dass die gegenwärtig zu installierende " +"Version dessen Daten benutzen kann." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Wichtige Anmerkung für NIS/YP-Benutzer!" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Falls MySQL mit NIS/YP genutzt wird, ist ein »mysql«-Benutzerkonto auf dem " +"lokalen System notwendig:" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Sie sollten außerdem Besitzer und Zugriffsrechte des Verzeichnisses /var/lib/" +"mysql überprüfen:" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Alle MySQL-Datenbanken entfernen?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Das Verzeichnis /var/lib/mysql mit den MySQL-Datenbanken soll entfernt " +"werden." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Falls geplant ist, nur eine höhere Version von MySQL zu installieren oder " +"ein anderes mysql-server-Paket dieses bereits benutzt, sollten die Daten " +"behalten werden." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Soll der MySQL-Server automatisch beim Booten starten?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"Der MySQL-Dienst kann entweder automatisch beim Systemstart oder manuell " +"durch Eingabe des Befehls »/etc/init.d/mysql start« gestartet werden." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Neues Passwort für den MySQL »root«-Benutzer:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Obwohl es nicht zwingend erforderlich ist, wird nachdrücklich empfohlen für " +"den administrativen MySQL »root«-Benutzer ein Passwort zu setzen." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "Wenn dieses Feld freigelassen wird, wird das Passwort nicht geändert." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Wiederholen Sie das Passwort für den MySQL-»root«-Benutzer:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Konnte für den MySQL-»root«-Benutzer kein Passwort setzen" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Beim setzen des Passworts für den administrativen MySQL-Benutzer ist ein " +"Fehler aufgetreten. Dies könnte daran liegen, dass der Benutzer bereits ein " +"Passwort hat oder dass es ein Problem mit der Kommunikation mit dem MySQL-" +"Server gibt." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Sie sollten das Passwort des administrativen Benutzers nach der " +"Paketinstallation prüfen." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Für weitere Informationen lesen Sie /usr/share/doc/mysql-server-5.5/README." +"Debian." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "Passwort-Eingabefehler" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" +"Die beiden von Ihnen eingegebenen Passwörter sind nicht identisch. Bitte " +"erneut versuchen." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "NDB-Cluster scheint gerade benutzt zu werden" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the " +#| "new mysql-cluster package and remove all lines starting with \"ndb\" from " +#| "all config files below /etc/mysql/." +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.5 bietet keine NDB-Clusterunterstützung mehr. Bitte migrieren Sie " +"Ihr System zum neuen »mysql-cluster«-Paket und entfernen Sie alle Zeilen, " +"die mit »ndb« beginnen aus allen Konfigurationsdateien im Verzeichnis /etc/" +"mysql/." diff --git a/debian/po/es.po b/debian/po/es.po new file mode 100644 index 000000000000..4391e779e80f --- /dev/null +++ b/debian/po/es.po @@ -0,0 +1,390 @@ +# mysql-dfsg-5 translation to spanish +# Copyright (C) 2005-2007 Software in the Public Interest, SPI Inc. +# This file is distributed under the same license as the XXXX package. +# +# Changes: +# - Initial translation +# Jesus Aneiros, 2006 +# - Updated +# Javier Fernandez-Sanguino, 2006-2007 +# - Revision +# Nacho Barrientos Arias +# Fernando Cerezal +# David Martínez Moreno +# Ricardo Mones +# Carlos Galisteo +# Javier Fernandez-Sanguino +# +# +# Traductores, si no conoce el formato PO, merece la pena leer la +# documentación de gettext, especialmente las secciones dedicadas a este +# formato, por ejemplo ejecutando: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Equipo de traducción al español, por favor lean antes de traducir +# los siguientes documentos: +# +# - El proyecto de traducción de Debian al español +# http://www.debian.org/intl/spanish/ +# especialmente las notas y normas de traducción en +# http://www.debian.org/intl/spanish/notas +# +# - La guía de traducción de po's de debconf: +# /usr/share/doc/po-debconf/README-trans +# o http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Si tiene dudas o consultas sobre esta traducción consulte con el último +# traductor (campo Last-Translator) y ponga en copia a la lista de +# traducción de Debian al español () +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.5_5.0.24-3\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2007-05-28 22:21+0200\n" +"Last-Translator: Javier Fernández-Sanguino \n" +"Language-Team: Debian l10 Spanish \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "¿Desea realmente continuar con la desactualización?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" +"Existe un archivo con el nombre /var/lib/mysql/debian-*.flag en este sistema." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Este fichero indica que se instaló previamente una versión superior del " +"paquete mysql-server." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"No se puede garantizar que la versión que está instalando pueda usar la base " +"de datos actual." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Nota importante para los usuarios de NIS/YP" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"También debería comprobar los permisos y el propietario del directorio /var/" +"lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "¿Desea eliminar todas las bases de datos MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"El directorio /var/lib/mysql contiene bases de datos MySQL que van a " +"eliminarse." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Debería mantener los datos si tiene planificado instalar una versión de " +"MySQL más reciente o si hay un paquete «mysql-server» distinto que los está " +"utilizando." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "¿Debería ejecutarse el servidor MySQL al iniciarse el sistema?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"El servidor MySQL puede iniciarse en el momento de arranque del sistema o " +"manualmente si escribe la orden «/etc/init.d/mysql start»." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nueva contraseña para el usuario «root» de MySQL:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Se recomienda que configure una contraseña para el usuario " +"«root» (administrador) de MySQL, aunque no es obligatorio." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "No se modificará la contraseña si deja el espacio en blanco." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +#, fuzzy +#| msgid "New password for the MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Nueva contraseña para el usuario «root» de MySQL:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "No se pudo fijar la contraseña para el usuario «root» de MySQL" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Se produjo un error mientras intentaba fijar la contraseña para el usuario " +"administrador de MySQL. Esto puede haber sucedido porque la cuenta ya tenía " +"una contraseña o porque se produjo un error de comunicación con el servidor " +"MySQL." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Debería comprobar la contraseña de la cuenta después de la instalación del " +"paquete." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Consulte /usr/share/doc/mysql-server-5.5/README.Debian para más información." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Deben añadirse las siguientes entradas para usuarios y grupos en el " +#~ "sistema para poder utilizar MySQL:" + +#~ msgid "Cannot upgrade if ISAM tables are present!" +#~ msgstr "¡No se puede actualizar si ya hay tablas ISAM!" + +#~ msgid "" +#~ "Recent versions of MySQL can no longer use the old ISAM table format and " +#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " +#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " +#~ "The installation of mysql-server-5.5 will now abort. In case your old " +#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " +#~ "those tables." +#~ msgstr "" +#~ "Las versiones recientes de MySQL ya no soportan el antiguo formato de " +#~ "tabla ISAM. Antes de realizar la actualización es necesario convertir sus " +#~ "tablas a por ejemplo, MyISAM, usando «mysql_convert_table_format» o " +#~ "«ALTER TABLE x ENGINE=MyISAM». Se va a interrumpir ahora la instalación " +#~ "de mysql-server-5.5. Si aún así su mysql-server-4.1 se elimina aún así, " +#~ "puede reinstalarlo para convertir ese tipo de tablas." + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "¿Soportar las conexiones MySQL establecidadas desde sistemas que ejecutan " +#~ "Debian Sarge o versiones anteriores?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "No era muy segura la forma en la que se almacenaban las contraseñas en " +#~ "versiones anteriores del cliente de MySQL en Debian. Este problema se ha " +#~ "mejorado posteriormente con el inconveniente, sin embargo, de que " +#~ "clientes (por ejemplo, PHP) en sistemas que ejecutan Debian 3.1 «Sarge» " +#~ "no podrán conectarse a cuentas que son nuevas o a las que se le haya " +#~ "cambiado la contraseña." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Para utilizar mysql debe instalar un usuario y grupo equivalente al " +#~ "siguiente y asegurarse de que /var/lib/mysql tiene los permisos correctos " +#~ "(los valores del «uid» y del «gid» pueden ser diferentes)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group: mysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "" +#~ "¿Eliminar las bases de datos utilizadas por todas las versiones de MySQL?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "" +#~ "No se hará ningún cambio en la cuenta si no introduce una contraseña." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "Debería confirmar que la contraseña está correctamente protegida con una " +#~ "contraseña cuando termine la instalación (consulte el fichero README." +#~ "Debian si desea más información)." + +#~ msgid "Install Hints" +#~ msgstr "Sugerencias para la instalación" + +#~ msgid "" +#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in " +#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and " +#~ "have manually be restored." +#~ msgstr "" +#~ "Al actualizar a la versión de MySQL 3.23, la vrsión proporcionada en " +#~ "Debian Woody, se eliminan de manera accidental, los enlaces simbólicos a " +#~ "«/var/lib/mysql» o «/var/log/mysql» y tienen que restaurarse manualmente." + +#~ msgid "" +#~ "MySQL will only install if you have a non-numeric hostname that is " +#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " +#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " +#~ "myhostname\"." +#~ msgstr "" +#~ "Sólo se instalará MySQL si tiene un nombre de equipo que no sea una " +#~ "dirección IP y pueda resolverse a través del archivo /etc/hosts. Por " +#~ "ejemplo, si la orden «hostname» devuelve «MiNombreEquipo» entonces deberá " +#~ "existir una línea «10.0.0.1 MiNombreEquipo» en dicho archivo." + +#~ msgid "" +#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " +#~ "is used in the start/stop and cron scripts. Don't delete." +#~ msgstr "" +#~ "Se creará un nuevo usuario «debian-sys-maint». Esta cuenta de mysql se " +#~ "utilizará en los scripts de inicio y parada y en los scripts «cron». No " +#~ "la elimine." + +#~ msgid "" +#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" +#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " +#~ "there, never only the password!" +#~ msgstr "" +#~ "¡Por favor, recuerde crear una CONTRASEÑA para el usuario «root» de " +#~ "MySQL! ¡Si utiliza /root/.my.cnf debe escribir las líneas «user» y " +#~ "«password» en dicho archivo, no incluya sólo la contraseña!" + +#~ msgid "" +#~ "Should I remove the complete /var/lib/mysql directory tree which is used " +#~ "by all MySQL versions, not necessarily only the one you are about to " +#~ "purge?" +#~ msgstr "" +#~ "¿Debería eliminar el árbol de directorio /var/lib/mysql completo? Tenga " +#~ "en cuenta que lo utilizan todas las versiones de MySQL y no sólo la que " +#~ "está a punto de purgar." diff --git a/debian/po/eu.po b/debian/po/eu.po new file mode 100644 index 000000000000..30792e20addc --- /dev/null +++ b/debian/po/eu.po @@ -0,0 +1,236 @@ +# translation of eu.po to Euskara +# Piarres BEobide , 2006. +# Piarres Beobide , 2009. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +msgid "" +msgstr "" +"Project-Id-Version: eu\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2009-07-29 11:59+0200\n" +"Last-Translator: Piarres Beobide \n" +"Language-Team: Euskara \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Benetan bertsio zaharragora itzuli nahi duzu?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Sisteman badago /var/lib/mysql/debian-*.flag izeneko fitxategi bat." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Fitxategi honek aurretik bertsio berriagoko mysql-zerbitzari pakete bat " +"instalatu dela adierazten du." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Ezin da ziurtatu instalatzen ari zaren bertsio honek dauden datubaseak " +"erabili ahal izango dituenik." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "NIS/YP erabiltzaileentzat ohar garrantzitsua" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Honetaz gain /var/lib/mysql direktorioaren jabea eta baimenak egiaztatu " +"beharko zenituzke:" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Ezabatu MySQL datubase guztiak?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "MySQL datubaseak dituen /var/lib/mysql direktorioa ezabatua izango da." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"MySQL paketea beranduago bertsio berriago bat instalatzeko kentzen ari " +"bazara, edo beste mysql-server pakete bat berau erabiltzen ari bada, datuak " +"mantendu egin beharko lirateke." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Abioan MySQL zerbitzaria abiarazi?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"Sistema abioan MySQL automatikoki abiarazi daiteke edo eskuz '/etc/init.d/" +"mysql start' eginaz." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "MySQL \"root\" erabiltzailearen pasahitz berria:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Derrigorrezkoa ez denean, oso gomendagarria da MySQL administratzaile \"root" +"\" erabiltzaileari pasahitz bat ezartzea." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "Eremua hau zurian utziaz gero ez da pasahitza aldatuko." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Errepikatu MySQL \"root\" erabiltzailearen pasahitza:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Ezin da MySQL \"root\" erabiltzailearen pasahitza ezarri" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Errore bat gertatu da MySQL administratzaile kontuaren pasahitza ezartzean. " +"Hau erabiltzaileak dagoeneko pasahitz bat duelako edo MySQL " +"zerbitzariarekiko konexioan erroreak daudelako gertatu daiteke." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Kontuaren pasahitza egiaztatu beharko zenuke paketea instalatu aurretik." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Mesedez irakurri /usr/share/doc/mysql-server-5.5/README.Debian fitxategia " +"xehetasun gehiagorako." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "Pasahitz sarrera errorea" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "Idatzi dituzun bi pasahitzak ez dira berdina. Mesedez saiatu berriz." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "Dirudienez NDB Cluster-a erabilia dago" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.5 has orphaned NDB Cluster support. Please migrate to the new " +#| "mysql-cluster package and remove all lines starting with \"ndb\" from all " +#| "config files below /etc/mysql/." +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.5-ek NDB cluster euskarri umezurtz bat behar du. Mesedez migratu " +"mysql-cluster pakete berrira eta /etc/mysql/ azpiko konfigurazio fitxategi " +"guztietan \"ndb\"-ez hasten diren lerro guztiak ezabatu." + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "MySQL erabili ahal izateko, hurrengo erabiltzaile eta taldeak gehitu " +#~ "behar dira sisteman:" diff --git a/debian/po/fr.po b/debian/po/fr.po new file mode 100644 index 000000000000..c404291fddaa --- /dev/null +++ b/debian/po/fr.po @@ -0,0 +1,251 @@ +# Translation of mysql-dfsg-* debconf templates to French +# Copyright (C) 2004-2009 Debian French l10n team +# This file is distributed under the same license as the mysql-dfsg-* packages. +# +# Translators: +# Christian Perrier , 2004, 2006, 2007, 2009. +msgid "" +msgstr "" +"Project-Id-Version: fr\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2009-08-08 14:56+0200\n" +"Last-Translator: Christian Perrier \n" +"Language-Team: French \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"debian.org>\n" +"X-Generator: Lokalize 0.3\n" +"Plural-Forms: Plural-Forms: nplurals=2; plural=n>1;\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Faut-il vraiment revenir à la version précédente ?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Un fichier /var/lib/mysql/debian-*.flag est présent sur ce système." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Cela indique qu'une version plus récente du paquet mysql-server a été " +"précédemment installée." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "Il n'est pas garanti que cette version puisse en utiliser les données." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Note importante pour les utilisateurs NIS/YP" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"L'utilisation de MySQL avec NIS/YP impose l'ajout d'un compte local " +"« mysql » avec la commande :" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Vous devez également vérifier le propriétaire et les permissions du " +"répertoire /var/lib/mysql :" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Faut-il supprimer toutes les bases de données MySQL ?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Le répertoire /var/lib/mysql qui contient les bases de données de MySQL va " +"être supprimé." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Si vous prévoyez d'installer une version plus récente de MySQL ou si un " +"autre paquet mysql-server les utilise déjà, vous devriez les conserver." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Faut-il lancer MySQL au démarrage ?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL peut être lancé soit au démarrage, soit en entrant la commande « /etc/" +"init.d/mysql start »." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nouveau mot de passe du superutilisateur de MySQL :" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Il est très fortement recommandé d'établir un mot de passe pour le compte " +"d'administration de MySQL (« root »)." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "Si ce champ est laissé vide, le mot de passe ne sera pas changé." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Confirmation du mot de passe du superutilisateur de MySQL :" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "" +"Impossible de changer le mot de passe de l'utilisateur « root » de MySQL" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Une erreur s'est produite lors du changement de mot de passe du compte " +"d'administration. Un mot de passe existait peut-être déjà ou il n'a pas été " +"possible de communiquer avec le serveur MySQL." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Vous devriez vérifier le mot de passe de ce compte après l'installation du " +"paquet." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Veuillez consulter le fichier /usr/share/doc/mysql-server-5.5/README.Debian " +"pour plus d'informations." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "Erreur de saisie du mot de passe" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" +"Le mot de passe et sa confirmation ne sont pas identiques. Veuillez " +"recommencer." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "Abandon de la gestion de NDB" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the " +#| "new mysql-cluster package and remove all lines starting with \"ndb\" from " +#| "all config files below /etc/mysql/." +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"La version 5.5 de MySQL ne gère plus les grappes NDB. Vous devriez utiliser " +"le paquet mysql-cluster et supprimer toutes les lignes commençant par " +"« ndb » des fichiers de configuration situés dans /etc/mysql." + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Pour pouvoir utiliser MySQL, les utilisateurs et les groupes suivants " +#~ "doivent être ajoutés au système :" + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "Gérer les connexions d'hôtes qui utilisent les versions Debian « sarge » " +#~ "ou antérieures  ?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "La méthode de stockage des mots de passe n'était pas très sûre dans les " +#~ "version précédentes de ce paquet. Cette méthode a été améliorée mais les " +#~ "modifications empêchent la connexion avec de nouveaux comptes ou des " +#~ "comptes dont le mot de passe a été modifié, pour les clients (p. ex. PHP) " +#~ "depuis des hôtes qui utilisent Debian 3.1 « sarge »." diff --git a/debian/po/gl.po b/debian/po/gl.po new file mode 100644 index 000000000000..e46440f1e4f8 --- /dev/null +++ b/debian/po/gl.po @@ -0,0 +1,249 @@ +# Galician translation of mysql-dfsg-5.5's debconf templates +# This file is distributed under the same license as the mysql-dfsg-5.5 package. +# Jacobo Tarrio , 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.5\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2007-04-20 09:44+0200\n" +"Last-Translator: Jacobo Tarrio \n" +"Language-Team: Galician \n" +"Language: gl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "¿Quere pasar a unha versión anterior?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Neste sistema hai un ficheiro chamado /var/lib/mysql/debian-*.flag." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Este ficheiro indica que antes se instalou un paquete mysql-server cunha " +"versión superior." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Non se pode garantir que a versión que está a instalar poida empregar as " +"bases de datos actuais." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Nota importante para os usuarios de NIS/YP" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Tamén debería comprobar os permisos e o propietario do directorio /var/lib/" +"mysql:" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "¿Eliminar tódalas bases de datos de MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Hase eliminar o directorio /var/lib/mysql, que contén as bases de datos de " +"MySQL." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Se está a eliminar o paquete MySQL para instalar despois unha versión máis " +"recente ou se xa hai un paquete mysql-server diferente a empregalo, debería " +"conservar os datos." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "¿Iniciar o servidor MySQL co ordenador?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"Pódese iniciar automaticamente o servidor MySQL ao iniciar o ordenador, ou " +"manualmente coa orde \"/etc/init.d/mysql start\"." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Novo contrasinal para o usuario \"root\" de MySQL:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Aínda que non é obrigatorio, recoméndase encarecidamente que estableza un " +"contrasinal para o usuario administrativo \"root\" de MySQL." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "Se deixa o campo en branco, non se ha cambiar o contrasinal." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +#, fuzzy +#| msgid "New password for the MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Novo contrasinal para o usuario \"root\" de MySQL:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Non se puido establecer o contrasinal do usuario \"root\" de MySQL" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Houbo un erro ao establecer o contrasinal do usuario administrativo de " +"MySQL. Puido ocorrer porque o usuario xa teña un contrasinal ou debido a un " +"problema de comunicacións co servidor MySQL." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "You should check the account's password after tha package installation." +msgid "You should check the account's password after the package installation." +msgstr "Debería comprobar o contrasinal da conta trala instalación do paquete." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Consulte o ficheiro /usr/share/doc/mysql-server-5.5/README.Debian para máis " +"información." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Para empregar MySQL deberían engadirse ao sistema as seguintes entradas " +#~ "de usuarios e grupos:" + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "¿Soportar as conexións a MySQL de máquinas que empreguen Debian \"sarge\" " +#~ "ou anterior?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Nas versións antigas dos clientes MySQL de Debian, os contrasinais non se " +#~ "armacenaban de xeito seguro. Isto mellorouse desde aquela; nembargantes, " +#~ "os clientes (tales coma PHP) das máquinas que executen Debian 3.1 Sarge " +#~ "non se han poder conectar a contas recentes ou a contas nas que se " +#~ "cambiara o contrasinal." diff --git a/debian/po/it.po b/debian/po/it.po new file mode 100644 index 000000000000..3e4570288809 --- /dev/null +++ b/debian/po/it.po @@ -0,0 +1,223 @@ +# Italian (it) translation of debconf templates for mysql-dfsg-5.5 +# Copyright (C) 2009 Software in the Public Interest +# This file is distributed under the same license as the mysql-dfsg-5.5 package. +# Luca Monducci , 2006 - 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.5 5.5.37 italian debconf templates\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2009-08-08 11:03+0200\n" +"Last-Translator: Luca Monducci \n" +"Language-Team: Italian \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Procedere realmente con l'abbassamento di versione?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" +"Su questo sistema esiste un file con nome /var/lib/mysql/debian-*.flag." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Quel file indica che in precedenza è stata installata una versione superiore " +"del pacchetto mysql-server." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Non è garantito che la versione che si sta installando sia in grado di usare " +"i database presenti." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Nota importante per gli utenti NIS/YP" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Per usare MySQL con NIS/YP è necessario aggiungere al sistema locale un " +"account utente per mysql con:" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Inoltre si devono verificare i permessi e la proprietà della directory /var/" +"lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Eliminare tutti i database MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"La directory /var/lib/mysql contenente i database di MySQL sta per essere " +"eliminata." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Se si rimuove il pacchetto MySQL per poi installare una versione più recente " +"oppure se sono già in uso da un altro pacchetto mysql-server, i dati non " +"devono essere eliminati." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Lanciare il server MySQL all'avvio?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"Il server MySQL può essere lanciato automaticamente all'avvio del sistema " +"oppure manualmente con il comando «/etc/init.d/mysql start»." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nuova password per l'utente «root» di MySQL:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Sebbene non sia obbligatoria, si raccomanda d'impostare una password per " +"l'utente d'amministrazione «root» di MySQL." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "Se questo campo è lasciato vuoto, la password non viene cambiata." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Ripetere la password per l'utente «root» di MySQL:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Impossibile impostare la password per l'utente «root» di MySQL" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Si è verificato un errore durante l'impostazione della password per l'utente " +"d'amministrazione di MySQL. Questo può essere accaduto perché l'utente ha " +"già una password oppure a causa di un problema di connessione con il server " +"MySQL." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Al termine dell'installazione si deve verificare la password dell'account." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Per maggiori informazioni si consulti il file /usr/share/doc/mysql-" +"server-5.5/README.Debian." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "Errore di inserimento della password" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "Le due password inserite sono diverse. Riprovare." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "È in uso un cluster NDB" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the " +#| "new mysql-cluster package and remove all lines starting with \"ndb\" from " +#| "all config files below /etc/mysql/." +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.5 non fornisce più il supporto per i cluster NDB. Si dovrebbe " +"migrare al nuovo pacchetto mysql-cluster e rimuovere tutte le righe che " +"iniziano per \"ndb\" da tutti i file di configurazione sotto /etc/mysql/." diff --git a/debian/po/ja.po b/debian/po/ja.po new file mode 100644 index 000000000000..b19f6a8ae520 --- /dev/null +++ b/debian/po/ja.po @@ -0,0 +1,229 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.5 5.5.37-1\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2009-09-01 08:25+0900\n" +"Last-Translator: Hideki Yamane (Debian-JP) \n" +"Language-Team: Japanese \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "本当ã«ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã‚’実行ã—ã¾ã™ã‹?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" +"ã“ã®ã‚·ã‚¹ãƒ†ãƒ ã«ã¯ /var/lib/mysql/debian-*.flag ã¨ã„ã†åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã—ã¦" +"ã„ã¾ã™ã€‚" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ„味ã™ã‚‹ã®ã¯ã€ä»¥å‰ã«ã‚ˆã‚Šæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® mysql-server パッ" +"ケージãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ãŸã“ã¨ã‚’示ã—ã¾ã™ã€‚" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’ç¾åœ¨ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—よã†ã¨ã—ã¦ã„ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ä½¿ãˆã‚‹ã‹ã©ã†ã‹" +"ã¯ä¿è¨¼ã§ãã¾ã›ã‚“。" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "NIS/YP ユーザã¸ã®é‡è¦ãªæ³¨æ„" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"NIS/YP é…下㧠MySQL を使ã†ã«ã¯ãƒ­ãƒ¼ã‚«ãƒ«ã®ã‚·ã‚¹ãƒ†ãƒ ã« mysql ã®ãƒ¦ãƒ¼ã‚¶ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’" +"追加ã™ã‚‹ã®ãŒå¿…è¦ã§ã™ã€‚" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "/var/lib/mysql ã®æ‰€æœ‰è€…権é™ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹å¿…è¦ã‚‚ã‚ã‚Šã¾ã™ã€‚" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "ã™ã¹ã¦ã® MySQL データベースを削除ã—ã¾ã™ã‹?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"MySQL データベースをå«ã‚“ã§ã„るディレクトリ /var/lib/mysql を削除ã—よã†ã¨ã—ã¦" +"ã„ã¾ã™ã€‚" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"後ã§ã‚ˆã‚Šæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚‚ã®ã‚’インストールã—よã†ã¨ã™ã‚‹ãŸã‚ã« MySQL パッケー" +"ジを削除ã—よã†ã¨ã—ã¦ã„ã‚‹ã€ã‚ã‚‹ã„ã¯åˆ¥ã® mysql-server パッケージを既ã«ä½¿ã£ã¦ã„" +"ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯ä¿æŒã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "MySQL をシステム起動時ã«é–‹å§‹ã—ã¾ã™ã‹?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL ã®èµ·å‹•æ–¹æ³•ã«ã¤ã„ã¦ã€ã‚·ã‚¹ãƒ†ãƒ èµ·å‹•æ™‚ã«è‡ªå‹•çš„ã«é–‹å§‹ã™ã‚‹ã‹ã€ã‚ã‚‹ã„㯠'/etc/" +"init.d/mysql start' ã¨æ‰‹ã§å…¥åŠ›ã—ã¦èµ·å‹•ã™ã‚‹ã‹ã‚’é¸ã¹ã¾ã™ã€‚" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "MySQL ã® \"root\" ユーザã«å¯¾ã™ã‚‹æ–°ã—ã„パスワード:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"強制ã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€MySQL を管ç†ã™ã‚‹ \"root\" ユーザã®ãƒ‘スワードを設定ã™ã‚‹" +"ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "ã“ã®å€¤ã‚’空ã®ã¾ã¾ã«ã—ã¦ãŠã„ãŸå ´åˆã¯ã€ãƒ‘スワードã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“。" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "MySQL ã® \"root\" ユーザã«å¯¾ã™ã‚‹æ–°ã—ã„パスワード:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "MySQL ã® \"root\" ユーザã®ãƒ‘スワードを設定ã§ãã¾ã›ã‚“" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"MySQL ã®ç®¡ç†è€…ユーザã«å¯¾ã—ã¦ãƒ‘スワードを設定ã—よã†ã¨ã—ãŸéš›ã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾" +"ã—ãŸã€‚ã“ã‚Œã¯æ—¢ã«ç®¡ç†è€…ユーザã«ãƒ‘スワードãŒè¨­å®šã•ã‚Œã¦ã„ãŸã‹ã€MySQL サーãƒã¨ã®" +"接続ã«å•é¡ŒãŒã‚ã£ãŸãŸã‚ã ã¨æ€ã‚ã‚Œã¾ã™ã€‚" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"パッケージã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«å¾Œã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã®ãƒ‘スワードを確èªã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"詳細㯠/usr/share/doc/mysql-server-5.5/README.Debian ã‚’å‚ç…§ã—ã¦ãã ã•ã„。" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "パスワード入力エラー" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "入力ã•ã‚ŒãŸäºŒã¤ã®ãƒ‘スワードãŒä¸€è‡´ã—ã¾ã›ã‚“。å†å…¥åŠ›ã—ã¦ãã ã•ã„。" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "NDB クラスタãŒåˆ©ç”¨ã•ã‚Œã¦ã„るよã†ã§ã™" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the " +#| "new mysql-cluster package and remove all lines starting with \"ndb\" from " +#| "all config files below /etc/mysql/." +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.5 ã§ã¯ NDB クラスタã®ã‚µãƒãƒ¼ãƒˆã‚’æä¾›ã—ãªããªã£ã¦ã„ã¾ã™ã€‚æ–°ãŸãª mysql-" +"cluster パッケージã«ç§»è¡Œã—ã¦ã€/etc/mysql 以下ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã™ã¹ã¦ã‹ã‚‰ã€Œndbã€" +"ã§å§‹ã¾ã‚‹è¡Œã‚’削除ã—ã¦ãã ã•ã„。" diff --git a/debian/po/nb.po b/debian/po/nb.po new file mode 100644 index 000000000000..b062017e7ec2 --- /dev/null +++ b/debian/po/nb.po @@ -0,0 +1,297 @@ +# translation of mysql_nb.po to Norwegian BokmÃ¥l +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Bjørn Steensrud , 2007. +msgid "" +msgstr "" +"Project-Id-Version: mysql_nb\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2007-02-18 12:13+0100\n" +"Last-Translator: Bjørn Steensrud \n" +"Language-Team: Norwegian BokmÃ¥l \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.2\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +#, fuzzy +#| msgid "Do you really want to downgrade?" +msgid "Really proceed with downgrade?" +msgstr "Er du sikker pÃ¥ at du vil nedgradere?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +#, fuzzy +#| msgid "" +#| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates " +#| "that a mysql-server package with a higher version has been installed " +#| "before. It can not be guaranteed that this version can use its data." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"ADVARSEL: Fila /var/lib/mysql/debian-*.flag finnes. Dette viser at en mysql-" +"server-pakke med et høyere versjonsnummer har vært installert før. Det kan " +"ikke garanteres at denne versjonen kan bruke data fra den høyere versjonen." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +#, fuzzy +#| msgid "Important note for NIS/YP users!" +msgid "Important note for NIS/YP users" +msgstr "Viktig merknad for NIS/YP-brukere!" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +#, fuzzy +#| msgid "" +#| "The script is about to remove the data directory /var/lib/mysql. If it is " +#| "planned to just install a higher MySQL version or if a different mysql-" +#| "server package is already using it, the data should be kept." +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Dette skriptet skal til Ã¥ fjerne data-mappa /var/lib/mysql. Denne mappa bør " +"beholdes hvis det bare skal installeres en høyere MySQL-versjon, eller hvis " +"en annen mysql-server-pakke allerede bruker den." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +#, fuzzy +#| msgid "Should MySQL start on boot?" +msgid "Start the MySQL server on boot?" +msgstr "Skal MySQL startes ved maskinoppstart?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +#, fuzzy +#| msgid "" +#| "The MySQL can start automatically on boot time or only if you manually " +#| "type '/etc/init.d/mysql start'." +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL kan startes automatisk nÃ¥r maskinen starter, eller bare hvis du " +"skriver «/etc/init.d/mysql start»." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +#, fuzzy +#| msgid "New password for MySQL \"root\" user:" +msgid "New password for the MySQL \"root\" user:" +msgstr "Nytt passord for MySQLs «root»-bruker:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +#, fuzzy +#| msgid "" +#| "It is highly recommended that you set a password for the MySQL " +#| "administrative \"root\" user." +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Det anbefales sterkt at du oppgir et passord for den administrative «root»-" +"brukeren i MySQl." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +#, fuzzy +#| msgid "New password for MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Nytt passord for MySQLs «root»-bruker:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "Unable to set password for MySQL \"root\" user" +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Klarer ikke angi passord for MySQLs «root»-bruker" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "It seems an error occurred while setting the password for the MySQL " +#| "administrative user. This may have happened because the user already has " +#| "a password, or because there was a problem communicating with the MySQL " +#| "server." +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Det ser ut til at det oppsto en feil mens det ble satt et passord for MySQLs " +"administrative bruker. Dette kan være fordi brukeren allerede har et " +"passord, eller fordi det var et kommunikasjonsproblem med MySQL-tjeneren." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "Skal MySQL-tilkoblinger støttes fra vertsmaskiner som kjører Debian " +#~ "«sarge» eller eldre?" + +#, fuzzy +#~| msgid "" +#~| "The way passwords were stored was not very secure. This has been " +#~| "improved with the drawback that clients (e.g. PHP) from hosts running " +#~| "Debian 3.1 Sarge will not be able to connect to account which are new or " +#~| "whose password have been changed. See /usr/share/doc/mysql-server-5.5/" +#~| "README.Debian." +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Passord ble tidligere lagret pÃ¥ en lite sikker mÃ¥te. Dette er nÃ¥ " +#~ "forbedret, med den ulempen at klienter (f.eks. PHP) fra verter som kjører " +#~ "Debian 3.1 Sarge ikke vil kunne koble til en konto som er ny eller har " +#~ "fÃ¥tt endret passordet. Se /usr/share/doc/mysql-server-5.5/README.Debian." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "For Ã¥ bruke MySQL mÃ¥ du installere en bruker og gruppe tilsvarende den " +#~ "nedenfor og se til at /var/lib/mysql har riktige rettigheter (uid/gid kan " +#~ "være forskjellig)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group: mysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "Skal databasene brukt av alle MySQL-versjoner fjernes?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "" +#~ "Hvis du ikke oppgir et passord blir det ikke gjort noen endringer med " +#~ "kontoen." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "NÃ¥r installasjonen er ferdig bør det sjekkes at kontoen er ordentlig " +#~ "beskyttet med et passord (mer informasjon finnes i README.Debian)." diff --git a/debian/po/nl.po b/debian/po/nl.po new file mode 100644 index 000000000000..f820a5097386 --- /dev/null +++ b/debian/po/nl.po @@ -0,0 +1,290 @@ +# Dutch mysql-dfsg-5.5 po-debconf translation, +# Copyright (C) 2006 THE PACKAGE'S COPYRIGHT HOLDER +# +# Vincent Zweije , 2006. +# Eric Spreen \n" +"Language-Team: Debian-Dutch \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Wilt u echt een oude versie herstellen?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" +"Er bestaat een bestand genaamd /var/lib/mysql/debian-*.flag op dit systeem." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Zulk een bestand geeft aan dat er eerder een pakket mysql-server met een " +"hogere versie is geinstalleerd." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Er is geen garantie dat de versie die u op dit moment installeert de huidige " +"databases kan gebruiken." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Belangrijke opmerking voor gebruikers van NIS/YP" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Het gebruik van MySQL onder NIS/YP vereist dat een MySQL gebruikersaccount " +"wordt toegevoegd aan het lokale systeem met:" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"U dient ook de permissies en eigenaren van de map /var/lib/mysql te " +"controleren:" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Wilt u alle MySQL-databases verwijderen?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"De map /var/lib/mysql die de MySQL-databases bevat staat op het punt om " +"verwijderd te worden." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Als u het MySQL-pakket verwijdert om later een meer recente versie te " +"installeren of als een ander mysql-server pakket het al gebruikt, zou de " +"data behouden moeten worden." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Moet MySQL starten als de computer start?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"De MySQL-server kan automatisch worden gestart bij het starten van de " +"computer of slechts wanneer u '/etc/init.d/mysql start' handmatig uitvoert." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nieuw wachtwoord voor de MySQL \"root\"-gebruiker:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Hoewel niet verplicht, wordt het sterk aangeraden een wachtwoord in te " +"stellen voor de administratieve MySQL \"root\"-gebruiker." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" +"Als dit veld leeg wordt gelaten, zal het wachtwoord niet worden veranderd." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Herhaal het wachtwoord voor de MySQL \"root\"-gebruiker:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Kan het wachtwoord voor de MySQL \"root\"-gebruiker niet instellen" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Er is een fout opgetreden bij het instellen van het wachtwoord voor de MySQL " +"administratieve gebruiker. Dat kan komen doordat de gebruiker al een " +"wachtwoord heeft, of omdat er een probleem was bij het communiceren met de " +"MySQL-server." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"U zou het wachtwoord van het account moeten controleren nadat het pakket is " +"geïnstalleerd." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Leest u het bestand /usr/share/doc/mysql-server-5.1/README.Debian voor meer " +"informatie." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "Fout bij invoer wachtwoord" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" +"De twee wachtwoorden die u hebt ingevoerd zijn niet gelijk. Probeert u het " +"opnieuw." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "De NDB-cluster lijkt in gebruik te zijn" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.1 no longer provides NDB Cluster support. Please migrate to the " +#| "new mysql-cluster-server package and remove all lines starting with \"ndb" +#| "\" from all config files below /etc/mysql/." +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.1 biedt niet langer ondersteuning voor NDB Cluster. Migreer naar het " +"nieuwe pakket mysql-cluster en verwijder alle regels die beginnen met \"ndb" +"\" van alle configuratiebestanden onder /etc/mysql/." + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "Moet u MySQL-verbindingen accepteren van computers die Debian \"sarge\" " +#~ "of ouder draaien?" + +#, fuzzy +#~| msgid "" +#~| "The way passwords were stored was not very secure. This has been " +#~| "improved with the drawback that clients (e.g. PHP) from hosts running " +#~| "Debian 3.1 Sarge will not be able to connect to account which are new or " +#~| "whose password have been changed. See /usr/share/doc/mysql-server-5.5/" +#~| "README.Debian." +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "De wijze waarop wachtwoorden werden bewaard was niet erg veilig. Dit is " +#~ "verbeterd, maar helaas zullen programma's van computers die Debian 3.1 " +#~ "Sarge draaien, geen verbinding meer kunnen maken met accounts die nieuw " +#~ "zijn, of waarvan het wachtwoord is gewijzigd. Zie /usr/share/doc/mysql-" +#~ "server-5.5/README.Debian." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Om mysql te gebruiken dient u een gebruiker en groep aan te maken, " +#~ "gelijkwaardig aan onderstaand voorbeeld, en u dient ervoor te zorgen dat /" +#~ "var/lib/mysql de bijbehorende toegangsrechten heeft (uid en gid mogen " +#~ "anders zijn)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group: mysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "Databases verwijderen die door alle MySQL versies worden gebruikt?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "" +#~ "Indien u geen wachtwoord opgeeft zal het account niet worden gewijzigd." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "Wanneer de installatie klaar is, dient u te verifiëren dat het account " +#~ "netjes beschermd is met een wachtwoord (zie README.Debian voor meer " +#~ "informatie)." diff --git a/debian/po/pt.po b/debian/po/pt.po new file mode 100644 index 000000000000..b83aa6f052c6 --- /dev/null +++ b/debian/po/pt.po @@ -0,0 +1,307 @@ +# Portuguese translation for mysql-dfsg-5.5's debconf messages +# Copyright (C) 2006 Miguel Figueiredo +# This file is distributed under the same license as the mysql-dfsg-5.5 package. +# Miguel Figueiredo +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.5\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2007-05-05 21:01+0100\n" +"Last-Translator: Miguel Figueiredo \n" +"Language-Team: Portuguese \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Deseja mesmo fazer downgrade?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Existe um ficheiro chamado /var/lib/mysql/debian-*.flag neste sistema." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Tal ficheiro significa que anteriormente foi instalado um pacote mysql-" +"server com um número de versão superior." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Não existe nenhuma garantia que a versão que está actualmente a instalar " +"seja capaz de utilizar as bases de dados actuais." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Nota importante para utilizadores de NIS/YP" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Deve também verificar as permissões e o dono do directório /var/lib/mysql :" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Remover todas as bases de dados MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"O directório /var/lib/mysql que contém as bases de dados MySQL está prestes " +"a ser removido." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Se está a remover o pacote MySQL de modo a posteriormente instalar uma " +"versão mais recente ou se um pacote mysq-server já está os está a utilizar, " +"os dados devem ser mantidos." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Iniciar o servidor MySQL no arranque?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"O MySQL pode ser automaticamente lançado no arranque ou manualmente através " +"do comando '/etc/init.d/mysql start'." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nova palavra-passe para o utilizador \"root\" do MySQL:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Embora não seja mandatório, É fortemente recomendado que defina uma palavra-" +"passe para o utilizador administrativo \"root\" do MySQL." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "" +"Se esse campo for deixado em branco, a palavra-passe não irá ser alterada." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +#, fuzzy +#| msgid "New password for the MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Nova palavra-passe para o utilizador \"root\" do MySQL:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "" +"Não foi possível definir a palavra-passe para o utilizador \"root\" do MySQL" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Ocorreu um erro enquanto era definida a palavra-passe para o utilizador " +"administrativo do MySQL. Isto pode ter acontecido porque a cona já tem uma " +"palavra-passe, ou porque ocorreu um problema ao comunicação com o servidor " +"MySQL." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "You should check the account's password after tha package installation." +msgid "You should check the account's password after the package installation." +msgstr "" +"Você deve verificar a palavra-passe da conta após a instalação do pacote." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Para mais informação por favor leia o ficheiro /usr/share/doc/mysql-" +"server-5.5/README.Debian." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Para utilizar o MySQL, têm de ser acrescentadas as seguintes entradas " +#~ "para os utilizadores e grupos:" + +#~ msgid "Cannot upgrade if ISAM tables are present!" +#~ msgstr "Não é possível actualizar se estiverem presentes tabelas ISAM!" + +#~ msgid "" +#~ "Recent versions of MySQL can no longer use the old ISAM table format and " +#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " +#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " +#~ "The installation of mysql-server-5.5 will now abort. In case your old " +#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " +#~ "those tables." +#~ msgstr "" +#~ "As versões recentes de MySQL já não podem utilizar o antigo formato de " +#~ "tabelas ISAM e é por isso necessário converter as suas tabelas pra e.g. " +#~ "MyISAM antes da actualização, utilizando \"mysql_convert_table_format\" " +#~ "ou \"ALTER TABLE x ENGINE=MyISAM\". A instalação de mysql-server-5.5 irá " +#~ "agora ser cancelada. Se o seu antigo mysql-server-4.1 for removido apenas " +#~ "reinstale para converter essas tabelas." + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "Suportar ligações MySQL de máquinas que corram Debian \"sarge\" ou mais " +#~ "antigos?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Nas versões antigas de clientes de MySQL em Debian, as palavras-passe não " +#~ "eram guardadas de forma segura. Isto foi melhorado desde aí, no entanto " +#~ "os clientes (como o PHP) de máquinas que corram Debian 3.1 Sarge não irão " +#~ "conseguir ligar-se a contas novas ou cuja palavra-passe foi alterada." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Para utilizar mysql e instalar um utilizador e grupo equivalentes para o " +#~ "seguinte e assegurar-se que /var/lib/mysql têm as permissões correctas (o " +#~ "uid/gid podem ser diferentes)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group: mysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "Remover as bases de dados utilizadas por todas as versões de MySQL?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "" +#~ "Se não disponibilizar uma password não serão feitas alterações nesta " +#~ "conta." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "Quando terminar a instalação, deve verificar se a conta está devidamente " +#~ "protegida com uma password (para mais informações veja README.Debian)." diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po new file mode 100644 index 000000000000..b88e82e97f51 --- /dev/null +++ b/debian/po/pt_BR.po @@ -0,0 +1,443 @@ +# Brazilian Portuguese (pt_BR) debconf template translation for +# Debian's mysql-dfsg source package. +# Debian-BR Project +# André Luís Lopes, , 2004 +# André Luís Lopes, , 2006 +# André Luís Lopes, , 2007 +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.5\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2007-04-21 15:59-0300\n" +"Last-Translator: André Luís Lopes \n" +"Language-Team: Debian-BR Project \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"pt_BR utf-8\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Realmente proceder com o rebaixamento de versão?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Um arquivo de nome /var/lib/mysql/debian-*.flag existe no sistema." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"A presença de um arquivo como este é uma indicação de que um pacote mysql-" +"server com um número de versão mais alto já foi instalado anteriormente." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Não há garantias de que a versão que você está instalando no momento " +"conseguirá utilizar as bases de dados existentes." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Aviso importante para usuários NIS/YP" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Você deverá também checar as permissões e o dono do diretório /var/lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Remover todas as bases de dados do MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"O diretório /var/lib/mysql, o qual contém as bases de dados do MySQL, está " +"prestes a ser removido." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Caso você esteja removendo o pacote MySQL para posteriormente instalar uma " +"versão mais recente ou, caso uma versão diferente do pacote mysql-server " +"esteja sendo utilizada, os dados deverão ser mantidos." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Iniciar o servidor MySQL junto a inicialização da máquina?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"O servidor MySQL pode ser iniciado automaticamente junto a inicialização da " +"máquina ou manualmente com o comando '/etc/init.d/mysql start'." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nova senha para o usuário \"root\" do MySQL:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Apesar de não ser mandatório, é altamente recomendado que você defina uma " +"senha para o usuário administrativo \"root\" do MySQL." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "Caso este campo seja deixado em branco, a senha não sera mudada." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +#, fuzzy +#| msgid "New password for the MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Nova senha para o usuário \"root\" do MySQL:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Impossível definir senha para o usuário \"root\" do MySQL" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Um erro ocorreu durante a definição da senha para o usuário administrativo " +"do MySQL. Isso pode ter acontecido devido a esse usuário já possuir uma " +"senha definida ou devido a ocorrência de um problema de comunicação com o " +"servidor MySQL." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "You should check the account's password after tha package installation." +msgid "You should check the account's password after the package installation." +msgstr "Você deverá checar a senha dessa conta após a instalação deste pacote." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Por favor, leia o arquivo /usr/share/doc/mysql-server-5.5/README.Debian para " +"maiores informações." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Para utilizar o MySQL, as seguintes entradas para usuários e grupos devem " +#~ "ser adicionadas ao sistema:" + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "Suportar conexões MySQL originadas de hosts executando o Debian \"sarge\" " +#~ "ou mais antigos ?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Em versões antigas dos clientes MySQL no Debian, as senhas não eram " +#~ "armazenadas de forma segura. Isto foi corrigido desde então, porém, " +#~ "clientes (como o PHP) em hosts executando o Debian 3.1 Sarge não serão " +#~ "capazes de conectar em contas recentes ou contas as quais as senhas " +#~ "tenham sido modificadas." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Para utilizar o MySQL, você deve instalar um usuário e um grupo " +#~ "equivalentes ao usuário e grupo a seguir para se certificar de que o " +#~ "diretório /var/lib/mysql possua as permissões correctas (o uid/gid podem " +#~ "ser diferentes)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group: mysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "Remover as bases de dados utilizadas por todas as versões do MySQL?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "" +#~ "Caso você não forneça uma senha, nenhuma mudança será feita na conta." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "Quando a instalação finalizar, você deverá verificar se a conta está " +#~ "apropriadamente protegida com uma senha (consulte o arquivo README.Debian " +#~ "para maiores informações)." + +#~ msgid "internal" +#~ msgstr "interno" + +#~ msgid "Only internally used." +#~ msgstr "Somente utilizado internamente." + +#, fuzzy +#~ msgid "Update Hints" +#~ msgstr "Dicas de atualização" + +#, fuzzy +#~ msgid "" +#~ "Rarely, e.g. on new major versions, the privilege system is improved. To " +#~ "make use of it mysql_fix_privilege_tables must be executed manually. The " +#~ "script is not supposed to give any user more rights that he had before," +#~ msgstr "" +#~ "Raramente, por exemplo, em novas versões maiores, o sistema de " +#~ "privilégios é melhorado. Para fazer uso disso, o script " +#~ "mysql_fix_privilege_tables deve ser executado manualmente. O script não " +#~ "atribuirá a nenhum usuário mais direitos do que os mesmos já possuíam " +#~ "anteriormente." + +#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html" +#~ msgstr "Por favor, leia http://www.mysql.com/doc/en/Upgrade.html" + +#, fuzzy +#~ msgid "Install Hints" +#~ msgstr "Dicas de instalação" + +#, fuzzy +#~ msgid "" +#~ "MySQL will only install if you have a non-numeric hostname that is " +#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " +#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " +#~ "myhostname\"." +#~ msgstr "" +#~ "O MySQL será instalado somente caso você possua um nome de host NÃO " +#~ "NUMÉRICO que possa ser resolvido através do arquivo /etc/hosts, ou seja, " +#~ "caso o comando \"hostname\" retorne \"myhostname\", uma linha como " +#~ "\"10.0.0.1 myhostname\" deverá existir no arquivo /etc/hosts." + +#~ msgid "" +#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " +#~ "is used in the start/stop and cron scripts. Don't delete." +#~ msgstr "" +#~ "Um novo usuário MySQL de nome \"debian-sys-maint\" será criado. Essa " +#~ "conta MySQL é utilizada pelos scripts de inicialização/parada e pelos " +#~ "scripts cron. Não remova esse usuário." + +#, fuzzy +#~ msgid "" +#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" +#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " +#~ "there, never only the password!" +#~ msgstr "" +#~ "Por favor, lembre-se de definir uma SENHA para o usuário root do MySQL ! " +#~ "Caso você utilize um arquivo /root/.my.cnf, sempre inclua as linhas \"user" +#~ "\" e \"password\" nesse arquivo, nunca somente a senha ! Consulte o " +#~ "arquivo /usr/share/doc/mysql-server/README.Debian para mais informações." + +#~ msgid "" +#~ "Should I remove all databases below /var/lib/mysql as you are purging the " +#~ "mysql-server package?" +#~ msgstr "" +#~ "Todas as base de dados sob o diretório /var/lib/mysql devem ser removidas " +#~ "quando você remover o pacote pacote mysql-server ?" + +#~ msgid "" +#~ "Networking is disabled by default for security reasons. You can enable it " +#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf." +#~ msgstr "" +#~ "O suporte ao funcionamento em rede está desativado por padrão por " +#~ "questões de segurança. Você poderá ativá-lo comentando a opção 'skip-" +#~ "networking' no arquivo /etc/mysql/my.cnf." + +#~ msgid "security and update notice" +#~ msgstr "aviso de segurança e actualização" + +#~ msgid "" +#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-" +#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. " +#~ "remove everything including the configuration) somewhen? (default is not)" +#~ msgstr "" +#~ "Devo remover tudo abaixo de /var/lib/mysql quando fizer o purge do pacote " +#~ "mysql-server com o comando \"dpkg --purge mysql-server\" (ou seja, " +#~ "remover tudo incluíndo a configuração)? (o padrão é não remover)" + +#~ msgid "Make MySQL reachable via network?" +#~ msgstr "Fazer com que o MySQL seja acessível via rede?" + +#~ msgid "" +#~ "Should MySQL listen on a network reachable TCP port? This is not " +#~ "necessary for use on a single computer and could be a security problem." +#~ msgstr "" +#~ "O MySQL deve aguardar ligações numa porta TCP acessível via rede? Isto " +#~ "não é necessário para uso num único computador e pode ser um problema de " +#~ "segurança." + +#~ msgid "Enable chroot mode?" +#~ msgstr "Activar o modo chroot?" + +#~ msgid "" +#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so " +#~ "that users cannot modify any files outside this directory. This improves " +#~ "resistence against crackers, too, as they are not able to modify system " +#~ "files." +#~ msgstr "" +#~ "O MySQL é capaz de se prender no diretório /var/lib/mysql_jail, assim os " +#~ "utilizadores não poderão modificar ficheiros fora deste directório. Isto " +#~ "aumenta também a resistência contra crackers, pois eles não poderão " +#~ "modificar arquivos de sistema." + +#~ msgid "Please run mysql_fix_privilege_tables !" +#~ msgstr "Por favor execute mysql_fix_privilege_tables !" + +#~ msgid "" +#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs " +#~ "other than root and mysql with mysql." +#~ msgstr "" +#~ "Permissões seguras para o diretório /var/lib/mysql serão asseguradas " +#~ "substituíndo GIDs diferentes de root e mysql por mysql." + +#~ msgid "" +#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/" +#~ msgstr "" +#~ "Instruções sobre como activar o suporte de SSL estão disponíveis no " +#~ "directório /usr/share/doc/mysql-server/." + +#, fuzzy +#~ msgid "mysql_fix_privileges_tables should be executed" +#~ msgstr "mysql_fix_privileges_tables será executado" + +#, fuzzy +#~ msgid "" +#~ "The latest MySQL versions have an enhanced, more fine grained, privilege " +#~ "system. To make use of it, some new fields must be added to the tables " +#~ "in the \"mysql\" database. This will not happen automatically." +#~ msgstr "" +#~ "As últimas versões do MySQL possuem um sistema de privilégios melhorado e " +#~ "mais refinado. Para utilizá-lo, alguns novos campos devem ser adicionados " +#~ "as tabelas na base de dados \"mysql\". Isto é feito pelo script " +#~ "mysql_fix_privileges_tables durante esta actualização independente do " +#~ "servidor estar a correr ou não !" + +#~ msgid "" +#~ "This script is not supposed to give any user more rights that he had " +#~ "before, if you encounter such a case, please contact me." +#~ msgstr "" +#~ "Este script não deverá fornecer mais direitos a um utilizador além dos " +#~ "quais ele já possua anteriormente. SE encontrar um caso desses, por favor " +#~ "entre em contacto com o mantainer deste pacote Debian." diff --git a/debian/po/ro.po b/debian/po/ro.po new file mode 100644 index 000000000000..2c170b269fa6 --- /dev/null +++ b/debian/po/ro.po @@ -0,0 +1,319 @@ +# Romanian translation of mysql-dfsg. +# Copyright (C) 2006 THE mysql-dfsg'S COPYRIGHT HOLDER +# This file is distributed under the same license as the mysql-dfsg package. +# +# Stan Ioan-Eugen , 2006. +msgid "" +msgstr "" +"Project-Id-Version: po-debconf://mysql-dfsg\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2006-12-20 21:27+0200\n" +"Last-Translator: stan ioan-eugen \n" +"Language-Team: romanian \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +#, fuzzy +#| msgid "Do you really want to downgrade?" +msgid "Really proceed with downgrade?" +msgstr "SunteÅ£i sigur că doriÅ£i să instalaÅ£i o versiune mai veche?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +#, fuzzy +#| msgid "" +#| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates " +#| "that a mysql-server package with a higher version has been installed " +#| "before. It can not be guaranteed that this version can use its data." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"AVERTISMENT: FiÅŸierul /var/lib/mysql/debian-*.flag există. Acest lucru " +"indică faptul că anterior a fost instalată o versiune nouă a pachetului " +"mysql-server. Nu se poate garanta că versiunea instalată acum poate folosi " +"datele versiunii instalate anterior." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +#, fuzzy +#| msgid "Important note for NIS/YP users!" +msgid "Important note for NIS/YP users" +msgstr "Notă importantă pentru utilizatorii NIS/YP!" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +#, fuzzy +#| msgid "" +#| "The script is about to remove the data directory /var/lib/mysql. If it is " +#| "planned to just install a higher MySQL version or if a different mysql-" +#| "server package is already using it, the data should be kept." +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Scriptul urmează să ÅŸteargă directorul de date /var/lib/mysql. Dacă plănuiÅ£i " +"doar să instalaÅ£i o versiune nouă MySQL sau datele sunt folosite de către un " +"alt pachet mysql-server, atunci ar trebui păstraÅ£i datele." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +#, fuzzy +#| msgid "Should MySQL start on boot?" +msgid "Start the MySQL server on boot?" +msgstr "DoriÅ£i ca MySQL să pornească la initializarea sistemului?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +#, fuzzy +#| msgid "" +#| "The MySQL can start automatically on boot time or only if you manually " +#| "type '/etc/init.d/mysql start'." +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL poate porni automat la iniÅ£ializarea sistemului sau doar dacă rulaÅ£i " +"comanda „/etc/init.d/mysql startâ€." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +#, fuzzy +#| msgid "New password for MySQL \"root\" user:" +msgid "New password for the MySQL \"root\" user:" +msgstr "Noua parolă pentru utilizatorul „root†al MySQL:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +#, fuzzy +#| msgid "" +#| "It is highly recommended that you set a password for the MySQL " +#| "administrative \"root\" user." +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Este recomandat să stabiliÅ£i o parolă pentru utilizatorul administrativ " +"„root†al MySQL." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +#, fuzzy +#| msgid "New password for MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Noua parolă pentru utilizatorul „root†al MySQL:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "Unable to set password for MySQL \"root\" user" +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Nu s-a putut stabili parola pentru utilizatorul „root†al MySQL" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "It seems an error occurred while setting the password for the MySQL " +#| "administrative user. This may have happened because the user already has " +#| "a password, or because there was a problem communicating with the MySQL " +#| "server." +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Se pare că a intervenit o eroare în stabilirea parolei pentru utilizatorul " +"administrativ al MySQL. Acest lucru se poate întâmpla dacă utilizatorul are " +"deja o parolă, sau a existat o problemă în comunicarea cu serverul MySQL." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "Cannot upgrade if ISAM tables are present!" +#~ msgstr "Nu se poate face actualizarea dacă sunt prezente tabele ISAM!" + +#~ msgid "" +#~ "Recent versions of MySQL can no longer use the old ISAM table format and " +#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " +#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " +#~ "The installation of mysql-server-5.5 will now abort. In case your old " +#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " +#~ "those tables." +#~ msgstr "" +#~ "Versiunile recente MySQL nu mai pot folosi vechiul format de tabele ISAM " +#~ "ÅŸieste necesar să convertiÅ£i tabelele dumneavoastră de ex. la formatul " +#~ "MyISAM înainte de a face actualizarea folosind comanda " +#~ "„mysql_convert_table_format†sau „ALTER TABLE x ENGINE=MyISAMâ€. " +#~ "Instalarea mysql-server-5.5 va eÅŸua. ÃŽn caz că ÅŸtergeÅ£iversiunea " +#~ "anterioară mysql-server-4.1 va trebui reinstalată pentru a converti " +#~ "tabelele." + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "SuportaÅ£i conexiuni MySQL de la staÅ£ii ce rulează sistemul Debian „sarge†" +#~ "sau mai vechi?" + +#, fuzzy +#~| msgid "" +#~| "The way passwords were stored was not very secure. This has been " +#~| "improved with the drawback that clients (e.g. PHP) from hosts running " +#~| "Debian 3.1 Sarge will not be able to connect to account which are new or " +#~| "whose password have been changed. See /usr/share/doc/mysql-server-5.5/" +#~| "README.Debian." +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Modul în care erau păstrate parolele nu era foarte sigur. Acest lucru a " +#~ "fost îmbunătăţitcu dezajantajul că clienÅ£ii (de ex. PHP) de pe staÅ£ii ce " +#~ "rulează sistemul Debian 3.1 Sargenu se vor putea conecta la conturi noi " +#~ "sau ale căror parole au fost schimbate. CitiÅ£i /usr/share/doc/mysql-" +#~ "server-5.5/README.Debian." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Pentru a folosi mysql trebuie să adăugaÅ£i un utilizator ÅŸi grup " +#~ "echivalent ÅŸi să vă asiguraÅ£i că /var/lib/mysql are permisiunile " +#~ "stabilite corect (uid/gid pot aveavalori diferite)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd:\tmysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group:\tmysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql:\tdrwxr-xr-x\tmysql\tmysql" + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "DoriÅ£i să ÅŸtergeÅ£i bazele de date folosite de toate versiune MySQL?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "" +#~ "Dacă nu introduceÅ£i nici o parolă, nici o schimbare nu va fi luată în " +#~ "considerare." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "După finalizarea instalării, ar trebui să verificaÅ£i dacă contul este " +#~ "protejat cu o parolă (citiÅ£i fiÅŸierul README.Debian pentru informaÅ£ii " +#~ "suplimentare)." diff --git a/debian/po/ru.po b/debian/po/ru.po new file mode 100644 index 000000000000..58d4af781588 --- /dev/null +++ b/debian/po/ru.po @@ -0,0 +1,229 @@ +# translation of ru.po to Russian +# Russian messages: +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry'# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +# Ilgiz Kalmetev , 2003. +# Yuriy Talakan' , 2005, 2006. +# Yuriy Talakan' , 2007. +# Yuri Kozlov , 2009. +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.5 5.5.37-1\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2009-08-06 20:27+0400\n" +"Last-Translator: Yuri Kozlov \n" +"Language-Team: Russian \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "ДейÑтвительно уÑтановить более Ñтарую верÑию?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Ð’ ÑиÑтеме найден файл /var/lib/mysql/debian-*.flag." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Это означает, что ранее уже был уÑтановлен пакет mysql-server более новой " +"верÑии." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Ðет гарантий, что верÑиÑ, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑƒÑтанавливаетÑÑ ÑейчаÑ, будет ÑпоÑобна " +"работать Ñ Ð¸Ð¼ÐµÑŽÑ‰Ð¸Ð¼Ð¸ÑÑ Ð±Ð°Ð·Ð°Ð¼Ð¸ данных." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Важное замечание Ð´Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¹ NIS/YP" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"ИÑпользование MySQL в NIS/YP требует Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ ÑƒÑ‡Ñ‘Ñ‚Ð½Ð¾Ð¹ запиÑи mysql в " +"локальную ÑиÑтему Ñ:" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "Также проверьте права доÑтупа и владельца каталога /var/lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Удалить вÑе базы данных MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð½Ð° удаление каталога /var/lib/mysql, Ñодержащий базы данных MySQL." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"ЕÑли вы удалÑете пакет MySQL Ð´Ð»Ñ ÑƒÑтановки более новой верÑии MySQL, или " +"еÑÑ‚ÑŒ другие пакеты mysql-server, иÑпользующие Ñтот каталог, то данные лучше " +"Ñохранить." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "ЗапуÑкать MySQL при загрузке ÑиÑтемы?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"Сервер MySQL можно запуÑкать автоматичеÑки при загрузке ÑиÑтемы или вручную " +"по команде '/etc/init.d/mysql start'." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Ðовый пароль Ð´Ð»Ñ MySQL Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ \"root\":" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Ð¥Ð¾Ñ‚Ñ Ð¸ необÑзательно, но наÑтоÑтельно рекомендуетÑÑ ÑƒÑтановить пароль Ð´Ð»Ñ " +"админиÑтративного Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ MySQL \"root\"." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "ЕÑли оÑтавить поле пуÑтым, то пароль изменён не будет." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Повторите ввод Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð´Ð»Ñ MySQL Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ \"root\":" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Ðевозможно задать пароль MySQL пользователю \"root\"" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Ð’ процеÑÑе Ð·Ð°Ð´Ð°Ð½Ð¸Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð°Ð´Ð¼Ð¸Ð½Ð¸Ñтративного MySQL Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¿Ñ€Ð¾Ð¸Ð·Ð¾ÑˆÐ»Ð° " +"ошибка. Это могло произойти, еÑли у Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ ÑƒÐ¶Ðµ был задан пароль, или " +"из-за проблем ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ Ñервером MySQL." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "Проверьте пароль учётной запиÑи поÑле уÑтановки пакета." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "ПодробноÑти Ñм. в файле /usr/share/doc/mysql-server-5.5/README.Debian." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "Ошибка ввода паролÑ" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "Два введённых Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð½Ðµ одинаковы. Повторите ввод." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "NDB Cluster уже иÑпользуетÑÑ" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the " +#| "new mysql-cluster package and remove all lines starting with \"ndb\" from " +#| "all config files below /etc/mysql/." +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.5 больше не поддерживает NDB Cluster. Переходите на новый пакет " +"mysql-cluster и удалите вÑе Ñтроки, начинающиеÑÑ Ñ \"ndb\", из вÑех файлов " +"наÑтройки в каталоге /etc/mysql/." diff --git a/debian/po/sk.po b/debian/po/sk.po new file mode 100644 index 000000000000..c753da095cff --- /dev/null +++ b/debian/po/sk.po @@ -0,0 +1,219 @@ +# Slovak translations for mysql-5.1 package +# Slovenské preklady pre balík mysql-5.1. +# Copyright (C) 2011 THE mysql-5.1'S COPYRIGHT HOLDER +# This file is distributed under the same license as the mysql-5.1 package. +# Slavko , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-5.1 5.1.49-3\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2011-01-04 12:55+0100\n" +"Last-Translator: Slavko \n" +"Language-Team: Slovak \n" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Naozaj pokraÄovaÅ¥ v znížení verzie?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Súbor s menom /var/lib/mysql/debian-*.flag už v systéme existuje." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Takýto súbor udáva, že už bol predtým nainÅ¡talovaný balík mysql-server s " +"vyÅ¡Å¡ou verziou." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Neexistuje žiadna záruka, že aktuálne inÅ¡talovaná verzia dokáže pracovaÅ¥ s " +"existujúcimi databázami." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Dôležitá poznámka pre používateľov NIS/YP" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Používanie MySQL pod NIS/YP vyžaduje aby bol používateľský úÄet mysql " +"pridaný do lokálneho systému pomocou:" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Mali by ste tiež skontrolovaÅ¥ vlastníctvo a práva k adresáru /var/lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "OdstrániÅ¥ vÅ¡etky databázy MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Adresár /var/lib/mysql, ktorý obsahuje databázy MySQL, bude odstránený." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Ak odstraňujete balík MySQL kvôli neskorÅ¡ej inÅ¡talácii najnovÅ¡ej verzie " +"alebo ak ich používa aj iný balík mysql-server, mali by ste údaje ponechaÅ¥." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "SpúšťaÅ¥ MySQL server pri Å¡tarte systému?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL server môže byÅ¥ automaticky spúšťaný pri Å¡tarte systému alebo manuálne " +"príkazom „/etc/init.d/mysql startâ€." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nové heslo MySQL používateľa „rootâ€:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Hoci to nie je vyslovene nutné, je silne odporúÄané nastaviÅ¥ heslo " +"správcovského MySQL úÄtu \"root\"." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "Ak toto pole ponecháte prázdne, heslo nebude zmenené." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Zopakujte heslo MySQL používateľa „root“:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Nemožno nastaviÅ¥ heslo MySQL používateľa „root“" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Pri nastavovaní hesla správcu MySQL nastala chyba. Toto môže nastaÅ¥, ak už " +"úÄet má nastavené heslo alebo kvôli problémom pri komunikácii s MySQL " +"serverom." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "Po inÅ¡talácii balíka by ste mali skontrolovaÅ¥ heslo úÄtu." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"ÄŽalÅ¡ie podrobností nájdete v súbore /usr/share/doc/mysql-server-5.1/README." +"Debian." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "Chyba pri zadávaní hesla" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "Heslá, ktoré ste zadali sa nezhodujú. Skúste prosím znova." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "Vyzerá to, že používate NDB Cluster" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.1 no longer provides NDB Cluster support. Please migrate to the " +#| "new mysql-cluster package and remove all lines starting with \"ndb\" from " +#| "all config files below /etc/mysql/." +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.1 už nepodporuje NDB Cluster. Použite prosím nový balík mysql-" +"cluster a zo vÅ¡etkých konfiguraÄných súborov v /etc/mysql/ odstráňte vÅ¡etky " +"riadky, ktoré zaÄínajú na „ndbâ€." diff --git a/debian/po/sv.po b/debian/po/sv.po new file mode 100644 index 000000000000..c4cd00786e36 --- /dev/null +++ b/debian/po/sv.po @@ -0,0 +1,229 @@ +# Translation of mysql-dfsg-5.5 debconf template to Swedish +# Copyright (C) 2009 Martin Bagge +# This file is distributed under the same license as the mysql-dfsg-5.5 package. +# +# Andreas Henriksson , 2007 +# Martin Bagge , 2009 +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.5 5.0.21-3\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2009-09-08 21:42+0100\n" +"Last-Translator: Martin Bagge \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Swedish\n" +"X-Poedit-Country: Sweden\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Vill du verkligen genomföra nedgraderingen?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "En fil med namnet /var/lib/mysql/debian-*.flag hittades i systemet." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"En sÃ¥dan fil är en indikation pÃ¥ att paketet mysql-server med ett högre " +"versionsnummer har installerats tidigare." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Det finns ingen garanti för att den version som du hÃ¥ller pÃ¥ att installera " +"kommer att kunna använda de aktuella databaserna." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Viktig information för NIS/YP-användare" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"För att kunna använda MySQL under NIS/YP mÃ¥ste ett användarkonto för MySQL " +"läggas till i systemet." + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Du bör ocksÃ¥ kontrollera rättigheterna och ägaren av katalogen /var/lib/" +"mysql." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Ta bort alla MySQL-databaser?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Katalogen /var/lib/mysql som innehÃ¥ller MySQL-databaser kommer att tas bort." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Om avinstallationen av MySQL-paketet görs för att senare kunna installera en " +"nyare version eller om en annan MySQL-server redan använder filerna ska de " +"inte raderas." + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Ska MySQL startas vid systemets uppstart?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL-servern kan startas vid systemets uppstart eller manuellt med " +"kommandot \"/etc/init.d/mysql start\"." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nytt lösenord för MySQLs \"root\"-användare:" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Det är inte obligatoriskt men starkt rekommenderat att du sätter ett " +"lösenord för MySQLs administrativa \"root\"-användare." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "Om detta fält lämnas tom kommer lösenordet inte att ändras." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Repetera lösenordet för MySQLs \"root\"-användare:" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Kunde inte sätta lösenord för MySQLs \"root\"-användare" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Ett fel uppstod när det skulle sättas ett lösenord för MySQLs administrativa " +"användare (\"root\"). Detta kan ha skett för att användaren redan har ett " +"lösenord satt, eller pÃ¥ grund av problem med att kommunicera med MySQL-" +"servern." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "Du bör kontrollera kontots lösenord efter installationen av paketet." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" +"Läs filen /usr/share/doc/mysql-server-5.5/README.Debian för mer information." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "Fel vid inmatning av lösenord" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "De tvÃ¥ lösenorden du angav stämde inte överrens. Prova igen." + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "NDB-kluster används inte" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the " +#| "new mysql-cluster package and remove all lines starting with \"ndb\" from " +#| "all config files below /etc/mysql/." +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"Stödet för NDB-kluster har tagits bort i MySQL-5.5. Migrera till det nya " +"paketet mysql-cluster och ta bort alla rader som inleds med \"ndb\" frÃ¥n " +"alla inställlningsfiler i /etc/mysql/." + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "För att använda MySQL mÃ¥ste följande användare och grupper läggas till i " +#~ "systemet:" diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 000000000000..aecd15118852 --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,187 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" diff --git a/debian/po/tr.po b/debian/po/tr.po new file mode 100644 index 000000000000..d1c32951a5a1 --- /dev/null +++ b/debian/po/tr.po @@ -0,0 +1,342 @@ +# Turkish translation of mysql-server. +# This file is distributed under the same license as the mysql-server package. +# Gürkan Aslan , 2004 +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-4.1\n" +"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" +"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"PO-Revision-Date: 2004-06-05 08:53+0300\n" +"Last-Translator: Gürkan Aslan \n" +"Language-Team: Turkish \n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +#, fuzzy +#| msgid "Important note for NIS/YP users!" +msgid "Important note for NIS/YP users" +msgstr "NIS/YP kullanıcıları için önemli not!" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-server-5.5.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +#, fuzzy +#| msgid "Should MySQL start on boot?" +msgid "Start the MySQL server on boot?" +msgstr "MySQL açılış sırasında baÅŸlatılsın mı?" + +#. Type: boolean +#. Description +#: ../mysql-server-5.5.templates:5001 +#, fuzzy +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL açılış sırasında veya '/etc/init.d/mysql start' komutunu vermeniz " +"halinde elle baÅŸlatılabilir. EÄŸer açılışta otomatik olarak baÅŸlatılmasını " +"istiyorsanız burada 'evet'i seçin." + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-server-5.5.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " +"information." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-server-5.5.templates:10001 +msgid "" +"MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Mysql'i kullanmak için aÅŸağıdakiyle eÅŸdeÄŸer bir kullanıcı ve grup " +#~ "tanımlamalı, ve /var/lib/mysql izinlerinin uygun ÅŸekilde ayarlandığından " +#~ "emin olmalısınız (uid/gid farklı olabilir)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group: mysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" + +#, fuzzy +#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html" +#~ msgstr "Lütfen http://www.mysql.com/doc/en/Upgrade.html belgesini okuyun" + +#, fuzzy +#~ msgid "" +#~ "MySQL will only install if you have a non-numeric hostname that is " +#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " +#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " +#~ "myhostname\"." +#~ msgstr "" +#~ "MySQL sadece /etc/hosts dosyası yoluyla çözülebilir NUMERÄ°K OLMAYAN bir " +#~ "makine adına sahipseniz kurulacaktır. ÖrneÄŸin, eÄŸer \"hostname\" komutu " +#~ "\"makinem\" ismini döndürüyorsa, bu dosya içinde \"10.0.0.1 makinem\" " +#~ "gibi bir satır olmalıdır." + +#, fuzzy +#~ msgid "" +#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " +#~ "is used in the start/stop and cron scripts. Don't delete." +#~ msgstr "" +#~ "Yeni mysql kullanıcısı \"debian-sys-maint\" yaratılacak. Bu hesap, " +#~ "baÅŸlangıç betiklerinde ve cron içinde kullanılıyor. Bu hesabı silmeyin." + +#, fuzzy +#~ msgid "" +#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" +#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " +#~ "there, never only the password!" +#~ msgstr "" +#~ "Lütfen MySQL root kullanıcısı için bir PAROLA girmeyi unutmayın! EÄŸer /" +#~ "root/.my.cnf kullanıyorsanız, \"user\" ve \"password\" satırlarını her " +#~ "zaman buraya ekleyin, sadece parolayı deÄŸil! Daha fazla bilgi için /usr/" +#~ "share/doc/mysql-server/README.Debian dosyasını okuyun." + +#, fuzzy +#~ msgid "" +#~ "Should I remove all databases below /var/lib/mysql as you are purging the " +#~ "mysql-server package?" +#~ msgstr "" +#~ "mysql-server paketi kaldırıldıktan sonra bütün veritabanları silinsin mi?" + +#~ msgid "" +#~ "Networking is disabled by default for security reasons. You can enable it " +#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf." +#~ msgstr "" +#~ "AÄŸ, öntanımlı olarak güvenlik gerekçeleriyle devre dışı bırakıldı. Bu " +#~ "özelliÄŸi /etc/mysql/my.cnf dosyası içindeki \"skip-networking\" " +#~ "seçeneÄŸini kaldırarak etkinleÅŸtirebilirsiniz." + +#~ msgid "security and update notice" +#~ msgstr "güvenlik ve güncelleme duyurusu" + +#~ msgid "" +#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-" +#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. " +#~ "remove everything including the configuration) somewhen? (default is not)" +#~ msgstr "" +#~ "mysql-server paketini temizlemek için \"dpkg --purge mysql-server\" " +#~ "komutunu kullandığınızda (yani yapılandırma dahil herÅŸeyi silmek) /var/" +#~ "lib/mysql altındaki herÅŸeyi sileyim mi? (öntanımlı cevap hayır'dır)." + +#~ msgid "Please run mysql_fix_privilege_tables !" +#~ msgstr "Lütfen mysql_fix_privilege_tables komutunu çalıştırın!" + +#~ msgid "" +#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs " +#~ "other than root and mysql with mysql." +#~ msgstr "" +#~ "/var/lib/mysql'in izinlerinin güvenli olmasını saÄŸlamak amacıyla, buna " +#~ "ait GID'leri root ve mysql'den farklı olacak ÅŸekilde deÄŸiÅŸtireceÄŸim." + +#~ msgid "" +#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/" +#~ msgstr "" +#~ "SSL desteÄŸini nasıl etkinleÅŸtirebileceÄŸinize iliÅŸkin talimatlar /usr/" +#~ "share/doc/mysql-server/ içinde." + +#~ msgid "mysql_fix_privileges_tables will be executed" +#~ msgstr "mysql_fix_privileges_tables çalıştırılacak" + +#~ msgid "" +#~ "The latest MySQL versions have an enhanced, more fine grained, privilege " +#~ "system. To make use of it, some new fields must be added to the tables " +#~ "in the \"mysql\" database. This is done by the " +#~ "mysql_fix_privilege_tables script during this upgrade regardless of if " +#~ "the server is currently running or not!" +#~ msgstr "" +#~ "En son MySQL sürümleri zenginleÅŸtirilmiÅŸ, daha ayrıntılandırılmış bir " +#~ "ayrıcalık (privilege) sistemine sahiptir. Yeni sistemi kullanmak için, " +#~ "\"mysql\" veritabanındaki tablolara bazı yeni alanlar eklenmelidir. Bu " +#~ "iÅŸlem, sunucunun çalışıp çalışmamasına baÄŸlı olmaksızın " +#~ "mysql_fix_privilege_tables betiÄŸi tarafından bu yükseltme sırasında " +#~ "yapılır." + +#~ msgid "" +#~ "This script is not supposed to give any user more rights that he had " +#~ "before, if you encounter such a case, please contact me." +#~ msgstr "" +#~ "Bu betiÄŸin hiç bir kullanıcıya öncekinden daha fazla hak kazandırmadığı " +#~ "varsayılıyor. EÄŸer bunun aksinde bir durumla karşılaşırsanız, lütfen " +#~ "benimle baÄŸlantıya geçin." + +#~ msgid "Make MySQL reachable via network?" +#~ msgstr "MySQL network üzerinden ulaşılabilir olsun mu?" + +#~ msgid "" +#~ "Should MySQL listen on a network reachable TCP port? This is not " +#~ "necessary for use on a single computer and could be a security problem." +#~ msgstr "" +#~ "MySQL aÄŸ üzerinde ulaşılabilen bir TCP portunu dinlesin mi? Tek olan bir " +#~ "bilgisayar için bu ayar gerekli deÄŸildir ve bir güvenlik sorunu " +#~ "oluÅŸturabilir." + +#~ msgid "Enable chroot mode?" +#~ msgstr "chroot kipi etkinleÅŸtirilsin mi?" + +#~ msgid "" +#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so " +#~ "that users cannot modify any files outside this directory. This improves " +#~ "resistence against crackers, too, as they are not able to modify system " +#~ "files." +#~ msgstr "" +#~ "MySQL kendini /var/lib/mysql_jail dizinine hapsederek kullanıcıların bu " +#~ "dizin dışındaki hiç bir dosyayı deÄŸiÅŸtirmemesini saÄŸlayabilir. Bu " +#~ "düzenleme, sistem dosyalarını deÄŸiÅŸtirmelerini engelleyeceÄŸinden, " +#~ "cracker'lara karşı dayanıklılığı arttırır." diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000000..ae173bd87413 --- /dev/null +++ b/debian/rules @@ -0,0 +1,352 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 +export DEB_BUILD_HARDENING=1 + +PACKAGE=mysql-5.5 + +TMP=$(CURDIR)/debian/tmp/ + +ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH) +ARCH_OS = $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEBVERSION = $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }' | sed 's/^.*-//' ) + +export MYSQL_BUILD_CC=$(DEB_HOST_GNU_TYPE)-gcc-4.5 +export MYSQL_BUILD_CXX=$(DEB_HOST_GNU_TYPE)-g++-4.5 + +DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':')) +DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +DEB_NOEPOCH_VERSION ?= $(shell echo $(DEB_VERSION) | cut -d: -f2-) +DEB_UPSTREAM_VERSION ?= $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//') +DEB_UPSTREAM_VERSION_MAJOR_MINOR := $(shell echo $(DEB_UPSTREAM_VERSION) | sed -r -n 's/^([0-9]+\.[0-9]+).*/\1/p') +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +EXPORTED_SOURCE_TARBALL = debian/mysql-source-5.5.tar.gz + +DISTRIBUTION = $(shell lsb_release -i -s) + +MAKE_J = -j$(shell if [ -f /proc/cpuinfo ] ; then grep -c processor.* /proc/cpuinfo ; else echo 1 ; fi) +ifeq (${MAKE_J}, -j0) + MAKE_J = -j1 +endif + +MAKE_TEST_TARGET=test-force +ifneq ($(findstring fulltest,$(DEB_BUILD_OPTIONS)),) +# make test-bt is the testsuite run by the MySQL build team +# before a release, but it is long + MAKE_TEST_TARGET=test-bt +endif + +USE_ASSEMBLER=--enable-assembler + +ifneq (,$(filter $(ARCH), amd64 i386)) + TESTSUITE_FAIL_CMD=exit 1 +else + TESTSUITE_FAIL_CMD=true +endif + +BUILDDIR = builddir +BUILDDIR_PIC = builddir-pic +builddir = $(if $(findstring -pic,$@),$(BUILDDIR_PIC),$(BUILDDIR)) + +# This causes seg11 crashes if LDAP is used for groups in /etc/nsswitch.conf +# so it is disabled by default although, according to MySQL, it brings >10% +# performance gain if enabled. See #299382. +ifeq ($(STATIC_MYSQLD), 1) + USE_STATIC_MYSQLD=--with-mysqld-ldflags=-all-static +endif + + +configure-stamp-pic: FORCE_FPIC_CFLAGS=-fPIC +configure-stamp-pic: FORCE_FPIC=-DWITH_PIC=On -DINSTALL_LIBDIR=lib/mysql + +configure: patch configure-stamp +configure-pic: patch configure-stamp-pic +configure-stamp configure-stamp-pic: + @echo "RULES.$@" + dh_testdir + +ifneq ($(ARCH_OS),hurd) + if [ ! -d /proc/self ]; then echo "/proc IS NEEDED" 1>&2; exit 1; fi +endif + + ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \ + sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/bin:/usr/bin"} \ + CC=$${MYSQL_BUILD_CC:-gcc} \ + CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -DBIG_JOINS=1 ${FORCE_FPIC_CFLAGS} -fno-strict-aliasing"} \ + CXX=$${MYSQL_BUILD_CXX:-g++} \ + CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-O3 -DBIG_JOINS=1 -felide-constructors -fno-exceptions -fno-rtti ${FORCE_FPIC_CFLAGS} -fno-strict-aliasing"} \ + cmake -DCMAKE_INSTALL_PREFIX=/usr \ + \ + $(FORCE_FPIC) \ + -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ + -DMYSQL_USER=mysql \ + -DWITH_LIBWRAP=ON \ + -DWITH_READLINE=OFF \ + -DWITH_LIBEDIT=OFF \ + $(USE_STATIC_MYSQLD) \ + -DWITH_SSL=yes \ + -DCOMPILATION_COMMENT="($(DISTRIBUTION))" \ + -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \ + -DSYSTEM_TYPE="debian-linux-gnu" \ + -DINSTALL_LAYOUT=RPM \ + -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \ + -DINSTALL_PLUGINDIR=lib/mysql/plugin \ + -DWITH_EMBEDDED_SERVER=ON \ + -DHAVE_EMBEDDED_PRIVILEGE_CONTROL=ON \ + -DWITH_ARCHIVE_STORAGE_ENGINE=ON \ + -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \ + -DWITH_FEDERATED_STORAGE_ENGINE=ON \ + -DWITH_EXTRA_CHARSETS=all ..' + + # --sysconfdir=/etc/mysql -- Appends /etc/mysql after ~/ in the my.cnf search patch! + # + # --with-debug + + touch $@ + + +build: build-stamp build-stamp-pic + +build-stamp: configure + @echo "RULES.$@" + dh_testdir + + [ -f $(EXPORTED_SOURCE_TARBALL) ] || tar -zcf $(EXPORTED_SOURCE_TARBALL) \ + --exclude=debian . \ + --transform="s,^\./,mysql-5.5/," + + cd $(builddir) && $(MAKE) $(MAKE_J) + +ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),) + # Don't know why the following is necessary... + cp unittest/unit.pl $(builddir)/unittest/ + cp -r mysql-test/* $(builddir)/mysql-test/ + cp -r sql/share/* $(builddir)/sql/share/ + cp -r scripts/*sql $(builddir)/scripts/ + if [ ! -f testsuite-stamp ] ; then \ + cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \ + fi +endif + + touch testsuite-stamp + + touch build-stamp + +MAKE_PIC = cd $(builddir) && $(MAKE) $(MAKE_J) + +build-stamp-pic: configure-pic + @echo "RULES.$@" + # Build libmysqld dependencies + #(MAKE_PIC) -C include + #(MAKE_PIC) -C sql link_sources + #(MAKE_PIC) -C libmysql link_sources + #(MAKE_PIC) -C strings + #(MAKE_PIC) -C regex + #(MAKE_PIC) -C mysys + #(MAKE_PIC) -C dbug + #(MAKE_PIC) -C vio + #(MAKE_PIC) -C storage + #(MAKE_PIC) -C extra/yassl + #(MAKE_PIC) -C cmd-line-utils + #(MAKE_PIC) -C sql lex_hash.h + $(MAKE_PIC) -C scripts + # Build libmysqld itself + $(MAKE_PIC) -C libmysqld + + touch $@ + +clean: clean-patched unpatch + rm -rf debian/patched +clean-patched: + @echo "RULES.clean-patched" + dh_testdir + dh_testroot + rm -f configure-stamp* + rm -f build-stamp* + rm -f testsuite-stamp + + [ ! -f Makefile ] || $(MAKE) clean + [ ! -d mysql-test/var ] || rm -rf mysql-test/var + + rm -rf $(BUILDDIR) $(BUILDDIR_PIC) + + debconf-updatepo + rm -f $(EXPORTED_SOURCE_TARBALL) + dh_clean -v + + +install: +install install-pic: build + @echo "RULES.$@" + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + # some self written manpages which hopefully + # gets overwritten sooner or later with upstreams + mkdir -p $(TMP)/usr/share/man/man1/ + mkdir -p $(TMP)/usr/share/man/man8/ + cp debian/additions/*.1 $(TMP)/usr/share/man/man1/ + mkdir -p $(TMP)/etc/mysql/conf.d/ + cp debian/additions/mysqld_safe_syslog.cnf $(TMP)/etc/mysql/conf.d/ + + # make install (trailing slash needed for innobase) + cd $(builddir) && $(MAKE) install DESTDIR=$(TMP)/ + + # After installing, remove rpath to make lintian happy. + set +e; \ + find ./debian/tmp/ -type f -print0 \ + | xargs -0 --no-run-if-empty chrpath -k 2>/dev/null \ + | fgrep RPATH= \ + | cut -d: -f 1 \ + | xargs --no-run-if-empty chrpath -d; \ + set -e + + # libmysqlclient: move shared libraries (but not the rest like libheap.a & co) + #mv $(TMP)/usr/lib/mysql/libmysqlclient* $(TMP)/usr/lib + #perl -pi -e 's#/usr/lib/mysql#/usr/lib#' $(TMP)/usr/lib/libmysqlclient.la + #perl -pi -e 's#/usr/lib/mysql#/usr/lib#' $(TMP)/usr/lib/libmysqlclient_r.la + # Check if our beloved versioned symbols are really there + #if [ "`objdump -T $(TMP)/usr/lib/libmysqlclient.so.16.0.0 | grep -c libmysqlclient_16`" -lt 500 ]; then \ + # echo "ERROR: versioned symbols are absent"; \ + # exit 1; \ + #fi + # libmysqlclient_r is now a symlink to libmysqlclient. But it is + # created wrong by the cmake build system and points at + # libmysqlclient.so instead of the corresponding versioned lib. + for i in `ls $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqlclient.so*` ; do \ + rlib=`basename $$i | sed -e 's/libmysqlclient\./libmysqlclient_r./'` ;\ + ln -sf `basename $$i` $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/$$rlib ;\ + done + + # libmysqlclient-dev: forgotten header file since 3.23.25? + #cp $(BUILDDIR)/include/my_config.h $(TMP)/usr/include/mysql/ + #cp include/my_dir.h $(TMP)/usr/include/mysql/ + # install libmysqld built with -FPIC + install -d -m 0755 -o root -g root $(TMP)/usr/lib/mysql + install -m 0644 -o root -g root $(BUILDDIR_PIC)/libmysqld/libmysqld.a $(TMP)/usr/lib/mysql/libmysqld_pic.a + # mysql_config won't report the -fPIC, so give libmysqld-pic users a way to get their flags + install -m 0755 -o root -g root $(BUILDDIR_PIC)/scripts/mysql_config $(TMP)/usr/bin/mysql_config_pic + + # mysql-common: We now provide our own config file. + install -d $(TMP)/etc/mysql + install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf + + # mysql-client + install -m 0755 debian/additions/mysqlreport $(TMP)/usr/bin/ + install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/ + install -m 0644 debian/additions/innotop/innotop.1 $(TMP)/usr/share/man/man1/ + + # mysql-5.5-testsuite + mkdir -p $(TMP)/usr/lib/mysql-testsuite + cp -rp $(TMP)/usr/share/mysql-test/* $(TMP)/usr/lib/mysql-testsuite + + # mysql-server + #install -m 0755 $(BUILDDIR)/scripts/mysqld_safe $(TMP)/usr/bin/mysqld_safe + mkdir -p $(TMP)/usr/share/doc/mysql-server-5.5/examples + mv $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mysql-server-5.5/examples/ + rm -vf $(TMP)/usr/share/mysql/mi_test_all* \ + $(TMP)/usr/share/mysql/mysql-log-rotate \ + $(TMP)/usr/share/mysql/mysql.server \ + $(TMP)/usr/share/mysql/binary-configure + nm -n $(BUILDDIR)/sql/mysqld |gzip -9 > $(TMP)/usr/share/doc/mysql-server-5.5/mysqld.sym.gz + install -m 0755 debian/additions/echo_stderr $(TMP)/usr/share/mysql/ + install -m 0755 debian/additions/debian-start $(TMP)/etc/mysql/ + install -m 0755 debian/additions/debian-start.inc.sh $(TMP)/usr/share/mysql/ + + # install AppArmor profile + install -D -m 644 debian/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mysqld + # install Apport hook + install -D -m 644 debian/mysql-server-5.5.py $(TMP)/usr/share/apport/package-hooks/source_mysql-5.5.py + + install -D -m 0644 $(EXPORTED_SOURCE_TARBALL) $(TMP)/usr/src/mysql/`basename $(EXPORTED_SOURCE_TARBALL)` + + install -D -m 0644 $(EXPORTED_SOURCE_TARBALL) $(TMP)/usr/src/mysql/`basename $(EXPORTED_SOURCE_TARBALL)` + + dh_movefiles + +# Build architecture-independent files here. +binary-indep: build install + @echo "RULES.binary-indep" + dh_testdir -i + dh_testroot -i + dh_installdebconf -i + dh_installdocs -i + dh_installexamples -i + dh_installmenu -i + dh_installlogrotate -i + dh_installinit -i + dh_installcron -i + dh_installman -i + dh_installinfo -i + dh_installlogcheck -i + dh_installchangelogs -i + dh_link -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i + dh_perl -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install + @echo "RULES.binary-arch" + dh_testdir + dh_testroot + + dh_installdebconf -a + dh_installdocs -a + dh_installexamples -a + dh_installmenu -a + dh_installlogrotate -a --name mysql-server + if [ "$(DISTRIBUTION)" = "Ubuntu" ]; then \ + dh_apparmor -pmysql-server-5.5 --profile-name=usr.sbin.mysqld; \ + fi + # Start mysql in runlevel 19 before 20 where apache, proftpd etc gets + # started which might depend on a running database server. + dh_installinit -a --name=mysql -- defaults 19 21 + dh_installcron -a --name mysql-server + dh_installman -a + dh_installinfo -a + dh_installlogcheck -a + dh_installchangelogs -a + dh_strip -a + dh_link -a # .so muss nach .so.1.2.3 installier werden! + dh_compress -a + dh_fixperms -a + #dh_makeshlibs -a + dh_makeshlibs -plibmysqlclient18 -V'libmysqlclient18 (>= 5.5.13-1)' + dh_installdeb -a + dh_perl -a + #dh_shlibdeps -a -l debian/libmysqlclient16/usr/lib -L libmysqlclient16 + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch + +get-orig-source: + @wget -nv -T10 -t3 \ + -O /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz \ + http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-$(DEB_UPSTREAM_VERSION_MAJOR_MINOR)/mysql-$(DEB_UPSTREAM_VERSION).tar.gz + @tar xfz /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz -C /tmp + @rm -rf /tmp/mysql-$(DEB_UPSTREAM_VERSION)/Docs + @rm -rf /tmp/mysql-$(DEB_UPSTREAM_VERSION)/debian + @mv /tmp/mysql-$(DEB_UPSTREAM_VERSION) /tmp/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig + @cd /tmp ; tar czf $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig + @rm -f /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz + @rm -rf /tmp/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig + +.PHONY: clean clean-patched configure build binary binary-indep binary-arch install patch unpatch + +# vim: ts=8 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000000..163aaf8d82b6 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 000000000000..bfb689bee498 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/-(rc|beta)/$1/" \ + ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/www.mysql.com/Downloads/MySQL-5.5/mysql-([\d\.]*(?:-beta|-rc)?).tar.gz debian From c49313b87ae7be95c88ebe9646815eeb96779c1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Fri, 20 Feb 2015 10:59:32 +0200 Subject: [PATCH 017/305] Add wsrep specific things to Debian packaging (modeled after mysql-wsrep-5.6 packaging) --- debian/changelog | 2 +- debian/control | 138 +++++++----------- debian/libmysqld-5.5-pic.README.Debian | 5 - debian/libmysqld-5.5-pic.files | 2 - debian/libmysqld-dev.files | 2 - debian/libmysqld-pic.README.Debian | 5 - debian/libmysqld-pic.files | 2 - debian/mysql-client-5.5.files | 36 ----- debian/mysql-client-core-5.5.files | 4 - debian/mysql-server-5.5.files | 59 -------- debian/mysql-server-core-5.5.dirs | 2 - debian/mysql-source-5.5.files | 1 - ...n => mysql-wsrep-client-5.5.README.Debian} | 0 ...t-5.5.dirs => mysql-wsrep-client-5.5.dirs} | 0 ...t-5.5.docs => mysql-wsrep-client-5.5.docs} | 0 debian/mysql-wsrep-client-5.5.files | 20 +++ ...5.5.links => mysql-wsrep-client-5.5.links} | 0 ... mysql-wsrep-client-5.5.lintian-overrides} | 0 ...ql-common.dirs => mysql-wsrep-common.dirs} | 0 ...-common.files => mysql-wsrep-common.files} | 0 ...s => mysql-wsrep-common.lintian-overrides} | 0 ...ommon.postrm => mysql-wsrep-common.postrm} | 0 ...srep-libmysqlclient-dev.README.Maintainer} | 0 ...rs => mysql-wsrep-libmysqlclient-dev.dirs} | 0 ...> mysql-wsrep-libmysqlclient-dev.examples} | 0 ...s => mysql-wsrep-libmysqlclient-dev.files} | 1 - ... => mysql-wsrep-libmysqlclient16.postinst} | 0 ...dirs => mysql-wsrep-libmysqlclient18.dirs} | 0 ...les => mysql-wsrep-libmysqlclient18.files} | 0 ...r-5.5.NEWS => mysql-wsrep-server-5.5.NEWS} | 0 ...n => mysql-wsrep-server-5.5.README.Debian} | 0 ...5.config => mysql-wsrep-server-5.5.config} | 0 ...r-5.5.dirs => mysql-wsrep-server-5.5.dirs} | 2 + ...5.5.files => mysql-wsrep-server-5.5.files} | 44 +++++- ... mysql-wsrep-server-5.5.lintian-overrides} | 0 ...wsrep-server-5.5.logcheck.ignore.paranoid} | 0 ...l-wsrep-server-5.5.logcheck.ignore.server} | 0 ...ep-server-5.5.logcheck.ignore.workstation} | 0 ...l-wsrep-server-5.5.mysql-server.logrotate} | 0 ...init => mysql-wsrep-server-5.5.mysql.init} | 0 ...t => mysql-wsrep-server-5.5.mysql.upstart} | 0 ...stinst => mysql-wsrep-server-5.5.postinst} | 0 ...5.postrm => mysql-wsrep-server-5.5.postrm} | 0 ...preinst => mysql-wsrep-server-5.5.preinst} | 0 ...5.5.prerm => mysql-wsrep-server-5.5.prerm} | 0 ...erver-5.5.py => mysql-wsrep-server-5.5.py} | 0 ...lates => mysql-wsrep-server-5.5.templates} | 0 debian/mysql-wsrep-server-core-5.5.dirs | 0 debian/mysql-wsrep-server-core-5.5.files | 0 ....5.dirs => mysql-wsrep-testsuite-5.5.dirs} | 0 ....files => mysql-wsrep-testsuite-5.5.files} | 0 debian/po/POTFILES.in | 2 +- debian/po/ar.po | 52 +++---- debian/po/ca.po | 52 +++---- debian/po/cs.po | 52 +++---- debian/po/da.po | 52 +++---- debian/po/de.po | 52 +++---- debian/po/es.po | 52 +++---- debian/po/eu.po | 52 +++---- debian/po/fr.po | 52 +++---- debian/po/gl.po | 52 +++---- debian/po/it.po | 52 +++---- debian/po/ja.po | 52 +++---- debian/po/nb.po | 52 +++---- debian/po/nl.po | 52 +++---- debian/po/pt.po | 52 +++---- debian/po/pt_BR.po | 52 +++---- debian/po/ro.po | 52 +++---- debian/po/ru.po | 52 +++---- debian/po/sk.po | 52 +++---- debian/po/sv.po | 52 +++---- debian/po/templates.pot | 54 +++---- debian/po/tr.po | 52 +++---- debian/rules | 65 ++++----- 74 files changed, 692 insertions(+), 794 deletions(-) delete mode 100644 debian/libmysqld-5.5-pic.README.Debian delete mode 100644 debian/libmysqld-5.5-pic.files delete mode 100644 debian/libmysqld-dev.files delete mode 100644 debian/libmysqld-pic.README.Debian delete mode 100644 debian/libmysqld-pic.files delete mode 100644 debian/mysql-client-5.5.files delete mode 100644 debian/mysql-client-core-5.5.files delete mode 100644 debian/mysql-server-5.5.files delete mode 100644 debian/mysql-server-core-5.5.dirs delete mode 100644 debian/mysql-source-5.5.files rename debian/{mysql-client-5.5.README.Debian => mysql-wsrep-client-5.5.README.Debian} (100%) rename debian/{mysql-client-5.5.dirs => mysql-wsrep-client-5.5.dirs} (100%) rename debian/{mysql-client-5.5.docs => mysql-wsrep-client-5.5.docs} (100%) create mode 100644 debian/mysql-wsrep-client-5.5.files rename debian/{mysql-client-5.5.links => mysql-wsrep-client-5.5.links} (100%) rename debian/{mysql-client-5.5.lintian-overrides => mysql-wsrep-client-5.5.lintian-overrides} (100%) rename debian/{mysql-common.dirs => mysql-wsrep-common.dirs} (100%) rename debian/{mysql-common.files => mysql-wsrep-common.files} (100%) rename debian/{mysql-common.lintian-overrides => mysql-wsrep-common.lintian-overrides} (100%) rename debian/{mysql-common.postrm => mysql-wsrep-common.postrm} (100%) rename debian/{libmysqlclient-dev.README.Maintainer => mysql-wsrep-libmysqlclient-dev.README.Maintainer} (100%) rename debian/{libmysqlclient-dev.dirs => mysql-wsrep-libmysqlclient-dev.dirs} (100%) rename debian/{libmysqlclient-dev.examples => mysql-wsrep-libmysqlclient-dev.examples} (100%) rename debian/{libmysqlclient-dev.files => mysql-wsrep-libmysqlclient-dev.files} (89%) rename debian/{libmysqlclient16.postinst => mysql-wsrep-libmysqlclient16.postinst} (100%) rename debian/{libmysqlclient18.dirs => mysql-wsrep-libmysqlclient18.dirs} (100%) rename debian/{libmysqlclient18.files => mysql-wsrep-libmysqlclient18.files} (100%) rename debian/{mysql-server-5.5.NEWS => mysql-wsrep-server-5.5.NEWS} (100%) rename debian/{mysql-server-5.5.README.Debian => mysql-wsrep-server-5.5.README.Debian} (100%) rename debian/{mysql-server-5.5.config => mysql-wsrep-server-5.5.config} (100%) rename debian/{mysql-server-5.5.dirs => mysql-wsrep-server-5.5.dirs} (76%) rename debian/{mysql-server-core-5.5.files => mysql-wsrep-server-5.5.files} (55%) rename debian/{mysql-server-5.5.lintian-overrides => mysql-wsrep-server-5.5.lintian-overrides} (100%) rename debian/{mysql-server-5.5.logcheck.ignore.paranoid => mysql-wsrep-server-5.5.logcheck.ignore.paranoid} (100%) rename debian/{mysql-server-5.5.logcheck.ignore.server => mysql-wsrep-server-5.5.logcheck.ignore.server} (100%) rename debian/{mysql-server-5.5.logcheck.ignore.workstation => mysql-wsrep-server-5.5.logcheck.ignore.workstation} (100%) rename debian/{mysql-server-5.5.mysql-server.logrotate => mysql-wsrep-server-5.5.mysql-server.logrotate} (100%) rename debian/{mysql-server-5.5.mysql.init => mysql-wsrep-server-5.5.mysql.init} (100%) rename debian/{mysql-server-5.5.mysql.upstart => mysql-wsrep-server-5.5.mysql.upstart} (100%) rename debian/{mysql-server-5.5.postinst => mysql-wsrep-server-5.5.postinst} (100%) rename debian/{mysql-server-5.5.postrm => mysql-wsrep-server-5.5.postrm} (100%) rename debian/{mysql-server-5.5.preinst => mysql-wsrep-server-5.5.preinst} (100%) rename debian/{mysql-server-5.5.prerm => mysql-wsrep-server-5.5.prerm} (100%) rename debian/{mysql-server-5.5.py => mysql-wsrep-server-5.5.py} (100%) rename debian/{mysql-server-5.5.templates => mysql-wsrep-server-5.5.templates} (100%) create mode 100644 debian/mysql-wsrep-server-core-5.5.dirs create mode 100644 debian/mysql-wsrep-server-core-5.5.files rename debian/{mysql-testsuite-5.5.dirs => mysql-wsrep-testsuite-5.5.dirs} (100%) rename debian/{mysql-testsuite-5.5.files => mysql-wsrep-testsuite-5.5.files} (100%) diff --git a/debian/changelog b/debian/changelog index 6f266eb8b43d..3d58a146cc56 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,4 +2,4 @@ mysql-wsrep-5.5 (5.5.41-1) UNRELEASED; urgency=medium * Initial Debian packaging based on MySQL 5.5.41-0ubuntu0.12.04.1 - -- Otto Kekäläinen Wed, 21 Fed 2015 08:51:36 -0500 + -- Otto Kekäläinen Wed, 21 Feb 2015 08:51:36 +0200 diff --git a/debian/control b/debian/control index bbf3134930e3..bb0a4253308b 100644 --- a/debian/control +++ b/debian/control @@ -10,11 +10,13 @@ Homepage: http://dev.mysql.com/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-mysql/mysql-5.5/ Vcs-Svn: svn://svn.debian.org/svn/pkg-mysql/mysql-5.5/ -Package: libmysqlclient18 +Package: mysql-wsrep-libmysqlclient18 Section: libs Architecture: any -Depends: mysql-common (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} +Depends: mysql-wsrep-common (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} Pre-Depends: multiarch-support, ${misc:Pre-Depends} +Replaces: libmysqlclient18 +Provides: libmysqlclient18 Multi-Arch: same Description: MySQL database client library MySQL is a fast, stable and true multi-user, multi-threaded SQL database @@ -24,37 +26,20 @@ Description: MySQL database client library . This package includes the client library. -Package: libmysqld-pic +Package: mysql-wsrep-libmysqlclient18-dbg Architecture: any -Section: libdevel -Depends: libmysqlclient-dev (>= ${source:Version}), ${misc:Depends} -Description: MySQL database development files - MySQL is a fast, stable and true multi-user, multi-threaded SQL database - server. SQL (Structured Query Language) is the most popular database query - language in the world. The main goals of MySQL are speed, robustness and - ease of use. - . - This package includes the -fPIC version of the embedded server library. - -Package: libmysqld-dev -Architecture: any -Section: libdevel -Depends: libmysqlclient-dev (>= ${source:Version}), ${misc:Depends} -Description: MySQL embedded database development files - MySQL is a fast, stable and true multi-user, multi-threaded SQL database - server. SQL (Structured Query Language) is the most popular database query - language in the world. The main goals of MySQL are speed, robustness and - ease of use. - . - This package includes the embedded server library and header files. +Section: debug +Priority: extra +Depends: mysql-wsrep-libmysqlclient18 (= ${binary:Version}), ${misc:Depends} +Description: MySQL database client library debugging symbols. -Package: libmysqlclient-dev +Package: mysql-wsrep-libmysqlclient-dev Architecture: any Section: libdevel -Depends: libmysqlclient18 (= ${binary:Version}), zlib1g-dev, , ${shlibs:Depends}, ${misc:Depends} -Conflicts: libmysqlclient14-dev, libmysqlclient12-dev, libmysqlclient10-dev, libmysqlclient15-dev -Provides: libmysqlclient15-dev -Replaces: libmysqlclient15-dev +Depends: mysql-wsrep-libmysqlclient18 (= ${binary:Version}), + zlib1g-dev, + ${misc:Depends}, + ${shlibs:Depends} Description: MySQL database development files MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query @@ -63,14 +48,12 @@ Description: MySQL database development files . This package includes development libraries and header files. -Package: mysql-common +Package: mysql-wsrep-common Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends} -Conflicts: mysql-common-4.1 -Provides: mysql-common-4.1 -Replaces: mysql-common-4.1 -Breaks: mysql-server-5.1, mysql-client-5.1, mysql-server-core-5.1, mysql-client-core-5.1 Multi-Arch: foreign +Provides: mysql-common +Replaces: mysql-common Description: MySQL database common files, e.g. /etc/mysql/my.cnf MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query @@ -80,25 +63,12 @@ Description: MySQL database common files, e.g. /etc/mysql/my.cnf This package includes files needed by all versions of the client library, e.g. /etc/mysql/my.cnf. -Package: mysql-client-core-5.5 -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Breaks: mysql-client (<< ${source:Version}), mysql-client-5.0, mysql-client-core-5.1 -Replaces: mysql-client (<< ${source:Version}), mysql-client-5.0, mysql-client-core-5.1 -Description: MySQL database core client binaries - MySQL is a fast, stable and true multi-user, multi-threaded SQL database - server. SQL (Structured Query Language) is the most popular database query - language in the world. The main goals of MySQL are speed, robustness and - ease of use. - . - This package includes the core client files, as used by Akonadi. - -Package: mysql-client-5.5 +Package: mysql-wsrep-client-5.5 Architecture: any -Depends: debianutils (>=1.6), libdbi-perl, libdbd-mysql-perl (>= 1.2202), mysql-common (>= ${source:Version}), ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}, mysql-client-core-5.5, libterm-readkey-perl -Provides: virtual-mysql-client, mysql-client, mysql-client-4.1 -Breaks: mysql-client (<< ${source:Version}), mysql-client-5.0, mysql-client-5.1 -Replaces: mysql-client (<< ${source:Version}), mysql-client-5.0, mysql-client-5.1 +Depends: debianutils (>=1.6), libdbi-perl, libdbd-mysql-perl (>= 1.2202), mysql-wsrep-common (>= ${source:Version}), mysql-wsrep-libmysqlclient18, ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}, libterm-readkey-perl +Provides: virtual-mysql-client, mysql-client +Breaks: mysql-client (<< ${source:Version}) +Replaces: mysql-client (<< ${source:Version}) Description: MySQL database client binaries MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query @@ -108,31 +78,23 @@ Description: MySQL database client binaries This package includes the client binaries and the additional tools innotop and mysqlreport. -Package: mysql-server-core-5.5 +Package: mysql-wsrep-client-5.5-dbg Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Breaks: mysql-server-5.1, mysql-server-5.0, mysql-server-core-5.1 -Provides: mysql-server-core -Replaces: mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-5.0, mysql-server-5.1, mysql-server-core-5.1 -Description: MySQL database server binaries - MySQL is a fast, stable and true multi-user, multi-threaded SQL database - server. SQL (Structured Query Language) is the most popular database query - language in the world. The main goals of MySQL are speed, robustness and - ease of use. - . - This package includes the server binaries but doesn't contain all the - infrastructure needed to setup system databases. +Section: debug +Priority: extra +Depends: mysql-wsrep-client-5.5 (= ${binary:Version}), ${misc:Depends} +Description: MySQL database client binary debugging symbols. -Package: mysql-server-5.5 +Package: mysql-wsrep-server-5.5 Architecture: any Suggests: tinyca, mailx Recommends: libhtml-template-perl -Pre-Depends: mysql-common (>= ${source:Version}), adduser (>= 3.40), debconf -Depends: mysql-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mysql-server-core-5.5 (= ${binary:Version}), upstart (>= 0.6.7-2) -Breaks: mysql-server (<< ${source:Version}), mysql-server-4.1, mysql-server-5.1, libmysqlclient-dev ( << 5.5.17~ ) +Pre-Depends: mysql-wsrep-common (>= ${source:Version}), adduser (>= 3.40), debconf +Depends: mysql-wsrep-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), upstart (>= 0.6.7-2) +Breaks: mysql-server (<< ${source:Version}), libmysqlclient-dev Provides: virtual-mysql-server -Replaces: mysql-server (<< ${source:Version}), mysql-server-5.1, mysql-server-5.0, mysql-server-4.1, libmysqlclient-dev ( << 5.5.17~ ) -Description: MySQL database server binaries and system database setup +Replaces: mysql-server (<< ${source:Version}, libmysqlclient-dev +Description: MySQL database server binaries and system database setup MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query language in the world. The main goals of MySQL are speed, robustness and @@ -141,9 +103,16 @@ Description: MySQL database server binaries and system database setup This package contains all the infrastructure needed to setup system databases. -Package: mysql-server +Package: mysql-wsrep-server-5.5-dbg +Architecture: any +Section: debug +Priority: extra +Depends: mysql-wsrep-client-5.5 (= ${binary:Version}), ${misc:Depends} +Description: MySQL database wsrep server binary debugging symbols. + +Package: mysql-wsrep-server Architecture: all -Depends: mysql-server-5.5 +Depends: mysql-wsrep-server-5.5 Description: MySQL database server (metapackage depending on the latest version) This is an empty package that depends on the current "best" version of mysql-server (currently mysql-server-5.5), as determined by the MySQL @@ -156,25 +125,25 @@ Description: MySQL database server (metapackage depending on the latest version) language in the world. The main goals of MySQL are speed, robustness and ease of use. -Package: mysql-client +Package: mysql-wsrep-client Architecture: all -Depends: mysql-client-5.5 +Depends: mysql-wsrep-client-5.5 Description: MySQL database client (metapackage depending on the latest version) This is an empty package that depends on the current "best" version of mysql-client (currently mysql-client-5.5), as determined by the MySQL maintainers. Install this package if in doubt about which MySQL version you want, as this is the one we consider to be in the best shape. -Package: mysql-testsuite +Package: mysql-wsrep-testsuite Architecture: all -Depends: mysql-testsuite-5.5 +Depends: mysql-wsrep-testsuite-5.5 Description: MySQL testsuite This is an empty package that depends on the current "best" version of mysql-testsuite (currently mysql-testsuite-5.5), as determined by the MySQL maintainers. Install this package if in doubt about which MySQL version you want, as this is the one we consider to be in the best shape. -Package: mysql-testsuite-5.5 +Package: mysql-wsrep-testsuite-5.5 Architecture: any Depends: mysql-server, mysql-client, ${misc:Depends}, ${shlibs:Depends} Conflicts: mysql-testsuite (<< ${source:Version}) @@ -186,13 +155,8 @@ Description: MySQL testsuite . This package includes the MySQL testsuite. -Package: mysql-source-5.5 +Package: mysql-wsrep-5.5 Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends} -Description: MySQL source - MySQL is a fast, stable, and true multi-user, multi-threaded SQL database - server. SQL (Structured Query Language) is the most popular database query - language in the world. The main goals of MySQL are speed, robustness and - ease of use. - . - This package includes the MySQL source code as configured before building. +Depends: mysql-wsrep-client-5.5 (= ${binary:Version}), + mysql-wsrep-server-5.5 (= ${binary:Version}) +Description: Metapackage that installs mysql-wsrep client and server packages. diff --git a/debian/libmysqld-5.5-pic.README.Debian b/debian/libmysqld-5.5-pic.README.Debian deleted file mode 100644 index 4ec22b7ed5bd..000000000000 --- a/debian/libmysqld-5.5-pic.README.Debian +++ /dev/null @@ -1,5 +0,0 @@ -This package was requested in http://bugs.debian.org/508406 because it -is needed by programs want to include the embedded MySQL into their -shared libraries. - -In order to get the full compile flags, use /bin/mysql_config_pic diff --git a/debian/libmysqld-5.5-pic.files b/debian/libmysqld-5.5-pic.files deleted file mode 100644 index 18e5bedf3a8f..000000000000 --- a/debian/libmysqld-5.5-pic.files +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/mysql/libmysqld_pic.a -usr/bin/mysql_config_pic diff --git a/debian/libmysqld-dev.files b/debian/libmysqld-dev.files deleted file mode 100644 index 11b84fbae27a..000000000000 --- a/debian/libmysqld-dev.files +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/*/libmysqld.a -usr/lib/*/libmysqlservices.a diff --git a/debian/libmysqld-pic.README.Debian b/debian/libmysqld-pic.README.Debian deleted file mode 100644 index 4ec22b7ed5bd..000000000000 --- a/debian/libmysqld-pic.README.Debian +++ /dev/null @@ -1,5 +0,0 @@ -This package was requested in http://bugs.debian.org/508406 because it -is needed by programs want to include the embedded MySQL into their -shared libraries. - -In order to get the full compile flags, use /bin/mysql_config_pic diff --git a/debian/libmysqld-pic.files b/debian/libmysqld-pic.files deleted file mode 100644 index 18e5bedf3a8f..000000000000 --- a/debian/libmysqld-pic.files +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/mysql/libmysqld_pic.a -usr/bin/mysql_config_pic diff --git a/debian/mysql-client-5.5.files b/debian/mysql-client-5.5.files deleted file mode 100644 index e381cad97afa..000000000000 --- a/debian/mysql-client-5.5.files +++ /dev/null @@ -1,36 +0,0 @@ -usr/bin/innochecksum -usr/bin/innotop -usr/bin/myisam_ftdump -usr/bin/mysqlaccess -usr/bin/mysqladmin -usr/bin/mysqlbug -usr/bin/mysql_client_test -usr/bin/mysqldump -usr/bin/mysqldumpslow -usr/bin/mysql_find_rows -usr/bin/mysql_fix_extensions -usr/bin/mysqlimport -usr/bin/mysqlreport -usr/bin/mysqlshow -usr/bin/mysqlslap -usr/bin/mysql_waitpid -usr/bin/mysql_plugin -usr/share/man/man1/innotop.1 -usr/share/man/man1/myisam_ftdump.1 -usr/share/man/man1/mysqlaccess.1 -usr/share/man/man1/mysqladmin.1 -usr/share/man/man1/mysqlbug.1 -usr/share/man/man1/mysql_client_test.1 -usr/share/man/man1/mysql_client_test_embedded.1 -usr/share/man/man1/mysqldump.1 -usr/share/man/man1/mysqldumpslow.1 -usr/share/man/man1/mysql_find_rows.1 -usr/share/man/man1/mysql_fix_extensions.1 -usr/share/man/man1/mysqlimport.1 -usr/share/man/man1/mysqlman.1 -usr/share/man/man1/mysqlreport.1 -usr/share/man/man1/mysqlshow.1 -usr/share/man/man1/mysqlslap.1 -usr/share/man/man1/mysql_tableinfo.1 -usr/share/man/man1/mysql_waitpid.1 -usr/share/man/man1/mysql_plugin.1 diff --git a/debian/mysql-client-core-5.5.files b/debian/mysql-client-core-5.5.files deleted file mode 100644 index a2781309439d..000000000000 --- a/debian/mysql-client-core-5.5.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/bin/mysql -usr/bin/mysqlcheck -usr/share/man/man1/mysql.1 -usr/share/man/man1/mysqlcheck.1 diff --git a/debian/mysql-server-5.5.files b/debian/mysql-server-5.5.files deleted file mode 100644 index 07e801869fa4..000000000000 --- a/debian/mysql-server-5.5.files +++ /dev/null @@ -1,59 +0,0 @@ -etc/apparmor.d/usr.sbin.mysqld -usr/share/apport/package-hooks/source_mysql-5.5.py -usr/lib/mysql/*so* -usr/lib/mysql/plugin/*.so -etc/mysql/debian-start -etc/mysql/conf.d/mysqld_safe_syslog.cnf -usr/bin/msql2mysql -usr/bin/myisamchk -usr/bin/myisamlog -usr/bin/myisampack -usr/bin/mysql_convert_table_format -usr/bin/mysql_secure_installation -usr/bin/mysql_setpermission -usr/bin/mysql_tzinfo_to_sql -usr/bin/mysql_zap -usr/bin/mysqlbinlog -usr/bin/mysqld_multi -usr/bin/mysqld_safe -usr/bin/mysqlhotcopy -usr/bin/mysqltest -usr/bin/perror -usr/bin/replace -usr/bin/resolve_stack_dump -usr/bin/resolveip -usr/share/doc/mysql-server-5.5/ -usr/share/man/man1/msql2mysql.1 -usr/share/man/man1/myisamchk.1 -usr/share/man/man1/myisamlog.1 -usr/share/man/man1/myisampack.1 -usr/share/man/man1/mysqlbinlog.1 -usr/share/man/man1/mysql_convert_table_format.1 -usr/share/man/man1/mysqld_multi.1 -usr/share/man/man1/mysqld_safe.1 -usr/share/man/man1/mysqlhotcopy.1 -usr/share/man/man1/mysql_secure_installation.1 -usr/share/man/man1/mysql_setpermission.1 -usr/share/man/man1/mysqltest.1 -usr/share/man/man1/mysql_zap.1 -usr/share/man/man1/perror.1 -usr/share/man/man1/replace.1 -usr/share/man/man1/resolveip.1 -usr/share/man/man1/resolve_stack_dump.1 -usr/share/man/man1/innochecksum.1 -usr/share/man/man1/mysqltest_embedded.1 -usr/share/man/man1/mysql_tzinfo_to_sql.1 -usr/share/mysql/debian-start.inc.sh -usr/share/mysql/echo_stderr -usr/share/mysql/errmsg-utf8.txt -usr/share/mysql/mysqld_multi.server -usr/share/mysql/mysql_test_data_timezone.sql -usr/share/mysql/config.huge.ini -usr/share/mysql/config.medium.ini -usr/share/mysql/config.small.ini -usr/share/mysql/ndb-config-2-node.ini -usr/share/mysql/debian-start.inc.sh -usr/share/mysql/echo_stderr -usr/share/mysql/errmsg-utf8.txt -usr/share/mysql/mysqld_multi.server -usr/share/mysql/mysql_test_data_timezone.sql diff --git a/debian/mysql-server-core-5.5.dirs b/debian/mysql-server-core-5.5.dirs deleted file mode 100644 index b174b445af42..000000000000 --- a/debian/mysql-server-core-5.5.dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/sbin -usr/share/man/man8 diff --git a/debian/mysql-source-5.5.files b/debian/mysql-source-5.5.files deleted file mode 100644 index bd8d2f751443..000000000000 --- a/debian/mysql-source-5.5.files +++ /dev/null @@ -1 +0,0 @@ -usr/src/mysql/* diff --git a/debian/mysql-client-5.5.README.Debian b/debian/mysql-wsrep-client-5.5.README.Debian similarity index 100% rename from debian/mysql-client-5.5.README.Debian rename to debian/mysql-wsrep-client-5.5.README.Debian diff --git a/debian/mysql-client-5.5.dirs b/debian/mysql-wsrep-client-5.5.dirs similarity index 100% rename from debian/mysql-client-5.5.dirs rename to debian/mysql-wsrep-client-5.5.dirs diff --git a/debian/mysql-client-5.5.docs b/debian/mysql-wsrep-client-5.5.docs similarity index 100% rename from debian/mysql-client-5.5.docs rename to debian/mysql-wsrep-client-5.5.docs diff --git a/debian/mysql-wsrep-client-5.5.files b/debian/mysql-wsrep-client-5.5.files new file mode 100644 index 000000000000..e5bb3dd31bf7 --- /dev/null +++ b/debian/mysql-wsrep-client-5.5.files @@ -0,0 +1,20 @@ +usr/bin/innochecksum +usr/bin/innotop +usr/bin/myisam_ftdump +usr/bin/mysqlaccess +usr/bin/mysqladmin +usr/bin/mysqlbug +usr/bin/mysql_client_test +usr/bin/mysqldump +usr/bin/mysqldumpslow +usr/bin/mysql_find_rows +usr/bin/mysql_fix_extensions +usr/bin/mysqlimport +usr/bin/mysqlreport +usr/bin/mysqlshow +usr/bin/mysqlslap +usr/bin/mysql_waitpid +usr/bin/mysql_plugin +usr/share/man/man1/mysqlman.1 +usr/bin/mysql +usr/bin/mysqlcheck diff --git a/debian/mysql-client-5.5.links b/debian/mysql-wsrep-client-5.5.links similarity index 100% rename from debian/mysql-client-5.5.links rename to debian/mysql-wsrep-client-5.5.links diff --git a/debian/mysql-client-5.5.lintian-overrides b/debian/mysql-wsrep-client-5.5.lintian-overrides similarity index 100% rename from debian/mysql-client-5.5.lintian-overrides rename to debian/mysql-wsrep-client-5.5.lintian-overrides diff --git a/debian/mysql-common.dirs b/debian/mysql-wsrep-common.dirs similarity index 100% rename from debian/mysql-common.dirs rename to debian/mysql-wsrep-common.dirs diff --git a/debian/mysql-common.files b/debian/mysql-wsrep-common.files similarity index 100% rename from debian/mysql-common.files rename to debian/mysql-wsrep-common.files diff --git a/debian/mysql-common.lintian-overrides b/debian/mysql-wsrep-common.lintian-overrides similarity index 100% rename from debian/mysql-common.lintian-overrides rename to debian/mysql-wsrep-common.lintian-overrides diff --git a/debian/mysql-common.postrm b/debian/mysql-wsrep-common.postrm similarity index 100% rename from debian/mysql-common.postrm rename to debian/mysql-wsrep-common.postrm diff --git a/debian/libmysqlclient-dev.README.Maintainer b/debian/mysql-wsrep-libmysqlclient-dev.README.Maintainer similarity index 100% rename from debian/libmysqlclient-dev.README.Maintainer rename to debian/mysql-wsrep-libmysqlclient-dev.README.Maintainer diff --git a/debian/libmysqlclient-dev.dirs b/debian/mysql-wsrep-libmysqlclient-dev.dirs similarity index 100% rename from debian/libmysqlclient-dev.dirs rename to debian/mysql-wsrep-libmysqlclient-dev.dirs diff --git a/debian/libmysqlclient-dev.examples b/debian/mysql-wsrep-libmysqlclient-dev.examples similarity index 100% rename from debian/libmysqlclient-dev.examples rename to debian/mysql-wsrep-libmysqlclient-dev.examples diff --git a/debian/libmysqlclient-dev.files b/debian/mysql-wsrep-libmysqlclient-dev.files similarity index 89% rename from debian/libmysqlclient-dev.files rename to debian/mysql-wsrep-libmysqlclient-dev.files index ea5554a3142c..572007679210 100644 --- a/debian/libmysqlclient-dev.files +++ b/debian/mysql-wsrep-libmysqlclient-dev.files @@ -8,4 +8,3 @@ usr/lib/*/mysql/plugin/ha_example.* usr/lib/*/mysql/plugin/ha_*_plugin.a usr/lib/*/mysql/plugin/ha_*_plugin.la usr/share/aclocal/mysql.m4 -usr/share/man/man1/mysql_config.1 diff --git a/debian/libmysqlclient16.postinst b/debian/mysql-wsrep-libmysqlclient16.postinst similarity index 100% rename from debian/libmysqlclient16.postinst rename to debian/mysql-wsrep-libmysqlclient16.postinst diff --git a/debian/libmysqlclient18.dirs b/debian/mysql-wsrep-libmysqlclient18.dirs similarity index 100% rename from debian/libmysqlclient18.dirs rename to debian/mysql-wsrep-libmysqlclient18.dirs diff --git a/debian/libmysqlclient18.files b/debian/mysql-wsrep-libmysqlclient18.files similarity index 100% rename from debian/libmysqlclient18.files rename to debian/mysql-wsrep-libmysqlclient18.files diff --git a/debian/mysql-server-5.5.NEWS b/debian/mysql-wsrep-server-5.5.NEWS similarity index 100% rename from debian/mysql-server-5.5.NEWS rename to debian/mysql-wsrep-server-5.5.NEWS diff --git a/debian/mysql-server-5.5.README.Debian b/debian/mysql-wsrep-server-5.5.README.Debian similarity index 100% rename from debian/mysql-server-5.5.README.Debian rename to debian/mysql-wsrep-server-5.5.README.Debian diff --git a/debian/mysql-server-5.5.config b/debian/mysql-wsrep-server-5.5.config similarity index 100% rename from debian/mysql-server-5.5.config rename to debian/mysql-wsrep-server-5.5.config diff --git a/debian/mysql-server-5.5.dirs b/debian/mysql-wsrep-server-5.5.dirs similarity index 76% rename from debian/mysql-server-5.5.dirs rename to debian/mysql-wsrep-server-5.5.dirs index bca0108e4804..6c3fdac9e9b2 100644 --- a/debian/mysql-server-5.5.dirs +++ b/debian/mysql-wsrep-server-5.5.dirs @@ -4,3 +4,5 @@ etc/mysql/conf.d usr/bin usr/share/mysql var/lib/mysql-upgrade +usr/sbin +usr/share/man/man8 diff --git a/debian/mysql-server-core-5.5.files b/debian/mysql-wsrep-server-5.5.files similarity index 55% rename from debian/mysql-server-core-5.5.files rename to debian/mysql-wsrep-server-5.5.files index 023381752b46..ace91fb5f906 100644 --- a/debian/mysql-server-core-5.5.files +++ b/debian/mysql-wsrep-server-5.5.files @@ -1,11 +1,46 @@ +etc/apparmor.d/usr.sbin.mysqld +usr/share/apport/package-hooks/source_mysql-5.5.py +usr/lib/mysql/*so* +usr/lib/mysql/plugin/*.so +etc/mysql/debian-start +etc/mysql/conf.d/mysqld_safe_syslog.cnf +usr/bin/msql2mysql +usr/bin/myisamchk +usr/bin/myisamlog +usr/bin/myisampack +usr/bin/mysql_convert_table_format +usr/bin/mysql_secure_installation +usr/bin/mysql_setpermission +usr/bin/mysql_tzinfo_to_sql +usr/bin/mysql_zap +usr/bin/mysqlbinlog +usr/bin/mysqld_multi +usr/bin/mysqld_safe +usr/bin/mysqlhotcopy +usr/bin/mysqltest +usr/bin/perror +usr/bin/replace +usr/bin/resolve_stack_dump +usr/bin/resolveip +usr/share/doc/mysql-server-5.5/ +usr/share/mysql/debian-start.inc.sh +usr/share/mysql/echo_stderr +usr/share/mysql/errmsg-utf8.txt +usr/share/mysql/mysqld_multi.server +usr/share/mysql/mysql_test_data_timezone.sql +usr/share/mysql/config.huge.ini +usr/share/mysql/config.medium.ini +usr/share/mysql/config.small.ini +usr/share/mysql/ndb-config-2-node.ini +usr/share/mysql/debian-start.inc.sh +usr/share/mysql/echo_stderr +usr/share/mysql/errmsg-utf8.txt +usr/share/mysql/mysqld_multi.server +usr/share/mysql/mysql_test_data_timezone.sql usr/bin/my_print_defaults usr/bin/mysql_install_db usr/bin/mysql_upgrade usr/sbin/mysqld -usr/share/man/man1/my_print_defaults.1 -usr/share/man/man1/mysql_install_db.1 -usr/share/man/man1/mysql_upgrade.1 -usr/share/man/man8/mysqld.8 usr/share/mysql/charsets usr/share/mysql/czech usr/share/mysql/danish @@ -34,7 +69,6 @@ usr/share/mysql/spanish usr/share/mysql/swedish usr/share/mysql/ukrainian usr/sbin/mysqld -usr/share/man/man8/mysqld.8 usr/share/mysql/charsets usr/share/mysql/czech usr/share/mysql/danish diff --git a/debian/mysql-server-5.5.lintian-overrides b/debian/mysql-wsrep-server-5.5.lintian-overrides similarity index 100% rename from debian/mysql-server-5.5.lintian-overrides rename to debian/mysql-wsrep-server-5.5.lintian-overrides diff --git a/debian/mysql-server-5.5.logcheck.ignore.paranoid b/debian/mysql-wsrep-server-5.5.logcheck.ignore.paranoid similarity index 100% rename from debian/mysql-server-5.5.logcheck.ignore.paranoid rename to debian/mysql-wsrep-server-5.5.logcheck.ignore.paranoid diff --git a/debian/mysql-server-5.5.logcheck.ignore.server b/debian/mysql-wsrep-server-5.5.logcheck.ignore.server similarity index 100% rename from debian/mysql-server-5.5.logcheck.ignore.server rename to debian/mysql-wsrep-server-5.5.logcheck.ignore.server diff --git a/debian/mysql-server-5.5.logcheck.ignore.workstation b/debian/mysql-wsrep-server-5.5.logcheck.ignore.workstation similarity index 100% rename from debian/mysql-server-5.5.logcheck.ignore.workstation rename to debian/mysql-wsrep-server-5.5.logcheck.ignore.workstation diff --git a/debian/mysql-server-5.5.mysql-server.logrotate b/debian/mysql-wsrep-server-5.5.mysql-server.logrotate similarity index 100% rename from debian/mysql-server-5.5.mysql-server.logrotate rename to debian/mysql-wsrep-server-5.5.mysql-server.logrotate diff --git a/debian/mysql-server-5.5.mysql.init b/debian/mysql-wsrep-server-5.5.mysql.init similarity index 100% rename from debian/mysql-server-5.5.mysql.init rename to debian/mysql-wsrep-server-5.5.mysql.init diff --git a/debian/mysql-server-5.5.mysql.upstart b/debian/mysql-wsrep-server-5.5.mysql.upstart similarity index 100% rename from debian/mysql-server-5.5.mysql.upstart rename to debian/mysql-wsrep-server-5.5.mysql.upstart diff --git a/debian/mysql-server-5.5.postinst b/debian/mysql-wsrep-server-5.5.postinst similarity index 100% rename from debian/mysql-server-5.5.postinst rename to debian/mysql-wsrep-server-5.5.postinst diff --git a/debian/mysql-server-5.5.postrm b/debian/mysql-wsrep-server-5.5.postrm similarity index 100% rename from debian/mysql-server-5.5.postrm rename to debian/mysql-wsrep-server-5.5.postrm diff --git a/debian/mysql-server-5.5.preinst b/debian/mysql-wsrep-server-5.5.preinst similarity index 100% rename from debian/mysql-server-5.5.preinst rename to debian/mysql-wsrep-server-5.5.preinst diff --git a/debian/mysql-server-5.5.prerm b/debian/mysql-wsrep-server-5.5.prerm similarity index 100% rename from debian/mysql-server-5.5.prerm rename to debian/mysql-wsrep-server-5.5.prerm diff --git a/debian/mysql-server-5.5.py b/debian/mysql-wsrep-server-5.5.py similarity index 100% rename from debian/mysql-server-5.5.py rename to debian/mysql-wsrep-server-5.5.py diff --git a/debian/mysql-server-5.5.templates b/debian/mysql-wsrep-server-5.5.templates similarity index 100% rename from debian/mysql-server-5.5.templates rename to debian/mysql-wsrep-server-5.5.templates diff --git a/debian/mysql-wsrep-server-core-5.5.dirs b/debian/mysql-wsrep-server-core-5.5.dirs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/debian/mysql-wsrep-server-core-5.5.files b/debian/mysql-wsrep-server-core-5.5.files new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/debian/mysql-testsuite-5.5.dirs b/debian/mysql-wsrep-testsuite-5.5.dirs similarity index 100% rename from debian/mysql-testsuite-5.5.dirs rename to debian/mysql-wsrep-testsuite-5.5.dirs diff --git a/debian/mysql-testsuite-5.5.files b/debian/mysql-wsrep-testsuite-5.5.files similarity index 100% rename from debian/mysql-testsuite-5.5.files rename to debian/mysql-wsrep-testsuite-5.5.files diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in index 8f9c82fe2c55..29ccd3b19249 100644 --- a/debian/po/POTFILES.in +++ b/debian/po/POTFILES.in @@ -1 +1 @@ -[type: gettext/rfc822deb] mysql-server-5.5.templates +[type: gettext/rfc822deb] mysql-wsrep-server-5.5.templates diff --git a/debian/po/ar.po b/debian/po/ar.po index 29db9f4512db..c18ddfdec14b 100644 --- a/debian/po/ar.po +++ b/debian/po/ar.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: templates\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2007-05-01 13:04+0300\n" "Last-Translator: Ossama M. Khayat \n" "Language-Team: Arabic \n" @@ -27,19 +27,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "هل Ùعلاً تريد التثبيط؟" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "هناك مل٠مسمى /var/lib/mysql/debian-*.flag موجود على هذا النظام." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 #, fuzzy #| msgid "" #| "Such file is an indication that a mysql-server package with a higher " @@ -52,7 +52,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -62,13 +62,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "ملاحظة هامة لمستخدمي NIS/YP" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -76,7 +76,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 #, fuzzy #| msgid "" #| "You should also check the permissions and the owner of the /var/lib/mysql " @@ -88,13 +88,13 @@ msgstr "عليك أيضاً أن تقوم بالتأكد من صلاحيات Ù… #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "إزالة جميع قواعد بيانات MySQLØŸ" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -102,7 +102,7 @@ msgstr "الدليل /var/lib/mysql الذي يحتوي قواعد بيانات #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -113,13 +113,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "تشغيل خادم MySQL عند الإقلاع؟" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -129,13 +129,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "كلمة المرور الجديدة لمستخد \"root\" الخاص بـMySQL:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -145,7 +145,7 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 #, fuzzy #| msgid "If that field is left blank, the password will not be changed." msgid "If this field is left blank, the password will not be changed." @@ -153,7 +153,7 @@ msgstr "إن ترك الحقل Ùارغاً، Ùلن يتم تغيير كلمة #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 #, fuzzy #| msgid "New password for the MySQL \"root\" user:" msgid "Repeat password for the MySQL \"root\" user:" @@ -161,13 +161,13 @@ msgstr "كلمة المرور الجديدة لمستخد \"root\" الخاص ب #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "تعذر تعيين كلمة مرور للمستخدم \"root\" الخاص بـMySQL." #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -179,7 +179,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "You should check the account's password after tha package installation." @@ -188,7 +188,7 @@ msgstr "يجب عليك التحقق من كلمة مرور الحساب عقب #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -202,25 +202,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "" "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " "mysql-cluster-server package and remove all lines starting with \"ndb\" from " diff --git a/debian/po/ca.po b/debian/po/ca.po index 0219ffa9772b..1161cc0945f0 100644 --- a/debian/po/ca.po +++ b/debian/po/ca.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-4.1\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2004-01-31 19:20GMT\n" "Last-Translator: Aleix Badia i Bosch \n" "Language-Team: Debian L10n Catalan \n" @@ -17,19 +17,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "Such a file is an indication that a mysql-server package with a higher " "version has been installed previously." @@ -39,7 +39,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -49,7 +49,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 #, fuzzy #| msgid "Important note for NIS/YP users!" msgid "Important note for NIS/YP users" @@ -57,7 +57,7 @@ msgstr "Nota important pels usuaris de NIS/YP" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -67,7 +67,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -77,13 +77,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -93,7 +93,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -105,7 +105,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 #, fuzzy #| msgid "Should MySQL start on boot?" msgid "Start the MySQL server on boot?" @@ -113,7 +113,7 @@ msgstr "Voleu que el MySQL s'inici #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 #, fuzzy msgid "" "The MySQL server can be launched automatically at boot time or manually with " @@ -124,13 +124,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -140,25 +140,25 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 msgid "Repeat password for the MySQL \"root\" user:" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -170,7 +170,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "" "Hauríeu de comprovar la contrasenya del compte després de la instaÅ€lació " @@ -178,7 +178,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for " @@ -192,26 +192,26 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" "Les dos contrasenyes que heu introduït no són la mateixa. Proveu-ho de nou." #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "" "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " "mysql-cluster-server package and remove all lines starting with \"ndb\" from " diff --git a/debian/po/cs.po b/debian/po/cs.po index 9488cb46dc7a..51fc0ead4734 100644 --- a/debian/po/cs.po +++ b/debian/po/cs.po @@ -14,8 +14,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-5.5\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2007-05-01 13:01+0200\n" "Last-Translator: Miroslav Kure \n" "Language-Team: Czech \n" @@ -26,19 +26,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "Opravdu pokraÄovat v degradaci?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "V systému existuje soubor /var/lib/mysql/debian-*.flag." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 #, fuzzy #| msgid "" #| "Such file is an indication that a mysql-server package with a higher " @@ -50,7 +50,7 @@ msgstr "To znamená, že již byl nainstalován balík mysql-server s vyšší v #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -60,13 +60,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Důležitá poznámka pro uživatele NIS/YP" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -74,7 +74,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 #, fuzzy #| msgid "" #| "You should also check the permissions and the owner of the /var/lib/mysql " @@ -87,13 +87,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "Odstranit vÅ¡echny MySQL databáze?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -102,7 +102,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -114,13 +114,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "Spustit MySQL server pÅ™i startu systému?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -130,13 +130,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Nové heslo MySQL uživatele \"root\":" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -146,7 +146,7 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 #, fuzzy #| msgid "If that field is left blank, the password will not be changed." msgid "If this field is left blank, the password will not be changed." @@ -154,7 +154,7 @@ msgstr "Ponecháte-li pole prázdné, heslo se nezmÄ›ní." #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 #, fuzzy #| msgid "New password for the MySQL \"root\" user:" msgid "Repeat password for the MySQL \"root\" user:" @@ -162,13 +162,13 @@ msgstr "Nové heslo MySQL uživatele \"root\":" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "Nelze nastavit heslo MySQL uživatele \"root\"" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -180,7 +180,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "You should check the account's password after tha package installation." @@ -189,7 +189,7 @@ msgstr "Po instalaci balíku byste mÄ›li heslo ověřit." #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -202,25 +202,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "" "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " "mysql-cluster-server package and remove all lines starting with \"ndb\" from " diff --git a/debian/po/da.po b/debian/po/da.po index 9bfab1589eda..e568eaefdf76 100644 --- a/debian/po/da.po +++ b/debian/po/da.po @@ -14,8 +14,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-4.1\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2007-05-30 22:41+0200\n" "Last-Translator: Claus Hindsgaul \n" "Language-Team: Danish\n" @@ -27,20 +27,20 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "Ønsker du virkelig at fortsætte nedgraderingen?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "" "Der er en fil med navnet /var/lib/mysql/debian-*.flag på dette system." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 #, fuzzy #| msgid "" #| "Such file is an indication that a mysql-server package with a higher " @@ -54,7 +54,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -64,13 +64,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Vigtig oplysning til NIS/YP-brugere" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -78,7 +78,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 #, fuzzy #| msgid "" #| "You should also check the permissions and the owner of the /var/lib/mysql " @@ -91,13 +91,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "Fjern alle MySQL-databaser?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -107,7 +107,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -119,13 +119,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "Start MySQL-serveren under systemopstart?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -135,13 +135,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Ny adgangskode for MySQL's \"root\"-bruger:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -151,7 +151,7 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 #, fuzzy #| msgid "If that field is left blank, the password will not be changed." msgid "If this field is left blank, the password will not be changed." @@ -159,7 +159,7 @@ msgstr "Hvis du lader dette felt st #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 #, fuzzy #| msgid "New password for the MySQL \"root\" user:" msgid "Repeat password for the MySQL \"root\" user:" @@ -167,13 +167,13 @@ msgstr "Ny adgangskode for MySQL's \"root\"-bruger:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "Kunne ikke sætte adgangskoden for MySQL's \"root\"-bruger" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -186,13 +186,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "Du bør tjekke kontoens adgangskode efter pakkeinstallationen." #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -206,25 +206,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "" "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " "mysql-cluster-server package and remove all lines starting with \"ndb\" from " diff --git a/debian/po/de.po b/debian/po/de.po index 6352e7f047c5..a834676d57f4 100644 --- a/debian/po/de.po +++ b/debian/po/de.po @@ -15,8 +15,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-5.5_5.5.37-1_de\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2009-08-27 22:41+0200\n" "Last-Translator: Thomas Mueller \n" "Language-Team: german \n" @@ -29,13 +29,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "Möchten Sie wirklich eine ältere Version einspielen?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "" "Auf diesem System existiert eine Datei mit dem Namen /var/lib/mysql/debian-*." @@ -43,7 +43,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "Such a file is an indication that a mysql-server package with a higher " "version has been installed previously." @@ -53,7 +53,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -63,13 +63,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Wichtige Anmerkung für NIS/YP-Benutzer!" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -79,7 +79,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -89,13 +89,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "Alle MySQL-Datenbanken entfernen?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -105,7 +105,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -117,13 +117,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "Soll der MySQL-Server automatisch beim Booten starten?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -133,13 +133,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Neues Passwort für den MySQL »root«-Benutzer:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -149,25 +149,25 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "Wenn dieses Feld freigelassen wird, wird das Passwort nicht geändert." #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 msgid "Repeat password for the MySQL \"root\" user:" msgstr "Wiederholen Sie das Passwort für den MySQL-»root«-Benutzer:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "Konnte für den MySQL-»root«-Benutzer kein Passwort setzen" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -180,7 +180,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "" "Sie sollten das Passwort des administrativen Benutzers nach der " @@ -188,7 +188,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -202,13 +202,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "Passwort-Eingabefehler" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" "Die beiden von Ihnen eingegebenen Passwörter sind nicht identisch. Bitte " @@ -216,13 +216,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "NDB-Cluster scheint gerade benutzt zu werden" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 #, fuzzy #| msgid "" #| "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the " diff --git a/debian/po/es.po b/debian/po/es.po index 4391e779e80f..1f7f5028eab8 100644 --- a/debian/po/es.po +++ b/debian/po/es.po @@ -40,8 +40,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-5.5_5.0.24-3\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2007-05-28 22:21+0200\n" "Last-Translator: Javier Fernández-Sanguino \n" "Language-Team: Debian l10 Spanish \n" @@ -52,20 +52,20 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "¿Desea realmente continuar con la desactualización?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "" "Existe un archivo con el nombre /var/lib/mysql/debian-*.flag en este sistema." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 #, fuzzy #| msgid "" #| "Such file is an indication that a mysql-server package with a higher " @@ -79,7 +79,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -89,13 +89,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Nota importante para los usuarios de NIS/YP" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -103,7 +103,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 #, fuzzy #| msgid "" #| "You should also check the permissions and the owner of the /var/lib/mysql " @@ -117,13 +117,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "¿Desea eliminar todas las bases de datos MySQL?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -133,7 +133,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -145,13 +145,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "¿Debería ejecutarse el servidor MySQL al iniciarse el sistema?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -161,13 +161,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Nueva contraseña para el usuario «root» de MySQL:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -177,7 +177,7 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 #, fuzzy #| msgid "If that field is left blank, the password will not be changed." msgid "If this field is left blank, the password will not be changed." @@ -185,7 +185,7 @@ msgstr "No se modificará la contraseña si deja el espacio en blanco." #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 #, fuzzy #| msgid "New password for the MySQL \"root\" user:" msgid "Repeat password for the MySQL \"root\" user:" @@ -193,13 +193,13 @@ msgstr "Nueva contraseña para el usuario «root» de MySQL:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "No se pudo fijar la contraseña para el usuario «root» de MySQL" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -212,7 +212,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "" "Debería comprobar la contraseña de la cuenta después de la instalación del " @@ -220,7 +220,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -233,25 +233,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "" "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " "mysql-cluster-server package and remove all lines starting with \"ndb\" from " diff --git a/debian/po/eu.po b/debian/po/eu.po index 30792e20addc..516e35b38e23 100644 --- a/debian/po/eu.po +++ b/debian/po/eu.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: eu\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2009-07-29 11:59+0200\n" "Last-Translator: Piarres Beobide \n" "Language-Team: Euskara \n" @@ -20,19 +20,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "Benetan bertsio zaharragora itzuli nahi duzu?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "Sisteman badago /var/lib/mysql/debian-*.flag izeneko fitxategi bat." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 #, fuzzy #| msgid "" #| "Such file is an indication that a mysql-server package with a higher " @@ -46,7 +46,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -56,13 +56,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "NIS/YP erabiltzaileentzat ohar garrantzitsua" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -70,7 +70,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 #, fuzzy #| msgid "" #| "You should also check the permissions and the owner of the /var/lib/mysql " @@ -84,13 +84,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "Ezabatu MySQL datubase guztiak?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -98,7 +98,7 @@ msgstr "MySQL datubaseak dituen /var/lib/mysql direktorioa ezabatua izango da." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -110,13 +110,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "Abioan MySQL zerbitzaria abiarazi?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -126,13 +126,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "MySQL \"root\" erabiltzailearen pasahitz berria:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -142,7 +142,7 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 #, fuzzy #| msgid "If that field is left blank, the password will not be changed." msgid "If this field is left blank, the password will not be changed." @@ -150,19 +150,19 @@ msgstr "Eremua hau zurian utziaz gero ez da pasahitza aldatuko." #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 msgid "Repeat password for the MySQL \"root\" user:" msgstr "Errepikatu MySQL \"root\" erabiltzailearen pasahitza:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "Ezin da MySQL \"root\" erabiltzailearen pasahitza ezarri" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -174,14 +174,14 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "" "Kontuaren pasahitza egiaztatu beharko zenuke paketea instalatu aurretik." #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -195,25 +195,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "Pasahitz sarrera errorea" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "Idatzi dituzun bi pasahitzak ez dira berdina. Mesedez saiatu berriz." #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "Dirudienez NDB Cluster-a erabilia dago" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 #, fuzzy #| msgid "" #| "MySQL-5.5 has orphaned NDB Cluster support. Please migrate to the new " diff --git a/debian/po/fr.po b/debian/po/fr.po index c404291fddaa..7964fba9a801 100644 --- a/debian/po/fr.po +++ b/debian/po/fr.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: fr\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2009-08-08 14:56+0200\n" "Last-Translator: Christian Perrier \n" "Language-Team: French \n" @@ -22,19 +22,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "Faut-il vraiment revenir à la version précédente ?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "Un fichier /var/lib/mysql/debian-*.flag est présent sur ce système." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "Such a file is an indication that a mysql-server package with a higher " "version has been installed previously." @@ -44,7 +44,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -52,13 +52,13 @@ msgstr "Il n'est pas garanti que cette version puisse en utiliser les données." #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Note importante pour les utilisateurs NIS/YP" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -68,7 +68,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -78,13 +78,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "Faut-il supprimer toutes les bases de données MySQL ?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -94,7 +94,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -105,13 +105,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "Faut-il lancer MySQL au démarrage ?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -121,13 +121,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Nouveau mot de passe du superutilisateur de MySQL :" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -137,26 +137,26 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "Si ce champ est laissé vide, le mot de passe ne sera pas changé." #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 msgid "Repeat password for the MySQL \"root\" user:" msgstr "Confirmation du mot de passe du superutilisateur de MySQL :" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "" "Impossible de changer le mot de passe de l'utilisateur « root » de MySQL" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -168,7 +168,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "" "Vous devriez vérifier le mot de passe de ce compte après l'installation du " @@ -176,7 +176,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -190,13 +190,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "Erreur de saisie du mot de passe" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" "Le mot de passe et sa confirmation ne sont pas identiques. Veuillez " @@ -204,13 +204,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "Abandon de la gestion de NDB" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 #, fuzzy #| msgid "" #| "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the " diff --git a/debian/po/gl.po b/debian/po/gl.po index e46440f1e4f8..b05661c05431 100644 --- a/debian/po/gl.po +++ b/debian/po/gl.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-5.5\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2007-04-20 09:44+0200\n" "Last-Translator: Jacobo Tarrio \n" "Language-Team: Galician \n" @@ -17,19 +17,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "¿Quere pasar a unha versión anterior?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "Neste sistema hai un ficheiro chamado /var/lib/mysql/debian-*.flag." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 #, fuzzy #| msgid "" #| "Such file is an indication that a mysql-server package with a higher " @@ -43,7 +43,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -53,13 +53,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Nota importante para os usuarios de NIS/YP" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -67,7 +67,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 #, fuzzy #| msgid "" #| "You should also check the permissions and the owner of the /var/lib/mysql " @@ -81,13 +81,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "¿Eliminar tódalas bases de datos de MySQL?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -97,7 +97,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -109,13 +109,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "¿Iniciar o servidor MySQL co ordenador?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -125,13 +125,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Novo contrasinal para o usuario \"root\" de MySQL:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -141,7 +141,7 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 #, fuzzy #| msgid "If that field is left blank, the password will not be changed." msgid "If this field is left blank, the password will not be changed." @@ -149,7 +149,7 @@ msgstr "Se deixa o campo en branco, non se ha cambiar o contrasinal." #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 #, fuzzy #| msgid "New password for the MySQL \"root\" user:" msgid "Repeat password for the MySQL \"root\" user:" @@ -157,13 +157,13 @@ msgstr "Novo contrasinal para o usuario \"root\" de MySQL:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "Non se puido establecer o contrasinal do usuario \"root\" de MySQL" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -175,7 +175,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "You should check the account's password after tha package installation." @@ -184,7 +184,7 @@ msgstr "Debería comprobar o contrasinal da conta trala instalación do paquete. #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -198,25 +198,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "" "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " "mysql-cluster-server package and remove all lines starting with \"ndb\" from " diff --git a/debian/po/it.po b/debian/po/it.po index 3e4570288809..92e8d6b6e70c 100644 --- a/debian/po/it.po +++ b/debian/po/it.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-5.5 5.5.37 italian debconf templates\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2009-08-08 11:03+0200\n" "Last-Translator: Luca Monducci \n" "Language-Team: Italian \n" @@ -18,20 +18,20 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "Procedere realmente con l'abbassamento di versione?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "" "Su questo sistema esiste un file con nome /var/lib/mysql/debian-*.flag." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "Such a file is an indication that a mysql-server package with a higher " "version has been installed previously." @@ -41,7 +41,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -51,13 +51,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Nota importante per gli utenti NIS/YP" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -67,7 +67,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -77,13 +77,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "Eliminare tutti i database MySQL?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -93,7 +93,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -105,13 +105,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "Lanciare il server MySQL all'avvio?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -121,13 +121,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Nuova password per l'utente «root» di MySQL:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -137,25 +137,25 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "Se questo campo è lasciato vuoto, la password non viene cambiata." #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 msgid "Repeat password for the MySQL \"root\" user:" msgstr "Ripetere la password per l'utente «root» di MySQL:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "Impossibile impostare la password per l'utente «root» di MySQL" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -168,14 +168,14 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "" "Al termine dell'installazione si deve verificare la password dell'account." #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -189,25 +189,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "Errore di inserimento della password" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "Le due password inserite sono diverse. Riprovare." #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "È in uso un cluster NDB" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 #, fuzzy #| msgid "" #| "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the " diff --git a/debian/po/ja.po b/debian/po/ja.po index b19f6a8ae520..66c6a63eb900 100644 --- a/debian/po/ja.po +++ b/debian/po/ja.po @@ -15,8 +15,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-5.5 5.5.37-1\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2009-09-01 08:25+0900\n" "Last-Translator: Hideki Yamane (Debian-JP) \n" "Language-Team: Japanese \n" @@ -27,13 +27,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "本当ã«ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã‚’実行ã—ã¾ã™ã‹?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "" "ã“ã®ã‚·ã‚¹ãƒ†ãƒ ã«ã¯ /var/lib/mysql/debian-*.flag ã¨ã„ã†åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã—ã¦" @@ -41,7 +41,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "Such a file is an indication that a mysql-server package with a higher " "version has been installed previously." @@ -51,7 +51,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -61,13 +61,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "NIS/YP ユーザã¸ã®é‡è¦ãªæ³¨æ„" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -77,7 +77,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -85,13 +85,13 @@ msgstr "/var/lib/mysql ã®æ‰€æœ‰è€…権é™ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹å¿…è¦ã‚‚ã‚ã‚Šã¾ #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "ã™ã¹ã¦ã® MySQL データベースを削除ã—ã¾ã™ã‹?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -101,7 +101,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -113,13 +113,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "MySQL をシステム起動時ã«é–‹å§‹ã—ã¾ã™ã‹?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -129,13 +129,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "MySQL ã® \"root\" ユーザã«å¯¾ã™ã‚‹æ–°ã—ã„パスワード:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -145,25 +145,25 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "ã“ã®å€¤ã‚’空ã®ã¾ã¾ã«ã—ã¦ãŠã„ãŸå ´åˆã¯ã€ãƒ‘スワードã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“。" #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 msgid "Repeat password for the MySQL \"root\" user:" msgstr "MySQL ã® \"root\" ユーザã«å¯¾ã™ã‚‹æ–°ã—ã„パスワード:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "MySQL ã® \"root\" ユーザã®ãƒ‘スワードを設定ã§ãã¾ã›ã‚“" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -175,14 +175,14 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "" "パッケージã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«å¾Œã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã®ãƒ‘スワードを確èªã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -195,25 +195,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "パスワード入力エラー" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "入力ã•ã‚ŒãŸäºŒã¤ã®ãƒ‘スワードãŒä¸€è‡´ã—ã¾ã›ã‚“。å†å…¥åŠ›ã—ã¦ãã ã•ã„。" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "NDB クラスタãŒåˆ©ç”¨ã•ã‚Œã¦ã„るよã†ã§ã™" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 #, fuzzy #| msgid "" #| "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the " diff --git a/debian/po/nb.po b/debian/po/nb.po index b062017e7ec2..3c130c61ba1f 100644 --- a/debian/po/nb.po +++ b/debian/po/nb.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql_nb\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2007-02-18 12:13+0100\n" "Last-Translator: Bjørn Steensrud \n" "Language-Team: Norwegian BokmÃ¥l \n" @@ -19,7 +19,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 #, fuzzy #| msgid "Do you really want to downgrade?" msgid "Really proceed with downgrade?" @@ -27,13 +27,13 @@ msgstr "Er du sikker pÃ¥ at du vil nedgradere?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 #, fuzzy #| msgid "" #| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates " @@ -49,7 +49,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -57,7 +57,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 #, fuzzy #| msgid "Important note for NIS/YP users!" msgid "Important note for NIS/YP users" @@ -65,7 +65,7 @@ msgstr "Viktig merknad for NIS/YP-brukere!" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -73,7 +73,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -81,13 +81,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -95,7 +95,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 #, fuzzy #| msgid "" #| "The script is about to remove the data directory /var/lib/mysql. If it is " @@ -112,7 +112,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 #, fuzzy #| msgid "Should MySQL start on boot?" msgid "Start the MySQL server on boot?" @@ -120,7 +120,7 @@ msgstr "Skal MySQL startes ved maskinoppstart?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 #, fuzzy #| msgid "" #| "The MySQL can start automatically on boot time or only if you manually " @@ -134,7 +134,7 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 #, fuzzy #| msgid "New password for MySQL \"root\" user:" msgid "New password for the MySQL \"root\" user:" @@ -142,7 +142,7 @@ msgstr "Nytt passord for MySQLs «root»-bruker:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 #, fuzzy #| msgid "" #| "It is highly recommended that you set a password for the MySQL " @@ -156,13 +156,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 #, fuzzy #| msgid "New password for MySQL \"root\" user:" msgid "Repeat password for the MySQL \"root\" user:" @@ -170,7 +170,7 @@ msgstr "Nytt passord for MySQLs «root»-bruker:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "Unable to set password for MySQL \"root\" user" msgid "Unable to set password for the MySQL \"root\" user" @@ -178,7 +178,7 @@ msgstr "Klarer ikke angi passord for MySQLs «root»-bruker" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "It seems an error occurred while setting the password for the MySQL " @@ -196,13 +196,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " "information." @@ -210,25 +210,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "" "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " "mysql-cluster-server package and remove all lines starting with \"ndb\" from " diff --git a/debian/po/nl.po b/debian/po/nl.po index f820a5097386..c2fe2f2f9bd9 100644 --- a/debian/po/nl.po +++ b/debian/po/nl.po @@ -6,8 +6,8 @@ # msgid "" msgstr "" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2010-11-21 21:30+0100\n" "Last-Translator: Eric Spreen \n" "Language-Team: Debian-Dutch \n" @@ -18,20 +18,20 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "Wilt u echt een oude versie herstellen?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "" "Er bestaat een bestand genaamd /var/lib/mysql/debian-*.flag op dit systeem." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "Such a file is an indication that a mysql-server package with a higher " "version has been installed previously." @@ -41,7 +41,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -51,13 +51,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Belangrijke opmerking voor gebruikers van NIS/YP" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -67,7 +67,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -77,13 +77,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "Wilt u alle MySQL-databases verwijderen?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -93,7 +93,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -105,13 +105,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "Moet MySQL starten als de computer start?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -121,13 +121,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Nieuw wachtwoord voor de MySQL \"root\"-gebruiker:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -137,26 +137,26 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "" "Als dit veld leeg wordt gelaten, zal het wachtwoord niet worden veranderd." #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 msgid "Repeat password for the MySQL \"root\" user:" msgstr "Herhaal het wachtwoord voor de MySQL \"root\"-gebruiker:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "Kan het wachtwoord voor de MySQL \"root\"-gebruiker niet instellen" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -169,7 +169,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "" "U zou het wachtwoord van het account moeten controleren nadat het pakket is " @@ -177,7 +177,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for " @@ -191,13 +191,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "Fout bij invoer wachtwoord" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" "De twee wachtwoorden die u hebt ingevoerd zijn niet gelijk. Probeert u het " @@ -205,13 +205,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "De NDB-cluster lijkt in gebruik te zijn" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 #, fuzzy #| msgid "" #| "MySQL-5.1 no longer provides NDB Cluster support. Please migrate to the " diff --git a/debian/po/pt.po b/debian/po/pt.po index b83aa6f052c6..10cc9255057d 100644 --- a/debian/po/pt.po +++ b/debian/po/pt.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-5.5\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2007-05-05 21:01+0100\n" "Last-Translator: Miguel Figueiredo \n" "Language-Team: Portuguese \n" @@ -18,19 +18,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "Deseja mesmo fazer downgrade?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "Existe um ficheiro chamado /var/lib/mysql/debian-*.flag neste sistema." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 #, fuzzy #| msgid "" #| "Such file is an indication that a mysql-server package with a higher " @@ -44,7 +44,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -54,13 +54,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Nota importante para utilizadores de NIS/YP" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -68,7 +68,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 #, fuzzy #| msgid "" #| "You should also check the permissions and the owner of the /var/lib/mysql " @@ -81,13 +81,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "Remover todas as bases de dados MySQL?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -97,7 +97,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -109,13 +109,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "Iniciar o servidor MySQL no arranque?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -125,13 +125,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Nova palavra-passe para o utilizador \"root\" do MySQL:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -141,7 +141,7 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 #, fuzzy #| msgid "If that field is left blank, the password will not be changed." msgid "If this field is left blank, the password will not be changed." @@ -150,7 +150,7 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 #, fuzzy #| msgid "New password for the MySQL \"root\" user:" msgid "Repeat password for the MySQL \"root\" user:" @@ -158,14 +158,14 @@ msgstr "Nova palavra-passe para o utilizador \"root\" do MySQL:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "" "Não foi possível definir a palavra-passe para o utilizador \"root\" do MySQL" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -178,7 +178,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "You should check the account's password after tha package installation." @@ -188,7 +188,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -202,25 +202,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "" "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " "mysql-cluster-server package and remove all lines starting with \"ndb\" from " diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po index b88e82e97f51..e12bdf7bc555 100644 --- a/debian/po/pt_BR.po +++ b/debian/po/pt_BR.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-5.5\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2007-04-21 15:59-0300\n" "Last-Translator: André Luís Lopes \n" "Language-Team: Debian-BR Project \n" @@ -21,19 +21,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "Realmente proceder com o rebaixamento de versão?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "Um arquivo de nome /var/lib/mysql/debian-*.flag existe no sistema." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 #, fuzzy #| msgid "" #| "Such file is an indication that a mysql-server package with a higher " @@ -47,7 +47,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -57,13 +57,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Aviso importante para usuários NIS/YP" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -71,7 +71,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 #, fuzzy #| msgid "" #| "You should also check the permissions and the owner of the /var/lib/mysql " @@ -84,13 +84,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "Remover todas as bases de dados do MySQL?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -100,7 +100,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -112,13 +112,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "Iniciar o servidor MySQL junto a inicialização da máquina?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -128,13 +128,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Nova senha para o usuário \"root\" do MySQL:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -144,7 +144,7 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 #, fuzzy #| msgid "If that field is left blank, the password will not be changed." msgid "If this field is left blank, the password will not be changed." @@ -152,7 +152,7 @@ msgstr "Caso este campo seja deixado em branco, a senha não sera mudada." #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 #, fuzzy #| msgid "New password for the MySQL \"root\" user:" msgid "Repeat password for the MySQL \"root\" user:" @@ -160,13 +160,13 @@ msgstr "Nova senha para o usuário \"root\" do MySQL:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "Impossível definir senha para o usuário \"root\" do MySQL" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -179,7 +179,7 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "You should check the account's password after tha package installation." @@ -188,7 +188,7 @@ msgstr "Você deverá checar a senha dessa conta após a instalação deste paco #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -202,25 +202,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "" "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " "mysql-cluster-server package and remove all lines starting with \"ndb\" from " diff --git a/debian/po/ro.po b/debian/po/ro.po index 2c170b269fa6..cb2d1c066b6a 100644 --- a/debian/po/ro.po +++ b/debian/po/ro.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: po-debconf://mysql-dfsg\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2006-12-20 21:27+0200\n" "Last-Translator: stan ioan-eugen \n" "Language-Team: romanian \n" @@ -19,7 +19,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 #, fuzzy #| msgid "Do you really want to downgrade?" msgid "Really proceed with downgrade?" @@ -27,13 +27,13 @@ msgstr "SunteÅ£i sigur că doriÅ£i să instalaÅ£i o versiune mai veche?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 #, fuzzy #| msgid "" #| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates " @@ -50,7 +50,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -58,7 +58,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 #, fuzzy #| msgid "Important note for NIS/YP users!" msgid "Important note for NIS/YP users" @@ -66,7 +66,7 @@ msgstr "Notă importantă pentru utilizatorii NIS/YP!" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -74,7 +74,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -82,13 +82,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -96,7 +96,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 #, fuzzy #| msgid "" #| "The script is about to remove the data directory /var/lib/mysql. If it is " @@ -113,7 +113,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 #, fuzzy #| msgid "Should MySQL start on boot?" msgid "Start the MySQL server on boot?" @@ -121,7 +121,7 @@ msgstr "DoriÅ£i ca MySQL să pornească la initializarea sistemului?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 #, fuzzy #| msgid "" #| "The MySQL can start automatically on boot time or only if you manually " @@ -135,7 +135,7 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 #, fuzzy #| msgid "New password for MySQL \"root\" user:" msgid "New password for the MySQL \"root\" user:" @@ -143,7 +143,7 @@ msgstr "Noua parolă pentru utilizatorul „root†al MySQL:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 #, fuzzy #| msgid "" #| "It is highly recommended that you set a password for the MySQL " @@ -157,13 +157,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 #, fuzzy #| msgid "New password for MySQL \"root\" user:" msgid "Repeat password for the MySQL \"root\" user:" @@ -171,7 +171,7 @@ msgstr "Noua parolă pentru utilizatorul „root†al MySQL:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "Unable to set password for MySQL \"root\" user" msgid "Unable to set password for the MySQL \"root\" user" @@ -179,7 +179,7 @@ msgstr "Nu s-a putut stabili parola pentru utilizatorul „root†al MySQL" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "It seems an error occurred while setting the password for the MySQL " @@ -197,13 +197,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " "information." @@ -211,25 +211,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "" "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " "mysql-cluster-server package and remove all lines starting with \"ndb\" from " diff --git a/debian/po/ru.po b/debian/po/ru.po index 58d4af781588..102a64e597b4 100644 --- a/debian/po/ru.po +++ b/debian/po/ru.po @@ -17,8 +17,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-5.5 5.5.37-1\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2009-08-06 20:27+0400\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" @@ -32,19 +32,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "ДейÑтвительно уÑтановить более Ñтарую верÑию?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "Ð’ ÑиÑтеме найден файл /var/lib/mysql/debian-*.flag." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "Such a file is an indication that a mysql-server package with a higher " "version has been installed previously." @@ -54,7 +54,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -64,13 +64,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Важное замечание Ð´Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¹ NIS/YP" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -80,7 +80,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -88,13 +88,13 @@ msgstr "Также проверьте права доÑтупа и владел #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "Удалить вÑе базы данных MySQL?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -103,7 +103,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -115,13 +115,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "ЗапуÑкать MySQL при загрузке ÑиÑтемы?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -131,13 +131,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Ðовый пароль Ð´Ð»Ñ MySQL Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ \"root\":" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -147,25 +147,25 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "ЕÑли оÑтавить поле пуÑтым, то пароль изменён не будет." #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 msgid "Repeat password for the MySQL \"root\" user:" msgstr "Повторите ввод Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð´Ð»Ñ MySQL Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ \"root\":" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "Ðевозможно задать пароль MySQL пользователю \"root\"" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -177,13 +177,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "Проверьте пароль учётной запиÑи поÑле уÑтановки пакета." #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -195,25 +195,25 @@ msgstr "ПодробноÑти Ñм. в файле /usr/share/doc/mysql-server-5 #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "Ошибка ввода паролÑ" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "Два введённых Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð½Ðµ одинаковы. Повторите ввод." #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "NDB Cluster уже иÑпользуетÑÑ" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 #, fuzzy #| msgid "" #| "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the " diff --git a/debian/po/sk.po b/debian/po/sk.po index c753da095cff..e57e0eb0daa4 100644 --- a/debian/po/sk.po +++ b/debian/po/sk.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-5.1 5.1.49-3\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2011-01-04 12:55+0100\n" "Last-Translator: Slavko \n" "Language-Team: Slovak \n" @@ -20,19 +20,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "Naozaj pokraÄovaÅ¥ v znížení verzie?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "Súbor s menom /var/lib/mysql/debian-*.flag už v systéme existuje." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "Such a file is an indication that a mysql-server package with a higher " "version has been installed previously." @@ -42,7 +42,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -52,13 +52,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Dôležitá poznámka pre používateľov NIS/YP" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -68,7 +68,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -77,13 +77,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "OdstrániÅ¥ vÅ¡etky databázy MySQL?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -92,7 +92,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -103,13 +103,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "SpúšťaÅ¥ MySQL server pri Å¡tarte systému?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -119,13 +119,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Nové heslo MySQL používateľa „rootâ€:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -135,25 +135,25 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "Ak toto pole ponecháte prázdne, heslo nebude zmenené." #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 msgid "Repeat password for the MySQL \"root\" user:" msgstr "Zopakujte heslo MySQL používateľa „root“:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "Nemožno nastaviÅ¥ heslo MySQL používateľa „root“" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -165,13 +165,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "Po inÅ¡talácii balíka by ste mali skontrolovaÅ¥ heslo úÄtu." #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for " @@ -185,25 +185,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "Chyba pri zadávaní hesla" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "Heslá, ktoré ste zadali sa nezhodujú. Skúste prosím znova." #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "Vyzerá to, že používate NDB Cluster" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 #, fuzzy #| msgid "" #| "MySQL-5.1 no longer provides NDB Cluster support. Please migrate to the " diff --git a/debian/po/sv.po b/debian/po/sv.po index c4cd00786e36..986dbe2a478b 100644 --- a/debian/po/sv.po +++ b/debian/po/sv.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-5.5 5.0.21-3\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2009-09-08 21:42+0100\n" "Last-Translator: Martin Bagge \n" "Language-Team: Swedish \n" @@ -21,19 +21,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "Vill du verkligen genomföra nedgraderingen?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "En fil med namnet /var/lib/mysql/debian-*.flag hittades i systemet." #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "Such a file is an indication that a mysql-server package with a higher " "version has been installed previously." @@ -43,7 +43,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -53,13 +53,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "Viktig information för NIS/YP-användare" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -69,7 +69,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -79,13 +79,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "Ta bort alla MySQL-databaser?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -94,7 +94,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -106,13 +106,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "Ska MySQL startas vid systemets uppstart?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -122,13 +122,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "Nytt lösenord för MySQLs \"root\"-användare:" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -138,25 +138,25 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "Om detta fält lämnas tom kommer lösenordet inte att ändras." #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 msgid "Repeat password for the MySQL \"root\" user:" msgstr "Repetera lösenordet för MySQLs \"root\"-användare:" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "Kunde inte sätta lösenord för MySQLs \"root\"-användare" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -169,13 +169,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "Du bör kontrollera kontots lösenord efter installationen av paketet." #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 #, fuzzy #| msgid "" #| "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for " @@ -188,25 +188,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "Fel vid inmatning av lösenord" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "De tvÃ¥ lösenorden du angav stämde inte överrens. Prova igen." #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "NDB-kluster används inte" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 #, fuzzy #| msgid "" #| "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the " diff --git a/debian/po/templates.pot b/debian/po/templates.pot index aecd15118852..8c10eca2d3ff 100644 --- a/debian/po/templates.pot +++ b/debian/po/templates.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Project-Id-Version: mysql-wsrep-5.5\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,19 +19,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "Such a file is an indication that a mysql-server package with a higher " "version has been installed previously." @@ -39,7 +39,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -47,13 +47,13 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "Important note for NIS/YP users" msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -61,7 +61,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -69,13 +69,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -83,7 +83,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -92,13 +92,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "Start the MySQL server on boot?" msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 msgid "" "The MySQL server can be launched automatically at boot time or manually with " "the '/etc/init.d/mysql start' command." @@ -106,13 +106,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -120,25 +120,25 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 msgid "Repeat password for the MySQL \"root\" user:" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -147,13 +147,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " "information." @@ -161,25 +161,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "" "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " "mysql-cluster-server package and remove all lines starting with \"ndb\" from " diff --git a/debian/po/tr.po b/debian/po/tr.po index d1c32951a5a1..cebc29a87e2e 100644 --- a/debian/po/tr.po +++ b/debian/po/tr.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: mysql-dfsg-4.1\n" -"Report-Msgid-Bugs-To: mysql-5.5@packages.debian.org\n" -"POT-Creation-Date: 2011-11-08 11:42-0800\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.5@packages.debian.org\n" +"POT-Creation-Date: 2015-02-20 11:30+0200\n" "PO-Revision-Date: 2004-06-05 08:53+0300\n" "Last-Translator: Gürkan Aslan \n" "Language-Team: Turkish \n" @@ -18,19 +18,19 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "Really proceed with downgrade?" msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "Such a file is an indication that a mysql-server package with a higher " "version has been installed previously." @@ -38,7 +38,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:2001 +#: ../mysql-wsrep-server-5.5.templates:2001 msgid "" "There is no guarantee that the version you're currently installing will be " "able to use the current databases." @@ -46,7 +46,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 #, fuzzy #| msgid "Important note for NIS/YP users!" msgid "Important note for NIS/YP users" @@ -54,7 +54,7 @@ msgstr "NIS/YP kullanıcıları için önemli not!" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "Using MySQL under NIS/YP requires a mysql user account to be added on the " "local system with:" @@ -62,7 +62,7 @@ msgstr "" #. Type: note #. Description -#: ../mysql-server-5.5.templates:3001 +#: ../mysql-wsrep-server-5.5.templates:3001 msgid "" "You should also check the permissions and ownership of the /var/lib/mysql " "directory:" @@ -70,13 +70,13 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "Remove all MySQL databases?" msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "The /var/lib/mysql directory which contains the MySQL databases is about to " "be removed." @@ -84,7 +84,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:4001 +#: ../mysql-wsrep-server-5.5.templates:4001 msgid "" "If you're removing the MySQL package in order to later install a more recent " "version or if a different mysql-server package is already using it, the data " @@ -93,7 +93,7 @@ msgstr "" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 #, fuzzy #| msgid "Should MySQL start on boot?" msgid "Start the MySQL server on boot?" @@ -101,7 +101,7 @@ msgstr "MySQL açılış sırasında baÅŸlatılsın mı?" #. Type: boolean #. Description -#: ../mysql-server-5.5.templates:5001 +#: ../mysql-wsrep-server-5.5.templates:5001 #, fuzzy msgid "" "The MySQL server can be launched automatically at boot time or manually with " @@ -113,13 +113,13 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "New password for the MySQL \"root\" user:" msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "" "While not mandatory, it is highly recommended that you set a password for " "the MySQL administrative \"root\" user." @@ -127,25 +127,25 @@ msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:6001 +#: ../mysql-wsrep-server-5.5.templates:6001 msgid "If this field is left blank, the password will not be changed." msgstr "" #. Type: password #. Description -#: ../mysql-server-5.5.templates:7001 +#: ../mysql-wsrep-server-5.5.templates:7001 msgid "Repeat password for the MySQL \"root\" user:" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "Unable to set password for the MySQL \"root\" user" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "An error occurred while setting the password for the MySQL administrative " "user. This may have happened because the account already has a password, or " @@ -154,13 +154,13 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "You should check the account's password after the package installation." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:8001 +#: ../mysql-wsrep-server-5.5.templates:8001 msgid "" "Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more " "information." @@ -168,25 +168,25 @@ msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:9001 +#: ../mysql-wsrep-server-5.5.templates:9001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "NDB Cluster seems to be in use" msgstr "" #. Type: error #. Description -#: ../mysql-server-5.5.templates:10001 +#: ../mysql-wsrep-server-5.5.templates:10001 msgid "" "MySQL-5.5 no longer provides NDB Cluster support. Please migrate to the new " "mysql-cluster-server package and remove all lines starting with \"ndb\" from " diff --git a/debian/rules b/debian/rules index ae173bd87413..56fcf85f457a 100755 --- a/debian/rules +++ b/debian/rules @@ -3,7 +3,7 @@ export DH_VERBOSE=1 export DEB_BUILD_HARDENING=1 -PACKAGE=mysql-5.5 +PACKAGE=mysql-wsrep-5.5 TMP=$(CURDIR)/debian/tmp/ @@ -34,12 +34,12 @@ endif MAKE_TEST_TARGET=test-force ifneq ($(findstring fulltest,$(DEB_BUILD_OPTIONS)),) -# make test-bt is the testsuite run by the MySQL build team +# make test-bt is the testsuite run by the MySQL build team # before a release, but it is long MAKE_TEST_TARGET=test-bt endif -USE_ASSEMBLER=--enable-assembler +USE_ASSEMBLER=--enable-assembler ifneq (,$(filter $(ARCH), amd64 i386)) TESTSUITE_FAIL_CMD=exit 1 @@ -51,25 +51,13 @@ BUILDDIR = builddir BUILDDIR_PIC = builddir-pic builddir = $(if $(findstring -pic,$@),$(BUILDDIR_PIC),$(BUILDDIR)) -# This causes seg11 crashes if LDAP is used for groups in /etc/nsswitch.conf -# so it is disabled by default although, according to MySQL, it brings >10% -# performance gain if enabled. See #299382. -ifeq ($(STATIC_MYSQLD), 1) - USE_STATIC_MYSQLD=--with-mysqld-ldflags=-all-static -endif - - -configure-stamp-pic: FORCE_FPIC_CFLAGS=-fPIC -configure-stamp-pic: FORCE_FPIC=-DWITH_PIC=On -DINSTALL_LIBDIR=lib/mysql -configure: patch configure-stamp -configure-pic: patch configure-stamp-pic -configure-stamp configure-stamp-pic: +configure: patch @echo "RULES.$@" dh_testdir ifneq ($(ARCH_OS),hurd) - if [ ! -d /proc/self ]; then echo "/proc IS NEEDED" 1>&2; exit 1; fi + if [ ! -d /proc/self ]; then echo "/proc IS NEEDED" 1>&2; exit 1; fi endif ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \ @@ -83,10 +71,10 @@ endif $(FORCE_FPIC) \ -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ -DMYSQL_USER=mysql \ + -DWITH_WSREP=1 \ -DWITH_LIBWRAP=ON \ -DWITH_READLINE=OFF \ -DWITH_LIBEDIT=OFF \ - $(USE_STATIC_MYSQLD) \ -DWITH_SSL=yes \ -DCOMPILATION_COMMENT="($(DISTRIBUTION))" \ -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \ @@ -100,20 +88,20 @@ endif -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \ -DWITH_FEDERATED_STORAGE_ENGINE=ON \ -DWITH_EXTRA_CHARSETS=all ..' - + # --sysconfdir=/etc/mysql -- Appends /etc/mysql after ~/ in the my.cnf search patch! # # --with-debug - + touch $@ -build: build-stamp build-stamp-pic +build: build-stamp build-stamp: configure @echo "RULES.$@" dh_testdir - + [ -f $(EXPORTED_SOURCE_TARBALL) ] || tar -zcf $(EXPORTED_SOURCE_TARBALL) \ --exclude=debian . \ --transform="s,^\./,mysql-5.5/," @@ -155,22 +143,22 @@ build-stamp-pic: configure-pic $(MAKE_PIC) -C scripts # Build libmysqld itself $(MAKE_PIC) -C libmysqld - + touch $@ clean: clean-patched unpatch rm -rf debian/patched clean-patched: @echo "RULES.clean-patched" - dh_testdir + dh_testdir dh_testroot rm -f configure-stamp* rm -f build-stamp* rm -f testsuite-stamp - + [ ! -f Makefile ] || $(MAKE) clean [ ! -d mysql-test/var ] || rm -rf mysql-test/var - + rm -rf $(BUILDDIR) $(BUILDDIR_PIC) debconf-updatepo @@ -178,8 +166,7 @@ clean-patched: dh_clean -v -install: -install install-pic: build +install: build @echo "RULES.$@" dh_testdir dh_testroot @@ -196,7 +183,7 @@ install install-pic: build # make install (trailing slash needed for innobase) cd $(builddir) && $(MAKE) install DESTDIR=$(TMP)/ - + # After installing, remove rpath to make lintian happy. set +e; \ find ./debian/tmp/ -type f -print0 \ @@ -214,7 +201,7 @@ install install-pic: build #if [ "`objdump -T $(TMP)/usr/lib/libmysqlclient.so.16.0.0 | grep -c libmysqlclient_16`" -lt 500 ]; then \ # echo "ERROR: versioned symbols are absent"; \ # exit 1; \ - #fi + #fi # libmysqlclient_r is now a symlink to libmysqlclient. But it is # created wrong by the cmake build system and points at # libmysqlclient.so instead of the corresponding versioned lib. @@ -258,6 +245,11 @@ install install-pic: build install -m 0755 debian/additions/debian-start $(TMP)/etc/mysql/ install -m 0755 debian/additions/debian-start.inc.sh $(TMP)/usr/share/mysql/ + # Install wsrep specific stuff + install -m 0644 Docs/README-wsrep $(TMP)/usr/share/doc/mysql-server-5.5 + install -m 0644 support-files/wsrep.cnf $(TMP)/usr/share/mysql + install -D -m 0755 $(builddir)/support-files/mysql.server $(TMP)/etc/init.d/mysql + # install AppArmor profile install -D -m 644 debian/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mysqld # install Apport hook @@ -268,7 +260,7 @@ install install-pic: build install -D -m 0644 $(EXPORTED_SOURCE_TARBALL) $(TMP)/usr/src/mysql/`basename $(EXPORTED_SOURCE_TARBALL)` dh_movefiles - + # Build architecture-independent files here. binary-indep: build install @echo "RULES.binary-indep" @@ -280,7 +272,7 @@ binary-indep: build install dh_installmenu -i dh_installlogrotate -i dh_installinit -i - dh_installcron -i + dh_installcron -i dh_installman -i dh_installinfo -i dh_installlogcheck -i @@ -293,11 +285,11 @@ binary-indep: build install dh_gencontrol -i dh_md5sums -i dh_builddeb -i - + # Build architecture-dependent files here. binary-arch: build install @echo "RULES.binary-arch" - dh_testdir + dh_testdir dh_testroot dh_installdebconf -a @@ -333,6 +325,11 @@ binary-arch: build install source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false +override_dh_strip: + dh_strip --dbg-package=mysql-wsrep-server-5.5-dbg + dh_strip --dbg-package=mysql-wsrep-client-5.5-dbg + dh_strip --dbg-package=mysql-wsrep-libmysqlclient18-dbg + binary: binary-indep binary-arch get-orig-source: From 15ef6b3cd09c42542b883f304f842a3eb37d548d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Fri, 20 Feb 2015 15:43:13 +0200 Subject: [PATCH 018/305] Applied buildfixes.patch from Teemu Ollakka --- debian/control | 2 +- debian/rules | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index bb0a4253308b..b1f4d34d9cc2 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian MySQL Maintainers Uploaders: Norbert Tretkowski , Clint Byrum -Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper (>= 8.1.3~), file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), libreadline-dev, psmisc, po-debconf, chrpath, doxygen-latex, ghostscript, gawk, bison, lsb-release, hardening-wrapper, cmake, gcc-4.5, g++-4.5, dh-apparmor +Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper (>= 8.1.3~), file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), libreadline-dev, psmisc, po-debconf, chrpath, doxygen-latex, ghostscript, gawk, bison, lsb-release, hardening-wrapper, cmake, gcc, g++, dh-apparmor Standards-Version: 3.9.2 Homepage: http://dev.mysql.com/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-mysql/mysql-5.5/ diff --git a/debian/rules b/debian/rules index 56fcf85f457a..07a66da64ca3 100755 --- a/debian/rules +++ b/debian/rules @@ -13,8 +13,8 @@ DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEBVERSION = $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }' | sed 's/^.*-//' ) -export MYSQL_BUILD_CC=$(DEB_HOST_GNU_TYPE)-gcc-4.5 -export MYSQL_BUILD_CXX=$(DEB_HOST_GNU_TYPE)-g++-4.5 +# export MYSQL_BUILD_CC=$(DEB_HOST_GNU_TYPE)-gcc-4.5 +# export MYSQL_BUILD_CXX=$(DEB_HOST_GNU_TYPE)-g++-4.5 DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':')) DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') @@ -82,7 +82,7 @@ endif -DINSTALL_LAYOUT=RPM \ -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \ -DINSTALL_PLUGINDIR=lib/mysql/plugin \ - -DWITH_EMBEDDED_SERVER=ON \ + -DWITH_EMBEDDED_SERVER=OFF \ -DHAVE_EMBEDDED_PRIVILEGE_CONTROL=ON \ -DWITH_ARCHIVE_STORAGE_ENGINE=ON \ -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \ From 24a19cc079ecf53fd3d25a95af949e683ed031f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Fri, 20 Feb 2015 15:51:40 +0200 Subject: [PATCH 019/305] Remove PIC installation lines --- debian/rules | 9 --------- 1 file changed, 9 deletions(-) diff --git a/debian/rules b/debian/rules index 07a66da64ca3..4bc6fb164721 100755 --- a/debian/rules +++ b/debian/rules @@ -210,15 +210,6 @@ install: build ln -sf `basename $$i` $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/$$rlib ;\ done - # libmysqlclient-dev: forgotten header file since 3.23.25? - #cp $(BUILDDIR)/include/my_config.h $(TMP)/usr/include/mysql/ - #cp include/my_dir.h $(TMP)/usr/include/mysql/ - # install libmysqld built with -FPIC - install -d -m 0755 -o root -g root $(TMP)/usr/lib/mysql - install -m 0644 -o root -g root $(BUILDDIR_PIC)/libmysqld/libmysqld.a $(TMP)/usr/lib/mysql/libmysqld_pic.a - # mysql_config won't report the -fPIC, so give libmysqld-pic users a way to get their flags - install -m 0755 -o root -g root $(BUILDDIR_PIC)/scripts/mysql_config $(TMP)/usr/bin/mysql_config_pic - # mysql-common: We now provide our own config file. install -d $(TMP)/etc/mysql install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf From 7f01bd14d597b3ea1ef633b49da2389845703dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Fri, 20 Feb 2015 16:29:14 +0200 Subject: [PATCH 020/305] Minor adjustments in packaging to match actual file locations --- debian/control | 2 +- debian/mysql-wsrep-server-5.5.files | 2 +- debian/rules | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index b1f4d34d9cc2..5c55b4afb23d 100644 --- a/debian/control +++ b/debian/control @@ -93,7 +93,7 @@ Pre-Depends: mysql-wsrep-common (>= ${source:Version}), adduser (>= 3.40), debco Depends: mysql-wsrep-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), upstart (>= 0.6.7-2) Breaks: mysql-server (<< ${source:Version}), libmysqlclient-dev Provides: virtual-mysql-server -Replaces: mysql-server (<< ${source:Version}, libmysqlclient-dev +Replaces: mysql-server (<< ${source:Version}), libmysqlclient-dev Description: MySQL database server binaries and system database setup MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query diff --git a/debian/mysql-wsrep-server-5.5.files b/debian/mysql-wsrep-server-5.5.files index ace91fb5f906..3d348f390b6f 100644 --- a/debian/mysql-wsrep-server-5.5.files +++ b/debian/mysql-wsrep-server-5.5.files @@ -1,5 +1,5 @@ etc/apparmor.d/usr.sbin.mysqld -usr/share/apport/package-hooks/source_mysql-5.5.py +usr/share/apport/package-hooks/source_mysql-wsrep-5.5.py usr/lib/mysql/*so* usr/lib/mysql/plugin/*.so etc/mysql/debian-start diff --git a/debian/rules b/debian/rules index 4bc6fb164721..c98ddd067e50 100755 --- a/debian/rules +++ b/debian/rules @@ -238,13 +238,13 @@ install: build # Install wsrep specific stuff install -m 0644 Docs/README-wsrep $(TMP)/usr/share/doc/mysql-server-5.5 - install -m 0644 support-files/wsrep.cnf $(TMP)/usr/share/mysql + install -m 0644 $(builddir)/support-files/wsrep.cnf $(TMP)/usr/share/mysql install -D -m 0755 $(builddir)/support-files/mysql.server $(TMP)/etc/init.d/mysql # install AppArmor profile install -D -m 644 debian/apparmor-profile $(TMP)/etc/apparmor.d/usr.sbin.mysqld # install Apport hook - install -D -m 644 debian/mysql-server-5.5.py $(TMP)/usr/share/apport/package-hooks/source_mysql-5.5.py + install -D -m 644 debian/mysql-wsrep-server-5.5.py $(TMP)/usr/share/apport/package-hooks/source_mysql-wsrep-5.5.py install -D -m 0644 $(EXPORTED_SOURCE_TARBALL) $(TMP)/usr/src/mysql/`basename $(EXPORTED_SOURCE_TARBALL)` From 300c4e577830785178838f4de01750700a09f38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Fri, 20 Feb 2015 21:39:29 +0200 Subject: [PATCH 021/305] Added wsrep files to Debian filelists --- debian/mysql-wsrep-server-5.5.files | 6 ++++++ debian/mysql-wsrep-testsuite-5.5.dirs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/debian/mysql-wsrep-server-5.5.files b/debian/mysql-wsrep-server-5.5.files index 3d348f390b6f..0560be85c540 100644 --- a/debian/mysql-wsrep-server-5.5.files +++ b/debian/mysql-wsrep-server-5.5.files @@ -93,3 +93,9 @@ usr/share/mysql/slovak usr/share/mysql/spanish usr/share/mysql/swedish usr/share/mysql/ukrainian +usr/bin/wsrep_sst_common +usr/bin/wsrep_sst_mysqldump +usr/bin/wsrep_sst_rsync +usr/bin/wsrep_sst_xtrabackup +usr/share/mysql/wsrep.cnf +usr/share/mysql/wsrep_notify diff --git a/debian/mysql-wsrep-testsuite-5.5.dirs b/debian/mysql-wsrep-testsuite-5.5.dirs index c2de800162ce..e63769243046 100644 --- a/debian/mysql-wsrep-testsuite-5.5.dirs +++ b/debian/mysql-wsrep-testsuite-5.5.dirs @@ -1 +1,4 @@ /usr/lib/mysql-testsuite +usr/share/mysql/mysql-test/suite/wsrep +usr/share/mysql/mysql-test/suite/wsrep/t +usr/share/mysql/mysql-test/suite/wsrep/r From 710ff9f957fbd6965787261c0d60e3e012812f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Fri, 20 Feb 2015 22:22:32 +0200 Subject: [PATCH 022/305] Wrap and sort --- debian/control | 62 +++++++++++++++++++++----- debian/copyright | 110 +++++++++++++++++++++++------------------------ 2 files changed, 106 insertions(+), 66 deletions(-) diff --git a/debian/control b/debian/control index 5c55b4afb23d..542b3f5326a6 100644 --- a/debian/control +++ b/debian/control @@ -3,8 +3,30 @@ Section: database Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian MySQL Maintainers -Uploaders: Norbert Tretkowski , Clint Byrum -Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper (>= 8.1.3~), file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), libreadline-dev, psmisc, po-debconf, chrpath, doxygen-latex, ghostscript, gawk, bison, lsb-release, hardening-wrapper, cmake, gcc, g++, dh-apparmor +Uploaders: Norbert Tretkowski , + Clint Byrum +Build-Depends: bison, + chrpath, + cmake, + debhelper (>= 8.1.3~), + dh-apparmor, + doxygen-latex, + file (>= 3.28), + g++, + gawk, + gcc, + ghostscript, + hardening-wrapper, + libncurses5-dev (>= 5.0-6), + libreadline-dev, + libtool (>= 1.4.2-7), + libwrap0-dev (>= 7.6-8.3), + lsb-release, + perl (>= 5.6.0), + po-debconf, + procps | hurd, + psmisc, + zlib1g-dev (>= 1:1.1.3-5) Standards-Version: 3.9.2 Homepage: http://dev.mysql.com/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-mysql/mysql-5.5/ @@ -13,7 +35,9 @@ Vcs-Svn: svn://svn.debian.org/svn/pkg-mysql/mysql-5.5/ Package: mysql-wsrep-libmysqlclient18 Section: libs Architecture: any -Depends: mysql-wsrep-common (>= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} +Depends: mysql-wsrep-common (>= ${source:Version}), + ${misc:Depends}, + ${shlibs:Depends} Pre-Depends: multiarch-support, ${misc:Pre-Depends} Replaces: libmysqlclient18 Provides: libmysqlclient18 @@ -50,7 +74,7 @@ Description: MySQL database development files Package: mysql-wsrep-common Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} Multi-Arch: foreign Provides: mysql-common Replaces: mysql-common @@ -65,8 +89,16 @@ Description: MySQL database common files, e.g. /etc/mysql/my.cnf Package: mysql-wsrep-client-5.5 Architecture: any -Depends: debianutils (>=1.6), libdbi-perl, libdbd-mysql-perl (>= 1.2202), mysql-wsrep-common (>= ${source:Version}), mysql-wsrep-libmysqlclient18, ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}, libterm-readkey-perl -Provides: virtual-mysql-client, mysql-client +Depends: debianutils (>=1.6), + libdbd-mysql-perl (>= 1.2202), + libdbi-perl, + libterm-readkey-perl, + mysql-wsrep-common (>= ${source:Version}), + mysql-wsrep-libmysqlclient18, + ${misc:Depends}, + ${perl:Depends}, + ${shlibs:Depends} +Provides: mysql-client, virtual-mysql-client Breaks: mysql-client (<< ${source:Version}) Replaces: mysql-client (<< ${source:Version}) Description: MySQL database client binaries @@ -87,13 +119,21 @@ Description: MySQL database client binary debugging symbols. Package: mysql-wsrep-server-5.5 Architecture: any -Suggests: tinyca, mailx +Suggests: mailx, tinyca Recommends: libhtml-template-perl Pre-Depends: mysql-wsrep-common (>= ${source:Version}), adduser (>= 3.40), debconf -Depends: mysql-wsrep-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), upstart (>= 0.6.7-2) -Breaks: mysql-server (<< ${source:Version}), libmysqlclient-dev +Depends: libdbi-perl, + lsb-base (>= 3.0-10), + mysql-wsrep-client-5.5 (>= ${source:Version}), + passwd, + perl (>= 5.6), + psmisc, + upstart (>= 0.6.7-2), + ${misc:Depends}, + ${shlibs:Depends} +Breaks: libmysqlclient-dev, mysql-server (<< ${source:Version}) Provides: virtual-mysql-server -Replaces: mysql-server (<< ${source:Version}), libmysqlclient-dev +Replaces: libmysqlclient-dev, mysql-server (<< ${source:Version}) Description: MySQL database server binaries and system database setup MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query @@ -145,7 +185,7 @@ Description: MySQL testsuite Package: mysql-wsrep-testsuite-5.5 Architecture: any -Depends: mysql-server, mysql-client, ${misc:Depends}, ${shlibs:Depends} +Depends: mysql-client, mysql-server, ${misc:Depends}, ${shlibs:Depends} Conflicts: mysql-testsuite (<< ${source:Version}) Description: MySQL testsuite MySQL is a fast, stable, and true multi-user, multi-threaded SQL database diff --git a/debian/copyright b/debian/copyright index a111d7889b58..cd06e3a847a6 100644 --- a/debian/copyright +++ b/debian/copyright @@ -3,7 +3,7 @@ Upstream-Name: MySQL 5.5 Upstream-Contact: http://bugs.mysql.com/ Source: http://dev.mysql.com/downloads/mysql/5.5.html Comments: originally produced by a modified version of licensecheck2dep5 - from CDBS by Clint Byrum . Hand modified to reduce + from CDBS by Clint Byrum . Hand modified to reduce redundancy in the output and add appropriate license text. . Also, MySQL carries the "FOSS License Exception" specified in README @@ -60,7 +60,7 @@ Comments: originally produced by a modified version of licensecheck2dep5 > . > "Program" means a copy of Oracle¿s MySQL Client Libraries that > contains a FOSS Notice. - > . + > . > A FOSS application developer ("you" or "your") may distribute a > Derivative Work provided that you and the Derivative Work meet all > of the following conditions: You obey the GPL in all respects for @@ -82,7 +82,7 @@ Comments: originally produced by a modified version of licensecheck2dep5 > does not apply to you or your Derivative Work. > . > FOSS License List - > . + > . > License Name Version(s)/Copyright Date > Release Early Certified Software > Academic Free License 2.0 @@ -152,11 +152,11 @@ Comment: These files fall under the blanket license specified in the file License: GPL-2 GPLv2 Disclaimer For the avoidance of doubt, except that if any license choice - other than GPL or LGPL is available it will apply instead, - Oracle elects to use only the General Public License version 2 - (GPLv2) at this time for any software where a choice of GPL - license versions is made available with the language indicating - that GPLv2 or any later version may be used, or where a choice + other than GPL or LGPL is available it will apply instead, + Oracle elects to use only the General Public License version 2 + (GPLv2) at this time for any software where a choice of GPL + license versions is made available with the language indicating + that GPLv2 or any later version may be used, or where a choice of which version of the GPL is applied is otherwise unspecified. Files: BUILD/* @@ -484,29 +484,29 @@ Files: dbug/dbug.c dbug/dbug_long.h Copyright: 1987 Abandoned Fred Fish License: UNKNOWN - N O T I C E + N O T I C E . - Copyright Abandoned, 1987, Fred Fish + Copyright Abandoned, 1987, Fred Fish . . - This previously copyrighted work has been placed into the public - domain by the author and may be freely used for any purpose, - private or commercial. + This previously copyrighted work has been placed into the public + domain by the author and may be freely used for any purpose, + private or commercial. . - Because of the number of inquiries I was receiving about the use - of this product in commercially developed works I have decided to - simply make it public domain to further its unrestricted use. I - specifically would be most happy to see this material become a - part of the standard Unix distributions by AT&T and the Berkeley - Computer Science Research Group, and a standard part of the GNU - system from the Free Software Foundation. + Because of the number of inquiries I was receiving about the use + of this product in commercially developed works I have decided to + simply make it public domain to further its unrestricted use. I + specifically would be most happy to see this material become a + part of the standard Unix distributions by AT&T and the Berkeley + Computer Science Research Group, and a standard part of the GNU + system from the Free Software Foundation. . - I would appreciate it, as a courtesy, if this notice is left in - all copies and derivative works. Thank you. + I would appreciate it, as a courtesy, if this notice is left in + all copies and derivative works. Thank you. . - The author makes no warranty of any kind with respect to this - product and explicitly disclaims any implied warranties of mer- - chantability or fitness for any particular purpose. + The author makes no warranty of any kind with respect to this + product and explicitly disclaims any implied warranties of mer- + chantability or fitness for any particular purpose. Files: cmd-line-utils/libedit/np/vis.c Copyright: 1989-1993 The Regents of the University of California. @@ -562,35 +562,35 @@ License: BSD (3 clause) GPL-2 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ . Copyright (c) 1997, 1999 Kungliga Tekniska Högskolan - (Royal Institute of Technology, Stockholm, Sweden). - All rights reserved. - . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - . - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - . - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - 3. Neither the name of the Institute nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. + (Royal Institute of Technology, Stockholm, Sweden). + All rights reserved. + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + 3. Neither the name of the Institute nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. Files: storage/innobase/handler/ha_innodb.cc Copyright: 2008-2009 Google Inc @@ -647,7 +647,7 @@ License: SWsoft This material is provided "as is", with absolutely no warranty expressed or implied. Any use is at your own risk. . - Permission to use or copy this software for any purpose is hereby granted + Permission to use or copy this software for any purpose is hereby granted without fee, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was From f7a4aa133597bc5b9538cefc128e38251b10b685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Fri, 20 Feb 2015 23:11:52 +0200 Subject: [PATCH 023/305] Added git-buildpackage configuration file Compatible with branch names in Otto's mysql-wsrep clone --- debian/gbp.conf | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 debian/gbp.conf diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 000000000000..9985daf383f4 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,6 @@ +[DEFAULT] +# native package configuration +debian-branch = 5.5-debian +upstream-branch = 5.5-debian +upstream-tree = branch +pristine-tar = False From 2cc4fef7eb24486888b213943e8d96feabdb6252 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 25 Feb 2015 01:53:27 -0800 Subject: [PATCH 024/305] MTR Tests: Adjust 5.5 tests to run with the wsrep patch applied (wsrep provider not loaded). --- mysql-test/include/mysqld--help.inc | 4 + mysql-test/r/mysqld--help-notwin.result | 126 ++++++++++++++++++ .../suite/innodb/r/innodb-autoinc.result | 64 +++------ mysql-test/suite/innodb/t/innodb-autoinc.test | 44 +++--- mysql-test/suite/perfschema/t/disabled.def | 2 + mysql-test/suite/sys_vars/r/all_vars.result | 4 +- mysql-test/suite/sys_vars/t/all_vars.test | 4 +- mysql-test/suite/sys_vars/t/disabled.def | 3 +- 8 files changed, 182 insertions(+), 69 deletions(-) diff --git a/mysql-test/include/mysqld--help.inc b/mysql-test/include/mysqld--help.inc index 380a7f6c8cfa..b96bb42ca9f3 100644 --- a/mysql-test/include/mysqld--help.inc +++ b/mysql-test/include/mysqld--help.inc @@ -39,6 +39,10 @@ perl; next if /Value \(after reading options\)/; # skip table header next if /^($re1) /; next if /^($re2)-/; + + next if /WSREP: Service disconnected/; + next if /WSREP: Some threads may fail to exit/; + $skip=0 if /^ -/; $skip=1 if / --($re2)\b/; y!\\!/!; diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result index d527d6cb7027..7817a5004f3f 100644 --- a/mysql-test/r/mysqld--help-notwin.result +++ b/mysql-test/r/mysqld--help-notwin.result @@ -740,6 +740,93 @@ The following options may be given as the first argument: -V, --version Output version information and exit. --wait-timeout=# The number of seconds the server waits for activity on a connection before closing it + --wsrep-OSU-method[=name] + Method for Online Schema Upgrade + --wsrep-auto-increment-control + To automatically control the assignment of autoincrement + variables + (Defaults to on; use --skip-wsrep-auto-increment-control to disable.) + --wsrep-causal-reads + (DEPRECATED) setting this variable is equivalent to + setting wsrep_sync_wait READ flag + --wsrep-certify-nonPK + Certify tables with no primary key + (Defaults to on; use --skip-wsrep-certify-nonPK to disable.) + --wsrep-cluster-address=name + Address to initially connect to cluster + --wsrep-cluster-name=name + Name for the cluster + --wsrep-convert-LOCK-to-trx + To convert locking sessions into transactions + --wsrep-data-home-dir=name + home directory for wsrep provider + --wsrep-dbug-option=name + DBUG options to provider library + --wsrep-debug To enable debug level logging + --wsrep-desync To desynchronize the node from the cluster + --wsrep-drupal-282555-workaround + To use a workaround forbad autoincrement value + --wsrep-forced-binlog-format=name + binlog format to take effect over user's choice + --wsrep-load-data-splitting + To commit LOAD DATA transaction after every 10K rows + inserted + (Defaults to on; use --skip-wsrep-load-data-splitting to disable.) + --wsrep-log-conflicts + To log multi-master conflicts + --wsrep-max-ws-rows=# + Max number of rows in write set + --wsrep-max-ws-size=# + Max write set size (bytes) + --wsrep-mysql-replication-bundle=# + mysql replication group commit + --wsrep-node-address=name + Node address + --wsrep-node-incoming-address=name + Client connection address + --wsrep-node-name=name + Node name + --wsrep-notify-cmd=name + --wsrep-on To enable wsrep replication + (Defaults to on; use --skip-wsrep-on to disable.) + --wsrep-provider=name + Path to replication provider library + --wsrep-provider-options=name + provider specific options + --wsrep-recover Recover database state after crash and exit + --wsrep-replicate-myisam + To enable myisam replication + --wsrep-restart-slave + Should MySQL slave be restarted automatically, when node + joins back to cluster + --wsrep-retry-autocommit=# + Max number of times to retry a failed autocommit + statement + --wsrep-slave-FK-checks + Should slave thread do foreign key constraint checks + (Defaults to on; use --skip-wsrep-slave-FK-checks to disable.) + --wsrep-slave-UK-checks + Should slave thread do secondary index uniqueness chesks + --wsrep-slave-threads=# + Number of slave appliers to launch + --wsrep-sst-auth=name + Authentication for SST connection + --wsrep-sst-donor=name + preferred donor node for the SST + --wsrep-sst-donor-rejects-queries + Reject client queries when donating state snapshot + transfer + --wsrep-sst-method=name + State snapshot transfer method + --wsrep-sst-receive-address=name + Address where node is waiting for SST contact + --wsrep-start-position=name + global transaction position to start from + --wsrep-sync-wait[=#] + Ensure "synchronous" read view before executing an + operation of the type specified by bitmask: 1 - + READ(includes SELECT, SHOW and BEGIN/START TRANSACTION); + 2 - UPDATE and DELETE; 4 - INSERT and REPLACE Variables (--variable-name=value) abort-slave-event-count 0 @@ -967,6 +1054,45 @@ transaction-prealloc-size 4096 updatable-views-with-limit YES verbose TRUE wait-timeout 28800 +wsrep-OSU-method TOI +wsrep-auto-increment-control TRUE +wsrep-causal-reads FALSE +wsrep-certify-nonPK TRUE +wsrep-cluster-address +wsrep-cluster-name my_wsrep_cluster +wsrep-convert-LOCK-to-trx FALSE +wsrep-data-home-dir +wsrep-dbug-option +wsrep-debug FALSE +wsrep-desync FALSE +wsrep-drupal-282555-workaround FALSE +wsrep-forced-binlog-format NONE +wsrep-load-data-splitting TRUE +wsrep-log-conflicts FALSE +wsrep-max-ws-rows 131072 +wsrep-max-ws-size 1073741824 +wsrep-mysql-replication-bundle 0 +wsrep-node-address +wsrep-node-incoming-address AUTO +wsrep-node-name localhost.localdomain +wsrep-notify-cmd +wsrep-on FALSE +wsrep-provider none +wsrep-provider-options +wsrep-recover FALSE +wsrep-replicate-myisam FALSE +wsrep-restart-slave FALSE +wsrep-retry-autocommit 1 +wsrep-slave-FK-checks TRUE +wsrep-slave-UK-checks FALSE +wsrep-slave-threads 1 +wsrep-sst-auth (No default value) +wsrep-sst-donor +wsrep-sst-donor-rejects-queries FALSE +wsrep-sst-method rsync +wsrep-sst-receive-address AUTO + 00000000-0000-0000-0000-000000000000:-1 +wsrep-sync-wait 0 To see what values a running MySQL server is using, type 'mysqladmin variables' instead of 'mysqld --verbose --help'. diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result index 6a9106cbbb43..7243431062ad 100644 --- a/mysql-test/suite/innodb/r/innodb-autoinc.result +++ b/mysql-test/suite/innodb/r/innodb-autoinc.result @@ -197,11 +197,10 @@ c1 c2 5 9 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 100 auto_increment_offset 10 -wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -231,11 +230,10 @@ c1 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 -wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -271,11 +269,10 @@ c1 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 -wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -285,11 +282,10 @@ SELECT * FROM t1; c1 -1 SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 100 auto_increment_offset 10 -wsrep_auto_increment_control ON INSERT INTO t1 VALUES (-2), (NULL),(2),(NULL); INSERT INTO t1 VALUES (250),(NULL); SELECT * FROM t1; @@ -319,11 +315,10 @@ c1 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 -wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -335,11 +330,10 @@ SELECT * FROM t1; c1 1 SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 100 auto_increment_offset 10 -wsrep_auto_increment_control ON INSERT INTO t1 VALUES (-2); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 @@ -376,11 +370,10 @@ c1 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 -wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -392,11 +385,10 @@ SELECT * FROM t1; c1 1 SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 100 auto_increment_offset 10 -wsrep_auto_increment_control ON INSERT INTO t1 VALUES (-2),(NULL),(2),(NULL); Warnings: Warning 1264 Out of range value for column 'c1' at row 1 @@ -427,11 +419,10 @@ c1 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 -wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -443,11 +434,10 @@ c1 1 9223372036854775794 SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 2 auto_increment_offset 10 -wsrep_auto_increment_control ON INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); SELECT * FROM t1; c1 @@ -462,11 +452,10 @@ c1 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 -wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -478,11 +467,10 @@ c1 1 18446744073709551603 SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 2 auto_increment_offset 10 -wsrep_auto_increment_control ON INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); ERROR HY000: Failed to read auto-increment value from storage engine SELECT * FROM t1; @@ -492,11 +480,10 @@ c1 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 -wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -508,11 +495,10 @@ c1 1 18446744073709551603 SET @@SESSION.AUTO_INCREMENT_INCREMENT=5, @@SESSION.AUTO_INCREMENT_OFFSET=7; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 5 auto_increment_offset 7 -wsrep_auto_increment_control ON INSERT INTO t1 VALUES (NULL),(NULL), (NULL); ERROR HY000: Failed to read auto-increment value from storage engine SELECT * FROM t1; @@ -522,11 +508,10 @@ c1 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 -wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -542,11 +527,10 @@ c1 -9223372036854775806 1 SET @@SESSION.AUTO_INCREMENT_INCREMENT=3, @@SESSION.AUTO_INCREMENT_OFFSET=3; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 3 auto_increment_offset 3 -wsrep_auto_increment_control ON INSERT INTO t1 VALUES (NULL),(NULL), (NULL); SELECT * FROM t1; c1 @@ -560,11 +544,10 @@ c1 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 -wsrep_auto_increment_control ON DROP TABLE IF EXISTS t1; Warnings: Note 1051 Unknown table 't1' @@ -579,11 +562,10 @@ SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCRE Warnings: Warning 1292 Truncated incorrect auto_increment_increment value: '1152921504606846976' Warning 1292 Truncated incorrect auto_increment_offset value: '1152921504606846976' -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 65535 auto_increment_offset 65535 -wsrep_auto_increment_control ON INSERT INTO t1 VALUES (NULL),(NULL); ERROR 22003: Out of range value for column 't1' at row 167 SELECT * FROM t1; @@ -593,11 +575,10 @@ c1 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 -wsrep_auto_increment_control ON CREATE TABLE t1 (c1 DOUBLE NOT NULL AUTO_INCREMENT, c2 INT, PRIMARY KEY (c1)) ENGINE=InnoDB; INSERT INTO t1 VALUES(NULL, 1); INSERT INTO t1 VALUES(NULL, 2); @@ -881,11 +862,10 @@ Got one of the listed errors DROP TABLE t1; DROP TABLE t2; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 -wsrep_auto_increment_control ON CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); INSERT INTO t1 VALUES (-1, 'innodb'); @@ -1272,7 +1252,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551615 DEFAULT CHARSET=latin1 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=256; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 256 @@ -1290,7 +1270,7 @@ c1 c2 1 NULL DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; Variable_name Value auto_increment_increment 1 auto_increment_offset 1 diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test index 3d9f5916d8cc..0e28f3dbb50f 100644 --- a/mysql-test/suite/innodb/t/innodb-autoinc.test +++ b/mysql-test/suite/innodb/t/innodb-autoinc.test @@ -156,7 +156,7 @@ DROP TABLE t1; # # Test changes to AUTOINC next value calculation SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; INSERT INTO t1 VALUES (NULL),(5),(NULL); @@ -173,7 +173,7 @@ DROP TABLE t1; # Reset the AUTOINC session variables SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; INSERT INTO t1 VALUES(0); @@ -193,13 +193,13 @@ DROP TABLE t1; # Reset the AUTOINC session variables SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; INSERT INTO t1 VALUES(-1); SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; INSERT INTO t1 VALUES (-2), (NULL),(2),(NULL); INSERT INTO t1 VALUES (250),(NULL); SELECT * FROM t1; @@ -214,13 +214,13 @@ DROP TABLE t1; # Reset the AUTOINC session variables SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; INSERT INTO t1 VALUES(-1); SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; INSERT INTO t1 VALUES (-2); INSERT INTO t1 VALUES (NULL); INSERT INTO t1 VALUES (2); @@ -240,13 +240,13 @@ DROP TABLE t1; # Reset the AUTOINC session variables SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; INSERT INTO t1 VALUES(-1); SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; INSERT INTO t1 VALUES (-2),(NULL),(2),(NULL); INSERT INTO t1 VALUES (250),(NULL); SELECT * FROM t1; @@ -262,7 +262,7 @@ DROP TABLE t1; # Check for overflow handling when increment is > 1 SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 BIGINT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; # TODO: Fix the autoinc init code @@ -271,7 +271,7 @@ INSERT INTO t1 VALUES(NULL); INSERT INTO t1 VALUES (9223372036854775794); #-- 2^63 - 14 SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; # This should just fit INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); SELECT * FROM t1; @@ -281,7 +281,7 @@ DROP TABLE t1; # Check for overflow handling when increment and offser are > 1 SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; # TODO: Fix the autoinc init code @@ -290,7 +290,7 @@ INSERT INTO t1 VALUES(NULL); INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13 SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; --error ER_AUTOINC_READ_FAILED INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); SELECT * FROM t1; @@ -300,7 +300,7 @@ DROP TABLE t1; # Check for overflow handling when increment and offset are odd numbers SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; # TODO: Fix the autoinc init code @@ -309,7 +309,7 @@ INSERT INTO t1 VALUES(NULL); INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13 SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=5, @@SESSION.AUTO_INCREMENT_OFFSET=7; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; --error ER_AUTOINC_READ_FAILED INSERT INTO t1 VALUES (NULL),(NULL), (NULL); SELECT * FROM t1; @@ -319,7 +319,7 @@ DROP TABLE t1; # and check for large -ve numbers SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 BIGINT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; # TODO: Fix the autoinc init code @@ -330,7 +330,7 @@ INSERT INTO t1 VALUES(-9223372036854775807); #-- -2^63 + 1 INSERT INTO t1 VALUES(-9223372036854775808); #-- -2^63 SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=3, @@SESSION.AUTO_INCREMENT_OFFSET=3; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; INSERT INTO t1 VALUES (NULL),(NULL), (NULL); SELECT * FROM t1; DROP TABLE t1; @@ -339,7 +339,7 @@ DROP TABLE t1; # large numbers 2^60 SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; DROP TABLE IF EXISTS t1; CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB; # TODO: Fix the autoinc init code @@ -348,7 +348,7 @@ INSERT INTO t1 VALUES(NULL); INSERT INTO t1 VALUES (18446744073709551610); #-- 2^64 - 2 SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; --error ER_WARN_DATA_OUT_OF_RANGE INSERT INTO t1 VALUES (NULL),(NULL); SELECT * FROM t1; @@ -359,7 +359,7 @@ DROP TABLE t1; # SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; CREATE TABLE t1 (c1 DOUBLE NOT NULL AUTO_INCREMENT, c2 INT, PRIMARY KEY (c1)) ENGINE=InnoDB; INSERT INTO t1 VALUES(NULL, 1); INSERT INTO t1 VALUES(NULL, 2); @@ -445,7 +445,7 @@ DROP TABLE t2; # If the user has specified negative values for an AUTOINC column then # InnoDB should ignore those values when setting the table's max value. SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; # TINYINT CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); @@ -641,7 +641,7 @@ DROP TABLE t1; # Check if we handle offset > column max value properly SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=256; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; # TINYINT CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (1, NULL); @@ -653,7 +653,7 @@ DROP TABLE t1; # of the column. IMO, this should not be allowed and the assertion that fails # is actually an invariant. SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; -SHOW VARIABLES LIKE "%auto_inc%"; +SHOW VARIABLES LIKE "auto_inc%"; # TINYINT CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; INSERT INTO t1 VALUES (2147483648, 'a'); diff --git a/mysql-test/suite/perfschema/t/disabled.def b/mysql-test/suite/perfschema/t/disabled.def index 888298bbb09e..c58cb686da67 100644 --- a/mysql-test/suite/perfschema/t/disabled.def +++ b/mysql-test/suite/perfschema/t/disabled.def @@ -9,3 +9,5 @@ # Do not use any TAB characters for whitespace. # ############################################################################## + +global_read_lock : galera/mysql-wsrep 79 perfschema.global_read_lock test fails sporadically diff --git a/mysql-test/suite/sys_vars/r/all_vars.result b/mysql-test/suite/sys_vars/r/all_vars.result index 0f741ff930a9..93ce05db8b4d 100644 --- a/mysql-test/suite/sys_vars/r/all_vars.result +++ b/mysql-test/suite/sys_vars/r/all_vars.result @@ -1,8 +1,8 @@ create table t1 (test_name text); create table t2 (variable_name text); load data infile "MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t1; -insert into t2 select variable_name from information_schema.global_variables; -insert into t2 select variable_name from information_schema.session_variables; +insert into t2 select variable_name from information_schema.global_variables where variable_name not like 'wsrep_%' and variable_name not like 'innodb_disallow_writes'; +insert into t2 select variable_name from information_schema.session_variables where variable_name not like 'wsrep_%' and variable_name not like 'innodb_disallow_writes'; update t2 set variable_name= replace(variable_name, "PERFORMANCE_SCHEMA_", "PFS_"); select variable_name as `There should be *no* long test name listed below:` from t2 where length(variable_name) > 50; diff --git a/mysql-test/suite/sys_vars/t/all_vars.test b/mysql-test/suite/sys_vars/t/all_vars.test index 2f44ef434935..9c565cb619f7 100644 --- a/mysql-test/suite/sys_vars/t/all_vars.test +++ b/mysql-test/suite/sys_vars/t/all_vars.test @@ -44,8 +44,8 @@ create table t2 (variable_name text); --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval load data infile "$MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t1; -insert into t2 select variable_name from information_schema.global_variables; -insert into t2 select variable_name from information_schema.session_variables; +insert into t2 select variable_name from information_schema.global_variables where variable_name not like 'wsrep_%' and variable_name not like 'innodb_disallow_writes'; +insert into t2 select variable_name from information_schema.session_variables where variable_name not like 'wsrep_%' and variable_name not like 'innodb_disallow_writes'; # Performance schema variables are too long for files named # 'mysql-test/suite/sys_vars/t/' ... diff --git a/mysql-test/suite/sys_vars/t/disabled.def b/mysql-test/suite/sys_vars/t/disabled.def index d00498053156..66b82f8bafff 100644 --- a/mysql-test/suite/sys_vars/t/disabled.def +++ b/mysql-test/suite/sys_vars/t/disabled.def @@ -9,9 +9,10 @@ # Do not use any TAB characters for whitespace. # ############################################################################## +auto_increment_offset_func : galera/mysql-wsrep#78 auto_increment_increment gets reset after ALTER +auto_increment_increment_func : galera/mysql-wsrep#78 auto_increment_increment gets reset after ALTER transaction_prealloc_size_basic_32 : Bug#11748572 transaction_prealloc_size_basic_64 : Bug#11748572 query_cache_size_basic_32 : Bug#13535584 query_cache_size_basic_64 : Bug#11748572 #thread_cache_size_func : Bug#11750172: 2008-11-07 joro main.thread_cache_size_func fails in pushbuild when run with pool of threads - From d7fcc9b9cbad936e303930da8926cb2f0f93c91e Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 25 Feb 2015 03:01:41 -0800 Subject: [PATCH 025/305] MTR Tests: Further adjustments for 5.5 MTR tests to make them Galera-compatible --- mysql-test/extra/binlog_tests/binlog.test | 9 ++++++--- mysql-test/include/mysqld--help.inc | 5 +---- mysql-test/r/mysqld--help-notwin.result | 2 +- mysql-test/suite/binlog/r/binlog_row_binlog.result | 12 +++++++++--- mysql-test/suite/binlog/r/binlog_stm_binlog.result | 12 +++++++++--- mysql-test/t/disabled.def | 2 ++ 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test index c0a8c3f61206..215ffbd0dcb5 100644 --- a/mysql-test/extra/binlog_tests/binlog.test +++ b/mysql-test/extra/binlog_tests/binlog.test @@ -325,7 +325,8 @@ dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA== SELECT * FROM t1; --echo # Their values should be ON -SHOW SESSION VARIABLES LIKE "%_checks"; +SHOW SESSION VARIABLES LIKE "foreign_key_checks"; +SHOW SESSION VARIABLES LIKE "unique_checks"; --echo SET @@SESSION.foreign_key_checks= OFF; @@ -340,7 +341,8 @@ dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== SELECT * FROM t1; --echo # Their values should be OFF -SHOW SESSION VARIABLES LIKE "%_checks"; +SHOW SESSION VARIABLES LIKE "foreign_key_checks"; +SHOW SESSION VARIABLES LIKE "unique_checks"; --echo # INSERT INTO t1 VALUES(2) --echo # foreign_key_checks=1 and unique_checks=1 @@ -354,7 +356,8 @@ dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== SELECT * FROM t1; --echo # Their values should be OFF -SHOW SESSION VARIABLES LIKE "%_checks"; +SHOW SESSION VARIABLES LIKE "foreign_key_checks"; +SHOW SESSION VARIABLES LIKE "unique_checks"; DROP TABLE t1; diff --git a/mysql-test/include/mysqld--help.inc b/mysql-test/include/mysqld--help.inc index b96bb42ca9f3..f0c155b53384 100644 --- a/mysql-test/include/mysqld--help.inc +++ b/mysql-test/include/mysqld--help.inc @@ -8,7 +8,7 @@ # force symbolic-links=0 (valgrind build has a different default) # -exec $MYSQLD_BOOTSTRAP_CMD --symbolic-links=0 --lower-case-table-names=1 --help --verbose > $MYSQL_TMP_DIR/mysqld--help.txt 2>&1; +exec $MYSQLD_BOOTSTRAP_CMD --symbolic-links=0 --lower-case-table-names=1 --help --verbose > $MYSQL_TMP_DIR/mysqld--help.txt; # The inline perl code below will copy $MYSQL_TMP_DIR/mysqld--help.txt # to output, but filter away some variable stuff (e.g. paths). @@ -40,9 +40,6 @@ perl; next if /^($re1) /; next if /^($re2)-/; - next if /WSREP: Service disconnected/; - next if /WSREP: Some threads may fail to exit/; - $skip=0 if /^ -/; $skip=1 if / --($re2)\b/; y!\\!/!; diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result index 7817a5004f3f..47ed46d0179d 100644 --- a/mysql-test/r/mysqld--help-notwin.result +++ b/mysql-test/r/mysqld--help-notwin.result @@ -1091,7 +1091,7 @@ wsrep-sst-donor wsrep-sst-donor-rejects-queries FALSE wsrep-sst-method rsync wsrep-sst-receive-address AUTO - 00000000-0000-0000-0000-000000000000:-1 +wsrep-start-position 00000000-0000-0000-0000-000000000000:-1 wsrep-sync-wait 0 To see what values a running MySQL server is using, type diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index 751056892462..ff2a45679c58 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -1349,9 +1349,11 @@ SELECT * FROM t1; c1 1 # Their values should be ON -SHOW SESSION VARIABLES LIKE "%_checks"; +SHOW SESSION VARIABLES LIKE "foreign_key_checks"; Variable_name Value foreign_key_checks ON +SHOW SESSION VARIABLES LIKE "unique_checks"; +Variable_name Value unique_checks ON SET @@SESSION.foreign_key_checks= OFF; @@ -1367,9 +1369,11 @@ c1 1 2 # Their values should be OFF -SHOW SESSION VARIABLES LIKE "%_checks"; +SHOW SESSION VARIABLES LIKE "foreign_key_checks"; Variable_name Value foreign_key_checks OFF +SHOW SESSION VARIABLES LIKE "unique_checks"; +Variable_name Value unique_checks OFF # INSERT INTO t1 VALUES(2) # foreign_key_checks=1 and unique_checks=1 @@ -1385,8 +1389,10 @@ c1 1 2 # Their values should be OFF -SHOW SESSION VARIABLES LIKE "%_checks"; +SHOW SESSION VARIABLES LIKE "foreign_key_checks"; Variable_name Value foreign_key_checks OFF +SHOW SESSION VARIABLES LIKE "unique_checks"; +Variable_name Value unique_checks OFF DROP TABLE t1; diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index c67f69c738ab..56fb1e4296d0 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -839,9 +839,11 @@ SELECT * FROM t1; c1 1 # Their values should be ON -SHOW SESSION VARIABLES LIKE "%_checks"; +SHOW SESSION VARIABLES LIKE "foreign_key_checks"; Variable_name Value foreign_key_checks ON +SHOW SESSION VARIABLES LIKE "unique_checks"; +Variable_name Value unique_checks ON SET @@SESSION.foreign_key_checks= OFF; @@ -857,9 +859,11 @@ c1 1 2 # Their values should be OFF -SHOW SESSION VARIABLES LIKE "%_checks"; +SHOW SESSION VARIABLES LIKE "foreign_key_checks"; Variable_name Value foreign_key_checks OFF +SHOW SESSION VARIABLES LIKE "unique_checks"; +Variable_name Value unique_checks OFF # INSERT INTO t1 VALUES(2) # foreign_key_checks=1 and unique_checks=1 @@ -875,8 +879,10 @@ c1 1 2 # Their values should be OFF -SHOW SESSION VARIABLES LIKE "%_checks"; +SHOW SESSION VARIABLES LIKE "foreign_key_checks"; Variable_name Value foreign_key_checks OFF +SHOW SESSION VARIABLES LIKE "unique_checks"; +Variable_name Value unique_checks OFF DROP TABLE t1; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 81600642c15e..8ba2538edb60 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -15,3 +15,5 @@ sum_distinct-big : Bug#11764126 2010-11-15 mattiasj was not tested archive-big : Bug#11817185 2011-03-10 Anitha Disabled since this leads to timeout on Solaris Sparc log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836 +file_contents : Codership mysql-wsrep#4 2014-10-28 pstoev main.file_contents MTR test fails in mysql-wsrep +flush_read_lock : Galera mysql-wsrep#80 ALTER TABLE fails under read lock From cfbf3988142bc9f27f9299a1343c2dbcce17174c Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 25 Feb 2015 03:28:30 -0800 Subject: [PATCH 026/305] MTR Tests: remove variable output from mysqld--help-notwin.test --- mysql-test/include/mysqld--help.inc | 2 ++ mysql-test/r/mysqld--help-notwin.result | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/include/mysqld--help.inc b/mysql-test/include/mysqld--help.inc index f0c155b53384..e411d7b9cb85 100644 --- a/mysql-test/include/mysqld--help.inc +++ b/mysql-test/include/mysqld--help.inc @@ -40,6 +40,8 @@ perl; next if /^($re1) /; next if /^($re2)-/; + next if /wsrep-node-name/; + $skip=0 if /^ -/; $skip=1 if / --($re2)\b/; y!\\!/!; diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result index 47ed46d0179d..5dfa768200a4 100644 --- a/mysql-test/r/mysqld--help-notwin.result +++ b/mysql-test/r/mysqld--help-notwin.result @@ -784,7 +784,6 @@ The following options may be given as the first argument: Node address --wsrep-node-incoming-address=name Client connection address - --wsrep-node-name=name Node name --wsrep-notify-cmd=name --wsrep-on To enable wsrep replication @@ -1074,7 +1073,6 @@ wsrep-max-ws-size 1073741824 wsrep-mysql-replication-bundle 0 wsrep-node-address wsrep-node-incoming-address AUTO -wsrep-node-name localhost.localdomain wsrep-notify-cmd wsrep-on FALSE wsrep-provider none From 1bedd1c8ef7a07c998863737225cacc5a80a54a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Wed, 25 Feb 2015 21:18:15 +0200 Subject: [PATCH 027/305] Refresh debian/patches --- .../patches/38_scripts__mysqld_safe.sh__signals.patch | 10 +++++----- debian/patches/50_mysql-test__db_test.patch | 2 +- debian/patches/62_disable_tests.patch | 7 +++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/debian/patches/38_scripts__mysqld_safe.sh__signals.patch b/debian/patches/38_scripts__mysqld_safe.sh__signals.patch index 257476c8fc4c..dc8b5d5ca485 100644 --- a/debian/patches/38_scripts__mysqld_safe.sh__signals.patch +++ b/debian/patches/38_scripts__mysqld_safe.sh__signals.patch @@ -6,16 +6,16 @@ Index: mysql-5.5-5.5.29/scripts/mysqld_safe.sh =================================================================== --- mysql-5.5-5.5.29.orig/scripts/mysqld_safe.sh 2012-12-10 01:16:24.000000000 -0500 +++ mysql-5.5-5.5.29/scripts/mysqld_safe.sh 2013-01-16 08:28:47.961776400 -0500 -@@ -29,8 +29,6 @@ +@@ -31,8 +31,6 @@ syslog_tag_mysqld=mysqld syslog_tag_mysqld_safe=mysqld_safe - + -trap '' 1 2 3 15 # we shouldn't let anyone kill us - # MySQL-specific environment variable. First off, it's not really a umask, # it's the desired mode. Second, it follows umask(2), not umask(3) in that # octal needs to be explicit. Our shell might be a proper sh without printf, -@@ -153,7 +151,7 @@ +@@ -159,7 +157,7 @@ # sed buffers output (only GNU sed supports a -u (unbuffered) option) # which means that messages may not get sent to syslog until the # mysqld process quits. @@ -24,9 +24,9 @@ Index: mysql-5.5-5.5.29/scripts/mysqld_safe.sh ;; *) echo "Internal program error (non-fatal):" \ -@@ -740,6 +738,13 @@ +@@ -862,6 +860,13 @@ fi - + # +# From now on, we catch signals to do a proper shutdown of mysqld +# when signalled to do so. diff --git a/debian/patches/50_mysql-test__db_test.patch b/debian/patches/50_mysql-test__db_test.patch index 30be50a80cbe..a4b9182b5a66 100644 --- a/debian/patches/50_mysql-test__db_test.patch +++ b/debian/patches/50_mysql-test__db_test.patch @@ -4,7 +4,7 @@ Description: restores the rights for anybody to connect to the test --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl -@@ -3355,6 +3355,10 @@ sub mysql_install_db { +@@ -3367,6 +3367,10 @@ sub mysql_install_db { mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql", $bootstrap_sql_file); diff --git a/debian/patches/62_disable_tests.patch b/debian/patches/62_disable_tests.patch index dd82d4aa00b9..557c382b627c 100644 --- a/debian/patches/62_disable_tests.patch +++ b/debian/patches/62_disable_tests.patch @@ -2,9 +2,8 @@ Index: mysql-5.5/mysql-test/t/disabled.def =================================================================== --- mysql-5.5.orig/mysql-test/t/disabled.def 2012-03-06 13:10:09.085143548 -0800 +++ mysql-5.5/mysql-test/t/disabled.def 2012-03-06 15:23:22.905149613 -0800 -@@ -15,3 +15,5 @@ - archive-big : Bug#11817185 2011-03-10 Anitha Disabled since this leads to timeout on Solaris Sparc - log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists +@@ -17,3 +17,4 @@ log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exist mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836 + file_contents : Codership mysql-wsrep#4 2014-10-28 pstoev main.file_contents MTR test fails in mysql-wsrep + flush_read_lock : Galera mysql-wsrep#80 ALTER TABLE fails under read lock +partition_rename_longfilename : Fails when building with sbuild and schroots -+file_contents : Fails without bzr revision id From 4820d0979b1183269c25597f7019b52417e74d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Thu, 26 Feb 2015 09:44:21 +0200 Subject: [PATCH 028/305] Replace hard-coded upstart dependency with generic initscripts (fixes codership/mysql-wsrep#73) --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 542b3f5326a6..a73378e914d0 100644 --- a/debian/control +++ b/debian/control @@ -122,13 +122,13 @@ Architecture: any Suggests: mailx, tinyca Recommends: libhtml-template-perl Pre-Depends: mysql-wsrep-common (>= ${source:Version}), adduser (>= 3.40), debconf -Depends: libdbi-perl, +Depends: initscripts (>= 2.88dsf-13.3), + libdbi-perl, lsb-base (>= 3.0-10), mysql-wsrep-client-5.5 (>= ${source:Version}), passwd, perl (>= 5.6), psmisc, - upstart (>= 0.6.7-2), ${misc:Depends}, ${shlibs:Depends} Breaks: libmysqlclient-dev, mysql-server (<< ${source:Version}) From ae4b0a0b75c9f062847fb3428dab5062d2dd7323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Thu, 26 Feb 2015 09:52:59 +0200 Subject: [PATCH 029/305] Replace Debian init script with symbolic link to support-files/mysql.server.sh to include wsrep custom bootstrap etc sections (fixes codership/mysql-wsrep#75) --- debian/mysql-wsrep-server-5.5.mysql.init | 188 +---------------------- 1 file changed, 1 insertion(+), 187 deletions(-) mode change 100644 => 120000 debian/mysql-wsrep-server-5.5.mysql.init diff --git a/debian/mysql-wsrep-server-5.5.mysql.init b/debian/mysql-wsrep-server-5.5.mysql.init deleted file mode 100644 index 983a8c28d7df..000000000000 --- a/debian/mysql-wsrep-server-5.5.mysql.init +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/bash -# -### BEGIN INIT INFO -# Provides: mysql -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Should-Start: $network $time -# Should-Stop: $network $time -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start and stop the mysql database server daemon -# Description: Controls the main MySQL database server daemon "mysqld" -# and its wrapper script "mysqld_safe". -### END INIT INFO -# -set -e -set -u -${DEBIAN_SCRIPT_DEBUG:+ set -v -x} - -test -x /usr/bin/mysqld_safe || exit 0 - -. /lib/lsb/init-functions - -SELF=$(cd $(dirname $0); pwd -P)/$(basename $0) -CONF=/etc/mysql/my.cnf -MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" - -# priority can be overriden and "-s" adds output to stderr -ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mysql -i" - -# Safeguard (relative paths, core dumps..) -cd / -umask 077 - -# mysqladmin likes to read /root/.my.cnf. This is usually not what I want -# as many admins e.g. only store a password without a username there and -# so break my scripts. -export HOME=/etc/mysql/ - -## Fetch a particular option from mysql's invocation. -# -# Usage: void mysqld_get_param option -mysqld_get_param() { - /usr/sbin/mysqld --print-defaults \ - | tr " " "\n" \ - | grep -- "--$1" \ - | tail -n 1 \ - | cut -d= -f2 -} - -## Do some sanity checks before even trying to start mysqld. -sanity_checks() { - # check for config file - if [ ! -r /etc/mysql/my.cnf ]; then - log_warning_msg "$0: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" - echo "WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" | $ERR_LOGGER - fi - - # check for diskspace shortage - datadir=`mysqld_get_param datadir` - if LC_ALL=C BLOCKSIZE= df --portability $datadir/. | tail -n 1 | awk '{ exit ($4>4096) }'; then - log_failure_msg "$0: ERROR: The partition with $datadir is too full!" - echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER - exit 1 - fi -} - -## Checks if there is a server running and if so if it is accessible. -# -# check_alive insists on a pingable server -# check_dead also fails if there is a lost mysqld in the process list -# -# Usage: boolean mysqld_status [check_alive|check_dead] [warn|nowarn] -mysqld_status () { - ping_output=`$MYADMIN ping 2>&1`; ping_alive=$(( ! $? )) - - ps_alive=0 - pidfile=`mysqld_get_param pid-file` - if [ -f "$pidfile" ] && ps `cat $pidfile` >/dev/null 2>&1; then ps_alive=1; fi - - if [ "$1" = "check_alive" -a $ping_alive = 1 ] || - [ "$1" = "check_dead" -a $ping_alive = 0 -a $ps_alive = 0 ]; then - return 0 # EXIT_SUCCESS - else - if [ "$2" = "warn" ]; then - echo -e "$ps_alive processes alive and '$MYADMIN ping' resulted in\n$ping_output\n" | $ERR_LOGGER -p daemon.debug - fi - return 1 # EXIT_FAILURE - fi -} - -# -# main() -# - -case "${1:-''}" in - 'start') - sanity_checks; - # Start daemon - log_daemon_msg "Starting MySQL database server" "mysqld" - if mysqld_status check_alive nowarn; then - log_progress_msg "already running" - log_end_msg 0 - else - # Could be removed during boot - test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld - - # Start MySQL! - /usr/bin/mysqld_safe > /dev/null 2>&1 & - - # 6s was reported in #352070 to be too few when using ndbcluster - for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do - sleep 1 - if mysqld_status check_alive nowarn ; then break; fi - log_progress_msg "." - done - if mysqld_status check_alive warn; then - log_end_msg 0 - # Now start mysqlcheck or whatever the admin wants. - output=$(/etc/mysql/debian-start) - [ -n "$output" ] && log_action_msg "$output" - else - log_end_msg 1 - log_failure_msg "Please take a look at the syslog" - fi - fi - ;; - - 'stop') - # * As a passwordless mysqladmin (e.g. via ~/.my.cnf) must be possible - # at least for cron, we can rely on it here, too. (although we have - # to specify it explicit as e.g. sudo environments points to the normal - # users home and not /root) - log_daemon_msg "Stopping MySQL database server" "mysqld" - if ! mysqld_status check_dead nowarn; then - set +e - shutdown_out=`$MYADMIN shutdown 2>&1`; r=$? - set -e - if [ "$r" -ne 0 ]; then - log_end_msg 1 - [ "$VERBOSE" != "no" ] && log_failure_msg "Error: $shutdown_out" - log_daemon_msg "Killing MySQL database server by signal" "mysqld" - killall -15 mysqld - server_down= - for i in 1 2 3 4 5 6 7 8 9 10; do - sleep 1 - if mysqld_status check_dead nowarn; then server_down=1; break; fi - done - if test -z "$server_down"; then killall -9 mysqld; fi - fi - fi - - if ! mysqld_status check_dead warn; then - log_end_msg 1 - log_failure_msg "Please stop MySQL manually and read /usr/share/doc/mysql-server-5.5/README.Debian.gz!" - exit -1 - else - log_end_msg 0 - fi - ;; - - 'restart') - set +e; $SELF stop; set -e - $SELF start - ;; - - 'reload'|'force-reload') - log_daemon_msg "Reloading MySQL database server" "mysqld" - $MYADMIN reload - log_end_msg 0 - ;; - - 'status') - if mysqld_status check_alive nowarn; then - log_action_msg "$($MYADMIN version)" - else - log_action_msg "MySQL is stopped." - exit 3 - fi - ;; - - *) - echo "Usage: $SELF start|stop|restart|reload|force-reload|status" - exit 1 - ;; -esac - diff --git a/debian/mysql-wsrep-server-5.5.mysql.init b/debian/mysql-wsrep-server-5.5.mysql.init new file mode 120000 index 000000000000..69b679f1e0ce --- /dev/null +++ b/debian/mysql-wsrep-server-5.5.mysql.init @@ -0,0 +1 @@ +../support-files/mysql.server.sh \ No newline at end of file From 3e684d21e70288f3a16516cad900b6538074d8d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Thu, 26 Feb 2015 10:16:26 +0200 Subject: [PATCH 030/305] Leave binaries unstripped of debug symbols. Me don't need any debug packages either. --- debian/control | 21 --------------------- debian/rules | 4 +--- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/debian/control b/debian/control index a73378e914d0..90c59bfbef23 100644 --- a/debian/control +++ b/debian/control @@ -50,13 +50,6 @@ Description: MySQL database client library . This package includes the client library. -Package: mysql-wsrep-libmysqlclient18-dbg -Architecture: any -Section: debug -Priority: extra -Depends: mysql-wsrep-libmysqlclient18 (= ${binary:Version}), ${misc:Depends} -Description: MySQL database client library debugging symbols. - Package: mysql-wsrep-libmysqlclient-dev Architecture: any Section: libdevel @@ -110,13 +103,6 @@ Description: MySQL database client binaries This package includes the client binaries and the additional tools innotop and mysqlreport. -Package: mysql-wsrep-client-5.5-dbg -Architecture: any -Section: debug -Priority: extra -Depends: mysql-wsrep-client-5.5 (= ${binary:Version}), ${misc:Depends} -Description: MySQL database client binary debugging symbols. - Package: mysql-wsrep-server-5.5 Architecture: any Suggests: mailx, tinyca @@ -143,13 +129,6 @@ Description: MySQL database server binaries and system database setup This package contains all the infrastructure needed to setup system databases. -Package: mysql-wsrep-server-5.5-dbg -Architecture: any -Section: debug -Priority: extra -Depends: mysql-wsrep-client-5.5 (= ${binary:Version}), ${misc:Depends} -Description: MySQL database wsrep server binary debugging symbols. - Package: mysql-wsrep-server Architecture: all Depends: mysql-wsrep-server-5.5 diff --git a/debian/rules b/debian/rules index c98ddd067e50..eb2821d4adc5 100755 --- a/debian/rules +++ b/debian/rules @@ -317,9 +317,7 @@ source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false override_dh_strip: - dh_strip --dbg-package=mysql-wsrep-server-5.5-dbg - dh_strip --dbg-package=mysql-wsrep-client-5.5-dbg - dh_strip --dbg-package=mysql-wsrep-libmysqlclient18-dbg + @echo "Notice: not stripping debug symbols from any binaries" binary: binary-indep binary-arch From a8ed070fe26c12e9110595767d2824f4dd1ae1a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Thu, 26 Feb 2015 10:24:19 +0200 Subject: [PATCH 031/305] Remove versionless metapages and add versions to all real packages to make it possible for 5.5 to reside in the same Debian repository as 5.6 packages (fixes codership/mysql-wsrep#72) --- debian/control | 51 +++++++++----------------------------------------- 1 file changed, 9 insertions(+), 42 deletions(-) diff --git a/debian/control b/debian/control index 90c59bfbef23..456dfe000ea9 100644 --- a/debian/control +++ b/debian/control @@ -32,10 +32,10 @@ Homepage: http://dev.mysql.com/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-mysql/mysql-5.5/ Vcs-Svn: svn://svn.debian.org/svn/pkg-mysql/mysql-5.5/ -Package: mysql-wsrep-libmysqlclient18 +Package: mysql-wsrep-libmysqlclient18.0 Section: libs Architecture: any -Depends: mysql-wsrep-common (>= ${source:Version}), +Depends: mysql-wsrep-common-5.5 (>= ${source:Version}), ${misc:Depends}, ${shlibs:Depends} Pre-Depends: multiarch-support, ${misc:Pre-Depends} @@ -50,10 +50,10 @@ Description: MySQL database client library . This package includes the client library. -Package: mysql-wsrep-libmysqlclient-dev +Package: mysql-wsrep-libmysqlclient18.0-dev Architecture: any Section: libdevel -Depends: mysql-wsrep-libmysqlclient18 (= ${binary:Version}), +Depends: mysql-wsrep-libmysqlclient18.0 (= ${binary:Version}), zlib1g-dev, ${misc:Depends}, ${shlibs:Depends} @@ -65,7 +65,7 @@ Description: MySQL database development files . This package includes development libraries and header files. -Package: mysql-wsrep-common +Package: mysql-wsrep-common-5.5 Architecture: all Depends: ${misc:Depends}, ${shlibs:Depends} Multi-Arch: foreign @@ -86,8 +86,8 @@ Depends: debianutils (>=1.6), libdbd-mysql-perl (>= 1.2202), libdbi-perl, libterm-readkey-perl, - mysql-wsrep-common (>= ${source:Version}), - mysql-wsrep-libmysqlclient18, + mysql-wsrep-common-5.5 (>= ${source:Version}), + mysql-wsrep-libmysqlclient18.0, ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends} @@ -107,7 +107,7 @@ Package: mysql-wsrep-server-5.5 Architecture: any Suggests: mailx, tinyca Recommends: libhtml-template-perl -Pre-Depends: mysql-wsrep-common (>= ${source:Version}), adduser (>= 3.40), debconf +Pre-Depends: mysql-wsrep-common-5.5 (>= ${source:Version}), adduser (>= 3.40), debconf Depends: initscripts (>= 2.88dsf-13.3), libdbi-perl, lsb-base (>= 3.0-10), @@ -129,42 +129,9 @@ Description: MySQL database server binaries and system database setup This package contains all the infrastructure needed to setup system databases. -Package: mysql-wsrep-server -Architecture: all -Depends: mysql-wsrep-server-5.5 -Description: MySQL database server (metapackage depending on the latest version) - This is an empty package that depends on the current "best" version of - mysql-server (currently mysql-server-5.5), as determined by the MySQL - maintainers. Install this package if in doubt about which MySQL - version you need. That will install the version recommended by the - package maintainers. - . - MySQL is a fast, stable and true multi-user, multi-threaded SQL database - server. SQL (Structured Query Language) is the most popular database query - language in the world. The main goals of MySQL are speed, robustness and - ease of use. - -Package: mysql-wsrep-client -Architecture: all -Depends: mysql-wsrep-client-5.5 -Description: MySQL database client (metapackage depending on the latest version) - This is an empty package that depends on the current "best" version of - mysql-client (currently mysql-client-5.5), as determined by the MySQL - maintainers. Install this package if in doubt about which MySQL version - you want, as this is the one we consider to be in the best shape. - -Package: mysql-wsrep-testsuite -Architecture: all -Depends: mysql-wsrep-testsuite-5.5 -Description: MySQL testsuite - This is an empty package that depends on the current "best" version of - mysql-testsuite (currently mysql-testsuite-5.5), as determined by the - MySQL maintainers. Install this package if in doubt about which MySQL - version you want, as this is the one we consider to be in the best shape. - Package: mysql-wsrep-testsuite-5.5 Architecture: any -Depends: mysql-client, mysql-server, ${misc:Depends}, ${shlibs:Depends} +Depends: mysql-wsrep-5.5, ${misc:Depends}, ${shlibs:Depends} Conflicts: mysql-testsuite (<< ${source:Version}) Description: MySQL testsuite MySQL is a fast, stable, and true multi-user, multi-threaded SQL database From ea42ef4ed1aa1dc6461da6245779bc08ced9c804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Thu, 26 Feb 2015 11:11:20 +0200 Subject: [PATCH 032/305] Remove dh_strip from the build stanza. Debug symbols should be kept now. --- debian/rules | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/rules b/debian/rules index eb2821d4adc5..3cd381ed2cd5 100755 --- a/debian/rules +++ b/debian/rules @@ -299,7 +299,6 @@ binary-arch: build install dh_installinfo -a dh_installlogcheck -a dh_installchangelogs -a - dh_strip -a dh_link -a # .so muss nach .so.1.2.3 installier werden! dh_compress -a dh_fixperms -a From 8deb4303803c1d520caa9512ec12f69dc3e47fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Mon, 9 Mar 2015 00:03:00 +0200 Subject: [PATCH 033/305] Disable upstart script not to start automatically (fixes codership/mysql-wsrep#82) --- ...ysql.upstart => mysql-wsrep-server-5.5.mysql.upstart.disabled} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename debian/{mysql-wsrep-server-5.5.mysql.upstart => mysql-wsrep-server-5.5.mysql.upstart.disabled} (100%) diff --git a/debian/mysql-wsrep-server-5.5.mysql.upstart b/debian/mysql-wsrep-server-5.5.mysql.upstart.disabled similarity index 100% rename from debian/mysql-wsrep-server-5.5.mysql.upstart rename to debian/mysql-wsrep-server-5.5.mysql.upstart.disabled From 6a465628a32afd7a56fa1e0128e403b02aff7460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Mon, 9 Mar 2015 20:56:28 +0200 Subject: [PATCH 034/305] Disabled apparmor profile (fixes codership/mysql-wsrep#81) --- debian/apparmor-profile | 46 +---------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/debian/apparmor-profile b/debian/apparmor-profile index 3e1f1b05fa6b..04272ac1f7d0 100644 --- a/debian/apparmor-profile +++ b/debian/apparmor-profile @@ -1,45 +1 @@ -# vim:syntax=apparmor -# Last Modified: Tue Jun 19 17:37:30 2007 -#include - -/usr/sbin/mysqld { - #include - #include - #include - #include - #include - - capability dac_override, - capability sys_resource, - capability setgid, - capability setuid, - - network tcp, - - /etc/hosts.allow r, - /etc/hosts.deny r, - - /etc/mysql/*.pem r, - /etc/mysql/conf.d/ r, - /etc/mysql/conf.d/* r, - /etc/mysql/*.cnf r, - /usr/lib/mysql/plugin/ r, - /usr/lib/mysql/plugin/*.so* mr, - /usr/sbin/mysqld mr, - /usr/share/mysql/** r, - /var/log/mysql.log rw, - /var/log/mysql.err rw, - /var/lib/mysql/ r, - /var/lib/mysql/** rwk, - /var/log/mysql/ r, - /var/log/mysql/* rw, - /var/run/mysqld/mysqld.pid rw, - /var/run/mysqld/mysqld.sock w, - /run/mysqld/mysqld.pid rw, - /run/mysqld/mysqld.sock w, - - /sys/devices/system/cpu/ r, - - # Site-specific additions and overrides. See local/README for details. - #include -} +# This file is intensionally empty to disable apparmor by default From 6bca16b3acb1517a49c35442e8470dc8334c5b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Wed, 11 Mar 2015 23:07:53 +0200 Subject: [PATCH 035/305] Remove dangling init file link in debian packaging --- debian/mysql-wsrep-server-5.5.mysql.init | 1 - debian/rules | 1 - 2 files changed, 2 deletions(-) delete mode 120000 debian/mysql-wsrep-server-5.5.mysql.init diff --git a/debian/mysql-wsrep-server-5.5.mysql.init b/debian/mysql-wsrep-server-5.5.mysql.init deleted file mode 120000 index 69b679f1e0ce..000000000000 --- a/debian/mysql-wsrep-server-5.5.mysql.init +++ /dev/null @@ -1 +0,0 @@ -../support-files/mysql.server.sh \ No newline at end of file diff --git a/debian/rules b/debian/rules index 3cd381ed2cd5..1fbecb5aaee5 100755 --- a/debian/rules +++ b/debian/rules @@ -262,7 +262,6 @@ binary-indep: build install dh_installexamples -i dh_installmenu -i dh_installlogrotate -i - dh_installinit -i dh_installcron -i dh_installman -i dh_installinfo -i From 6b5f7d8792ff0a58160c95fd825071118fd5fd00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Thu, 12 Mar 2015 22:46:31 +0200 Subject: [PATCH 036/305] Include /etc/init.d/mysql in server package --- debian/mysql-wsrep-server-5.5.files | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/mysql-wsrep-server-5.5.files b/debian/mysql-wsrep-server-5.5.files index 0560be85c540..160d72a7bc7a 100644 --- a/debian/mysql-wsrep-server-5.5.files +++ b/debian/mysql-wsrep-server-5.5.files @@ -4,6 +4,7 @@ usr/lib/mysql/*so* usr/lib/mysql/plugin/*.so etc/mysql/debian-start etc/mysql/conf.d/mysqld_safe_syslog.cnf +etc/init.d/mysql usr/bin/msql2mysql usr/bin/myisamchk usr/bin/myisamlog From 11dc27ff64a59d6c2b75c5fc6a269c30ca56a028 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Wed, 18 Mar 2015 21:17:31 +0200 Subject: [PATCH 037/305] codership/mysql-wsrep#67 - total order isolation for FLUSH The following FLUSH commands are now executed under total order isolation: * FLUSH DES_KEY_FILE * FLUSH HOSTS * FLUSH PRIVILEGES * FLUSH QUERY CACHE * FLUSH STATUS * FLUSH USER_RESOURCES This patch was backported from mysql-wsrep/5.6 commit cdea608d9a27701d76d0deec49976aa0a08b1a56 --- sql/sql_parse.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 9d1f2ed5f7cb..37e843ae7193 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4055,6 +4055,21 @@ case SQLCOM_PREPARE: break; } +#ifdef WITH_WSREP + if (lex->type & ( + REFRESH_GRANT | + REFRESH_HOSTS | + REFRESH_DES_KEY_FILE | +#ifdef HAVE_QUERY_CACHE + REFRESH_QUERY_CACHE_FREE | +#endif /* HAVE_QUERY_CACHE */ + REFRESH_STATUS | + REFRESH_USER_RESOURCES)) + { + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) + } +#endif /* WITH_WSREP*/ + /* reload_acl_and_cache() will tell us if we are allowed to write to the binlog or not. From 13b0556c5a2a639306326d1d690bdfc8ea2a5c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Sat, 28 Mar 2015 23:18:11 +0200 Subject: [PATCH 038/305] Update the Debian package version number to match that of the current source. Update maintainer name. --- debian/changelog | 6 ++++++ debian/control | 11 ++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3d58a146cc56..109caae4b592 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mysql-wsrep-5.5 (5.5.42-25.11-1) UNRELEASED; urgency=low + + * Bumped version numbers + + -- Otto Kekäläinen Fri, 27 Mar 2015 15:50:10 +0200 + mysql-wsrep-5.5 (5.5.41-1) UNRELEASED; urgency=medium * Initial Debian packaging based on MySQL 5.5.41-0ubuntu0.12.04.1 diff --git a/debian/control b/debian/control index 456dfe000ea9..c03576ad890b 100644 --- a/debian/control +++ b/debian/control @@ -1,10 +1,7 @@ Source: mysql-wsrep-5.5 Section: database Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian MySQL Maintainers -Uploaders: Norbert Tretkowski , - Clint Byrum +Maintainer: Codership Oy Build-Depends: bison, chrpath, cmake, @@ -28,9 +25,9 @@ Build-Depends: bison, psmisc, zlib1g-dev (>= 1:1.1.3-5) Standards-Version: 3.9.2 -Homepage: http://dev.mysql.com/ -Vcs-Browser: http://svn.debian.org/wsvn/pkg-mysql/mysql-5.5/ -Vcs-Svn: svn://svn.debian.org/svn/pkg-mysql/mysql-5.5/ +Homepage: http://galeracluster.com/ +Vcs-Git: https://github.com/codership/mysql-wsrep.git +Vcs-Browser: https://github.com/codership/mysql-wsrep Package: mysql-wsrep-libmysqlclient18.0 Section: libs From a18ac87956683d1baa8b29540fdc19393b61dff3 Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Sat, 2 May 2015 22:25:39 +0300 Subject: [PATCH 039/305] Fixes codership/mysql-wsrep#118 --- sql/wsrep_mysqld.cc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index dec7bb8986df..9de7b23e5f2e 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -820,19 +820,10 @@ bool wsrep_start_replication() wsrep_sst_donor, bootstrap))) { - if (-ESOCKTNOSUPPORT == rcode) - { - DBUG_PRINT("wsrep",("unrecognized cluster address: '%s', rcode: %d", - wsrep_cluster_address, rcode)); - WSREP_ERROR("unrecognized cluster address: '%s', rcode: %d", - wsrep_cluster_address, rcode); - } - else - { - DBUG_PRINT("wsrep",("wsrep->connect() failed: %d", rcode)); - WSREP_ERROR("wsrep::connect() failed: %d", rcode); - } - + DBUG_PRINT("wsrep",("wsrep->connect(%s) failed: %d", + wsrep_cluster_address, rcode)); + WSREP_ERROR("wsrep::connect(%s) failed: %d", + wsrep_cluster_address, rcode); return false; } else From 702918f28245249d84b2f511eb372e659d56f655 Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Wed, 6 May 2015 10:35:02 +0300 Subject: [PATCH 040/305] Fixes codership/mysql-wsrep#122 - causal/casual typos fixed in wsrep code Conflicts: mysql-test/include/mtr_warnings.sql mysql-test/suite/galera/t/galera_ftwrl.test --- sql/mysqld.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b0d7438dd960..013e931dbd1b 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -8134,10 +8134,10 @@ static int get_options(int *argc_ptr, char ***argv_ptr) #ifdef WITH_WSREP if (global_system_variables.wsrep_causal_reads) { - WSREP_WARN("option --wsrep-casual-reads is deprecated"); + WSREP_WARN("option --wsrep-causal-reads is deprecated"); if (!(global_system_variables.wsrep_sync_wait & WSREP_SYNC_WAIT_BEFORE_READ)) { - WSREP_WARN("--wsrep-casual-reads=ON takes precedence over --wsrep-sync-wait=%u. " + WSREP_WARN("--wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=%u. " "WSREP_SYNC_WAIT_BEFORE_READ is on", global_system_variables.wsrep_sync_wait); global_system_variables.wsrep_sync_wait |= WSREP_SYNC_WAIT_BEFORE_READ; From a0ba0d7e176551c7e13daa2ef8974d8aade2dfc7 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 12 May 2015 02:46:43 -0700 Subject: [PATCH 041/305] Fixes codership/mysql-wsrep#127 . Set _SYSTEMCTL_SKIP_REDIRECT so that '/etc/init.d/mysql start --wsrep-new-cluster' works --- support-files/mysql.server.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index fe97541b216e..9651085abfd2 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -29,6 +29,10 @@ # both 'bootstrap' and 'start' are handled entirely within this script SYSTEMD_NO_WRAP=1 + +# Prevent Debian's init scripts from calling systemctl + +_SYSTEMCTL_SKIP_REDIRECT=true # If you install MySQL on some other places than @prefix@, then you # have to do one of the following things for this script to work: From cb1be2061ec85c2437a153180da6f3c3a13250e5 Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Sat, 6 Jun 2015 01:08:41 +0300 Subject: [PATCH 042/305] Refs codership/mysql-wsrep#141: this commit 1. Passes wsrep_sst_auth_value to SST scripts via WSREP_SST_OPT_AUTH envronmental variable, so it never appears on the command line 2. In mysqldump and xtrabackup* SST scripts which rely on MySQL authentication, instead of passing password on the command line, SST script sets MYSQL_PWD environment variable, so that password also never appears on the mysqldump/innobackupex command line. --- scripts/wsrep_sst_common.sh | 35 ++++-- scripts/wsrep_sst_mysqldump.sh | 34 ++--- scripts/wsrep_sst_rsync.sh | 2 +- scripts/wsrep_sst_xtrabackup-v2.sh | 14 +-- scripts/wsrep_sst_xtrabackup.sh | 14 +-- sql/wsrep_notify.cc | 2 +- sql/wsrep_sst.cc | 192 ++++++++++++++++++----------- sql/wsrep_utils.cc | 94 +++++++++++++- sql/wsrep_utils.h | 24 +++- 9 files changed, 294 insertions(+), 117 deletions(-) diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 2546074f7bde..ec582c4840d4 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2014 Codership Oy +# Copyright (C) 2012-2015 Codership Oy # # 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 @@ -20,7 +20,9 @@ set -u WSREP_SST_OPT_BYPASS=0 WSREP_SST_OPT_DATA="" -WSREP_SST_OPT_AUTH="" +WSREP_SST_OPT_AUTH=${WSREP_SST_OPT_AUTH:-} +WSREP_SST_OPT_USER=${WSREP_SST_OPT_USER:-} +WSREP_SST_OPT_PSWD=${WSREP_SST_OPT_PSWD:-} while [ $# -gt 0 ]; do case "$1" in @@ -28,10 +30,6 @@ case "$1" in readonly WSREP_SST_OPT_ADDR="$2" shift ;; - '--auth') - WSREP_SST_OPT_AUTH="$2" - shift - ;; '--bypass') WSREP_SST_OPT_BYPASS=1 ;; @@ -114,12 +112,30 @@ else MY_PRINT_DEFAULTS=$(which my_print_defaults) fi +wsrep_auth_not_set() +{ + [ -z "$WSREP_SST_OPT_AUTH" -o "$WSREP_SST_OPT_AUTH" = "(null)" ] +} + # For Bug:1200727 -if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF sst | grep -q "wsrep_sst_auth";then - if [ -z "$WSREP_SST_OPT_AUTH" -o "$WSREP_SST_OPT_AUTH" = "(null)" ];then - WSREP_SST_OPT_AUTH=$(my_print_defaults -c $WSREP_SST_OPT_CONF sst | grep -- "--wsrep_sst_auth" | cut -d= -f2) +if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF sst | grep -q "wsrep_sst_auth" +then + if wsrep_auth_not_set + then + WSREP_SST_OPT_AUTH=$(MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF sst | grep -- "--wsrep_sst_auth" | cut -d= -f2) fi fi +readonly WSREP_SST_OPT_AUTH + +# Splitting AUTH into potential user:password pair +if ! wsrep_auth_not_set +then + readonly AUTH_VEC=(${WSREP_SST_OPT_AUTH//:/ }) + [ -n "${AUTH_VEC[0]}" ] && WSREP_SST_OPT_USER="${AUTH_VEC[0]}" + [ -n "${AUTH_VEC[1]}" ] && WSREP_SST_OPT_PSWD="${AUTH_VEC[1]}" +fi +readonly WSREP_SST_OPT_USER +readonly WSREP_SST_OPT_PSWD if [ -n "${WSREP_SST_OPT_DATA:-}" ] then @@ -128,7 +144,6 @@ else SST_PROGRESS_FILE="" fi - wsrep_log() { # echo everything to stderr so that it gets into common error log diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh index e21e1cd01bcd..b470ea6095b5 100644 --- a/scripts/wsrep_sst_mysqldump.sh +++ b/scripts/wsrep_sst_mysqldump.sh @@ -1,5 +1,5 @@ -#!/bin/bash -e -# Copyright (C) 2009 Codership Oy +#!/bin/bash -ue +# Copyright (C) 2009-2015 Codership Oy # # 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 @@ -38,7 +38,6 @@ local_ip() return 1 } -if test -z "$WSREP_SST_OPT_USER"; then wsrep_log_error "USER cannot be nil"; exit $EINVAL; fi if test -z "$WSREP_SST_OPT_HOST"; then wsrep_log_error "HOST cannot be nil"; exit $EINVAL; fi if test -z "$WSREP_SST_OPT_PORT"; then wsrep_log_error "PORT cannot be nil"; exit $EINVAL; fi if test -z "$WSREP_SST_OPT_LPORT"; then wsrep_log_error "LPORT cannot be nil"; exit $EINVAL; fi @@ -54,7 +53,7 @@ then fi # Check client version -CLIENT_MINOR=$(mysql --version | cut -d ' ' -f 6 | cut -d '.' -f 2) +CLIENT_MINOR=$($MYSQL_CLIENT --version | cut -d ' ' -f 6 | cut -d '.' -f 2) if [ $CLIENT_MINOR -lt "5" ] then $MYSQL_CLIENT --version >&2 @@ -62,13 +61,18 @@ then exit $EINVAL fi -# For Bug:1293798 -if [ -z "$WSREP_SST_OPT_PSWD" -a -n "$WSREP_SST_OPT_AUTH" ]; then - WSREP_SST_OPT_USER=$(echo $WSREP_SST_OPT_AUTH | cut -d: -f1) - WSREP_SST_OPT_PSWD=$(echo $WSREP_SST_OPT_AUTH | cut -d: -f2) -fi -AUTH="-u$WSREP_SST_OPT_USER" -if test -n "$WSREP_SST_OPT_PSWD"; then AUTH="$AUTH -p$WSREP_SST_OPT_PSWD"; fi +[ -n "$WSREP_SST_OPT_USER" ] && AUTH="-u$WSREP_SST_OPT_USER" || AUTH= + +# Refs https://github.com/codership/mysql-wsrep/issues/141 +# Passing password in MYSQL_PWD environment variable is considered +# "extremely insecure" by MySQL Guidelines for Password Security +# (https://dev.mysql.com/doc/refman/5.6/en/password-security-user.html) +# that is even less secure than passing it on a command line! It is doubtful: +# the whole command line is easily observable by any unprivileged user via ps, +# whereas (at least on Linux) unprivileged user can't see process environment +# that he does not own. So while it may be not secure in the NSA sense of the +# word, it is arguably more secure than passing password on the command line. +[ -n "$WSREP_SST_OPT_PSWD" ] && export MYSQL_PWD="$WSREP_SST_OPT_PSWD" STOP_WSREP="SET wsrep_on=OFF;" @@ -104,10 +108,10 @@ MYSQL="$MYSQL_CLIENT $AUTH -h$WSREP_SST_OPT_HOST -P$WSREP_SST_OPT_PORT "\ # need to disable logging when loading the dump # reason is that dump contains ALTER TABLE for log tables, and # this causes an error if logging is enabled -GENERAL_LOG_OPT=`$MYSQL --skip-column-names -e"$STOP_WSREP SELECT @@GENERAL_LOG"` -SLOW_LOG_OPT=`$MYSQL --skip-column-names -e"$STOP_WSREP SELECT @@SLOW_QUERY_LOG"` -$MYSQL -e"$STOP_WSREP SET GLOBAL GENERAL_LOG=OFF" -$MYSQL -e"$STOP_WSREP SET GLOBAL SLOW_QUERY_LOG=OFF" +GENERAL_LOG_OPT=`$MYSQL --skip-column-names -e "$STOP_WSREP SELECT @@GENERAL_LOG"` +SLOW_LOG_OPT=`$MYSQL --skip-column-names -e "$STOP_WSREP SELECT @@SLOW_QUERY_LOG"` +$MYSQL -e "$STOP_WSREP SET GLOBAL GENERAL_LOG=OFF" +$MYSQL -e "$STOP_WSREP SET GLOBAL SLOW_QUERY_LOG=OFF" # commands to restore log settings RESTORE_GENERAL_LOG="SET GLOBAL GENERAL_LOG=$GENERAL_LOG_OPT;" diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 152e99a08f2d..c7823eeaeca1 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -32,8 +32,8 @@ wsrep_check_programs rsync cleanup_joiner() { - wsrep_log_info "Joiner cleanup." local PID=$(cat "$RSYNC_PID" 2>/dev/null || echo 0) + wsrep_log_info "Joiner cleanup. rsync PID: $PID" [ "0" != "$PID" ] && kill $PID && sleep 0.5 && kill -9 $PID >/dev/null 2>&1 \ || : rm -rf "$RSYNC_CONF" diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index 1669e4730d9c..0693ed355dc4 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -77,7 +77,6 @@ pcmd="pv $pvopts" declare -a RC INNOBACKUPEX_BIN=innobackupex -readonly AUTH=(${WSREP_SST_OPT_AUTH//:/ }) DATA="${WSREP_SST_OPT_DATA}" INFO_FILE="xtrabackup_galera_info" IST_FILE="xtrabackup_ist" @@ -576,13 +575,14 @@ then itmpdir=$(mktemp -d) wsrep_log_info "Using $itmpdir as innobackupex temporary directory" - if [ "${AUTH[0]}" != "(null)" ]; then - INNOEXTRA+=" --user=${AUTH[0]}" - fi + if [ "$WSREP_SST_OPT_USER" != "(null)" ]; then + INNOEXTRA+=" --user=$WSREP_SST_OPT_USER" + fi - if [ ${#AUTH[*]} -eq 2 ]; then - INNOEXTRA+=" --password=${AUTH[1]}" - elif [ "${AUTH[0]}" != "(null)" ]; then + if [ -n "$WSREP_SST_OPT_PSWD" ]; then +# INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD" + export MYSQL_PWD="$WSREP_SST_OPT_PSWD" + else # Empty password, used for testing, debugging etc. INNOEXTRA+=" --password=" fi diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh index 05dbcea70df6..a0d305dd54aa 100644 --- a/scripts/wsrep_sst_xtrabackup.sh +++ b/scripts/wsrep_sst_xtrabackup.sh @@ -61,7 +61,6 @@ pcmd="pv $pvopts" declare -a RC INNOBACKUPEX_BIN=innobackupex -readonly AUTH=(${WSREP_SST_OPT_AUTH//:/ }) DATA="${WSREP_SST_OPT_DATA}" INFO_FILE="xtrabackup_galera_info" IST_FILE="xtrabackup_ist" @@ -435,13 +434,14 @@ then then TMPDIR="${TMPDIR:-/tmp}" - if [ "${AUTH[0]}" != "(null)" ]; then - INNOEXTRA+=" --user=${AUTH[0]}" - fi + if [ "$WSREP_SST_OPT_USER" != "(null)" ]; then + INNOEXTRA+=" --user=$WSREP_SST_OPT_USER" + fi - if [ ${#AUTH[*]} -eq 2 ]; then - INNOEXTRA+=" --password=${AUTH[1]}" - elif [ "${AUTH[0]}" != "(null)" ]; then + if [ -n "$WSREP_SST_OPT_PSWD" ]; then +# INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD" + export MYSQL_PWD="$WSREP_SST_OPT_PSWD" + else # Empty password, used for testing, debugging etc. INNOEXTRA+=" --password=" fi diff --git a/sql/wsrep_notify.cc b/sql/wsrep_notify.cc index 6eefb961b629..e7d30d5a9c17 100644 --- a/sql/wsrep_notify.cc +++ b/sql/wsrep_notify.cc @@ -97,7 +97,7 @@ void wsrep_notify_status (wsrep_member_status_t status, return; } - wsp::process p(cmd_ptr, "r"); + wsp::process p(cmd_ptr, "r", NULL); p.wait(); int err = p.error(); diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index 9e0740216137..d6642430fa6e 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -264,12 +264,14 @@ void wsrep_sst_continue () struct sst_thread_arg { const char* cmd; - int err; + char** env; char* ret_str; + int err; mysql_mutex_t lock; mysql_cond_t cond; - sst_thread_arg (const char* c) : cmd(c), err(-1), ret_str(0) + sst_thread_arg (const char* c, char** e) + : cmd(c), env(e), ret_str(0), err(-1) { mysql_mutex_init(key_LOCK_wsrep_sst_thread, &lock, MY_MUTEX_INIT_FAST); mysql_cond_init(key_COND_wsrep_sst_thread, &cond, NULL); @@ -327,7 +329,7 @@ static void* sst_joiner_thread (void* a) WSREP_INFO("Running: '%s'", arg->cmd); - wsp::process proc (arg->cmd, "r"); + wsp::process proc (arg->cmd, "r", arg->env); if (proc.pipe() && !proc.error()) { @@ -401,24 +403,54 @@ static void* sst_joiner_thread (void* a) return NULL; } +#define WSREP_SST_AUTH_ENV "WSREP_SST_OPT_AUTH" + +static int sst_append_auth_env(wsp::env& env, const char* sst_auth) +{ + int const sst_auth_size= strlen(WSREP_SST_AUTH_ENV) + 1 /* = */ + + (sst_auth ? strlen(sst_auth) : 0) + 1 /* \0 */; + + wsp::string sst_auth_str(sst_auth_size); // for automatic cleanup on return + if (!sst_auth_str()) return -ENOMEM; + + int ret= snprintf(sst_auth_str(), sst_auth_size, "%s=%s", + WSREP_SST_AUTH_ENV, sst_auth ? sst_auth : ""); + + if (ret < 0 || ret >= sst_auth_size) + { + WSREP_ERROR("sst_append_auth_env(): snprintf() failed: %d", ret); + return (ret < 0 ? ret : -EMSGSIZE); + } + + env.append(sst_auth_str()); + return -env.error(); +} + static ssize_t sst_prepare_other (const char* method, + const char* sst_auth, const char* addr_in, const char** addr_out) { - ssize_t cmd_len= 1024; - char cmd_str[1024]; - const char* sst_dir= mysql_real_data_home; + int const cmd_len= 4096; + wsp::string cmd_str(cmd_len); + + if (!cmd_str()) + { + WSREP_ERROR("sst_prepare_other(): could not allocate cmd buffer of %d bytes", + cmd_len); + return -ENOMEM; + } - int ret= snprintf (cmd_str, cmd_len, + int ret= snprintf (cmd_str(), cmd_len, "wsrep_sst_%s " WSREP_SST_OPT_ROLE" 'joiner' " WSREP_SST_OPT_ADDR" '%s' " - WSREP_SST_OPT_AUTH" '%s' " WSREP_SST_OPT_DATA" '%s' " WSREP_SST_OPT_CONF" '%s' " WSREP_SST_OPT_PARENT" '%d'", - method, addr_in, (sst_auth_real) ? sst_auth_real : "", - sst_dir, wsrep_defaults_file, (int)getpid()); + method, addr_in, + mysql_real_data_home, + wsrep_defaults_file, (int)getpid()); if (ret < 0 || ret >= cmd_len) { @@ -426,8 +458,21 @@ static ssize_t sst_prepare_other (const char* method, return (ret < 0 ? ret : -EMSGSIZE); } + wsp::env env(NULL); + if (env.error()) + { + WSREP_ERROR("sst_prepare_other(): env. var ctor failed: %d", -env.error()); + return -env.error(); + } + + if ((ret= sst_append_auth_env(env, sst_auth))) + { + WSREP_ERROR("sst_prepare_other(): appending auth failed: %d", ret); + return ret; + } + pthread_t tmp; - sst_thread_arg arg(cmd_str); + sst_thread_arg arg(cmd_str(), env()); mysql_mutex_lock (&arg.lock); ret = pthread_create (&tmp, NULL, sst_joiner_thread, &arg); if (ret) @@ -577,7 +622,8 @@ ssize_t wsrep_sst_prepare (void** msg) return 0; } - addr_len = sst_prepare_other (wsrep_sst_method, addr_in, &addr_out); + addr_len = sst_prepare_other (wsrep_sst_method, sst_auth_real, + addr_in, &addr_out); if (addr_len < 0) { WSREP_ERROR("Failed to prepare for '%s' SST. Unrecoverable.", @@ -610,13 +656,13 @@ ssize_t wsrep_sst_prepare (void** msg) } // helper method for donors -static int sst_run_shell (const char* cmd_str, int max_tries) +static int sst_run_shell (const char* cmd_str, char** env, int max_tries) { int ret = 0; for (int tries=1; tries <= max_tries; tries++) { - wsp::process proc (cmd_str, "r"); + wsp::process proc (cmd_str, "r", env); if (NULL != proc.pipe()) { @@ -646,17 +692,12 @@ static void sst_reject_queries(my_bool close_conn) if (TRUE == close_conn) wsrep_close_client_connections(FALSE); } -static int sst_mysqldump_check_addr (const char* user, const char* pswd, - const char* host, const char* port) -{ - return 0; -} - static int sst_donate_mysqldump (const char* addr, const wsrep_uuid_t* uuid, const char* uuid_str, wsrep_seqno_t seqno, - bool bypass) + bool bypass, + char** env) // carries auth info { size_t host_len; const char* port = strchr (addr, ':'); @@ -677,60 +718,46 @@ static int sst_donate_mysqldump (const char* addr, strncpy (host, addr, host_len - 1); host[host_len - 1] = '\0'; - const char* auth = sst_auth_real; - const char* pswd = (auth) ? strchr (auth, ':') : NULL; - size_t user_len; + int const cmd_len= 4096; + wsp::string cmd_str(cmd_len); - if (pswd) - { - pswd += 1; - user_len = pswd - auth; - } - else + if (!cmd_str()) { - pswd = ""; - user_len = (auth) ? strlen (auth) + 1 : 1; + WSREP_ERROR("sst_donate_mysqldump(): " + "could not allocate cmd buffer of %d bytes", cmd_len); + return -ENOMEM; } - char* user= (char*) malloc(user_len); + if (!bypass && wsrep_sst_donor_rejects_queries) sst_reject_queries(TRUE); - strncpy (user, (auth) ? auth : "", user_len - 1); - user[user_len - 1] = '\0'; + int ret= snprintf (cmd_str(), cmd_len, + "wsrep_sst_mysqldump " + WSREP_SST_OPT_HOST" '%s' " + WSREP_SST_OPT_PORT" '%s' " + WSREP_SST_OPT_LPORT" '%u' " + WSREP_SST_OPT_SOCKET" '%s' " + WSREP_SST_OPT_DATA" '%s' " + WSREP_SST_OPT_CONF" '%s' " + WSREP_SST_OPT_GTID" '%s:%lld'" + "%s", + host, port, mysqld_port, mysqld_unix_port, + mysql_real_data_home, wsrep_defaults_file, uuid_str, + (long long)seqno, bypass ? " "WSREP_SST_OPT_BYPASS : ""); - int ret = sst_mysqldump_check_addr (user, pswd, host, port); - if (!ret) + if (ret < 0 || ret >= cmd_len) { - size_t cmd_len= 1024; - char cmd_str[1024]; - - if (!bypass && wsrep_sst_donor_rejects_queries) sst_reject_queries(TRUE); - - snprintf (cmd_str, cmd_len, - "wsrep_sst_mysqldump " - WSREP_SST_OPT_USER" '%s' " - WSREP_SST_OPT_PSWD" '%s' " - WSREP_SST_OPT_HOST" '%s' " - WSREP_SST_OPT_PORT" '%s' " - WSREP_SST_OPT_LPORT" '%u' " - WSREP_SST_OPT_SOCKET" '%s' " - WSREP_SST_OPT_DATA" '%s' " - WSREP_SST_OPT_CONF" '%s' " - WSREP_SST_OPT_GTID" '%s:%lld'" - "%s", - user, pswd, host, port, mysqld_port, mysqld_unix_port, - mysql_real_data_home, wsrep_defaults_file, uuid_str, - (long long)seqno, bypass ? " "WSREP_SST_OPT_BYPASS : ""); - - WSREP_DEBUG("Running: '%s'", cmd_str); - - ret= sst_run_shell (cmd_str, 3); + WSREP_ERROR("sst_donate_mysqldump(): snprintf() failed: %d", ret); + return (ret < 0 ? ret : -EMSGSIZE); } + WSREP_DEBUG("Running: '%s'", cmd_str()); + + ret= sst_run_shell (cmd_str(), env, 3); + wsrep_gtid_t const state_id = { *uuid, (ret ? WSREP_SEQNO_UNDEFINED : seqno)}; wsrep->sst_sent (wsrep, &state_id, ret); - free(user); free(host); return ret; @@ -852,7 +879,7 @@ static void* sst_donor_thread (void* a) wsp::thd thd(FALSE); // we turn off wsrep_on for this THD so that it can // operate with wsrep_ready == OFF - wsp::process proc(arg->cmd, "r"); + wsp::process proc(arg->cmd, "r", arg->env); err= proc.error(); @@ -937,22 +964,29 @@ static int sst_donate_other (const char* method, const char* addr, const char* uuid, wsrep_seqno_t seqno, - bool bypass) + bool bypass, + char** env) // carries auth info { - ssize_t cmd_len = 4096; - char cmd_str[4096]; + int const cmd_len= 4096; + wsp::string cmd_str(cmd_len); + + if (!cmd_str()) + { + WSREP_ERROR("sst_donate_other(): " + "could not allocate cmd buffer of %d bytes", cmd_len); + return -ENOMEM; + } - int ret= snprintf (cmd_str, cmd_len, + int ret= snprintf (cmd_str(), cmd_len, "wsrep_sst_%s " WSREP_SST_OPT_ROLE" 'donor' " WSREP_SST_OPT_ADDR" '%s' " - WSREP_SST_OPT_AUTH" '%s' " WSREP_SST_OPT_SOCKET" '%s' " WSREP_SST_OPT_DATA" '%s' " WSREP_SST_OPT_CONF" '%s' " WSREP_SST_OPT_GTID" '%s:%lld'" "%s", - method, addr, sst_auth_real, mysqld_unix_port, + method, addr, mysqld_unix_port, mysql_real_data_home, wsrep_defaults_file, uuid, (long long) seqno, bypass ? " "WSREP_SST_OPT_BYPASS : ""); @@ -966,7 +1000,7 @@ static int sst_donate_other (const char* method, if (!bypass && wsrep_sst_donor_rejects_queries) sst_reject_queries(FALSE); pthread_t tmp; - sst_thread_arg arg(cmd_str); + sst_thread_arg arg(cmd_str(), env); mysql_mutex_lock (&arg.lock); ret = pthread_create (&tmp, NULL, sst_donor_thread, &arg); if (ret) @@ -999,15 +1033,29 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx, char uuid_str[37]; wsrep_uuid_print (¤t_gtid->uuid, uuid_str, sizeof(uuid_str)); + wsp::env env(NULL); + if (env.error()) + { + WSREP_ERROR("sst_donate_other(): env var ctor failed: %d", -env.error()); + return WSREP_CB_FAILURE; + } + int ret; + if ((ret= sst_append_auth_env(env, sst_auth_real))) + { + WSREP_ERROR("sst_donate_other(): appending auth env failed: %d", ret); + return WSREP_CB_FAILURE; + } + if (!strcmp (WSREP_SST_MYSQLDUMP, method)) { ret = sst_donate_mysqldump(data, ¤t_gtid->uuid, uuid_str, - current_gtid->seqno, bypass); + current_gtid->seqno, bypass, env()); } else { - ret = sst_donate_other(method, data, uuid_str, current_gtid->seqno,bypass); + ret = sst_donate_other(method, data, uuid_str, + current_gtid->seqno, bypass, env()); } return (ret > 0 ? WSREP_CB_SUCCESS : WSREP_CB_FAILURE); diff --git a/sql/wsrep_utils.cc b/sql/wsrep_utils.cc index 8aab305b89dc..eda8207b7641 100644 --- a/sql/wsrep_utils.cc +++ b/sql/wsrep_utils.cc @@ -63,7 +63,7 @@ wsrep_prepend_PATH (const char* path) size_t const new_path_len(strlen(old_path) + strlen(":") + strlen(path) + 1); - char* const new_path (reinterpret_cast(malloc(new_path_len))); + char* const new_path (static_cast(malloc(new_path_len))); if (new_path) { @@ -89,6 +89,91 @@ wsrep_prepend_PATH (const char* path) namespace wsp { +bool +env::ctor_common(char** e) +{ + env_ = static_cast(malloc((len_ + 1) * sizeof(char*))); + + if (env_) + { + for (size_t i(0); i < len_; ++i) + { + assert(e[i]); // caller should make sure about len_ + env_[i] = strdup(e[i]); + if (!env_[i]) + { + errno_ = errno; + WSREP_ERROR("Failed to allocate env. var: %s", e[i]); + return true; + } + } + + env_[len_] = NULL; + return false; + } + else + { + errno_ = errno; + WSREP_ERROR("Failed to allocate env. var vector of length: %zu", len_); + return true; + } +} + +void +env::dtor() +{ + if (env_) + { + /* don't need to go beyond the first NULL */ + for (size_t i(0); env_[i] != NULL; ++i) { free(env_[i]); } + free(env_); + env_ = NULL; + } + len_ = 0; +} + +env::env(char** e) + : len_(0), env_(NULL), errno_(0) +{ + if (!e) { e = environ; } + /* count the size of the vector */ + while (e[len_]) { ++len_; } + + if (ctor_common(e)) dtor(); +} + +env::env(const env& e) + : len_(e.len_), env_(0), errno_(0) +{ + if (ctor_common(e.env_)) dtor(); +} + +env::~env() { dtor(); } + +int +env::append(const char* val) +{ + char** tmp = static_cast(realloc(env_, (len_ + 2)*sizeof(char*))); + + if (tmp) + { + env_ = tmp; + env_[len_] = strdup(val); + + if (env_[len_]) + { + ++len_; + env_[len_] = NULL; + } + } + + /* if either realloc() or strdup() failed, errno had been set */ + errno_ = errno; + + return errno_; +} + + #define PIPE_READ 0 #define PIPE_WRITE 1 #define STDIN_FD 0 @@ -98,7 +183,7 @@ namespace wsp # define POSIX_SPAWN_USEVFORK 0 #endif -process::process (const char* cmd, const char* type) +process::process (const char* cmd, const char* type, char** env) : str_(cmd ? strdup(cmd) : strdup("")), io_(NULL), err_(EINVAL), pid_(0) { if (0 == str_) @@ -120,6 +205,8 @@ process::process (const char* cmd, const char* type) return; } + if (NULL == env) { env = environ; } // default to global environment + int pipe_fds[2] = { -1, }; if (::pipe(pipe_fds)) { @@ -215,7 +302,7 @@ process::process (const char* cmd, const char* type) goto cleanup_fact; } - err_ = posix_spawnp (&pid_, pargv[0], &fact, &attr, pargv, environ); + err_ = posix_spawnp (&pid_, pargv[0], &fact, &attr, pargv, env); if (err_) { WSREP_ERROR ("posix_spawnp(%s) failed: %d (%s)", @@ -309,6 +396,7 @@ process::wait () { case 126: err_ = EACCES; break; /* Permission denied */ case 127: err_ = ENOENT; break; /* No such file or directory */ + case 143: err_ = EINTR; break; /* Subprocess killed */ } WSREP_ERROR("Process completed with error: %s: %d (%s)", str_, err_, strerror(err_)); diff --git a/sql/wsrep_utils.h b/sql/wsrep_utils.h index dfb68bcd1b7c..c43febf249a3 100644 --- a/sql/wsrep_utils.h +++ b/sql/wsrep_utils.h @@ -44,6 +44,25 @@ class node_status extern wsp::node_status local_status; namespace wsp { +/* a class to manage env vars array */ +class env +{ +private: + size_t len_; + char** env_; + int errno_; + bool ctor_common(char** e); + void dtor(); + env& operator =(env); +public: + explicit env(char** env); + explicit env(const env&); + ~env(); + int append(const char* var); /* add a new env. var */ + int error() const { return errno_; } + char** operator()() { return env_; } +}; + /* A small class to run external programs. */ class process { @@ -56,8 +75,9 @@ class process public: /*! @arg type is a pointer to a null-terminated string which must contain either the letter 'r' for reading or the letter 'w' for writing. + @arg env optional null-terminated vector of environment variables */ - process (const char* cmd, const char* type); + process (const char* cmd, const char* type, char** env); ~process (); FILE* pipe () { return io_; } @@ -90,6 +110,8 @@ class string { public: string() : string_(0) {} + explicit string(size_t s) : string_(static_cast(malloc(s))) {} + char* operator()() { return string_; } void set(char* str) { if (string_) free (string_); string_ = str; } ~string() { set (0); } private: From 8716392c1f08cb4710cf54cf7770b9d5f2b2cd1a Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Sat, 6 Jun 2015 01:38:07 +0300 Subject: [PATCH 043/305] Synced xtrabackup SST fixes from Percona tree (as of PXC 5.6.24-25.11 release). This fixes/adresses the following LP bugs: - LP1380697: wsrep_sst_xtrabackup-v2 doesn't stop when mysql is SIGKILLed. (full fix for this (as engineeered by Percona) requires Linux-specific patch that we don't carry, but keep xtrabackup scripts as close as possible) - LP1399134: Log the innobackupex/SST logs in SST to syslog if possible. (fixed) - LP1405668: Race condition between donor and joiner in PXB SST. (fixed) - LP1405985: Fail early if xtrabackup_checkkpoints is missing. (fixed) - LP1407599: wsrep_sst_xtrabackup-v2 script causes innobackupex to print a false positive stack trace into the log. (fixed) - LP1441762: IST Fails with SST script error. (fixed) - LP1451670: Fail when move-back fails in xtrabackup SST. (fixed) --- scripts/wsrep_sst_common.sh | 12 ++ scripts/wsrep_sst_xtrabackup-v2.sh | 304 +++++++++++++++++++---------- scripts/wsrep_sst_xtrabackup.sh | 6 +- 3 files changed, 214 insertions(+), 108 deletions(-) diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 2546074f7bde..81582ee30a57 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -19,6 +19,8 @@ set -u WSREP_SST_OPT_BYPASS=0 +WSREP_SST_OPT_BINLOG="" +WSREP_SST_OPT_CONF_SUFFIX="" WSREP_SST_OPT_DATA="" WSREP_SST_OPT_AUTH="" @@ -43,6 +45,10 @@ case "$1" in readonly WSREP_SST_OPT_CONF="$2" shift ;; + '--defaults-group-suffix') + WSREP_SST_OPT_CONF_SUFFIX="$2" + shift + ;; '--host') readonly WSREP_SST_OPT_HOST="$2" shift @@ -79,6 +85,10 @@ case "$1" in readonly WSREP_SST_OPT_GTID="$2" shift ;; + '--binlog') + WSREP_SST_OPT_BINLOG="$2" + shift + ;; *) # must be command # usage # exit 1 @@ -87,6 +97,8 @@ esac shift done readonly WSREP_SST_OPT_BYPASS +readonly WSREP_SST_OPT_BINLOG +readonly WSREP_SST_OPT_CONF_SUFFIX # try to use my_print_defaults, mysql and mysqldump that come with the sources # (for MTR suite) diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index 1669e4730d9c..7bee4000c773 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -29,6 +29,8 @@ ekeyfile="" encrypt=0 nproc=1 ecode=0 +ssyslog="" +ssystag="" XTRABACKUP_PID="" SST_PORT="" REMOTEIP="" @@ -40,15 +42,15 @@ progress="" ttime=0 totime=0 lsn="" -incremental=0 ecmd="" rlimit="" # Initially stagemsg="${WSREP_SST_OPT_ROLE}" cpat="" -speciald=0 +speciald=1 ib_home_dir="" ib_log_dir="" +ib_undo_dir="" sfmt="tar" strmcmd="" @@ -70,6 +72,11 @@ xtmpdir="" scomp="" sdecomp="" +# Required for backup locks +# For backup locks it is 1 sent by joiner +# 5.6.21 PXC and later can't donate to an older joiner +sst_ver=1 + if which pv &>/dev/null && pv --help | grep -q FORMAT;then pvopts+=$pvformat fi @@ -169,7 +176,11 @@ get_transfer() fi wsrep_log_info "Using netcat as streamer" if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then - tcmd="nc -dl ${TSST_PORT}" + if nc -h | grep -q ncat;then + tcmd="nc -l ${TSST_PORT}" + else + tcmd="nc -dl ${TSST_PORT}" + fi else tcmd="nc ${REMOTEIP} ${TSST_PORT}" fi @@ -253,6 +264,16 @@ get_footprint() adjust_progress() { + + if [[ ! -x `which pv` ]];then + wsrep_log_error "pv not found in path: $PATH" + wsrep_log_error "Disabling all progress/rate-limiting" + pcmd="" + rlimit="" + progress="" + return + fi + if [[ -n $progress && $progress != '1' ]];then if [[ -e $progress ]];then pcmd+=" 2>>$progress" @@ -282,8 +303,7 @@ read_cnf() progress=$(parse_cnf sst progress "") rebuild=$(parse_cnf sst rebuild 0) ttime=$(parse_cnf sst time 0) - cpat=$(parse_cnf sst cpat '.*galera\.cache$\|.*sst_in_progress$\|.*grastate\.dat$\|.*gvwstate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$') - incremental=$(parse_cnf sst incremental 0) + cpat=$(parse_cnf sst cpat '.*galera\.cache$\|.*sst_in_progress$\|.*\.sst$\|.*gvwstate\.dat$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$') ealgo=$(parse_cnf xtrabackup encrypt "") ekey=$(parse_cnf xtrabackup encrypt-key "") ekeyfile=$(parse_cnf xtrabackup encrypt-key-file "") @@ -298,12 +318,26 @@ read_cnf() ekeyfile=$(parse_cnf sst encrypt-key-file "") fi rlimit=$(parse_cnf sst rlimit "") - uextra=$(parse_cnf sst use_extra 0) + uextra=$(parse_cnf sst use-extra 0) speciald=$(parse_cnf sst sst-special-dirs 1) iopts=$(parse_cnf sst inno-backup-opts "") iapts=$(parse_cnf sst inno-apply-opts "") impts=$(parse_cnf sst inno-move-opts "") stimeout=$(parse_cnf sst sst-initial-timeout 100) + ssyslog=$(parse_cnf sst sst-syslog 0) + ssystag=$(parse_cnf mysqld_safe syslog-tag "${SST_SYSLOG_TAG:-}") + ssystag+="-" + + if [[ $speciald -eq 0 ]];then + wsrep_log_error "sst-special-dirs equal to 0 is not supported, falling back to 1" + speciald=1 + fi + + if [[ $ssyslog -ne -1 ]];then + if my_print_defaults -c $WSREP_SST_OPT_CONF mysqld_safe | tr '_' '-' | grep -q -- "--syslog";then + ssyslog=1 + fi + fi } get_stream() @@ -347,8 +381,7 @@ cleanup_joiner() local estatus=$? if [[ $estatus -ne 0 ]];then wsrep_log_error "Cleanup after exit with status:$estatus" - fi - if [ "${WSREP_SST_OPT_ROLE}" = "joiner" ];then + elif [ "${WSREP_SST_OPT_ROLE}" = "joiner" ];then wsrep_log_info "Removing the sst_in_progress file" wsrep_cleanup_progress_file fi @@ -359,6 +392,23 @@ cleanup_joiner() if [[ -n ${STATDIR:-} ]];then [[ -d $STATDIR ]] && rm -rf $STATDIR fi + + # Final cleanup + pgid=$(ps -o pgid= $$ | grep -o '[0-9]*') + + # This means no setsid done in mysqld. + # We don't want to kill mysqld here otherwise. + if [[ $$ -eq $pgid ]];then + + # This means a signal was delivered to the process. + # So, more cleanup. + if [[ $estatus -ge 128 ]];then + kill -KILL -$$ || true + fi + + fi + + exit $estatus } check_pid() @@ -399,6 +449,24 @@ cleanup_donor() if [[ -n $itmpdir ]];then [[ -d $itmpdir ]] && rm -rf $itmpdir || true fi + + # Final cleanup + pgid=$(ps -o pgid= $$ | grep -o '[0-9]*') + + # This means no setsid done in mysqld. + # We don't want to kill mysqld here otherwise. + if [[ $$ -eq $pgid ]];then + + # This means a signal was delivered to the process. + # So, more cleanup. + if [[ $estatus -ge 128 ]];then + kill -KILL -$$ || true + fi + + fi + + exit $estatus + } kill_xtrabackup() @@ -415,6 +483,7 @@ setup_ports() SST_PORT=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $2 }') REMOTEIP=$(echo $WSREP_SST_OPT_ADDR | awk -F ':' '{ print $1 }') lsn=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $4 }') + sst_ver=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $5 }') else SST_PORT=$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $2 }') fi @@ -432,11 +501,7 @@ wait_for_listen() ss -p state listening "( sport = :$PORT )" | grep -qE 'socat|nc' && break sleep 0.2 done - if [[ $incremental -eq 1 ]];then - echo "ready ${ADDR}/${MODULE}/$lsn" - else - echo "ready ${ADDR}/${MODULE}" - fi + echo "ready ${ADDR}/${MODULE}//$sst_ver" } check_extra() @@ -444,7 +509,7 @@ check_extra() local use_socket=1 if [[ $uextra -eq 1 ]];then if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--thread-handling=" | grep -q 'pool-of-threads';then - local eport=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--extra-port=" | cut -d= -f2) + local eport=$(my_print_defaults -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--extra-port=" | cut -d= -f2) if [[ -n $eport ]];then # Xtrabackup works only locally. # Hence, setting host to 127.0.0.1 unconditionally. @@ -469,8 +534,14 @@ recv_joiner() local dir=$1 local msg=$2 local tmt=$3 + local checkf=$4 local ltcmd + if [[ ! -d ${dir} ]];then + # This indicates that IST is in progress + return + fi + pushd ${dir} 1>/dev/null set +e @@ -478,7 +549,7 @@ recv_joiner() if timeout --help | grep -q -- '-k';then ltcmd="timeout -k $(( tmt+10 )) $tmt $tcmd" else - ltcmd="timeout $tmt $tcmd" + ltcmd="timeout -s9 $tmt $tcmd" fi timeit "$msg" "$ltcmd | $strmcmd; RC=( "\${PIPESTATUS[@]}" )" else @@ -501,7 +572,7 @@ recv_joiner() fi done - if [ ! -r "${MAGIC_FILE}" ];then + if [[ $checkf -eq 1 && ! -r "${MAGIC_FILE}" ]];then # this message should cause joiner to abort wsrep_log_error "xtrabackup process ended without creating '${MAGIC_FILE}'" wsrep_log_info "Contents of datadir" @@ -547,18 +618,52 @@ fi read_cnf setup_ports -get_stream -get_transfer -if ${INNOBACKUPEX_BIN} /tmp --help | grep -q -- '--version-check'; then +if ${INNOBACKUPEX_BIN} /tmp --help 2>/dev/null | grep -q -- '--version-check'; then disver="--no-version-check" fi +if [[ ${FORCE_FTWRL:-0} -eq 1 ]];then + wsrep_log_info "Forcing FTWRL due to environment variable FORCE_FTWRL equal to $FORCE_FTWRL" + iopts+=" --no-backup-locks " +fi + INNOEXTRA="" -INNOAPPLY="${INNOBACKUPEX_BIN} $disver $iapts --apply-log \$rebuildcmd \${DATA} &>\${DATA}/innobackup.prepare.log" -INNOMOVE="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $impts --move-back --force-non-empty-directories \${DATA} &>\${DATA}/innobackup.move.log" -INNOBACKUP="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2>\${DATA}/innobackup.backup.log" + +if [[ $ssyslog -eq 1 ]];then + + if [[ ! -x `which logger` ]];then + wsrep_log_error "logger not in path: $PATH. Ignoring" + else + + wsrep_log_info "Logging all stderr of SST/Innobackupex to syslog" + + exec 2> >(logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE) + + wsrep_log_error() + { + logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@" + } + + wsrep_log_info() + { + logger -p daemon.info -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@" + } + + INNOAPPLY="${INNOBACKUPEX_BIN} $disver $iapts --apply-log \$rebuildcmd \${DATA} 2>&1 | logger -p daemon.err -t ${ssystag}innobackupex-apply " + INNOMOVE="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $impts --move-back --force-non-empty-directories \${DATA} 2>&1 | logger -p daemon.err -t ${ssystag}innobackupex-move " + INNOBACKUP="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2> >(logger -p daemon.err -t ${ssystag}innobackupex-backup)" + fi + +else + INNOAPPLY="${INNOBACKUPEX_BIN} $disver $iapts --apply-log \$rebuildcmd \${DATA} &>\${DATA}/innobackup.prepare.log" + INNOMOVE="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} --defaults-group=mysqld${WSREP_SST_OPT_CONF_SUFFIX} $disver $impts --move-back --force-non-empty-directories \${DATA} &>\${DATA}/innobackup.move.log" + INNOBACKUP="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} --defaults-group=mysqld${WSREP_SST_OPT_CONF_SUFFIX} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2>\${DATA}/innobackup.backup.log" +fi + +get_stream +get_transfer if [ "$WSREP_SST_OPT_ROLE" = "donor" ] then @@ -566,6 +671,11 @@ then if [ $WSREP_SST_OPT_BYPASS -eq 0 ] then + if [[ -z $sst_ver ]];then + wsrep_log_error "Upgrade joiner to 5.6.21 or higher for backup locks support" + wsrep_log_error "The joiner is not supported for this version of donor" + exit 93 + fi if [[ -z $(parse_cnf mysqld tmpdir "") && -z $(parse_cnf xtrabackup tmpdir "") ]];then xtmpdir=$(mktemp -d) @@ -596,9 +706,6 @@ then fi fi - if [[ -n $lsn ]];then - INNOEXTRA+=" --incremental --incremental-lsn=$lsn " - fi check_extra @@ -686,29 +793,12 @@ then [[ -e $SST_PROGRESS_FILE ]] && wsrep_log_info "Stale sst_in_progress file: $SST_PROGRESS_FILE" [[ -n $SST_PROGRESS_FILE ]] && touch $SST_PROGRESS_FILE - if [[ $speciald -eq 1 ]];then - wsrep_log_info "WARNING: sst-special-dirs feature requires PXC 2.1.6 or latter." - fi - - if [[ $speciald -eq 1 ]];then - ib_home_dir=$(parse_cnf mysqld innodb-data-home-dir "") - ib_log_dir=$(parse_cnf mysqld innodb-log-group-home-dir "") - if [[ -z $ib_home_dir && -z $ib_log_dir ]];then - speciald=0 - fi - fi + ib_home_dir=$(parse_cnf mysqld innodb-data-home-dir "") + ib_log_dir=$(parse_cnf mysqld innodb-log-group-home-dir "") + ib_undo_dir=$(parse_cnf mysqld innodb-undo-directory "") stagemsg="Joiner-Recv" - if [[ ! -e ${DATA}/ibdata1 ]];then - incremental=0 - fi - - if [[ $incremental -eq 1 ]];then - wsrep_log_info "Incremental SST enabled: NOT SUPPORTED yet" - lsn=$(grep to_lsn xtrabackup_checkpoints | cut -d= -f2 | tr -d ' ') - wsrep_log_info "Recovered LSN: $lsn" - fi sencrypted=1 nthreads=1 @@ -737,12 +827,6 @@ then tcmd+=" | $pcmd" fi - if [[ $incremental -eq 1 ]];then - BDATA=$DATA - DATA=$(mktemp -d) - MAGIC_FILE="${DATA}/${INFO_FILE}" - fi - get_keys if [[ $encrypt -eq 1 && $sencrypted -eq 1 ]];then if [[ -n $sdecomp ]];then @@ -756,7 +840,8 @@ then STATDIR=$(mktemp -d) MAGIC_FILE="${STATDIR}/${INFO_FILE}" - recv_joiner $STATDIR "${stagemsg}-gtid" $stimeout + recv_joiner $STATDIR "${stagemsg}-gtid" $stimeout 1 + if ! ps -p ${WSREP_SST_OPT_PARENT} &>/dev/null then @@ -766,50 +851,48 @@ then if [ ! -r "${STATDIR}/${IST_FILE}" ] then - wsrep_log_info "Proceeding with SST" - if [[ $speciald -eq 1 && -d ${DATA}/.sst ]];then - wsrep_log_info "WARNING: Stale temporary SST directory: ${DATA}/.sst from previous SST" + if [[ -d ${DATA}/.sst ]];then + wsrep_log_info "WARNING: Stale temporary SST directory: ${DATA}/.sst from previous state transfer" fi + mkdir -p ${DATA}/.sst + (recv_joiner $DATA/.sst "${stagemsg}-SST" 0 0) & + jpid=$! + wsrep_log_info "Proceeding with SST" - if [[ $incremental -ne 1 ]];then - if [[ $speciald -eq 1 ]];then - wsrep_log_info "Cleaning the existing datadir and innodb-data/log directories" - find $ib_home_dir $ib_log_dir $DATA -mindepth 1 -regex $cpat -prune -o -exec rm -rfv {} 1>&2 \+ - else - wsrep_log_info "Cleaning the existing datadir" - find $DATA -mindepth 1 -regex $cpat -prune -o -exec rm -rfv {} 1>&2 \+ - fi - tempdir=$(parse_cnf mysqld log-bin "") - if [[ -n ${tempdir:-} ]];then - binlog_dir=$(dirname $tempdir) - binlog_file=$(basename $tempdir) - if [[ -n ${binlog_dir:-} && $binlog_dir != '.' && $binlog_dir != $DATA ]];then - pattern="$binlog_dir/$binlog_file\.[0-9]+$" - wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" - find $binlog_dir -maxdepth 1 -type f -regex $pattern -exec rm -fv {} 1>&2 \+ - rm $binlog_dir/*.index || true - fi - fi - else - wsrep_log_info "Removing existing ib_logfile files" - rm -f ${BDATA}/ib_logfile* + wsrep_log_info "Cleaning the existing datadir and innodb-data/log directories" + find $ib_home_dir $ib_log_dir $ib_undo_dir $DATA -mindepth 1 -regex $cpat -prune -o -exec rm -rfv {} 1>&2 \+ + + tempdir=$(parse_cnf mysqld log-bin "") + if [[ -n ${tempdir:-} ]];then + binlog_dir=$(dirname $tempdir) + binlog_file=$(basename $tempdir) + if [[ -n ${binlog_dir:-} && $binlog_dir != '.' && $binlog_dir != $DATA ]];then + pattern="$binlog_dir/$binlog_file\.[0-9]+$" + wsrep_log_info "Cleaning the binlog directory $binlog_dir as well" + find $binlog_dir -maxdepth 1 -type f -regex $pattern -exec rm -fv {} 1>&2 \+ || true + rm $binlog_dir/*.index || true + fi fi - if [[ $speciald -eq 1 ]];then - mkdir -p ${DATA}/.sst - TDATA=${DATA} - DATA="${DATA}/.sst" - fi + + TDATA=${DATA} + DATA="${DATA}/.sst" MAGIC_FILE="${DATA}/${INFO_FILE}" - recv_joiner $DATA "${stagemsg}-SST" 0 + wsrep_log_info "Waiting for SST streaming to complete!" + wait $jpid get_proc + if [[ ! -s ${DATA}/xtrabackup_checkpoints ]];then + wsrep_log_error "xtrabackup_checkpoints missing, failed innobackupex/SST on donor" + exit 2 + fi + # Rebuild indexes for compact backups if grep -q 'compact = 1' ${DATA}/xtrabackup_checkpoints;then wsrep_log_info "Index compaction detected" @@ -864,12 +947,24 @@ then fi fi - if [[ $incremental -eq 1 ]];then - # Added --ibbackup=xtrabackup_55 because it fails otherwise citing connection issues. - INNOAPPLY="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} \ - --ibbackup=xtrabackup_55 --apply-log $rebuildcmd --redo-only $BDATA --incremental-dir=${DATA} &>>${BDATA}/innobackup.prepare.log" + + if [[ ! -z $WSREP_SST_OPT_BINLOG ]];then + + BINLOG_DIRNAME=$(dirname $WSREP_SST_OPT_BINLOG) + BINLOG_FILENAME=$(basename $WSREP_SST_OPT_BINLOG) + + # To avoid comparing data directory and BINLOG_DIRNAME + mv $DATA/${BINLOG_FILENAME}.* $BINLOG_DIRNAME/ 2>/dev/null || true + + pushd $BINLOG_DIRNAME &>/dev/null + for bfiles in $(ls -1 ${BINLOG_FILENAME}.*);do + echo ${BINLOG_DIRNAME}/${bfiles} >> ${BINLOG_FILENAME}.index + done + popd &> /dev/null + fi + wsrep_log_info "Preparing the backup at ${DATA}" timeit "Xtrabackup prepare stage" "$INNOAPPLY" @@ -879,28 +974,22 @@ then exit 22 fi - if [[ $speciald -eq 1 ]];then - MAGIC_FILE="${TDATA}/${INFO_FILE}" - set +e - rm $TDATA/innobackup.prepare.log $TDATA/innobackup.move.log - set -e - wsrep_log_info "Moving the backup to ${TDATA}" - timeit "Xtrabackup move stage" "$INNOMOVE" - if [[ $? -eq 0 ]];then - wsrep_log_info "Move successful, removing ${DATA}" - rm -rf $DATA - DATA=${TDATA} - else - wsrep_log_error "Move failed, keeping ${DATA} for further diagnosis" - wsrep_log_error "Check ${DATA}/innobackup.move.log for details" - fi + MAGIC_FILE="${TDATA}/${INFO_FILE}" + set +e + rm $TDATA/innobackup.prepare.log $TDATA/innobackup.move.log + set -e + wsrep_log_info "Moving the backup to ${TDATA}" + timeit "Xtrabackup move stage" "$INNOMOVE" + if [[ $? -eq 0 ]];then + wsrep_log_info "Move successful, removing ${DATA}" + rm -rf $DATA + DATA=${TDATA} + else + wsrep_log_error "Move failed, keeping ${DATA} for further diagnosis" + wsrep_log_error "Check ${DATA}/innobackup.move.log for details" + exit 22 fi - if [[ $incremental -eq 1 ]];then - wsrep_log_info "Cleaning up ${DATA} after incremental SST" - [[ -d ${DATA} ]] && rm -rf ${DATA} - DATA=$BDATA - fi else wsrep_log_info "${IST_FILE} received from donor: Running IST" @@ -910,6 +999,7 @@ then wsrep_log_error "SST magic file ${MAGIC_FILE} not found/readable" exit 2 fi + wsrep_log_info "Galera co-ords from recovery: $(cat ${MAGIC_FILE})" cat "${MAGIC_FILE}" # output UUID:seqno wsrep_log_info "Total time on joiner: $totime seconds" fi diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh index 05dbcea70df6..4b89811b20fa 100644 --- a/scripts/wsrep_sst_xtrabackup.sh +++ b/scripts/wsrep_sst_xtrabackup.sh @@ -150,7 +150,11 @@ get_transfer() fi wsrep_log_info "Using netcat as streamer" if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then - tcmd="nc -dl ${TSST_PORT}" + if nc -h | grep -q ncat;then + tcmd="nc -l ${TSST_PORT}" + else + tcmd="nc -dl ${TSST_PORT}" + fi else tcmd="nc ${REMOTEIP} ${TSST_PORT}" fi From b3011e0e320e1fb133f8306b77fa559d0479b6cd Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Mon, 8 Jun 2015 01:46:20 -0700 Subject: [PATCH 044/305] Refs codership/mysql-wsrep#143 . Account for the case where the SST password is empty --- scripts/wsrep_sst_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index f7cd9e918497..f6d838ef425d 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -144,7 +144,7 @@ if ! wsrep_auth_not_set then readonly AUTH_VEC=(${WSREP_SST_OPT_AUTH//:/ }) [ -n "${AUTH_VEC[0]}" ] && WSREP_SST_OPT_USER="${AUTH_VEC[0]}" - [ -n "${AUTH_VEC[1]}" ] && WSREP_SST_OPT_PSWD="${AUTH_VEC[1]}" + [ -n "${AUTH_VEC[1]:-}" ] && WSREP_SST_OPT_PSWD="${AUTH_VEC[1]:-}" fi readonly WSREP_SST_OPT_USER readonly WSREP_SST_OPT_PSWD From efbb8d71d5ec84220fd989b7a8ad5a8fc38cb423 Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Mon, 8 Jun 2015 12:23:53 +0300 Subject: [PATCH 045/305] Slight cleanup improvement on a previous commit. --- scripts/wsrep_sst_common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index f6d838ef425d..0aa338510e0d 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -143,8 +143,8 @@ readonly WSREP_SST_OPT_AUTH if ! wsrep_auth_not_set then readonly AUTH_VEC=(${WSREP_SST_OPT_AUTH//:/ }) - [ -n "${AUTH_VEC[0]}" ] && WSREP_SST_OPT_USER="${AUTH_VEC[0]}" - [ -n "${AUTH_VEC[1]:-}" ] && WSREP_SST_OPT_PSWD="${AUTH_VEC[1]:-}" + WSREP_SST_OPT_USER="${AUTH_VEC[0]:-}" + WSREP_SST_OPT_PSWD="${AUTH_VEC[1]:-}" fi readonly WSREP_SST_OPT_USER readonly WSREP_SST_OPT_PSWD From 0d16f7b4012f8b0840dda6dc4c3ac1066be10132 Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Mon, 8 Jun 2015 21:06:22 +0300 Subject: [PATCH 046/305] This commit fixes - errno handling in wsp::env::append() method, where error could be returned by mistake - return code of sst_prepare_other() when pthread_create() fails - it was returning positive error code which by convention is treated as success. --- sql/wsrep_sst.cc | 4 ++-- sql/wsrep_utils.cc | 7 +++---- sql/wsrep_utils.h | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index d6642430fa6e..f7eb63f51891 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -1,4 +1,4 @@ -/* Copyright 2008-2012 Codership Oy +/* Copyright 2008-2015 Codership Oy 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 @@ -479,7 +479,7 @@ static ssize_t sst_prepare_other (const char* method, { WSREP_ERROR("sst_prepare_other(): pthread_create() failed: %d (%s)", ret, strerror(ret)); - return ret; + return -ret; } mysql_cond_wait (&arg.cond, &arg.lock); diff --git a/sql/wsrep_utils.cc b/sql/wsrep_utils.cc index eda8207b7641..45a78ad392e5 100644 --- a/sql/wsrep_utils.cc +++ b/sql/wsrep_utils.cc @@ -1,4 +1,4 @@ -/* Copyright 2010 Codership Oy +/* Copyright 2010-2015 Codership Oy 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 @@ -165,10 +165,9 @@ env::append(const char* val) ++len_; env_[len_] = NULL; } + else errno_ = errno; } - - /* if either realloc() or strdup() failed, errno had been set */ - errno_ = errno; + else errno_ = errno; return errno_; } diff --git a/sql/wsrep_utils.h b/sql/wsrep_utils.h index c43febf249a3..7d864603c7f1 100644 --- a/sql/wsrep_utils.h +++ b/sql/wsrep_utils.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013 Codership Oy +/* Copyright (C) 2013-2015 Codership Oy 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 From 8ddd3b5191ec331013a5dc58618e8fba75aa0bde Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Tue, 9 Jun 2015 11:36:31 +0300 Subject: [PATCH 047/305] Logging message cleanup --- sql/wsrep_sst.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index f7eb63f51891..5c96ccf1f90a 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -1036,14 +1036,14 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx, wsp::env env(NULL); if (env.error()) { - WSREP_ERROR("sst_donate_other(): env var ctor failed: %d", -env.error()); + WSREP_ERROR("wsrep_sst_donate_cb(): env var ctor failed: %d", -env.error()); return WSREP_CB_FAILURE; } int ret; if ((ret= sst_append_auth_env(env, sst_auth_real))) { - WSREP_ERROR("sst_donate_other(): appending auth env failed: %d", ret); + WSREP_ERROR("wsrep_sst_donate_cb(): appending auth env failed: %d", ret); return WSREP_CB_FAILURE; } From 47b7dd6b27d7e0b4b83f78ca38b948753a0fa1ce Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Tue, 9 Jun 2015 17:02:26 +0300 Subject: [PATCH 048/305] Fixing donate callback return code --- sql/wsrep_sst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index 5c96ccf1f90a..930d40e6ac9c 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -1058,7 +1058,7 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx, current_gtid->seqno, bypass, env()); } - return (ret > 0 ? WSREP_CB_SUCCESS : WSREP_CB_FAILURE); + return (ret >= 0 ? WSREP_CB_SUCCESS : WSREP_CB_FAILURE); } void wsrep_SE_init_grab() From 39f2964567e90d348fdc96c1208231d53dcaaed2 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 7 Jul 2015 22:34:25 -0700 Subject: [PATCH 049/305] Fixes codership/mysql-wsrep#153 use --defaults-extra-file with mysqldump SST --- scripts/wsrep_sst_mysqldump.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh index b470ea6095b5..988f9232da8d 100644 --- a/scripts/wsrep_sst_mysqldump.sh +++ b/scripts/wsrep_sst_mysqldump.sh @@ -77,7 +77,8 @@ fi STOP_WSREP="SET wsrep_on=OFF;" # NOTE: we don't use --routines here because we're dumping mysql.proc table -MYSQLDUMP="$MYSQLDUMP $AUTH -S$WSREP_SST_OPT_SOCKET \ +MYSQLDUMP="$MYSQLDUMP --defaults-extra-file=$WSREP_SST_OPT_CONF \ +$AUTH -S$WSREP_SST_OPT_SOCKET \ --add-drop-database --add-drop-table --skip-add-locks --create-options \ --disable-keys --extended-insert --skip-lock-tables --quick --set-charset \ --skip-comments --flush-privileges --all-databases --events" @@ -102,7 +103,8 @@ DROP PREPARE stmt;" SET_START_POSITION="SET GLOBAL wsrep_start_position='$WSREP_SST_OPT_GTID';" -MYSQL="$MYSQL_CLIENT $AUTH -h$WSREP_SST_OPT_HOST -P$WSREP_SST_OPT_PORT "\ +MYSQL="$MYSQL_CLIENT --defaults-extra-file=$WSREP_SST_OPT_CONF "\ +"$AUTH -h$WSREP_SST_OPT_HOST -P$WSREP_SST_OPT_PORT "\ "--disable-reconnect --connect_timeout=10" # need to disable logging when loading the dump From 127ce82e512bed62ad7da91de63a866f43ee7ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Wed, 22 Jul 2015 21:31:20 +0300 Subject: [PATCH 050/305] d/rules: extend PATH to enable later use of ccache Similar change was done on 5.6 branch but due to fundamental differences in the rules file that change could not be cherry-picked --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 1fbecb5aaee5..fe4e8d1b4500 100755 --- a/debian/rules +++ b/debian/rules @@ -61,7 +61,7 @@ ifneq ($(ARCH_OS),hurd) endif ( test -d $(builddir) || mkdir $(builddir) ) && cd $(builddir) && \ - sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/bin:/usr/bin"} \ + sh -c 'PATH=$${MYSQL_BUILD_PATH:-"/usr/local/bin:/usr/bin:/bin"} \ CC=$${MYSQL_BUILD_CC:-gcc} \ CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-O2 -DBIG_JOINS=1 ${FORCE_FPIC_CFLAGS} -fno-strict-aliasing"} \ CXX=$${MYSQL_BUILD_CXX:-g++} \ From feb1f55e4e0b3765d456d614c39e709894343847 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 19 Aug 2015 16:51:29 +0300 Subject: [PATCH 051/305] Refs codership/mysql-wsrep#173 - merge with mysql-server/5.5.43 --- VERSION | 2 +- cmake/compile_flags.cmake | 8 +- mysql-test/r/sp.result | 108 ++++++++++ mysql-test/r/trigger-trans.result | 25 +++ .../suite/rpl/r/rpl_special_charset.result | 7 + mysql-test/suite/rpl/t/rpl_drop_db_fail.test | 2 + .../rpl/t/rpl_special_charset-master.opt | 1 + .../suite/rpl/t/rpl_special_charset-slave.opt | 1 + .../suite/rpl/t/rpl_special_charset.test | 25 +++ ...transaction_alloc_block_size_basic.result} | 28 +-- ...ansaction_alloc_block_size_basic_64.result | 188 ------------------ ...=> transaction_prealloc_size_basic.result} | 22 +- .../transaction_prealloc_size_basic_32.result | 172 ---------------- mysql-test/suite/sys_vars/t/disabled.def | 2 - .../transaction_alloc_block_size_basic.test} | 14 +- ...transaction_alloc_block_size_basic_32.test | 9 - ...transaction_alloc_block_size_basic_64.test | 9 - .../transaction_prealloc_size_basic.test} | 10 +- .../t/transaction_prealloc_size_basic_32.test | 9 - .../t/transaction_prealloc_size_basic_64.test | 9 - mysql-test/t/file_contents.test | 4 +- mysql-test/t/sp.test | 118 +++++++++++ mysql-test/t/trigger-trans.test | 54 +++++ packaging/rpm-sles/mysql.spec.in | 8 +- scripts/mysqld_safe.sh | 2 +- sql/item.h | 6 +- sql/mysqld.cc | 5 +- sql/slave.cc | 20 +- sql/sp.cc | 10 +- sql/sql_base.cc | 4 +- sql/sql_class.cc | 47 +++-- sql/sql_class.h | 6 +- sql/sql_select.cc | 46 ++++- sql/sql_table.cc | 6 +- sql/sql_truncate.cc | 8 +- sql/sql_yacc.yy | 9 +- sql/sys_vars.cc | 6 +- storage/federated/ha_federated.cc | 4 +- 38 files changed, 503 insertions(+), 511 deletions(-) create mode 100644 mysql-test/suite/rpl/r/rpl_special_charset.result create mode 100644 mysql-test/suite/rpl/t/rpl_special_charset-master.opt create mode 100644 mysql-test/suite/rpl/t/rpl_special_charset-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_special_charset.test rename mysql-test/suite/sys_vars/r/{transaction_alloc_block_size_basic_32.result => transaction_alloc_block_size_basic.result} (90%) delete mode 100644 mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result rename mysql-test/suite/sys_vars/r/{transaction_prealloc_size_basic_64.result => transaction_prealloc_size_basic.result} (92%) delete mode 100644 mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result rename mysql-test/suite/sys_vars/{inc/transaction_alloc_block_size_basic.inc => t/transaction_alloc_block_size_basic.test} (95%) delete mode 100644 mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test delete mode 100644 mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test rename mysql-test/suite/sys_vars/{inc/transaction_prealloc_size_basic.inc => t/transaction_prealloc_size_basic.test} (96%) delete mode 100644 mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test delete mode 100644 mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test diff --git a/VERSION b/VERSION index 78c69c9f30df..dbfc5f823c9e 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 -MYSQL_VERSION_PATCH=42 +MYSQL_VERSION_PATCH=43 MYSQL_VERSION_EXTRA= diff --git a/cmake/compile_flags.cmake b/cmake/compile_flags.cmake index 5e872f981b0c..b39bf7b79d65 100644 --- a/cmake/compile_flags.cmake +++ b/cmake/compile_flags.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -18,11 +18,11 @@ MACRO(ADD_COMPILE_FLAGS) SET(FILES "") SET(FLAGS "") - SET(COMPILE_FLAGS) + SET(COMPILE_FLAGS_SEEN) FOREACH(ARG ${ARGV}) IF(ARG STREQUAL "COMPILE_FLAGS") - SET(COMPILE_FLAGS "COMPILE_FLAGS") - ELSEIF(COMPILE_FLAGS) + SET(COMPILE_FLAGS_SEEN 1) + ELSEIF(COMPILE_FLAGS_SEEN) LIST(APPEND FLAGS ${ARG}) ELSE() LIST(APPEND FILES ${ARG}) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 10350708e44d..4d93ce202fe3 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -7809,3 +7809,111 @@ Warnings: Error 1424 Recursive stored functions and triggers are not allowed. Error 1305 FUNCTION test.f1 does not exist DROP FUNCTION f1; + +# +# BUG 16041903: CONTINUE HANDLER NOT INVOKED +# IN A STORED FUNCTION AFTER A LOCK WAIT TIMEOUT +# + +# Save and set lock wait timeout +SET @lock_wait_timeout_saved= @@lock_wait_timeout; +SET @innodb_lock_wait_timeout_saved= @@innodb_lock_wait_timeout; +SET @@lock_wait_timeout= 1; +SET @@innodb_lock_wait_timeout= 1; + +# Create a function with exit handler: +CREATE FUNCTION f1() RETURNS VARCHAR(20) +BEGIN +DECLARE EXIT HANDLER FOR SQLSTATE '42S02' RETURN 'No such table'; +INSERT INTO no_such_table VALUES (1); +END// + +# Create a function calling f1(): +CREATE FUNCTION f2() RETURNS VARCHAR(20) +BEGIN +RETURN f1(); +END// + +# Create a function provoking deadlock: +CREATE FUNCTION f3() RETURNS VARCHAR(20) +BEGIN +UPDATE t1 SET i= 1 WHERE i= 1; +RETURN 'Will never get here'; +END// + +# Create a function calling f3, to create +# a deadlock indirectly: +CREATE FUNCTION f4() RETURNS VARCHAR(20) +BEGIN +RETURN f3(); +END// + +# Open another connection, create and initialize a table +# to be used for provoking deadlock, put a lock on the table: +CREATE TABLE t1 (i INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +SET AUTOCOMMIT= 0; +UPDATE t1 SET i=1 WHERE i=1; + +# On the default connection, do an update to provoke a +# deadlock, then call the function with handler. This case +# fails without the patch (with error ER_NO_SUCH_TABLE): +SET AUTOCOMMIT= 0; +UPDATE t1 SET i=1 WHERE i=1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SELECT f1() AS 'f1():'; +f1(): +No such table +Warnings: +Error 1146 Table 'test.no_such_table' doesn't exist + +# Provoke another deadlock, then call the function with +# handler indirectly. This case fails without the patch +# (with error ER_NO_SUCH_TABLE): +UPDATE t1 SET i= 1 WHERE i= 1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SELECT f2() AS 'f2():'; +f2(): +No such table +Warnings: +Error 1146 Table 'test.no_such_table' doesn't exist + +# Provoke yet another deadlock, but now from within a function, +# then call the function with handler. This succeeds even +# without the patch because is_fatal_sub_stmt_error is reset +# in restore_sub_stmt after the failing function has been +# executed. The test case is included anyway for better coverage: +SELECT f3() AS 'f3():'; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SELECT f1() AS 'f1():'; +f1(): +No such table +Warnings: +Error 1146 Table 'test.no_such_table' doesn't exist +# Provoke yet another deadlock, but now from within a function, +# calling another function, then call the function with handler. +# This succeeds even without the patch because +# is_fatal_sub_stmt_error is reset in restore_sub_stmt after +# the failing function has been executed. The test case is +# included anyway for better coverage: +SELECT f4() AS 'f4():'; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SELECT f1() AS 'f1():'; +f1(): +No such table +Warnings: +Error 1146 Table 'test.no_such_table' doesn't exist + +# Disconnect, drop functions and table: +DROP FUNCTION f4; +DROP FUNCTION f3; +DROP FUNCTION f2; +DROP FUNCTION f1; +DROP TABLE t1; + +# Reset lock wait timeouts +SET @@lock_wait_timeout= @lock_wait_timeout_saved; +SET @@innodb_lock_wait_timeout= @innodb_lock_wait_timeout_saved; +# +# BUG 16041903: End of test case +# diff --git a/mysql-test/r/trigger-trans.result b/mysql-test/r/trigger-trans.result index 722ac79854d1..cab7336cbe54 100644 --- a/mysql-test/r/trigger-trans.result +++ b/mysql-test/r/trigger-trans.result @@ -195,3 +195,28 @@ b val 14 g drop trigger t1_after_insert; drop table t1,t2; +# +#Bug#19683834 SOME INNODB ERRORS CAUSES STORED FUNCTION +# AND TRIGGER HANDLERS TO BE IGNORED +#Code fixed in Bug#16041903 +CREATE TABLE t1 (id int unsigned PRIMARY KEY, val int DEFAULT 0) +ENGINE=InnoDB; +INSERT INTO t1 (id) VALUES (1), (2); +CREATE TABLE t2 (id int PRIMARY KEY); +CREATE TABLE t3 LIKE t2; +CREATE TRIGGER bef_insert BEFORE INSERT ON t2 FOR EACH ROW +BEGIN +DECLARE CONTINUE HANDLER FOR 1062 BEGIN END; +INSERT INTO t3 (id) VALUES (NEW.id); +INSERT INTO t3 (id) VALUES (NEW.id); +END// +START TRANSACTION; +UPDATE t1 SET val = val + 1; +connect con2,localhost,root,,test,,; +SET SESSION innodb_lock_wait_timeout = 2; +UPDATE t1 SET val = val + 1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +INSERT INTO t2 (id) VALUES (1); +disconnect con2; +connection default; +DROP TABLE t3, t2, t1; diff --git a/mysql-test/suite/rpl/r/rpl_special_charset.result b/mysql-test/suite/rpl/r/rpl_special_charset.result new file mode 100644 index 000000000000..2aa1fe01da47 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_special_charset.result @@ -0,0 +1,7 @@ +include/master-slave.inc +[connection master] +CREATE TABLE t1(i VARCHAR(20)); +INSERT INTO t1 VALUES (0xFFFF); +include/diff_tables.inc [master:t1, slave:t1] +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop_db_fail.test b/mysql-test/suite/rpl/t/rpl_drop_db_fail.test index 9cf60cf2adfd..f0ba06b46c54 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_db_fail.test +++ b/mysql-test/suite/rpl/t/rpl_drop_db_fail.test @@ -17,7 +17,9 @@ use db1; CREATE TABLE a(id INT); CREATE VIEW v AS SELECT * FROM a; CREATE TABLE table_father(id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(20)) ENGINE=INNODB; +--sync_slave_with_master +connection master; use db2; CREATE TABLE table_child(id INT PRIMARY KEY, info VARCHAR(20), father_id INT) ENGINE=INNODB; ALTER TABLE table_child ADD CONSTRAINT aaa FOREIGN KEY (father_id) REFERENCES db1.table_father(id); diff --git a/mysql-test/suite/rpl/t/rpl_special_charset-master.opt b/mysql-test/suite/rpl/t/rpl_special_charset-master.opt new file mode 100644 index 000000000000..b071fb20845f --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_special_charset-master.opt @@ -0,0 +1 @@ +--character-set-server=utf16 diff --git a/mysql-test/suite/rpl/t/rpl_special_charset-slave.opt b/mysql-test/suite/rpl/t/rpl_special_charset-slave.opt new file mode 100644 index 000000000000..b071fb20845f --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_special_charset-slave.opt @@ -0,0 +1 @@ +--character-set-server=utf16 diff --git a/mysql-test/suite/rpl/t/rpl_special_charset.test b/mysql-test/suite/rpl/t/rpl_special_charset.test new file mode 100644 index 000000000000..9b51eba8d5a1 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_special_charset.test @@ -0,0 +1,25 @@ +################################################################################ +# Bug#19855907 IO THREAD AUTHENTICATION ISSUE WITH SOME CHARACTER SETS +# Problem: IO thread fails to connect to master if servers are configured with +# special character sets like utf16, utf32, ucs2. +# +# Analysis: MySQL server does not support few special character sets like +# utf16,utf32 and ucs2 as "client's character set"(eg: utf16,utf32, ucs2). +# When IO thread is trying to connect to Master, it sets server's character +# set as client's character set. When Slave server is started with these +# special character sets, IO thread (a connection to Master) fails because +# of the above said reason. +# +# Fix: If server's character set is not supported as client's character set, +# then set default's client character set(latin1) as client's character set. +############################################################################### +--source include/master-slave.inc +CREATE TABLE t1(i VARCHAR(20)); +INSERT INTO t1 VALUES (0xFFFF); +--sync_slave_with_master +--let diff_tables=master:t1, slave:t1 +--source include/diff_tables.inc +# Cleanup +--connection master +DROP TABLE t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result similarity index 90% rename from mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result rename to mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result index a7afc334ba1b..719adb675731 100644 --- a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result +++ b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result @@ -41,23 +41,11 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '60020' SELECT @@global.transaction_alloc_block_size; @@global.transaction_alloc_block_size 59392 -SET @@global.transaction_alloc_block_size = 4294967295; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -4294966272 '#--------------------FN_DYNVARS_005_04-------------------------#' SET @@session.transaction_alloc_block_size = 1024; SELECT @@session.transaction_alloc_block_size; @@session.transaction_alloc_block_size 1024 -SET @@session.transaction_alloc_block_size =4294967295; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295' -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -4294966272 SET @@session.transaction_alloc_block_size = 65535; Warnings: Warning 1292 Truncated incorrect transaction_alloc_block_size value: '65535' @@ -77,12 +65,12 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '-1024' SELECT @@global.transaction_alloc_block_size; @@global.transaction_alloc_block_size 1024 -SET @@global.transaction_alloc_block_size = 123456789201; +SET @@global.transaction_alloc_block_size = 135217728; Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '123456789201' +Warning 1292 Truncated incorrect transaction_alloc_block_size value: '135217728' SELECT @@global.transaction_alloc_block_size; @@global.transaction_alloc_block_size -4294966272 +134217728 SET @@global.transaction_alloc_block_size = ON; ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' SET @@global.transaction_alloc_block_size = OFF; @@ -109,12 +97,12 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1000' SELECT @@global.transaction_alloc_block_size; @@global.transaction_alloc_block_size 1024 -SET @@session.transaction_alloc_block_size = 12345678901; +SET @@session.transaction_alloc_block_size = 135217728; Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '12345678901' +Warning 1292 Truncated incorrect transaction_alloc_block_size value: '135217728' SELECT @@session.transaction_alloc_block_size; @@session.transaction_alloc_block_size -4294966272 +134217728 SET @@session.transaction_alloc_block_size = ON; ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' SET @@session.transaction_alloc_block_size = OFF; @@ -149,9 +137,7 @@ WHERE VARIABLE_NAME='transaction_alloc_block_size'; 1 '#---------------------FN_DYNVARS_001_08----------------------#' SET @@transaction_alloc_block_size = 1024; -SET @@global.transaction_alloc_block_size = 4294967295; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295' +SET @@global.transaction_alloc_block_size = 134217728; SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size; @@transaction_alloc_block_size = @@global.transaction_alloc_block_size 0 diff --git a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result deleted file mode 100644 index 3c9584392311..000000000000 --- a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result +++ /dev/null @@ -1,188 +0,0 @@ -SET @start_global_value = @@global.transaction_alloc_block_size; -SELECT @start_global_value; -@start_global_value -8192 -SET @start_session_value = @@session.transaction_alloc_block_size; -SELECT @start_session_value; -@start_session_value -8192 -'#--------------------FN_DYNVARS_005_01-------------------------#' -SET @@global.transaction_alloc_block_size = 100; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '100' -SET @@global.transaction_alloc_block_size = DEFAULT; -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -8192 -SET @@session.transaction_alloc_block_size = 200; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '200' -SET @@session.transaction_alloc_block_size = DEFAULT; -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -8192 -'#--------------------FN_DYNVARS_005_02-------------------------#' -SET @@global.transaction_alloc_block_size = DEFAULT; -SELECT @@global.transaction_alloc_block_size = 8192; -@@global.transaction_alloc_block_size = 8192 -1 -SET @@session.transaction_alloc_block_size = DEFAULT; -SELECT @@session.transaction_alloc_block_size = 8192; -@@session.transaction_alloc_block_size = 8192 -1 -'#--------------------FN_DYNVARS_005_03-------------------------#' -SET @@global.transaction_alloc_block_size = 1024; -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -1024 -SET @@global.transaction_alloc_block_size = 60020; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '60020' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -59392 -SET @@global.transaction_alloc_block_size = 4294967295; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -4294966272 -'#--------------------FN_DYNVARS_005_04-------------------------#' -SET @@session.transaction_alloc_block_size = 1024; -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -1024 -SET @@session.transaction_alloc_block_size =4294967295; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295' -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -4294966272 -SET @@session.transaction_alloc_block_size = 65535; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '65535' -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -64512 -'#------------------FN_DYNVARS_005_05-----------------------#' -SET @@global.transaction_alloc_block_size = 0; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -1024 -SET @@global.transaction_alloc_block_size = -1024; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '-1024' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -1024 -SET @@global.transaction_alloc_block_size = 123456789201; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '123456789201' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -123456788480 -SET @@global.transaction_alloc_block_size = ON; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@global.transaction_alloc_block_size = OFF; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@global.transaction_alloc_block_size = True; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -1024 -SET @@global.transaction_alloc_block_size = False; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -1024 -SET @@global.transaction_alloc_block_size = 65530.34; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@global.transaction_alloc_block_size ="Test"; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@global.transaction_alloc_block_size = 1000; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1000' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -1024 -SET @@session.transaction_alloc_block_size = 12345678901; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '12345678901' -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -12345678848 -SET @@session.transaction_alloc_block_size = ON; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@session.transaction_alloc_block_size = OFF; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@session.transaction_alloc_block_size = True; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1' -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -1024 -SET @@session.transaction_alloc_block_size = False; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0' -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -1024 -SET @@session.transaction_alloc_block_size = "Test"; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@session.transaction_alloc_block_size = 'test'; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -'#------------------FN_DYNVARS_005_06-----------------------#' -SELECT @@global.transaction_alloc_block_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='transaction_alloc_block_size'; -@@global.transaction_alloc_block_size = VARIABLE_VALUE -1 -'#------------------FN_DYNVARS_005_07-----------------------#' -SELECT @@session.transaction_alloc_block_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='transaction_alloc_block_size'; -@@session.transaction_alloc_block_size = VARIABLE_VALUE -1 -'#---------------------FN_DYNVARS_001_08----------------------#' -SET @@transaction_alloc_block_size = 1024; -SET @@global.transaction_alloc_block_size = 4294967295; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295' -SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size; -@@transaction_alloc_block_size = @@global.transaction_alloc_block_size -0 -'#---------------------FN_DYNVARS_001_09----------------------#' -SET @@transaction_alloc_block_size = 100; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '100' -SELECT @@transaction_alloc_block_size = @@local.transaction_alloc_block_size; -@@transaction_alloc_block_size = @@local.transaction_alloc_block_size -1 -SELECT @@local.transaction_alloc_block_size = @@session.transaction_alloc_block_size; -@@local.transaction_alloc_block_size = @@session.transaction_alloc_block_size -1 -'#---------------------FN_DYNVARS_001_10----------------------#' -SET transaction_alloc_block_size = 1027; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1027' -SELECT @@transaction_alloc_block_size; -@@transaction_alloc_block_size -1024 -SELECT local.transaction_alloc_block_size; -ERROR 42S02: Unknown table 'local' in field list -SELECT session.transaction_alloc_block_size; -ERROR 42S02: Unknown table 'session' in field list -SELECT transaction_alloc_block_size = @@session.transaction_alloc_block_size; -ERROR 42S22: Unknown column 'transaction_alloc_block_size' in 'field list' -SET @@global.transaction_alloc_block_size = @start_global_value; -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -8192 -SET @@session.tmp_table_size = @start_session_value; -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -1024 diff --git a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result similarity index 92% rename from mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result rename to mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result index 3455b9479c09..be54302689dd 100644 --- a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result +++ b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result @@ -6,7 +6,6 @@ SET @start_session_value = @@session.transaction_prealloc_size; SELECT @start_session_value; @start_session_value 4096 -'Bug# 34876: This variable has invalid default value as compared to documentation'; '#--------------------FN_DYNVARS_005_01-------------------------#' SET @@global.transaction_prealloc_size = 100; Warnings: @@ -37,23 +36,19 @@ SELECT @@global.transaction_prealloc_size; @@global.transaction_prealloc_size 1024 SET @@global.transaction_prealloc_size = 60020; +Warnings: +Warning 1292 Truncated incorrect transaction_prealloc_size value: '60020' SELECT @@global.transaction_prealloc_size; @@global.transaction_prealloc_size 59392 -SET @@global.transaction_prealloc_size = 4294966272; -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -4294966272 '#--------------------FN_DYNVARS_005_04-------------------------#' SET @@session.transaction_prealloc_size = 1024; SELECT @@session.transaction_prealloc_size; @@session.transaction_prealloc_size 1024 -SET @@session.transaction_prealloc_size =4294966272; -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -4294966272 SET @@session.transaction_prealloc_size = 65535; +Warnings: +Warning 1292 Truncated incorrect transaction_prealloc_size value: '65535' SELECT @@session.transaction_prealloc_size; @@session.transaction_prealloc_size 64512 @@ -70,7 +65,6 @@ Warning 1292 Truncated incorrect transaction_prealloc_size value: '-1024' SELECT @@global.transaction_prealloc_size; @@global.transaction_prealloc_size 1024 -'Bug # 34837: Errors are not coming on assigning invalid values to variable'; SET @@global.transaction_prealloc_size = ON; ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' SET @@global.transaction_prealloc_size = OFF; @@ -115,10 +109,12 @@ SELECT @@session.transaction_prealloc_size; 1024 SET @@session.transaction_prealloc_size = "Test"; ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@session.transaction_prealloc_size = 123456789031; +SET @@session.transaction_prealloc_size = 135217728; +Warnings: +Warning 1292 Truncated incorrect transaction_prealloc_size value: '135217728' SELECT @@session.transaction_prealloc_size; @@session.transaction_prealloc_size -123456788480 +134217728 '#------------------FN_DYNVARS_005_06-----------------------#' SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES @@ -151,6 +147,8 @@ SELECT @@local.transaction_prealloc_size = @@session.transaction_prealloc_size; 1 '#---------------------FN_DYNVARS_001_11----------------------#' SET transaction_prealloc_size = 1027; +Warnings: +Warning 1292 Truncated incorrect transaction_prealloc_size value: '1027' SELECT @@transaction_prealloc_size; @@transaction_prealloc_size 1024 diff --git a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result deleted file mode 100644 index 4912653a8e5d..000000000000 --- a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result +++ /dev/null @@ -1,172 +0,0 @@ -SET @start_global_value = @@global.transaction_prealloc_size; -SELECT @start_global_value; -@start_global_value -4096 -SET @start_session_value = @@session.transaction_prealloc_size; -SELECT @start_session_value; -@start_session_value -4096 -'Bug# 34876: This variable has invalid default value as compared to documentation'; -'#--------------------FN_DYNVARS_005_01-------------------------#' -SET @@global.transaction_prealloc_size = 100; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '100' -SET @@global.transaction_prealloc_size = DEFAULT; -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -4096 -SET @@session.transaction_prealloc_size = 200; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '200' -SET @@session.transaction_prealloc_size = DEFAULT; -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -4096 -'#--------------------FN_DYNVARS_005_02-------------------------#' -SET @@global.transaction_prealloc_size = DEFAULT; -SELECT @@global.transaction_prealloc_size = 4096; -@@global.transaction_prealloc_size = 4096 -1 -SET @@session.transaction_prealloc_size = DEFAULT; -SELECT @@session.transaction_prealloc_size = 4096; -@@session.transaction_prealloc_size = 4096 -1 -'#--------------------FN_DYNVARS_005_03-------------------------#' -SET @@global.transaction_prealloc_size = 1024; -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -1024 -SET @@global.transaction_prealloc_size = 60020; -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -59392 -SET @@global.transaction_prealloc_size = 4294966272; -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -4294966272 -'#--------------------FN_DYNVARS_005_04-------------------------#' -SET @@session.transaction_prealloc_size = 1024; -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -1024 -SET @@session.transaction_prealloc_size =4294966272; -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -4294966272 -SET @@session.transaction_prealloc_size = 65535; -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -64512 -'#------------------FN_DYNVARS_005_05-----------------------#' -SET @@global.transaction_prealloc_size = 0; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '0' -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -1024 -SET @@global.transaction_prealloc_size = -1024; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '-1024' -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -1024 -'Bug # 34837: Errors are not coming on assigning invalid values to variable'; -SET @@global.transaction_prealloc_size = ON; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@global.transaction_prealloc_size = OFF; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@global.transaction_prealloc_size = True; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '1' -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -1024 -SET @@global.transaction_prealloc_size = False; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '0' -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -1024 -SET @@global.transaction_prealloc_size = 65530.34; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@global.transaction_prealloc_size ="Test"; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@global.transaction_prealloc_size = 1000; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '1000' -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -1024 -SET @@session.transaction_prealloc_size = ON; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@session.transaction_prealloc_size = OFF; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@session.transaction_prealloc_size = True; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '1' -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -1024 -SET @@session.transaction_prealloc_size = False; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '0' -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -1024 -SET @@session.transaction_prealloc_size = "Test"; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@session.transaction_prealloc_size = 123456789031; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '123456789031' -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -4294966272 -'#------------------FN_DYNVARS_005_06-----------------------#' -SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='transaction_prealloc_size'; -@@global.transaction_prealloc_size = VARIABLE_VALUE -1 -'#------------------FN_DYNVARS_005_07-----------------------#' -SELECT @@session.transaction_prealloc_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='transaction_prealloc_size'; -@@session.transaction_prealloc_size = VARIABLE_VALUE -1 -'#---------------------FN_DYNVARS_001_09----------------------#' -SET @@global.transaction_prealloc_size = 1024; -SET @@global.transaction_prealloc_size = 10; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '10' -SELECT @@transaction_prealloc_size = @@global.transaction_prealloc_size; -@@transaction_prealloc_size = @@global.transaction_prealloc_size -0 -'#---------------------FN_DYNVARS_001_10----------------------#' -SET @@transaction_prealloc_size = 100; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '100' -SELECT @@transaction_prealloc_size = @@local.transaction_prealloc_size; -@@transaction_prealloc_size = @@local.transaction_prealloc_size -1 -SELECT @@local.transaction_prealloc_size = @@session.transaction_prealloc_size; -@@local.transaction_prealloc_size = @@session.transaction_prealloc_size -1 -'#---------------------FN_DYNVARS_001_11----------------------#' -SET transaction_prealloc_size = 1027; -SELECT @@transaction_prealloc_size; -@@transaction_prealloc_size -1024 -SELECT local.transaction_prealloc_size; -ERROR 42S02: Unknown table 'local' in field list -SELECT session.transaction_prealloc_size; -ERROR 42S02: Unknown table 'session' in field list -SELECT transaction_prealloc_size = @@session.transaction_prealloc_size; -ERROR 42S22: Unknown column 'transaction_prealloc_size' in 'field list' -SET @@global.transaction_prealloc_size = @start_global_value; -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -4096 -SET @@session.transaction_prealloc_size = @start_session_value; -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -4096 diff --git a/mysql-test/suite/sys_vars/t/disabled.def b/mysql-test/suite/sys_vars/t/disabled.def index 66b82f8bafff..30fbfeed6950 100644 --- a/mysql-test/suite/sys_vars/t/disabled.def +++ b/mysql-test/suite/sys_vars/t/disabled.def @@ -11,8 +11,6 @@ ############################################################################## auto_increment_offset_func : galera/mysql-wsrep#78 auto_increment_increment gets reset after ALTER auto_increment_increment_func : galera/mysql-wsrep#78 auto_increment_increment gets reset after ALTER -transaction_prealloc_size_basic_32 : Bug#11748572 -transaction_prealloc_size_basic_64 : Bug#11748572 query_cache_size_basic_32 : Bug#13535584 query_cache_size_basic_64 : Bug#11748572 #thread_cache_size_func : Bug#11750172: 2008-11-07 joro main.thread_cache_size_func fails in pushbuild when run with pool of threads diff --git a/mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test similarity index 95% rename from mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc rename to mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test index 4a69bbcdb011..0faa95c8fe6d 100644 --- a/mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc +++ b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test @@ -5,7 +5,7 @@ # Access Type: Dynamic # # Data Type: numeric # # Default Value: 8192 # -# Range: 1024-4294967295 # +# Range: 1024-134217728 # # # # # # Creation Date: 2008-02-14 # @@ -80,9 +80,6 @@ SELECT @@global.transaction_alloc_block_size; SET @@global.transaction_alloc_block_size = 60020; SELECT @@global.transaction_alloc_block_size; -SET @@global.transaction_alloc_block_size = 4294967295; -SELECT @@global.transaction_alloc_block_size; - --echo '#--------------------FN_DYNVARS_005_04-------------------------#' ################################################################### # Change the value of variable to a valid value for SESSION Scope # @@ -91,9 +88,6 @@ SELECT @@global.transaction_alloc_block_size; SET @@session.transaction_alloc_block_size = 1024; SELECT @@session.transaction_alloc_block_size; -SET @@session.transaction_alloc_block_size =4294967295; -SELECT @@session.transaction_alloc_block_size; - SET @@session.transaction_alloc_block_size = 65535; SELECT @@session.transaction_alloc_block_size; @@ -110,7 +104,7 @@ SET @@global.transaction_alloc_block_size = -1024; SELECT @@global.transaction_alloc_block_size; -SET @@global.transaction_alloc_block_size = 123456789201; +SET @@global.transaction_alloc_block_size = 135217728; SELECT @@global.transaction_alloc_block_size; -- Error ER_WRONG_TYPE_FOR_VAR @@ -136,7 +130,7 @@ SET @@global.transaction_alloc_block_size ="Test"; SET @@global.transaction_alloc_block_size = 1000; SELECT @@global.transaction_alloc_block_size; -SET @@session.transaction_alloc_block_size = 12345678901; +SET @@session.transaction_alloc_block_size = 135217728; SELECT @@session.transaction_alloc_block_size; -- Error ER_WRONG_TYPE_FOR_VAR @@ -185,7 +179,7 @@ WHERE VARIABLE_NAME='transaction_alloc_block_size'; ########################################################################### SET @@transaction_alloc_block_size = 1024; -SET @@global.transaction_alloc_block_size = 4294967295; +SET @@global.transaction_alloc_block_size = 134217728; SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size; diff --git a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test deleted file mode 100644 index b9fbf4292201..000000000000 --- a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test +++ /dev/null @@ -1,9 +0,0 @@ -################################################################################ -# Created by Horst Hunger 2008-05-07 # -# # -# Wrapper for 32 bit machines # -################################################################################ - ---source include/have_32bit.inc ---source suite/sys_vars/inc/transaction_alloc_block_size_basic.inc - diff --git a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test deleted file mode 100644 index fb68245ee625..000000000000 --- a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test +++ /dev/null @@ -1,9 +0,0 @@ -################################################################################ -# Created by Horst Hunger 2008-05-07 # -# # -# Wrapper for 64 bit machines # -################################################################################ - ---source include/have_64bit.inc ---source suite/sys_vars/inc/transaction_alloc_block_size_basic.inc - diff --git a/mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test similarity index 96% rename from mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc rename to mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test index 56c931636212..d3ff1db1c185 100644 --- a/mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc +++ b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test @@ -5,7 +5,7 @@ # Access Type: Dynamic # # Data Type: numeric # # Default Value: 4096 # -# Range: # +# Range: 1024-134217728 # # # # # # Creation Date: 2008-02-14 # @@ -75,10 +75,6 @@ SELECT @@global.transaction_prealloc_size; SET @@global.transaction_prealloc_size = 60020; SELECT @@global.transaction_prealloc_size; -SET @@global.transaction_prealloc_size = 4294966272; -SELECT @@global.transaction_prealloc_size; - - --echo '#--------------------FN_DYNVARS_005_04-------------------------#' ################################################################### # Change the value of variable to a valid value for SESSION Scope # @@ -87,8 +83,6 @@ SELECT @@global.transaction_prealloc_size; SET @@session.transaction_prealloc_size = 1024; SELECT @@session.transaction_prealloc_size; -SET @@session.transaction_prealloc_size =4294966272; -SELECT @@session.transaction_prealloc_size; SET @@session.transaction_prealloc_size = 65535; SELECT @@session.transaction_prealloc_size; @@ -144,7 +138,7 @@ SELECT @@session.transaction_prealloc_size; --Error ER_WRONG_TYPE_FOR_VAR SET @@session.transaction_prealloc_size = "Test"; -SET @@session.transaction_prealloc_size = 123456789031; +SET @@session.transaction_prealloc_size = 135217728; SELECT @@session.transaction_prealloc_size; diff --git a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test deleted file mode 100644 index 23ea53334ffa..000000000000 --- a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test +++ /dev/null @@ -1,9 +0,0 @@ -################################################################################ -# Created by Horst Hunger 2008-05-07 # -# # -# Wrapper for 32 bit machines # -################################################################################ - ---source include/have_32bit.inc ---source suite/sys_vars/inc/transaction_prealloc_size_basic.inc - diff --git a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test deleted file mode 100644 index 79a18585e80f..000000000000 --- a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test +++ /dev/null @@ -1,9 +0,0 @@ -################################################################################ -# Created by Horst Hunger 2008-05-07 # -# # -# Wrapper for 64 bit machines # -################################################################################ - ---source include/have_64bit.inc ---source suite/sys_vars/inc/transaction_prealloc_size_basic.inc - diff --git a/mysql-test/t/file_contents.test b/mysql-test/t/file_contents.test index 88f91c2cd96d..bf0ce3a4e19f 100644 --- a/mysql-test/t/file_contents.test +++ b/mysql-test/t/file_contents.test @@ -17,7 +17,7 @@ if ($dir_bin =~ m|/usr/|) { $dir_docs =~ s|/lib|/share/doc|; if(-d "$dir_docs/packages") { # SuSE: "packages/" in the documentation path - $dir_docs = glob "$dir_docs/packages/MySQL-server*"; + $dir_docs = glob "$dir_docs/packages/*-server*"; } else { # RedHat: version number in directory name $dir_docs = glob "$dir_docs/MySQL-server*"; @@ -27,7 +27,7 @@ if ($dir_bin =~ m|/usr/|) { $dir_docs = "$dir_bin/share/doc"; if(-d "$dir_docs/packages") { # SuSE: "packages/" in the documentation path - $dir_docs = glob "$dir_docs/packages/MySQL-server*"; + $dir_docs = glob "$dir_docs/packages/*-server*"; } else { # RedHat: version number in directory name $dir_docs = glob "$dir_docs/MySQL-server*"; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index a17c61917fc8..5e02ca550811 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -15,6 +15,9 @@ # Tests that require multibyte character sets, which are not always available, # go into separate files (e.g. sp-ucs2.test) +# Save the initial number of concurrent sessions +--source include/count_sessions.inc + use test; # Test tables @@ -9093,3 +9096,118 @@ delimiter ;$ SELECT f1(); DROP FUNCTION f1; + + +--echo +--echo # +--echo # BUG 16041903: CONTINUE HANDLER NOT INVOKED +--echo # IN A STORED FUNCTION AFTER A LOCK WAIT TIMEOUT +--echo # + +--echo +--echo # Save and set lock wait timeout +SET @lock_wait_timeout_saved= @@lock_wait_timeout; +SET @innodb_lock_wait_timeout_saved= @@innodb_lock_wait_timeout; +SET @@lock_wait_timeout= 1; +SET @@innodb_lock_wait_timeout= 1; + +--echo +--echo # Create a function with exit handler: +DELIMITER //; +CREATE FUNCTION f1() RETURNS VARCHAR(20) +BEGIN + DECLARE EXIT HANDLER FOR SQLSTATE '42S02' RETURN 'No such table'; + INSERT INTO no_such_table VALUES (1); +END// + +--echo +--echo # Create a function calling f1(): +CREATE FUNCTION f2() RETURNS VARCHAR(20) +BEGIN + RETURN f1(); +END// + +--echo +--echo # Create a function provoking deadlock: +CREATE FUNCTION f3() RETURNS VARCHAR(20) +BEGIN + UPDATE t1 SET i= 1 WHERE i= 1; + RETURN 'Will never get here'; +END// + +--echo +--echo # Create a function calling f3, to create +--echo # a deadlock indirectly: +CREATE FUNCTION f4() RETURNS VARCHAR(20) +BEGIN + RETURN f3(); +END// +DELIMITER ;// + +--echo +--echo # Open another connection, create and initialize a table +--echo # to be used for provoking deadlock, put a lock on the table: +connect (con1,localhost,root,,); +CREATE TABLE t1 (i INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +SET AUTOCOMMIT= 0; +UPDATE t1 SET i=1 WHERE i=1; + +--echo +--echo # On the default connection, do an update to provoke a +--echo # deadlock, then call the function with handler. This case +--echo # fails without the patch (with error ER_NO_SUCH_TABLE): +--connection default +SET AUTOCOMMIT= 0; +--error ER_LOCK_WAIT_TIMEOUT +UPDATE t1 SET i=1 WHERE i=1; +SELECT f1() AS 'f1():'; + +--echo +--echo # Provoke another deadlock, then call the function with +--echo # handler indirectly. This case fails without the patch +--echo # (with error ER_NO_SUCH_TABLE): +--error ER_LOCK_WAIT_TIMEOUT +UPDATE t1 SET i= 1 WHERE i= 1; +SELECT f2() AS 'f2():'; + +--echo +--echo # Provoke yet another deadlock, but now from within a function, +--echo # then call the function with handler. This succeeds even +--echo # without the patch because is_fatal_sub_stmt_error is reset +--echo # in restore_sub_stmt after the failing function has been +--echo # executed. The test case is included anyway for better coverage: +--error ER_LOCK_WAIT_TIMEOUT +SELECT f3() AS 'f3():'; +SELECT f1() AS 'f1():'; + +--echo # Provoke yet another deadlock, but now from within a function, +--echo # calling another function, then call the function with handler. +--echo # This succeeds even without the patch because +--echo # is_fatal_sub_stmt_error is reset in restore_sub_stmt after +--echo # the failing function has been executed. The test case is +--echo # included anyway for better coverage: +--error ER_LOCK_WAIT_TIMEOUT +SELECT f4() AS 'f4():'; +SELECT f1() AS 'f1():'; + +--echo +--echo # Disconnect, drop functions and table: +--disconnect con1 +DROP FUNCTION f4; +DROP FUNCTION f3; +DROP FUNCTION f2; +DROP FUNCTION f1; +DROP TABLE t1; + +--echo +--echo # Reset lock wait timeouts +SET @@lock_wait_timeout= @lock_wait_timeout_saved; +SET @@innodb_lock_wait_timeout= @innodb_lock_wait_timeout_saved; + +--echo # +--echo # BUG 16041903: End of test case +--echo # + +# Wait till we reached the initial number of concurrent sessions +--source include/wait_until_count_sessions.inc diff --git a/mysql-test/t/trigger-trans.test b/mysql-test/t/trigger-trans.test index 82bee7aa224d..c17202055e12 100644 --- a/mysql-test/t/trigger-trans.test +++ b/mysql-test/t/trigger-trans.test @@ -2,6 +2,9 @@ # (or just InnoDB storage engine) --source include/have_innodb.inc +# Save the initial number of concurrent sessions +--source include/count_sessions.inc + --disable_warnings drop table if exists t1; --enable_warnings @@ -182,3 +185,54 @@ insert into t1 values ( 654, 'a'), ( 654, 'b'), ( 654, 'c'), select * from t2 order by b; drop trigger t1_after_insert; drop table t1,t2; + +--echo # +--echo #Bug#19683834 SOME INNODB ERRORS CAUSES STORED FUNCTION +--echo # AND TRIGGER HANDLERS TO BE IGNORED + +--echo #Code fixed in Bug#16041903 +--enable_connect_log + +CREATE TABLE t1 (id int unsigned PRIMARY KEY, val int DEFAULT 0) +ENGINE=InnoDB; +INSERT INTO t1 (id) VALUES (1), (2); + +CREATE TABLE t2 (id int PRIMARY KEY); +CREATE TABLE t3 LIKE t2; + +# Trigger with continue handler for ER_DUP_ENTRY(1062) +DELIMITER //; +CREATE TRIGGER bef_insert BEFORE INSERT ON t2 FOR EACH ROW +BEGIN + DECLARE CONTINUE HANDLER FOR 1062 BEGIN END; + INSERT INTO t3 (id) VALUES (NEW.id); + INSERT INTO t3 (id) VALUES (NEW.id); +END// +DELIMITER ;// + +# Transaction 1: Grab locks on t1 +START TRANSACTION; +UPDATE t1 SET val = val + 1; + +# Transaction 2: +--connect (con2,localhost,root,,test,,) +SET SESSION innodb_lock_wait_timeout = 2; +# Trigger lock timeout (1205) +--error ER_LOCK_WAIT_TIMEOUT +UPDATE t1 SET val = val + 1; + +# This insert should go through, as the continue handler should +# handle ER_DUP_ENTRY, even after ER_LOCK_WAIT_TIMEOUT (Bug#16041903) +INSERT INTO t2 (id) VALUES (1); + +# Cleanup +disconnect con2; +--source include/wait_until_disconnected.inc +connection default; + +DROP TABLE t3, t2, t1; + +--disable_connect_log + +# Wait till we reached the initial number of concurrent sessions +--source include/wait_until_count_sessions.inc diff --git a/packaging/rpm-sles/mysql.spec.in b/packaging/rpm-sles/mysql.spec.in index 75ed42a1caea..23c076332b09 100644 --- a/packaging/rpm-sles/mysql.spec.in +++ b/packaging/rpm-sles/mysql.spec.in @@ -1,4 +1,4 @@ -# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -265,7 +265,7 @@ Requires: mysql-community-libs = %{version}-%{release} Obsoletes: MySQL-devel < %{version}-%{release} Obsoletes: mysql-devel < %{version}-%{release} Obsoletes: mariadb-devel -Obsoletes: libmysqlclient-devel < %{version}-%{release} +Obsoletes: libmysqlclient-devel Provides: mysql-devel = %{version}-%{release} Provides: libmysqlclient-devel = %{version}-%{release} @@ -420,7 +420,7 @@ MBD=$RPM_BUILD_DIR/%{src_dir} # Ensure that needed directories exists install -d -m 0755 %{buildroot}/var/lib/mysql install -d -m 0755 %{buildroot}/var/run/mysql -install -d -m 0660 %{buildroot}/var/log/mysql +install -d -m 0750 %{buildroot}/var/log/mysql # Install all binaries cd $MBD/release @@ -632,7 +632,7 @@ fi %attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql %dir %attr(755, mysql, mysql) /var/lib/mysql %dir %attr(755, mysql, mysql) /var/run/mysql -%dir %attr(660, mysql, mysql) /var/log/mysql +%dir %attr(750, mysql, mysql) /var/log/mysql %files common %defattr(-, root, root, -) diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 940fd19cd411..f387a12c2c3c 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -591,7 +591,7 @@ if [ -n "${PLUGIN_DIR}" ]; then plugin_dir="${PLUGIN_DIR}" else # Try to find plugin dir relative to basedir - for dir in lib/mysql/plugin lib/plugin + for dir in lib64/mysql/plugin lib64/plugin lib/mysql/plugin lib/plugin do if [ -d "${MY_BASEDIR_VERSION}/${dir}" ]; then plugin_dir="${MY_BASEDIR_VERSION}/${dir}" diff --git a/sql/item.h b/sql/item.h index d22c8633500a..a4c0f4b73933 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1,7 +1,7 @@ #ifndef ITEM_INCLUDED #define ITEM_INCLUDED -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. 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 @@ -3289,7 +3289,11 @@ class Item_cache: public Item_basic_constant collation.set(item->collation); unsigned_flag= item->unsigned_flag; if (item->type() == FIELD_ITEM) + { cached_field= ((Item_field *)item)->field; + if (cached_field->table) + used_table_map= cached_field->table->map; + } return 0; }; enum Type type() const { return CACHE_ITEM; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 013e931dbd1b..71964705dcbd 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify @@ -3420,6 +3420,9 @@ static int init_common_variables() return 1; set_server_version(); + sql_print_information("%s (mysqld %s) starting as process %lu ...", + my_progname, server_version, (ulong) getpid()); + #ifndef EMBEDDED_LIBRARY if (opt_help && !opt_verbose) unireg_abort(0); diff --git a/sql/slave.cc b/sql/slave.cc index 91f055caca63..c8aa50bd0d4b 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. 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 @@ -4321,7 +4321,23 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi, } #endif - mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset_info->csname); + /* + If server's default charset is not supported (like utf16, utf32) as client + charset, then set client charset to 'latin1' (default client charset). + */ + if (is_supported_parser_charset(default_charset_info)) + mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset_info->csname); + else + { + sql_print_information("'%s' can not be used as client character set. " + "'%s' will be used as default client character set " + "while connecting to master.", + default_charset_info->csname, + default_client_charset_info->csname); + mysql_options(mysql, MYSQL_SET_CHARSET_NAME, + default_client_charset_info->csname); + } + /* This one is not strictly needed but we have it here for completeness */ mysql_options(mysql, MYSQL_SET_CHARSET_DIR, (char *) charsets_dir); diff --git a/sql/sp.cc b/sql/sp.cc index 06b34d6bcb09..68b512a04028 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. 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 @@ -1483,6 +1483,14 @@ bool lock_db_routines(THD *thd, char *db) { char *sp_name= get_field(thd->mem_root, table->field[MYSQL_PROC_FIELD_NAME]); + if (sp_name == NULL) + { + table->file->ha_index_end(); + my_error(ER_SP_WRONG_NAME, MYF(0), ""); + close_system_tables(thd, &open_tables_state_backup); + DBUG_RETURN(true); + } + longlong sp_type= table->field[MYSQL_PROC_MYSQL_TYPE]->val_int(); MDL_request *mdl_request= new (thd->mem_root) MDL_request; mdl_request->init(sp_type == TYPE_ENUM_FUNCTION ? diff --git a/sql/sql_base.cc b/sql/sql_base.cc index cfcea66d0a10..4bc91356a7d9 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. 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 @@ -4022,7 +4022,7 @@ request_backoff_action(enum_open_table_action action_arg, if (action_arg != OT_REOPEN_TABLES && m_has_locks) { my_error(ER_LOCK_DEADLOCK, MYF(0)); - mark_transaction_to_rollback(m_thd, true); + m_thd->mark_transaction_to_rollback(true); return TRUE; } /* diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 5d22da81b3f7..fd500cc943d3 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. 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 @@ -988,7 +988,7 @@ THD::THD() stmt_da(&main_da), is_fatal_error(0), transaction_rollback_request(0), - is_fatal_sub_stmt_error(0), + is_fatal_sub_stmt_error(false), rand_used(0), time_zone_used(0), in_lock_tables(0), @@ -3917,7 +3917,8 @@ extern "C" int thd_binlog_format(const MYSQL_THD thd) extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all) { - mark_transaction_to_rollback(thd, all); + DBUG_ASSERT(thd); + thd->mark_transaction_to_rollback(all); } extern "C" bool thd_binlog_filter_ok(const MYSQL_THD thd) @@ -4111,9 +4112,12 @@ void THD::restore_sub_statement_state(Sub_statement_state *backup) If we've left sub-statement mode, reset the fatal error flag. Otherwise keep the current value, to propagate it up the sub-statement stack. + + NOTE: is_fatal_sub_stmt_error can be set only if we've been in the + sub-statement mode. */ if (!in_sub_stmt) - is_fatal_sub_stmt_error= FALSE; + is_fatal_sub_stmt_error= false; if ((variables.option_bits & OPTION_BIN_LOG) && is_update_query(lex->sql_command) && !is_current_stmt_binlog_format_row()) @@ -4226,27 +4230,28 @@ void THD::get_definer(LEX_USER *definer) /** Mark transaction to rollback and mark error as fatal to a sub-statement. - @param thd Thread handle @param all TRUE <=> rollback main transaction. */ -void mark_transaction_to_rollback(THD *thd, bool all) +void THD::mark_transaction_to_rollback(bool all) { - if (thd) - { - thd->is_fatal_sub_stmt_error= TRUE; - thd->transaction_rollback_request= all; - /* - Aborted transactions can not be IGNOREd. - Switch off the IGNORE flag for the current - SELECT_LEX. This should allow my_error() - to report the error and abort the execution - flow, even in presence - of IGNORE clause. - */ - if (thd->lex->current_select) - thd->lex->current_select->no_error= FALSE; - } + /* + There is no point in setting is_fatal_sub_stmt_error unless + we are actually in_sub_stmt. + */ + if (in_sub_stmt) + is_fatal_sub_stmt_error= true; + transaction_rollback_request= all; + /* + Aborted transactions can not be IGNOREd. + Switch off the IGNORE flag for the current + SELECT_LEX. This should allow my_error() + to report the error and abort the execution + flow, even in presence + of IGNORE clause. + */ + if (lex->current_select) + lex->current_select->no_error= false; } /*************************************************************************** Handling of XA id cacheing diff --git a/sql/sql_class.h b/sql/sql_class.h index fb947920b158..ca9d03d7f4e6 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. 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 @@ -613,8 +613,6 @@ typedef struct system_status_var #define last_system_status_var questions -void mark_transaction_to_rollback(THD *thd, bool all); - #ifdef MYSQL_SERVER void free_tmp_table(THD *thd, TABLE *entry); @@ -2921,6 +2919,7 @@ class THD :public Statement, LEX_STRING get_invoker_user() { return invoker_user; } LEX_STRING get_invoker_host() { return invoker_host; } bool has_invoker() { return invoker_user.length > 0; } + void mark_transaction_to_rollback(bool all); private: /** The current internal error handler for this thread, or NULL. */ @@ -3742,7 +3741,6 @@ void add_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var); void add_diff_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var, STATUS_VAR *dec_var); -void mark_transaction_to_rollback(THD *thd, bool all); /* Inline functions */ diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 6403fd71f396..7b49f3782232 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. 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 @@ -14649,18 +14649,33 @@ SORT_FIELD *make_unireg_sortorder(ORDER *order, uint *length, for (;order;order=order->next,pos++) { - Item *item= order->item[0]->real_item(); + Item *const item= order->item[0], *const real_item= item->real_item(); pos->field= 0; pos->item= 0; - if (item->type() == Item::FIELD_ITEM) - pos->field= ((Item_field*) item)->field; - else if (item->type() == Item::SUM_FUNC_ITEM && !item->const_item()) - pos->field= ((Item_sum*) item)->get_tmp_table_field(); - else if (item->type() == Item::COPY_STR_ITEM) - { // Blob patch - pos->item= ((Item_copy*) item)->get_item(); + if (real_item->type() == Item::FIELD_ITEM) + { + // Could be a field, or Item_direct_view_ref wrapping a field + DBUG_ASSERT(item->type() == Item::FIELD_ITEM || + (item->type() == Item::REF_ITEM && + static_cast(item)->ref_type() == + Item_ref::VIEW_REF)); + pos->field= static_cast(real_item)->field; + } + else if (real_item->type() == Item::SUM_FUNC_ITEM && + !real_item->const_item()) + { + // Aggregate, or Item_aggregate_ref + DBUG_ASSERT(item->type() == Item::SUM_FUNC_ITEM || + (item->type() == Item::REF_ITEM && + static_cast(item)->ref_type() == + Item_ref::AGGREGATE_REF)); + pos->field= item->get_tmp_table_field(); + } + else if (real_item->type() == Item::COPY_STR_ITEM) + { // Blob patch + pos->item= static_cast(real_item)->get_item(); } else - pos->item= *order->item; + pos->item= item; pos->reverse=! order->asc; } *length=count; @@ -15143,6 +15158,17 @@ find_order_in_list(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables, uint el= all_fields.elements; all_fields.push_front(order_item); /* Add new field to field list. */ ref_pointer_array[el]= order_item; + /* + If the order_item is a SUM_FUNC_ITEM, when fix_fields is called + ref_by is set to order->item which is the address of order_item. + But this needs to be address of order_item in the all_fields list. + As a result, when it gets replaced with Item_aggregate_ref + object in Item::split_sum_func2, we will be able to retrieve the + newly created object. + */ + if (order_item->type() == Item::SUM_FUNC_ITEM) + ((Item_sum *)order_item)->ref_by= all_fields.head_ref(); + order->item= ref_pointer_array + el; return FALSE; } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 38236d5070c9..48720b4fb181 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. 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 @@ -5425,6 +5425,10 @@ mysql_prepare_alter_table(THD *thd, TABLE *table, if (create_info->storage_media == HA_SM_DEFAULT) create_info->storage_media= table->s->default_storage_media; + /* Creation of federated table with LIKE clause needs connection string */ + if (!(used_fields & HA_CREATE_USED_CONNECTION)) + create_info->connect_string= table->s->connect_string; + restore_record(table, s->default_values); // Empty record for DEFAULT Create_field *def; diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc index 760a4c8bdcf3..74ce617b82eb 100644 --- a/sql/sql_truncate.cc +++ b/sql/sql_truncate.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 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 @@ -289,6 +289,12 @@ static bool recreate_temporary_table(THD *thd, TABLE *table) table->file->info(HA_STATUS_AUTO | HA_STATUS_NO_LOCK); + /* + If LOCK TABLES list is not empty and contains this table + then unlock the table and remove it from this list. + */ + mysql_lock_remove(thd, thd->lock, table); + /* Don't free share. */ close_temporary_table(thd, table, FALSE, FALSE); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index d5253430a10e..dc3a79833a95 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. 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 @@ -14134,6 +14134,13 @@ subselect_end: */ lex->current_select->select_n_where_fields+= child->select_n_where_fields; + + /* + Aggregate functions in having clause may add fields to an outer + select. Count them also. + */ + lex->current_select->select_n_having_items+= + child->select_n_having_items; } ; diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index a03374571b0b..b7401d85f137 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. 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 @@ -1836,7 +1836,7 @@ static Sys_var_ulong Sys_trans_alloc_block_size( "transaction_alloc_block_size", "Allocation block size for transactions to be stored in binary log", SESSION_VAR(trans_alloc_block_size), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(1024, ULONG_MAX), DEFAULT(QUERY_ALLOC_BLOCK_SIZE), + VALID_RANGE(1024, 128 * 1024 * 1024), DEFAULT(QUERY_ALLOC_BLOCK_SIZE), BLOCK_SIZE(1024), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(fix_trans_mem_root)); @@ -1844,7 +1844,7 @@ static Sys_var_ulong Sys_trans_prealloc_size( "transaction_prealloc_size", "Persistent buffer for transactions to be stored in binary log", SESSION_VAR(trans_prealloc_size), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(1024, ULONG_MAX), DEFAULT(TRANS_ALLOC_PREALLOC_SIZE), + VALID_RANGE(1024, 128 * 1024 * 1024), DEFAULT(TRANS_ALLOC_PREALLOC_SIZE), BLOCK_SIZE(1024), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(fix_trans_mem_root)); diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index 541b3327ad47..8209b5a2fcf5 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. 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 @@ -2944,7 +2944,7 @@ int ha_federated::info(uint flag) } - if (flag & HA_STATUS_AUTO) + if ((flag & HA_STATUS_AUTO) && mysql) stats.auto_increment_value= mysql->insert_id; mysql_free_result(result); From e6414c5f1df2ebb5bc5f225fd6c90c6872f14e72 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Thu, 20 Aug 2015 00:03:05 -0700 Subject: [PATCH 052/305] Fix merge conflicts in tests after merge from mysql-5.5.45 --- .../r/transaction_alloc_block_size_basic.result | 11 ----------- .../sys_vars/r/transaction_prealloc_size_basic.result | 4 ---- .../t/transaction_alloc_block_size_basic.test | 7 ------- .../sys_vars/t/transaction_prealloc_size_basic.test | 4 ---- 4 files changed, 26 deletions(-) diff --git a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result index d480ca031e77..ca192d0afa2c 100644 --- a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result +++ b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result @@ -70,11 +70,7 @@ Warnings: Warning 1292 Truncated incorrect transaction_alloc_block_size value: '135217728' SELECT @@global.transaction_alloc_block_size; @@global.transaction_alloc_block_size -<<<<<<< HEAD:mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result -134217728 -======= 131072 ->>>>>>> mysql-5.5.44:mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result SET @@global.transaction_alloc_block_size = ON; ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' SET @@global.transaction_alloc_block_size = OFF; @@ -106,11 +102,7 @@ Warnings: Warning 1292 Truncated incorrect transaction_alloc_block_size value: '135217728' SELECT @@session.transaction_alloc_block_size; @@session.transaction_alloc_block_size -<<<<<<< HEAD:mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result -134217728 -======= 131072 ->>>>>>> mysql-5.5.44:mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result SET @@session.transaction_alloc_block_size = ON; ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' SET @@session.transaction_alloc_block_size = OFF; @@ -146,11 +138,8 @@ WHERE VARIABLE_NAME='transaction_alloc_block_size'; '#---------------------FN_DYNVARS_001_08----------------------#' SET @@transaction_alloc_block_size = 1024; SET @@global.transaction_alloc_block_size = 134217728; -<<<<<<< HEAD:mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result -======= Warnings: Warning 1292 Truncated incorrect transaction_alloc_block_size value: '134217728' ->>>>>>> mysql-5.5.44:mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size; @@transaction_alloc_block_size = @@global.transaction_alloc_block_size 0 diff --git a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result index 45864783e31c..122918dcd3d7 100644 --- a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result +++ b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result @@ -114,11 +114,7 @@ Warnings: Warning 1292 Truncated incorrect transaction_prealloc_size value: '135217728' SELECT @@session.transaction_prealloc_size; @@session.transaction_prealloc_size -<<<<<<< HEAD:mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result -134217728 -======= 131072 ->>>>>>> mysql-5.5.44:mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result '#------------------FN_DYNVARS_005_06-----------------------#' SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES diff --git a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test index ae177609c026..57325815877b 100644 --- a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test +++ b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test @@ -5,11 +5,7 @@ # Access Type: Dynamic # # Data Type: numeric # # Default Value: 8192 # -<<<<<<< HEAD:mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test -# Range: 1024-134217728 # -======= # Range: 1024-131072 # ->>>>>>> mysql-5.5.44:mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test # # # # # Creation Date: 2008-02-14 # @@ -89,12 +85,9 @@ SELECT @@global.transaction_alloc_block_size; # Change the value of variable to a valid value for SESSION Scope # ################################################################### -<<<<<<< HEAD:mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test -======= SET @@session.transaction_alloc_block_size = 1024; SELECT @@session.transaction_alloc_block_size; ->>>>>>> mysql-5.5.44:mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test SET @@session.transaction_alloc_block_size = 65535; SELECT @@session.transaction_alloc_block_size; diff --git a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test index 88e627d1bfa4..24fb6bc562e0 100644 --- a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test +++ b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test @@ -5,11 +5,7 @@ # Access Type: Dynamic # # Data Type: numeric # # Default Value: 4096 # -<<<<<<< HEAD:mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test -# Range: 1024-134217728 # -======= # Range: 1024-131072 # ->>>>>>> mysql-5.5.44:mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test # # # # # Creation Date: 2008-02-14 # From d3f73155ef7e77fc8eba7b328bed265c891e619c Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Thu, 27 Aug 2015 00:41:00 -0700 Subject: [PATCH 053/305] Man pages from 5.5.45 --- man/comp_err.1 | 6 +- man/innochecksum.1 | 4 +- man/msql2mysql.1 | 4 +- man/my_print_defaults.1 | 4 +- man/myisam_ftdump.1 | 4 +- man/myisamchk.1 | 4 +- man/myisamlog.1 | 4 +- man/myisampack.1 | 15 +- man/mysql-stress-test.pl.1 | 8 +- man/mysql-test-run.pl.1 | 196 ++++++++++++++--------- man/mysql.1 | 9 +- man/mysql.server.1 | 263 +++++++++++++++++++++++++------ man/mysql_client_test.1 | 6 +- man/mysql_config.1 | 32 +++- man/mysql_convert_table_format.1 | 4 +- man/mysql_find_rows.1 | 4 +- man/mysql_fix_extensions.1 | 4 +- man/mysql_install_db.1 | 4 +- man/mysql_plugin.1 | 4 +- man/mysql_secure_installation.1 | 6 +- man/mysql_setpermission.1 | 4 +- man/mysql_tzinfo_to_sql.1 | 6 +- man/mysql_upgrade.1 | 6 +- man/mysql_waitpid.1 | 4 +- man/mysql_zap.1 | 4 +- man/mysqlaccess.1 | 4 +- man/mysqladmin.1 | 6 +- man/mysqlbinlog.1 | 6 +- man/mysqlbug.1 | 4 +- man/mysqlcheck.1 | 6 +- man/mysqld.8 | 4 +- man/mysqld_multi.1 | 10 +- man/mysqld_safe.1 | 13 +- man/mysqldump.1 | 53 ++++++- man/mysqldumpslow.1 | 4 +- man/mysqlhotcopy.1 | 4 +- man/mysqlimport.1 | 6 +- man/mysqlshow.1 | 6 +- man/mysqlslap.1 | 6 +- man/mysqltest.1 | 50 +++++- man/ndb-common-options.1 | 15 +- man/ndb_blob_tool.1 | 4 +- man/ndb_config.1 | 92 ++++++----- man/ndb_cpcd.1 | 4 +- man/ndb_delete_all.1 | 7 +- man/ndb_desc.1 | 16 +- man/ndb_drop_index.1 | 6 +- man/ndb_drop_table.1 | 4 +- man/ndb_error_reporter.1 | 11 +- man/ndb_index_stat.1 | 30 ++-- man/ndb_mgm.1 | 8 +- man/ndb_mgmd.8 | 49 +++--- man/ndb_print_backup_file.1 | 4 +- man/ndb_print_file.1 | 6 +- man/ndb_print_schema_file.1 | 4 +- man/ndb_print_sys_file.1 | 4 +- man/ndb_restore.1 | 93 ++++++----- man/ndb_select_all.1 | 6 +- man/ndb_select_count.1 | 4 +- man/ndb_show_tables.1 | 4 +- man/ndb_size.pl.1 | 10 +- man/ndb_waiter.1 | 8 +- man/ndbd.8 | 31 ++-- man/ndbd_redo_log_reader.1 | 4 +- man/ndbinfo_select_all.1 | 7 +- man/ndbmtd.8 | 4 +- man/perror.1 | 6 +- man/replace.1 | 4 +- man/resolve_stack_dump.1 | 4 +- man/resolveip.1 | 4 +- 70 files changed, 791 insertions(+), 453 deletions(-) diff --git a/man/comp_err.1 b/man/comp_err.1 index a305d45dbf4b..854c3f7fe858 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -2,12 +2,12 @@ .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -44,7 +44,7 @@ to determine the error messages to display for different error codes\&. \fBcomp_err\fR normally is run automatically when MySQL is built\&. It compiles the errmsg\&.sys -file from the plaintext file located at +file from the text file located at sql/share/errmsg\&.txt in MySQL source distributions\&. .PP diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 742d1f5a7cfc..68236db3dc3a 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -2,12 +2,12 @@ .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 index fef29b589309..a7676d5f30f6 100644 --- a/man/msql2mysql.1 +++ b/man/msql2mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmsql2mysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMSQL2MYSQL\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMSQL2MYSQL\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index c8cbe481b473..197b492200c5 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -2,12 +2,12 @@ .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index 6c22e57c3314..054511337d81 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisamchk.1 b/man/myisamchk.1 index 6dee896f32c7..777a040db6fb 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisamlog.1 b/man/myisamlog.1 index bfce712a32a2..4e961c45f15a 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisampack.1 b/man/myisampack.1 index 288c98e2688e..11629970faa1 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -115,7 +115,7 @@ Each file name argument should be the name of an index (\&.MYI) file\&. If you a extension\&. .PP After you compress a table with -\fBmyisampack\fR, you should use +\fBmyisampack\fR, use \fBmyisamchk \-rq\fR to rebuild its indexes\&. \fBmyisamchk\fR(1)\&. @@ -449,6 +449,13 @@ Original trees: 57 After join: 17 \- Compressing file 87\&.14% Remember to run myisamchk \-rq on compressed tables +shell> \fBmyisamchk \-rq station\fR +\- check record delete\-chain +\- recovering (with sort) MyISAM\-table \*(Aqstation\*(Aq +Data records: 1192 +\- Fixing index 1 +\- Fixing index 2 +shell> \fBmysqladmin \-uroot flush\-tables\fR shell> \fBls \-l station\&.*\fR \-rw\-rw\-r\-\- 1 monty my 127874 Apr 17 19:00 station\&.MYD \-rw\-rw\-r\-\- 1 monty my 55296 Apr 17 19:04 station\&.MYI @@ -826,7 +833,7 @@ The number of bits used in the Huffman tree\&. .RE .PP After you run -\fBmyisampack\fR, you must run +\fBmyisampack\fR, use \fBmyisamchk\fR to re\-create any indexes\&. At this time, you can also sort the index blocks and create statistics needed for the MySQL optimizer to work more efficiently: .sp diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index e7e2d8def65a..970021bf290f 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/05/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "01/05/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "06/25/2015" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,7 +37,7 @@ mysql-stress-test.pl \- server stress test program .PP The \fBmysql\-stress\-test\&.pl\fR -Perl script performs stress\-testing of the MySQL server\&. (MySQL 5\&.0 and up only) +Perl script performs stress\-testing of the MySQL server\&. .PP \fBmysql\-stress\-test\&.pl\fR requires a version of Perl that has been built with threads support\&. @@ -498,7 +498,7 @@ Verbose mode\&. Print more information about what the program does\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2014, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2015, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index de637719efa4..08ead0755ebd 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/05/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "01/05/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "06/25/2015" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -167,6 +167,14 @@ testa with anything in between\&. In the latter case, the pattern match is not anchored to the beginning of the test name, so it also matches names such as xmainytesta\&. .PP +From MySQL 5\&.7 it is possible to put a list of test names in a file and have +\fBmysql\-test\-run\&.pl\fR +run those tests, using the option +\fB\-\-do\-test\-list=\fR\fB\fIfile\fR\fR\&. The tests should be listed one per line in the file, using the fully qualified name +\fIsuite\fR\&.\fItest\fR\&. A space may be used in place of the period\&. A line beginning with +# +indicates a comment and is ignored\&. +.PP To perform setup prior to running tests, \fBmysql\-test\-run\&.pl\fR needs to invoke @@ -175,9 +183,7 @@ with the \fB\-\-bootstrap\fR and \fB\-\-skip\-grant\-tables\fR -options\&. If MySQL was configured with the -\fB\-\-disable\-grant\-options\fR -option (only MySQL 5\&.1) or with the compiler flag +options\&. If MySQL was built with the compiler flag \fB\-DDISABLE_GRANT_OPTIONS\fR, then \fB\-\-bootstrap\fR, \fB\-\-skip\-grant\-tables\fR, and @@ -248,17 +254,8 @@ l l l l l l l l -l l l l. T{ -MTR_VERSION -T}:T{ -If set to 1, will run the older version 1 of - \fBmysql\-test\-run\&.pl\fR\&. This will affect - what functionailty is available and what command line - options are supported\&. -T} -T{ MTR_MEM T}:T{ If set to anything, will run tests with files in "memory" using tmpfs or @@ -290,8 +287,7 @@ Setting of a timeout in minutes or seconds, corresponding to command Avaliable timeout names are TESTCASE, SUITE (both in minutes) and START, SHUTDOWN - (both in seconds)\&. These variables are supported from - MySQL 5\&.1\&.44\&. + (both in seconds)\&. T} T{ MYSQL_CONFIG_EDITOR @@ -357,7 +353,7 @@ T} .PP The variable MTR_PORT_BASE -was added in MySQL 5\&.1\&.45 as a more logical replacement for +is a more logical replacement for the original variable MTR_BUILD_THREAD\&. It gives the actual port number directly (will be rounded down to a multiple of 10)\&. If you use MTR_BUILD_THREAD, the port number is found by multiplying this by 10 and adding 10000\&. .PP @@ -378,14 +374,6 @@ will include any server options added with the option to \fBmysql\-test\-run\&.pl\fR, but will not include server options added specifically for the currently running test\&. .PP -If you are running -\fBmysql\-test\-run\&.pl\fR -version 1 by setting -MTR_VERSION, note that this only affects the test driver, not the test client (and its language) or the tests themselves\&. -.PP -A few tests might not run with version 1 because they depend on some feature of version 2\&. You may have those tests skipped by adding the test name to the file -lib/v1/incompatible\&.tests\&. This feature is available from MySQL 5\&.1\&.40\&. -.PP \fBmysql\-test\-run\&.pl\fR supports the options in the following list\&. An argument of \fB\-\-\fR @@ -510,9 +498,9 @@ auto) can also be set with the MTR_BUILD_THREAD environment variable\&. .sp -From MySQL 5\&.1\&.45, the more logical +This option is kept for backward compatibility\&. The more logical \fB\-\-port\-base\fR -is supported as an alternative\&. +is recommended instead\&. .RE .sp .RS 4 @@ -564,10 +552,6 @@ Clean up the var directory with logs and test results etc\&. after the test run, but only if there were no test failures\&. This option only has effect if also running with option \fB\-\-mem\fR\&. The intent is to alleviate the problem of using up memory for test results, in cases where many different test runs are being done on the same host\&. -.sp -The -\fB\-\-clean\-vardir\fR -option is available from MySQL 5\&.5\&. .RE .sp .RS 4 @@ -836,6 +820,25 @@ using the named debugger\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysql-test-run.pl: debug-common option +.\" debug-common option: mysql-test-run.pl +\fB\-\-debug\-common\fR +.sp +This option works similar to +\-\-debug +but turns on debug only for the debug macro keywords +query, info, error, enter, exit +which are considered the most commonly used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysql-test-run.pl: debug-server option .\" debug-server option: mysql-test-run.pl \fB\-\-debug\-server\fR @@ -850,10 +853,6 @@ debug under the directory where it\*(Aqs normally located\&. This option does not turn on trace output and is independent of the \fBdebug\fR option\&. -.sp -The -\fBdebug\-server\fR -option was added in MySQL 5\&.1\&.56 and 5\&.5\&.10\&. .RE .sp .RS 4 @@ -882,8 +881,6 @@ does not fail if Debug Sync is not compiled in\&. .sp For information about using the Debug Sync facility for testing, see Section\ \&4.14, \(lqThread Synchronization in Test Cases\(rq\&. -.sp -This option was added in MySQL 5\&.1\&.41\&. .RE .sp .RS 4 @@ -898,7 +895,7 @@ This option was added in MySQL 5\&.1\&.41\&. .\" default-myisam option: mysql-test-run.pl \fB\-\-default\-myisam\fR .sp -Use MyISAM as default engine for all except InnoDB\-specific tests\&. This option was added in MySQL 5\&.5 and is on by default\&. It may be changed to off by default in a later release\&. See also +Use MyISAM as default engine for all except InnoDB\-specific tests\&. This option is on by default in MySQL 5\&.5 and 5\&.6 but it off by default from MySQL 5\&.7\&. See also \fB\-\-nodefault\-myisam\fR\&. .RE .sp @@ -976,6 +973,30 @@ xmainytestz\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysql-test-run.pl: do-test-list option +.\" do-test-list option: mysql-test-run.pl +\fB\-\-do\-testlist=\fR\fB\fIfile\fR\fR +.sp +Run all tests listed in the file +\fIfile\fR\&. In this file, tests should be listed one per line in the form +\fIsuite\fR\&.\fItest\fR +or alternatively, with a space instead of the period\&. A line beginning with +# +will be ignored and can be used for comments\&. +.sp +The +\fB\-\-do\-test\-list\fR +option is available from MySQL 5\&.7\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysql-test-run.pl: embedded-server option .\" embedded-server option: mysql-test-run.pl \fB\-\-embedded\-server\fR @@ -1018,12 +1039,12 @@ Specify a file that contains a list of test cases that should be displayed with [ exp\-fail ] code rather than [ fail ] -if they fail\&. This option was added in MySQL 5\&.1\&.33\&. +if they fail\&. .sp For an example of a file that might be specified using this option, see mysql\-test/collections/default\&.experimental\&. .sp -From MySQL 5\&.1\&.51, it\*(Aqs possible to supply more than one +It is also possible to supply more than one \fB\-\-experimental\fR, test cases listed in all the files will be treated as experimental\&. .RE .sp @@ -1035,6 +1056,23 @@ From MySQL 5\&.1\&.51, it\*(Aqs possible to supply more than one .sp -1 .IP \(bu 2.3 .\} +.\" mysql-test-run.pl: explain-protocol option +.\" explain-protocol option: mysql-test-run.pl +\fB\-\-explain\-protocol\fR, +.sp +Run +EXPLAIN EXTENDED +on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysql-test-run.pl: extern option .\" extern option: mysql-test-run.pl \fB\-\-extern\fR @@ -1111,10 +1149,6 @@ causes execution to continue regardless of test case failure\&. \fB\-\-force\-restart\fR .sp Always restart the server(s) between each tast case, whether it\*(Aqs needed or not\&. Will also restart between repeated runs of the same test case\&. This may be useful e\&.g\&. when looking for the source of a memory leak, as there will only have been one test run before the server exits\&. -.sp -The -\fB\-\-force\-restart\fR -option was added in MySQL version 5\&.1\&.52\&. .RE .sp .RS 4 @@ -1168,8 +1202,6 @@ debugger\&. Run tests with the \fBgprof\fR profiling tool\&. -\fB\-\-gprof\fR -was added in 5\&.1\&.45\&. .RE .sp .RS 4 @@ -1187,7 +1219,26 @@ was added in 5\&.1\&.45\&. .\" include-ndb option: mysql-test-run.pl \fB\-\-include\-ndb\fR .sp -Run also tests that need Cluster\&. This is the default behavior up to MySQL 5\&.1\&.51\&. From MySQL 5\&.1\&.52 this option has been added to re\-enable running Cluster tests\&. +Run also tests that need Cluster\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.\" mysql-test-run.pl: json-explain-protocol option +.\" json-explain-protocol option: mysql-test-run.pl +\fB\-\-json\-explain\-protocol\fR, +.sp +Run +EXPLAIN FORMAT=JSON +on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. The +json\-explain\-protocol +option is available from MySQL 5\&.6\&. .RE .sp .RS 4 @@ -1286,8 +1337,6 @@ var/log/\fItestname\fR\&.progress\&. .sp The maximum number of simultaneous server connections that may be used per test\&. If not set, the maximum is 128\&. Minimum allowed limit is 8, maximum is 5120\&. Corresponds to the same option for \fBmysqltest\fR\&. -.sp -This option is available from MySQL 5\&.1\&.45\&. .RE .sp .RS 4 @@ -1414,10 +1463,6 @@ will normally also be propagated to \fBmysqld\fR, but there may be cases where you want a setting just for a single run, or you may not want the setting to affect other programs\&. You may use additional \fB\-\-mysqld\-env\fR options to set more than one variable\&. -.sp -The -\fB\-\-mysqld\-env\fR -option is available from MySQL 5\&.5\&.10\&. .RE .sp .RS 4 @@ -1468,7 +1513,9 @@ for a description\&. .\" nodefault-myisam option: mysql-test-run.pl \fB\-\-nodefault\-myisam\fR .sp -Do not override the build\-in default engine to use MyISAM instead for non\-InnoDB tests\&. This option was added in MySQL 5\&.5\&. Since the existing collection of tests were originally adapted for MyISAM as default, many tests will fail when this option is used, because the test behaves differently or produces different output when the engine switches to InnoDB\&. +For MySQL 5\&.5 or 5\&.6, do not override the build\-in default engine to use MyISAM instead for non\-InnoDB tests\&. Since the existing collection of tests were originally adapted for MyISAM as default, many tests will fail when this option is used, because the test behaves differently or produces different output when the engine switches to InnoDB\&. +.sp +From MySQL 5\&.7, the default engine for tests has been changed to InnoDB and this option will have no effect\&. .RE .sp .RS 4 @@ -1554,7 +1601,7 @@ Run tests using parallel threads\&. By default, 1 thread is used\&. Use \fB\-\-parallel=auto\fR for auto\-setting of -\fIN\fR\&. The auto value was added in MySQL 5\&.1\&.36\&. +\fIN\fR\&. .RE .sp .RS 4 @@ -1797,7 +1844,7 @@ Do not apply combinations; ignore combinations file or option\&. .\" skip-ndb option: mysql-test-run.pl \fB\-\-skip\-ndb\fR .sp -Do not start NDB Cluster; skip Cluster test cases\&. From MySQL 5\&.1\&.52, this is the default and so this option does not do anything but is kept for backward compatibility\&. +Do not start NDB Cluster; skip Cluster test cases\&. This option only has effect if you do have NDB, if not it will have no effect as it cannot run those tests anyway\&. .RE .sp .RS 4 @@ -2020,14 +2067,6 @@ This is similar to \fB\-\-start\fR, but \fBmysql\-test\-run\&.pl\fR terminates once the server has been started, leaving just the server process running\&. -.sp -Tha -\fB\-\-start\-and\-exit\fR -was available with version 1 of -\fBmysql\-test\-run\&.pl\fR -(unlike -\fB\-\-start\fR -which came with version 2), and is again supported in version 2 from MySQL 5\&.1\&.51\&. .RE .sp .RS 4 @@ -2279,6 +2318,25 @@ Running of unit tests was enabled from MySQL 5\&.5\&.11\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysql-test-run.pl: unit-tests-report option +.\" unit-tests-report option: mysql-test-run.pl +\fB\-\-unit\-tests\-report\fR +.sp +Extend the unit test run by also outputting the log from the test run, independently of whether it succeeded or not\&. This option implies +\fB\-\-unit\-tests\fR +so it is not necessary to specify both\&. The +\fB\-\-unit\-tests\-report\fR +option is available in MySQL 5\&.5 from version 5\&.5\&.44, in 5\&.6 from version 5\&.6\&.25 as well as in MySQL 5\&.7\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysql-test-run.pl: user option .\" user option: mysql-test-run.pl \fB\-\-user=\fR\fB\fIuser_name\fR\fR @@ -2307,10 +2365,6 @@ arguemnts, if any\&. Only works in combination with \fB\-\-start\-and\-exit\fR or \fB\-\-start\-dirty\fR, and only if no test name is given\&. -.sp -The -\fB\-\-user\-args\fR -option was added in MySQL 5\&.1\&.51\&. .RE .sp .RS 4 @@ -2336,7 +2390,7 @@ options require that the executables have been build with \fBvalgrind\fR support\&. .sp -When the server is run with valgrind, an extra pass over the server log file(s) will be performed after all tests are run, and any report with problems that have been reported at server shutdown will be extracted and printed\&. The most common warnings are memory leaks\&. With each report will also be listed all tests that were run since previous server restart; one of these is likely to have caused the problem\&. This reporting was added in MySQL 5\&.1\&.45\&. +When the server is run with valgrind, an extra pass over the server log file(s) will be performed after all tests are run, and any report with problems that have been reported at server shutdown will be extracted and printed\&. The most common warnings are memory leaks\&. With each report will also be listed all tests that were run since previous server restart; one of these is likely to have caused the problem\&. .sp From MySQL 5\&.5\&.13, a final "pseudo" test named valgrind_report @@ -2512,8 +2566,6 @@ If or \fB\-\-start\-dirty\fR is used, wait for all servers to exit before termination\&. Otherise, it will terminate if one (of several) servers is restarted\&. -.sp -This option was added in MySQL 5\&.1\&.36\&. .RE .sp .RS 4 @@ -2551,7 +2603,7 @@ in their name\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2014, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2015, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql.1 b/man/mysql.1 index 82a5d551ab87..93a947f9af04 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -286,8 +286,7 @@ Write column names in results\&. .\} .\" mysql: column-type-info option .\" column-type-info option: mysql -\fB\-\-column\-type\-info\fR, -\fB\-m\fR +\fB\-\-column\-type\-info\fR .sp Display result set metadata\&. .RE @@ -403,7 +402,7 @@ Print debugging information and memory and CPU usage statistics when the program .\" default-auth option: mysql \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp -The client\-side authentication plugin to use\&. See +A hint about the client\-side authentication plugin to use\&. See Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. .sp This option was added in MySQL 5\&.5\&.7\&. diff --git a/man/mysql.server.1 b/man/mysql.server.1 index 5eb79a55f0a1..9144b8f3bf12 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,19 +36,58 @@ mysql.server \- MySQL server startup script .SH "DESCRIPTION" .PP MySQL distributions on Unix include a script named -\fBmysql\&.server\fR\&. It can be used on systems such as Linux and Solaris that use System V\-style run directories to start and stop system services\&. It is also used by the Mac OS X Startup Item for MySQL\&. +\fBmysql\&.server\fR, which starts the server using +\fBmysqld_safe\fR\&. It can be used on systems such as Linux and Solaris that use System V\-style run directories to start and stop system services\&. It is also used by the OS X Startup Item for MySQL\&. .PP +To start or stop the server manually using the \fBmysql\&.server\fR -can be found in the -support\-files -directory under your MySQL installation directory or in a MySQL source distribution\&. +script, invoke it with +start +or +stop +arguments: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql\&.server start\fR +shell> \fBmysql\&.server stop\fR +.fi +.if n \{\ +.RE +.\} +.PP +Before +\fBmysql\&.server\fR +starts the server, it changes location to the MySQL installation directory, and then invokes +\fBmysqld_safe\fR\&. To run the server as some specific user, add an appropriate +user +option to the +[mysqld] +group of the +/etc/my\&.cnf +option file, as shown later in this section\&. (It is possible that you must edit +\fBmysql\&.server\fR +if you\*(Aqve installed a binary distribution of MySQL in a nonstandard location\&. Modify it to change location into the proper directory before it runs +\fBmysqld_safe\fR\&. If you do this, your modified version of +\fBmysql\&.server\fR +may be overwritten if you upgrade MySQL in the future, so you should make a copy of your edited version that you can reinstall\&.) +.PP +\fBmysql\&.server stop\fR +stops the server by sending a signal to it\&. You can also stop the server manually by executing +\fBmysqladmin shutdown\fR\&. +.PP +To start and stop MySQL automatically on your server, you must add start and stop commands to the appropriate places in your +/etc/rc* +files\&. .PP -If you use the Linux server RPM package (MySQL\-server\-\fIVERSION\fR\&.rpm), the +If you use the Linux server RPM package (MySQL\-server\-\fIVERSION\fR\&.rpm), or a native Linux package installation, the \fBmysql\&.server\fR -script will be installed in the +script may be installed in the /etc/init\&.d directory with the name -mysql\&. You need not install it manually\&. See +mysql\&. See Section\ \&2.5.1, \(lqInstalling MySQL on Linux Using RPM Packages\(rq, for more information on the Linux RPM packages\&. .PP Some vendors provide RPM packages that install a startup script under a different name such as @@ -56,8 +95,113 @@ Some vendors provide RPM packages that install a startup script under a differen .PP If you install MySQL from a source distribution or using a binary distribution format that does not install \fBmysql\&.server\fR -automatically, you can install it manually\&. Instructions are provided in -Section\ \&2.10.1.2, \(lqStarting and Stopping MySQL Automatically\(rq\&. +automatically, you can install it manually\&. The script can be found in the +support\-files +directory under the MySQL installation directory or in a MySQL source tree\&. Copy it to the +/etc/init\&.d +directory with the name +\fBmysql\fR, and then make it executable: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBcp mysql\&.server /etc/init\&.d/mysql\fR +shell> \fBchmod +x /etc/init\&.d/mysql\fR +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +Older Red Hat systems use the +/etc/rc\&.d/init\&.d +directory rather than +/etc/init\&.d\&. Adjust the preceding commands accordingly\&. Alternatively, first create +/etc/init\&.d +as a symbolic link that points to +/etc/rc\&.d/init\&.d: +.sp .5v +.RE +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBcd /etc\fR +shell> \fBln \-s rc\&.d/init\&.d \&.\fR +.fi +.if n \{\ +.RE +.\} +.PP +After installing the script, the commands needed to activate it to run at system startup depend on your operating system\&. On Linux, you can use +\fBchkconfig\fR: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBchkconfig \-\-add mysql\fR +.fi +.if n \{\ +.RE +.\} +.PP +On some Linux systems, the following command also seems to be necessary to fully enable the +\fBmysql\fR +script: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBchkconfig \-\-level 345 mysql on\fR +.fi +.if n \{\ +.RE +.\} +.PP +On FreeBSD, startup scripts generally should go in +/usr/local/etc/rc\&.d/\&. The +rc(8) +manual page states that scripts in this directory are executed only if their basename matches the +*\&.sh +shell file name pattern\&. Any other files or directories present within the directory are silently ignored\&. In other words, on FreeBSD, you should install the +mysql\&.server +script as +/usr/local/etc/rc\&.d/mysql\&.server\&.sh +to enable automatic startup\&. +.PP +As an alternative to the preceding setup, some operating systems also use +/etc/rc\&.local +or +/etc/init\&.d/boot\&.local +to start additional services on startup\&. To start up MySQL using this method, append a command like the one following to the appropriate startup file: +.sp +.if n \{\ +.RS 4 +.\} +.nf +/bin/sh \-c \*(Aqcd /usr/local/mysql; \&./bin/mysqld_safe \-\-user=mysql &\*(Aq +.fi +.if n \{\ +.RE +.\} +.PP +For other systems, consult your operating system documentation to see how to install startup scripts\&. .PP \fBmysql\&.server\fR reads options from the @@ -66,12 +210,45 @@ and [mysqld] sections of option files\&. For backward compatibility, it also reads [mysql_server] -sections, although you should rename such sections to +sections, but to be current you should rename such sections to +[mysql\&.server]\&. +.\" changing: socket location +.PP +You can add options for +\fBmysql\&.server\fR +in a global +/etc/my\&.cnf +file\&. A typical +/etc/my\&.cnf +file might look like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[mysqld] +datadir=/usr/local/mysql/var +socket=/var/tmp/mysql\&.sock +port=3306 +user=mysql [mysql\&.server] -when using MySQL 5\&.5\&. +basedir=/usr/local/mysql +.fi +.if n \{\ +.RE +.\} .PP +The +\fBmysql\&.server\fR +script supports the following options\&. If specified, they +\fImust\fR +be placed in an option file, not on the command line\&. \fBmysql\&.server\fR -supports the following options\&. +supports only +start +and +stop +as command\-line arguments\&. .sp .RS 4 .ie n \{\ @@ -116,6 +293,31 @@ The path to the MySQL data directory\&. \fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR .sp The path name of the file in which the server should write its process ID\&. +.sp +If this option is not given, +\fBmysql\&.server\fR +uses a default value of +\fIhost_name\fR\&.pid\&. The PID file value passed to +\fBmysqld_safe\fR +overrides any value specified in the +[mysqld_safe] +option file group\&. Because +\fBmysql\&.server\fR +reads the +[mysqld] +option file group but not the +[mysqld_safe] +group, you can ensure that +\fBmysqld_safe\fR +gets the same value when invoke using +\fBmysql\&.server\fR +as when invoked manually by putting the same +pid\-file +setting in both the +[mysqld_safe] +and +[mysqld] +groups\&. .RE .sp .RS 4 @@ -134,39 +336,6 @@ How long in seconds to wait for confirmation of server startup\&. If the server \fBmysql\&.server\fR exits with an error\&. The default value is 900\&. A value of 0 means not to wait at all for startup\&. Negative values mean to wait forever (no timeout)\&. .RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql.server: use-mysqld_safe option -.\" use-mysqld_safe option: mysql.server -\fB\-\-use\-mysqld_safe\fR -.sp -Use -\fBmysqld_safe\fR -to start the server\&. This is the default\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -.\" mysql.server: user option -.\" user option: mysql.server -\fB\-\-user=\fR\fB\fIuser_name\fR\fR -.sp -The login user name to use for running -\fBmysqld\fR\&. -.RE .SH "COPYRIGHT" .br .PP diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index 7106a5c45bd5..ad89aeb14573 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/05/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "01/05/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "06/25/2015" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -335,7 +335,7 @@ mysql\-test/var\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2014, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2015, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_config.1 b/man/mysql_config.1 index b16fcadd3a7f..b15dc1c558e3 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -178,6 +178,29 @@ The default Unix socket file, defined when configuring MySQL\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysql_config: variable option +.\" variable option: mysql_config +\fB\-\-variable=\fR\fB\fIvar_name\fR\fR +.sp +Display the value of the named configuration variable\&. Permitted +\fIvar_name\fR +values are +pkgincludedir +(the header file directory), +pkglibdir +(the library directory), and +plugindir +(the plugin directory)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysql_config: version option .\" version option: mysql_config \fB\-\-version\fR @@ -202,11 +225,16 @@ Options: \-lpthread \-lm \-lrt \-lssl \-lcrypto \-ldl] \-\-libs_r [\-L/usr/local/mysql/lib/mysql \-lmysqlclient_r \-lpthread \-lm \-lrt \-lssl \-lcrypto \-ldl] + \-\-plugindir [/usr/local/mysql/lib/plugin] \-\-socket [/tmp/mysql\&.sock] \-\-port [3306] \-\-version [5\&.5\&.31] \-\-libmysqld\-libs [\-L/usr/local/mysql/lib/mysql \-lmysqld \-lpthread \-lm \-lrt \-lssl \-lcrypto \-ldl \-lcrypt] + \-\-variable=VAR VAR is one of: + pkgincludedir [/usr/local/mysql/include] + pkglibdir [/usr/local/mysql/lib] + plugindir [/usr/local/mysql/lib/plugin] .fi .if n \{\ .RE diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 index 7f92da31958a..b2f08958f18a 100644 --- a/man/mysql_convert_table_format.1 +++ b/man/mysql_convert_table_format.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_convert_table_format\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONVERT_TAB" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONVERT_TAB" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 index e29601958221..687c8aac3502 100644 --- a/man/mysql_find_rows.1 +++ b/man/mysql_find_rows.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_find_rows\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIND_ROWS\F" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 index 33a9ba3daab2..f10ce7eaa4fa 100644 --- a/man/mysql_fix_extensions.1 +++ b/man/mysql_fix_extensions.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_fix_extensions\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIX_EXTENSI" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index 131843e33aa5..7e452cb6083e 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index 0be2e13f4245..c6e1587c9313 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index b60c01ad2ff5..5ef195f9414d 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -90,7 +90,7 @@ test_\&. .PP \fBmysql_secure_installation\fR helps you implement security recommendations similar to those described at -Section\ \&2.10.2, \(lqSecuring the Initial MySQL Accounts\(rq\&. +Section\ \&2.10.4, \(lqSecuring the Initial MySQL Accounts\(rq\&. .PP Invoke \fBmysql_secure_installation\fR diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 index b85602beca94..da1d225f4b82 100644 --- a/man/mysql_setpermission.1 +++ b/man/mysql_setpermission.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_setpermission\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SETPERMISSI" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SETPERMISSI" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index 5519a22988d3..939a6efb398a 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -42,7 +42,7 @@ program loads the time zone tables in the mysql database\&. It is used on systems that have a zoneinfo -database (the set of files describing time zones)\&. Examples of such systems are Linux, FreeBSD, Solaris, and Mac OS X\&. One likely location for these files is the +database (the set of files describing time zones)\&. Examples of such systems are Linux, FreeBSD, Solaris, and OS X\&. One likely location for these files is the /usr/share/zoneinfo directory (/usr/share/lib/zoneinfo on Solaris)\&. If your system does not have a zoneinfo database, you can use the downloadable package described in diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index 1285738caf52..f81c28218a6b 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -392,7 +392,7 @@ Print debugging information and memory and CPU usage statistics when the program .\" default-auth option: mysql_upgrade \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp -The client\-side authentication plugin to use\&. See +A hint about the client\-side authentication plugin to use\&. See Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. .sp This option was added in MySQL 5\&.5\&.10\&. diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 index 1bc815d83252..1692272765d8 100644 --- a/man/mysql_waitpid.1 +++ b/man/mysql_waitpid.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_waitpid\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_WAITPID\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_WAITPID\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 index 4186bb7bad46..5e4063349220 100644 --- a/man/mysql_zap.1 +++ b/man/mysql_zap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_zap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_ZAP\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_ZAP\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index 2395c03a65a2..ab6673b7e7ec 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlaccess\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLACCESS\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLACCESS\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index 2df3cee8359f..364e1d2cabb8 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -759,7 +759,7 @@ Print debugging information and memory and CPU usage statistics when the program .\" default-auth option: mysqladmin \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp -The client\-side authentication plugin to use\&. See +A hint about the client\-side authentication plugin to use\&. See Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. .sp This option was added in MySQL 5\&.5\&.9\&. diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index 39b2f8b3a009..a9011d92e818 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -571,7 +571,7 @@ Print debugging information and memory and CPU usage statistics when the program .\" default-auth option: mysqlbinlog \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp -The client\-side authentication plugin to use\&. See +A hint about the client\-side authentication plugin to use\&. See Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. .sp This option was added in MySQL 5\&.5\&.10\&. diff --git a/man/mysqlbug.1 b/man/mysqlbug.1 index 12b9a23c0d1b..72459def49a5 100644 --- a/man/mysqlbug.1 +++ b/man/mysqlbug.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbug\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBUG\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBUG\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index dc7f20615441..ba7fca176b9a 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -590,7 +590,7 @@ If you are using this option to repair tables, it runs an extended repair that m .\" default-auth option: mysqlcheck \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp -The client\-side authentication plugin to use\&. See +A hint about the client\-side authentication plugin to use\&. See Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. .sp This option was added in MySQL 5\&.5\&.10\&. diff --git a/man/mysqld.8 b/man/mysqld.8 index 7eed14d07377..577a77274ca2 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index 7874907ac511..89969d9f4233 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -59,7 +59,7 @@ to specify which servers you want to start, stop, or obtain a status report for\ [mysqld] group used for starting \fBmysqld\fR\&. (See, for example, -Section\ \&2.10.1.2, \(lqStarting and Stopping MySQL Automatically\(rq\&.) However, when using multiple servers, it is necessary that each one use its own value for options such as the Unix socket file and TCP/IP port number\&. For more information on which options must be unique per server in a multiple\-server environment, see +Section\ \&2.10.5, \(lqStarting and Stopping MySQL Automatically\(rq\&.) However, when using multiple servers, it is necessary that each one use its own value for options such as the Unix socket file and TCP/IP port number\&. For more information on which options must be unique per server in a multiple\-server environment, see Section\ \&5.3, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. .PP To invoke @@ -544,8 +544,8 @@ account by executing the following commands for each server: .nf shell> \fBmysql \-u root \-S /tmp/mysql\&.sock \-p\fR Enter password: -mysql> \fBGRANT SHUTDOWN ON *\&.*\fR - \-> \fBTO \*(Aqmulti_admin\*(Aq@\*(Aqlocalhost\*(Aq IDENTIFIED BY \*(Aqmultipass\*(Aq;\fR +mysql> \fBCREATE USER \*(Aqmulti_admin\*(Aq@\*(Aqlocalhost\*(Aq IDENTIFIED BY \*(Aqmultipass\*(Aq;\fR +mysql> \fBGRANT SHUTDOWN ON *\&.* TO \*(Aqmulti_admin\*(Aq@\*(Aqlocalhost\*(Aq;\fR .fi .if n \{\ .RE diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index 6d2e08253646..55883e0e7b4c 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -100,11 +100,8 @@ For backward compatibility, \fBmysqld_safe\fR also reads [safe_mysqld] -sections, although it is preferable to rename -[safe_mysqld] -sections to -[mysqld_safe] -sections\&. +sections, but to be current you should rename such sections to +[mysqld_safe]\&. .PP \fBmysqld_safe\fR supports the following options\&. It also reads option files and supports the options for processing them described at @@ -705,7 +702,7 @@ mysql> \fBmysqld_safe \-\-defaults\-file=\fR\fB\fIfile_name\fR\fR\fB \-\-port=\f The \fBmysqld_safe\fR script is written so that it normally can start a server that was installed from either a source or a binary distribution of MySQL, even though these types of distributions typically install the server in slightly different locations\&. (See -Section\ \&2.1.5, \(lqInstallation Layouts\(rq\&.) +Section\ \&2.1.4, \(lqInstallation Layouts\(rq\&.) \fBmysqld_safe\fR expects one of the following conditions to be true: .sp diff --git a/man/mysqldump.1 b/man/mysqldump.1 index 4b7b8f7c4433..0fb81fc5d92b 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -75,6 +75,47 @@ MyISAM tables, you can also use \fBmysqlhotcopy\fR for this purpose\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +A dump made using PowerShell on Windows with output redirection creates a file that has UTF\-16 encoding: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysqldump [options] > dump\&.sql +.fi +.if n \{\ +.RE +.\} +.PP +However, UTF\-16 is not permitted as a connection character set (see +Section\ \&10.1.4, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the +\fB\-\-result\-file\fR +option, which creates the output in ASCII format: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysqldump [options] \-\-result\-file=dump\&.sql +.fi +.if n \{\ +.RE +.\} +.sp .5v +.RE Performance and Scalability Considerations.PP mysqldump advantages include the convenience and flexibility of viewing or even editing the output before restoring\&. You can clone databases for development and DBA work, or produce slight variations of an existing database for testing\&. It is not intended as a fast or scalable solution for backing up substantial amounts of data\&. With large data sizes, even if the backup step takes a reasonable time, restoring the data can be very slow because replaying the SQL statements involves disk I/O for insertion, index creation, and so on\&. @@ -104,7 +145,7 @@ InnoDB backups with minimal disruption; it can also back up tables from MyISAM and other storage engines; and it provides a number of convenient options to accommodate different backup scenarios\&. See -Section\ \&25.2, \(lqMySQL Enterprise Backup\(rq\&. +Section\ \&25.2, \(lqMySQL Enterprise Backup Overview\(rq\&. .RE .sp .RS 4 @@ -780,7 +821,7 @@ Print debugging information and memory and CPU usage statistics when the program .\" default-auth option: mysqldump \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp -The client\-side authentication plugin to use\&. See +A hint about the client\-side authentication plugin to use\&. See Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. .sp This option was added in MySQL 5\&.5\&.9\&. @@ -1031,7 +1072,9 @@ This option was added in MySQL 5\&.5\&.3\&. \fB\-\-events\fR, \fB\-E\fR .sp -Include Event Scheduler events for the dumped databases in the output\&. +Include Event Scheduler events for the dumped databases in the output\&. This option requires the +EVENT +privileges for those databases\&. .RE .sp .RS 4 diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index c9e827302152..ce7ece80f04b 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 index 63c7cf6d7f31..8b02463c57e9 100644 --- a/man/mysqlhotcopy.1 +++ b/man/mysqlhotcopy.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlhotcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLHOTCOPY\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLHOTCOPY\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index 7fdf393615c4..4f09a89191d1 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -244,7 +244,7 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .\" default-auth option: mysqlimport \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp -The client\-side authentication plugin to use\&. See +A hint about the client\-side authentication plugin to use\&. See Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. .sp This option was added in MySQL 5\&.5\&.10\&. diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index 07cd6f1d200c..1d0faf06c7c0 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -291,7 +291,7 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .\" default-auth option: mysqlshow \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp -The client\-side authentication plugin to use\&. See +A hint about the client\-side authentication plugin to use\&. See Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. .sp This option was added in MySQL 5\&.5\&.10\&. diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index 9c9b9b5b9f4f..2a2cc464aede 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -511,7 +511,7 @@ Print debugging information and memory and CPU usage statistics when the program .\" default-auth option: mysqlslap \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp -The client\-side authentication plugin to use\&. See +A hint about the client\-side authentication plugin to use\&. See Section\ \&6.3.6, \(lqPluggable Authentication\(rq\&. .sp This option was added in MySQL 5\&.5\&.10\&. diff --git a/man/mysqltest.1 b/man/mysqltest.1 index 63ff2c115025..b928335c8f6f 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/05/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "01/05/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "06/25/2015" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -295,6 +295,23 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} +.\" mysqltest: explain-protocol option +.\" explain-protocol option: mysqltest +\fB\-\-explain\-protocol\fR, +.sp +Run +EXPLAIN EXTENDED +on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysqltest: host option .\" host option: mysqltest \fB\-\-host=\fR\fB\fIhost_name\fR\fR, @@ -331,6 +348,25 @@ command as the first line of the test file\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysqltest: json-explain-protocol option +.\" json-explain-protocol option: mysqltest +\fB\-\-json\-explain\-protocol\fR, +.sp +Run +EXPLAIN FORMAT=JSON +on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. The +json\-explain\-protocol +option is available from MySQL 5\&.6\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysqltest: logdir option .\" logdir option: mysqltest \fB\-\-logdir=\fR\fB\fIdir_name\fR\fR @@ -382,8 +418,6 @@ The maximum number of connection attempts when connecting to server\&. \fB\-\-max\-connections=\fR\fB\fInum\fR\fR .sp The maximum number of simultaneous server connections per client (that is, per test)\&. If not set, the maximum is 128\&. Minimum allowed limit is 8, maximum is 5120\&. -.sp -This option is available from MySQL 5\&.1\&.45\&. .RE .sp .RS 4 @@ -480,7 +514,7 @@ is default\&. .sp The \fB\-\-protocol\fR -option is available from MySQL 5\&.1\&.51\&. It is ignored if running with the embedded server\&. +option is ignored if running with the embedded server\&. .RE .sp .RS 4 @@ -737,7 +771,7 @@ seconds\&. This option does not affect real_sleep commands\&. .sp -As of MySQL 5\&.0\&.23, an option value of 0 can be used, which effectively disables +An option value of 0 can also be used, which effectively disables sleep commands in the test case\&. .RE @@ -904,12 +938,12 @@ Display version information and exit\&. .sp Every SELECT -statement is wrapped inside a view\&. This option was added in MySQL 5\&.0\&.19\&. +statement is wrapped inside a view\&. .RE .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2014, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2015, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb-common-options.1 b/man/ndb-common-options.1 index f8975fcd1a77..d7be8f386021 100644 --- a/man/ndb-common-options.1 +++ b/man/ndb-common-options.1 @@ -2,12 +2,12 @@ .\" Title: Options Common to MySQL Cluster Programs .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "OPTIONS COMMON TO MY" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "OPTIONS COMMON TO MY" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -140,8 +140,8 @@ T{ -c T}:T{ Set connection string for connecting to ndb_mgmd. Syntax: - [nodeid=;][host=][:]. - Overrides entries specified in NDB_CONNECTSTRING or my.cnf. + [nodeid=;][host=][:]. + Overrides entries specified in NDB_CONNECTSTRING or my.cnf. T}:T{ .PP All MySQL 5.5 based releases @@ -150,8 +150,7 @@ T{ .PP --ndb-mgmd-host=host[:port] T}:T{ -Set the host (and port, if desired) for connecting to management - server +Set the host (and port, if desired) for connecting to management server T}:T{ .PP All MySQL 5.5 based releases @@ -187,8 +186,8 @@ T{ .PP --debug=options T}:T{ -Enable output from debug calls. Can be used only for versions - compiled with debugging enabled +Enable output from debug calls. Can be used only for versions compiled + with debugging enabled T}:T{ .PP All MySQL 5.5 based releases diff --git a/man/ndb_blob_tool.1 b/man/ndb_blob_tool.1 index 8f25774f0498..ce48eaa3af46 100644 --- a/man/ndb_blob_tool.1 +++ b/man/ndb_blob_tool.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_blob_tool\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_BLOB_TOOL\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_BLOB_TOOL\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_config.1 b/man/ndb_config.1 index 879839600433..d8bc57cf51ac 100644 --- a/man/ndb_config.1 +++ b/man/ndb_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CONFIG\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CONFIG\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -100,7 +100,9 @@ T{ .PP --nodes T}:T{ -Print node information (DB section) only. +Print node information ([ndbd] or [ndbd default] section of cluster + configuration file) only. Cannot be used with --system or + --connections. T}:T{ .PP All MySQL 5.5 based releases @@ -109,8 +111,10 @@ T{ .PP --connections T}:T{ -Print CONNECTIONS section information only. Cannot be used with - --nodes or --system option. +Print connections information ([tcp], [tcp default], [sci], [sci + default], [shm], or [shm default] sections of cluster + configuration file) only. Cannot be used with --system or + --nodes. T}:T{ .PP All MySQL 5.5 based releases @@ -208,9 +212,9 @@ T{ .PP --configinfo T}:T{ -Dumps information about all NDB configuration parameters in text - format with default, maximum, and minimum values. Use with --xml - to obtain XML output. +Dumps information about all NDB configuration parameters in text format + with default, maximum, and minimum values. Use with --xml to + obtain XML output. T}:T{ .PP All MySQL 5.5 based releases @@ -219,9 +223,9 @@ T{ .PP --configinfo --xml T}:T{ -Use --xml with --configinfo to obtain a dump of all NDB - configuration parameters in XML format with default, maximum, and - minimum values. +Use --xml with --configinfo to obtain a dump of all NDB configuration + parameters in XML format with default, maximum, and minimum + values. T}:T{ .PP All MySQL 5.5 based releases @@ -230,8 +234,8 @@ T{ .PP --system T}:T{ -Print SYSTEM section information only. Cannot be used with --nodes - or --connections option. +Print SYSTEM section information only (see ndb_config --configinfo + output). Cannot be used with --nodes or --connections. T}:T{ .PP All MySQL 5.5 based releases @@ -240,8 +244,8 @@ T{ .PP --config_from_node=# T}:T{ -Obtain configuration data from the node having this ID (must be a - data node). +Obtain configuration data from the node having this ID (must be a data + node). T}:T{ .PP All MySQL 5.5 based releases @@ -707,12 +711,17 @@ T} .sp 1 Tells \fBndb_config\fR -to print information from parameters defined in -DB -sections only\&. This option cannot be used together with -\fB\-\-connections\fR +to print information relating only to parameters defined in an +[ndbd] or -\fB\-\-system\fR\&. +[ndbd default] +section of the cluster configuration file (see +Section\ \&18.3.2.6, \(lqDefining MySQL Cluster Data Nodes\(rq)\&. +.sp +This option is mutually exclusive with +\fB\-\-connections\fR +and +\fB\-\-system\fR; only one of these 3 options can be used\&. .RE .sp .RS 4 @@ -754,10 +763,22 @@ Tells \fBndb_config\fR to print CONNECTIONS -information only\&. This option cannot be used together with +information only\(emthat is, information about parameters found in the +[tcp], +[tcp default], +[sci], +[sci default], +[shm], or +[shm default] +sections of the cluster configuration file (see +Section\ \&18.3.2.8, \(lqMySQL Cluster TCP/IP Connections\(rq, +Section\ \&18.3.2.11, \(lqSCI Transport Connections in MySQL Cluster\(rq, and +Section\ \&18.3.2.10, \(lqMySQL Cluster Shared-Memory Connections\(rq, for more information)\&. +.sp +This option is mutually exclusive with \fB\-\-nodes\fR -or -\fB\-\-system\fR\&. +and +\fB\-\-system\fR; only one of these 3 options can be used\&. .RE .sp .RS 4 @@ -799,13 +820,15 @@ Tells \fBndb_config\fR to print SYSTEM -information only\&. +information only\&. This consists of system variables that cannot be changed at run time; thus, there is no corresponding section of the cluster configuration file for them\&. They can be seen (prefixed with +****** SYSTEM ******) in the output of +\fBndb_config\fR +\fB\-\-configinfo\fR\&. .sp -This option cannot be used together with the +This option is mutually exclusive with \fB\-\-nodes\fR -or -\fB\-\-system\fR -options\&. +and +\fB\-\-connections\fR; only one of these 3 options can be used\&. .RE .sp .RS 4 @@ -1060,17 +1083,6 @@ Where applicable, the parameter\*(Aqs default, minimum, and maximum values .sp -1 .IP \(bu 2.3 .\} -A brief description of the parameter\*(Aqs purpose, effects, and usage -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} MySQL Cluster release version and build information .RE .sp @@ -1144,7 +1156,7 @@ option\&. A portion of the resulting output is shown in this example: .\} .nf shell> \fBndb_config \-\-configinfo \-\-xml\fR -
diff --git a/man/ndb_cpcd.1 b/man/ndb_cpcd.1 index dc0be31c33f0..788a1c70b9c0 100644 --- a/man/ndb_cpcd.1 +++ b/man/ndb_cpcd.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_cpcd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CPCD\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CPCD\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_delete_all.1 b/man/ndb_delete_all.1 index 7f2d35eb7a01..91f1b54188b9 100644 --- a/man/ndb_delete_all.1 +++ b/man/ndb_delete_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_delete_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DELETE_ALL\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DELETE_ALL\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -103,8 +103,7 @@ T{ .PP -t T}:T{ -Perform the delete in a single transaction (may run out of - operations) +Perform the delete in a single transaction (may run out of operations) T}:T{ .PP All MySQL 5.5 based releases diff --git a/man/ndb_desc.1 b/man/ndb_desc.1 index 8502dd81ddb0..5f18ff21baf2 100644 --- a/man/ndb_desc.1 +++ b/man/ndb_desc.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_desc\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DESC\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DESC\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -358,8 +358,8 @@ T{ .PP -b T}:T{ -Include partition information for BLOB tables in output. Requires - that the -p option also be used +Include partition information for BLOB tables in output. Requires that + the -p option also be used T}:T{ .PP All MySQL 5.5 based releases @@ -381,8 +381,8 @@ T{ .PP -n T}:T{ -Include partition-to-data-node mappings in output. Requires that - the -p option also be used +Include partition-to-data-node mappings in output. Requires that the -p + option also be used T}:T{ .PP All MySQL 5.5 based releases @@ -415,8 +415,8 @@ T{ .PP -t T}:T{ -Specify the table in which to find an index. When this option is - used, -p and -n have no effect and are ignored. +Specify the table in which to find an index. When this option is used, + -p and -n have no effect and are ignored. T}:T{ .PP ADDED: NDB 7.2.9 diff --git a/man/ndb_drop_index.1 b/man/ndb_drop_index.1 index f9219b60c6a3..0b0a3f08d357 100644 --- a/man/ndb_drop_index.1 +++ b/man/ndb_drop_index.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_index\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_INDEX\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_INDEX\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -123,7 +123,7 @@ Enter password: ******* Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with \-A Welcome to the MySQL monitor\&. Commands end with ; or \eg\&. -Your MySQL connection id is 7 to server version: 5\&.5\&.41\-ndb\-7\&.2\&.19 +Your MySQL connection id is 7 to server version: 5\&.5\&.44\-ndb\-7\&.2\&.21 Type \*(Aqhelp;\*(Aq or \*(Aq\eh\*(Aq for help\&. Type \*(Aq\ec\*(Aq to clear the buffer\&. mysql> \fBSHOW TABLES;\fR +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ diff --git a/man/ndb_drop_table.1 b/man/ndb_drop_table.1 index 5ebc26347558..44eb90e9c697 100644 --- a/man/ndb_drop_table.1 +++ b/man/ndb_drop_table.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_table\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_TABLE\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_TABLE\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_error_reporter.1 b/man/ndb_error_reporter.1 index d1b36e1cb138..23166c310935 100644 --- a/man/ndb_error_reporter.1 +++ b/man/ndb_error_reporter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_error_reporter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_ERROR_REPORTE" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_ERROR_REPORTE" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -78,8 +78,7 @@ T{ .PP --connection-timeout=timeout T}:T{ -Number of seconds to wait when connecting to nodes before timing - out. +Number of seconds to wait when connecting to nodes before timing out. T}:T{ .PP ADDED: NDB 7.2.14 @@ -97,8 +96,8 @@ T{ .PP --fs T}:T{ -Include file system data in error report; can use a large amount - of disk space +Include file system data in error report; can use a large amount of disk + space T}:T{ .PP All MySQL 5.5 based releases diff --git a/man/ndb_index_stat.1 b/man/ndb_index_stat.1 index 46ec50d3c8a7..34eaaf5a18a0 100644 --- a/man/ndb_index_stat.1 +++ b/man/ndb_index_stat.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_index_stat\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_INDEX_STAT\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_INDEX_STAT\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -210,8 +210,8 @@ T{ .PP --delete T}:T{ -Delete index statistics for the given table, stopping any - auto-update previously configured. +Delete index statistics for the given table, stopping any auto-update + previously configured. T}:T{ .PP All MySQL 5.5 based releases @@ -220,8 +220,8 @@ T{ .PP --update T}:T{ -Update index statistics for the given table, restarting any - auto-update previously configured. +Update index statistics for the given table, restarting any auto-update + previously configured. T}:T{ .PP All MySQL 5.5 based releases @@ -239,8 +239,8 @@ T{ .PP --query=# T}:T{ -Perform a number of random range queries on first key attr (must - be int unsigned). +Perform a number of random range queries on first key attr (must be int + unsigned). T}:T{ .PP All MySQL 5.5 based releases @@ -249,8 +249,8 @@ T{ .PP --sys-drop T}:T{ -Drop any statistics tables and events in NDB kernel (all - statistics are lost) +Drop any statistics tables and events in NDB kernel (all statistics are + lost) T}:T{ .PP All MySQL 5.5 based releases @@ -259,8 +259,8 @@ T{ .PP --sys-create T}:T{ -Create all statistics tables and events in NDB kernel, if none of - them already exist +Create all statistics tables and events in NDB kernel, if none of them + already exist T}:T{ .PP All MySQL 5.5 based releases @@ -270,7 +270,7 @@ T{ --sys-create-if-not-exist T}:T{ Create any statistics tables and events in NDB kernel that do not - already exist. + already exist. T}:T{ .PP All MySQL 5.5 based releases @@ -279,8 +279,8 @@ T{ .PP --sys-create-if-not-valid T}:T{ -Create any statistics tables or events that do not already exist - in the NDB kernel. after dropping any that are invalid. +Create any statistics tables or events that do not already exist in the + NDB kernel. after dropping any that are invalid. T}:T{ .PP All MySQL 5.5 based releases diff --git a/man/ndb_mgm.1 b/man/ndb_mgm.1 index 2d013664f7d0..b30773b27eb5 100644 --- a/man/ndb_mgm.1 +++ b/man/ndb_mgm.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgm\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGM\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGM\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -214,12 +214,12 @@ T{ T}:T{ \fBType\fR T}:T{ -boolean +integer T} :T{ \fBDefault\fR T}:T{ -TRUE +3 T} .TE .sp 1 diff --git a/man/ndb_mgmd.8 b/man/ndb_mgmd.8 index 384bb95b1353..c4c90d58ede4 100644 --- a/man/ndb_mgmd.8 +++ b/man/ndb_mgmd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgmd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGMD\FR" "8" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGMD\FR" "8" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -88,9 +88,9 @@ T{ .PP -f T}:T{ -Specify the cluster configuration file; in NDB-6.4.0 and later, - needs --reload or --initial to override configuration cache if - present +Specify the cluster configuration file; in NDB-6.4.0 and later, needs + --reload or --initial to override configuration cache if + present T}:T{ .PP All MySQL 5.5 based releases @@ -101,8 +101,7 @@ T{ .PP --config-dir=directory T}:T{ -Specify the cluster management server's configuration cache - directory +Specify the cluster management server's configuration cache directory T}:T{ .PP All MySQL 5.5 based releases @@ -152,7 +151,7 @@ T{ --interactive T}:T{ Run ndb_mgmd in interactive mode (not officially supported in - production; for testing purposes only) + production; for testing purposes only) T}:T{ .PP All MySQL 5.5 based releases @@ -161,8 +160,8 @@ T{ .PP --log-name=name T}:T{ -A name to use when writing messages applying to this node in the - cluster log. +A name to use when writing messages applying to this node in the cluster + log. T}:T{ .PP All MySQL 5.5 based releases @@ -189,8 +188,8 @@ T{ .PP --reload T}:T{ -Causes the management server to compare the configuration file - with its configuration cache +Causes the management server to compare the configuration file with its + configuration cache T}:T{ .PP All MySQL 5.5 based releases @@ -199,8 +198,8 @@ T{ .PP --initial T}:T{ -Causes the management server reload its configuration data from - the configuration file, bypassing the configuration cache +Causes the management server reload its configuration data from the + configuration file, bypassing the configuration cache T}:T{ .PP All MySQL 5.5 based releases @@ -209,8 +208,8 @@ T{ .PP --nowait-nodes=list T}:T{ -Do not wait for these management nodes when starting this - management server. Also requires --ndb-nodeid to be used. +Do not wait for these management nodes when starting this management + server. Also requires --ndb-nodeid to be used. T}:T{ .PP All MySQL 5.5 based releases @@ -228,8 +227,8 @@ T{ .PP --install[=name] T}:T{ -Used to install the management server process as a Windows - service. Does not apply on non-Windows platforms. +Used to install the management server process as a Windows service. Does + not apply on non-Windows platforms. T}:T{ .PP All MySQL 5.5 based releases @@ -238,10 +237,10 @@ T{ .PP --remove[=name] T}:T{ -Used to remove a management server process that was previously - installed as a Windows service, optionally specifying the name of - the service to be removed. Does not apply on non-Windows - platforms. +Used to remove a management server process that was previously installed + as a Windows service, optionally specifying the name of the + service to be removed. Does not apply on non-Windows + platforms. T}:T{ .PP All MySQL 5.5 based releases @@ -1155,11 +1154,13 @@ ndb_\fInode_id\fR_cluster\&.log is the cluster events log file\&. Examples of such events include checkpoint startup and completion, node startup events, node failures, and levels of memory usage\&. A complete listing of cluster events with descriptions may be found in Section\ \&18.5, \(lqManagement of MySQL Cluster\(rq\&. .sp -When the size of the cluster log reaches one million bytes, the file is renamed to +By default, when the size of the cluster log reaches one million bytes, the file is renamed to ndb_\fInode_id\fR_cluster\&.log\&.\fIseq_id\fR, where \fIseq_id\fR is the sequence number of the cluster log file\&. (For example: If files with the sequence numbers 1, 2, and 3 already exist, the next log file is named using the number -4\&.) +4\&.) You can change the size and number of files, and other characteristics of the cluster log, using the +LogDestination +configuration parameter\&. .RE .sp .RS 4 diff --git a/man/ndb_print_backup_file.1 b/man/ndb_print_backup_file.1 index 806f12e641be..bbbc8fa98544 100644 --- a/man/ndb_print_backup_file.1 +++ b/man/ndb_print_backup_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_backup_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_BACKUP_" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_BACKUP_" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_file.1 b/man/ndb_print_file.1 index 010ecfbcc59a..7d19ec474d96 100644 --- a/man/ndb_print_file.1 +++ b/man/ndb_print_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_FILE\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_FILE\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -97,7 +97,7 @@ supports the following options: .\} \fB\-\-help\fR, \fB\-h\fR, -\fB\-?\fR: Suppress output (quiet mode)\&. +\fB\-?\fR: Print help message\&. .sp This option did not work correctly prior to MySQL Cluster NDB 7\&.2\&.18\&. (Bug #17069285) .RE diff --git a/man/ndb_print_schema_file.1 b/man/ndb_print_schema_file.1 index 550cdc9b2edf..93cb9c911bcb 100644 --- a/man/ndb_print_schema_file.1 +++ b/man/ndb_print_schema_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_schema_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SCHEMA_" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SCHEMA_" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_sys_file.1 b/man/ndb_print_sys_file.1 index 5daab604baad..746514597859 100644 --- a/man/ndb_print_sys_file.1 +++ b/man/ndb_print_sys_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_sys_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SYS_FIL" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SYS_FIL" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_restore.1 b/man/ndb_restore.1 index 1944e31eb254..bc1f3f84ea3b 100644 --- a/man/ndb_restore.1 +++ b/man/ndb_restore.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_restore\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_RESTORE\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_RESTORE\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -150,7 +150,7 @@ T{ .PP -n T}:T{ -Back up files from node with this ID +Restore backup files to node with this ID T}:T{ .PP All MySQL 5.5 based releases @@ -194,8 +194,8 @@ T{ .PP -u T}:T{ -Do not upgrade array type for varsize attributes which do not - already resize VAR data, and do not change column attributes +Do not upgrade array type for varsize attributes which do not already + resize VAR data, and do not change column attributes T}:T{ .PP All MySQL 5.5 based releases @@ -217,8 +217,8 @@ T{ .PP -P T}:T{ -Allow preservation of trailing spaces (including padding) when - promoting fixed-width string types to variable-width types +Allow preservation of trailing spaces (including padding) when promoting + fixed-width string types to variable-width types T}:T{ .PP All MySQL 5.5 based releases @@ -240,9 +240,9 @@ T{ .PP -e T}:T{ -Restore epoch info into the status table. Convenient on a MySQL - Cluster replication slave for starting replication. The row in - mysql.ndb_apply_status with id 0 will be updated/inserted. +Restore epoch info into the status table. Convenient on a MySQL Cluster + replication slave for starting replication. The row in + mysql.ndb_apply_status with id 0 will be updated/inserted. T}:T{ .PP All MySQL 5.5 based releases @@ -274,7 +274,7 @@ T{ --print T}:T{ Print metadata, data and log to stdout (equivalent to --print_meta - --print_data --print_log) + --print_data --print_log) T}:T{ .PP All MySQL 5.5 based releases @@ -321,8 +321,8 @@ T{ .PP -f T}:T{ -Do not ignore system table during restore. Experimental only; not - for production use +Do not ignore system table during restore. Experimental only; not for + production use T}:T{ .PP All MySQL 5.5 based releases @@ -334,7 +334,7 @@ T{ -z T}:T{ Nodegroup map for NDBCLUSTER storage engine. Syntax: list of - (source_nodegroup, destination_nodegroup) + (source_nodegroup, destination_nodegroup) T}:T{ .PP All MySQL 5.5 based releases @@ -418,7 +418,7 @@ T{ --no-binlog T}:T{ If a mysqld is connected and using binary logging, do not log the - restored data + restored data T}:T{ .PP All MySQL 5.5 based releases @@ -436,8 +436,7 @@ T{ .PP --include-databases=db-list T}:T{ -List of one or more databases to restore (excludes those not - named) +List of one or more databases to restore (excludes those not named) T}:T{ .PP All MySQL 5.5 based releases @@ -446,8 +445,7 @@ T{ .PP --exclude-databases=db-list T}:T{ -List of one or more databases to exclude (includes those not - named) +List of one or more databases to exclude (includes those not named) T}:T{ .PP All MySQL 5.5 based releases @@ -456,9 +454,9 @@ T{ .PP --include-tables=table-list T}:T{ -List of one or more tables to restore (excludes those in same - database that are not named); each table reference must include - the database name +List of one or more tables to restore (excludes those in same database + that are not named); each table reference must include the + database name T}:T{ .PP All MySQL 5.5 based releases @@ -468,8 +466,8 @@ T{ --exclude-tables=table-list T}:T{ List of one or more tables to exclude (includes those in the same - database that are not named); each table reference must include - the database name + database that are not named); each table reference must + include the database name T}:T{ .PP All MySQL 5.5 based releases @@ -478,8 +476,8 @@ T{ .PP --exclude-missing-columns T}:T{ -Causes columns from the backup version of a table that are missing - from the version of the table in the database to be ignored. +Causes columns from the backup version of a table that are missing from + the version of the table in the database to be ignored. T}:T{ .PP All MySQL 5.5 based releases @@ -488,8 +486,8 @@ T{ .PP --exclude-missing-tables T}:T{ -Causes tables from the backup that are missing from the database - to be ignored. +Causes tables from the backup that are missing from the database to be + ignored. T}:T{ .PP ADDED: NDB 7.2.18 @@ -498,8 +496,8 @@ T{ .PP --disable-indexes T}:T{ -Causes indexes from a backup to be ignored; may decrease time - needed to restore data. +Causes indexes from a backup to be ignored; may decrease time needed to + restore data. T}:T{ .PP All MySQL 5.5 based releases @@ -508,9 +506,9 @@ T{ .PP --rebuild-indexes T}:T{ -Causes multi-threaded rebuilding of ordered indexes found in the - backup. Number of threads used is determined by setting - BuildIndexThreads parameter. +Causes multi-threaded rebuilding of ordered indexes found in the backup. + Number of threads used is determined by setting + BuildIndexThreads parameter. T}:T{ .PP All MySQL 5.5 based releases @@ -528,9 +526,9 @@ T{ .PP --skip-unknown-objects T}:T{ -Causes schema objects not recognized by ndb_restore to be ignored - when restoring a backup made from a newer MySQL Cluster version to - an older version. +Causes schema objects not recognized by ndb_restore to be ignored when + restoring a backup made from a newer MySQL Cluster version to + an older version. T}:T{ .PP All MySQL 5.5 based releases @@ -550,8 +548,8 @@ T{ .PP -L T}:T{ -Allow lossy conversions of column values (type demotions or - changes in sign) when restoring data from backup +Allow lossy conversions of column values (type demotions or changes in + sign) when restoring data from backup T}:T{ .PP All MySQL 5.5 based releases @@ -569,9 +567,9 @@ T{ .PP --exclude-intermediate-sql-tables[=TRUE|FALSE] T}:T{ -If TRUE (the default), do not restore any intermediate tables - (having names prefixed with '#sql-') that were left over from - copying ALTER TABLE operations. +If TRUE (the default), do not restore any intermediate tables (having + names prefixed with '#sql-') that were left over from copying + ALTER TABLE operations. T}:T{ .PP ADDED: NDB 7.2.17 @@ -649,9 +647,12 @@ shell> \fBndb_mgm \-e "SHOW"\fR .RE .\} .PP -.\" restore_nodeid option (ndb_restore) +.\" nodeid option (ndb_restore) +The +\fB\-\-nodeid\fR +or \fB\-n\fR -is used to specify the node ID of the data node on which the backups were taken\&. +is used to specify the node ID of the data node on which the backup should be restored\&. .PP The first time you run the \fBndb_restore\fR @@ -1776,14 +1777,12 @@ You can use these two options together\&. For example, the following causes all databases db1 and -db2, along with the tables +db2, and tables t1 and t2 in database -db3, -\fInot\fR -to be restored: +db3, to be restored: .sp .if n \{\ .RS 4 diff --git a/man/ndb_select_all.1 b/man/ndb_select_all.1 index 9f4f9447ab00..c6905c3c8653 100644 --- a/man/ndb_select_all.1 +++ b/man/ndb_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_ALL\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_ALL\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -180,7 +180,7 @@ T{ --disk T}:T{ Print disk references (useful only for Disk Data tables having - nonindexed columns) + nonindexed columns) T}:T{ .PP All MySQL 5.5 based releases diff --git a/man/ndb_select_count.1 b/man/ndb_select_count.1 index f521431a1d82..4781c63e85c9 100644 --- a/man/ndb_select_count.1 +++ b/man/ndb_select_count.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_count\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_COUNT\" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_COUNT\" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_show_tables.1 b/man/ndb_show_tables.1 index c83760e846cd..1582d689d521 100644 --- a/man/ndb_show_tables.1 +++ b/man/ndb_show_tables.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_show_tables\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SHOW_TABLES\F" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SHOW_TABLES\F" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_size.pl.1 b/man/ndb_size.pl.1 index 8f4e3ebd100f..4721d3cd27ab 100644 --- a/man/ndb_size.pl.1 +++ b/man/ndb_size.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_size.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SIZE\&.PL\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SIZE\&.PL\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -129,8 +129,8 @@ T{ .PP --database=dbname T}:T{ -The database or databases to examine; accepts a comma-delimited - list; the default is ALL (use all databases found on the server) +The database or databases to examine; accepts a comma-delimited list; + the default is ALL (use all databases found on the server) T}:T{ .PP All MySQL 5.5 based releases @@ -212,7 +212,7 @@ T{ --loadqueries=file T}:T{ Loads all queries from the file specified; does not connect to a - database + database T}:T{ .PP All MySQL 5.5 based releases diff --git a/man/ndb_waiter.1 b/man/ndb_waiter.1 index 6cfad1e937e9..bbc7e384f4b2 100644 --- a/man/ndb_waiter.1 +++ b/man/ndb_waiter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_waiter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_WAITER\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_WAITER\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -195,8 +195,8 @@ T{ .PP -t T}:T{ -Wait this many seconds, then exit whether or not cluster has - reached desired state; default is 2 minutes (120 seconds) +Wait this many seconds, then exit whether or not cluster has reached + desired state; default is 2 minutes (120 seconds) T}:T{ .PP All MySQL 5.5 based releases diff --git a/man/ndbd.8 b/man/ndbd.8 index 719bb23c1f8b..a5cac0c46cea 100644 --- a/man/ndbd.8 +++ b/man/ndbd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD\FR" "8" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD\FR" "8" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -88,7 +88,7 @@ T{ --initial T}:T{ Perform initial start of ndbd, including cleaning the file system. - Consult the documentation before using this option + Consult the documentation before using this option T}:T{ .PP All MySQL 5.5 based releases @@ -99,8 +99,8 @@ T{ .PP -n T}:T{ -Don't start ndbd immediately; ndbd waits for command to start - from ndb_mgmd +Don't start ndbd immediately; ndbd waits for command to start from + ndb_mgmd T}:T{ .PP All MySQL 5.5 based releases @@ -130,7 +130,7 @@ T{ --foreground T}:T{ Run ndbd in foreground, provided for debugging purposes (implies - --nodaemon) + --nodaemon) T}:T{ .PP All MySQL 5.5 based releases @@ -139,8 +139,8 @@ T{ .PP --nowait-nodes=list T}:T{ -Do not wait for these data nodes to start (takes comma-separated - list of node IDs). Also requires --ndb-nodeid to be used. +Do not wait for these data nodes to start (takes comma-separated list of + node IDs). Also requires --ndb-nodeid to be used. T}:T{ .PP All MySQL 5.5 based releases @@ -167,8 +167,8 @@ T{ .PP --install[=name] T}:T{ -Used to install the data node process as a Windows service. Does - not apply on non-Windows platforms. +Used to install the data node process as a Windows service. Does not + apply on non-Windows platforms. T}:T{ .PP All MySQL 5.5 based releases @@ -177,8 +177,8 @@ T{ .PP --remove[=name] T}:T{ -Used to remove a data node process that was previously installed - as a Windows service. Does not apply on non-Windows platforms. +Used to remove a data node process that was previously installed as a + Windows service. Does not apply on non-Windows platforms. T}:T{ .PP All MySQL 5.5 based releases @@ -187,8 +187,8 @@ T{ .PP --connect-retries=# T}:T{ -Number of times to try contacting the management server; set to -1 - to keep trying indefinitely +Number of times to try contacting the management server; set to -1 to + keep trying indefinitely T}:T{ .PP ADDED: NDB 7.2.9 @@ -197,8 +197,7 @@ T{ .PP --connect-delay=# T}:T{ -Time to wait between attempts to contact a management server, in - seconds +Time to wait between attempts to contact a management server, in seconds T}:T{ .PP ADDED: NDB 7.2.9 diff --git a/man/ndbd_redo_log_reader.1 b/man/ndbd_redo_log_reader.1 index 2208fced8744..3042a7648d19 100644 --- a/man/ndbd_redo_log_reader.1 +++ b/man/ndbd_redo_log_reader.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbd_redo_log_reader\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD_REDO_LOG_REA" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD_REDO_LOG_REA" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbinfo_select_all.1 b/man/ndbinfo_select_all.1 index a4a170e34c60..ca556d163a5e 100644 --- a/man/ndbinfo_select_all.1 +++ b/man/ndbinfo_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbinfo_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBINFO_SELECT_AL" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBINFO_SELECT_AL" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -54,7 +54,8 @@ nodes, resources, threadblocks, threadstat, -and +threadblocks, +threadstat, and transporters tables\&. .PP diff --git a/man/ndbmtd.8 b/man/ndbmtd.8 index da8da2f3a890..8ce5d6d1ed1c 100644 --- a/man/ndbmtd.8 +++ b/man/ndbmtd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbmtd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBMTD\FR" "8" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBMTD\FR" "8" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/perror.1 b/man/perror.1 index 23f96c887450..678047526723 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -2,12 +2,12 @@ .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -102,7 +102,7 @@ shell> \fBperror \-\-ndb \fR\fB\fIerrorcode\fR\fR .RE .\} .PP -Note that the meaning of system error messages may be dependent on your operating system\&. A given error code may mean different things on different operating systems\&. +The meaning of system error messages may be dependent on your operating system\&. A given error code may mean different things on different operating systems\&. .PP \fBperror\fR supports the following options\&. diff --git a/man/replace.1 b/man/replace.1 index 745b8879e716..064bab089d36 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -2,12 +2,12 @@ .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index 54b824c2ad72..8f0f9908cfc1 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolveip.1 b/man/resolveip.1 index a368a7b8de14..3f78cd3d77f2 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/06/2015 +.\" Date: 06/25/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "01/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- From 4f81026beae29e4a2f10935bb91442c05853390b Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Thu, 27 Aug 2015 00:41:56 -0700 Subject: [PATCH 054/305] Bump WSREP_PATCH_VERSION in cmake/wsrep.cmake to 12 --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 054775190559..67d7f918f71f 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "11") +SET(WSREP_PATCH_VERSION "12") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From 36407e4c0c8dbe4178d70f78a98ab84d936393a4 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Thu, 3 Sep 2015 18:12:11 +0200 Subject: [PATCH 055/305] Include files for "mysql-wsrep-libs-compat" package The purpose of this package is to satisfy RedHat's dependencies on MySQL (typically: "postfix" built to call "libmysqlclient"). The original RedHat "mysql-libs" would conflict with newer server or client packages, so an isolated replacement is needed to allow newer versions of the MySQL server or client packages. This version will handle RedHat 6 (and compatibles). It also has code for RedHat 5, but that is not used any more. It has initial code for RedHat 7, but this is still incomplete. This commit brings the spec file (for a RPM) and patches to ensure the isolation. The RPM will contain a suitable "libmysqlclient.so" and "charset" files. --- .gitignore | 1 - .../mysql-5096-charset-dir.patch | 12 + .../mysql-5172-charset-dir.patch | 12 + .../mysql-5173-charset-dir.patch | 12 + .../rpm-libs-compat/mysql-libs-compat.spec | 309 ++++++++++++++++++ 5 files changed, 345 insertions(+), 1 deletion(-) create mode 100644 packaging/rpm-libs-compat/mysql-5096-charset-dir.patch create mode 100644 packaging/rpm-libs-compat/mysql-5172-charset-dir.patch create mode 100644 packaging/rpm-libs-compat/mysql-5173-charset-dir.patch create mode 100644 packaging/rpm-libs-compat/mysql-libs-compat.spec diff --git a/.gitignore b/.gitignore index b62a1ab4c123..20416e500cde 100644 --- a/.gitignore +++ b/.gitignore @@ -37,7 +37,6 @@ *.sbr *.so *.so.* -*.spec *.user *.vcproj *.vcproj.cmake diff --git a/packaging/rpm-libs-compat/mysql-5096-charset-dir.patch b/packaging/rpm-libs-compat/mysql-5096-charset-dir.patch new file mode 100644 index 000000000000..da4548ee1cea --- /dev/null +++ b/packaging/rpm-libs-compat/mysql-5096-charset-dir.patch @@ -0,0 +1,12 @@ +diff -ur a/include/m_ctype.h b/include/m_ctype.h +--- a/include/m_ctype.h 2015-03-10 12:35:31.499107653 +0100 ++++ b/include/m_ctype.h 2015-03-10 12:35:59.357103239 +0100 +@@ -36,7 +36,7 @@ + #define MY_CS_SORT_ORDER_TABLE_SIZE 256 + #define MY_CS_TO_UNI_TABLE_SIZE 256 + +-#define CHARSET_DIR "charsets/" ++#define CHARSET_DIR "charsets-5.0.96/" + + #define my_wc_t ulong + diff --git a/packaging/rpm-libs-compat/mysql-5172-charset-dir.patch b/packaging/rpm-libs-compat/mysql-5172-charset-dir.patch new file mode 100644 index 000000000000..708df346d4c2 --- /dev/null +++ b/packaging/rpm-libs-compat/mysql-5172-charset-dir.patch @@ -0,0 +1,12 @@ +diff -ur a/include/m_ctype.h b/include/m_ctype.h +--- a/include/m_ctype.h 2015-03-10 12:35:31.499107653 +0100 ++++ b/include/m_ctype.h 2015-03-10 12:35:59.357103239 +0100 +@@ -36,7 +36,7 @@ + #define MY_CS_SORT_ORDER_TABLE_SIZE 256 + #define MY_CS_TO_UNI_TABLE_SIZE 256 + +-#define CHARSET_DIR "charsets/" ++#define CHARSET_DIR "charsets-5.1.72/" + + #define my_wc_t ulong + diff --git a/packaging/rpm-libs-compat/mysql-5173-charset-dir.patch b/packaging/rpm-libs-compat/mysql-5173-charset-dir.patch new file mode 100644 index 000000000000..606af39e6832 --- /dev/null +++ b/packaging/rpm-libs-compat/mysql-5173-charset-dir.patch @@ -0,0 +1,12 @@ +diff -ur a/include/m_ctype.h b/include/m_ctype.h +--- a/include/m_ctype.h 2015-03-10 12:35:31.499107653 +0100 ++++ b/include/m_ctype.h 2015-03-10 12:35:59.357103239 +0100 +@@ -36,7 +36,7 @@ + #define MY_CS_SORT_ORDER_TABLE_SIZE 256 + #define MY_CS_TO_UNI_TABLE_SIZE 256 + +-#define CHARSET_DIR "charsets/" ++#define CHARSET_DIR "charsets-5.1.73/" + + #define my_wc_t ulong + diff --git a/packaging/rpm-libs-compat/mysql-libs-compat.spec b/packaging/rpm-libs-compat/mysql-libs-compat.spec new file mode 100644 index 000000000000..d2763d08e130 --- /dev/null +++ b/packaging/rpm-libs-compat/mysql-libs-compat.spec @@ -0,0 +1,309 @@ +# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +# +# 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; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston +# MA 02110-1301 USA. + +# ========== +# +# This spec file is a subset of the Oracle spec file for MySQL RPMs +# for Enterprise Linux (RedHat or Oracle Linux) as published with MySQL 5.6.23 +# The subset is limited to only create the "mysql-libs-compat" packages +# which are needed to satisfy dependencies of application packages +# when installing newer versions of MySQL. +# +# Subsetting is done by Jörg Brühe ( joerg.bruehe@fromdual.com ) +# to support the installation of MySQL-Galera-Cluster RPMs +# as offered by FromDual ( www.fromdual.com ) and/or +# Codership ( www.codership.com / www.galeracluster.com ). +# +# ========== + +%global mysql_vendor Oracle and/or its affiliates + +%{!?with_debuginfo: %global nodebuginfo 1} + +# Deal with RedHat 5 which doesn't properly identify itself +# This is meant to solve Oracle's problem: +# Rebuild on OL5/RHEL5 needs following rpmbuild options: +# rpmbuild --define 'dist .el5' --define 'rhel 5' --define 'el5 1' mysql.spec +%if %(test -f /etc/redhat-release && echo 1 || echo 0) + %if 0%{?rhel} + # "rhel" is defined, trust it + %else + %global rhel 5 + %endif +%endif + +# Define dist tag if not given by platform +%if %{undefined dist} + # RHEL 5 + %if 0%{?rhel} == 5 + %define dist .el5 + %endif + # For suse versions see: + # https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto + %if 0%{?suse_version} == 1110 + %define dist .sle11 + %endif + %if 0%{?suse_version} == 1310 + %define dist .suse13.1 + %endif + %if 0%{?suse_version} == 1315 + %define dist .sle12 + %endif + %if 0%{?suse_version} == 1320 + %define dist .suse13.2 + %endif + # Still missing? + %if %{undefined dist} + %define dist .DIST + %endif +%endif + +# Version for compat libs +%if 0%{?rhel} == 5 +%global compatver 5.0.96 +%global compatlib 15 +%global compatsrc http://downloads.mysql.com/archives/mysql-5.0/mysql-%{compatver}.tar.gz +%global compatch mysql-5096-charset-dir.patch +%endif + +%if 0%{?rhel} == 6 +%global compatver 5.1.73 +%global compatlib 16 +%global compatsrc https://cdn.mysql.com/Downloads/MySQL-5.1/mysql-%{compatver}.tar.gz +%global compatch mysql-5173-charset-dir.patch +%endif + +%if 0%{?rhel} == 7 +%global compatver 5.5.37 +%global compatlib 18 +%global compatsrc https://cdn.mysql.com/Downloads/MySQL-5.5/mysql-%{compatver}.tar.gz +%global compatch mysql-5537-charset-dir.patch +%endif + +# Hack to support el5 where __isa_bits not defined. Note: supports i386 and x86_64 only, sorry. +%if x%{?__isa_bits} == x +%ifarch %{ix86} +%global __isa_bits 32 +%endif +%ifarch x86_64 +%global __isa_bits 64 +%endif +%endif + +# Attention: "src_dir" is the old version (5.0.96 or 5.1.73), depends on platform +%global src_dir mysql-%{compatver} + +# No debuginfo for now, ships /usr/sbin/mysqld-debug and libmysqlcliet-debug.a +%if 0%{?nodebuginfo} +%global _enable_debug_package 0 +%global debug_package %{nil} +%global __os_install_post /usr/lib/rpm/brp-compress %{nil} +%endif + +%global license_files_server %{src_dir}/COPYING %{src_dir}/README + +Name: mysql-wsrep-libs-compat +Summary: Shared libraries for MySQL %{compatver} database client applications +Group: Applications/Databases +# "Version = 5.6" because this libs-compat will fit all mysql-wsrep-server-5.6.* packages. +# "fullversion = 5.6.23" for better conflict handling. +Version: 5.6 +%global fullversion 5.6.23 +Release: 11%{?dist} +License: Copyright (c) 2000, 2015, %{mysql_vendor}. All rights reserved. Under GPLv2 license as shown in the Description field. +URL: http://www.mysql.com/ +Packager: FromDual GmbH +Vendor: %{mysql_vendor} +%if 0%{?compatlib} +Source7: %{compatsrc} +Patch: %{compatch} +%endif +BuildRequires: gcc-c++ +BuildRequires: perl +%if 0%{?rhel} +# RedHat has it, SuSE doesn't +BuildRequires: time +%endif +BuildRequires: libaio-devel +BuildRequires: ncurses-devel +BuildRequires: openssl-devel +BuildRequires: zlib-devel +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + + +Obsoletes: mysql-libs-compat < %{fullversion}-%{release} +Provides: mysql-libs-compat = %{fullversion}-%{release} +Provides: mysql-libs-compat%{?_isa} = %{fullversion}-%{release} +Provides: MySQL-shared-compat%{?_isa} = %{fullversion}-%{release} +Obsoletes: MySQL-shared-compat < %{fullversion}-%{release} +%if 0%{?rhel} < 6 +# Dealing with RHEL 5 (and compatible ...) +# "mysql" without a subpackage specification is a RedHat convention, +# a package with client, lib, and server parts that blocks the server upgrade. +Obsoletes: mysql <= %{compatver} +%endif +%if 0%{?rhel} > 5 +# Dealing with RHEL 6 and upwards (and compatible ...) +# Directly, we replace "libs" only; but RedHat "client" and "server" need files from "libs" +Provides: mysql-libs = %{compatver}-%{release} +Obsoletes: mysql-libs < %{fullversion}-%{release} +Obsoletes: mysql < %{fullversion}-%{release} +Obsoletes: mysql-server < %{fullversion}-%{release} +%endif +%if 0%{?rhel} > 6 +# Dealing with RHEL 7 and upwards (and compatible ...) +# Above section for RHEL 6 also applies, it deals with "mysql" packages. +# But with RHEL 7, we also get "mariadb" ... +Obsoletes: mariadb-libs +%endif + +%description +The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, +and robust SQL (Structured Query Language) database server. +See the MySQL web site (http://www.mysql.com/) for further information, +including its dual licensing (GNU GPL or commercial licenses). + +This package contains the shared libraries for (old) MySQL %{compatver} client +applications. +It is intended for RHEL %{?rhel} and compatible distributions, +to satisfy the dependencies of several applications shipping with that distro +while the MySQL software on the machine is updated to a newer release series. + + +%prep +%setup -q -T -a 7 -c -n %{src_dir} +pushd %{src_dir} +%patch -p 1 +popd + +%build +# Build compat libs +( + +%if 0%{?rhel} < 7 + +# RHEL 5 + 6: MySQL 5.0 / 5.1, using traditional "configure ; make" +export CC="gcc" CXX="g++" +export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv" +export CXXFLAGS="$CFLAGS %{?el6:-felide-constructors} -fno-rtti -fno-exceptions" +pushd %{src_dir} +%configure \ + --with-readline \ + --without-debug \ + --enable-shared \ + --localstatedir=/var/lib/mysql \ + --with-unix-socket-path=/var/lib/mysql/mysql.sock \ + --with-mysqld-user="mysql" \ + --with-extra-charsets=all \ + --enable-local-infile \ + --enable-largefile \ + --enable-thread-safe-client \ +%if 0%{?rhel} == 5 + --with-openssl \ + --with-bench \ + --with-innodb \ + --with-berkeley-db \ + --enable-community-features \ + --enable-profiling \ + --with-named-thread-libs="-lpthread" \ +%endif +%if 0%{?rhel} == 6 + --with-ssl=%{_prefix} \ + --with-embedded-server \ + --with-big-tables \ + --with-pic \ + --with-plugin-innobase \ + --with-plugin-innodb_plugin \ + --with-plugin-partition \ +%endif + --disable-dependency-tracking +make %{?_smp_mflags} +popd + +%endif + +) + + +%install +# Install compat libs +for dir in libmysql libmysql_r ; do + pushd mysql-%{compatver}/$dir + make DESTDIR=%{buildroot} install + popd +done +rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient{,_r}.{a,la,so} + +# "charsets/" +MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}/mysql-release-%{mysql_version} +install -d -m 0755 %{buildroot}/usr/share/mysql-%{compatver}/charsets/ +install -m 644 mysql-%{compatver}/sql/share/charsets/* %{buildroot}/usr/share/mysql-%{compatver}/charsets/ + +# Add libdir to linker +install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d +echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf + +%check + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%files +%defattr(-, root, root, -) +%doc %{?license_files_server} +%dir %attr(755, root, root) %{_libdir}/mysql +%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf +%{_libdir}/mysql/libmysqlclient.so.%{compatlib} +%{_libdir}/mysql/libmysqlclient.so.%{compatlib}.0.0 +%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib} +%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib}.0.0 +%dir %attr(755, root, root) %{_datadir}/mysql-%{compatver} +%attr(644, root, root) %{_datadir}/mysql-%{compatver}/charsets/ + + +%changelog +* Thu Sep 03 2015 Joerg Bruehe +- Change the name from "mysql-libs-compat" to "mysql-wsrep-libs-compat". +- Change the compatibility version for RHEL 6 from MySQL 5.1.72 to 5.1.73. +- Start adding settings for RHEL 7, to replace the pre-installed "mariadb-libs 5.5.37". + +* Tue Apr 28 2015 Joerg Bruehe +- Improve the dependency / conflicts settings. +- Drop the name component "community", 3rd party builds don't use it. + +* Tue Mar 10 2015 Joerg Bruehe +- Sometimes, "libmysqlclient.so" needs the files in "/usr/share/mysql/charsets/", + so the package should better contain them, but have the path name contain the + version number to make it independent of other packages. + +* Mon Feb 09 2015 Joerg Bruehe +- "g++: command not found" on RedHat 5 + 6, added "BuildRequires: gcc-c++". +- "time" is a RedHat-only package, not needed to build on SuSE. + +* Fri Feb 06 2015 Joerg Bruehe +- Add code to identify RedHat 5 during build, "rhel" is not predefined there. +- Start adding "conflicts" directives to get rid of other MySQL library RPMs. +- Try with "CXX=g++". + +* Thu Feb 05 2015 Joerg Bruehe +- This spec file handles the "compat" RPM for the "libmysqlclient.so" only. + It is created as a subset of the overall MySQL 5.6.23 spec file + (file "packaging/rpm-oel/mysql.spec.in" in the source tree), + see that file's "changelog" section for its history. +- Add "CC=gcc CXX=gcc" as used in 5.0 and 5.1 builds (missing in that 5.6.23 spec file) + From b762865365e4d79aa7dacdf08c1480193b695e56 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Tue, 8 Sep 2015 21:59:51 +0200 Subject: [PATCH 056/305] Continue with the spec file for "mysql-wsrep-libs-compat": - Finish the code for RHEL 7, using MySQL 5.5.45 as published by Oracle. - Fix a severe bug: The path for "charsets" files did not match the code. - This is in the 5.5 branch, correct the RPM name ("5.6" was wrong). --- .../mysql-5.5-libmysqlclient-symbols.patch | 982 ++++++++++++++++++ .../mysql-5545-charset-dir.patch | 12 + .../rpm-libs-compat/mysql-libs-compat.spec | 79 +- 3 files changed, 1057 insertions(+), 16 deletions(-) create mode 100644 packaging/rpm-libs-compat/mysql-5.5-libmysqlclient-symbols.patch create mode 100644 packaging/rpm-libs-compat/mysql-5545-charset-dir.patch diff --git a/packaging/rpm-libs-compat/mysql-5.5-libmysqlclient-symbols.patch b/packaging/rpm-libs-compat/mysql-5.5-libmysqlclient-symbols.patch new file mode 100644 index 000000000000..ce5455ee29bf --- /dev/null +++ b/packaging/rpm-libs-compat/mysql-5.5-libmysqlclient-symbols.patch @@ -0,0 +1,982 @@ +diff -rup old/libmysql/CMakeLists.txt new/libmysql/CMakeLists.txt +--- old/libmysql/CMakeLists.txt 2013-11-05 08:19:26.000000000 +0100 ++++ new/libmysql/CMakeLists.txt 2014-01-10 15:41:30.530068723 +0100 +@@ -205,13 +205,14 @@ IF(NOT DISABLE_SHARED) + OUTPUT_NAME mysqlclient + VERSION "${OS_SHARED_LIB_VERSION}" + SOVERSION "${SHARED_LIB_MAJOR_VERSION}") ++ CONFIGURE_FILE(libmysql.ver.in ${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver) + IF(LINK_FLAG_NO_UNDEFINED) + GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS) + IF(NOT libmysql_link_flag) + SET(libmysql_link_flags) + ENDIF() + SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS +- "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}") ++ "${libmysql_link_flags} -Wl,--version-script=libmysql.ver ${LINK_FLAG_NO_UNDEFINED}") + ENDIF() + # clean direct output needs to be set several targets have the same name + #(mysqlclient in this case) +diff -rup old/libmysql/libmysql.c new/libmysql/libmysql.c +--- old/libmysql/libmysql.c 2013-11-05 08:19:26.000000000 +0100 ++++ new/libmysql/libmysql.c 2014-01-10 15:46:35.708928462 +0100 +@@ -4870,3 +4870,612 @@ my_bool STDCALL mysql_read_query_result( + return (*mysql->methods->read_query_result)(mysql); + } + ++#ifndef EMBEDDED_LIBRARY ++ ++// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions ++ ++#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") ++ ++void STDCALL symver16_myodbc_remove_escape(MYSQL *mysql,char *name) ++{ ++ return myodbc_remove_escape(mysql, name); ++} ++SYM_16(myodbc_remove_escape); ++ ++ ++my_ulonglong STDCALL symver16_mysql_affected_rows(MYSQL *mysql) ++{ ++ return mysql_affected_rows(mysql); ++} ++SYM_16(mysql_affected_rows); ++ ++ ++my_bool STDCALL symver16_mysql_autocommit(MYSQL * mysql, my_bool auto_mode) ++{ ++ return mysql_autocommit(mysql, auto_mode); ++} ++SYM_16(mysql_autocommit); ++ ++ ++my_bool STDCALL symver16_mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db) ++{ ++ return mysql_change_user(mysql, user, passwd, db); ++} ++SYM_16(mysql_change_user); ++ ++ ++const char * STDCALL symver16_mysql_character_set_name(MYSQL *mysql) ++{ ++ return mysql_character_set_name(mysql); ++} ++SYM_16(mysql_character_set_name); ++ ++ ++my_bool STDCALL symver16_mysql_commit(MYSQL * mysql) ++{ ++ return mysql_commit(mysql); ++} ++SYM_16(mysql_commit); ++ ++ ++void STDCALL symver16_mysql_data_seek(MYSQL_RES *result, my_ulonglong row) ++{ ++ return mysql_data_seek(result, row); ++} ++SYM_16(mysql_data_seek); ++ ++ ++void STDCALL symver16_mysql_debug(const char *debug __attribute__((unused))) ++{ ++ return mysql_debug(debug); ++} ++SYM_16(mysql_debug); ++ ++ ++int STDCALL symver16_mysql_dump_debug_info(MYSQL *mysql) ++{ ++ return mysql_dump_debug_info(mysql); ++} ++SYM_16(mysql_dump_debug_info); ++ ++ ++my_bool STDCALL symver16_mysql_embedded(void) ++{ ++ return mysql_embedded(); ++} ++SYM_16(mysql_embedded); ++ ++ ++my_bool STDCALL symver16_mysql_eof(MYSQL_RES *res) ++{ ++ return mysql_eof(res); ++} ++SYM_16(mysql_eof); ++ ++ ++ulong STDCALL symver16_mysql_escape_string(char *to,const char *from,ulong length) ++{ ++ return mysql_escape_string(to, from, length); ++} ++SYM_16(mysql_escape_string); ++ ++ ++MYSQL_FIELD * STDCALL symver16_mysql_fetch_field(MYSQL_RES *result) ++{ ++ return mysql_fetch_field(result); ++} ++SYM_16(mysql_fetch_field); ++ ++ ++MYSQL_FIELD * STDCALL symver16_mysql_fetch_field_direct(MYSQL_RES *res,uint fieldnr) ++{ ++ return mysql_fetch_field_direct(res, fieldnr); ++} ++SYM_16(mysql_fetch_field_direct); ++ ++ ++MYSQL_FIELD * STDCALL symver16_mysql_fetch_fields(MYSQL_RES *res) ++{ ++ return mysql_fetch_fields(res); ++} ++SYM_16(mysql_fetch_fields); ++ ++ ++unsigned int STDCALL symver16_mysql_field_count(MYSQL *mysql) ++{ ++ return mysql_field_count(mysql); ++} ++SYM_16(mysql_field_count); ++ ++ ++MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET field_offset) ++{ ++ return mysql_field_seek(result, field_offset); ++} ++SYM_16(mysql_field_seek); ++ ++ ++MYSQL_FIELD_OFFSET STDCALL symver16_mysql_field_tell(MYSQL_RES *res) ++{ ++ return mysql_field_tell(res); ++} ++SYM_16(mysql_field_tell); ++ ++ ++void STDCALL symver16_mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *csinfo) ++{ ++ return mysql_get_character_set_info(mysql, csinfo); ++} ++SYM_16(mysql_get_character_set_info); ++ ++ ++const char * STDCALL symver16_mysql_get_client_info(void) ++{ ++ return mysql_get_client_info(); ++} ++SYM_16(mysql_get_client_info); ++ ++ulong STDCALL symver16_mysql_get_client_version(void) ++{ ++ return mysql_get_client_version(); ++} ++SYM_16(mysql_get_client_version); ++ ++ ++const char * STDCALL symver16_mysql_get_host_info(MYSQL *mysql) ++{ ++ return mysql_get_host_info(mysql); ++} ++SYM_16(mysql_get_host_info); ++ ++ ++MYSQL_PARAMETERS *STDCALL symver16_mysql_get_parameters(void) ++{ ++ return mysql_get_parameters(); ++} ++SYM_16(mysql_get_parameters); ++ ++ ++uint STDCALL symver16_mysql_get_proto_info(MYSQL *mysql) ++{ ++ return mysql_get_proto_info(mysql); ++} ++SYM_16(mysql_get_proto_info); ++ ++ ++const char * STDCALL symver16_mysql_get_server_info(MYSQL *mysql) ++{ ++ return mysql_get_server_info(mysql); ++} ++SYM_16(mysql_get_server_info); ++ ++ ++ulong STDCALL symver16_mysql_hex_string(char *to, const char *from, ulong length) ++{ ++ return mysql_hex_string(to, from, length); ++} ++SYM_16(mysql_hex_string); ++ ++ ++const char *STDCALL symver16_mysql_info(MYSQL *mysql) ++{ ++ return mysql_info(mysql); ++} ++SYM_16(mysql_info); ++ ++ ++my_ulonglong STDCALL symver16_mysql_insert_id(MYSQL *mysql) ++{ ++ return mysql_insert_id(mysql); ++} ++SYM_16(mysql_insert_id); ++ ++ ++int STDCALL symver16_mysql_kill(MYSQL *mysql,ulong pid) ++{ ++ return mysql_kill(mysql, pid); ++} ++SYM_16(mysql_kill); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_list_dbs(MYSQL *mysql, const char *wild) ++{ ++ return mysql_list_dbs(mysql, wild); ++} ++SYM_16(mysql_list_dbs); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_list_fields(MYSQL *mysql, const char *table, const char *wild) ++{ ++ return mysql_list_fields(mysql, table, wild); ++} ++SYM_16(mysql_list_fields); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_list_processes(MYSQL *mysql) ++{ ++ return mysql_list_processes(mysql); ++} ++SYM_16(mysql_list_processes); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_list_tables(MYSQL *mysql, const char *wild) ++{ ++ return mysql_list_tables(mysql, wild); ++} ++SYM_16(mysql_list_tables); ++ ++ ++my_bool STDCALL symver16_mysql_more_results(MYSQL *mysql) ++{ ++ return mysql_more_results(mysql); ++} ++SYM_16(mysql_more_results); ++ ++ ++int STDCALL symver16_mysql_next_result(MYSQL *mysql) ++{ ++ return mysql_next_result(mysql); ++} ++SYM_16(mysql_next_result); ++ ++ ++int STDCALL symver16_mysql_ping(MYSQL *mysql) ++{ ++ return mysql_ping(mysql); ++} ++SYM_16(mysql_ping); ++ ++ ++int STDCALL symver16_mysql_query(MYSQL *mysql, const char *query) ++{ ++ return mysql_query(mysql, query); ++} ++SYM_16(mysql_query); ++ ++ ++my_bool STDCALL symver16_mysql_read_query_result(MYSQL *mysql) ++{ ++ return mysql_read_query_result(mysql); ++} ++SYM_16(mysql_read_query_result); ++ ++ ++ulong STDCALL symver16_mysql_real_escape_string(MYSQL *mysql, char *to,const char *from, ulong length) ++{ ++ return mysql_real_escape_string(mysql, to, from, length); ++} ++SYM_16(mysql_real_escape_string); ++ ++ ++int STDCALL symver16_mysql_refresh(MYSQL *mysql,uint options) ++{ ++ return mysql_refresh(mysql, options); ++} ++SYM_16(mysql_refresh); ++ ++ ++my_bool STDCALL symver16_mysql_rollback(MYSQL * mysql) ++{ ++ return mysql_rollback(mysql); ++} ++SYM_16(mysql_rollback); ++ ++ ++MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET row) ++{ ++ return mysql_row_seek(result, row); ++} ++SYM_16(mysql_row_seek); ++ ++ ++MYSQL_ROW_OFFSET STDCALL symver16_mysql_row_tell(MYSQL_RES *res) ++{ ++ return mysql_row_tell(res); ++} ++SYM_16(mysql_row_tell); ++ ++ ++void STDCALL symver16_mysql_server_end() ++{ ++ return mysql_server_end(); ++} ++SYM_16(mysql_server_end); ++ ++ ++int STDCALL symver16_mysql_server_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **groups __attribute__((unused))) ++{ ++ return mysql_server_init(argc, argv, groups); ++} ++SYM_16(mysql_server_init); ++ ++ ++void symver16_mysql_set_local_infile_default(MYSQL *mysql) ++{ ++ return mysql_set_local_infile_default(mysql); ++} ++SYM_16(mysql_set_local_infile_default); ++ ++ ++void symver16_mysql_set_local_infile_handler(MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *), int (*local_infile_read)(void *, char *, uint), void (*local_infile_end)(void *), int (*local_infile_error)(void *, char *, uint), void *userdata) ++{ ++ return mysql_set_local_infile_handler(mysql, local_infile_init, local_infile_read, local_infile_end, local_infile_error, userdata); ++} ++SYM_16(mysql_set_local_infile_handler); ++ ++ ++int STDCALL symver16_mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option) ++{ ++ return mysql_set_server_option(mysql, option); ++} ++SYM_16(mysql_set_server_option); ++ ++ ++int STDCALL symver16_mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level) ++{ ++ return mysql_shutdown(mysql, shutdown_level); ++} ++SYM_16(mysql_shutdown); ++ ++ ++const char *STDCALL symver16_mysql_sqlstate(MYSQL *mysql) ++{ ++ return mysql_sqlstate(mysql); ++} ++SYM_16(mysql_sqlstate); ++ ++ ++const char * STDCALL symver16_mysql_stat(MYSQL *mysql) ++{ ++ return mysql_stat(mysql); ++} ++SYM_16(mysql_stat); ++ ++ ++my_ulonglong STDCALL symver16_mysql_stmt_affected_rows(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_affected_rows(stmt); ++} ++SYM_16(mysql_stmt_affected_rows); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *value) ++{ ++ return mysql_stmt_attr_get(stmt, attr_type, value); ++} ++SYM_16(mysql_stmt_attr_get); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value) ++{ ++ return mysql_stmt_attr_set(stmt, attr_type, value); ++} ++SYM_16(mysql_stmt_attr_set); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) ++{ ++ return mysql_stmt_bind_param(stmt, my_bind); ++} ++SYM_16(mysql_stmt_bind_param); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) ++{ ++ return mysql_stmt_bind_result(stmt, my_bind); ++} ++SYM_16(mysql_stmt_bind_result); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_close(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_close(stmt); ++} ++SYM_16(mysql_stmt_close); ++ ++ ++void STDCALL symver16_mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong row) ++{ ++ return mysql_stmt_data_seek(stmt, row); ++} ++SYM_16(mysql_stmt_data_seek); ++ ++ ++uint STDCALL symver16_mysql_stmt_errno(MYSQL_STMT * stmt) ++{ ++ return mysql_stmt_errno(stmt); ++} ++SYM_16(mysql_stmt_errno); ++ ++ ++const char *STDCALL symver16_mysql_stmt_error(MYSQL_STMT * stmt) ++{ ++ return mysql_stmt_error(stmt); ++} ++SYM_16(mysql_stmt_error); ++ ++ ++int STDCALL symver16_mysql_stmt_execute(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_execute(stmt); ++} ++SYM_16(mysql_stmt_execute); ++ ++ ++int STDCALL symver16_mysql_stmt_fetch(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_fetch(stmt); ++} ++SYM_16(mysql_stmt_fetch); ++ ++ ++int STDCALL symver16_mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *my_bind, uint column, ulong offset) ++{ ++ return mysql_stmt_fetch_column(stmt, my_bind, column, offset); ++} ++SYM_16(mysql_stmt_fetch_column); ++ ++ ++unsigned int STDCALL symver16_mysql_stmt_field_count(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_field_count(stmt); ++} ++SYM_16(mysql_stmt_field_count); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_free_result(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_free_result(stmt); ++} ++SYM_16(mysql_stmt_free_result); ++ ++ ++MYSQL_STMT * STDCALL symver16_mysql_stmt_init(MYSQL *mysql) ++{ ++ return mysql_stmt_init(mysql); ++} ++SYM_16(mysql_stmt_init); ++ ++ ++my_ulonglong STDCALL symver16_mysql_stmt_insert_id(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_insert_id(stmt); ++} ++SYM_16(mysql_stmt_insert_id); ++ ++ ++my_ulonglong STDCALL symver16_mysql_stmt_num_rows(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_num_rows(stmt); ++} ++SYM_16(mysql_stmt_num_rows); ++ ++ ++ulong STDCALL symver16_mysql_stmt_param_count(MYSQL_STMT * stmt) ++{ ++ return mysql_stmt_param_count(stmt); ++} ++SYM_16(mysql_stmt_param_count); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_stmt_param_metadata(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_param_metadata(stmt); ++} ++SYM_16(mysql_stmt_param_metadata); ++ ++ ++int STDCALL symver16_mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length) ++{ ++ return mysql_stmt_prepare(stmt, query, length); ++} ++SYM_16(mysql_stmt_prepare); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_reset(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_reset(stmt); ++} ++SYM_16(mysql_stmt_reset); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_stmt_result_metadata(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_result_metadata(stmt); ++} ++SYM_16(mysql_stmt_result_metadata); ++ ++ ++MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET row) ++{ ++ return mysql_stmt_row_seek(stmt, row); ++} ++SYM_16(mysql_stmt_row_seek); ++ ++ ++MYSQL_ROW_OFFSET STDCALL symver16_mysql_stmt_row_tell(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_row_tell(stmt); ++} ++SYM_16(mysql_stmt_row_tell); ++ ++ ++my_bool STDCALL symver16_mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, const char *data, ulong length) ++{ ++ return mysql_stmt_send_long_data(stmt, param_number, data, length); ++} ++SYM_16(mysql_stmt_send_long_data); ++ ++ ++const char *STDCALL symver16_mysql_stmt_sqlstate(MYSQL_STMT * stmt) ++{ ++ return mysql_stmt_sqlstate(stmt); ++} ++SYM_16(mysql_stmt_sqlstate); ++ ++ ++int STDCALL symver16_mysql_stmt_store_result(MYSQL_STMT *stmt) ++{ ++ return mysql_stmt_store_result(stmt); ++} ++SYM_16(mysql_stmt_store_result); ++ ++ ++void STDCALL symver16_mysql_thread_end() ++{ ++ return mysql_thread_end(); ++} ++SYM_16(mysql_thread_end); ++ ++ ++ulong STDCALL symver16_mysql_thread_id(MYSQL *mysql) ++{ ++ return mysql_thread_id(mysql); ++} ++SYM_16(mysql_thread_id); ++ ++ ++my_bool STDCALL symver16_mysql_thread_init() ++{ ++ return mysql_thread_init(); ++} ++SYM_16(mysql_thread_init); ++ ++ ++uint STDCALL symver16_mysql_thread_safe(void) ++{ ++ return mysql_thread_safe(); ++} ++SYM_16(mysql_thread_safe); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_use_result(MYSQL *mysql) ++{ ++ return mysql_use_result(mysql); ++} ++SYM_16(mysql_use_result); ++ ++ ++uint STDCALL symver16_mysql_warning_count(MYSQL *mysql) ++{ ++ return mysql_warning_count(mysql); ++} ++SYM_16(mysql_warning_count); ++ ++/*****/ ++ ++MYSQL * STDCALL symver16_mysql_real_connect(MYSQL *mysql,const char *host, const char *user, const char *passwd, const char *db, uint port, const char *unix_socket,ulong client_flag) ++{ ++ return mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, client_flag); ++} ++SYM_16(mysql_real_connect); ++ ++/*****/ ++ ++my_bool symver16_my_init(void) ++{ ++ return my_init(); ++} ++SYM_16(my_init); ++ ++#endif +diff -rup old/libmysql/libmysql.ver.in new/libmysql/libmysql.ver.in +--- old/libmysql/libmysql.ver.in 2013-11-05 08:19:26.000000000 +0100 ++++ new/libmysql/libmysql.ver.in 2014-01-10 15:41:30.545182782 +0100 +@@ -1 +1,136 @@ +-libmysqlclient_@SHARED_LIB_MAJOR_VERSION@ { global: *; }; ++libmysqlclient_16 ++{ ++ local: ++ symver16_*; ++}; ++ ++libmysqlclient_18 ++{ ++ global: ++ my_init; ++ myodbc_remove_escape; ++ mysql_affected_rows; ++ mysql_autocommit; ++ mysql_change_user; ++ mysql_character_set_name; ++ mysql_close; ++ mysql_commit; ++ mysql_data_seek; ++ mysql_debug; ++ mysql_dump_debug_info; ++ mysql_embedded; ++ mysql_eof; ++ mysql_errno; ++ mysql_error; ++ mysql_escape_string; ++ mysql_fetch_field; ++ mysql_fetch_field_direct; ++ mysql_fetch_fields; ++ mysql_fetch_lengths; ++ mysql_fetch_row; ++ mysql_field_count; ++ mysql_field_seek; ++ mysql_field_tell; ++ mysql_free_result; ++ mysql_get_character_set_info; ++ mysql_get_client_info; ++ mysql_get_client_version; ++ mysql_get_host_info; ++ mysql_get_parameters; ++ mysql_get_proto_info; ++ mysql_get_server_info; ++ mysql_get_server_version; ++ mysql_get_ssl_cipher; ++ mysql_hex_string; ++ mysql_info; ++ mysql_init; ++ mysql_insert_id; ++ mysql_kill; ++ mysql_list_dbs; ++ mysql_list_fields; ++ mysql_list_processes; ++ mysql_list_tables; ++ mysql_more_results; ++ mysql_next_result; ++ mysql_num_fields; ++ mysql_num_rows; ++ mysql_options; ++ mysql_ping; ++ mysql_query; ++ mysql_read_query_result; ++ mysql_real_connect; ++ mysql_real_escape_string; ++ mysql_real_query; ++ mysql_refresh; ++ mysql_rollback; ++ mysql_row_seek; ++ mysql_row_tell; ++ mysql_select_db; ++ mysql_send_query; ++ mysql_server_end; ++ mysql_server_init; ++ mysql_set_character_set; ++ mysql_set_local_infile_default; ++ mysql_set_local_infile_handler; ++ mysql_set_server_option; ++ mysql_shutdown; ++ mysql_sqlstate; ++ mysql_ssl_set; ++ mysql_stat; ++ mysql_stmt_affected_rows; ++ mysql_stmt_attr_get; ++ mysql_stmt_attr_set; ++ mysql_stmt_bind_param; ++ mysql_stmt_bind_result; ++ mysql_stmt_close; ++ mysql_stmt_data_seek; ++ mysql_stmt_errno; ++ mysql_stmt_error; ++ mysql_stmt_execute; ++ mysql_stmt_fetch; ++ mysql_stmt_fetch_column; ++ mysql_stmt_field_count; ++ mysql_stmt_free_result; ++ mysql_stmt_init; ++ mysql_stmt_insert_id; ++ mysql_stmt_num_rows; ++ mysql_stmt_param_count; ++ mysql_stmt_param_metadata; ++ mysql_stmt_prepare; ++ mysql_stmt_reset; ++ mysql_stmt_result_metadata; ++ mysql_stmt_row_seek; ++ mysql_stmt_row_tell; ++ mysql_stmt_send_long_data; ++ mysql_stmt_sqlstate; ++ mysql_stmt_store_result; ++ mysql_store_result; ++ mysql_thread_end; ++ mysql_thread_id; ++ mysql_thread_init; ++ mysql_thread_safe; ++ mysql_use_result; ++ mysql_warning_count; ++ ++ free_defaults; ++ handle_options; ++ load_defaults; ++ my_print_help; ++ ++ #my_make_scrambled_password; ++ THR_KEY_mysys; ++ ++ mysql_client_find_plugin; ++ mysql_client_register_plugin; ++ mysql_load_plugin; ++ mysql_load_plugin_v; ++ mysql_plugin_options; ++ mysql_stmt_next_result; ++ ++ #mysql_default_charset_info; ++ mysql_get_charset; ++ mysql_get_charset_by_csname; ++ mysql_net_realloc; ++ #mysql_client_errors; ++ *; ++} libmysqlclient_16; +diff -rup old/mysys/charset.c new/mysys/charset.c +--- old/mysys/charset.c 2013-11-05 08:19:26.000000000 +0100 ++++ new/mysys/charset.c 2014-01-10 15:41:30.552919678 +0100 +@@ -941,3 +941,20 @@ size_t escape_quotes_for_mysql(CHARSET_I + *to= 0; + return overflow ? (ulong)~0 : (ulong) (to - to_start); + } ++ ++#ifndef EMBEDDED_LIBRARY ++ ++// Hack to provide Fedora symbols ++ ++CHARSET_INFO *mysql_get_charset(uint cs_number, myf flags) ++{ ++ return get_charset(cs_number, flags); ++} ++ ++ ++CHARSET_INFO * mysql_get_charset_by_csname(const char *cs_name, uint cs_flags, myf flags) ++{ ++ return get_charset_by_csname(cs_name, cs_flags, flags); ++} ++ ++#endif +diff -rup old/sql/net_serv.cc new/sql/net_serv.cc +--- old/sql/net_serv.cc 2013-11-05 08:19:26.000000000 +0100 ++++ new/sql/net_serv.cc 2014-01-10 15:41:30.563377346 +0100 +@@ -1190,3 +1190,17 @@ void my_net_set_write_timeout(NET *net, + #endif + DBUG_VOID_RETURN; + } ++ ++#ifndef EMBEDDED_LIBRARY ++C_MODE_START ++ ++// Hack to provide Fedora symbols ++ ++my_bool mysql_net_realloc(NET *net, size_t length) ++{ ++ return net_realloc(net, length); ++} ++ ++C_MODE_END ++#endif ++ +diff -rup old/sql/password.c new/sql/password.c +--- old/sql/password.c 2013-11-05 08:19:26.000000000 +0100 ++++ new/sql/password.c 2014-01-10 15:41:30.567134663 +0100 +@@ -563,3 +563,17 @@ void make_password_from_salt(char *to, c + *to++= PVERSION41_CHAR; + octet2hex(to, (const char*) hash_stage2, SHA1_HASH_SIZE); + } ++ ++#ifndef EMBEDDED_LIBRARY ++ ++// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions ++ ++#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") ++ ++void symver16_my_make_scrambled_password(char *to, const char *password, size_t pass_len) ++{ ++ my_make_scrambled_password(to, password, pass_len); ++} ++SYM_16(my_make_scrambled_password); ++ ++#endif +diff -rup old/sql-common/client.c new/sql-common/client.c +--- old/sql-common/client.c 2013-11-05 08:19:26.000000000 +0100 ++++ new/sql-common/client.c 2014-01-10 15:41:30.574151024 +0100 +@@ -4399,3 +4399,136 @@ static int clear_password_auth_client(MY + + return res ? CR_ERROR : CR_OK; + } ++ ++#ifndef EMBEDDED_LIBRARY ++ ++// Hack to provide both libmysqlclient_16 and libmysqlclient_18 symbol versions ++ ++#define SYM_16(_exportedsym) __asm__(".symver symver16_" #_exportedsym "," #_exportedsym "@libmysqlclient_16") ++ ++void STDCALL symver16_mysql_close(MYSQL *mysql) ++{ ++ return mysql_close(mysql); ++} ++SYM_16(mysql_close); ++ ++ ++uint STDCALL symver16_mysql_errno(MYSQL *mysql) ++{ ++ return mysql_errno(mysql); ++} ++SYM_16(mysql_errno); ++ ++ ++const char * STDCALL symver16_mysql_error(MYSQL *mysql) ++{ ++ return mysql_error(mysql); ++} ++SYM_16(mysql_error); ++ ++ ++ulong * STDCALL symver16_mysql_fetch_lengths(MYSQL_RES *res) ++{ ++ return mysql_fetch_lengths(res); ++} ++SYM_16(mysql_fetch_lengths); ++ ++ ++MYSQL_ROW STDCALL symver16_mysql_fetch_row(MYSQL_RES *res) ++{ ++ return mysql_fetch_row(res); ++} ++SYM_16(mysql_fetch_row); ++ ++ ++void STDCALL symver16_mysql_free_result(MYSQL_RES *result) ++{ ++ return mysql_free_result(result); ++} ++SYM_16(mysql_free_result); ++ ++ ++ulong STDCALL symver16_mysql_get_server_version(MYSQL *mysql) ++{ ++ return mysql_get_server_version(mysql); ++} ++SYM_16(mysql_get_server_version); ++ ++ ++const char * STDCALL symver16_mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused))) ++{ ++ return mysql_get_ssl_cipher(mysql); ++} ++SYM_16(mysql_get_ssl_cipher); ++ ++ ++MYSQL * STDCALL symver16_mysql_init(MYSQL *mysql) ++{ ++ return mysql_init(mysql); ++} ++SYM_16(mysql_init); ++ ++ ++unsigned int STDCALL symver16_mysql_num_fields(MYSQL_RES *res) ++{ ++ return mysql_num_fields(res); ++} ++SYM_16(mysql_num_fields); ++ ++ ++my_ulonglong STDCALL symver16_mysql_num_rows(MYSQL_RES *res) ++{ ++ return mysql_num_rows(res); ++} ++SYM_16(mysql_num_rows); ++ ++ ++int STDCALL symver16_mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) ++{ ++ return mysql_options(mysql, option, arg); ++} ++SYM_16(mysql_options); ++ ++ ++int STDCALL symver16_mysql_real_query(MYSQL *mysql, const char *query, ulong length) ++{ ++ return mysql_real_query(mysql, query, length); ++} ++SYM_16(mysql_real_query); ++ ++ ++int STDCALL symver16_mysql_select_db(MYSQL *mysql, const char *db) ++{ ++ return mysql_select_db(mysql, db); ++} ++SYM_16(mysql_select_db); ++ ++ ++int STDCALL symver16_mysql_send_query(MYSQL* mysql, const char* query, ulong length) ++{ ++ return mysql_send_query(mysql, query, length); ++} ++SYM_16(mysql_send_query); ++ ++ ++int STDCALL symver16_mysql_set_character_set(MYSQL *mysql, const char *cs_name) ++{ ++ return mysql_set_character_set(mysql, cs_name); ++} ++SYM_16(mysql_set_character_set); ++ ++ ++my_bool STDCALL symver16_mysql_ssl_set(MYSQL *mysql __attribute__((unused)), const char *key __attribute__((unused)), const char *cert __attribute__((unused)), const char *ca __attribute__((unused)), const char *capath __attribute__((unused)), const char *cipher __attribute__((unused))) ++{ ++ return mysql_ssl_set(mysql, key, cert, ca, capath, cipher); ++} ++SYM_16(mysql_ssl_set); ++ ++ ++MYSQL_RES * STDCALL symver16_mysql_store_result(MYSQL *mysql) ++{ ++ return mysql_store_result(mysql); ++} ++SYM_16(mysql_store_result); ++ ++#endif diff --git a/packaging/rpm-libs-compat/mysql-5545-charset-dir.patch b/packaging/rpm-libs-compat/mysql-5545-charset-dir.patch new file mode 100644 index 000000000000..0844b752cf91 --- /dev/null +++ b/packaging/rpm-libs-compat/mysql-5545-charset-dir.patch @@ -0,0 +1,12 @@ +diff -ur a/include/m_ctype.h b/include/m_ctype.h +--- a/include/m_ctype.h 2015-09-08 12:35:31.499107653 +0100 ++++ b/include/m_ctype.h 2015-09-08 12:35:59.357103239 +0100 +@@ -36,7 +36,7 @@ + #define MY_CS_SORT_ORDER_TABLE_SIZE 256 + #define MY_CS_TO_UNI_TABLE_SIZE 256 + +-#define CHARSET_DIR "charsets/" ++#define CHARSET_DIR "charsets-5.5.45/" + + #define my_wc_t ulong + diff --git a/packaging/rpm-libs-compat/mysql-libs-compat.spec b/packaging/rpm-libs-compat/mysql-libs-compat.spec index d2763d08e130..bea3f71326a3 100644 --- a/packaging/rpm-libs-compat/mysql-libs-compat.spec +++ b/packaging/rpm-libs-compat/mysql-libs-compat.spec @@ -87,10 +87,13 @@ %endif %if 0%{?rhel} == 7 -%global compatver 5.5.37 +%global compatver 5.5.45 %global compatlib 18 %global compatsrc https://cdn.mysql.com/Downloads/MySQL-5.5/mysql-%{compatver}.tar.gz -%global compatch mysql-5537-charset-dir.patch +%global compatch mysql-5545-charset-dir.patch +# By default, a build will include the bundeled "yaSSL" library for SSL. +%{?with_ssl: %global ssl_option -DWITH_SSL=%{with_ssl}} +%{!?feature_set: %global feature_set community} %endif # Hack to support el5 where __isa_bits not defined. Note: supports i386 and x86_64 only, sorry. @@ -120,16 +123,19 @@ Summary: Shared libraries for MySQL %{compatver} database client applicat Group: Applications/Databases # "Version = 5.6" because this libs-compat will fit all mysql-wsrep-server-5.6.* packages. # "fullversion = 5.6.23" for better conflict handling. -Version: 5.6 -%global fullversion 5.6.23 -Release: 11%{?dist} +Version: 5.5 +%global fullversion 5.5.45 +Release: 12%{?dist} License: Copyright (c) 2000, 2015, %{mysql_vendor}. All rights reserved. Under GPLv2 license as shown in the Description field. URL: http://www.mysql.com/ Packager: FromDual GmbH Vendor: %{mysql_vendor} %if 0%{?compatlib} Source7: %{compatsrc} -Patch: %{compatch} +Patch0: %{compatch} +%if 0%{?rhel} > 6 +Patch1: mysql-5.5-libmysqlclient-symbols.patch +%endif %endif BuildRequires: gcc-c++ BuildRequires: perl @@ -141,15 +147,18 @@ BuildRequires: libaio-devel BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: zlib-devel +%{?el7:BuildRequires: cmake} +%{?el7:BuildRequires: perl(Time::HiRes)} +%{?el7:BuildRequires: perl(Env)} BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) -Obsoletes: mysql-libs-compat < %{fullversion}-%{release} Provides: mysql-libs-compat = %{fullversion}-%{release} Provides: mysql-libs-compat%{?_isa} = %{fullversion}-%{release} +Obsoletes: mysql-libs-compat < %{fullversion}-%{release} Provides: MySQL-shared-compat%{?_isa} = %{fullversion}-%{release} Obsoletes: MySQL-shared-compat < %{fullversion}-%{release} -%if 0%{?rhel} < 6 +%if 0%{?rhel} == 5 # Dealing with RHEL 5 (and compatible ...) # "mysql" without a subpackage specification is a RedHat convention, # a package with client, lib, and server parts that blocks the server upgrade. @@ -186,7 +195,8 @@ while the MySQL software on the machine is updated to a newer release series. %prep %setup -q -T -a 7 -c -n %{src_dir} pushd %{src_dir} -%patch -p 1 +%patch0 -p 1 +%{?el7:%patch1 -p1} popd %build @@ -235,22 +245,53 @@ popd %endif +%if 0%{?rhel} == 7 + +mkdir release +cd release +cmake ../%{src_dir} \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DENABLE_DTRACE=OFF \ + -DCMAKE_C_FLAGS="%{optflags}" \ + -DCMAKE_CXX_FLAGS="%{optflags}" \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DINSTALL_SQLBENCHDIR=share \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DFEATURE_SET="%{feature_set}" \ + -DWITH_EMBEDDED_SERVER=1 \ + -DWITH_EMBEDDED_SHARED_LIBRARY=1 \ + %{?ssl_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_release}" \ + -DMYSQL_SERVER_SUFFIX="%{?server_suffix}" +echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG +make %{?_smp_mflags} VERBOSE=1 + +%endif + ) %install +cd $RPM_BUILD_DIR/mysql-%{compatver} + # Install compat libs -for dir in libmysql libmysql_r ; do - pushd mysql-%{compatver}/$dir +%if 0%{?rhel} < 7 +for dir in mysql-%{compatver}/libmysql mysql-%{compatver}/libmysql_r ; do +%else +for dir in release/libmysql ; do +%endif + pushd $dir make DESTDIR=%{buildroot} install popd done rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient{,_r}.{a,la,so} # "charsets/" -MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}/mysql-release-%{mysql_version} -install -d -m 0755 %{buildroot}/usr/share/mysql-%{compatver}/charsets/ -install -m 644 mysql-%{compatver}/sql/share/charsets/* %{buildroot}/usr/share/mysql-%{compatver}/charsets/ +install -d -m 0755 %{buildroot}/usr/share/mysql/charsets-%{compatver}/ +install -m 644 mysql-%{compatver}/sql/share/charsets/* %{buildroot}/usr/share/mysql/charsets-%{compatver}/ # Add libdir to linker install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d @@ -272,11 +313,17 @@ echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch} %{_libdir}/mysql/libmysqlclient.so.%{compatlib}.0.0 %{_libdir}/mysql/libmysqlclient_r.so.%{compatlib} %{_libdir}/mysql/libmysqlclient_r.so.%{compatlib}.0.0 -%dir %attr(755, root, root) %{_datadir}/mysql-%{compatver} -%attr(644, root, root) %{_datadir}/mysql-%{compatver}/charsets/ +%dir %attr(755, root, root) %{_datadir}/mysql/ +%dir %attr(755, root, root) %{_datadir}/mysql/charsets-%{compatver}/ +%attr(644, root, root) %{_datadir}/mysql/charsets-%{compatver}/* %changelog +* Tue Sep 08 2015 Joerg Bruehe +- Finish the code for RHEL 7, using MySQL 5.5.45 as published by Oracle. +- Severe bug: Path for "charsets" files did not match the patch, fix it. +- This is in the 5.5 branch, fix the spec file version. + * Thu Sep 03 2015 Joerg Bruehe - Change the name from "mysql-libs-compat" to "mysql-wsrep-libs-compat". - Change the compatibility version for RHEL 6 from MySQL 5.1.72 to 5.1.73. From 0b1267f3fdf1da9c4f3215402574ece31340ed7e Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Wed, 9 Sep 2015 12:33:27 +0200 Subject: [PATCH 057/305] Keep '.centos' out of 'dist' macro on CentOS 7 --- packaging/rpm-libs-compat/mysql-libs-compat.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packaging/rpm-libs-compat/mysql-libs-compat.spec b/packaging/rpm-libs-compat/mysql-libs-compat.spec index bea3f71326a3..b49abc5a04a4 100644 --- a/packaging/rpm-libs-compat/mysql-libs-compat.spec +++ b/packaging/rpm-libs-compat/mysql-libs-compat.spec @@ -46,6 +46,7 @@ %endif # Define dist tag if not given by platform +# In case of problems, check "/etc/rpm/macros.dist" %if %{undefined dist} # RHEL 5 %if 0%{?rhel} == 5 @@ -70,6 +71,10 @@ %define dist .DIST %endif %endif +# CentOS 7 would force ".el7.centos", we want to avoid that. +%if 0%{?rhel} == 7 + %define dist .el7 +%endif # Version for compat libs %if 0%{?rhel} == 5 From b42b475164dee8536a762537f0b1168b94af4f6f Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Wed, 16 Sep 2015 16:57:08 +0200 Subject: [PATCH 058/305] Add building a "mysql-wsrep-libs-compat-5.5" rpm. This change brings a new subdirectory "packaging/libs-compat/" which contains a spec file and some other files, notably patches. The spec file takes the existing "support-files/mysql.spec.sh" and extends it by a new subpackage "libs-compat", taking effect only on RHEL 6 and compatibles. That new RPM will need a complete build of MySQL 5.1.73, but take only "libmysqlclient.so.16" and the "charsets/" files (path changed to avoid conflicts). On installation using "rpm -U" (!), it will remove the existing "mysql-libs-5.1.73" and fulfill the dependencies (notably by postfix) by its new files. Then, "mysql-wsrep-{server,client}-5.5" can be installed without a conflict. --- .../rpm-libs-compat/mysql-libs-compat.spec | 2342 +++++++++++++++-- 1 file changed, 2172 insertions(+), 170 deletions(-) diff --git a/packaging/rpm-libs-compat/mysql-libs-compat.spec b/packaging/rpm-libs-compat/mysql-libs-compat.spec index b49abc5a04a4..3a13166d1cd0 100644 --- a/packaging/rpm-libs-compat/mysql-libs-compat.spec +++ b/packaging/rpm-libs-compat/mysql-libs-compat.spec @@ -1,4 +1,4 @@ -# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -14,44 +14,141 @@ # Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston # MA 02110-1301 USA. -# ========== +############################################################################## +# Some common macro definitions +############################################################################## + +# NOTE: "vendor" is used in upgrade/downgrade check, so you can't +# change these, has to be exactly as is. +%global mysql_old_vendor MySQL AB +%global mysql_vendor_2 Sun Microsystems, Inc. +%global mysql_vendor Oracle and/or its affiliates + +%global mysql_version @VERSION@ +%global wsrep_version @WSREP_VERSION@ +%global wsrep_revision @WSREP_REVISION@ +%global wsrep_revision @WSREP_REVISION@ + +%global mysqld_user mysql +%global mysqld_group mysql +%global mysqldatadir /var/lib/mysql + +%global release %{wsrep_version} +%global short_product_tag 5.5 + + + +# +# Macros we use which are not available in all supported versions of RPM # -# This spec file is a subset of the Oracle spec file for MySQL RPMs -# for Enterprise Linux (RedHat or Oracle Linux) as published with MySQL 5.6.23 -# The subset is limited to only create the "mysql-libs-compat" packages -# which are needed to satisfy dependencies of application packages -# when installing newer versions of MySQL. +# - defined/undefined are missing on RHEL4 # -# Subsetting is done by Jörg Brühe ( joerg.bruehe@fromdual.com ) -# to support the installation of MySQL-Galera-Cluster RPMs -# as offered by FromDual ( www.fromdual.com ) and/or -# Codership ( www.codership.com / www.galeracluster.com ). +%if %{expand:%{?defined:0}%{!?defined:1}} +%define defined() %{expand:%%{?%{1}:1}%%{!?%{1}:0}} +%endif +%if %{expand:%{?undefined:0}%{!?undefined:1}} +%define undefined() %{expand:%%{?%{1}:0}%%{!?%{1}:1}} +%endif + +# ---------------------------------------------------------------------------- +# RPM build tools now automatically detect Perl module dependencies. This +# detection causes problems as it is broken in some versions, and it also +# provides unwanted dependencies from mandatory scripts in our package. +# It might not be possible to disable this in all versions of RPM, but here we +# try anyway. We keep the "AutoReqProv: no" for the "test" sub package, as +# disabling here might fail, and that package has the most problems. +# See: +# http://fedoraproject.org/wiki/Packaging/Perl#Filtering_Requires:_and_Provides +# http://www.wideopen.com/archives/rpm-list/2002-October/msg00343.html +# ---------------------------------------------------------------------------- +%undefine __perl_provides +%undefine __perl_requires + +############################################################################## +# Command line handling +############################################################################## # -# ========== +# To set options: +# +# $ rpmbuild --define="option " ... +# + +# ---------------------------------------------------------------------------- +# Commercial builds +# ---------------------------------------------------------------------------- +%if %{undefined commercial} +%define commercial 0 +%endif -%global mysql_vendor Oracle and/or its affiliates +# ---------------------------------------------------------------------------- +# Source name +# ---------------------------------------------------------------------------- +%if %{undefined src_base} +%define src_base mysql-wsrep +%endif +%define src_dir %{src_base}-%{mysql_version}-%{wsrep_version} + +# ---------------------------------------------------------------------------- +# Feature set (storage engines, options). Default to community (everything) +# ---------------------------------------------------------------------------- +%if %{undefined feature_set} +%define feature_set community +%endif -%{!?with_debuginfo: %global nodebuginfo 1} +# ---------------------------------------------------------------------------- +# Server comment strings +# ---------------------------------------------------------------------------- +%if %{undefined compilation_comment_debug} +%define compilation_comment_debug MySQL Community Server - Debug (GPL) +%endif +%if %{undefined compilation_comment_release} +%define compilation_comment_release MySQL Community Server (GPL) +%endif -# Deal with RedHat 5 which doesn't properly identify itself -# This is meant to solve Oracle's problem: -# Rebuild on OL5/RHEL5 needs following rpmbuild options: -# rpmbuild --define 'dist .el5' --define 'rhel 5' --define 'el5 1' mysql.spec -%if %(test -f /etc/redhat-release && echo 1 || echo 0) - %if 0%{?rhel} - # "rhel" is defined, trust it +# ---------------------------------------------------------------------------- +# Product and server suffixes +# ---------------------------------------------------------------------------- +%if %{undefined product_suffix} + %if %{defined short_product_tag} + %define product_suffix -%{short_product_tag} %else - %global rhel 5 + %define product_suffix %{nil} %endif %endif +%if %{undefined server_suffix} +%define server_suffix %{nil} +%endif + +# ---------------------------------------------------------------------------- +# Distribution support +# ---------------------------------------------------------------------------- + +# Disable post build checks for time being. +BuildConflicts: post-build-checks + +BuildRequires: gcc-c++ ncurses-devel perl zlib-devel cmake libaio-devel bison flex +BuildRequires: openssl-devel + +%if 0%{?rhel} == 6 || 0%{?rhel} == 7 || 0%{?fedora} == 20 || 0%{?fedora} == 21 +BuildRequires: time +%endif +%if 0%{?rhel} == 7 +BuildRequires: perl(Time::HiRes) perl(Env) +%endif + +%if 0%{?suse_version} +%if 0%{?suse_version} == 1110 +BuildRequires: gdbm-devel gperf openldap2-client procps pwdutils +%endif +%if 0%{?suse_version} == 1310 || 0%{?suse_version} == 1315 || 0%{?suse_version} == 1320 +BuildRequires: gperf procps time +%endif +%endif + # Define dist tag if not given by platform # In case of problems, check "/etc/rpm/macros.dist" %if %{undefined dist} - # RHEL 5 - %if 0%{?rhel} == 5 - %define dist .el5 - %endif # For suse versions see: # https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto %if 0%{?suse_version} == 1110 @@ -76,14 +173,25 @@ %define dist .el7 %endif -# Version for compat libs -%if 0%{?rhel} == 5 -%global compatver 5.0.96 -%global compatlib 15 -%global compatsrc http://downloads.mysql.com/archives/mysql-5.0/mysql-%{compatver}.tar.gz -%global compatch mysql-5096-charset-dir.patch +# Avoid debuginfo RPMs, leaves binaries unstripped +%define debug_package %{nil} + +# ---------------------------------------------------------------------------- +# Support optional "tcmalloc" library (experimental) +# ---------------------------------------------------------------------------- +%if %{defined malloc_lib_target} +%define WITH_TCMALLOC 1 +%else +%define WITH_TCMALLOC 0 %endif +############################################################################## +# Settings for the "compatibility libs", the version depends on the target platform +############################################################################## + +# To differ between current main version and libs-compat: +%global currentlib 18 + %if 0%{?rhel} == 6 %global compatver 5.1.73 %global compatlib 16 @@ -91,100 +199,281 @@ %global compatch mysql-5173-charset-dir.patch %endif -%if 0%{?rhel} == 7 -%global compatver 5.5.45 -%global compatlib 18 -%global compatsrc https://cdn.mysql.com/Downloads/MySQL-5.5/mysql-%{compatver}.tar.gz -%global compatch mysql-5545-charset-dir.patch -# By default, a build will include the bundeled "yaSSL" library for SSL. -%{?with_ssl: %global ssl_option -DWITH_SSL=%{with_ssl}} -%{!?feature_set: %global feature_set community} +# mysql-wsrep-5.5 has libmysqlclient.so.18, as have 5.6 and 5.7; +# same as preinstalled mariadb-libs, so we currently need no libs-compat on RHEL 7. +# This becomes relevant with a MySQL 5.8 (or higher) that has a libmysqlclient.so.19 or higher. +# +# %%if 0%%{?rhel} == 7 +# %%global compatver 5.5.45 +# %%global compatlib 18 +# %%global compatsrc https://cdn.mysql.com/Downloads/MySQL-5.5/mysql-%%{compatver}.tar.gz +# %%global compatch mysql-5545-charset-dir.patch +# # By default, a build will include the bundeled "yaSSL" library for SSL. +# %%{?with_ssl: %%global ssl_option -DWITH_SSL=%%{with_ssl}} +# %%endif + +%if 0%{?compatlib} +# Attention: "compat_src_dir" is the old version (e.g. 5.1.73), depends on platform +%global compat_src_dir mysql-%{compatver} +%endif + +############################################################################## +# Configuration based upon above user input, not to be set directly +############################################################################## + +%if 0%{?commercial} +%define license_files_server %{src_dir}/LICENSE.mysql +%define license_type Commercial +%else +%define license_files_server %{src_dir}/COPYING %{src_dir}/README +%define license_type GPL +%define compat_license_files_server %{compat_src_dir}/COPYING %{compat_src_dir}/README +%endif + +############################################################################## +# Main spec file section +############################################################################## + +Name: mysql-wsrep%{product_suffix} +Summary: MySQL: a very fast and reliable SQL database server +Group: Applications/Databases +Version: @MYSQL_RPM_VERSION@ +Release: %{release}%{dist} +# Distribution: %{distro_description} +License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{license_type} license as shown in the Description field. +Source: %{src_dir}.tar.gz +%if 0%{?compatlib} +Source7: %{compatsrc} +%endif +Source99: mysql-rpmlintrc +Patch0: cmake-no-wix.patch +%if 0%{?compatlib} +Patch7: %{compatch} +%if 0%{?compatlib} == 18 +Patch8: mysql-5.5-libmysqlclient-symbols.patch +%endif +%endif +URL: http://www.mysql.com/ +Packager: Codership Oy +Vendor: %{mysql_vendor} +# BuildRequires: %{distro_buildreq} +#wsrep_patch_tag + +Requires: mysql-wsrep-server%{product_suffix} +Requires: mysql-wsrep-client%{product_suffix} + +# Regression tests may take a long time, override the default to skip them +%{!?runselftest:%global runselftest 0} + +# Think about what you use here since the first step is to +# run a rm -rf +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 MySQL software has Dual Licensing, which means you can use the MySQL +software free of charge under the GNU General Public License +(http://www.gnu.org/licenses/). You can also purchase commercial MySQL +licenses from %{mysql_vendor} if you do not wish to be bound by the terms of +the GPL. See the chapter "Licensing and Support" in the manual for +further info. + +The MySQL web site (http://www.mysql.com/) provides the latest +news and information about the MySQL software. Also please see the +documentation and the manual for more information. + +This is a meta package of the MySQL software combined with the "wsrep plugin" +aka "Galera Cluster", all governed by the GPL. +It causes the installation of both the server and the client subpackages +so that the machine can be used both as a local database server and as a node +in a MySQL Galera Cluster. + +############################################################################## +# Sub package definition +############################################################################## + +%package -n mysql-wsrep-server%{product_suffix} +Summary: MySQL: a very fast and reliable SQL database server +Group: Applications/Databases +# Distro requirements +# RedHat +%if 0%{?fedora} || 0%{?rhel} +Requires: chkconfig coreutils grep procps shadow-utils net-tools rsync lsof +%if 0%{?rhel} == 7 || 0%{?fedora} >= 20 +Requires: perl-Data-Dumper +%endif +%endif +# SUSE +%if 0%{?suse_version} +Requires: aaa_base coreutils grep procps rsync lsof +%if 0%{suse_version} == 1110 +Requires: pwdutils +%endif %endif -# Hack to support el5 where __isa_bits not defined. Note: supports i386 and x86_64 only, sorry. -%if x%{?__isa_bits} == x -%ifarch %{ix86} -%global __isa_bits 32 +%if 0%{?commercial} +Obsoletes: MySQL-server +%else +Obsoletes: MySQL-server-advanced %endif -%ifarch x86_64 -%global __isa_bits 64 +Obsoletes: mysql-server < %{version}-%{release} +Obsoletes: mysql-server-advanced +Obsoletes: MySQL-server-classic MySQL-server-community MySQL-server-enterprise +Obsoletes: MySQL-server-advanced-gpl MySQL-server-enterprise-gpl +Provides: mysql-server = %{version}-%{release} +Provides: mysql-server%{?_isa} = %{version}-%{release} + +%description -n mysql-wsrep-server%{product_suffix} +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 MySQL software has Dual Licensing, which means you can use the MySQL +software free of charge under the GNU General Public License +(http://www.gnu.org/licenses/). You can also purchase commercial MySQL +licenses from %{mysql_vendor} if you do not wish to be bound by the terms of +the GPL. See the chapter "Licensing and Support" in the manual for +further info. + +The MySQL web site (http://www.mysql.com/) provides the latest news and +information about the MySQL software. Also please see the documentation +and the manual for more information. + +This package includes the MySQL server binary as well as related utilities +to run and administer a MySQL server. + +Built with wsrep patch %{wsrep_version}, to be a node in a Galera cluster. + +If you want to access and work with the database locally, you have to install +package "mysql-wsrep-client%{product_suffix}" as well! + +# ---------------------------------------------------------------------------- +%package -n mysql-wsrep-client%{product_suffix} +Summary: MySQL - Client +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: MySQL-client +%else +Obsoletes: MySQL-client-advanced %endif +Obsoletes: mysql < %{version}-%{release} +Obsoletes: mysql-advanced < %{version}-%{release} +Obsoletes: MySQL-client-classic MySQL-client-community MySQL-client-enterprise +Obsoletes: MySQL-client-advanced-gpl MySQL-client-enterprise-gpl +Provides: mysql = %{version}-%{release} +Provides: mysql%{?_isa} = %{version}-%{release} +Provides: mysql-client = %{version} +Provides: MySQL-client = %{version} + +%description -n mysql-wsrep-client%{product_suffix} +This package contains the standard MySQL clients and administration tools. + +For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ + +# ---------------------------------------------------------------------------- +%package -n mysql-wsrep-test%{product_suffix} +Summary: MySQL - Test suite +Group: Applications/Databases +%if 0%{?commercial} +Requires: MySQL-client-advanced perl +Obsoletes: MySQL-test +%else +Requires: MySQL-client perl +Obsoletes: MySQL-test-advanced %endif +Obsoletes: mysql-test < %{version}-%{release} +Obsoletes: mysql-test-advanced +Obsoletes: MySQL-test-classic MySQL-test-community MySQL-test-enterprise +Obsoletes: MySQL-test-advanced-gpl MySQL-test-enterprise-gpl +Obsoletes: mysql-bench +Obsoletes: MySQL-bench +Provides: mysql-test = %{version}-%{release} +Provides: mysql-test%{?_isa} = %{version}-%{release} +AutoReqProv: no -# Attention: "src_dir" is the old version (5.0.96 or 5.1.73), depends on platform -%global src_dir mysql-%{compatver} +%description -n mysql-wsrep-test%{product_suffix} +This package contains the MySQL regression test suite. -# No debuginfo for now, ships /usr/sbin/mysqld-debug and libmysqlcliet-debug.a -%if 0%{?nodebuginfo} -%global _enable_debug_package 0 -%global debug_package %{nil} -%global __os_install_post /usr/lib/rpm/brp-compress %{nil} +For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ + +# ---------------------------------------------------------------------------- +%package -n mysql-wsrep-devel%{product_suffix} +Summary: MySQL - Development header files and libraries +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: MySQL-devel +%else +Obsoletes: MySQL-devel-advanced %endif +Obsoletes: mysql-devel < %{version}-%{release} +Obsoletes: mysql-embedded-devel mysql-devel-advanced mysql-embedded-devel-advanced +Obsoletes: MySQL-devel-classic MySQL-devel-community MySQL-devel-enterprise +Obsoletes: MySQL-devel-advanced-gpl MySQL-devel-enterprise-gpl +Provides: mysql-devel = %{version}-%{release} +Provides: mysql-devel%{?_isa} = %{version}-%{release} -%global license_files_server %{src_dir}/COPYING %{src_dir}/README +%description -n mysql-wsrep-devel%{product_suffix} +This package contains the development header files and libraries necessary +to develop MySQL client applications. -Name: mysql-wsrep-libs-compat -Summary: Shared libraries for MySQL %{compatver} database client applications +For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ + +# ---------------------------------------------------------------------------- +%package -n mysql-wsrep-shared%{product_suffix} +Summary: MySQL - Shared libraries Group: Applications/Databases -# "Version = 5.6" because this libs-compat will fit all mysql-wsrep-server-5.6.* packages. -# "fullversion = 5.6.23" for better conflict handling. -Version: 5.5 -%global fullversion 5.5.45 -Release: 12%{?dist} -License: Copyright (c) 2000, 2015, %{mysql_vendor}. All rights reserved. Under GPLv2 license as shown in the Description field. -URL: http://www.mysql.com/ -Packager: FromDual GmbH -Vendor: %{mysql_vendor} +%if 0%{?commercial} +Obsoletes: MySQL-shared +%else +Obsoletes: MySQL-shared-advanced +%endif +Obsoletes: MySQL-shared-standard MySQL-shared-pro +Obsoletes: MySQL-shared-pro-cert MySQL-shared-pro-gpl +Obsoletes: MySQL-shared-pro-gpl-cert +Obsoletes: MySQL-shared-classic MySQL-shared-community MySQL-shared-enterprise +Obsoletes: MySQL-shared-advanced-gpl MySQL-shared-enterprise-gpl +# RHEL uses other names: +Obsoletes: mysql-libs +# Necessary on RHEL 7, no harm on other platforms: +Obsoletes: mariadb-libs + +%description -n mysql-wsrep-shared%{product_suffix} +This package contains the shared libraries (*.so*) which certain languages +and applications need to dynamically load and use MySQL. + +# ---------------------------------------------------------------------------- %if 0%{?compatlib} -Source7: %{compatsrc} -Patch0: %{compatch} -%if 0%{?rhel} > 6 -Patch1: mysql-5.5-libmysqlclient-symbols.patch -%endif -%endif -BuildRequires: gcc-c++ -BuildRequires: perl -%if 0%{?rhel} -# RedHat has it, SuSE doesn't -BuildRequires: time -%endif -BuildRequires: libaio-devel -BuildRequires: ncurses-devel -BuildRequires: openssl-devel -BuildRequires: zlib-devel -%{?el7:BuildRequires: cmake} -%{?el7:BuildRequires: perl(Time::HiRes)} -%{?el7:BuildRequires: perl(Env)} -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) - - -Provides: mysql-libs-compat = %{fullversion}-%{release} -Provides: mysql-libs-compat%{?_isa} = %{fullversion}-%{release} -Obsoletes: mysql-libs-compat < %{fullversion}-%{release} -Provides: MySQL-shared-compat%{?_isa} = %{fullversion}-%{release} -Obsoletes: MySQL-shared-compat < %{fullversion}-%{release} -%if 0%{?rhel} == 5 -# Dealing with RHEL 5 (and compatible ...) -# "mysql" without a subpackage specification is a RedHat convention, -# a package with client, lib, and server parts that blocks the server upgrade. -Obsoletes: mysql <= %{compatver} -%endif -%if 0%{?rhel} > 5 +%package -n mysql-wsrep-libs-compat%{product_suffix} +Summary: Shared libraries for MySQL %{compatver} database client applications +Group: Applications/Databases + +Provides: mysql-libs-compat = %{version} +Provides: mysql-libs-compat%{?_isa} = %{version} +Obsoletes: mysql-libs-compat < %{version} +Provides: MySQL-shared-compat%{?_isa} = %{version} +Obsoletes: MySQL-shared-compat < %{version} + # Dealing with RHEL 6 and upwards (and compatible ...) # Directly, we replace "libs" only; but RedHat "client" and "server" need files from "libs" -Provides: mysql-libs = %{compatver}-%{release} -Obsoletes: mysql-libs < %{fullversion}-%{release} -Obsoletes: mysql < %{fullversion}-%{release} -Obsoletes: mysql-server < %{fullversion}-%{release} -%endif +Provides: mysql-libs = %{compatver} +Obsoletes: mysql-libs < %{version} + %if 0%{?rhel} > 6 # Dealing with RHEL 7 and upwards (and compatible ...) -# Above section for RHEL 6 also applies, it deals with "mysql" packages. +# Above general section for RHEL also applies, it deals with "mysql" packages. # But with RHEL 7, we also get "mariadb" ... Obsoletes: mariadb-libs %endif -%description +%description -n mysql-wsrep-libs-compat%{product_suffix} The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. See the MySQL web site (http://www.mysql.com/) for further information, @@ -196,25 +485,75 @@ It is intended for RHEL %{?rhel} and compatible distributions, to satisfy the dependencies of several applications shipping with that distro while the MySQL software on the machine is updated to a newer release series. +%endif + +# ---------------------------------------------------------------------------- +%package -n MySQL-embedded%{product_suffix} +Summary: MySQL - Embedded library +Group: Applications/Databases +%if 0%{?commercial} +Requires: MySQL-devel-advanced +Obsoletes: MySQL-embedded +%else +Requires: MySQL-devel +Obsoletes: MySQL-embedded-advanced +%endif +Obsoletes: mysql-embedded < %{version}-%{release} +Obsoletes: mysql-embedded-advanced +Obsoletes: MySQL-embedded-pro +Obsoletes: MySQL-embedded-classic MySQL-embedded-community MySQL-embedded-enterprise +Obsoletes: MySQL-embedded-advanced-gpl MySQL-embedded-enterprise-gpl +Provides: mysql-embedded = %{version}-%{release} +Provides: mysql-embedded%{?_isa} = %{version}-%{release} + +%description -n MySQL-embedded%{product_suffix} +This package contains the MySQL 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 main benefits are increased +speed and more simple management for embedded applications. + +The API is identical for the embedded MySQL version and the +client/server version. + +For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ +############################################################################## %prep -%setup -q -T -a 7 -c -n %{src_dir} +%if 0%{?compatlib} +%setup -q -T -a 0 -a 7 -c -n %{name} +# -q = quiet, -T = no default unpack, -n = source dir name, -c = create, -a = unpack after cd +# https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s04.html +# http://rpm.org/max-rpm-snapshot/s1-rpm-inside-macros.html +pushd %{compat_src_dir} +%patch7 -p 1 +%if 0%{?compatlib} == 18 +%patch8 -p 1 +%endif +popd +%else +%setup -q -T -a 0 -c -n %{name} +%endif # 0%{?compatlib} + +# That patch is needed with old cmake only, on SLES 11, but it won't do any harm +# outside Windows, so it may be used in all RPM builds. pushd %{src_dir} -%patch0 -p 1 -%{?el7:%patch1 -p1} +%patch0 -p1 +#wsrep_apply_patch_tag popd +############################################################################## %build + # Build compat libs +%if 0%{?compatlib} ( - -%if 0%{?rhel} < 7 - -# RHEL 5 + 6: MySQL 5.0 / 5.1, using traditional "configure ; make" +%if 0%{?compatlib} == 16 +# RHEL 6: MySQL 5.1, using traditional "configure ; make" export CC="gcc" CXX="g++" export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv" export CXXFLAGS="$CFLAGS %{?el6:-felide-constructors} -fno-rtti -fno-exceptions" -pushd %{src_dir} +pushd %{compat_src_dir} %configure \ --with-readline \ --without-debug \ @@ -226,16 +565,6 @@ pushd %{src_dir} --enable-local-infile \ --enable-largefile \ --enable-thread-safe-client \ -%if 0%{?rhel} == 5 - --with-openssl \ - --with-bench \ - --with-innodb \ - --with-berkeley-db \ - --enable-community-features \ - --enable-profiling \ - --with-named-thread-libs="-lpthread" \ -%endif -%if 0%{?rhel} == 6 --with-ssl=%{_prefix} \ --with-embedded-server \ --with-big-tables \ @@ -243,18 +572,16 @@ pushd %{src_dir} --with-plugin-innobase \ --with-plugin-innodb_plugin \ --with-plugin-partition \ -%endif --disable-dependency-tracking make %{?_smp_mflags} popd - %endif - -%if 0%{?rhel} == 7 - +##### +%if 0%{?compatlib} == 18 +# RHEL 7: MySQL 5.5, using "cmake ; make" mkdir release cd release -cmake ../%{src_dir} \ +cmake ../%{compat_src_dir} \ -DBUILD_CONFIG=mysql_release \ -DINSTALL_LAYOUT=RPM \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ @@ -273,17 +600,129 @@ cmake ../%{src_dir} \ -DMYSQL_SERVER_SUFFIX="%{?server_suffix}" echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG make %{?_smp_mflags} VERBOSE=1 +cd .. +%endif +) +%endif + +pushd %{src_dir} + +# Fail quickly and obviously if user tries to build as root +%if %runselftest + if [ x"`id -u`" = x0 ]; then + echo "The MySQL regression tests may fail if run as root." + echo "If you really need to build the RPM as root, use" + echo "--define='runselftest 0' to skip the regression tests." + exit 1 + fi +%endif +# Be strict about variables, bail at earliest opportunity, etc. +set -eu + +# Optional package files +touch optional-files-devel + +# +# Set environment in order of preference, MYSQL_BUILD_* first, then variable +# name, finally a default. RPM_OPT_FLAGS is assumed to be a part of the +# default RPM build environment. +# +# We set CXX=gcc by default to support so-called 'generic' binaries, where we +# do not have a dependancy on libgcc/libstdc++. This only works while we do +# not require C++ features such as exceptions, and may need to be removed at +# a later date. +# + +# This is a hack, $RPM_OPT_FLAGS on ia64 hosts contains flags which break +# the compile in cmd-line-utils/readline - needs investigation, but for now +# we simply unset it and use those specified directly in cmake. +%if "%{_arch}" == "ia64" +RPM_OPT_FLAGS= %endif +export PATH=${MYSQL_BUILD_PATH:-$PATH} +export CC=${MYSQL_BUILD_CC:-${CC:-gcc}} +export CXX=${MYSQL_BUILD_CXX:-${CXX:-gcc}} +export CFLAGS=${MYSQL_BUILD_CFLAGS:-${CFLAGS:-$RPM_OPT_FLAGS}} +export CXXFLAGS=${MYSQL_BUILD_CXXFLAGS:-${CXXFLAGS:-$RPM_OPT_FLAGS -felide-constructors -fno-exceptions -fno-rtti}} +export LDFLAGS=${MYSQL_BUILD_LDFLAGS:-${LDFLAGS:-}} +export CMAKE=${MYSQL_BUILD_CMAKE:-${CMAKE:-cmake}} +export MAKE_JFLAG=${MYSQL_BUILD_MAKE_JFLAG:--j$(ncpu=$(cat /proc/cpuinfo | grep processor | wc -l) && echo $(($ncpu > 4 ? 4 : $ncpu)))} + +# Build debug mysqld and libmysqld.a +mkdir debug +( + cd debug + # Attempt to remove any optimisation flags from the debug build + CFLAGS=`echo " ${CFLAGS} " | \ + sed -e 's/ -O[0-9]* / /' \ + -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /' \ + -e 's/-D_FORTIFY_SOURCE=2/ /' \ + -e 's/ -unroll2 / /' \ + -e 's/ -ip / /' \ + -e 's/^ //' \ + -e 's/ $//'` + CXXFLAGS=`echo " ${CXXFLAGS} " | \ + sed -e 's/ -O[0-9]* / /' \ + -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /' \ + -e 's/-D_FORTIFY_SOURCE=2/ /' \ + -e 's/ -unroll2 / /' \ + -e 's/ -ip / /' \ + -e 's/^ //' \ + -e 's/ $//'` + # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before + # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM + ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=Debug \ + -DENABLE_DTRACE=OFF \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DFEATURE_SET="%{feature_set}" \ + -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \ + -DMYSQL_SERVER_SUFFIX="%{server_suffix}" \ + -DWITH_WSREP=1 \ + -DWSREP_VERSION="%{wsrep_version}" \ + -DWSREP_REVISION="%{wsrep_revision}" + echo BEGIN_DEBUG_CONFIG ; egrep '^#define' include/config.h ; echo END_DEBUG_CONFIG + make ${MAKE_JFLAG} VERBOSE=1 ) +# Build full release +mkdir release +( + cd release + # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before + # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM + ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DENABLE_DTRACE=OFF \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DFEATURE_SET="%{feature_set}" \ + -DCOMPILATION_COMMENT="%{compilation_comment_release}" \ + -DMYSQL_SERVER_SUFFIX="%{server_suffix}" \ + -DWITH_WSREP=1 \ + -DWSREP_VERSION="%{wsrep_version}" \ + -DWSREP_REVISION="%{wsrep_revision}" + echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG + make ${MAKE_JFLAG} VERBOSE=1 +) + +%if %runselftest + MTR_BUILD_THREAD=auto + export MTR_BUILD_THREAD + (cd release && make test-bt-fast || true) +%endif +popd +############################################################################## %install -cd $RPM_BUILD_DIR/mysql-%{compatver} +%if 0%{?compatlib} +( +cd $RPM_BUILD_DIR/%{name} # Install compat libs -%if 0%{?rhel} < 7 +# This must be done *before* the current libs are installed, for the "rm *.{a,la,so}" +%if 0%{?compatlib} == 16 for dir in mysql-%{compatver}/libmysql mysql-%{compatver}/libmysql_r ; do %else for dir in release/libmysql ; do @@ -301,17 +740,690 @@ install -m 644 mysql-%{compatver}/sql/share/charsets/* %{buildroot}/usr/share/my # Add libdir to linker install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf +) +%endif + +RBR=$RPM_BUILD_ROOT +MBD=$RPM_BUILD_DIR/%{name}/%{src_dir} +cd $MBD + +# Ensure that needed directories exists +install -d $RBR%{_sysconfdir}/{logrotate.d,init.d} +install -d $RBR%{mysqldatadir}/mysql +install -d $RBR%{_datadir}/mysql-test +install -d $RBR%{_datadir}/mysql/SELinux/RHEL4 +install -d $RBR%{_includedir} +install -d $RBR%{_libdir} +install -d $RBR%{_mandir} +install -d $RBR%{_sbindir} + +mkdir -p $RBR%{_sysconfdir}/my.cnf.d + +# Install all binaries +( + cd $MBD/release + make DESTDIR=$RBR install +) + +# For gcc builds, include libgcc.a in the devel subpackage (BUG 4921). Do +# this in a sub-shell to ensure we don't pollute the install environment +# with compiler bits. +( + PATH=${MYSQL_BUILD_PATH:-$PATH} + CC=${MYSQL_BUILD_CC:-${CC:-gcc}} + CFLAGS=${MYSQL_BUILD_CFLAGS:-${CFLAGS:-$RPM_OPT_FLAGS}} + if "${CC}" -v 2>&1 | grep '^gcc.version' >/dev/null 2>&1; then + libgcc=`${CC} ${CFLAGS} --print-libgcc-file` + if [ -f ${libgcc} ]; then + mkdir -p $RBR%{_libdir}/mysql + install -m 644 ${libgcc} $RBR%{_libdir}/mysql/libmygcc.a + echo "%{_libdir}/mysql/libmygcc.a" >>optional-files-devel + fi + fi +) + +# FIXME: at some point we should stop doing this and just install everything +# FIXME: directly into %%{_libdir}/mysql - perhaps at the same time as renaming +# FIXME: the shared libraries to use libmysql*-$major.$minor.so syntax +mv -v $RBR/%{_libdir}/*.a $RBR/%{_libdir}/mysql/ + +# Install logrotate and autostart +install -m 644 $MBD/release/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate.d/mysql +install -m 755 $MBD/release/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql + +# Create a symlink "rcmysql", pointing to the init.script. SuSE users +# will appreciate that, as all services usually offer this. +ln -sf %{_sysconfdir}/init.d/mysql $RBR%{_sbindir}/rcmysql + +# Create a wsrep_sst_rsync_wan symlink. +install -d $RBR%{_bindir} +ln -sf wsrep_sst_rsync $RBR%{_bindir}/wsrep_sst_rsync_wan + +# Touch the place where the my.cnf config file might be located +# Just to make sure it's in the file list and marked as a config file +touch $RBR%{_sysconfdir}/my.cnf +touch $RBR%{_sysconfdir}/wsrep.cnf + +# Install SELinux files in datadir +install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \ + $RBR%{_datadir}/mysql/SELinux/RHEL4 + +# Get the list of "_datadir" files, remove those that go into "libs-compat" +find $RBR%{_datadir}/mysql -type f -print | sed -e "s=$RBR==" \ + | fgrep -v "charsets-%{compatver}" | sort > $MBD/release/datadir.files + +%if %{WITH_TCMALLOC} +# Even though this is a shared library, put it under /usr/lib*/mysql, so it +# doesn't conflict with possible shared lib by the same name in /usr/lib*. See +# `mysql_config --variable=pkglibdir` and mysqld_safe for how this is used. +install -m 644 "%{malloc_lib_source}" \ + "$RBR%{_libdir}/mysql/%{malloc_lib_target}" +%endif + +# Remove man pages we explicitly do not want to package, avoids 'unpackaged +# files' warning. +# This has become obsolete: rm -f $RBR%%{_mandir}/man1/make_win_bin_dist.1* %check -%post -p /sbin/ldconfig +############################################################################## +# Post processing actions, i.e. when installed +############################################################################## + +%pre -n mysql-wsrep-server%{product_suffix} +# This is the code running at the beginning of a RPM upgrade action, +# before replacing the old files with the new ones. + +# ATTENTION: Parts of this are duplicated in the "triggerpostun" ! + +# There are users who deviate from the default file system layout. +# Check local settings to support them. +if [ -x %{_bindir}/my_print_defaults ] +then + mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'` + PID_FILE_PATT=`%{_bindir}/my_print_defaults server mysqld | grep '^--pid-file=' | sed -n 's/--pid-file=//p'` +fi +if [ -z "$mysql_datadir" ] +then + mysql_datadir=%{mysqldatadir} +fi +if [ -z "$PID_FILE_PATT" ] +then + PID_FILE_PATT="$mysql_datadir/*.pid" +fi + +# Check if we can safely upgrade. An upgrade is only safe if it's from one +# of our RPMs in the same version family. + +# Handle both ways of spelling the capability. +installed=`rpm -q --whatprovides mysql-server 2> /dev/null` +if [ $? -ne 0 -o -z "$installed" ]; then + installed=`rpm -q --whatprovides MySQL-server 2> /dev/null` +fi +if [ $? -eq 0 -a -n "$installed" ]; then + installed=`echo $installed | sed 's/\([^ ]*\) .*/\1/'` # Tests have shown duplicated package names + vendor=`rpm -q --queryformat='%{VENDOR}' "$installed" 2>&1` + version=`rpm -q --queryformat='%{VERSION}' "$installed" 2>&1` + myoldvendor='%{mysql_old_vendor}' + myvendor_2='%{mysql_vendor_2}' + myvendor='%{mysql_vendor}' + myversion='%{mysql_version}' + + old_family=`echo $version \ + | sed -n -e 's,^\([1-9][0-9]*\.[0-9][0-9]*\)\..*$,\1,p'` + new_family=`echo $myversion \ + | sed -n -e 's,^\([1-9][0-9]*\.[0-9][0-9]*\)\..*$,\1,p'` + + [ -z "$vendor" ] && vendor='' + [ -z "$old_family" ] && old_family="" + [ -z "$new_family" ] && new_family="" + + error_text= + if [ "$vendor" != "$myoldvendor" \ + -a "$vendor" != "$myvendor_2" \ + -a "$vendor" != "$myvendor" ]; then + error_text="$error_text +The current MySQL server package is provided by a different +vendor ($vendor) than $myoldvendor, $myvendor_2, or $myvendor. +Some files may be installed to different locations, including log +files and the service startup script in %{_sysconfdir}/init.d/. +" + fi + + if [ "$old_family" != "$new_family" ]; then + error_text="$error_text +Upgrading directly from MySQL $old_family to MySQL $new_family may not +be safe in all cases. A manual dump and restore using mysqldump is +recommended. It is important to review the MySQL manual's Upgrading +section for version-specific incompatibilities. +" + fi + + if [ -n "$error_text" ]; then + cat <&2 + +****************************************************************** +A MySQL server package ($installed) is installed. +$error_text +A manual upgrade is required. -%postun -p /sbin/ldconfig +- Ensure that you have a complete, working backup of your data and my.cnf + files +- Shut down the MySQL server cleanly +- Remove the existing MySQL packages. Usually this command will + list the packages you should remove: + rpm -qa | grep -i '^mysql-' + You may choose to use 'rpm --nodeps -ev ' to remove + the package which contains the mysqlclient shared library. The + library will be reinstalled by the MySQL-shared-compat package. +- Install the new MySQL packages supplied by $myvendor +- Ensure that the MySQL server is started +- Run the 'mysql_upgrade' program -%files +This is a brief description of the upgrade process. Important details +can be found in the MySQL manual, in the Upgrading section. +****************************************************************** +HERE + exit 1 + fi +fi + +# We assume that if there is exactly one ".pid" file, +# it contains the valid PID of a running MySQL server. +NR_PID_FILES=`ls -1 $PID_FILE_PATT 2>/dev/null | wc -l` +case $NR_PID_FILES in + 0 ) SERVER_TO_START='' ;; # No "*.pid" file == no running server + 1 ) SERVER_TO_START='true' ;; + * ) SERVER_TO_START='' # Situation not clear + SEVERAL_PID_FILES=true ;; +esac +# That logic may be debated: We might check whether it is non-empty, +# contains exactly one number (possibly a PID), and whether "ps" finds it. +# OTOH, if there is no such process, it means a crash without a cleanup - +# is that a reason not to start a new server after upgrade? + +STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER + +if [ -f $STATUS_FILE ]; then + echo "Some previous upgrade was not finished:" + ls -ld $STATUS_FILE + echo "Please check its status, then do" + echo " rm $STATUS_FILE" + echo "before repeating the MySQL upgrade." + exit 1 +elif [ -n "$SEVERAL_PID_FILES" ] ; then + echo "You have more than one PID file:" + ls -ld $PID_FILE_PATT + echo "Please check which one (if any) corresponds to a running server" + echo "and delete all others before repeating the MySQL upgrade." + exit 1 +fi + +NEW_VERSION=%{mysql_version}-%{release} + +# The "pre" section code is also run on a first installation, +# when there is no data directory yet. Protect against error messages. +if [ -d $mysql_datadir ] ; then + echo "MySQL RPM upgrade to version $NEW_VERSION" > $STATUS_FILE + echo "'pre' step running at `date`" >> $STATUS_FILE + echo >> $STATUS_FILE + fcount=`ls -ltr $mysql_datadir/*.err 2>/dev/null | wc -l` + if [ $fcount -gt 0 ] ; then + echo "ERR file(s):" >> $STATUS_FILE + ls -ltr $mysql_datadir/*.err >> $STATUS_FILE + echo >> $STATUS_FILE + echo "Latest 'Version' line in latest file:" >> $STATUS_FILE + grep '^Version' `ls -tr $mysql_datadir/*.err | tail -1` | \ + tail -1 >> $STATUS_FILE + echo >> $STATUS_FILE + fi + + if [ -n "$SERVER_TO_START" ] ; then + # There is only one PID file, race possibility ignored + echo "PID file:" >> $STATUS_FILE + ls -l $PID_FILE_PATT >> $STATUS_FILE + cat $PID_FILE_PATT >> $STATUS_FILE + echo >> $STATUS_FILE + echo "Server process:" >> $STATUS_FILE + ps -fp `cat $PID_FILE_PATT` >> $STATUS_FILE + echo >> $STATUS_FILE + echo "SERVER_TO_START=$SERVER_TO_START" >> $STATUS_FILE + else + # Take a note we checked it ... + echo "PID file:" >> $STATUS_FILE + ls -l $PID_FILE_PATT >> $STATUS_FILE 2>&1 + fi +fi + +# Shut down a previously installed server first +# Note we *could* make that depend on $SERVER_TO_START, but we rather don't, +# so a "stop" is attempted even if there is no PID file. +# (Maybe the "stop" doesn't work then, but we might fix that in itself.) +if [ -x %{_sysconfdir}/init.d/mysql ] ; then + %{_sysconfdir}/init.d/mysql stop > /dev/null 2>&1 + echo "Giving mysqld 5 seconds to exit nicely" + sleep 5 +fi + +%post -n mysql-wsrep-server%{product_suffix} +# This is the code running at the end of a RPM install or upgrade action, +# after the (new) files have been written. + +# ATTENTION: Parts of this are duplicated in the "triggerpostun" ! + +# There are users who deviate from the default file system layout. +# Check local settings to support them. +if [ -x %{_bindir}/my_print_defaults ] +then + mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'` +fi +if [ -z "$mysql_datadir" ] +then + mysql_datadir=%{mysqldatadir} +fi + +NEW_VERSION=%{mysql_version}-%{release} +STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER + +# ---------------------------------------------------------------------- +# Create data directory if needed, check whether upgrade or install +# ---------------------------------------------------------------------- +if [ ! -d $mysql_datadir ] ; then mkdir -m 755 $mysql_datadir; fi +if [ -f $STATUS_FILE ] ; then + SERVER_TO_START=`grep '^SERVER_TO_START=' $STATUS_FILE | cut -c17-` +else + SERVER_TO_START='' +fi +# echo "Analyzed: SERVER_TO_START=$SERVER_TO_START" +if [ ! -d $mysql_datadir/mysql ] ; then + mkdir $mysql_datadir/mysql $mysql_datadir/test + echo "MySQL RPM installation of version $NEW_VERSION" >> $STATUS_FILE +else + # If the directory exists, we may assume it is an upgrade. + echo "MySQL RPM upgrade to version $NEW_VERSION" >> $STATUS_FILE +fi + +# ---------------------------------------------------------------------- +# Make MySQL start/shutdown automatically when the machine does it. +# ---------------------------------------------------------------------- +# NOTE: This still needs to be debated. Should we check whether these links +# for the other run levels exist(ed) before the upgrade? +# use chkconfig on Enterprise Linux and newer SuSE releases +if [ -x /sbin/chkconfig ] ; then + /sbin/chkconfig --add mysql +# use insserv for older SuSE Linux versions +elif [ -x /sbin/insserv ] ; then + /sbin/insserv %{_sysconfdir}/init.d/mysql +fi + +# ---------------------------------------------------------------------- +# Create a MySQL user and group. Do not report any problems if it already +# exists. +# ---------------------------------------------------------------------- +groupadd -r %{mysqld_group} 2> /dev/null || true +useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" \ + -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true +# The user may already exist, make sure it has the proper group nevertheless +# (BUG#12823) +usermod -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true + +# ---------------------------------------------------------------------- +# Change permissions so that the user that will run the MySQL daemon +# owns all database files. +# ---------------------------------------------------------------------- +chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir + +# ---------------------------------------------------------------------- +# Initiate databases if needed +# ---------------------------------------------------------------------- +if ! grep '^MySQL RPM upgrade' $STATUS_FILE >/dev/null 2>&1 ; then + # Fix bug#45415: no "mysql_install_db" on an upgrade + # Do this as a negative to err towards more "install" runs + # rather than to miss one. + %{_bindir}/mysql_install_db --rpm --user=%{mysqld_user} +fi + +# ---------------------------------------------------------------------- +# Upgrade databases if needed would go here - but it cannot be automated yet +# ---------------------------------------------------------------------- + +# ---------------------------------------------------------------------- +# Change permissions again to fix any new files. +# ---------------------------------------------------------------------- +chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir + +# ---------------------------------------------------------------------- +# Fix permissions for the permission database so that only the user +# can read them. +# ---------------------------------------------------------------------- +chmod -R og-rw $mysql_datadir/mysql + +# ---------------------------------------------------------------------- +# install SELinux files - but don't override existing ones +# ---------------------------------------------------------------------- +SETARGETDIR=/etc/selinux/targeted/src/policy +SEDOMPROG=$SETARGETDIR/domains/program +SECONPROG=$SETARGETDIR/file_contexts/program +if [ -f /etc/redhat-release ] \ + && (grep -q "Red Hat Enterprise Linux .. release 4" /etc/redhat-release \ + || grep -q "CentOS release 4" /etc/redhat-release) ; then + echo + echo + echo 'Notes regarding SELinux on this platform:' + echo '=========================================' + echo + echo 'The default policy might cause server startup to fail because it is' + echo 'not allowed to access critical files. In this case, please update' + echo 'your installation.' + echo + echo 'The default policy might also cause inavailability of SSL related' + echo 'features because the server is not allowed to access /dev/random' + echo 'and /dev/urandom. If this is a problem, please do the following:' + echo + echo ' 1) install selinux-policy-targeted-sources from your OS vendor' + echo ' 2) add the following two lines to '$SEDOMPROG/mysqld.te':' + echo ' allow mysqld_t random_device_t:chr_file read;' + echo ' allow mysqld_t urandom_device_t:chr_file read;' + echo ' 3) cd to '$SETARGETDIR' and issue the following command:' + echo ' make load' + echo + echo +fi + +if [ -x sbin/restorecon ] ; then + sbin/restorecon -R var/lib/mysql +fi + +# Was the server running before the upgrade? If so, restart the new one. +if [ "$SERVER_TO_START" = "true" ] ; then + # Restart in the same way that mysqld will be started normally. + if [ -x %{_sysconfdir}/init.d/mysql ] ; then + %{_sysconfdir}/init.d/mysql start + echo "Giving mysqld 5 seconds to start" + sleep 5 + fi +fi + +# Collect an upgrade history ... +echo "Upgrade/install finished at `date`" >> $STATUS_FILE +echo >> $STATUS_FILE +echo "=====" >> $STATUS_FILE +STATUS_HISTORY=$mysql_datadir/RPM_UPGRADE_HISTORY +cat $STATUS_FILE >> $STATUS_HISTORY +mv -f $STATUS_FILE ${STATUS_FILE}-LAST # for "triggerpostun" + + +#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." + +%preun -n mysql-wsrep-server%{product_suffix} + +# Which '$1' does this refer to? Fedora docs have info: +# " ... a count of the number of versions of the package that are installed. +# Action Count +# Install the first time 1 +# Upgrade 2 or higher (depending on the number of versions installed) +# Remove last version of package 0 " +# +# http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s04s05.html + +if [ $1 = 0 ] ; then + # Stop MySQL before uninstalling it + if [ -x %{_sysconfdir}/init.d/mysql ] ; then + %{_sysconfdir}/init.d/mysql stop > /dev/null + # Remove autostart of MySQL + # use chkconfig on Enterprise Linux and newer SuSE releases + if [ -x /sbin/chkconfig ] ; then + /sbin/chkconfig --del mysql + # For older SuSE Linux versions + elif [ -x /sbin/insserv ] ; then + /sbin/insserv -r %{_sysconfdir}/init.d/mysql + fi + fi +fi + +# We do not remove the mysql user since it may still own a lot of +# database files. + +%triggerpostun -n mysql-wsrep-server%{product_suffix} --MySQL-server-community + +# Setup: We renamed this package, so any existing "server-community" +# package will be removed when this "server" is installed. +# Problem: RPM will first run the "pre" and "post" sections of this script, +# and only then the "preun" of that old community server. +# But this "preun" includes stopping the server and uninstalling the service, +# "chkconfig --del mysql" which removes the symlinks to the start script. +# Solution: *After* the community server got removed, restart this server +# and re-install the service. +# +# For information about triggers in spec files, see the Fedora docs: +# http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch10s02.html +# For all details of this code, see the "pre" and "post" sections. + +# There are users who deviate from the default file system layout. +# Check local settings to support them. +if [ -x %{_bindir}/my_print_defaults ] +then + mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'` +fi +if [ -z "$mysql_datadir" ] +then + mysql_datadir=%{mysqldatadir} +fi + +NEW_VERSION=%{mysql_version}-%{release} +STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER-LAST # Note the difference! +STATUS_HISTORY=$mysql_datadir/RPM_UPGRADE_HISTORY + +if [ -f $STATUS_FILE ] ; then + SERVER_TO_START=`grep '^SERVER_TO_START=' $STATUS_FILE | cut -c17-` +else + # This should never happen, but let's be prepared + SERVER_TO_START='' +fi +echo "Analyzed: SERVER_TO_START=$SERVER_TO_START" + +if [ -x /sbin/chkconfig ] ; then + /sbin/chkconfig --add mysql +# use insserv for older SuSE Linux versions +elif [ -x /sbin/insserv ] ; then + /sbin/insserv %{_sysconfdir}/init.d/mysql +fi + +# Was the server running before the upgrade? If so, restart the new one. +if [ "$SERVER_TO_START" = "true" ] ; then + # Restart in the same way that mysqld will be started normally. + if [ -x %{_sysconfdir}/init.d/mysql ] ; then + %{_sysconfdir}/init.d/mysql start + echo "Giving mysqld 5 seconds to start" + sleep 5 + fi +fi + +echo "Trigger 'postun --community' finished at `date`" >> $STATUS_HISTORY +echo >> $STATUS_HISTORY +echo "=====" >> $STATUS_HISTORY + + +# ---------------------------------------------------------------------- +# Clean up the BuildRoot after build is done +# ---------------------------------------------------------------------- +%clean +[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] \ + && rm -rf $RPM_BUILD_ROOT; + +############################################################################## +# Files section +############################################################################## + +%files -n mysql-wsrep%{product_suffix} +# Intentionally empty - this is a pure meta package. + +# ---------------------------------------------------------------------------- +%files -n mysql-wsrep-server%{product_suffix} -f %{src_dir}/release/support-files/plugins.files -f %{src_dir}/release/datadir.files +%defattr(-,root,root,0755) + +%if %{defined license_files_server} +%doc %{license_files_server} +%endif +%doc %{src_dir}/Docs/ChangeLog +%doc %{src_dir}/release/Docs/INFO_SRC* +%doc %{src_dir}/release/Docs/INFO_BIN* +%doc %{src_dir}/release/support-files/my-*.cnf +%doc %{src_dir}/Docs/README-wsrep +%doc %{src_dir}/release/support-files/wsrep.cnf +%doc %{src_dir}/release/support-files/wsrep_notify + +%if 0%{?commercial} +%doc %attr(644, root, root) %{_infodir}/mysql.info* +%endif + +%doc %attr(644, root, man) %{_mandir}/man1/innochecksum.1* +%doc %attr(644, root, man) %{_mandir}/man1/my_print_defaults.1* +%doc %attr(644, root, man) %{_mandir}/man1/myisam_ftdump.1* +%doc %attr(644, root, man) %{_mandir}/man1/myisamchk.1* +%doc %attr(644, root, man) %{_mandir}/man1/myisamlog.1* +%doc %attr(644, root, man) %{_mandir}/man1/myisampack.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_convert_table_format.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_fix_extensions.1* +%doc %attr(644, root, man) %{_mandir}/man8/mysqld.8* +%doc %attr(644, root, man) %{_mandir}/man1/mysqld_multi.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqld_safe.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqldumpslow.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_install_db.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_plugin.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_secure_installation.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_setpermission.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_upgrade.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlhotcopy.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlman.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql.server.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqltest.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_tzinfo_to_sql.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlbug.1* +%doc %attr(644, root, man) %{_mandir}/man1/perror.1* +%doc %attr(644, root, man) %{_mandir}/man1/replace.1* +%doc %attr(644, root, man) %{_mandir}/man1/resolve_stack_dump.1* +%doc %attr(644, root, man) %{_mandir}/man1/resolveip.1* + +%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf +%ghost %config(noreplace,missingok) %{_sysconfdir}/wsrep.cnf +%dir %{_sysconfdir}/my.cnf.d + +%attr(755, root, root) %{_bindir}/innochecksum +%attr(755, root, root) %{_bindir}/my_print_defaults +%attr(755, root, root) %{_bindir}/myisam_ftdump +%attr(755, root, root) %{_bindir}/myisamchk +%attr(755, root, root) %{_bindir}/myisamlog +%attr(755, root, root) %{_bindir}/myisampack +%attr(755, root, root) %{_bindir}/mysql_convert_table_format +%attr(755, root, root) %{_bindir}/mysql_fix_extensions +%attr(755, root, root) %{_bindir}/mysql_install_db +%attr(755, root, root) %{_bindir}/mysql_plugin +%attr(755, root, root) %{_bindir}/mysql_secure_installation +%attr(755, root, root) %{_bindir}/mysql_setpermission +%attr(755, root, root) %{_bindir}/mysql_tzinfo_to_sql +%attr(755, root, root) %{_bindir}/mysql_upgrade +%attr(755, root, root) %{_bindir}/mysql_zap +%attr(755, root, root) %{_bindir}/mysqlbug +%attr(755, root, root) %{_bindir}/mysqld_multi +%attr(755, root, root) %{_bindir}/mysqld_safe +%attr(755, root, root) %{_bindir}/mysqldumpslow +%attr(755, root, root) %{_bindir}/mysqlhotcopy +%attr(755, root, root) %{_bindir}/mysqltest +%attr(755, root, root) %{_bindir}/perror +%attr(755, root, root) %{_bindir}/replace +%attr(755, root, root) %{_bindir}/resolve_stack_dump +%attr(755, root, root) %{_bindir}/resolveip +%attr(755, root, root) %{_bindir}/wsrep_sst_common +%attr(755, root, root) %{_bindir}/wsrep_sst_mysqldump +%attr(755, root, root) %{_bindir}/wsrep_sst_rsync +%attr( - , root, root) %{_bindir}/wsrep_sst_rsync_wan +%attr(755, root, root) %{_bindir}/wsrep_sst_xtrabackup +%attr(755, root, root) %{_bindir}/wsrep_sst_xtrabackup-v2 + +%attr(755, root, root) %{_sbindir}/mysqld +%attr(755, root, root) %{_sbindir}/mysqld-debug +%attr( - , root, root) %{_sbindir}/rcmysql +%attr(755, root, root) %{_libdir}/mysql/plugin/daemon_example.ini + +%if %{WITH_TCMALLOC} +%attr(755, root, root) %{_libdir}/mysql/%{malloc_lib_target} +%endif + +%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql +%attr(755, root, root) %{_sysconfdir}/init.d/mysql +# %%attr(755, root, root) %%{_datadir}/mysql/ ## See "-f datadir.files" at section top + +# ---------------------------------------------------------------------------- +%files -n mysql-wsrep-client%{product_suffix} + +%defattr(-, root, root, 0755) +%attr(755, root, root) %{_bindir}/msql2mysql +%attr(755, root, root) %{_bindir}/mysql +%attr(755, root, root) %{_bindir}/mysql_find_rows +%attr(755, root, root) %{_bindir}/mysql_waitpid +%attr(755, root, root) %{_bindir}/mysqlaccess +# XXX: This should be moved to %%{_sysconfdir} +%attr(644, root, root) %{_bindir}/mysqlaccess.conf +%attr(755, root, root) %{_bindir}/mysqladmin +%attr(755, root, root) %{_bindir}/mysqlbinlog +%attr(755, root, root) %{_bindir}/mysqlcheck +%attr(755, root, root) %{_bindir}/mysqldump +%attr(755, root, root) %{_bindir}/mysqlimport +%attr(755, root, root) %{_bindir}/mysqlshow +%attr(755, root, root) %{_bindir}/mysqlslap + +%doc %attr(644, root, man) %{_mandir}/man1/msql2mysql.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_find_rows.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_waitpid.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlaccess.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqladmin.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlbinlog.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlcheck.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqldump.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlimport.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlshow.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlslap.1* + +# ---------------------------------------------------------------------------- +%files -n mysql-wsrep-devel%{product_suffix} -f %{src_dir}/optional-files-devel +%defattr(-, root, root, 0755) +%doc %attr(644, root, man) %{_mandir}/man1/comp_err.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_config.1* +%attr(755, root, root) %{_bindir}/mysql_config +%dir %attr(755, root, root) %{_includedir}/mysql +%dir %attr(755, root, root) %{_libdir}/mysql +%{_includedir}/mysql/* +%{_datadir}/aclocal/mysql.m4 +%{_libdir}/mysql/libmysqlclient.a +%{_libdir}/mysql/libmysqlclient_r.a +%{_libdir}/mysql/libmysqlservices.a + +# ---------------------------------------------------------------------------- +%files -n mysql-wsrep-shared%{product_suffix} +%defattr(-, root, root, 0755) +# Shared libraries (omit for architectures that don't support them) +%{_libdir}/libmysql*.so +%{_libdir}/libmysql*.so.%{currentlib}* + +%post -n mysql-wsrep-shared%{product_suffix} +/sbin/ldconfig + +%postun -n mysql-wsrep-shared%{product_suffix} +/sbin/ldconfig + +# ---------------------------------------------------------------------------- +%if 0%{?compatlib} +%files -n mysql-wsrep-libs-compat%{product_suffix} %defattr(-, root, root, -) -%doc %{?license_files_server} +%doc %{?compat_license_files_server} %dir %attr(755, root, root) %{_libdir}/mysql %attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf %{_libdir}/mysql/libmysqlclient.so.%{compatlib} @@ -322,40 +1434,930 @@ echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch} %dir %attr(755, root, root) %{_datadir}/mysql/charsets-%{compatver}/ %attr(644, root, root) %{_datadir}/mysql/charsets-%{compatver}/* +%post -n mysql-wsrep-libs-compat%{product_suffix} +/sbin/ldconfig +%postun -n mysql-wsrep-libs-compat%{product_suffix} +/sbin/ldconfig +%endif + +# ---------------------------------------------------------------------------- +%files -n mysql-wsrep-test%{product_suffix} +%defattr(-, root, root, 0755) +%attr(-, root, root) %{_datadir}/mysql-test +%attr(755, root, root) %{_bindir}/mysql_client_test +%doc %attr(644, root, man) %{_mandir}/man1/mysql_client_test.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql-stress-test.pl.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql-test-run.pl.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_client_test_embedded.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqltest_embedded.1* + +############################################################################## +# The spec file changelog only includes changes made to the spec file +# itself - note that they must be ordered by date (important when +# merging BK trees) +############################################################################## %changelog -* Tue Sep 08 2015 Joerg Bruehe -- Finish the code for RHEL 7, using MySQL 5.5.45 as published by Oracle. -- Severe bug: Path for "charsets" files did not match the patch, fix it. -- This is in the 5.5 branch, fix the spec file version. - -* Thu Sep 03 2015 Joerg Bruehe -- Change the name from "mysql-libs-compat" to "mysql-wsrep-libs-compat". -- Change the compatibility version for RHEL 6 from MySQL 5.1.72 to 5.1.73. -- Start adding settings for RHEL 7, to replace the pre-installed "mariadb-libs 5.5.37". - -* Tue Apr 28 2015 Joerg Bruehe -- Improve the dependency / conflicts settings. -- Drop the name component "community", 3rd party builds don't use it. - -* Tue Mar 10 2015 Joerg Bruehe -- Sometimes, "libmysqlclient.so" needs the files in "/usr/share/mysql/charsets/", - so the package should better contain them, but have the path name contain the - version number to make it independent of other packages. - -* Mon Feb 09 2015 Joerg Bruehe -- "g++: command not found" on RedHat 5 + 6, added "BuildRequires: gcc-c++". -- "time" is a RedHat-only package, not needed to build on SuSE. - -* Fri Feb 06 2015 Joerg Bruehe -- Add code to identify RedHat 5 during build, "rhel" is not predefined there. -- Start adding "conflicts" directives to get rid of other MySQL library RPMs. -- Try with "CXX=g++". - -* Thu Feb 05 2015 Joerg Bruehe -- This spec file handles the "compat" RPM for the "libmysqlclient.so" only. - It is created as a subset of the overall MySQL 5.6.23 spec file - (file "packaging/rpm-oel/mysql.spec.in" in the source tree), - see that file's "changelog" section for its history. -- Add "CC=gcc CXX=gcc" as used in 5.0 and 5.1 builds (missing in that 5.6.23 spec file) +* Tue Sep 15 2015 Joerg Bruehe +- Fixed the issue with "-f plugins.files", switched back to that approach. + The base cause was a wrong use of "%%setup" for this multi-source build. +- Let the meta package of client and server be the main package, not a subpackage. +- Use the "%%files ... -f LIST_FILE" mechanism for "%%{_datadir}", it is the + best way to get rid of files that go into "libs-compat" only. + +* Mon Sep 14 2015 Joerg Bruehe +- The mechanism "%%files ... -f LIST_FILE" doesn't work, so the plugin files + must be listed directly in the section "%%files -n mysql-wsrep-server". + +* Fri Sep 11 2015 Joerg Bruehe +- Integrate the separate "libs-compat" spec file with the general "mysql-wsrep", + so that "libs-compat" becomes just another subpackage. +- Change history of the separate "libs-compat" spec file, all by this author in 2015: +- Thu Sep 10: +- - Remove code to deal with RHEL 5, there will not be any support for that + obsolete platform. +- - For MySQl 5.5 / 5.6 / 5.7, there is no need for "libs-compat" on RHEL 7 + because both are SO version 18; turn description into comment. +- Tue Sep 08: +- - Finish the code for RHEL 7, using MySQL 5.5.45 as published by Oracle. +- - Severe bug: Path for "charsets" files did not match the patch, fix it. +- - This is in the 5.5 branch, fix the spec file version. +- Thu Sep 03 2015 Joerg Bruehe +- - Change the name from "mysql-libs-compat" to "mysql-wsrep-libs-compat". +- - Change the compatibility version for RHEL 6 from MySQL 5.1.72 to 5.1.73. +- - Start adding settings for RHEL 7, to replace the pre-installed "mariadb-libs 5.5.37". +- Tue Apr 28: +- - Improve the dependency / conflicts settings. +- - Drop the name component "community", 3rd party builds don't use it. +- Tue Mar 10: +- - Sometimes, "libmysqlclient.so" needs the files in "/usr/share/mysql/charsets/", + so the package should better contain them, but have the path name contain the + version number to make it independent of other packages. +- Mon Feb 09: +- - "g++: command not found" on RedHat 5 + 6, added "BuildRequires: gcc-c++". +- - "time" is a RedHat-only package, not needed to build on SuSE. +- Fri Feb 06: +- - Add code to identify RedHat 5 during build, "rhel" is not predefined there. +- - Start adding "conflicts" directives to get rid of other MySQL library RPMs. +- - Try with "CXX=g++". +- Thu Feb 05: +- - This spec file handles the "compat" RPM for the "libmysqlclient.so" only. + It is created as a subset of the overall MySQL 5.6.23 spec file + (file "packaging/rpm-oel/mysql.spec.in" in the source tree), + see that file's "changelog" section for its history. +- - Add "CC=gcc CXX=gcc" as used in 5.0 and 5.1 builds (missing in that 5.6.23 spec file) + +* Sat Feb 7 2015 Teemu Ollakka +- Merged OBS changes from 5.6 branch + +* Thu Jan 29 2015 Joerg Bruehe +- Add a meta-package "mysql-wsrep" that requires both "server" and "client". +- Fix the fall-back definition of "dist", it must start with a period. + +* Mon Jan 26 2015 Joerg Bruehe +- Allow "rpmlint", but suppress "post-build-checks" (fail on SuSE 12 + 13). +- Improve handling of undefined "%%{dist}". +- Fix wrong changelog dates, to get rid of warnings about "bogus date". +- Escape percent signs in changelog, to get rid of "rpmlint" warnings. + +* Tue Jan 20 2015 Teemu Ollakka + +- Reworked to build wsrep patched packages exclusively +- OBS compatible + +* Wed Jul 02 2014 Bjorn Munch +- Disable dtrace unconditionally, breaks after we install Oracle dtrace + +* Wed Oct 30 2013 Balasubramanian Kandasamy +- Removed non gpl file docs/mysql.info from community packages + +* Mon Sep 09 2013 Balasubramanian Kandasamy +- Updated logic to get the correct count of PID files + +* Fri Aug 16 2013 Balasubramanian Kandasamy +- Added provides lowercase mysql tags + +* Wed Jun 26 2013 Balasubramanian Kandasamy +- Cleaned up spec file to resolve rpm dependencies. + +* Tue Jul 24 2012 Joerg Bruehe + +- Add a macro "runselftest": + if set to 1 (default), the test suite will be run during the RPM build; + this can be oveeridden via the command line by adding + --define "runselftest 0" + Failures of the test suite will NOT make the RPM build fail! + +* Mon Jun 11 2012 Joerg Bruehe + +- Make sure newly added "SPECIFIC-ULN/" directory does not disturb packaging. + +* Wed Sep 28 2011 Joerg Bruehe + +- Fix duplicate mentioning of "mysql_plugin" and its manual page, + it is better to keep alphabetic order in the files list (merging!). + +* Wed Sep 14 2011 Joerg Bruehe + +- Let the RPM capabilities ("obsoletes" etc) ensure that an upgrade may replace + the RPMs of any configuration (of the current or the preceding release series) + by the new ones. This is done by not using the implicitly generated capabilities + (which include the configuration name) and relying on more generic ones which + just list the function ("server", "client", ...). + The implicit generation cannot be prevented, so all these capabilities must be + explicitly listed in "Obsoletes:" + +* Tue Sep 13 2011 Jonathan Perkin + +- Add support for Oracle Linux 6 and Red Hat Enterprise Linux 6. Due to + changes in RPM behaviour ($RPM_BUILD_ROOT is removed prior to install) + this necessitated a move of the libmygcc.a installation to the install + phase, which is probably where it belonged in the first place. + +* Tue Sep 13 2011 Joerg Bruehe + +- "make_win_bin_dist" and its manual are dropped, cmake does it different. + +* Thu Sep 08 2011 Daniel Fischer + +- Add mysql_plugin man page. + +* Tue Aug 30 2011 Joerg Bruehe + +- Add the manual page for "mysql_plugin" to the server package. + +* Fri Aug 19 2011 Joerg Bruehe + +- Null-upmerge the fix of bug#37165: This spec file is not affected. +- Replace "/var/lib/mysql" by the spec file variable "%%{mysqldatadir}". + +* Fri Aug 12 2011 Daniel Fischer + +- Source plugin library files list from cmake-generated file. + +* Mon Jul 25 2011 Chuck Bell + +- Added the mysql_plugin client - enables or disables plugins. + +* Thu Jul 21 2011 Sunanda Menon + +- Fix bug#12561297: Added the MySQL embedded binary + +* Thu Jul 07 2011 Joerg Bruehe + +- Fix bug#45415: "rpm upgrade recreates test database" + Let the creation of the "test" database happen only during a new installation, + not in an RPM upgrade. + This affects both the "mkdir" and the call of "mysql_install_db". + +* Thu Feb 10 2011 Joerg Bruehe + +- Fix bug#56581: If an installation deviates from the default file locations + ("datadir" and "pid-file"), the mechanism to detect a running server (on upgrade) + should still work, and use these locations. + The problem was that the fix for bug#27072 did not check for local settings. + +* Mon Jan 31 2011 Joerg Bruehe + +- Install the new "manifest" files: "INFO_SRC" and "INFO_BIN". + +* Tue Nov 23 2010 Jonathan Perkin + +- EXCEPTIONS-CLIENT has been deleted, remove it from here too +- Support MYSQL_BUILD_MAKE_JFLAG environment variable for passing + a '-j' argument to make. + +* Mon Nov 1 2010 Georgi Kodinov + +- Added test authentication (WL#1054) plugin binaries + +* Wed Oct 6 2010 Georgi Kodinov + +- Added example external authentication (WL#1054) plugin binaries + +* Wed Aug 11 2010 Joerg Bruehe + +- With a recent spec file cleanup, names have changed: A "-community" part was dropped. + Reflect that in the "Obsoletes" specifications. +- Add a "triggerpostun" to handle the uninstall of the "-community" server RPM. +- This fixes bug#55015 "MySQL server is not restarted properly after RPM upgrade". + +* Tue Jun 15 2010 Joerg Bruehe + +- Change the behaviour on installation and upgrade: + On installation, do not autostart the server. + *Iff* the server was stopped before the upgrade is started, this is taken as a + sign the administrator is handling that manually, and so the new server will + not be started automatically at the end of the upgrade. + The start/stop scripts will still be installed, so the server will be started + on the next machine boot. + This is the 5.5 version of fixing bug#27072 (RPM autostarting the server). + +* Tue Jun 1 2010 Jonathan Perkin + +- Implement SELinux checks from distribution-specific spec file. + +* Wed May 12 2010 Jonathan Perkin + +- Large number of changes to build using CMake +- Introduce distribution-specific RPMs +- Drop debuginfo, build all binaries with debug/symbols +- Remove __os_install_post, use native macro +- Remove _unpackaged_files_terminate_build, make it an error to have + unpackaged files +- Remove cluster RPMs + +* Wed Mar 24 2010 Joerg Bruehe + +- Add "--with-perfschema" to the configure options. + +* Mon Mar 22 2010 Joerg Bruehe + +- User "usr/lib*" to allow for both "usr/lib" and "usr/lib64", + mask "rmdir" return code 1. +- Remove "ha_example.*" files from the list, they aren't built. + +* Wed Mar 17 2010 Joerg Bruehe + +- Fix a wrong path name in handling the debug plugins. + +* Wed Mar 10 2010 Joerg Bruehe + +- Take the result of the debug plugin build and put it into the optimized tree, + so that it becomes part of the final installation; + include the files in the packlist. Part of the fixes for bug#49022. + +* Mon Mar 01 2010 Joerg Bruehe + +- Set "Oracle and/or its affiliates" as the vendor and copyright owner, + accept upgrading from packages showing MySQL or Sun as vendor. + +* Fri Feb 12 2010 Joerg Bruehe + +- Formatting changes: + Have a consistent structure of separator lines and of indentation + (8 leading blanks => tab). +- Introduce the variable "src_dir". +- Give the environment variables "MYSQL_BUILD_CC(CXX)" precedence + over "CC" ("CXX"). +- Drop the old "with_static" argument analysis, this is not supported + in 5.1 since ages. +- Introduce variables to control the handlers individually, as well + as other options. +- Use the new "--with-plugin" notation for the table handlers. +- Drop handling "/etc/rc.d/init.d/mysql", the switch to "/etc/init.d/mysql" + was done back in 2002 already. +- Make "--with-zlib-dir=bundled" the default, add an option to disable it. +- Add missing manual pages to the file list. +- Improve the runtime check for "libgcc.a", protect it against being tried + with the Intel compiler "icc". + +* Mon Jan 11 2010 Joerg Bruehe + +- Change RPM file naming: + - Suffix like "-m2", "-rc" becomes part of version as "_m2", "_rc". + - Release counts from 1, not 0. + +* Wed Dec 23 2009 Joerg Bruehe + +- The "semisync" plugin file name has lost its introductory "lib", + adapt the file lists for the subpackages. + This is a part missing from the fix for bug#48351. +- Remove the "fix_privilege_tables" manual, it does not exist in 5.5 + (and likely, the whole script will go, too). + +* Mon Nov 16 2009 Joerg Bruehe + +- Fix some problems with the directives around "tcmalloc" (experimental), + remove erroneous traces of the InnoDB plugin (that is 5.1 only). + +* Fri Oct 09 2009 Magnus Blaudd + +- Removed mysql_fix_privilege_tables + +* Fri Oct 02 2009 Alexander Nozdrin + +- "mysqlmanager" got removed from version 5.4, all references deleted. + +* Fri Aug 28 2009 Joerg Bruehe + +- Merge up from 5.1 to 5.4: Remove handling for the InnoDB plugin. + +* Thu Aug 27 2009 Joerg Bruehe + +- This version does not contain the "Instance manager", "mysqlmanager": + Remove it from the spec file so that packaging succeeds. + +* Mon Aug 24 2009 Jonathan Perkin + +- Add conditionals for bundled zlib and innodb plugin + +* Fri Aug 21 2009 Jonathan Perkin + +- Install plugin libraries in appropriate packages. +- Disable libdaemon_example and ftexample plugins. + +* Thu Aug 20 2009 Jonathan Perkin + +- Update variable used for mysql-test suite location to match source. + +* Fri Nov 07 2008 Joerg Bruehe + +- Correct yesterday's fix, so that it also works for the last flag, + and fix a wrong quoting: un-quoted quote marks must not be escaped. + +* Thu Nov 06 2008 Kent Boortz + +- Removed "mysql_upgrade_shell" +- Removed some copy/paste between debug and normal build + +* Thu Nov 06 2008 Joerg Bruehe + +- Modify CFLAGS and CXXFLAGS such that a debug build is not optimized. + This should cover both gcc and icc flags. Fixes bug#40546. + +* Fri Aug 29 2008 Kent Boortz + +- Removed the "Federated" storage engine option, and enabled in all + +* Tue Aug 26 2008 Joerg Bruehe + +- Get rid of the "warning: Installed (but unpackaged) file(s) found:" + Some generated files aren't needed in RPMs: + - the "sql-bench/" subdirectory + Some files were missing: + - /usr/share/aclocal/mysql.m4 ("devel" subpackage) + - Manual "mysqlbug" ("server" subpackage) + - Program "innochecksum" and its manual ("server" subpackage) + - Manual "mysql_find_rows" ("client" subpackage) + - Script "mysql_upgrade_shell" ("client" subpackage) + - Program "ndb_cpcd" and its manual ("ndb-extra" subpackage) + - Manuals "ndb_mgm" + "ndb_restore" ("ndb-tools" subpackage) + +* Mon Mar 31 2008 Kent Boortz + +- Made the "Federated" storage engine an option +- Made the "Cluster" storage engine and sub packages an option + +* Wed Mar 19 2008 Joerg Bruehe + +- Add the man pages for "ndbd" and "ndb_mgmd". + +* Mon Feb 18 2008 Timothy Smith + +- Require a manual upgrade if the alread-installed mysql-server is + from another vendor, or is of a different major version. + +* Wed May 02 2007 Joerg Bruehe + +- "ndb_size.tmpl" is not needed any more, + "man1/mysql_install_db.1" lacked the trailing '*'. + +* Sat Apr 07 2007 Kent Boortz + +- Removed man page for "mysql_create_system_tables" + +* Wed Mar 21 2007 Daniel Fischer + +- Add debug server. + +* Mon Mar 19 2007 Daniel Fischer + +- Remove Max RPMs; the server RPMs contain a mysqld compiled with all + features that previously only were built into Max. + +* Fri Mar 02 2007 Joerg Bruehe + +- Add several man pages for NDB which are now created. + +* Fri Jan 05 2007 Kent Boortz + +- Put back "libmygcc.a", found no real reason it was removed. + +- Add CFLAGS to gcc call with --print-libgcc-file, to make sure the + correct "libgcc.a" path is returned for the 32/64 bit architecture. + +* Mon Dec 18 2006 Joerg Bruehe + +- Fix the move of "mysqlmanager" to section 8: Directory name was wrong. + +* Thu Dec 14 2006 Joerg Bruehe + +- Include the new man pages for "my_print_defaults" and "mysql_tzinfo_to_sql" + in the server RPM. +- The "mysqlmanager" man page got moved from section 1 to 8. + +* Thu Nov 30 2006 Joerg Bruehe + +- Call "make install" using "benchdir_root=%%{_datadir}", + because that is affecting the regression test suite as well. + +* Thu Nov 16 2006 Joerg Bruehe + +- Explicitly note that the "MySQL-shared" RPMs (as built by MySQL AB) + replace "mysql-shared" (as distributed by SuSE) to allow easy upgrading + (bug#22081). + +* Mon Nov 13 2006 Joerg Bruehe + +- Add "--with-partition" to all server builds. + +- Use "--report-features" in one test run per server build. + +* Tue Aug 15 2006 Joerg Bruehe + +- The "max" server is removed from packages, effective from 5.1.12-beta. + Delete all steps to build, package, or install it. + +* Mon Jul 10 2006 Joerg Bruehe + +- Fix a typing error in the "make" target for the Perl script to run the tests. + +* Tue Jul 04 2006 Joerg Bruehe + +- Use the Perl script to run the tests, because it will automatically check + whether the server is configured with SSL. + +* Tue Jun 27 2006 Joerg Bruehe + +- move "mysqldumpslow" from the client RPM to the server RPM (bug#20216) + +- Revert all previous attempts to call "mysql_upgrade" during RPM upgrade, + there are some more aspects which need to be solved before this is possible. + For now, just ensure the binary "mysql_upgrade" is delivered and installed. + +* Thu Jun 22 2006 Joerg Bruehe + +- Close a gap of the previous version by explicitly using + a newly created temporary directory for the socket to be used + in the "mysql_upgrade" operation, overriding any local setting. + +* Tue Jun 20 2006 Joerg Bruehe + +- To run "mysql_upgrade", we need a running server; + start it in isolation and skip password checks. + +* Sat May 20 2006 Kent Boortz + +- Always compile for PIC, position independent code. + +* Wed May 10 2006 Kent Boortz + +- Use character set "all" when compiling with Cluster, to make Cluster + nodes independent on the character set directory, and the problem + that two RPM sub packages both wants to install this directory. + +* Mon May 01 2006 Kent Boortz + +- Use "./libtool --mode=execute" instead of searching for the + executable in current directory and ".libs". + +* Fri Apr 28 2006 Kent Boortz + +- Install and run "mysql_upgrade" + +* Wed Apr 12 2006 Jim Winstead + +- Remove sql-bench, and MySQL-bench RPM (will be built as an independent + project from the mysql-bench repository) + +* Tue Apr 11 2006 Jim Winstead + +- Remove old mysqltestmanager and related programs +* Sat Apr 01 2006 Kent Boortz + +- Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS + +* Wed Mar 08 2006 Kent Boortz + +- Changed product name from "Community Edition" to "Community Server" + +* Mon Mar 06 2006 Kent Boortz + +- Fast mutexes is now disabled by default, but should be + used in Linux builds. + +* Mon Feb 20 2006 Kent Boortz + +- Reintroduced a max build +- Limited testing of 'debug' and 'max' servers +- Berkeley DB only in 'max' + +* Mon Feb 13 2006 Joerg Bruehe + +- Use "-i" on "make test-force"; + this is essential for later evaluation of this log file. + +* Thu Feb 09 2006 Kent Boortz + +- Pass '-static' to libtool, link static with our own libraries, dynamic + with system libraries. Link with the bundled zlib. + +* Wed Feb 08 2006 Kristian Nielsen + +- Modified RPM spec to match new 5.1 debug+max combined community packaging. + +* Sun Dec 18 2005 Kent Boortz + +- Added "client/mysqlslap" + +* Mon Dec 12 2005 Rodrigo Novo + +- Added zlib to the list of (static) libraries installed +- Added check against libtool wierdness (WRT: sql/mysqld || sql/.libs/mysqld) +- Compile MySQL with bundled zlib +- Fixed %%packager name to "MySQL Production Engineering Team" + +* Mon Dec 05 2005 Joerg Bruehe + +- Avoid using the "bundled" zlib on "shared" builds: + As it is not installed (on the build system), this gives dependency + problems with "libtool" causing the build to fail. + (Change was done on Nov 11, but left uncommented.) + +* Tue Nov 22 2005 Joerg Bruehe + +- Extend the file existence check for "init.d/mysql" on un-install + to also guard the call to "insserv"/"chkconfig". + +* Thu Oct 27 2005 Lenz Grimmer + +- added more man pages + +* Wed Oct 19 2005 Kent Boortz + +- Made yaSSL support an option (off by default) + +* Wed Oct 19 2005 Kent Boortz + +- Enabled yaSSL support + +* Sat Oct 15 2005 Kent Boortz + +- Give mode arguments the same way in all places +- Moved copy of mysqld.a to "standard" build, but + disabled it as we don't do embedded yet in 5.0 + +* Fri Oct 14 2005 Kent Boortz + +- For 5.x, always compile with --with-big-tables +- Copy the config.log file to location outside + the build tree + +* Fri Oct 14 2005 Kent Boortz + +- Removed unneeded/obsolete configure options +- Added archive engine to standard server +- Removed the embedded server from experimental server +- Changed suffix "-Max" => "-max" +- Changed comment string "Max" => "Experimental" + +* Thu Oct 13 2005 Lenz Grimmer + +- added a usermod call to assign a potential existing mysql user to the + correct user group (BUG#12823) +- Save the perror binary built during Max build so it supports the NDB + error codes (BUG#13740) +- added a separate macro "mysqld_group" to be able to define the + user group of the mysql user seperately, if desired. + +* Thu Sep 29 2005 Lenz Grimmer + +- fixed the removing of the RPM_BUILD_ROOT in the %%clean section (the + $RBR variable did not get expanded, thus leaving old build roots behind) + +* Thu Aug 04 2005 Lenz Grimmer + +- Fixed the creation of the mysql user group account in the postinstall + section (BUG 12348) +- Fixed enabling the Archive storage engine in the Max binary + +* Tue Aug 02 2005 Lenz Grimmer + +- Fixed the Requires: tag for the server RPM (BUG 12233) + +* Fri Jul 15 2005 Lenz Grimmer + +- create a "mysql" user group and assign the mysql user account to that group + in the server postinstall section. (BUG 10984) + +* Tue Jun 14 2005 Lenz Grimmer + +- Do not build statically on i386 by default, only when adding either "--with + static" or "--define '_with_static 1'" to the RPM build options. Static + linking really only makes sense when linking against the specially patched + glibc 2.2.5. + +* Mon Jun 06 2005 Lenz Grimmer + +- added mysql_client_test to the "bench" subpackage (BUG 10676) +- added the libndbclient static and shared libraries (BUG 10676) + +* Wed Jun 01 2005 Lenz Grimmer + +- use "mysqldatadir" variable instead of hard-coding the path multiple times +- use the "mysqld_user" variable on all occasions a user name is referenced +- removed (incomplete) Brazilian translations +- removed redundant release tags from the subpackage descriptions + +* Wed May 25 2005 Joerg Bruehe + +- Added a "make clean" between separate calls to "BuildMySQL". + +* Thu May 12 2005 Guilhem Bichot + +- Removed the mysql_tableinfo script made obsolete by the information schema + +* Wed Apr 20 2005 Lenz Grimmer + +- Enabled the "blackhole" storage engine for the Max RPM + +* Wed Apr 13 2005 Lenz Grimmer + +- removed the MySQL manual files (html/ps/texi) - they have been removed + from the MySQL sources and are now available seperately. + +* Mon Apr 4 2005 Petr Chardin + +- old mysqlmanager, mysqlmanagerc and mysqlmanager-pwger renamed into + mysqltestmanager, mysqltestmanager and mysqltestmanager-pwgen respectively + +* Fri Mar 18 2005 Lenz Grimmer + +- Disabled RAID in the Max binaries once and for all (it has finally been + removed from the source tree) + +* Sun Feb 20 2005 Petr Chardin + +- Install MySQL Instance Manager together with mysqld, touch mysqlmanager + password file + +* Mon Feb 14 2005 Lenz Grimmer + +- Fixed the compilation comments and moved them into the separate build sections + for Max and Standard + +* Mon Feb 7 2005 Tomas Ulin + +- enabled the "Ndbcluster" storage engine for the max binary +- added extra make install in ndb subdir after Max build to get ndb binaries +- added packages for ndbcluster storage engine + +* Fri Jan 14 2005 Lenz Grimmer + +- replaced obsoleted "BuildPrereq" with "BuildRequires" instead + +* Thu Jan 13 2005 Lenz Grimmer + +- enabled the "Federated" storage engine for the max binary + +* Tue Jan 04 2005 Petr Chardin + +- ISAM and merge storage engines were purged. As well as appropriate + tools and manpages (isamchk and isamlog) + +* Fri Dec 31 2004 Lenz Grimmer + +- enabled the "Archive" storage engine for the max binary +- enabled the "CSV" storage engine for the max binary +- enabled the "Example" storage engine for the max binary + +* Thu Aug 26 2004 Lenz Grimmer + +- MySQL-Max now requires MySQL-server instead of MySQL (BUG 3860) + +* Fri Aug 20 2004 Lenz Grimmer + +- do not link statically on IA64/AMD64 as these systems do not have + a patched glibc installed + +* Tue Aug 10 2004 Lenz Grimmer + +- Added libmygcc.a to the devel subpackage (required to link applications + against the the embedded server libmysqld.a) (BUG 4921) + +* Mon Aug 09 2004 Lenz Grimmer + +- Added EXCEPTIONS-CLIENT to the "devel" package + +* Thu Jul 29 2004 Lenz Grimmer + +- disabled OpenSSL in the Max binaries again (the RPM packages were the + only exception to this anyway) (BUG 1043) + +* Wed Jun 30 2004 Lenz Grimmer + +- fixed server postinstall (mysql_install_db was called with the wrong + parameter) + +* Thu Jun 24 2004 Lenz Grimmer + +- added mysql_tzinfo_to_sql to the server subpackage +- run "make clean" instead of "make distclean" + +* Mon Apr 05 2004 Lenz Grimmer + +- added ncurses-devel to the build prerequisites (BUG 3377) + +* Thu Feb 12 2004 Lenz Grimmer + +- when using gcc, _always_ use CXX=gcc +- replaced Copyright with License field (Copyright is obsolete) + +* Tue Feb 03 2004 Lenz Grimmer + +- added myisam_ftdump to the Server package + +* Tue Jan 13 2004 Lenz Grimmer + +- link the mysql client against libreadline instead of libedit (BUG 2289) + +* Mon Dec 22 2003 Lenz Grimmer + +- marked /etc/logrotate.d/mysql as a config file (BUG 2156) + +* Fri Dec 12 2003 Lenz Grimmer + +- fixed file permissions (BUG 1672) + +* Thu Dec 11 2003 Lenz Grimmer + +- made testing for gcc3 a bit more robust + +* Fri Dec 05 2003 Lenz Grimmer + +- added missing file mysql_create_system_tables to the server subpackage + +* Fri Nov 21 2003 Lenz Grimmer + +- removed dependency on MySQL-client from the MySQL-devel subpackage + as it is not really required. (BUG 1610) + +* Fri Aug 29 2003 Lenz Grimmer + +- Fixed BUG 1162 (removed macro names from the changelog) +- Really fixed BUG 998 (disable the checking for installed but + unpackaged files) + +* Tue Aug 05 2003 Lenz Grimmer + +- Fixed BUG 959 (libmysqld not being compiled properly) +- Fixed BUG 998 (RPM build errors): added missing files to the + distribution (mysql_fix_extensions, mysql_tableinfo, mysqldumpslow, + mysql_fix_privilege_tables.1), removed "-n" from install section. + +* Wed Jul 09 2003 Lenz Grimmer + +- removed the GIF Icon (file was not included in the sources anyway) +- removed unused variable shared_lib_version +- do not run automake before building the standard binary + (should not be necessary) +- add server suffix '-standard' to standard binary (to be in line + with the binary tarball distributions) +- Use more RPM macros (_exec_prefix, _sbindir, _libdir, _sysconfdir, + _datadir, _includedir) throughout the spec file. +- allow overriding CC and CXX (required when building with other compilers) + +* Fri May 16 2003 Lenz Grimmer + +- re-enabled RAID again + +* Wed Apr 30 2003 Lenz Grimmer + +- disabled MyISAM RAID (--with-raid) - it throws an assertion which + needs to be investigated first. + +* Mon Mar 10 2003 Lenz Grimmer + +- added missing file mysql_secure_installation to server subpackage + (BUG 141) + +* Tue Feb 11 2003 Lenz Grimmer + +- re-added missing pre- and post(un)install scripts to server subpackage +- added config file /etc/my.cnf to the file list (just for completeness) +- make sure to create the datadir with 755 permissions + +* Mon Jan 27 2003 Lenz Grimmer + +- removed unused CC and CXX variables +- CFLAGS and CXXFLAGS should honor RPM_OPT_FLAGS + +* Fri Jan 24 2003 Lenz Grimmer + +- renamed package "MySQL" to "MySQL-server" +- fixed Copyright tag +- added mysql_waitpid to client subpackage (required for mysql-test-run) + +* Wed Nov 27 2002 Lenz Grimmer + +- moved init script from /etc/rc.d/init.d to /etc/init.d (the majority of + Linux distributions now support this scheme as proposed by the LSB either + directly or via a compatibility symlink) +- Use new "restart" init script action instead of starting and stopping + separately +- Be more flexible in activating the automatic bootup - use insserv (on + older SuSE versions) or chkconfig (Red Hat, newer SuSE versions and + others) to create the respective symlinks + +* Wed Sep 25 2002 Lenz Grimmer + +- MySQL-Max now requires MySQL >= 4.0 to avoid version mismatches + (mixing 3.23 and 4.0 packages) + +* Fri Aug 09 2002 Lenz Grimmer + +- Turn off OpenSSL in MySQL-Max for now until it works properly again +- enable RAID for the Max binary instead +- added compatibility link: safe_mysqld -> mysqld_safe to ease the + transition from 3.23 + +* Thu Jul 18 2002 Lenz Grimmer + +- Reworked the build steps a little bit: the Max binary is supposed + to include OpenSSL, which cannot be linked statically, thus trying + to statically link against a special glibc is futile anyway +- because of this, it is not required to make yet another build run + just to compile the shared libs (saves a lot of time) +- updated package description of the Max subpackage +- clean up the BuildRoot directory afterwards + +* Mon Jul 15 2002 Lenz Grimmer + +- Updated Packager information +- Fixed the build options: the regular package is supposed to + include InnoDB and linked statically, while the Max package + should include BDB and SSL support + +* Fri May 03 2002 Lenz Grimmer + +- Use more RPM macros (e.g. infodir, mandir) to make the spec + file more portable +- reorganized the installation of documentation files: let RPM + take care of this +- reorganized the file list: actually install man pages along + with the binaries of the respective subpackage +- do not include libmysqld.a in the devel subpackage as well, if we + have a special "embedded" subpackage +- reworked the package descriptions + +* Mon Oct 8 2001 Monty + +- Added embedded server as a separate RPM + +* Fri Apr 13 2001 Monty + +- Added mysqld-max to the distribution + +* Tue Jan 2 2001 Monty + +- Added mysql-test to the bench package + +* Fri Aug 18 2000 Tim Smith + +- Added separate libmysql_r directory; now both a threaded + and non-threaded library is shipped. + +* Wed Sep 29 1999 David Axmark + +- Added the support-files/my-example.cnf to the docs directory. + +- Removed devel dependency on base since it is about client + development. + +* Wed Sep 8 1999 David Axmark + +- Cleaned up some for 3.23. + +* Thu Jul 1 1999 David Axmark + +- Added support for shared libraries in a separate sub + package. Original fix by David Fox (dsfox@cogsci.ucsd.edu) + +- The --enable-assembler switch is now automatically disables on + platforms there assembler code is unavailable. This should allow + building this RPM on non i386 systems. + +* Mon Feb 22 1999 David Axmark + +- Removed unportable cc switches from the spec file. The defaults can + now be overridden with environment variables. This feature is used + to compile the official RPM with optimal (but compiler version + specific) switches. + +- Removed the repetitive description parts for the sub rpms. Maybe add + again if RPM gets a multiline macro capability. + +- Added support for a pt_BR translation. Translation contributed by + Jorge Godoy . + +* Wed Nov 4 1998 David Axmark + +- A lot of changes in all the rpm and install scripts. This may even + be a working RPM :-) + +* Sun Aug 16 1998 David Axmark +- A developers changelog for MySQL is available in the source RPM. And + there is a history of major user visible changed in the Reference + Manual. Only RPM specific changes will be documented here. From 0d322e73716906188f01f3e4a917ecf3df2fef27 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Thu, 17 Sep 2015 11:48:47 +0200 Subject: [PATCH 059/305] Let the usual spec file also create "libs-compat" on RHEL 6. Move the new spec file from "packaging/rpm-libs-compat/" to "support-files/" because it includes all the functionality of the previous spec file there. --- .../rpm-libs-compat/mysql-libs-compat.spec | 2363 ----------------- support-files/mysql.spec.sh | 363 ++- 2 files changed, 320 insertions(+), 2406 deletions(-) delete mode 100644 packaging/rpm-libs-compat/mysql-libs-compat.spec diff --git a/packaging/rpm-libs-compat/mysql-libs-compat.spec b/packaging/rpm-libs-compat/mysql-libs-compat.spec deleted file mode 100644 index 3a13166d1cd0..000000000000 --- a/packaging/rpm-libs-compat/mysql-libs-compat.spec +++ /dev/null @@ -1,2363 +0,0 @@ -# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. -# -# 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; see the file COPYING. If not, write to the -# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston -# MA 02110-1301 USA. - -############################################################################## -# Some common macro definitions -############################################################################## - -# NOTE: "vendor" is used in upgrade/downgrade check, so you can't -# change these, has to be exactly as is. -%global mysql_old_vendor MySQL AB -%global mysql_vendor_2 Sun Microsystems, Inc. -%global mysql_vendor Oracle and/or its affiliates - -%global mysql_version @VERSION@ -%global wsrep_version @WSREP_VERSION@ -%global wsrep_revision @WSREP_REVISION@ -%global wsrep_revision @WSREP_REVISION@ - -%global mysqld_user mysql -%global mysqld_group mysql -%global mysqldatadir /var/lib/mysql - -%global release %{wsrep_version} -%global short_product_tag 5.5 - - - -# -# Macros we use which are not available in all supported versions of RPM -# -# - defined/undefined are missing on RHEL4 -# -%if %{expand:%{?defined:0}%{!?defined:1}} -%define defined() %{expand:%%{?%{1}:1}%%{!?%{1}:0}} -%endif -%if %{expand:%{?undefined:0}%{!?undefined:1}} -%define undefined() %{expand:%%{?%{1}:0}%%{!?%{1}:1}} -%endif - -# ---------------------------------------------------------------------------- -# RPM build tools now automatically detect Perl module dependencies. This -# detection causes problems as it is broken in some versions, and it also -# provides unwanted dependencies from mandatory scripts in our package. -# It might not be possible to disable this in all versions of RPM, but here we -# try anyway. We keep the "AutoReqProv: no" for the "test" sub package, as -# disabling here might fail, and that package has the most problems. -# See: -# http://fedoraproject.org/wiki/Packaging/Perl#Filtering_Requires:_and_Provides -# http://www.wideopen.com/archives/rpm-list/2002-October/msg00343.html -# ---------------------------------------------------------------------------- -%undefine __perl_provides -%undefine __perl_requires - -############################################################################## -# Command line handling -############################################################################## -# -# To set options: -# -# $ rpmbuild --define="option " ... -# - -# ---------------------------------------------------------------------------- -# Commercial builds -# ---------------------------------------------------------------------------- -%if %{undefined commercial} -%define commercial 0 -%endif - -# ---------------------------------------------------------------------------- -# Source name -# ---------------------------------------------------------------------------- -%if %{undefined src_base} -%define src_base mysql-wsrep -%endif -%define src_dir %{src_base}-%{mysql_version}-%{wsrep_version} - -# ---------------------------------------------------------------------------- -# Feature set (storage engines, options). Default to community (everything) -# ---------------------------------------------------------------------------- -%if %{undefined feature_set} -%define feature_set community -%endif - -# ---------------------------------------------------------------------------- -# Server comment strings -# ---------------------------------------------------------------------------- -%if %{undefined compilation_comment_debug} -%define compilation_comment_debug MySQL Community Server - Debug (GPL) -%endif -%if %{undefined compilation_comment_release} -%define compilation_comment_release MySQL Community Server (GPL) -%endif - -# ---------------------------------------------------------------------------- -# Product and server suffixes -# ---------------------------------------------------------------------------- -%if %{undefined product_suffix} - %if %{defined short_product_tag} - %define product_suffix -%{short_product_tag} - %else - %define product_suffix %{nil} - %endif -%endif - -%if %{undefined server_suffix} -%define server_suffix %{nil} -%endif - -# ---------------------------------------------------------------------------- -# Distribution support -# ---------------------------------------------------------------------------- - -# Disable post build checks for time being. -BuildConflicts: post-build-checks - -BuildRequires: gcc-c++ ncurses-devel perl zlib-devel cmake libaio-devel bison flex -BuildRequires: openssl-devel - -%if 0%{?rhel} == 6 || 0%{?rhel} == 7 || 0%{?fedora} == 20 || 0%{?fedora} == 21 -BuildRequires: time -%endif -%if 0%{?rhel} == 7 -BuildRequires: perl(Time::HiRes) perl(Env) -%endif - -%if 0%{?suse_version} -%if 0%{?suse_version} == 1110 -BuildRequires: gdbm-devel gperf openldap2-client procps pwdutils -%endif -%if 0%{?suse_version} == 1310 || 0%{?suse_version} == 1315 || 0%{?suse_version} == 1320 -BuildRequires: gperf procps time -%endif -%endif - -# Define dist tag if not given by platform -# In case of problems, check "/etc/rpm/macros.dist" -%if %{undefined dist} - # For suse versions see: - # https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto - %if 0%{?suse_version} == 1110 - %define dist .sle11 - %endif - %if 0%{?suse_version} == 1310 - %define dist .suse13.1 - %endif - %if 0%{?suse_version} == 1315 - %define dist .sle12 - %endif - %if 0%{?suse_version} == 1320 - %define dist .suse13.2 - %endif - # Still missing? - %if %{undefined dist} - %define dist .DIST - %endif -%endif -# CentOS 7 would force ".el7.centos", we want to avoid that. -%if 0%{?rhel} == 7 - %define dist .el7 -%endif - -# Avoid debuginfo RPMs, leaves binaries unstripped -%define debug_package %{nil} - -# ---------------------------------------------------------------------------- -# Support optional "tcmalloc" library (experimental) -# ---------------------------------------------------------------------------- -%if %{defined malloc_lib_target} -%define WITH_TCMALLOC 1 -%else -%define WITH_TCMALLOC 0 -%endif - -############################################################################## -# Settings for the "compatibility libs", the version depends on the target platform -############################################################################## - -# To differ between current main version and libs-compat: -%global currentlib 18 - -%if 0%{?rhel} == 6 -%global compatver 5.1.73 -%global compatlib 16 -%global compatsrc https://cdn.mysql.com/Downloads/MySQL-5.1/mysql-%{compatver}.tar.gz -%global compatch mysql-5173-charset-dir.patch -%endif - -# mysql-wsrep-5.5 has libmysqlclient.so.18, as have 5.6 and 5.7; -# same as preinstalled mariadb-libs, so we currently need no libs-compat on RHEL 7. -# This becomes relevant with a MySQL 5.8 (or higher) that has a libmysqlclient.so.19 or higher. -# -# %%if 0%%{?rhel} == 7 -# %%global compatver 5.5.45 -# %%global compatlib 18 -# %%global compatsrc https://cdn.mysql.com/Downloads/MySQL-5.5/mysql-%%{compatver}.tar.gz -# %%global compatch mysql-5545-charset-dir.patch -# # By default, a build will include the bundeled "yaSSL" library for SSL. -# %%{?with_ssl: %%global ssl_option -DWITH_SSL=%%{with_ssl}} -# %%endif - -%if 0%{?compatlib} -# Attention: "compat_src_dir" is the old version (e.g. 5.1.73), depends on platform -%global compat_src_dir mysql-%{compatver} -%endif - -############################################################################## -# Configuration based upon above user input, not to be set directly -############################################################################## - -%if 0%{?commercial} -%define license_files_server %{src_dir}/LICENSE.mysql -%define license_type Commercial -%else -%define license_files_server %{src_dir}/COPYING %{src_dir}/README -%define license_type GPL -%define compat_license_files_server %{compat_src_dir}/COPYING %{compat_src_dir}/README -%endif - -############################################################################## -# Main spec file section -############################################################################## - -Name: mysql-wsrep%{product_suffix} -Summary: MySQL: a very fast and reliable SQL database server -Group: Applications/Databases -Version: @MYSQL_RPM_VERSION@ -Release: %{release}%{dist} -# Distribution: %{distro_description} -License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{license_type} license as shown in the Description field. -Source: %{src_dir}.tar.gz -%if 0%{?compatlib} -Source7: %{compatsrc} -%endif -Source99: mysql-rpmlintrc -Patch0: cmake-no-wix.patch -%if 0%{?compatlib} -Patch7: %{compatch} -%if 0%{?compatlib} == 18 -Patch8: mysql-5.5-libmysqlclient-symbols.patch -%endif -%endif -URL: http://www.mysql.com/ -Packager: Codership Oy -Vendor: %{mysql_vendor} -# BuildRequires: %{distro_buildreq} -#wsrep_patch_tag - -Requires: mysql-wsrep-server%{product_suffix} -Requires: mysql-wsrep-client%{product_suffix} - -# Regression tests may take a long time, override the default to skip them -%{!?runselftest:%global runselftest 0} - -# Think about what you use here since the first step is to -# run a rm -rf -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 MySQL software has Dual Licensing, which means you can use the MySQL -software free of charge under the GNU General Public License -(http://www.gnu.org/licenses/). You can also purchase commercial MySQL -licenses from %{mysql_vendor} if you do not wish to be bound by the terms of -the GPL. See the chapter "Licensing and Support" in the manual for -further info. - -The MySQL web site (http://www.mysql.com/) provides the latest -news and information about the MySQL software. Also please see the -documentation and the manual for more information. - -This is a meta package of the MySQL software combined with the "wsrep plugin" -aka "Galera Cluster", all governed by the GPL. -It causes the installation of both the server and the client subpackages -so that the machine can be used both as a local database server and as a node -in a MySQL Galera Cluster. - -############################################################################## -# Sub package definition -############################################################################## - -%package -n mysql-wsrep-server%{product_suffix} -Summary: MySQL: a very fast and reliable SQL database server -Group: Applications/Databases -# Distro requirements -# RedHat -%if 0%{?fedora} || 0%{?rhel} -Requires: chkconfig coreutils grep procps shadow-utils net-tools rsync lsof -%if 0%{?rhel} == 7 || 0%{?fedora} >= 20 -Requires: perl-Data-Dumper -%endif -%endif -# SUSE -%if 0%{?suse_version} -Requires: aaa_base coreutils grep procps rsync lsof -%if 0%{suse_version} == 1110 -Requires: pwdutils -%endif -%endif - -%if 0%{?commercial} -Obsoletes: MySQL-server -%else -Obsoletes: MySQL-server-advanced -%endif -Obsoletes: mysql-server < %{version}-%{release} -Obsoletes: mysql-server-advanced -Obsoletes: MySQL-server-classic MySQL-server-community MySQL-server-enterprise -Obsoletes: MySQL-server-advanced-gpl MySQL-server-enterprise-gpl -Provides: mysql-server = %{version}-%{release} -Provides: mysql-server%{?_isa} = %{version}-%{release} - -%description -n mysql-wsrep-server%{product_suffix} -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 MySQL software has Dual Licensing, which means you can use the MySQL -software free of charge under the GNU General Public License -(http://www.gnu.org/licenses/). You can also purchase commercial MySQL -licenses from %{mysql_vendor} if you do not wish to be bound by the terms of -the GPL. See the chapter "Licensing and Support" in the manual for -further info. - -The MySQL web site (http://www.mysql.com/) provides the latest news and -information about the MySQL software. Also please see the documentation -and the manual for more information. - -This package includes the MySQL server binary as well as related utilities -to run and administer a MySQL server. - -Built with wsrep patch %{wsrep_version}, to be a node in a Galera cluster. - -If you want to access and work with the database locally, you have to install -package "mysql-wsrep-client%{product_suffix}" as well! - -# ---------------------------------------------------------------------------- -%package -n mysql-wsrep-client%{product_suffix} -Summary: MySQL - Client -Group: Applications/Databases -%if 0%{?commercial} -Obsoletes: MySQL-client -%else -Obsoletes: MySQL-client-advanced -%endif -Obsoletes: mysql < %{version}-%{release} -Obsoletes: mysql-advanced < %{version}-%{release} -Obsoletes: MySQL-client-classic MySQL-client-community MySQL-client-enterprise -Obsoletes: MySQL-client-advanced-gpl MySQL-client-enterprise-gpl -Provides: mysql = %{version}-%{release} -Provides: mysql%{?_isa} = %{version}-%{release} -Provides: mysql-client = %{version} -Provides: MySQL-client = %{version} - -%description -n mysql-wsrep-client%{product_suffix} -This package contains the standard MySQL clients and administration tools. - -For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ - -# ---------------------------------------------------------------------------- -%package -n mysql-wsrep-test%{product_suffix} -Summary: MySQL - Test suite -Group: Applications/Databases -%if 0%{?commercial} -Requires: MySQL-client-advanced perl -Obsoletes: MySQL-test -%else -Requires: MySQL-client perl -Obsoletes: MySQL-test-advanced -%endif -Obsoletes: mysql-test < %{version}-%{release} -Obsoletes: mysql-test-advanced -Obsoletes: MySQL-test-classic MySQL-test-community MySQL-test-enterprise -Obsoletes: MySQL-test-advanced-gpl MySQL-test-enterprise-gpl -Obsoletes: mysql-bench -Obsoletes: MySQL-bench -Provides: mysql-test = %{version}-%{release} -Provides: mysql-test%{?_isa} = %{version}-%{release} -AutoReqProv: no - -%description -n mysql-wsrep-test%{product_suffix} -This package contains the MySQL regression test suite. - -For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ - -# ---------------------------------------------------------------------------- -%package -n mysql-wsrep-devel%{product_suffix} -Summary: MySQL - Development header files and libraries -Group: Applications/Databases -%if 0%{?commercial} -Obsoletes: MySQL-devel -%else -Obsoletes: MySQL-devel-advanced -%endif -Obsoletes: mysql-devel < %{version}-%{release} -Obsoletes: mysql-embedded-devel mysql-devel-advanced mysql-embedded-devel-advanced -Obsoletes: MySQL-devel-classic MySQL-devel-community MySQL-devel-enterprise -Obsoletes: MySQL-devel-advanced-gpl MySQL-devel-enterprise-gpl -Provides: mysql-devel = %{version}-%{release} -Provides: mysql-devel%{?_isa} = %{version}-%{release} - -%description -n mysql-wsrep-devel%{product_suffix} -This package contains the development header files and libraries necessary -to develop MySQL client applications. - -For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ - -# ---------------------------------------------------------------------------- -%package -n mysql-wsrep-shared%{product_suffix} -Summary: MySQL - Shared libraries -Group: Applications/Databases -%if 0%{?commercial} -Obsoletes: MySQL-shared -%else -Obsoletes: MySQL-shared-advanced -%endif -Obsoletes: MySQL-shared-standard MySQL-shared-pro -Obsoletes: MySQL-shared-pro-cert MySQL-shared-pro-gpl -Obsoletes: MySQL-shared-pro-gpl-cert -Obsoletes: MySQL-shared-classic MySQL-shared-community MySQL-shared-enterprise -Obsoletes: MySQL-shared-advanced-gpl MySQL-shared-enterprise-gpl -# RHEL uses other names: -Obsoletes: mysql-libs -# Necessary on RHEL 7, no harm on other platforms: -Obsoletes: mariadb-libs - -%description -n mysql-wsrep-shared%{product_suffix} -This package contains the shared libraries (*.so*) which certain languages -and applications need to dynamically load and use MySQL. - -# ---------------------------------------------------------------------------- -%if 0%{?compatlib} -%package -n mysql-wsrep-libs-compat%{product_suffix} -Summary: Shared libraries for MySQL %{compatver} database client applications -Group: Applications/Databases - -Provides: mysql-libs-compat = %{version} -Provides: mysql-libs-compat%{?_isa} = %{version} -Obsoletes: mysql-libs-compat < %{version} -Provides: MySQL-shared-compat%{?_isa} = %{version} -Obsoletes: MySQL-shared-compat < %{version} - -# Dealing with RHEL 6 and upwards (and compatible ...) -# Directly, we replace "libs" only; but RedHat "client" and "server" need files from "libs" -Provides: mysql-libs = %{compatver} -Obsoletes: mysql-libs < %{version} - -%if 0%{?rhel} > 6 -# Dealing with RHEL 7 and upwards (and compatible ...) -# Above general section for RHEL also applies, it deals with "mysql" packages. -# But with RHEL 7, we also get "mariadb" ... -Obsoletes: mariadb-libs -%endif - -%description -n mysql-wsrep-libs-compat%{product_suffix} -The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, -and robust SQL (Structured Query Language) database server. -See the MySQL web site (http://www.mysql.com/) for further information, -including its dual licensing (GNU GPL or commercial licenses). - -This package contains the shared libraries for (old) MySQL %{compatver} client -applications. -It is intended for RHEL %{?rhel} and compatible distributions, -to satisfy the dependencies of several applications shipping with that distro -while the MySQL software on the machine is updated to a newer release series. - -%endif - -# ---------------------------------------------------------------------------- -%package -n MySQL-embedded%{product_suffix} -Summary: MySQL - Embedded library -Group: Applications/Databases -%if 0%{?commercial} -Requires: MySQL-devel-advanced -Obsoletes: MySQL-embedded -%else -Requires: MySQL-devel -Obsoletes: MySQL-embedded-advanced -%endif -Obsoletes: mysql-embedded < %{version}-%{release} -Obsoletes: mysql-embedded-advanced -Obsoletes: MySQL-embedded-pro -Obsoletes: MySQL-embedded-classic MySQL-embedded-community MySQL-embedded-enterprise -Obsoletes: MySQL-embedded-advanced-gpl MySQL-embedded-enterprise-gpl -Provides: mysql-embedded = %{version}-%{release} -Provides: mysql-embedded%{?_isa} = %{version}-%{release} - -%description -n MySQL-embedded%{product_suffix} -This package contains the MySQL 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 main benefits are increased -speed and more simple management for embedded applications. - -The API is identical for the embedded MySQL version and the -client/server version. - -For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ - -############################################################################## -%prep -%if 0%{?compatlib} -%setup -q -T -a 0 -a 7 -c -n %{name} -# -q = quiet, -T = no default unpack, -n = source dir name, -c = create, -a = unpack after cd -# https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s04.html -# http://rpm.org/max-rpm-snapshot/s1-rpm-inside-macros.html -pushd %{compat_src_dir} -%patch7 -p 1 -%if 0%{?compatlib} == 18 -%patch8 -p 1 -%endif -popd -%else -%setup -q -T -a 0 -c -n %{name} -%endif # 0%{?compatlib} - -# That patch is needed with old cmake only, on SLES 11, but it won't do any harm -# outside Windows, so it may be used in all RPM builds. -pushd %{src_dir} -%patch0 -p1 -#wsrep_apply_patch_tag -popd - -############################################################################## -%build - -# Build compat libs -%if 0%{?compatlib} -( -%if 0%{?compatlib} == 16 -# RHEL 6: MySQL 5.1, using traditional "configure ; make" -export CC="gcc" CXX="g++" -export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv" -export CXXFLAGS="$CFLAGS %{?el6:-felide-constructors} -fno-rtti -fno-exceptions" -pushd %{compat_src_dir} -%configure \ - --with-readline \ - --without-debug \ - --enable-shared \ - --localstatedir=/var/lib/mysql \ - --with-unix-socket-path=/var/lib/mysql/mysql.sock \ - --with-mysqld-user="mysql" \ - --with-extra-charsets=all \ - --enable-local-infile \ - --enable-largefile \ - --enable-thread-safe-client \ - --with-ssl=%{_prefix} \ - --with-embedded-server \ - --with-big-tables \ - --with-pic \ - --with-plugin-innobase \ - --with-plugin-innodb_plugin \ - --with-plugin-partition \ - --disable-dependency-tracking -make %{?_smp_mflags} -popd -%endif -##### -%if 0%{?compatlib} == 18 -# RHEL 7: MySQL 5.5, using "cmake ; make" -mkdir release -cd release -cmake ../%{compat_src_dir} \ - -DBUILD_CONFIG=mysql_release \ - -DINSTALL_LAYOUT=RPM \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DENABLE_DTRACE=OFF \ - -DCMAKE_C_FLAGS="%{optflags}" \ - -DCMAKE_CXX_FLAGS="%{optflags}" \ - -DINSTALL_LIBDIR="%{_lib}/mysql" \ - -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ - -DINSTALL_SQLBENCHDIR=share \ - -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ - -DFEATURE_SET="%{feature_set}" \ - -DWITH_EMBEDDED_SERVER=1 \ - -DWITH_EMBEDDED_SHARED_LIBRARY=1 \ - %{?ssl_option} \ - -DCOMPILATION_COMMENT="%{compilation_comment_release}" \ - -DMYSQL_SERVER_SUFFIX="%{?server_suffix}" -echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG -make %{?_smp_mflags} VERBOSE=1 -cd .. -%endif -) -%endif - -pushd %{src_dir} - -# Fail quickly and obviously if user tries to build as root -%if %runselftest - if [ x"`id -u`" = x0 ]; then - echo "The MySQL regression tests may fail if run as root." - echo "If you really need to build the RPM as root, use" - echo "--define='runselftest 0' to skip the regression tests." - exit 1 - fi -%endif - -# Be strict about variables, bail at earliest opportunity, etc. -set -eu - -# Optional package files -touch optional-files-devel - -# -# Set environment in order of preference, MYSQL_BUILD_* first, then variable -# name, finally a default. RPM_OPT_FLAGS is assumed to be a part of the -# default RPM build environment. -# -# We set CXX=gcc by default to support so-called 'generic' binaries, where we -# do not have a dependancy on libgcc/libstdc++. This only works while we do -# not require C++ features such as exceptions, and may need to be removed at -# a later date. -# - -# This is a hack, $RPM_OPT_FLAGS on ia64 hosts contains flags which break -# the compile in cmd-line-utils/readline - needs investigation, but for now -# we simply unset it and use those specified directly in cmake. -%if "%{_arch}" == "ia64" -RPM_OPT_FLAGS= -%endif - -export PATH=${MYSQL_BUILD_PATH:-$PATH} -export CC=${MYSQL_BUILD_CC:-${CC:-gcc}} -export CXX=${MYSQL_BUILD_CXX:-${CXX:-gcc}} -export CFLAGS=${MYSQL_BUILD_CFLAGS:-${CFLAGS:-$RPM_OPT_FLAGS}} -export CXXFLAGS=${MYSQL_BUILD_CXXFLAGS:-${CXXFLAGS:-$RPM_OPT_FLAGS -felide-constructors -fno-exceptions -fno-rtti}} -export LDFLAGS=${MYSQL_BUILD_LDFLAGS:-${LDFLAGS:-}} -export CMAKE=${MYSQL_BUILD_CMAKE:-${CMAKE:-cmake}} -export MAKE_JFLAG=${MYSQL_BUILD_MAKE_JFLAG:--j$(ncpu=$(cat /proc/cpuinfo | grep processor | wc -l) && echo $(($ncpu > 4 ? 4 : $ncpu)))} - -# Build debug mysqld and libmysqld.a -mkdir debug -( - cd debug - # Attempt to remove any optimisation flags from the debug build - CFLAGS=`echo " ${CFLAGS} " | \ - sed -e 's/ -O[0-9]* / /' \ - -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /' \ - -e 's/-D_FORTIFY_SOURCE=2/ /' \ - -e 's/ -unroll2 / /' \ - -e 's/ -ip / /' \ - -e 's/^ //' \ - -e 's/ $//'` - CXXFLAGS=`echo " ${CXXFLAGS} " | \ - sed -e 's/ -O[0-9]* / /' \ - -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /' \ - -e 's/-D_FORTIFY_SOURCE=2/ /' \ - -e 's/ -unroll2 / /' \ - -e 's/ -ip / /' \ - -e 's/^ //' \ - -e 's/ $//'` - # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before - # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM - ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \ - -DCMAKE_BUILD_TYPE=Debug \ - -DENABLE_DTRACE=OFF \ - -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ - -DFEATURE_SET="%{feature_set}" \ - -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \ - -DMYSQL_SERVER_SUFFIX="%{server_suffix}" \ - -DWITH_WSREP=1 \ - -DWSREP_VERSION="%{wsrep_version}" \ - -DWSREP_REVISION="%{wsrep_revision}" - echo BEGIN_DEBUG_CONFIG ; egrep '^#define' include/config.h ; echo END_DEBUG_CONFIG - make ${MAKE_JFLAG} VERBOSE=1 -) -# Build full release -mkdir release -( - cd release - # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before - # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM - ${CMAKE} ../ -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DENABLE_DTRACE=OFF \ - -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ - -DFEATURE_SET="%{feature_set}" \ - -DCOMPILATION_COMMENT="%{compilation_comment_release}" \ - -DMYSQL_SERVER_SUFFIX="%{server_suffix}" \ - -DWITH_WSREP=1 \ - -DWSREP_VERSION="%{wsrep_version}" \ - -DWSREP_REVISION="%{wsrep_revision}" - echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG - make ${MAKE_JFLAG} VERBOSE=1 -) - -%if %runselftest - MTR_BUILD_THREAD=auto - export MTR_BUILD_THREAD - - (cd release && make test-bt-fast || true) -%endif -popd - -############################################################################## -%install -%if 0%{?compatlib} -( -cd $RPM_BUILD_DIR/%{name} - -# Install compat libs -# This must be done *before* the current libs are installed, for the "rm *.{a,la,so}" -%if 0%{?compatlib} == 16 -for dir in mysql-%{compatver}/libmysql mysql-%{compatver}/libmysql_r ; do -%else -for dir in release/libmysql ; do -%endif - pushd $dir - make DESTDIR=%{buildroot} install - popd -done -rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient{,_r}.{a,la,so} - -# "charsets/" -install -d -m 0755 %{buildroot}/usr/share/mysql/charsets-%{compatver}/ -install -m 644 mysql-%{compatver}/sql/share/charsets/* %{buildroot}/usr/share/mysql/charsets-%{compatver}/ - -# Add libdir to linker -install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d -echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf -) -%endif - -RBR=$RPM_BUILD_ROOT -MBD=$RPM_BUILD_DIR/%{name}/%{src_dir} -cd $MBD - -# Ensure that needed directories exists -install -d $RBR%{_sysconfdir}/{logrotate.d,init.d} -install -d $RBR%{mysqldatadir}/mysql -install -d $RBR%{_datadir}/mysql-test -install -d $RBR%{_datadir}/mysql/SELinux/RHEL4 -install -d $RBR%{_includedir} -install -d $RBR%{_libdir} -install -d $RBR%{_mandir} -install -d $RBR%{_sbindir} - -mkdir -p $RBR%{_sysconfdir}/my.cnf.d - -# Install all binaries -( - cd $MBD/release - make DESTDIR=$RBR install -) - -# For gcc builds, include libgcc.a in the devel subpackage (BUG 4921). Do -# this in a sub-shell to ensure we don't pollute the install environment -# with compiler bits. -( - PATH=${MYSQL_BUILD_PATH:-$PATH} - CC=${MYSQL_BUILD_CC:-${CC:-gcc}} - CFLAGS=${MYSQL_BUILD_CFLAGS:-${CFLAGS:-$RPM_OPT_FLAGS}} - if "${CC}" -v 2>&1 | grep '^gcc.version' >/dev/null 2>&1; then - libgcc=`${CC} ${CFLAGS} --print-libgcc-file` - if [ -f ${libgcc} ]; then - mkdir -p $RBR%{_libdir}/mysql - install -m 644 ${libgcc} $RBR%{_libdir}/mysql/libmygcc.a - echo "%{_libdir}/mysql/libmygcc.a" >>optional-files-devel - fi - fi -) - -# FIXME: at some point we should stop doing this and just install everything -# FIXME: directly into %%{_libdir}/mysql - perhaps at the same time as renaming -# FIXME: the shared libraries to use libmysql*-$major.$minor.so syntax -mv -v $RBR/%{_libdir}/*.a $RBR/%{_libdir}/mysql/ - -# Install logrotate and autostart -install -m 644 $MBD/release/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate.d/mysql -install -m 755 $MBD/release/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql - -# Create a symlink "rcmysql", pointing to the init.script. SuSE users -# will appreciate that, as all services usually offer this. -ln -sf %{_sysconfdir}/init.d/mysql $RBR%{_sbindir}/rcmysql - -# Create a wsrep_sst_rsync_wan symlink. -install -d $RBR%{_bindir} -ln -sf wsrep_sst_rsync $RBR%{_bindir}/wsrep_sst_rsync_wan - -# Touch the place where the my.cnf config file might be located -# Just to make sure it's in the file list and marked as a config file -touch $RBR%{_sysconfdir}/my.cnf -touch $RBR%{_sysconfdir}/wsrep.cnf - -# Install SELinux files in datadir -install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \ - $RBR%{_datadir}/mysql/SELinux/RHEL4 - -# Get the list of "_datadir" files, remove those that go into "libs-compat" -find $RBR%{_datadir}/mysql -type f -print | sed -e "s=$RBR==" \ - | fgrep -v "charsets-%{compatver}" | sort > $MBD/release/datadir.files - -%if %{WITH_TCMALLOC} -# Even though this is a shared library, put it under /usr/lib*/mysql, so it -# doesn't conflict with possible shared lib by the same name in /usr/lib*. See -# `mysql_config --variable=pkglibdir` and mysqld_safe for how this is used. -install -m 644 "%{malloc_lib_source}" \ - "$RBR%{_libdir}/mysql/%{malloc_lib_target}" -%endif - -# Remove man pages we explicitly do not want to package, avoids 'unpackaged -# files' warning. -# This has become obsolete: rm -f $RBR%%{_mandir}/man1/make_win_bin_dist.1* - -%check - -############################################################################## -# Post processing actions, i.e. when installed -############################################################################## - -%pre -n mysql-wsrep-server%{product_suffix} -# This is the code running at the beginning of a RPM upgrade action, -# before replacing the old files with the new ones. - -# ATTENTION: Parts of this are duplicated in the "triggerpostun" ! - -# There are users who deviate from the default file system layout. -# Check local settings to support them. -if [ -x %{_bindir}/my_print_defaults ] -then - mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'` - PID_FILE_PATT=`%{_bindir}/my_print_defaults server mysqld | grep '^--pid-file=' | sed -n 's/--pid-file=//p'` -fi -if [ -z "$mysql_datadir" ] -then - mysql_datadir=%{mysqldatadir} -fi -if [ -z "$PID_FILE_PATT" ] -then - PID_FILE_PATT="$mysql_datadir/*.pid" -fi - -# Check if we can safely upgrade. An upgrade is only safe if it's from one -# of our RPMs in the same version family. - -# Handle both ways of spelling the capability. -installed=`rpm -q --whatprovides mysql-server 2> /dev/null` -if [ $? -ne 0 -o -z "$installed" ]; then - installed=`rpm -q --whatprovides MySQL-server 2> /dev/null` -fi -if [ $? -eq 0 -a -n "$installed" ]; then - installed=`echo $installed | sed 's/\([^ ]*\) .*/\1/'` # Tests have shown duplicated package names - vendor=`rpm -q --queryformat='%{VENDOR}' "$installed" 2>&1` - version=`rpm -q --queryformat='%{VERSION}' "$installed" 2>&1` - myoldvendor='%{mysql_old_vendor}' - myvendor_2='%{mysql_vendor_2}' - myvendor='%{mysql_vendor}' - myversion='%{mysql_version}' - - old_family=`echo $version \ - | sed -n -e 's,^\([1-9][0-9]*\.[0-9][0-9]*\)\..*$,\1,p'` - new_family=`echo $myversion \ - | sed -n -e 's,^\([1-9][0-9]*\.[0-9][0-9]*\)\..*$,\1,p'` - - [ -z "$vendor" ] && vendor='' - [ -z "$old_family" ] && old_family="" - [ -z "$new_family" ] && new_family="" - - error_text= - if [ "$vendor" != "$myoldvendor" \ - -a "$vendor" != "$myvendor_2" \ - -a "$vendor" != "$myvendor" ]; then - error_text="$error_text -The current MySQL server package is provided by a different -vendor ($vendor) than $myoldvendor, $myvendor_2, or $myvendor. -Some files may be installed to different locations, including log -files and the service startup script in %{_sysconfdir}/init.d/. -" - fi - - if [ "$old_family" != "$new_family" ]; then - error_text="$error_text -Upgrading directly from MySQL $old_family to MySQL $new_family may not -be safe in all cases. A manual dump and restore using mysqldump is -recommended. It is important to review the MySQL manual's Upgrading -section for version-specific incompatibilities. -" - fi - - if [ -n "$error_text" ]; then - cat <&2 - -****************************************************************** -A MySQL server package ($installed) is installed. -$error_text -A manual upgrade is required. - -- Ensure that you have a complete, working backup of your data and my.cnf - files -- Shut down the MySQL server cleanly -- Remove the existing MySQL packages. Usually this command will - list the packages you should remove: - rpm -qa | grep -i '^mysql-' - - You may choose to use 'rpm --nodeps -ev ' to remove - the package which contains the mysqlclient shared library. The - library will be reinstalled by the MySQL-shared-compat package. -- Install the new MySQL packages supplied by $myvendor -- Ensure that the MySQL server is started -- 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. -****************************************************************** -HERE - exit 1 - fi -fi - -# We assume that if there is exactly one ".pid" file, -# it contains the valid PID of a running MySQL server. -NR_PID_FILES=`ls -1 $PID_FILE_PATT 2>/dev/null | wc -l` -case $NR_PID_FILES in - 0 ) SERVER_TO_START='' ;; # No "*.pid" file == no running server - 1 ) SERVER_TO_START='true' ;; - * ) SERVER_TO_START='' # Situation not clear - SEVERAL_PID_FILES=true ;; -esac -# That logic may be debated: We might check whether it is non-empty, -# contains exactly one number (possibly a PID), and whether "ps" finds it. -# OTOH, if there is no such process, it means a crash without a cleanup - -# is that a reason not to start a new server after upgrade? - -STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER - -if [ -f $STATUS_FILE ]; then - echo "Some previous upgrade was not finished:" - ls -ld $STATUS_FILE - echo "Please check its status, then do" - echo " rm $STATUS_FILE" - echo "before repeating the MySQL upgrade." - exit 1 -elif [ -n "$SEVERAL_PID_FILES" ] ; then - echo "You have more than one PID file:" - ls -ld $PID_FILE_PATT - echo "Please check which one (if any) corresponds to a running server" - echo "and delete all others before repeating the MySQL upgrade." - exit 1 -fi - -NEW_VERSION=%{mysql_version}-%{release} - -# The "pre" section code is also run on a first installation, -# when there is no data directory yet. Protect against error messages. -if [ -d $mysql_datadir ] ; then - echo "MySQL RPM upgrade to version $NEW_VERSION" > $STATUS_FILE - echo "'pre' step running at `date`" >> $STATUS_FILE - echo >> $STATUS_FILE - fcount=`ls -ltr $mysql_datadir/*.err 2>/dev/null | wc -l` - if [ $fcount -gt 0 ] ; then - echo "ERR file(s):" >> $STATUS_FILE - ls -ltr $mysql_datadir/*.err >> $STATUS_FILE - echo >> $STATUS_FILE - echo "Latest 'Version' line in latest file:" >> $STATUS_FILE - grep '^Version' `ls -tr $mysql_datadir/*.err | tail -1` | \ - tail -1 >> $STATUS_FILE - echo >> $STATUS_FILE - fi - - if [ -n "$SERVER_TO_START" ] ; then - # There is only one PID file, race possibility ignored - echo "PID file:" >> $STATUS_FILE - ls -l $PID_FILE_PATT >> $STATUS_FILE - cat $PID_FILE_PATT >> $STATUS_FILE - echo >> $STATUS_FILE - echo "Server process:" >> $STATUS_FILE - ps -fp `cat $PID_FILE_PATT` >> $STATUS_FILE - echo >> $STATUS_FILE - echo "SERVER_TO_START=$SERVER_TO_START" >> $STATUS_FILE - else - # Take a note we checked it ... - echo "PID file:" >> $STATUS_FILE - ls -l $PID_FILE_PATT >> $STATUS_FILE 2>&1 - fi -fi - -# Shut down a previously installed server first -# Note we *could* make that depend on $SERVER_TO_START, but we rather don't, -# so a "stop" is attempted even if there is no PID file. -# (Maybe the "stop" doesn't work then, but we might fix that in itself.) -if [ -x %{_sysconfdir}/init.d/mysql ] ; then - %{_sysconfdir}/init.d/mysql stop > /dev/null 2>&1 - echo "Giving mysqld 5 seconds to exit nicely" - sleep 5 -fi - -%post -n mysql-wsrep-server%{product_suffix} -# This is the code running at the end of a RPM install or upgrade action, -# after the (new) files have been written. - -# ATTENTION: Parts of this are duplicated in the "triggerpostun" ! - -# There are users who deviate from the default file system layout. -# Check local settings to support them. -if [ -x %{_bindir}/my_print_defaults ] -then - mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'` -fi -if [ -z "$mysql_datadir" ] -then - mysql_datadir=%{mysqldatadir} -fi - -NEW_VERSION=%{mysql_version}-%{release} -STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER - -# ---------------------------------------------------------------------- -# Create data directory if needed, check whether upgrade or install -# ---------------------------------------------------------------------- -if [ ! -d $mysql_datadir ] ; then mkdir -m 755 $mysql_datadir; fi -if [ -f $STATUS_FILE ] ; then - SERVER_TO_START=`grep '^SERVER_TO_START=' $STATUS_FILE | cut -c17-` -else - SERVER_TO_START='' -fi -# echo "Analyzed: SERVER_TO_START=$SERVER_TO_START" -if [ ! -d $mysql_datadir/mysql ] ; then - mkdir $mysql_datadir/mysql $mysql_datadir/test - echo "MySQL RPM installation of version $NEW_VERSION" >> $STATUS_FILE -else - # If the directory exists, we may assume it is an upgrade. - echo "MySQL RPM upgrade to version $NEW_VERSION" >> $STATUS_FILE -fi - -# ---------------------------------------------------------------------- -# Make MySQL start/shutdown automatically when the machine does it. -# ---------------------------------------------------------------------- -# NOTE: This still needs to be debated. Should we check whether these links -# for the other run levels exist(ed) before the upgrade? -# use chkconfig on Enterprise Linux and newer SuSE releases -if [ -x /sbin/chkconfig ] ; then - /sbin/chkconfig --add mysql -# use insserv for older SuSE Linux versions -elif [ -x /sbin/insserv ] ; then - /sbin/insserv %{_sysconfdir}/init.d/mysql -fi - -# ---------------------------------------------------------------------- -# Create a MySQL user and group. Do not report any problems if it already -# exists. -# ---------------------------------------------------------------------- -groupadd -r %{mysqld_group} 2> /dev/null || true -useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" \ - -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true -# The user may already exist, make sure it has the proper group nevertheless -# (BUG#12823) -usermod -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true - -# ---------------------------------------------------------------------- -# Change permissions so that the user that will run the MySQL daemon -# owns all database files. -# ---------------------------------------------------------------------- -chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir - -# ---------------------------------------------------------------------- -# Initiate databases if needed -# ---------------------------------------------------------------------- -if ! grep '^MySQL RPM upgrade' $STATUS_FILE >/dev/null 2>&1 ; then - # Fix bug#45415: no "mysql_install_db" on an upgrade - # Do this as a negative to err towards more "install" runs - # rather than to miss one. - %{_bindir}/mysql_install_db --rpm --user=%{mysqld_user} -fi - -# ---------------------------------------------------------------------- -# Upgrade databases if needed would go here - but it cannot be automated yet -# ---------------------------------------------------------------------- - -# ---------------------------------------------------------------------- -# Change permissions again to fix any new files. -# ---------------------------------------------------------------------- -chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir - -# ---------------------------------------------------------------------- -# Fix permissions for the permission database so that only the user -# can read them. -# ---------------------------------------------------------------------- -chmod -R og-rw $mysql_datadir/mysql - -# ---------------------------------------------------------------------- -# install SELinux files - but don't override existing ones -# ---------------------------------------------------------------------- -SETARGETDIR=/etc/selinux/targeted/src/policy -SEDOMPROG=$SETARGETDIR/domains/program -SECONPROG=$SETARGETDIR/file_contexts/program -if [ -f /etc/redhat-release ] \ - && (grep -q "Red Hat Enterprise Linux .. release 4" /etc/redhat-release \ - || grep -q "CentOS release 4" /etc/redhat-release) ; then - echo - echo - echo 'Notes regarding SELinux on this platform:' - echo '=========================================' - echo - echo 'The default policy might cause server startup to fail because it is' - echo 'not allowed to access critical files. In this case, please update' - echo 'your installation.' - echo - echo 'The default policy might also cause inavailability of SSL related' - echo 'features because the server is not allowed to access /dev/random' - echo 'and /dev/urandom. If this is a problem, please do the following:' - echo - echo ' 1) install selinux-policy-targeted-sources from your OS vendor' - echo ' 2) add the following two lines to '$SEDOMPROG/mysqld.te':' - echo ' allow mysqld_t random_device_t:chr_file read;' - echo ' allow mysqld_t urandom_device_t:chr_file read;' - echo ' 3) cd to '$SETARGETDIR' and issue the following command:' - echo ' make load' - echo - echo -fi - -if [ -x sbin/restorecon ] ; then - sbin/restorecon -R var/lib/mysql -fi - -# Was the server running before the upgrade? If so, restart the new one. -if [ "$SERVER_TO_START" = "true" ] ; then - # Restart in the same way that mysqld will be started normally. - if [ -x %{_sysconfdir}/init.d/mysql ] ; then - %{_sysconfdir}/init.d/mysql start - echo "Giving mysqld 5 seconds to start" - sleep 5 - fi -fi - -# Collect an upgrade history ... -echo "Upgrade/install finished at `date`" >> $STATUS_FILE -echo >> $STATUS_FILE -echo "=====" >> $STATUS_FILE -STATUS_HISTORY=$mysql_datadir/RPM_UPGRADE_HISTORY -cat $STATUS_FILE >> $STATUS_HISTORY -mv -f $STATUS_FILE ${STATUS_FILE}-LAST # for "triggerpostun" - - -#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." - -%preun -n mysql-wsrep-server%{product_suffix} - -# Which '$1' does this refer to? Fedora docs have info: -# " ... a count of the number of versions of the package that are installed. -# Action Count -# Install the first time 1 -# Upgrade 2 or higher (depending on the number of versions installed) -# Remove last version of package 0 " -# -# http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s04s05.html - -if [ $1 = 0 ] ; then - # Stop MySQL before uninstalling it - if [ -x %{_sysconfdir}/init.d/mysql ] ; then - %{_sysconfdir}/init.d/mysql stop > /dev/null - # Remove autostart of MySQL - # use chkconfig on Enterprise Linux and newer SuSE releases - if [ -x /sbin/chkconfig ] ; then - /sbin/chkconfig --del mysql - # For older SuSE Linux versions - elif [ -x /sbin/insserv ] ; then - /sbin/insserv -r %{_sysconfdir}/init.d/mysql - fi - fi -fi - -# We do not remove the mysql user since it may still own a lot of -# database files. - -%triggerpostun -n mysql-wsrep-server%{product_suffix} --MySQL-server-community - -# Setup: We renamed this package, so any existing "server-community" -# package will be removed when this "server" is installed. -# Problem: RPM will first run the "pre" and "post" sections of this script, -# and only then the "preun" of that old community server. -# But this "preun" includes stopping the server and uninstalling the service, -# "chkconfig --del mysql" which removes the symlinks to the start script. -# Solution: *After* the community server got removed, restart this server -# and re-install the service. -# -# For information about triggers in spec files, see the Fedora docs: -# http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch10s02.html -# For all details of this code, see the "pre" and "post" sections. - -# There are users who deviate from the default file system layout. -# Check local settings to support them. -if [ -x %{_bindir}/my_print_defaults ] -then - mysql_datadir=`%{_bindir}/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p'` -fi -if [ -z "$mysql_datadir" ] -then - mysql_datadir=%{mysqldatadir} -fi - -NEW_VERSION=%{mysql_version}-%{release} -STATUS_FILE=$mysql_datadir/RPM_UPGRADE_MARKER-LAST # Note the difference! -STATUS_HISTORY=$mysql_datadir/RPM_UPGRADE_HISTORY - -if [ -f $STATUS_FILE ] ; then - SERVER_TO_START=`grep '^SERVER_TO_START=' $STATUS_FILE | cut -c17-` -else - # This should never happen, but let's be prepared - SERVER_TO_START='' -fi -echo "Analyzed: SERVER_TO_START=$SERVER_TO_START" - -if [ -x /sbin/chkconfig ] ; then - /sbin/chkconfig --add mysql -# use insserv for older SuSE Linux versions -elif [ -x /sbin/insserv ] ; then - /sbin/insserv %{_sysconfdir}/init.d/mysql -fi - -# Was the server running before the upgrade? If so, restart the new one. -if [ "$SERVER_TO_START" = "true" ] ; then - # Restart in the same way that mysqld will be started normally. - if [ -x %{_sysconfdir}/init.d/mysql ] ; then - %{_sysconfdir}/init.d/mysql start - echo "Giving mysqld 5 seconds to start" - sleep 5 - fi -fi - -echo "Trigger 'postun --community' finished at `date`" >> $STATUS_HISTORY -echo >> $STATUS_HISTORY -echo "=====" >> $STATUS_HISTORY - - -# ---------------------------------------------------------------------- -# Clean up the BuildRoot after build is done -# ---------------------------------------------------------------------- -%clean -[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] \ - && rm -rf $RPM_BUILD_ROOT; - -############################################################################## -# Files section -############################################################################## - -%files -n mysql-wsrep%{product_suffix} -# Intentionally empty - this is a pure meta package. - -# ---------------------------------------------------------------------------- -%files -n mysql-wsrep-server%{product_suffix} -f %{src_dir}/release/support-files/plugins.files -f %{src_dir}/release/datadir.files -%defattr(-,root,root,0755) - -%if %{defined license_files_server} -%doc %{license_files_server} -%endif -%doc %{src_dir}/Docs/ChangeLog -%doc %{src_dir}/release/Docs/INFO_SRC* -%doc %{src_dir}/release/Docs/INFO_BIN* -%doc %{src_dir}/release/support-files/my-*.cnf -%doc %{src_dir}/Docs/README-wsrep -%doc %{src_dir}/release/support-files/wsrep.cnf -%doc %{src_dir}/release/support-files/wsrep_notify - -%if 0%{?commercial} -%doc %attr(644, root, root) %{_infodir}/mysql.info* -%endif - -%doc %attr(644, root, man) %{_mandir}/man1/innochecksum.1* -%doc %attr(644, root, man) %{_mandir}/man1/my_print_defaults.1* -%doc %attr(644, root, man) %{_mandir}/man1/myisam_ftdump.1* -%doc %attr(644, root, man) %{_mandir}/man1/myisamchk.1* -%doc %attr(644, root, man) %{_mandir}/man1/myisamlog.1* -%doc %attr(644, root, man) %{_mandir}/man1/myisampack.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_convert_table_format.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_fix_extensions.1* -%doc %attr(644, root, man) %{_mandir}/man8/mysqld.8* -%doc %attr(644, root, man) %{_mandir}/man1/mysqld_multi.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqld_safe.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqldumpslow.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_install_db.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_plugin.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_secure_installation.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_setpermission.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_upgrade.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqlhotcopy.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqlman.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql.server.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqltest.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_tzinfo_to_sql.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqlbug.1* -%doc %attr(644, root, man) %{_mandir}/man1/perror.1* -%doc %attr(644, root, man) %{_mandir}/man1/replace.1* -%doc %attr(644, root, man) %{_mandir}/man1/resolve_stack_dump.1* -%doc %attr(644, root, man) %{_mandir}/man1/resolveip.1* - -%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf -%ghost %config(noreplace,missingok) %{_sysconfdir}/wsrep.cnf -%dir %{_sysconfdir}/my.cnf.d - -%attr(755, root, root) %{_bindir}/innochecksum -%attr(755, root, root) %{_bindir}/my_print_defaults -%attr(755, root, root) %{_bindir}/myisam_ftdump -%attr(755, root, root) %{_bindir}/myisamchk -%attr(755, root, root) %{_bindir}/myisamlog -%attr(755, root, root) %{_bindir}/myisampack -%attr(755, root, root) %{_bindir}/mysql_convert_table_format -%attr(755, root, root) %{_bindir}/mysql_fix_extensions -%attr(755, root, root) %{_bindir}/mysql_install_db -%attr(755, root, root) %{_bindir}/mysql_plugin -%attr(755, root, root) %{_bindir}/mysql_secure_installation -%attr(755, root, root) %{_bindir}/mysql_setpermission -%attr(755, root, root) %{_bindir}/mysql_tzinfo_to_sql -%attr(755, root, root) %{_bindir}/mysql_upgrade -%attr(755, root, root) %{_bindir}/mysql_zap -%attr(755, root, root) %{_bindir}/mysqlbug -%attr(755, root, root) %{_bindir}/mysqld_multi -%attr(755, root, root) %{_bindir}/mysqld_safe -%attr(755, root, root) %{_bindir}/mysqldumpslow -%attr(755, root, root) %{_bindir}/mysqlhotcopy -%attr(755, root, root) %{_bindir}/mysqltest -%attr(755, root, root) %{_bindir}/perror -%attr(755, root, root) %{_bindir}/replace -%attr(755, root, root) %{_bindir}/resolve_stack_dump -%attr(755, root, root) %{_bindir}/resolveip -%attr(755, root, root) %{_bindir}/wsrep_sst_common -%attr(755, root, root) %{_bindir}/wsrep_sst_mysqldump -%attr(755, root, root) %{_bindir}/wsrep_sst_rsync -%attr( - , root, root) %{_bindir}/wsrep_sst_rsync_wan -%attr(755, root, root) %{_bindir}/wsrep_sst_xtrabackup -%attr(755, root, root) %{_bindir}/wsrep_sst_xtrabackup-v2 - -%attr(755, root, root) %{_sbindir}/mysqld -%attr(755, root, root) %{_sbindir}/mysqld-debug -%attr( - , root, root) %{_sbindir}/rcmysql -%attr(755, root, root) %{_libdir}/mysql/plugin/daemon_example.ini - -%if %{WITH_TCMALLOC} -%attr(755, root, root) %{_libdir}/mysql/%{malloc_lib_target} -%endif - -%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql -%attr(755, root, root) %{_sysconfdir}/init.d/mysql -# %%attr(755, root, root) %%{_datadir}/mysql/ ## See "-f datadir.files" at section top - -# ---------------------------------------------------------------------------- -%files -n mysql-wsrep-client%{product_suffix} - -%defattr(-, root, root, 0755) -%attr(755, root, root) %{_bindir}/msql2mysql -%attr(755, root, root) %{_bindir}/mysql -%attr(755, root, root) %{_bindir}/mysql_find_rows -%attr(755, root, root) %{_bindir}/mysql_waitpid -%attr(755, root, root) %{_bindir}/mysqlaccess -# XXX: This should be moved to %%{_sysconfdir} -%attr(644, root, root) %{_bindir}/mysqlaccess.conf -%attr(755, root, root) %{_bindir}/mysqladmin -%attr(755, root, root) %{_bindir}/mysqlbinlog -%attr(755, root, root) %{_bindir}/mysqlcheck -%attr(755, root, root) %{_bindir}/mysqldump -%attr(755, root, root) %{_bindir}/mysqlimport -%attr(755, root, root) %{_bindir}/mysqlshow -%attr(755, root, root) %{_bindir}/mysqlslap - -%doc %attr(644, root, man) %{_mandir}/man1/msql2mysql.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_find_rows.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_waitpid.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqlaccess.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqladmin.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqlbinlog.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqlcheck.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqldump.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqlimport.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqlshow.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqlslap.1* - -# ---------------------------------------------------------------------------- -%files -n mysql-wsrep-devel%{product_suffix} -f %{src_dir}/optional-files-devel -%defattr(-, root, root, 0755) -%doc %attr(644, root, man) %{_mandir}/man1/comp_err.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_config.1* -%attr(755, root, root) %{_bindir}/mysql_config -%dir %attr(755, root, root) %{_includedir}/mysql -%dir %attr(755, root, root) %{_libdir}/mysql -%{_includedir}/mysql/* -%{_datadir}/aclocal/mysql.m4 -%{_libdir}/mysql/libmysqlclient.a -%{_libdir}/mysql/libmysqlclient_r.a -%{_libdir}/mysql/libmysqlservices.a - -# ---------------------------------------------------------------------------- -%files -n mysql-wsrep-shared%{product_suffix} -%defattr(-, root, root, 0755) -# Shared libraries (omit for architectures that don't support them) -%{_libdir}/libmysql*.so -%{_libdir}/libmysql*.so.%{currentlib}* - -%post -n mysql-wsrep-shared%{product_suffix} -/sbin/ldconfig - -%postun -n mysql-wsrep-shared%{product_suffix} -/sbin/ldconfig - -# ---------------------------------------------------------------------------- -%if 0%{?compatlib} -%files -n mysql-wsrep-libs-compat%{product_suffix} -%defattr(-, root, root, -) -%doc %{?compat_license_files_server} -%dir %attr(755, root, root) %{_libdir}/mysql -%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf -%{_libdir}/mysql/libmysqlclient.so.%{compatlib} -%{_libdir}/mysql/libmysqlclient.so.%{compatlib}.0.0 -%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib} -%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib}.0.0 -%dir %attr(755, root, root) %{_datadir}/mysql/ -%dir %attr(755, root, root) %{_datadir}/mysql/charsets-%{compatver}/ -%attr(644, root, root) %{_datadir}/mysql/charsets-%{compatver}/* - -%post -n mysql-wsrep-libs-compat%{product_suffix} -/sbin/ldconfig - -%postun -n mysql-wsrep-libs-compat%{product_suffix} -/sbin/ldconfig -%endif - -# ---------------------------------------------------------------------------- -%files -n mysql-wsrep-test%{product_suffix} -%defattr(-, root, root, 0755) -%attr(-, root, root) %{_datadir}/mysql-test -%attr(755, root, root) %{_bindir}/mysql_client_test -%doc %attr(644, root, man) %{_mandir}/man1/mysql_client_test.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql-stress-test.pl.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql-test-run.pl.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_client_test_embedded.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysqltest_embedded.1* - -############################################################################## -# The spec file changelog only includes changes made to the spec file -# itself - note that they must be ordered by date (important when -# merging BK trees) -############################################################################## -%changelog -* Tue Sep 15 2015 Joerg Bruehe -- Fixed the issue with "-f plugins.files", switched back to that approach. - The base cause was a wrong use of "%%setup" for this multi-source build. -- Let the meta package of client and server be the main package, not a subpackage. -- Use the "%%files ... -f LIST_FILE" mechanism for "%%{_datadir}", it is the - best way to get rid of files that go into "libs-compat" only. - -* Mon Sep 14 2015 Joerg Bruehe -- The mechanism "%%files ... -f LIST_FILE" doesn't work, so the plugin files - must be listed directly in the section "%%files -n mysql-wsrep-server". - -* Fri Sep 11 2015 Joerg Bruehe -- Integrate the separate "libs-compat" spec file with the general "mysql-wsrep", - so that "libs-compat" becomes just another subpackage. -- Change history of the separate "libs-compat" spec file, all by this author in 2015: -- Thu Sep 10: -- - Remove code to deal with RHEL 5, there will not be any support for that - obsolete platform. -- - For MySQl 5.5 / 5.6 / 5.7, there is no need for "libs-compat" on RHEL 7 - because both are SO version 18; turn description into comment. -- Tue Sep 08: -- - Finish the code for RHEL 7, using MySQL 5.5.45 as published by Oracle. -- - Severe bug: Path for "charsets" files did not match the patch, fix it. -- - This is in the 5.5 branch, fix the spec file version. -- Thu Sep 03 2015 Joerg Bruehe -- - Change the name from "mysql-libs-compat" to "mysql-wsrep-libs-compat". -- - Change the compatibility version for RHEL 6 from MySQL 5.1.72 to 5.1.73. -- - Start adding settings for RHEL 7, to replace the pre-installed "mariadb-libs 5.5.37". -- Tue Apr 28: -- - Improve the dependency / conflicts settings. -- - Drop the name component "community", 3rd party builds don't use it. -- Tue Mar 10: -- - Sometimes, "libmysqlclient.so" needs the files in "/usr/share/mysql/charsets/", - so the package should better contain them, but have the path name contain the - version number to make it independent of other packages. -- Mon Feb 09: -- - "g++: command not found" on RedHat 5 + 6, added "BuildRequires: gcc-c++". -- - "time" is a RedHat-only package, not needed to build on SuSE. -- Fri Feb 06: -- - Add code to identify RedHat 5 during build, "rhel" is not predefined there. -- - Start adding "conflicts" directives to get rid of other MySQL library RPMs. -- - Try with "CXX=g++". -- Thu Feb 05: -- - This spec file handles the "compat" RPM for the "libmysqlclient.so" only. - It is created as a subset of the overall MySQL 5.6.23 spec file - (file "packaging/rpm-oel/mysql.spec.in" in the source tree), - see that file's "changelog" section for its history. -- - Add "CC=gcc CXX=gcc" as used in 5.0 and 5.1 builds (missing in that 5.6.23 spec file) - -* Sat Feb 7 2015 Teemu Ollakka -- Merged OBS changes from 5.6 branch - -* Thu Jan 29 2015 Joerg Bruehe -- Add a meta-package "mysql-wsrep" that requires both "server" and "client". -- Fix the fall-back definition of "dist", it must start with a period. - -* Mon Jan 26 2015 Joerg Bruehe -- Allow "rpmlint", but suppress "post-build-checks" (fail on SuSE 12 + 13). -- Improve handling of undefined "%%{dist}". -- Fix wrong changelog dates, to get rid of warnings about "bogus date". -- Escape percent signs in changelog, to get rid of "rpmlint" warnings. - -* Tue Jan 20 2015 Teemu Ollakka - -- Reworked to build wsrep patched packages exclusively -- OBS compatible - -* Wed Jul 02 2014 Bjorn Munch -- Disable dtrace unconditionally, breaks after we install Oracle dtrace - -* Wed Oct 30 2013 Balasubramanian Kandasamy -- Removed non gpl file docs/mysql.info from community packages - -* Mon Sep 09 2013 Balasubramanian Kandasamy -- Updated logic to get the correct count of PID files - -* Fri Aug 16 2013 Balasubramanian Kandasamy -- Added provides lowercase mysql tags - -* Wed Jun 26 2013 Balasubramanian Kandasamy -- Cleaned up spec file to resolve rpm dependencies. - -* Tue Jul 24 2012 Joerg Bruehe - -- Add a macro "runselftest": - if set to 1 (default), the test suite will be run during the RPM build; - this can be oveeridden via the command line by adding - --define "runselftest 0" - Failures of the test suite will NOT make the RPM build fail! - -* Mon Jun 11 2012 Joerg Bruehe - -- Make sure newly added "SPECIFIC-ULN/" directory does not disturb packaging. - -* Wed Sep 28 2011 Joerg Bruehe - -- Fix duplicate mentioning of "mysql_plugin" and its manual page, - it is better to keep alphabetic order in the files list (merging!). - -* Wed Sep 14 2011 Joerg Bruehe - -- Let the RPM capabilities ("obsoletes" etc) ensure that an upgrade may replace - the RPMs of any configuration (of the current or the preceding release series) - by the new ones. This is done by not using the implicitly generated capabilities - (which include the configuration name) and relying on more generic ones which - just list the function ("server", "client", ...). - The implicit generation cannot be prevented, so all these capabilities must be - explicitly listed in "Obsoletes:" - -* Tue Sep 13 2011 Jonathan Perkin - -- Add support for Oracle Linux 6 and Red Hat Enterprise Linux 6. Due to - changes in RPM behaviour ($RPM_BUILD_ROOT is removed prior to install) - this necessitated a move of the libmygcc.a installation to the install - phase, which is probably where it belonged in the first place. - -* Tue Sep 13 2011 Joerg Bruehe - -- "make_win_bin_dist" and its manual are dropped, cmake does it different. - -* Thu Sep 08 2011 Daniel Fischer - -- Add mysql_plugin man page. - -* Tue Aug 30 2011 Joerg Bruehe - -- Add the manual page for "mysql_plugin" to the server package. - -* Fri Aug 19 2011 Joerg Bruehe - -- Null-upmerge the fix of bug#37165: This spec file is not affected. -- Replace "/var/lib/mysql" by the spec file variable "%%{mysqldatadir}". - -* Fri Aug 12 2011 Daniel Fischer - -- Source plugin library files list from cmake-generated file. - -* Mon Jul 25 2011 Chuck Bell - -- Added the mysql_plugin client - enables or disables plugins. - -* Thu Jul 21 2011 Sunanda Menon - -- Fix bug#12561297: Added the MySQL embedded binary - -* Thu Jul 07 2011 Joerg Bruehe - -- Fix bug#45415: "rpm upgrade recreates test database" - Let the creation of the "test" database happen only during a new installation, - not in an RPM upgrade. - This affects both the "mkdir" and the call of "mysql_install_db". - -* Thu Feb 10 2011 Joerg Bruehe - -- Fix bug#56581: If an installation deviates from the default file locations - ("datadir" and "pid-file"), the mechanism to detect a running server (on upgrade) - should still work, and use these locations. - The problem was that the fix for bug#27072 did not check for local settings. - -* Mon Jan 31 2011 Joerg Bruehe - -- Install the new "manifest" files: "INFO_SRC" and "INFO_BIN". - -* Tue Nov 23 2010 Jonathan Perkin - -- EXCEPTIONS-CLIENT has been deleted, remove it from here too -- Support MYSQL_BUILD_MAKE_JFLAG environment variable for passing - a '-j' argument to make. - -* Mon Nov 1 2010 Georgi Kodinov - -- Added test authentication (WL#1054) plugin binaries - -* Wed Oct 6 2010 Georgi Kodinov - -- Added example external authentication (WL#1054) plugin binaries - -* Wed Aug 11 2010 Joerg Bruehe - -- With a recent spec file cleanup, names have changed: A "-community" part was dropped. - Reflect that in the "Obsoletes" specifications. -- Add a "triggerpostun" to handle the uninstall of the "-community" server RPM. -- This fixes bug#55015 "MySQL server is not restarted properly after RPM upgrade". - -* Tue Jun 15 2010 Joerg Bruehe - -- Change the behaviour on installation and upgrade: - On installation, do not autostart the server. - *Iff* the server was stopped before the upgrade is started, this is taken as a - sign the administrator is handling that manually, and so the new server will - not be started automatically at the end of the upgrade. - The start/stop scripts will still be installed, so the server will be started - on the next machine boot. - This is the 5.5 version of fixing bug#27072 (RPM autostarting the server). - -* Tue Jun 1 2010 Jonathan Perkin - -- Implement SELinux checks from distribution-specific spec file. - -* Wed May 12 2010 Jonathan Perkin - -- Large number of changes to build using CMake -- Introduce distribution-specific RPMs -- Drop debuginfo, build all binaries with debug/symbols -- Remove __os_install_post, use native macro -- Remove _unpackaged_files_terminate_build, make it an error to have - unpackaged files -- Remove cluster RPMs - -* Wed Mar 24 2010 Joerg Bruehe - -- Add "--with-perfschema" to the configure options. - -* Mon Mar 22 2010 Joerg Bruehe - -- User "usr/lib*" to allow for both "usr/lib" and "usr/lib64", - mask "rmdir" return code 1. -- Remove "ha_example.*" files from the list, they aren't built. - -* Wed Mar 17 2010 Joerg Bruehe - -- Fix a wrong path name in handling the debug plugins. - -* Wed Mar 10 2010 Joerg Bruehe - -- Take the result of the debug plugin build and put it into the optimized tree, - so that it becomes part of the final installation; - include the files in the packlist. Part of the fixes for bug#49022. - -* Mon Mar 01 2010 Joerg Bruehe - -- Set "Oracle and/or its affiliates" as the vendor and copyright owner, - accept upgrading from packages showing MySQL or Sun as vendor. - -* Fri Feb 12 2010 Joerg Bruehe - -- Formatting changes: - Have a consistent structure of separator lines and of indentation - (8 leading blanks => tab). -- Introduce the variable "src_dir". -- Give the environment variables "MYSQL_BUILD_CC(CXX)" precedence - over "CC" ("CXX"). -- Drop the old "with_static" argument analysis, this is not supported - in 5.1 since ages. -- Introduce variables to control the handlers individually, as well - as other options. -- Use the new "--with-plugin" notation for the table handlers. -- Drop handling "/etc/rc.d/init.d/mysql", the switch to "/etc/init.d/mysql" - was done back in 2002 already. -- Make "--with-zlib-dir=bundled" the default, add an option to disable it. -- Add missing manual pages to the file list. -- Improve the runtime check for "libgcc.a", protect it against being tried - with the Intel compiler "icc". - -* Mon Jan 11 2010 Joerg Bruehe - -- Change RPM file naming: - - Suffix like "-m2", "-rc" becomes part of version as "_m2", "_rc". - - Release counts from 1, not 0. - -* Wed Dec 23 2009 Joerg Bruehe - -- The "semisync" plugin file name has lost its introductory "lib", - adapt the file lists for the subpackages. - This is a part missing from the fix for bug#48351. -- Remove the "fix_privilege_tables" manual, it does not exist in 5.5 - (and likely, the whole script will go, too). - -* Mon Nov 16 2009 Joerg Bruehe - -- Fix some problems with the directives around "tcmalloc" (experimental), - remove erroneous traces of the InnoDB plugin (that is 5.1 only). - -* Fri Oct 09 2009 Magnus Blaudd - -- Removed mysql_fix_privilege_tables - -* Fri Oct 02 2009 Alexander Nozdrin - -- "mysqlmanager" got removed from version 5.4, all references deleted. - -* Fri Aug 28 2009 Joerg Bruehe - -- Merge up from 5.1 to 5.4: Remove handling for the InnoDB plugin. - -* Thu Aug 27 2009 Joerg Bruehe - -- This version does not contain the "Instance manager", "mysqlmanager": - Remove it from the spec file so that packaging succeeds. - -* Mon Aug 24 2009 Jonathan Perkin - -- Add conditionals for bundled zlib and innodb plugin - -* Fri Aug 21 2009 Jonathan Perkin - -- Install plugin libraries in appropriate packages. -- Disable libdaemon_example and ftexample plugins. - -* Thu Aug 20 2009 Jonathan Perkin - -- Update variable used for mysql-test suite location to match source. - -* Fri Nov 07 2008 Joerg Bruehe - -- Correct yesterday's fix, so that it also works for the last flag, - and fix a wrong quoting: un-quoted quote marks must not be escaped. - -* Thu Nov 06 2008 Kent Boortz - -- Removed "mysql_upgrade_shell" -- Removed some copy/paste between debug and normal build - -* Thu Nov 06 2008 Joerg Bruehe - -- Modify CFLAGS and CXXFLAGS such that a debug build is not optimized. - This should cover both gcc and icc flags. Fixes bug#40546. - -* Fri Aug 29 2008 Kent Boortz - -- Removed the "Federated" storage engine option, and enabled in all - -* Tue Aug 26 2008 Joerg Bruehe - -- Get rid of the "warning: Installed (but unpackaged) file(s) found:" - Some generated files aren't needed in RPMs: - - the "sql-bench/" subdirectory - Some files were missing: - - /usr/share/aclocal/mysql.m4 ("devel" subpackage) - - Manual "mysqlbug" ("server" subpackage) - - Program "innochecksum" and its manual ("server" subpackage) - - Manual "mysql_find_rows" ("client" subpackage) - - Script "mysql_upgrade_shell" ("client" subpackage) - - Program "ndb_cpcd" and its manual ("ndb-extra" subpackage) - - Manuals "ndb_mgm" + "ndb_restore" ("ndb-tools" subpackage) - -* Mon Mar 31 2008 Kent Boortz - -- Made the "Federated" storage engine an option -- Made the "Cluster" storage engine and sub packages an option - -* Wed Mar 19 2008 Joerg Bruehe - -- Add the man pages for "ndbd" and "ndb_mgmd". - -* Mon Feb 18 2008 Timothy Smith - -- Require a manual upgrade if the alread-installed mysql-server is - from another vendor, or is of a different major version. - -* Wed May 02 2007 Joerg Bruehe - -- "ndb_size.tmpl" is not needed any more, - "man1/mysql_install_db.1" lacked the trailing '*'. - -* Sat Apr 07 2007 Kent Boortz - -- Removed man page for "mysql_create_system_tables" - -* Wed Mar 21 2007 Daniel Fischer - -- Add debug server. - -* Mon Mar 19 2007 Daniel Fischer - -- Remove Max RPMs; the server RPMs contain a mysqld compiled with all - features that previously only were built into Max. - -* Fri Mar 02 2007 Joerg Bruehe - -- Add several man pages for NDB which are now created. - -* Fri Jan 05 2007 Kent Boortz - -- Put back "libmygcc.a", found no real reason it was removed. - -- Add CFLAGS to gcc call with --print-libgcc-file, to make sure the - correct "libgcc.a" path is returned for the 32/64 bit architecture. - -* Mon Dec 18 2006 Joerg Bruehe - -- Fix the move of "mysqlmanager" to section 8: Directory name was wrong. - -* Thu Dec 14 2006 Joerg Bruehe - -- Include the new man pages for "my_print_defaults" and "mysql_tzinfo_to_sql" - in the server RPM. -- The "mysqlmanager" man page got moved from section 1 to 8. - -* Thu Nov 30 2006 Joerg Bruehe - -- Call "make install" using "benchdir_root=%%{_datadir}", - because that is affecting the regression test suite as well. - -* Thu Nov 16 2006 Joerg Bruehe - -- Explicitly note that the "MySQL-shared" RPMs (as built by MySQL AB) - replace "mysql-shared" (as distributed by SuSE) to allow easy upgrading - (bug#22081). - -* Mon Nov 13 2006 Joerg Bruehe - -- Add "--with-partition" to all server builds. - -- Use "--report-features" in one test run per server build. - -* Tue Aug 15 2006 Joerg Bruehe - -- The "max" server is removed from packages, effective from 5.1.12-beta. - Delete all steps to build, package, or install it. - -* Mon Jul 10 2006 Joerg Bruehe - -- Fix a typing error in the "make" target for the Perl script to run the tests. - -* Tue Jul 04 2006 Joerg Bruehe - -- Use the Perl script to run the tests, because it will automatically check - whether the server is configured with SSL. - -* Tue Jun 27 2006 Joerg Bruehe - -- move "mysqldumpslow" from the client RPM to the server RPM (bug#20216) - -- Revert all previous attempts to call "mysql_upgrade" during RPM upgrade, - there are some more aspects which need to be solved before this is possible. - For now, just ensure the binary "mysql_upgrade" is delivered and installed. - -* Thu Jun 22 2006 Joerg Bruehe - -- Close a gap of the previous version by explicitly using - a newly created temporary directory for the socket to be used - in the "mysql_upgrade" operation, overriding any local setting. - -* Tue Jun 20 2006 Joerg Bruehe - -- To run "mysql_upgrade", we need a running server; - start it in isolation and skip password checks. - -* Sat May 20 2006 Kent Boortz - -- Always compile for PIC, position independent code. - -* Wed May 10 2006 Kent Boortz - -- Use character set "all" when compiling with Cluster, to make Cluster - nodes independent on the character set directory, and the problem - that two RPM sub packages both wants to install this directory. - -* Mon May 01 2006 Kent Boortz - -- Use "./libtool --mode=execute" instead of searching for the - executable in current directory and ".libs". - -* Fri Apr 28 2006 Kent Boortz - -- Install and run "mysql_upgrade" - -* Wed Apr 12 2006 Jim Winstead - -- Remove sql-bench, and MySQL-bench RPM (will be built as an independent - project from the mysql-bench repository) - -* Tue Apr 11 2006 Jim Winstead - -- Remove old mysqltestmanager and related programs -* Sat Apr 01 2006 Kent Boortz - -- Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS - -* Wed Mar 08 2006 Kent Boortz - -- Changed product name from "Community Edition" to "Community Server" - -* Mon Mar 06 2006 Kent Boortz - -- Fast mutexes is now disabled by default, but should be - used in Linux builds. - -* Mon Feb 20 2006 Kent Boortz - -- Reintroduced a max build -- Limited testing of 'debug' and 'max' servers -- Berkeley DB only in 'max' - -* Mon Feb 13 2006 Joerg Bruehe - -- Use "-i" on "make test-force"; - this is essential for later evaluation of this log file. - -* Thu Feb 09 2006 Kent Boortz - -- Pass '-static' to libtool, link static with our own libraries, dynamic - with system libraries. Link with the bundled zlib. - -* Wed Feb 08 2006 Kristian Nielsen - -- Modified RPM spec to match new 5.1 debug+max combined community packaging. - -* Sun Dec 18 2005 Kent Boortz - -- Added "client/mysqlslap" - -* Mon Dec 12 2005 Rodrigo Novo - -- Added zlib to the list of (static) libraries installed -- Added check against libtool wierdness (WRT: sql/mysqld || sql/.libs/mysqld) -- Compile MySQL with bundled zlib -- Fixed %%packager name to "MySQL Production Engineering Team" - -* Mon Dec 05 2005 Joerg Bruehe - -- Avoid using the "bundled" zlib on "shared" builds: - As it is not installed (on the build system), this gives dependency - problems with "libtool" causing the build to fail. - (Change was done on Nov 11, but left uncommented.) - -* Tue Nov 22 2005 Joerg Bruehe - -- Extend the file existence check for "init.d/mysql" on un-install - to also guard the call to "insserv"/"chkconfig". - -* Thu Oct 27 2005 Lenz Grimmer - -- added more man pages - -* Wed Oct 19 2005 Kent Boortz - -- Made yaSSL support an option (off by default) - -* Wed Oct 19 2005 Kent Boortz - -- Enabled yaSSL support - -* Sat Oct 15 2005 Kent Boortz - -- Give mode arguments the same way in all places -- Moved copy of mysqld.a to "standard" build, but - disabled it as we don't do embedded yet in 5.0 - -* Fri Oct 14 2005 Kent Boortz - -- For 5.x, always compile with --with-big-tables -- Copy the config.log file to location outside - the build tree - -* Fri Oct 14 2005 Kent Boortz - -- Removed unneeded/obsolete configure options -- Added archive engine to standard server -- Removed the embedded server from experimental server -- Changed suffix "-Max" => "-max" -- Changed comment string "Max" => "Experimental" - -* Thu Oct 13 2005 Lenz Grimmer - -- added a usermod call to assign a potential existing mysql user to the - correct user group (BUG#12823) -- Save the perror binary built during Max build so it supports the NDB - error codes (BUG#13740) -- added a separate macro "mysqld_group" to be able to define the - user group of the mysql user seperately, if desired. - -* Thu Sep 29 2005 Lenz Grimmer - -- fixed the removing of the RPM_BUILD_ROOT in the %%clean section (the - $RBR variable did not get expanded, thus leaving old build roots behind) - -* Thu Aug 04 2005 Lenz Grimmer - -- Fixed the creation of the mysql user group account in the postinstall - section (BUG 12348) -- Fixed enabling the Archive storage engine in the Max binary - -* Tue Aug 02 2005 Lenz Grimmer - -- Fixed the Requires: tag for the server RPM (BUG 12233) - -* Fri Jul 15 2005 Lenz Grimmer - -- create a "mysql" user group and assign the mysql user account to that group - in the server postinstall section. (BUG 10984) - -* Tue Jun 14 2005 Lenz Grimmer - -- Do not build statically on i386 by default, only when adding either "--with - static" or "--define '_with_static 1'" to the RPM build options. Static - linking really only makes sense when linking against the specially patched - glibc 2.2.5. - -* Mon Jun 06 2005 Lenz Grimmer - -- added mysql_client_test to the "bench" subpackage (BUG 10676) -- added the libndbclient static and shared libraries (BUG 10676) - -* Wed Jun 01 2005 Lenz Grimmer - -- use "mysqldatadir" variable instead of hard-coding the path multiple times -- use the "mysqld_user" variable on all occasions a user name is referenced -- removed (incomplete) Brazilian translations -- removed redundant release tags from the subpackage descriptions - -* Wed May 25 2005 Joerg Bruehe - -- Added a "make clean" between separate calls to "BuildMySQL". - -* Thu May 12 2005 Guilhem Bichot - -- Removed the mysql_tableinfo script made obsolete by the information schema - -* Wed Apr 20 2005 Lenz Grimmer - -- Enabled the "blackhole" storage engine for the Max RPM - -* Wed Apr 13 2005 Lenz Grimmer - -- removed the MySQL manual files (html/ps/texi) - they have been removed - from the MySQL sources and are now available seperately. - -* Mon Apr 4 2005 Petr Chardin - -- old mysqlmanager, mysqlmanagerc and mysqlmanager-pwger renamed into - mysqltestmanager, mysqltestmanager and mysqltestmanager-pwgen respectively - -* Fri Mar 18 2005 Lenz Grimmer - -- Disabled RAID in the Max binaries once and for all (it has finally been - removed from the source tree) - -* Sun Feb 20 2005 Petr Chardin - -- Install MySQL Instance Manager together with mysqld, touch mysqlmanager - password file - -* Mon Feb 14 2005 Lenz Grimmer - -- Fixed the compilation comments and moved them into the separate build sections - for Max and Standard - -* Mon Feb 7 2005 Tomas Ulin - -- enabled the "Ndbcluster" storage engine for the max binary -- added extra make install in ndb subdir after Max build to get ndb binaries -- added packages for ndbcluster storage engine - -* Fri Jan 14 2005 Lenz Grimmer - -- replaced obsoleted "BuildPrereq" with "BuildRequires" instead - -* Thu Jan 13 2005 Lenz Grimmer - -- enabled the "Federated" storage engine for the max binary - -* Tue Jan 04 2005 Petr Chardin - -- ISAM and merge storage engines were purged. As well as appropriate - tools and manpages (isamchk and isamlog) - -* Fri Dec 31 2004 Lenz Grimmer - -- enabled the "Archive" storage engine for the max binary -- enabled the "CSV" storage engine for the max binary -- enabled the "Example" storage engine for the max binary - -* Thu Aug 26 2004 Lenz Grimmer - -- MySQL-Max now requires MySQL-server instead of MySQL (BUG 3860) - -* Fri Aug 20 2004 Lenz Grimmer - -- do not link statically on IA64/AMD64 as these systems do not have - a patched glibc installed - -* Tue Aug 10 2004 Lenz Grimmer - -- Added libmygcc.a to the devel subpackage (required to link applications - against the the embedded server libmysqld.a) (BUG 4921) - -* Mon Aug 09 2004 Lenz Grimmer - -- Added EXCEPTIONS-CLIENT to the "devel" package - -* Thu Jul 29 2004 Lenz Grimmer - -- disabled OpenSSL in the Max binaries again (the RPM packages were the - only exception to this anyway) (BUG 1043) - -* Wed Jun 30 2004 Lenz Grimmer - -- fixed server postinstall (mysql_install_db was called with the wrong - parameter) - -* Thu Jun 24 2004 Lenz Grimmer - -- added mysql_tzinfo_to_sql to the server subpackage -- run "make clean" instead of "make distclean" - -* Mon Apr 05 2004 Lenz Grimmer - -- added ncurses-devel to the build prerequisites (BUG 3377) - -* Thu Feb 12 2004 Lenz Grimmer - -- when using gcc, _always_ use CXX=gcc -- replaced Copyright with License field (Copyright is obsolete) - -* Tue Feb 03 2004 Lenz Grimmer - -- added myisam_ftdump to the Server package - -* Tue Jan 13 2004 Lenz Grimmer - -- link the mysql client against libreadline instead of libedit (BUG 2289) - -* Mon Dec 22 2003 Lenz Grimmer - -- marked /etc/logrotate.d/mysql as a config file (BUG 2156) - -* Fri Dec 12 2003 Lenz Grimmer - -- fixed file permissions (BUG 1672) - -* Thu Dec 11 2003 Lenz Grimmer - -- made testing for gcc3 a bit more robust - -* Fri Dec 05 2003 Lenz Grimmer - -- added missing file mysql_create_system_tables to the server subpackage - -* Fri Nov 21 2003 Lenz Grimmer - -- removed dependency on MySQL-client from the MySQL-devel subpackage - as it is not really required. (BUG 1610) - -* Fri Aug 29 2003 Lenz Grimmer - -- Fixed BUG 1162 (removed macro names from the changelog) -- Really fixed BUG 998 (disable the checking for installed but - unpackaged files) - -* Tue Aug 05 2003 Lenz Grimmer - -- Fixed BUG 959 (libmysqld not being compiled properly) -- Fixed BUG 998 (RPM build errors): added missing files to the - distribution (mysql_fix_extensions, mysql_tableinfo, mysqldumpslow, - mysql_fix_privilege_tables.1), removed "-n" from install section. - -* Wed Jul 09 2003 Lenz Grimmer - -- removed the GIF Icon (file was not included in the sources anyway) -- removed unused variable shared_lib_version -- do not run automake before building the standard binary - (should not be necessary) -- add server suffix '-standard' to standard binary (to be in line - with the binary tarball distributions) -- Use more RPM macros (_exec_prefix, _sbindir, _libdir, _sysconfdir, - _datadir, _includedir) throughout the spec file. -- allow overriding CC and CXX (required when building with other compilers) - -* Fri May 16 2003 Lenz Grimmer - -- re-enabled RAID again - -* Wed Apr 30 2003 Lenz Grimmer - -- disabled MyISAM RAID (--with-raid) - it throws an assertion which - needs to be investigated first. - -* Mon Mar 10 2003 Lenz Grimmer - -- added missing file mysql_secure_installation to server subpackage - (BUG 141) - -* Tue Feb 11 2003 Lenz Grimmer - -- re-added missing pre- and post(un)install scripts to server subpackage -- added config file /etc/my.cnf to the file list (just for completeness) -- make sure to create the datadir with 755 permissions - -* Mon Jan 27 2003 Lenz Grimmer - -- removed unused CC and CXX variables -- CFLAGS and CXXFLAGS should honor RPM_OPT_FLAGS - -* Fri Jan 24 2003 Lenz Grimmer - -- renamed package "MySQL" to "MySQL-server" -- fixed Copyright tag -- added mysql_waitpid to client subpackage (required for mysql-test-run) - -* Wed Nov 27 2002 Lenz Grimmer - -- moved init script from /etc/rc.d/init.d to /etc/init.d (the majority of - Linux distributions now support this scheme as proposed by the LSB either - directly or via a compatibility symlink) -- Use new "restart" init script action instead of starting and stopping - separately -- Be more flexible in activating the automatic bootup - use insserv (on - older SuSE versions) or chkconfig (Red Hat, newer SuSE versions and - others) to create the respective symlinks - -* Wed Sep 25 2002 Lenz Grimmer - -- MySQL-Max now requires MySQL >= 4.0 to avoid version mismatches - (mixing 3.23 and 4.0 packages) - -* Fri Aug 09 2002 Lenz Grimmer - -- Turn off OpenSSL in MySQL-Max for now until it works properly again -- enable RAID for the Max binary instead -- added compatibility link: safe_mysqld -> mysqld_safe to ease the - transition from 3.23 - -* Thu Jul 18 2002 Lenz Grimmer - -- Reworked the build steps a little bit: the Max binary is supposed - to include OpenSSL, which cannot be linked statically, thus trying - to statically link against a special glibc is futile anyway -- because of this, it is not required to make yet another build run - just to compile the shared libs (saves a lot of time) -- updated package description of the Max subpackage -- clean up the BuildRoot directory afterwards - -* Mon Jul 15 2002 Lenz Grimmer - -- Updated Packager information -- Fixed the build options: the regular package is supposed to - include InnoDB and linked statically, while the Max package - should include BDB and SSL support - -* Fri May 03 2002 Lenz Grimmer - -- Use more RPM macros (e.g. infodir, mandir) to make the spec - file more portable -- reorganized the installation of documentation files: let RPM - take care of this -- reorganized the file list: actually install man pages along - with the binaries of the respective subpackage -- do not include libmysqld.a in the devel subpackage as well, if we - have a special "embedded" subpackage -- reworked the package descriptions - -* Mon Oct 8 2001 Monty - -- Added embedded server as a separate RPM - -* Fri Apr 13 2001 Monty - -- Added mysqld-max to the distribution - -* Tue Jan 2 2001 Monty - -- Added mysql-test to the bench package - -* Fri Aug 18 2000 Tim Smith - -- Added separate libmysql_r directory; now both a threaded - and non-threaded library is shipped. - -* Wed Sep 29 1999 David Axmark - -- Added the support-files/my-example.cnf to the docs directory. - -- Removed devel dependency on base since it is about client - development. - -* Wed Sep 8 1999 David Axmark - -- Cleaned up some for 3.23. - -* Thu Jul 1 1999 David Axmark - -- Added support for shared libraries in a separate sub - package. Original fix by David Fox (dsfox@cogsci.ucsd.edu) - -- The --enable-assembler switch is now automatically disables on - platforms there assembler code is unavailable. This should allow - building this RPM on non i386 systems. - -* Mon Feb 22 1999 David Axmark - -- Removed unportable cc switches from the spec file. The defaults can - now be overridden with environment variables. This feature is used - to compile the official RPM with optimal (but compiler version - specific) switches. - -- Removed the repetitive description parts for the sub rpms. Maybe add - again if RPM gets a multiline macro capability. - -- Added support for a pt_BR translation. Translation contributed by - Jorge Godoy . - -* Wed Nov 4 1998 David Axmark - -- A lot of changes in all the rpm and install scripts. This may even - be a working RPM :-) - -* Sun Aug 16 1998 David Axmark - -- A developers changelog for MySQL is available in the source RPM. And - there is a history of major user visible changed in the Reference - Manual. Only RPM specific changes will be documented here. diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 4bcb245f3837..0d09b0c6a176 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -127,10 +127,14 @@ BuildConflicts: post-build-checks BuildRequires: gcc-c++ ncurses-devel perl zlib-devel cmake libaio-devel bison flex +BuildRequires: openssl-devel %if 0%{?rhel} == 6 || 0%{?rhel} == 7 || 0%{?fedora} == 20 || 0%{?fedora} == 21 BuildRequires: time %endif +%if 0%{?rhel} == 7 +BuildRequires: perl(Time::HiRes) perl(Env) +%endif %if 0%{?suse_version} %if 0%{?suse_version} == 1110 @@ -142,6 +146,7 @@ BuildRequires: gperf procps time %endif # Define dist tag if not given by platform +# In case of problems, check "/etc/rpm/macros.dist" %if %{undefined dist} # For suse versions see: # https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto @@ -162,15 +167,14 @@ BuildRequires: gperf procps time %define dist .DIST %endif %endif - +# CentOS 7 would force ".el7.centos", we want to avoid that. +%if 0%{?rhel} == 7 + %define dist .el7 +%endif # Avoid debuginfo RPMs, leaves binaries unstripped %define debug_package %{nil} -# Hack to work around bug in RHEL5 __os_install_post macro, wrong inverted -# test for __debug_package -%define __strip /bin/true - # ---------------------------------------------------------------------------- # Support optional "tcmalloc" library (experimental) # ---------------------------------------------------------------------------- @@ -180,6 +184,38 @@ BuildRequires: gperf procps time %define WITH_TCMALLOC 0 %endif +############################################################################## +# Settings for the "compatibility libs", the version depends on the target platform +############################################################################## + +# To differ between current main version and libs-compat: +%global currentlib 18 + +%if 0%{?rhel} == 6 +%global compatver 5.1.73 +%global compatlib 16 +%global compatsrc https://cdn.mysql.com/Downloads/MySQL-5.1/mysql-%{compatver}.tar.gz +%global compatch mysql-5173-charset-dir.patch +%endif + +# mysql-wsrep-5.5 has libmysqlclient.so.18, as have 5.6 and 5.7; +# same as preinstalled mariadb-libs, so we currently need no libs-compat on RHEL 7. +# This becomes relevant with a MySQL 5.8 (or higher) that has a libmysqlclient.so.19 or higher. +# +# %%if 0%%{?rhel} == 7 +# %%global compatver 5.5.45 +# %%global compatlib 18 +# %%global compatsrc https://cdn.mysql.com/Downloads/MySQL-5.5/mysql-%%{compatver}.tar.gz +# %%global compatch mysql-5545-charset-dir.patch +# # By default, a build will include the bundeled "yaSSL" library for SSL. +# %%{?with_ssl: %%global ssl_option -DWITH_SSL=%%{with_ssl}} +# %%endif + +%if 0%{?compatlib} +# Attention: "compat_src_dir" is the old version (e.g. 5.1.73), depends on platform +%global compat_src_dir mysql-%{compatver} +%endif + ############################################################################## # Configuration based upon above user input, not to be set directly ############################################################################## @@ -188,15 +224,16 @@ BuildRequires: gperf procps time %define license_files_server %{src_dir}/LICENSE.mysql %define license_type Commercial %else -%define license_files_server COPYING README +%define license_files_server %{src_dir}/COPYING %{src_dir}/README %define license_type GPL +%define compat_license_files_server %{compat_src_dir}/COPYING %{compat_src_dir}/README %endif ############################################################################## # Main spec file section ############################################################################## -Name: MySQL%{product_suffix} +Name: mysql-wsrep%{product_suffix} Summary: MySQL: a very fast and reliable SQL database server Group: Applications/Databases Version: @MYSQL_RPM_VERSION@ @@ -204,14 +241,26 @@ Release: %{release}%{dist} # Distribution: %{distro_description} License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{license_type} license as shown in the Description field. Source: %{src_dir}.tar.gz +%if 0%{?compatlib} +Source7: %{compatsrc} +%endif Source99: mysql-rpmlintrc Patch0: cmake-no-wix.patch +%if 0%{?compatlib} +Patch7: %{compatch} +%if 0%{?compatlib} == 18 +Patch8: mysql-5.5-libmysqlclient-symbols.patch +%endif +%endif URL: http://www.mysql.com/ Packager: Codership Oy Vendor: %{mysql_vendor} # BuildRequires: %{distro_buildreq} #wsrep_patch_tag +Requires: mysql-wsrep-server%{product_suffix} +Requires: mysql-wsrep-client%{product_suffix} + # Regression tests may take a long time, override the default to skip them %{!?runselftest:%global runselftest 0} @@ -238,26 +287,16 @@ The MySQL web site (http://www.mysql.com/) provides the latest news and information about the MySQL software. Also please see the documentation and the manual for more information. +This is a meta package of the MySQL software combined with the "wsrep plugin" +aka "Galera Cluster", all governed by the GPL. +It causes the installation of both the server and the client subpackages +so that the machine can be used both as a local database server and as a node +in a MySQL Galera Cluster. + ############################################################################## # Sub package definition ############################################################################## -%package -n mysql-wsrep%{product_suffix} -Summary: MySQL: meta package for a server+client setup -Group: Applications/Databases -Requires: mysql-wsrep-server%{product_suffix} -Requires: mysql-wsrep-client%{product_suffix} - -%description -n mysql-wsrep%{product_suffix} -This meta package ensures the installation of a MySQL server and the necessary -client programs for operation and administration. It does not itself -contain those files but rather causes the installation of the subpackages -"mysql-wsrep-server%{product_suffix}" and "mysql-wsrep-client%{product_suffix}". -As indicated in the name, the server is built with the "wsrep" plugin so that -it can be a node in a MySQL Galera Cluster. - -# ---------------------------------------------------------------------------- - %package -n mysql-wsrep-server%{product_suffix} Summary: MySQL: a very fast and reliable SQL database server Group: Applications/Databases @@ -286,6 +325,10 @@ Obsoletes: mysql-server < %{version}-%{release} Obsoletes: mysql-server-advanced Obsoletes: MySQL-server-classic MySQL-server-community MySQL-server-enterprise Obsoletes: MySQL-server-advanced-gpl MySQL-server-enterprise-gpl +%if 0%{?rhel} +# RedHat has /usr/share/mysql/* in a separate package +Obsoletes: mysql-common +%endif Provides: mysql-server = %{version}-%{release} Provides: mysql-server%{?_isa} = %{version}-%{release} @@ -310,9 +353,9 @@ and the manual for more information. This package includes the MySQL server binary as well as related utilities to run and administer a MySQL server. -Built with wsrep patch %{wsrep_version}. +Built with wsrep patch %{wsrep_version}, to be a node in a Galera cluster. -If you want to access and work with the database, you have to install +If you want to access and work with the database locally, you have to install package "mysql-wsrep-client%{product_suffix}" as well! # ---------------------------------------------------------------------------- @@ -330,6 +373,8 @@ Obsoletes: MySQL-client-classic MySQL-client-community MySQL-client-enterpr Obsoletes: MySQL-client-advanced-gpl MySQL-client-enterprise-gpl Provides: mysql = %{version}-%{release} Provides: mysql%{?_isa} = %{version}-%{release} +Provides: mysql-client = %{version} +Provides: MySQL-client = %{version} %description -n mysql-wsrep-client%{product_suffix} This package contains the standard MySQL clients and administration tools. @@ -351,6 +396,8 @@ Obsoletes: mysql-test < %{version}-%{release} Obsoletes: mysql-test-advanced Obsoletes: MySQL-test-classic MySQL-test-community MySQL-test-enterprise Obsoletes: MySQL-test-advanced-gpl MySQL-test-enterprise-gpl +Obsoletes: mysql-bench +Obsoletes: MySQL-bench Provides: mysql-test = %{version}-%{release} Provides: mysql-test%{?_isa} = %{version}-%{release} AutoReqProv: no @@ -396,11 +443,53 @@ Obsoletes: MySQL-shared-pro-cert MySQL-shared-pro-gpl Obsoletes: MySQL-shared-pro-gpl-cert Obsoletes: MySQL-shared-classic MySQL-shared-community MySQL-shared-enterprise Obsoletes: MySQL-shared-advanced-gpl MySQL-shared-enterprise-gpl +# RHEL uses other names: +Obsoletes: mysql-libs +# Necessary on RHEL 7, no harm on other platforms: +Obsoletes: mariadb-libs %description -n mysql-wsrep-shared%{product_suffix} This package contains the shared libraries (*.so*) which certain languages and applications need to dynamically load and use MySQL. +# ---------------------------------------------------------------------------- +%if 0%{?compatlib} +%package -n mysql-wsrep-libs-compat%{product_suffix} +Summary: Shared libraries for MySQL %{compatver} database client applications +Group: Applications/Databases + +Provides: mysql-libs-compat = %{version} +Provides: mysql-libs-compat%{?_isa} = %{version} +Obsoletes: mysql-libs-compat < %{version} +Provides: MySQL-shared-compat%{?_isa} = %{version} +Obsoletes: MySQL-shared-compat < %{version} + +# Dealing with RHEL 6 and upwards (and compatible ...) +# Directly, we replace "libs" only; but RedHat "client" and "server" need files from "libs" +Provides: mysql-libs = %{compatver} +Obsoletes: mysql-libs < %{version} + +%if 0%{?rhel} > 6 +# Dealing with RHEL 7 and upwards (and compatible ...) +# Above general section for RHEL also applies, it deals with "mysql" packages. +# But with RHEL 7, we also get "mariadb" ... +Obsoletes: mariadb-libs +%endif + +%description -n mysql-wsrep-libs-compat%{product_suffix} +The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, +and robust SQL (Structured Query Language) database server. +See the MySQL web site (http://www.mysql.com/) for further information, +including its dual licensing (GNU GPL or commercial licenses). + +This package contains the shared libraries for (old) MySQL %{compatver} client +applications. +It is intended for RHEL %{?rhel} and compatible distributions, +to satisfy the dependencies of several applications shipping with that distro +while the MySQL software on the machine is updated to a newer release series. + +%endif + # ---------------------------------------------------------------------------- %package -n MySQL-embedded%{product_suffix} Summary: MySQL - Embedded library @@ -434,14 +523,93 @@ For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ ############################################################################## %prep -%setup -n %{src_dir} +%if 0%{?compatlib} +%setup -q -T -a 0 -a 7 -c -n %{name} +# -q = quiet, -T = no default unpack, -n = source dir name, -c = create, -a = unpack after cd +# https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s04.html +# http://rpm.org/max-rpm-snapshot/s1-rpm-inside-macros.html +pushd %{compat_src_dir} +%patch7 -p 1 +%if 0%{?compatlib} == 18 +%patch8 -p 1 +%endif +popd +%else +%setup -q -T -a 0 -c -n %{name} +%endif # 0%{?compatlib} + # That patch is needed with old cmake only, on SLES 11, but it won't do any harm # outside Windows, so it may be used in all RPM builds. +pushd %{src_dir} %patch0 -p1 #wsrep_apply_patch_tag +popd + ############################################################################## %build +# Build compat libs +%if 0%{?compatlib} +( +%if 0%{?compatlib} == 16 +# RHEL 6: MySQL 5.1, using traditional "configure ; make" +export CC="gcc" CXX="g++" +export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv" +export CXXFLAGS="$CFLAGS %{?el6:-felide-constructors} -fno-rtti -fno-exceptions" +pushd %{compat_src_dir} +%configure \ + --with-readline \ + --without-debug \ + --enable-shared \ + --localstatedir=/var/lib/mysql \ + --with-unix-socket-path=/var/lib/mysql/mysql.sock \ + --with-mysqld-user="mysql" \ + --with-extra-charsets=all \ + --enable-local-infile \ + --enable-largefile \ + --enable-thread-safe-client \ + --with-ssl=%{_prefix} \ + --with-embedded-server \ + --with-big-tables \ + --with-pic \ + --with-plugin-innobase \ + --with-plugin-innodb_plugin \ + --with-plugin-partition \ + --disable-dependency-tracking +make %{?_smp_mflags} +popd +%endif +##### +%if 0%{?compatlib} == 18 +# RHEL 7: MySQL 5.5, using "cmake ; make" +mkdir release +cd release +cmake ../%{compat_src_dir} \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DENABLE_DTRACE=OFF \ + -DCMAKE_C_FLAGS="%{optflags}" \ + -DCMAKE_CXX_FLAGS="%{optflags}" \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DINSTALL_SQLBENCHDIR=share \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DFEATURE_SET="%{feature_set}" \ + -DWITH_EMBEDDED_SERVER=1 \ + -DWITH_EMBEDDED_SHARED_LIBRARY=1 \ + %{?ssl_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_release}" \ + -DMYSQL_SERVER_SUFFIX="%{?server_suffix}" +echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG +make %{?_smp_mflags} VERBOSE=1 +cd .. +%endif +) +%endif + +pushd %{src_dir} + # Fail quickly and obviously if user tries to build as root %if %runselftest if [ x"`id -u`" = x0 ]; then @@ -547,12 +715,40 @@ mkdir release (cd release && make test-bt-fast || true) %endif +popd ############################################################################## %install +%if 0%{?compatlib} +( +cd $RPM_BUILD_DIR/%{name} + +# Install compat libs +# This must be done *before* the current libs are installed, for the "rm *.{a,la,so}" +%if 0%{?compatlib} == 16 +for dir in mysql-%{compatver}/libmysql mysql-%{compatver}/libmysql_r ; do +%else +for dir in release/libmysql ; do +%endif + pushd $dir + make DESTDIR=%{buildroot} install + popd +done +rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient{,_r}.{a,la,so} + +# "charsets/" +install -d -m 0755 %{buildroot}/usr/share/mysql/charsets-%{compatver}/ +install -m 644 mysql-%{compatver}/sql/share/charsets/* %{buildroot}/usr/share/mysql/charsets-%{compatver}/ + +# Add libdir to linker +install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d +echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf +) +%endif RBR=$RPM_BUILD_ROOT -MBD=$RPM_BUILD_DIR/%{src_dir} +MBD=$RPM_BUILD_DIR/%{name}/%{src_dir} +cd $MBD # Ensure that needed directories exists install -d $RBR%{_sysconfdir}/{logrotate.d,init.d} @@ -590,7 +786,7 @@ mkdir -p $RBR%{_sysconfdir}/my.cnf.d ) # FIXME: at some point we should stop doing this and just install everything -# FIXME: directly into %{_libdir}/mysql - perhaps at the same time as renaming +# FIXME: directly into %%{_libdir}/mysql - perhaps at the same time as renaming # FIXME: the shared libraries to use libmysql*-$major.$minor.so syntax mv -v $RBR/%{_libdir}/*.a $RBR/%{_libdir}/mysql/ @@ -615,6 +811,10 @@ touch $RBR%{_sysconfdir}/wsrep.cnf install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \ $RBR%{_datadir}/mysql/SELinux/RHEL4 +# Get the list of "_datadir" files, remove those that go into "libs-compat" +find $RBR%{_datadir}/mysql -type f -print | sed -e "s=$RBR==" \ + | fgrep -v "charsets-%{compatver}" | sort > $MBD/release/datadir.files + %if %{WITH_TCMALLOC} # Even though this is a shared library, put it under /usr/lib*/mysql, so it # doesn't conflict with possible shared lib by the same name in /usr/lib*. See @@ -625,7 +825,9 @@ install -m 644 "%{malloc_lib_source}" \ # Remove man pages we explicitly do not want to package, avoids 'unpackaged # files' warning. -# This has become obsolete: rm -f $RBR%{_mandir}/man1/make_win_bin_dist.1* +# This has become obsolete: rm -f $RBR%%{_mandir}/man1/make_win_bin_dist.1* + +%check ############################################################################## # Post processing actions, i.e. when installed @@ -1065,19 +1267,19 @@ echo "=====" >> $STATUS_HISTORY # Intentionally empty - this is a pure meta package. # ---------------------------------------------------------------------------- -%files -n mysql-wsrep-server%{product_suffix} -f release/support-files/plugins.files +%files -n mysql-wsrep-server%{product_suffix} -f %{src_dir}/release/support-files/plugins.files -f %{src_dir}/release/datadir.files %defattr(-,root,root,0755) %if %{defined license_files_server} %doc %{license_files_server} %endif -%doc Docs/ChangeLog -%doc release/Docs/INFO_SRC* -%doc release/Docs/INFO_BIN* -%doc release/support-files/my-*.cnf -%doc Docs/README-wsrep -%doc release/support-files/wsrep.cnf -%doc release/support-files/wsrep_notify +%doc %{src_dir}/Docs/ChangeLog +%doc %{src_dir}/release/Docs/INFO_SRC* +%doc %{src_dir}/release/Docs/INFO_BIN* +%doc %{src_dir}/release/support-files/my-*.cnf +%doc %{src_dir}/Docs/README-wsrep +%doc %{src_dir}/release/support-files/wsrep.cnf +%doc %{src_dir}/release/support-files/wsrep_notify %if 0%{?commercial} %doc %attr(644, root, root) %{_infodir}/mysql.info* @@ -1144,13 +1346,13 @@ echo "=====" >> $STATUS_HISTORY %attr(755, root, root) %{_bindir}/wsrep_sst_common %attr(755, root, root) %{_bindir}/wsrep_sst_mysqldump %attr(755, root, root) %{_bindir}/wsrep_sst_rsync -%attr(755, root, root) %{_bindir}/wsrep_sst_rsync_wan +%attr( - , root, root) %{_bindir}/wsrep_sst_rsync_wan %attr(755, root, root) %{_bindir}/wsrep_sst_xtrabackup %attr(755, root, root) %{_bindir}/wsrep_sst_xtrabackup-v2 %attr(755, root, root) %{_sbindir}/mysqld %attr(755, root, root) %{_sbindir}/mysqld-debug -%attr(755, root, root) %{_sbindir}/rcmysql +%attr( - , root, root) %{_sbindir}/rcmysql %attr(755, root, root) %{_libdir}/mysql/plugin/daemon_example.ini %if %{WITH_TCMALLOC} @@ -1159,7 +1361,7 @@ echo "=====" >> $STATUS_HISTORY %attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql %attr(755, root, root) %{_sysconfdir}/init.d/mysql -%attr(755, root, root) %{_datadir}/mysql/ +# %%attr(755, root, root) %%{_datadir}/mysql/ ## See "-f datadir.files" at section top # ---------------------------------------------------------------------------- %files -n mysql-wsrep-client%{product_suffix} @@ -1170,7 +1372,7 @@ echo "=====" >> $STATUS_HISTORY %attr(755, root, root) %{_bindir}/mysql_find_rows %attr(755, root, root) %{_bindir}/mysql_waitpid %attr(755, root, root) %{_bindir}/mysqlaccess -# XXX: This should be moved to %{_sysconfdir} +# XXX: This should be moved to %%{_sysconfdir} %attr(644, root, root) %{_bindir}/mysqlaccess.conf %attr(755, root, root) %{_bindir}/mysqladmin %attr(755, root, root) %{_bindir}/mysqlbinlog @@ -1194,7 +1396,7 @@ echo "=====" >> $STATUS_HISTORY %doc %attr(644, root, man) %{_mandir}/man1/mysqlslap.1* # ---------------------------------------------------------------------------- -%files -n mysql-wsrep-devel%{product_suffix} -f optional-files-devel +%files -n mysql-wsrep-devel%{product_suffix} -f %{src_dir}/optional-files-devel %defattr(-, root, root, 0755) %doc %attr(644, root, man) %{_mandir}/man1/comp_err.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql_config.1* @@ -1211,7 +1413,8 @@ echo "=====" >> $STATUS_HISTORY %files -n mysql-wsrep-shared%{product_suffix} %defattr(-, root, root, 0755) # Shared libraries (omit for architectures that don't support them) -%{_libdir}/libmysql*.so* +%{_libdir}/libmysql*.so +%{_libdir}/libmysql*.so.%{currentlib}* %post -n mysql-wsrep-shared%{product_suffix} /sbin/ldconfig @@ -1219,6 +1422,28 @@ echo "=====" >> $STATUS_HISTORY %postun -n mysql-wsrep-shared%{product_suffix} /sbin/ldconfig +# ---------------------------------------------------------------------------- +%if 0%{?compatlib} +%files -n mysql-wsrep-libs-compat%{product_suffix} +%defattr(-, root, root, -) +%doc %{?compat_license_files_server} +%dir %attr(755, root, root) %{_libdir}/mysql +%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf +%{_libdir}/mysql/libmysqlclient.so.%{compatlib} +%{_libdir}/mysql/libmysqlclient.so.%{compatlib}.0.0 +%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib} +%{_libdir}/mysql/libmysqlclient_r.so.%{compatlib}.0.0 +%dir %attr(755, root, root) %{_datadir}/mysql/ +%dir %attr(755, root, root) %{_datadir}/mysql/charsets-%{compatver}/ +%attr(644, root, root) %{_datadir}/mysql/charsets-%{compatver}/* + +%post -n mysql-wsrep-libs-compat%{product_suffix} +/sbin/ldconfig + +%postun -n mysql-wsrep-libs-compat%{product_suffix} +/sbin/ldconfig +%endif + # ---------------------------------------------------------------------------- %files -n mysql-wsrep-test%{product_suffix} %defattr(-, root, root, 0755) @@ -1236,6 +1461,58 @@ echo "=====" >> $STATUS_HISTORY # merging BK trees) ############################################################################## %changelog +* Thu Sep 17 2015 Joerg Bruehe +- Let the "server" RPM get rid of RedHat's "common" ("charsets/", "errmsg.sys"). + +* Tue Sep 15 2015 Joerg Bruehe +- Fixed the issue with "-f plugins.files", switched back to that approach. + The base cause was a wrong use of "%%setup" for this multi-source build. +- Let the meta package of client and server be the main package, not a subpackage. +- Use the "%%files ... -f LIST_FILE" mechanism for "%%{_datadir}", it is the + best way to get rid of files that go into "libs-compat" only. + +* Mon Sep 14 2015 Joerg Bruehe +- The mechanism "%%files ... -f LIST_FILE" doesn't work, so the plugin files + must be listed directly in the section "%%files -n mysql-wsrep-server". + +* Fri Sep 11 2015 Joerg Bruehe +- Integrate the separate "libs-compat" spec file with the general "mysql-wsrep", + so that "libs-compat" becomes just another subpackage. +- Change history of the separate "libs-compat" spec file, all by this author in 2015: +- Thu Sep 10: +- - Remove code to deal with RHEL 5, there will not be any support for that + obsolete platform. +- - For MySQl 5.5 / 5.6 / 5.7, there is no need for "libs-compat" on RHEL 7 + because both are SO version 18; turn description into comment. +- Tue Sep 08: +- - Finish the code for RHEL 7, using MySQL 5.5.45 as published by Oracle. +- - Severe bug: Path for "charsets" files did not match the patch, fix it. +- - This is in the 5.5 branch, fix the spec file version. +- Thu Sep 03 2015 Joerg Bruehe +- - Change the name from "mysql-libs-compat" to "mysql-wsrep-libs-compat". +- - Change the compatibility version for RHEL 6 from MySQL 5.1.72 to 5.1.73. +- - Start adding settings for RHEL 7, to replace the pre-installed "mariadb-libs 5.5.37". +- Tue Apr 28: +- - Improve the dependency / conflicts settings. +- - Drop the name component "community", 3rd party builds don't use it. +- Tue Mar 10: +- - Sometimes, "libmysqlclient.so" needs the files in "/usr/share/mysql/charsets/", + so the package should better contain them, but have the path name contain the + version number to make it independent of other packages. +- Mon Feb 09: +- - "g++: command not found" on RedHat 5 + 6, added "BuildRequires: gcc-c++". +- - "time" is a RedHat-only package, not needed to build on SuSE. +- Fri Feb 06: +- - Add code to identify RedHat 5 during build, "rhel" is not predefined there. +- - Start adding "conflicts" directives to get rid of other MySQL library RPMs. +- - Try with "CXX=g++". +- Thu Feb 05: +- - This spec file handles the "compat" RPM for the "libmysqlclient.so" only. + It is created as a subset of the overall MySQL 5.6.23 spec file + (file "packaging/rpm-oel/mysql.spec.in" in the source tree), + see that file's "changelog" section for its history. +- - Add "CC=gcc CXX=gcc" as used in 5.0 and 5.1 builds (missing in that 5.6.23 spec file) + * Sat Feb 7 2015 Teemu Ollakka - Merged OBS changes from 5.6 branch From 8d6c8c991d4526922d1e2cf7587a6de27b88b25f Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Thu, 22 Oct 2015 23:33:44 -0700 Subject: [PATCH 060/305] MTR Tests: Fix t/events_1.test by replacing year 2015 with 2038 --- mysql-test/r/events_1.result | 2 +- mysql-test/t/events_1.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/events_1.result b/mysql-test/r/events_1.result index 29e81975c874..490ef173d0a9 100644 --- a/mysql-test/r/events_1.result +++ b/mysql-test/r/events_1.result @@ -114,7 +114,7 @@ create table t_event3 (a int, b float); drop event if exists event3; Warnings: Note 1305 Event event3 does not exist -create event event3 on schedule every 50 + 10 minute starts date_add("20100101", interval 5 minute) ends date_add("20151010", interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand()); +create event event3 on schedule every 50 + 10 minute starts date_add("20100101", interval 5 minute) ends date_add("20380101", interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand()); select count(*) from t_event3; count(*) 0 diff --git a/mysql-test/t/events_1.test b/mysql-test/t/events_1.test index 7f31e3fc8818..89a063191832 100644 --- a/mysql-test/t/events_1.test +++ b/mysql-test/t/events_1.test @@ -125,7 +125,7 @@ drop event existant; create table t_event3 (a int, b float); drop event if exists event3; -create event event3 on schedule every 50 + 10 minute starts date_add("20100101", interval 5 minute) ends date_add("20151010", interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand()); +create event event3 on schedule every 50 + 10 minute starts date_add("20100101", interval 5 minute) ends date_add("20380101", interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand()); let $wait_condition=SELECT count(*)=0 from t_event3; --source include/wait_condition.inc select count(*) from t_event3; From 27e221d46b146845aaedffaa1067eb7ecd9a7d7c Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Tue, 20 Oct 2015 17:54:14 +0200 Subject: [PATCH 061/305] refs codership/mysql-wsrep#201 - Fixes query cache so that it is aware of wsrep_sync_wait. Query cache would return (possibly stale) results to the client, regardless of the value of wsrep_sync_wait. - Includes the test case that reproduced the issue. --- .../suite/galera/r/mysql-wsrep#201.result | 4 +++ .../suite/galera/t/mysql-wsrep#201-master.opt | 1 + .../suite/galera/t/mysql-wsrep#201.test | 33 +++++++++++++++++++ sql/sql_cache.cc | 20 +++++++++++ sql/sql_class.cc | 6 ++++ sql/sql_class.h | 1 + sql/wsrep_mysqld.cc | 17 ++++++---- sql/wsrep_mysqld.h | 1 + 8 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 mysql-test/suite/galera/r/mysql-wsrep#201.result create mode 100644 mysql-test/suite/galera/t/mysql-wsrep#201-master.opt create mode 100644 mysql-test/suite/galera/t/mysql-wsrep#201.test diff --git a/mysql-test/suite/galera/r/mysql-wsrep#201.result b/mysql-test/suite/galera/r/mysql-wsrep#201.result new file mode 100644 index 000000000000..1c0998e35ac8 --- /dev/null +++ b/mysql-test/suite/galera/r/mysql-wsrep#201.result @@ -0,0 +1,4 @@ +CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (DEFAULT); +SET GLOBAL query_cache_size=1355776; +SET SESSION wsrep_sync_wait = 7; diff --git a/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt b/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt new file mode 100644 index 000000000000..a00258bc48c2 --- /dev/null +++ b/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt @@ -0,0 +1 @@ +--query_cache_type=1 diff --git a/mysql-test/suite/galera/t/mysql-wsrep#201.test b/mysql-test/suite/galera/t/mysql-wsrep#201.test new file mode 100644 index 000000000000..cc842afb6d04 --- /dev/null +++ b/mysql-test/suite/galera/t/mysql-wsrep#201.test @@ -0,0 +1,33 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_query_cache.inc + +CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (DEFAULT); + +--connection node_2 +--let $qcache_size_orig = `SELECT @@GLOBAL.query_cache_size` +SET GLOBAL query_cache_size=1355776; +SET SESSION wsrep_sync_wait = 7; + +--disable_query_log + +--let $count = 10000 +while ($count) +{ + --connection node_1 + INSERT INTO t1 VALUES (DEFAULT); + --let $val1 = `SELECT LAST_INSERT_ID()` + --connection node_2 + --let $val2 = `SELECT MAX(id) FROM t1` + --let $val3 = `SELECT $val1 != $val2` + if ($val3) + { + --echo $val1 $val2 + --die wsrep_sync_wait failed + } + --dec $count +} + +--eval SET GLOBAL query_cache_size = $qcache_size_orig +DROP TABLE t1; diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index e1f9e68ff838..9515edc4d884 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1536,6 +1536,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) goto err; } } + /* Try to obtain an exclusive lock on the query cache. If the cache is disabled or if a full cache flush is in progress, the attempt to @@ -1628,6 +1629,25 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d", } DBUG_PRINT("qcache", ("Query in query hash 0x%lx", (ulong)query_block)); +#ifdef WITH_WSREP + if (WSREP_CLIENT(thd) && wsrep_must_sync_wait(thd)) { + unlock(); + if (wsrep_sync_wait(thd)) + goto err; + if (try_lock(TRUE)) + goto err; + query_block = (Query_cache_block *) my_hash_search(&queries, + (uchar*) sql, + tot_length); + if (query_block == 0 || + query_block->query()->result() == 0 || + query_block->query()->result()->type != Query_cache_block::RESULT) + { + goto err_unlock; + } + } +#endif /* WITH_WSREP */ + /* Now lock and test that nothing changed while blocks was unlocked */ BLOCK_LOCK_RD(query_block); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 0815e8ee950e..22cd85eb00fa 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1096,6 +1096,7 @@ THD::THD() wsrep_mysql_replicated = 0; wsrep_TOI_pre_query = NULL; wsrep_TOI_pre_query_len = 0; + wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED; #endif /* Call to init() below requires fully initialized Open_tables_state. */ reset_open_tables_state(this); @@ -1469,6 +1470,7 @@ void THD::init(void) wsrep_mysql_replicated = 0; wsrep_TOI_pre_query = NULL; wsrep_TOI_pre_query_len = 0; + wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED; #endif if (variables.sql_log_bin) @@ -1992,6 +1994,10 @@ void THD::cleanup_after_query() if (rli_slave) rli_slave->cleanup_after_query(); #endif + +#ifdef WITH_WSREP + wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED; +#endif /* WITH_WSREP */ } diff --git a/sql/sql_class.h b/sql/sql_class.h index 5a3f4356fef8..45a0016b5eba 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -2235,6 +2235,7 @@ class THD :public Statement, the actual TOI query */ size_t wsrep_TOI_pre_query_len; bool wsrep_apply_toi; /* applier processing in TOI */ + wsrep_gtid_t wsrep_sync_wait_gtid; #endif /* WITH_WSREP */ /** Internal parser state. diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 9de7b23e5f2e..9a9ad1943773 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -845,19 +845,24 @@ bool wsrep_start_replication() return true; } +bool wsrep_must_sync_wait (THD* thd, uint mask) +{ + return (thd->variables.wsrep_sync_wait & mask) && + thd->variables.wsrep_on && + !thd->in_active_multi_stmt_transaction() && + thd->wsrep_conflict_state != REPLAYING && + thd->wsrep_sync_wait_gtid.seqno == WSREP_SEQNO_UNDEFINED; +} + bool wsrep_sync_wait (THD* thd, uint mask) { - if ((thd->variables.wsrep_sync_wait & mask) && - thd->variables.wsrep_on && - !thd->in_active_multi_stmt_transaction() && - thd->wsrep_conflict_state != REPLAYING) + if (wsrep_must_sync_wait(thd, mask)) { WSREP_DEBUG("wsrep_sync_wait: thd->variables.wsrep_sync_wait = %u, mask = %u", thd->variables.wsrep_sync_wait, mask); // This allows autocommit SELECTs and a first SELECT after SET AUTOCOMMIT=0 // TODO: modify to check if thd has locked any rows. - wsrep_gtid_t gtid; - wsrep_status_t ret= wsrep->causal_read (wsrep, >id); + wsrep_status_t ret= wsrep->causal_read (wsrep, &thd->wsrep_sync_wait_gtid); if (unlikely(WSREP_OK != ret)) { diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index a2c8e479a459..95b2c0e7cd3c 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -179,6 +179,7 @@ extern void wsrep_kill_mysql(THD *thd); /* new defines */ extern void wsrep_stop_replication(THD *thd); extern bool wsrep_start_replication(); +extern bool wsrep_must_sync_wait (THD* thd, uint mask = WSREP_SYNC_WAIT_BEFORE_READ); extern bool wsrep_sync_wait (THD* thd, uint mask = WSREP_SYNC_WAIT_BEFORE_READ); extern int wsrep_check_opts (int argc, char* const* argv); extern void wsrep_prepend_PATH (const char* path); From 440379d6f5e21144ab01c1d1a34192dd7c839f94 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Thu, 22 Oct 2015 17:30:20 +0200 Subject: [PATCH 062/305] refs codership/mysql-wsrep#201 - Eliminates code duplication in query cache patch - Reduces the number of iterations in mysql-wsrep#201.test to shorten the execution time - Adds a new test case that exercises more scenarios --- .../r/galera_query_cache_sync_wait.result | 45 ++++++++++ .../t/galera_query_cache_sync_wait-master.opt | 1 + .../t/galera_query_cache_sync_wait.test | 90 +++++++++++++++++++ .../suite/galera/t/mysql-wsrep#201.test | 2 +- sql/sql_cache.cc | 22 ++--- 5 files changed, 148 insertions(+), 12 deletions(-) create mode 100644 mysql-test/suite/galera/r/galera_query_cache_sync_wait.result create mode 100644 mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt create mode 100644 mysql-test/suite/galera/t/galera_query_cache_sync_wait.test diff --git a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result new file mode 100644 index 000000000000..e9faff8be8bc --- /dev/null +++ b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result @@ -0,0 +1,45 @@ +CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S"; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +SET SESSION wsrep_sync_wait = 7; +SELECT MAX(id) FROM t1; +MAX(id) +1 +INSERT INTO t1 VALUES (2); +SELECT MAX(id) FROM t1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +FLUSH QUERY CACHE; +SET SESSION wsrep_sync_wait = 7; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +INSERT INTO t1 VALUES (3); +SELECT MAX(id) FROM t1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +INSERT INTO t1 VALUES (4); +SET SESSION wsrep_sync_wait = 7; +SELECT MAX(id) FROM t1; +MAX(id) +4 +SET SESSION wsrep_sync_wait = 7; +FLUSH STATUS; +SELECT MAX(id) FROM t1; +MAX(id) +4 +SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits'; +VARIABLE_VALUE = 1 +1 +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +INSERT INTO t1 VALUES (5); +SET SESSION wsrep_sync_wait = 7; +SELECT MAX(id) FROM t1 ; +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +MAX(id) +5 +SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits'; +VARIABLE_VALUE = 1 +1 diff --git a/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt b/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt new file mode 100644 index 000000000000..a00258bc48c2 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt @@ -0,0 +1 @@ +--query_cache_type=1 diff --git a/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test new file mode 100644 index 000000000000..0634eba32648 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test @@ -0,0 +1,90 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source include/have_query_cache.inc + +CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +--connection node_2 +--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` +SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S"; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +SET SESSION wsrep_sync_wait = 7; +SELECT MAX(id) FROM t1; # first lookup miss + +# +# Query cache hit, wait timeout +# + +--connection node_1 +INSERT INTO t1 VALUES (2); + +--connection node_2 +--error ER_LOCK_WAIT_TIMEOUT +SELECT MAX(id) FROM t1; +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +FLUSH QUERY CACHE; +SET SESSION wsrep_sync_wait = 7; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; + +# +# Query cache miss, wait timeout +# + +--connection node_1 +INSERT INTO t1 VALUES (3); + +--connection node_2 +--error ER_LOCK_WAIT_TIMEOUT +SELECT MAX(id) FROM t1; +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +# +# Query cache miss +# + +--connection node_1 +INSERT INTO t1 VALUES (4); + +--connection node_2 +SET SESSION wsrep_sync_wait = 7; +SELECT MAX(id) FROM t1; +SET SESSION wsrep_sync_wait = 7; + +# +# Query cache hit +# + +FLUSH STATUS; +SELECT MAX(id) FROM t1; +SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits'; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; + +# +# Query cache invalidated +# + +--connection node_1 +INSERT INTO t1 VALUES (5); + +--connection node_2 +SET SESSION wsrep_sync_wait = 7; +--send SELECT MAX(id) FROM t1 + +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +--connection node_2a +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +--connection node_2 +--reap +SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits'; + + +--disable_query_log +--eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig" +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/mysql-wsrep#201.test b/mysql-test/suite/galera/t/mysql-wsrep#201.test index cc842afb6d04..e93275401958 100644 --- a/mysql-test/suite/galera/t/mysql-wsrep#201.test +++ b/mysql-test/suite/galera/t/mysql-wsrep#201.test @@ -12,7 +12,7 @@ SET SESSION wsrep_sync_wait = 7; --disable_query_log ---let $count = 10000 +--let $count = 500 while ($count) { --connection node_1 diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 9515edc4d884..e8937a2df021 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1536,7 +1536,6 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) goto err; } } - /* Try to obtain an exclusive lock on the query cache. If the cache is disabled or if a full cache flush is in progress, the attempt to @@ -1617,6 +1616,13 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d", (int)flags.autocommit)); memcpy((uchar *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)), (uchar*) &flags, QUERY_CACHE_FLAGS_SIZE); + +#ifdef WITH_WSREP + bool once_more; + once_more= true; +lookup: +#endif /* WITH_WSREP */ + query_block = (Query_cache_block *) my_hash_search(&queries, (uchar*) sql, tot_length); /* Quick abort on unlocked data */ @@ -1630,21 +1636,15 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d", DBUG_PRINT("qcache", ("Query in query hash 0x%lx", (ulong)query_block)); #ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_must_sync_wait(thd)) { + if (once_more && WSREP_CLIENT(thd) && wsrep_must_sync_wait(thd)) + { unlock(); if (wsrep_sync_wait(thd)) goto err; if (try_lock(TRUE)) goto err; - query_block = (Query_cache_block *) my_hash_search(&queries, - (uchar*) sql, - tot_length); - if (query_block == 0 || - query_block->query()->result() == 0 || - query_block->query()->result()->type != Query_cache_block::RESULT) - { - goto err_unlock; - } + once_more= false; + goto lookup; } #endif /* WITH_WSREP */ From 10263e9ff2c0a5f96bd37a0de064c5c2b5a013f5 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Fri, 30 Oct 2015 17:04:21 +0100 Subject: [PATCH 063/305] Fix a RPM build issue on SLES 11: two "-f" options for one "%files" don't work. Combine "plugins.files" and "datadir.files" into one, it seems rpmbuild 4.4 (used on SLES 11) cannot handle two "-f" directives for one "%%files" section. --- support-files/mysql.spec.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 0d09b0c6a176..9343136e8649 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -813,7 +813,7 @@ install -m 600 $MBD/support-files/RHEL4-SElinux/mysql.{fc,te} \ # Get the list of "_datadir" files, remove those that go into "libs-compat" find $RBR%{_datadir}/mysql -type f -print | sed -e "s=$RBR==" \ - | fgrep -v "charsets-%{compatver}" | sort > $MBD/release/datadir.files + | fgrep -v "charsets-%{compatver}" | sort >> $MBD/release/support-files/plugins.files %if %{WITH_TCMALLOC} # Even though this is a shared library, put it under /usr/lib*/mysql, so it @@ -1267,7 +1267,7 @@ echo "=====" >> $STATUS_HISTORY # Intentionally empty - this is a pure meta package. # ---------------------------------------------------------------------------- -%files -n mysql-wsrep-server%{product_suffix} -f %{src_dir}/release/support-files/plugins.files -f %{src_dir}/release/datadir.files +%files -n mysql-wsrep-server%{product_suffix} -f %{src_dir}/release/support-files/plugins.files %defattr(-,root,root,0755) %if %{defined license_files_server} @@ -1361,7 +1361,7 @@ echo "=====" >> $STATUS_HISTORY %attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql %attr(755, root, root) %{_sysconfdir}/init.d/mysql -# %%attr(755, root, root) %%{_datadir}/mysql/ ## See "-f datadir.files" at section top +# %%attr(755, root, root) %%{_datadir}/mysql/ ## Contained in "plugins.files", see "%%install" code # ---------------------------------------------------------------------------- %files -n mysql-wsrep-client%{product_suffix} @@ -1461,6 +1461,10 @@ echo "=====" >> $STATUS_HISTORY # merging BK trees) ############################################################################## %changelog +* Fri Oct 30 2015 Joerg Bruehe +- Combine "plugins.files" and "datadir.files" into one, it seems rpmbuild 4.4 + (used on SLES 11) cannot handle two "-f" directives for one "%%files" section. + * Thu Sep 17 2015 Joerg Bruehe - Let the "server" RPM get rid of RedHat's "common" ("charsets/", "errmsg.sys"). From 07fce94f124be35b5744de886e81f16ec97a38b7 Mon Sep 17 00:00:00 2001 From: Joerg Bruehe Date: Mon, 2 Nov 2015 22:34:23 +0100 Subject: [PATCH 064/305] Add a linker script to force the SO version into "libmysqlclient.so", otherwise dependency resolution to pre-installed packages might fail. Let the meta RPM "require" "shared" or "libs-compat", so that it will "obsolete" any pre-installed packages (expecially the client library) --- .../mysql-force-libmysqlclient-version.patch | 19 ++++++++++++++ support-files/mysql.spec.sh | 25 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 support-files/mysql-force-libmysqlclient-version.patch diff --git a/support-files/mysql-force-libmysqlclient-version.patch b/support-files/mysql-force-libmysqlclient-version.patch new file mode 100644 index 000000000000..eec49f88cbc4 --- /dev/null +++ b/support-files/mysql-force-libmysqlclient-version.patch @@ -0,0 +1,19 @@ +diff -rup old/libmysql/CMakeLists.txt new/libmysql/CMakeLists.txt +--- old/libmysql/CMakeLists.txt 2013-11-05 08:19:26.000000000 +0100 ++++ new/libmysql/CMakeLists.txt 2014-01-10 15:41:30.530068723 +0100 +@@ -219,13 +219,14 @@ IF(NOT DISABLE_SHARED) + OUTPUT_NAME mysqlclient + VERSION "${OS_SHARED_LIB_VERSION}" + SOVERSION "${SHARED_LIB_MAJOR_VERSION}") ++ CONFIGURE_FILE(libmysql.ver.in ${CMAKE_CURRENT_BINARY_DIR}/libmysql.ver) + IF(LINK_FLAG_NO_UNDEFINED) + GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS) + IF(NOT libmysql_link_flag) + SET(libmysql_link_flags) + ENDIF() + SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS +- "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}") ++ "${libmysql_link_flags} -Wl,--version-script=libmysql.ver ${LINK_FLAG_NO_UNDEFINED}") + ENDIF() + # clean direct output needs to be set several targets have the same name + #(mysqlclient in this case) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 9343136e8649..febdafc770d8 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -251,6 +251,8 @@ Patch7: %{compatch} %if 0%{?compatlib} == 18 Patch8: mysql-5.5-libmysqlclient-symbols.patch %endif +%else +Patch8: mysql-force-libmysqlclient-version.patch %endif URL: http://www.mysql.com/ Packager: Codership Oy @@ -260,6 +262,11 @@ Vendor: %{mysql_vendor} Requires: mysql-wsrep-server%{product_suffix} Requires: mysql-wsrep-client%{product_suffix} +%if 0%{?compatlib} +Requires: mysql-wsrep-libs-compat%{product_suffix} +%else +Requires: mysql-wsrep-shared%{product_suffix} +%endif # Regression tests may take a long time, override the default to skip them %{!?runselftest:%global runselftest 0} @@ -433,6 +440,7 @@ For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ %package -n mysql-wsrep-shared%{product_suffix} Summary: MySQL - Shared libraries Group: Applications/Databases +Requires: /sbin/ldconfig %if 0%{?commercial} Obsoletes: MySQL-shared %else @@ -463,6 +471,7 @@ Provides: mysql-libs-compat%{?_isa} = %{version} Obsoletes: mysql-libs-compat < %{version} Provides: MySQL-shared-compat%{?_isa} = %{version} Obsoletes: MySQL-shared-compat < %{version} +Requires: /sbin/ldconfig # Dealing with RHEL 6 and upwards (and compatible ...) # Directly, we replace "libs" only; but RedHat "client" and "server" need files from "libs" @@ -542,6 +551,15 @@ popd # outside Windows, so it may be used in all RPM builds. pushd %{src_dir} %patch0 -p1 + +# "ld.so" needs a version script to really make the SO version show up in "objdump" output. +# Without this, (at least) on RedHat 6 the "requires" of "postfix" is not satisfied. +# For more detailed research, start with the "find-provides" script. +# This can't be a permanent solution, but it works in 5.5. +%if 0%{?compatlib} +%else +%patch8 -p 1 +%endif #wsrep_apply_patch_tag popd @@ -1461,6 +1479,13 @@ echo "=====" >> $STATUS_HISTORY # merging BK trees) ############################################################################## %changelog +* Mon Nov 02 2015 Joerg Bruehe +- "libmysqlclient.so" is not always recognized to satisfy the "requires" + of pre-installed applications (notably "postfix" on RedHat-like distros). + Force setting the current ABI version via a linker script. +- Let the meta RPM "require" "shared" or "libs-compat", so that it will + "obsolete" any pre-installed packages (expecially the client library). + * Fri Oct 30 2015 Joerg Bruehe - Combine "plugins.files" and "datadir.files" into one, it seems rpmbuild 4.4 (used on SLES 11) cannot handle two "-f" directives for one "%%files" section. From a12b97b8ad0d77d0f47efffa670ccce428cac3c4 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 4 Nov 2015 09:36:01 +0100 Subject: [PATCH 065/305] refs codership/mysql-wsrep#201 Manually merged query cache fixes from 97c02faf0a39dd189eeda4f75fb35bc5db69d541. --- sql/log_event.cc | 20 +++++++++++++++++++- sql/sql_parse.cc | 9 +++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index 5ee92f1a1930..83ed1a602568 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -8062,7 +8062,18 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli) const_cast(rli)->m_table_map.set_table(ptr->table_id, ptr->table); #ifdef HAVE_QUERY_CACHE - query_cache.invalidate_locked_for_write(rli->tables_to_lock); +#ifdef WITH_WSREP + /* + Moved invalidation right before the call to rows_event_stmt_cleanup(), + to avoid query cache being polluted with stale entries. + */ + if (! (WSREP(thd) && (thd->wsrep_exec_mode == REPL_RECV))) + { +#endif /* WITH_WSREP */ + query_cache.invalidate_locked_for_write(rli->tables_to_lock); +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ #endif } @@ -8263,6 +8274,13 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli) DBUG_RETURN(error); } +#if defined(WITH_WSREP) && defined(HAVE_QUERY_CACHE) + if (get_flags(STMT_END_F) && + WSREP(thd) && thd->wsrep_exec_mode == REPL_RECV) + { + query_cache.invalidate_locked_for_write(rli->tables_to_lock); + } +#endif /* WITH_WSREP */ if (get_flags(STMT_END_F) && (error= rows_event_stmt_cleanup(rli, thd))) slave_rows_error_report(ERROR_LEVEL, thd->is_error() ? 0 : error, diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index cb25fe66601e..1911fc37acf5 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6397,6 +6397,15 @@ void mysql_parse(THD *thd, char *rawbuf, uint length, thd->cleanup_after_query(); DBUG_ASSERT(thd->change_list.is_empty()); } +#ifdef WITH_WSREP + else + { + if (WSREP_CLIENT(thd)) + { + thd->wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED; + } + } +#endif /* WITH_WSREP */ DBUG_VOID_RETURN; } From bb33b7bbeef24d1115f6e24bf48a3b3240715577 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Wed, 4 Nov 2015 16:19:48 +0200 Subject: [PATCH 066/305] refs codership/mysql-wsrep#226 Limit binlog recovery to found wsrep position Limit binlog recovery so that the wsrep position found from storage engines is not exceeded. This is required to have consistent position between wsrep position stored in innodb header and recoverd binlog. --- sql/log.cc | 31 ++++++++++++++++++++++++++++++- sql/wsrep_mysqld.cc | 24 ++++++++++++++++++++++++ sql/wsrep_mysqld.h | 2 +- 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/sql/log.cc b/sql/log.cc index 655cff5d41e5..d0069332bf66 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -6788,6 +6788,22 @@ int TC_LOG_BINLOG::recover(IO_CACHE *log, Format_description_log_event *fdle) HASH xids; MEM_ROOT mem_root; +#ifdef WITH_WSREP + /* + Read current wsrep position from storage engines to have consistent + end position for binlog scan. + */ + wsrep_uuid_t uuid; + wsrep_seqno_t seqno; + wsrep_get_SE_checkpoint(uuid, seqno); + char uuid_str[40]; + wsrep_uuid_print(&uuid, uuid_str, sizeof(uuid_str)); + WSREP_INFO("Binlog recovery, found wsrep position %s:%lld", uuid_str, + (long long)seqno); + const wsrep_seqno_t last_xid_seqno= seqno; + wsrep_seqno_t cur_xid_seqno= WSREP_SEQNO_UNDEFINED; +#endif /* WITH_WSREP */ + if (! fdle->is_valid() || my_hash_init(&xids, &my_charset_bin, TC_LOG_PAGE_SIZE/3, 0, sizeof(my_xid), 0, 0, MYF(0))) @@ -6797,7 +6813,12 @@ int TC_LOG_BINLOG::recover(IO_CACHE *log, Format_description_log_event *fdle) fdle->flags&= ~LOG_EVENT_BINLOG_IN_USE_F; // abort on the first error - while ((ev= Log_event::read_log_event(log,0,fdle)) && ev->is_valid()) + while ((ev= Log_event::read_log_event(log,0,fdle)) && ev->is_valid() +#ifdef WITH_WSREP + && (last_xid_seqno == WSREP_SEQNO_UNDEFINED || + last_xid_seqno != cur_xid_seqno) +#endif + ) { if (ev->get_type_code() == XID_EVENT) { @@ -6806,10 +6827,18 @@ int TC_LOG_BINLOG::recover(IO_CACHE *log, Format_description_log_event *fdle) sizeof(xev->xid)); if (!x || my_hash_insert(&xids, x)) goto err2; +#ifdef WITH_WSREP + cur_xid_seqno= xev->xid; +#endif /* WITH_WSREP */ } delete ev; } +#ifdef WITH_WSREP + WSREP_INFO("Binlog recovery scan stopped at Xid event %lld", + (long long)cur_xid_seqno); +#endif /* WITH_WSREP */ + if (ha_recover(&xids)) goto err2; diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 9de7b23e5f2e..aaf652caeaf4 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -196,6 +196,30 @@ void wsrep_get_SE_checkpoint(XID* xid) plugin_foreach(NULL, get_SE_checkpoint, MYSQL_STORAGE_ENGINE_PLUGIN, xid); } +void wsrep_get_SE_checkpoint(wsrep_uuid_t& uuid, wsrep_seqno_t& seqno) +{ + uuid= WSREP_UUID_UNDEFINED; + seqno= WSREP_SEQNO_UNDEFINED; + + XID xid; + memset(&xid, 0, sizeof(xid)); + xid.formatID= -1; + + wsrep_get_SE_checkpoint(&xid); + + if (xid.formatID == -1) return; // nil XID + + if (!wsrep_is_wsrep_xid(&xid)) + { + WSREP_WARN("Read non-wsrep XID from storage engines."); + return; + } + + uuid= *wsrep_xid_uuid(&xid); + seqno= wsrep_xid_seqno(&xid); +} + + static wsrep_cb_status_t wsrep_view_handler_cb (void* app_ctx, void* recv_ctx, diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index a2c8e479a459..24542e136c84 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -308,7 +308,7 @@ int wsrep_alter_event_query(THD *thd, uchar** buf, size_t* buf_len); const wsrep_uuid_t* wsrep_cluster_uuid(); struct xid_t; void wsrep_set_SE_checkpoint(xid_t*); - +void wsrep_get_SE_checkpoint(wsrep_uuid_t&, wsrep_seqno_t&); void wsrep_xid_init(xid_t*, const wsrep_uuid_t*, wsrep_seqno_t); const wsrep_uuid_t* wsrep_xid_uuid(const xid_t*); wsrep_seqno_t wsrep_xid_seqno(const xid_t*); From 4bd7fe18c34dd573bf2fc2c55d57c1477d392257 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 6 Nov 2015 10:50:21 +0100 Subject: [PATCH 067/305] refs codership/mysql-wsrep#201 Removes MTR tests. --- .../r/galera_query_cache_sync_wait.result | 45 ---------- .../suite/galera/r/mysql-wsrep#201.result | 4 - .../t/galera_query_cache_sync_wait-master.opt | 1 - .../t/galera_query_cache_sync_wait.test | 90 ------------------- .../suite/galera/t/mysql-wsrep#201-master.opt | 1 - .../suite/galera/t/mysql-wsrep#201.test | 33 ------- 6 files changed, 174 deletions(-) delete mode 100644 mysql-test/suite/galera/r/galera_query_cache_sync_wait.result delete mode 100644 mysql-test/suite/galera/r/mysql-wsrep#201.result delete mode 100644 mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt delete mode 100644 mysql-test/suite/galera/t/galera_query_cache_sync_wait.test delete mode 100644 mysql-test/suite/galera/t/mysql-wsrep#201-master.opt delete mode 100644 mysql-test/suite/galera/t/mysql-wsrep#201.test diff --git a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result deleted file mode 100644 index e9faff8be8bc..000000000000 --- a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result +++ /dev/null @@ -1,45 +0,0 @@ -CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1); -SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S"; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -SET SESSION wsrep_sync_wait = 7; -SELECT MAX(id) FROM t1; -MAX(id) -1 -INSERT INTO t1 VALUES (2); -SELECT MAX(id) FROM t1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; -FLUSH QUERY CACHE; -SET SESSION wsrep_sync_wait = 7; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -INSERT INTO t1 VALUES (3); -SELECT MAX(id) FROM t1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; -INSERT INTO t1 VALUES (4); -SET SESSION wsrep_sync_wait = 7; -SELECT MAX(id) FROM t1; -MAX(id) -4 -SET SESSION wsrep_sync_wait = 7; -FLUSH STATUS; -SELECT MAX(id) FROM t1; -MAX(id) -4 -SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits'; -VARIABLE_VALUE = 1 -1 -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -INSERT INTO t1 VALUES (5); -SET SESSION wsrep_sync_wait = 7; -SELECT MAX(id) FROM t1 ; -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; -MAX(id) -5 -SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits'; -VARIABLE_VALUE = 1 -1 diff --git a/mysql-test/suite/galera/r/mysql-wsrep#201.result b/mysql-test/suite/galera/r/mysql-wsrep#201.result deleted file mode 100644 index 1c0998e35ac8..000000000000 --- a/mysql-test/suite/galera/r/mysql-wsrep#201.result +++ /dev/null @@ -1,4 +0,0 @@ -CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; -INSERT INTO t1 VALUES (DEFAULT); -SET GLOBAL query_cache_size=1355776; -SET SESSION wsrep_sync_wait = 7; diff --git a/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt b/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt deleted file mode 100644 index a00258bc48c2..000000000000 --- a/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt +++ /dev/null @@ -1 +0,0 @@ ---query_cache_type=1 diff --git a/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test deleted file mode 100644 index 0634eba32648..000000000000 --- a/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test +++ /dev/null @@ -1,90 +0,0 @@ ---source include/galera_cluster.inc ---source include/have_innodb.inc ---source include/have_debug_sync.inc ---source include/have_query_cache.inc - -CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1); - ---connection node_2 ---let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` -SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S"; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -SET SESSION wsrep_sync_wait = 7; -SELECT MAX(id) FROM t1; # first lookup miss - -# -# Query cache hit, wait timeout -# - ---connection node_1 -INSERT INTO t1 VALUES (2); - ---connection node_2 ---error ER_LOCK_WAIT_TIMEOUT -SELECT MAX(id) FROM t1; -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; - -FLUSH QUERY CACHE; -SET SESSION wsrep_sync_wait = 7; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; - -# -# Query cache miss, wait timeout -# - ---connection node_1 -INSERT INTO t1 VALUES (3); - ---connection node_2 ---error ER_LOCK_WAIT_TIMEOUT -SELECT MAX(id) FROM t1; -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; - -# -# Query cache miss -# - ---connection node_1 -INSERT INTO t1 VALUES (4); - ---connection node_2 -SET SESSION wsrep_sync_wait = 7; -SELECT MAX(id) FROM t1; -SET SESSION wsrep_sync_wait = 7; - -# -# Query cache hit -# - -FLUSH STATUS; -SELECT MAX(id) FROM t1; -SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits'; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; - -# -# Query cache invalidated -# - ---connection node_1 -INSERT INTO t1 VALUES (5); - ---connection node_2 -SET SESSION wsrep_sync_wait = 7; ---send SELECT MAX(id) FROM t1 - ---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 ---connection node_2a -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; - ---connection node_2 ---reap -SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits'; - - ---disable_query_log ---eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig" -DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt b/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt deleted file mode 100644 index a00258bc48c2..000000000000 --- a/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt +++ /dev/null @@ -1 +0,0 @@ ---query_cache_type=1 diff --git a/mysql-test/suite/galera/t/mysql-wsrep#201.test b/mysql-test/suite/galera/t/mysql-wsrep#201.test deleted file mode 100644 index e93275401958..000000000000 --- a/mysql-test/suite/galera/t/mysql-wsrep#201.test +++ /dev/null @@ -1,33 +0,0 @@ ---source include/galera_cluster.inc ---source include/have_innodb.inc ---source include/have_query_cache.inc - -CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; -INSERT INTO t1 VALUES (DEFAULT); - ---connection node_2 ---let $qcache_size_orig = `SELECT @@GLOBAL.query_cache_size` -SET GLOBAL query_cache_size=1355776; -SET SESSION wsrep_sync_wait = 7; - ---disable_query_log - ---let $count = 500 -while ($count) -{ - --connection node_1 - INSERT INTO t1 VALUES (DEFAULT); - --let $val1 = `SELECT LAST_INSERT_ID()` - --connection node_2 - --let $val2 = `SELECT MAX(id) FROM t1` - --let $val3 = `SELECT $val1 != $val2` - if ($val3) - { - --echo $val1 $val2 - --die wsrep_sync_wait failed - } - --dec $count -} - ---eval SET GLOBAL query_cache_size = $qcache_size_orig -DROP TABLE t1; From d6ac48cfe237b6c1700ffa277ef776a651250b49 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 12 Nov 2015 10:33:04 +0200 Subject: [PATCH 068/305] Refs codership/mysql-wsrep#221 - disabling certain IB atomic builtins, which caused complete hangs --- storage/innobase/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index a5fffac7ce1b..7c0fad548b8b 100644 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -100,11 +100,15 @@ IF(NOT CMAKE_CROSSCOMPILING) ENDIF() IF(HAVE_IB_GCC_ATOMIC_BUILTINS) +IF(NOT WITH_WSREP) ADD_DEFINITIONS(-DHAVE_IB_GCC_ATOMIC_BUILTINS=1) ENDIF() +ENDIF() IF(HAVE_IB_GCC_ATOMIC_TEST_AND_SET) +IF(NOT WITH_WSREP) ADD_DEFINITIONS(-DHAVE_IB_GCC_ATOMIC_TEST_AND_SET=1) +ENDIF() ENDIF() # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not From a34c3470effcbd3b7c6d2a1992a54695f094d8ff Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Mon, 16 Nov 2015 04:02:38 -0800 Subject: [PATCH 069/305] Include Man pages from 5.5.46 --- man/comp_err.1 | 12 ++-- man/innochecksum.1 | 4 +- man/msql2mysql.1 | 4 +- man/my_print_defaults.1 | 4 +- man/myisam_ftdump.1 | 4 +- man/myisamchk.1 | 14 ++-- man/myisamlog.1 | 4 +- man/myisampack.1 | 10 +-- man/mysql-stress-test.pl.1 | 4 +- man/mysql-test-run.pl.1 | 27 +++++++- man/mysql.1 | 10 +-- man/mysql.server.1 | 10 +-- man/mysql_client_test.1 | 4 +- man/mysql_config.1 | 10 +-- man/mysql_convert_table_format.1 | 4 +- man/mysql_find_rows.1 | 4 +- man/mysql_fix_extensions.1 | 4 +- man/mysql_install_db.1 | 14 ++-- man/mysql_plugin.1 | 26 ++++---- man/mysql_secure_installation.1 | 4 +- man/mysql_setpermission.1 | 4 +- man/mysql_tzinfo_to_sql.1 | 4 +- man/mysql_upgrade.1 | 12 ++-- man/mysql_waitpid.1 | 4 +- man/mysql_zap.1 | 4 +- man/mysqlaccess.1 | 4 +- man/mysqladmin.1 | 10 +-- man/mysqlbinlog.1 | 14 ++-- man/mysqlbug.1 | 4 +- man/mysqlcheck.1 | 12 ++-- man/mysqld.8 | 4 +- man/mysqld_multi.1 | 4 +- man/mysqld_safe.1 | 19 +++--- man/mysqldump.1 | 111 ++++++++++++++++++++----------- man/mysqldumpslow.1 | 4 +- man/mysqlhotcopy.1 | 10 +-- man/mysqlimport.1 | 23 +++++-- man/mysqlshow.1 | 10 +-- man/mysqlslap.1 | 8 +-- man/mysqltest.1 | 4 +- man/ndb-common-options.1 | 16 ++--- man/ndb_blob_tool.1 | 4 +- man/ndb_config.1 | 14 ++-- man/ndb_cpcd.1 | 4 +- man/ndb_delete_all.1 | 6 +- man/ndb_desc.1 | 13 ++-- man/ndb_drop_index.1 | 8 +-- man/ndb_drop_table.1 | 6 +- man/ndb_error_reporter.1 | 4 +- man/ndb_index_stat.1 | 4 +- man/ndb_mgm.1 | 4 +- man/ndb_mgmd.8 | 6 +- man/ndb_print_backup_file.1 | 4 +- man/ndb_print_file.1 | 4 +- man/ndb_print_schema_file.1 | 4 +- man/ndb_print_sys_file.1 | 4 +- man/ndb_restore.1 | 26 +++++--- man/ndb_select_all.1 | 10 +-- man/ndb_select_count.1 | 10 +-- man/ndb_show_tables.1 | 6 +- man/ndb_size.pl.1 | 6 +- man/ndb_waiter.1 | 6 +- man/ndbd.8 | 4 +- man/ndbd_redo_log_reader.1 | 4 +- man/ndbinfo_select_all.1 | 4 +- man/ndbmtd.8 | 4 +- man/perror.1 | 4 +- man/replace.1 | 4 +- man/resolve_stack_dump.1 | 6 +- man/resolveip.1 | 4 +- 70 files changed, 367 insertions(+), 282 deletions(-) diff --git a/man/comp_err.1 b/man/comp_err.1 index 854c3f7fe858..a7e858efb6df 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -2,12 +2,12 @@ .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -101,8 +101,8 @@ Display a help message and exit\&. .\} .\" comp_err: charset option .\" charset option: comp_err -\fB\-\-charset=\fR\fB\fIpath\fR\fR, -\fB\-C \fR\fB\fIpath\fR\fR +\fB\-\-charset=\fR\fB\fIdir_name\fR\fR, +\fB\-C \fR\fB\fIdir_name\fR\fR .sp The character set directory\&. The default is \&.\&./sql/share/charsets\&. @@ -205,8 +205,8 @@ mysqld_ername\&.h\&. .\} .\" comp_err: out_dir option .\" out_dir option: comp_err -\fB\-\-out_dir=\fR\fB\fIpath\fR\fR, -\fB\-D \fR\fB\fIpath\fR\fR +\fB\-\-out_dir=\fR\fB\fIdir_name\fR\fR, +\fB\-D \fR\fB\fIdir_name\fR\fR .sp The name of the output base directory\&. The default is \&.\&./sql/share/\&. diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 68236db3dc3a..85e9669b2cc8 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -2,12 +2,12 @@ .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 index a7676d5f30f6..2402b13c697f 100644 --- a/man/msql2mysql.1 +++ b/man/msql2mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmsql2mysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMSQL2MYSQL\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMSQL2MYSQL\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index 197b492200c5..043d935dc3e8 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -2,12 +2,12 @@ .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index 054511337d81..e3bff42b0042 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisamchk.1 b/man/myisamchk.1 index 777a040db6fb..dcc6758eee50 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -948,7 +948,7 @@ file as .\} .\" myisamchk: character-sets-dir option .\" character-sets-dir option: myisamchk -\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. @@ -1231,8 +1231,8 @@ to use sorting to resolve the keys even if the temporary files would be very lar .\} .\" myisamchk: tmpdir option .\" tmpdir option: myisamchk -\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR, -\fB\-t \fR\fB\fIpath\fR\fR +\fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, +\fB\-t \fR\fB\fIdir_name\fR\fR .sp The path of the directory to be used for storing temporary files\&. If this is not set, \fBmyisamchk\fR @@ -2490,7 +2490,7 @@ TMPDIR points to a memory file system, out of memory errors can easily occur\&. If this happens, run \fBmyisamchk\fR with the -\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR +\fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR option to specify a directory located on a file system that has more space\&. .PP When performing repair operations, @@ -2537,7 +2537,7 @@ or \fB\-\-safe\-recover\fR), you need space on disk for sorting\&. This space is allocated in the temporary directory (specified by TMPDIR or -\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR)\&. The following formula yields the amount of space required: +\fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR)\&. The following formula yields the amount of space required: .sp .if n \{\ .RS 4 diff --git a/man/myisamlog.1 b/man/myisamlog.1 index 4e961c45f15a..ce83d453e408 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisampack.1 b/man/myisampack.1 index 11629970faa1..7f33f96e70a0 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -167,7 +167,7 @@ Make a backup of each table\*(Aqs data file using the name .\} .\" myisampack: character-sets-dir option .\" character-sets-dir option: myisampack -\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. @@ -296,8 +296,8 @@ Do not actually pack the table, just test packing it\&. .\} .\" myisampack: tmpdir option .\" tmpdir option: myisampack -\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR, -\fB\-T \fR\fB\fIpath\fR\fR +\fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, +\fB\-T \fR\fB\fIdir_name\fR\fR .sp Use the named directory as the location where \fBmyisampack\fR diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index 970021bf290f..c28af0381363 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/16/2015 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "06/25/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "09/16/2015" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index 08ead0755ebd..1217a2b90278 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/16/2015 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "06/25/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "09/16/2015" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -2405,6 +2405,29 @@ is added to the list of tests when the server is run in valgrind\&. This test is .sp -1 .IP \(bu 2.3 .\} +.\" mysql-test-run.pl: valgrind-clients option +.\" valgrind-clients option: mysql-test-run.pl +\fB\-\-valgrind\-clients\fR +.sp +Run all clients started by +\&.test +files with +\fBvalgrind\fR\&. This option requires +\fBvalgrind\fR +3\&.9 or later\&. +.sp +\fB\-\-valgrind\-clients\fR +was added in MySQL 5\&.7\&.9\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysql-test-run.pl: valgrind-mysqld option .\" valgrind-mysqld option: mysql-test-run.pl \fB\-\-valgrind\-mysqld\fR diff --git a/man/mysql.1 b/man/mysql.1 index 93a947f9af04..f1ccedda586a 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -255,7 +255,7 @@ client that is supplied with MySQL Cluster\&. It is not available in standard My .\} .\" mysql: character-sets-dir option .\" character-sets-dir option: mysql -\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. @@ -1016,9 +1016,9 @@ On Windows, connect to the server using a named pipe\&. This option applies only .\} .\" mysql: plugin-dir option .\" plugin-dir option: mysql -\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp -The directory in which to look for plugins\&. It may be necessary to specify this option if the +The directory in which to look for plugins\&. Specify this option if the \fB\-\-default\-auth\fR option is used to specify an authentication plugin but \fBmysql\fR diff --git a/man/mysql.server.1 b/man/mysql.server.1 index 9144b8f3bf12..ec4063a11bbb 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -177,7 +177,7 @@ shell> \fBchkconfig \-\-level 345 mysql on\fR On FreeBSD, startup scripts generally should go in /usr/local/etc/rc\&.d/\&. The rc(8) -manual page states that scripts in this directory are executed only if their basename matches the +manual page states that scripts in this directory are executed only if their base name matches the *\&.sh shell file name pattern\&. Any other files or directories present within the directory are silently ignored\&. In other words, on FreeBSD, you should install the mysql\&.server @@ -260,7 +260,7 @@ as command\-line arguments\&. .\} .\" mysql.server: basedir option .\" basedir option: mysql.server -\fB\-\-basedir=\fR\fB\fIpath\fR\fR +\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. .RE @@ -275,7 +275,7 @@ The path to the MySQL installation directory\&. .\} .\" mysql.server: datadir option .\" datadir option: mysql.server -\fB\-\-datadir=\fR\fB\fIpath\fR\fR +\fB\-\-datadir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL data directory\&. .RE diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index ad89aeb14573..f060236ebb22 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/16/2015 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "06/25/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "09/16/2015" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_config.1 b/man/mysql_config.1 index b15dc1c558e3..9c39d015c278 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -242,7 +242,7 @@ Options: .PP You can use \fBmysql_config\fR -within a command line using backticks to include the output that it produces for a particular option\&. For example, to compile and link a MySQL client program, use +within a command line using backticks to include the output that it produces for particular options\&. For example, to compile and link a MySQL client program, use \fBmysql_config\fR as follows: .sp @@ -250,8 +250,8 @@ as follows: .RS 4 .\} .nf -shell> \fBgcc \-c `mysql_config \-\-cflags` progname\&.c\fR -shell> \fBgcc \-o progname progname\&.o `mysql_config \-\-libs`\fR +gcc \-c `mysql_config \-\-cflags` progname\&.c +gcc \-o progname progname\&.o `mysql_config \-\-libs` .fi .if n \{\ .RE diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 index b2f08958f18a..79151c8a397f 100644 --- a/man/mysql_convert_table_format.1 +++ b/man/mysql_convert_table_format.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_convert_table_format\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONVERT_TAB" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONVERT_TAB" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 index 687c8aac3502..3be653a230cf 100644 --- a/man/mysql_find_rows.1 +++ b/man/mysql_find_rows.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_find_rows\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIND_ROWS\F" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 index f10ce7eaa4fa..7c7ed98cfb17 100644 --- a/man/mysql_fix_extensions.1 +++ b/man/mysql_fix_extensions.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_fix_extensions\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIX_EXTENSI" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index 7e452cb6083e..f80159a2a15f 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -147,7 +147,7 @@ Display a help message and exit\&. .\} .\" mysql_install_db: basedir option .\" basedir option: mysql_install_db -\fB\-\-basedir=\fR\fB\fIpath\fR\fR +\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. .RE @@ -162,7 +162,7 @@ The path to the MySQL installation directory\&. .\} .\" mysql_install_db: builddir option .\" builddir option: mysql_install_db -\fB\-\-builddir=\fR\fB\fIpath\fR\fR +\fB\-\-builddir=\fR\fB\fIdir_name\fR\fR .sp For use with \fB\-\-srcdir\fR @@ -194,7 +194,7 @@ For internal use\&. This option is used for building system tables on one host i .\} .\" mysql_install_db: datadir option .\" datadir option: mysql_install_db -\fB\-\-datadir=\fR\fB\fIpath\fR\fR +\fB\-\-datadir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL data directory\&. .RE @@ -258,7 +258,7 @@ to run even if DNS does not work\&. Grant table entries normally created using h .\} .\" mysql_install_db: ldata option .\" ldata option: mysql_install_db -\fB\-\-ldata=\fR\fB\fIpath\fR\fR +\fB\-\-ldata=\fR\fB\fIdir_name\fR\fR .sp A synonym for \fB\-\-datadir\fR\&. @@ -320,7 +320,7 @@ Use IP addresses rather than host names when creating grant table entries\&. Thi .\} .\" mysql_install_db: srcdir option .\" srcdir option: mysql_install_db -\fB\-\-srcdir=\fR\fB\fIpath\fR\fR +\fB\-\-srcdir=\fR\fB\fIdir_name\fR\fR .sp For internal use\&. This option specifies the directory under which \fBmysql_install_db\fR diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index c6e1587c9313..e4bc51d80eca 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -102,7 +102,7 @@ plugin3, all of which should be configured under \fBmysql_plugin\fR control\&. By convention, configuration files have a suffix of \&.ini -and the same basename as the plugin library, so the default configuration file name for this plugin library is +and the same base name as the plugin library, so the default configuration file name for this plugin library is myplugins\&.ini\&. The configuration file contents look like this: .sp .if n \{\ @@ -192,8 +192,8 @@ Display a help message and exit\&. .\} .\" mysql_plugin: basedir option .\" basedir option: mysql_plugin -\fB\-\-basedir=\fR\fB\fIpath\fR\fR, -\fB\-b \fR\fB\fIpath\fR\fR +\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR, +\fB\-b \fR\fB\fIdir_name\fR\fR .sp The server base directory\&. .RE @@ -208,8 +208,8 @@ The server base directory\&. .\} .\" mysql_plugin: datadir option .\" datadir option: mysql_plugin -\fB\-\-datadir=\fR\fB\fIpath\fR\fR, -\fB\-d \fR\fB\fIpath\fR\fR +\fB\-\-datadir=\fR\fB\fIdir_name\fR\fR, +\fB\-d \fR\fB\fIdir_name\fR\fR .sp The server data directory\&. .RE @@ -224,8 +224,8 @@ The server data directory\&. .\} .\" mysql_plugin: my-print-defaults option .\" my-print-defaults option: mysql_plugin -\fB\-\-my\-print\-defaults=\fR\fB\fIpath\fR\fR, -\fB\-b \fR\fB\fIpath\fR\fR +\fB\-\-my\-print\-defaults=\fR\fB\fIfile_name\fR\fR, +\fB\-b \fR\fB\fIfile_name\fR\fR .sp The path to the \fBmy_print_defaults\fR @@ -242,8 +242,8 @@ program\&. .\} .\" mysql_plugin: mysqld option .\" mysqld option: mysql_plugin -\fB\-\-mysqld=\fR\fB\fIpath\fR\fR, -\fB\-b \fR\fB\fIpath\fR\fR +\fB\-\-mysqld=\fR\fB\fIfile_name\fR\fR, +\fB\-b \fR\fB\fIfile_name\fR\fR .sp The path to the \fBmysqld\fR @@ -280,8 +280,8 @@ With .\} .\" mysql_plugin: plugin-dir option .\" plugin-dir option: mysql_plugin -\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR, -\fB\-p \fR\fB\fIpath\fR\fR +\fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR, +\fB\-p \fR\fB\fIdir_name\fR\fR .sp The server plugin directory\&. .RE diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index 5ef195f9414d..84168ff32972 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 index da1d225f4b82..0dfc3295b891 100644 --- a/man/mysql_setpermission.1 +++ b/man/mysql_setpermission.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_setpermission\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SETPERMISSI" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SETPERMISSI" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index 939a6efb398a..6a789c5680b1 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index f81c28218a6b..b15bc152693a 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -293,7 +293,7 @@ The path to the MySQL installation directory\&. This option is accepted for back .\} .\" mysql_upgrade: character-sets-dir option .\" character-sets-dir option: mysql_upgrade -\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. @@ -587,9 +587,9 @@ On Windows, connect to the server using a named pipe\&. This option applies only .\} .\" mysql_upgrade: plugin-dir option .\" plugin-dir option: mysql_upgrade -\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp -The directory in which to look for plugins\&. It may be necessary to specify this option if the +The directory in which to look for plugins\&. Specify this option if the \fB\-\-default\-auth\fR option is used to specify an authentication plugin but \fBmysql_upgrade\fR @@ -712,7 +712,7 @@ Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. .\" mysql_upgrade: tmpdir option .\" tmpdir option: mysql_upgrade \fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, -\fB\-t \fR\fB\fIpath\fR\fR +\fB\-t \fR\fB\fIdir_name\fR\fR .sp The path name of the directory to use for creating temporary files\&. .RE diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 index 1692272765d8..ed32f6853686 100644 --- a/man/mysql_waitpid.1 +++ b/man/mysql_waitpid.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_waitpid\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_WAITPID\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_WAITPID\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 index 5e4063349220..ed6764359e6e 100644 --- a/man/mysql_zap.1 +++ b/man/mysql_zap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_zap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_ZAP\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_ZAP\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index ab6673b7e7ec..9db54b325e84 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlaccess\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLACCESS\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLACCESS\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index 364e1d2cabb8..4bff5267c52f 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -657,7 +657,7 @@ that is supplied with MySQL Cluster\&. It is not available in standard MySQL Ser .\} .\" mysqladmin: character-sets-dir option .\" character-sets-dir option: mysqladmin -\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. @@ -987,9 +987,9 @@ On Windows, connect to the server using a named pipe\&. This option applies only .\} .\" mysqladmin: plugin-dir option .\" plugin-dir option: mysqladmin -\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp -The directory in which to look for plugins\&. It may be necessary to specify this option if the +The directory in which to look for plugins\&. Specify this option if the \fB\-\-default\-auth\fR option is used to specify an authentication plugin but \fBmysqladmin\fR diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index a9011d92e818..2a85d8bb5c15 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -338,7 +338,7 @@ This option is supported beginning with MySQL 5\&.5\&.8\&. .\} .\" mysqlbinlog: character-sets-dir option .\" character-sets-dir option: mysqlbinlog -\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. @@ -750,8 +750,8 @@ Get the binary log from the MySQL server on the given host\&. .\} .\" mysqlbinlog: local-load option .\" local-load option: mysqlbinlog -\fB\-\-local\-load=\fR\fB\fIpath\fR\fR, -\fB\-l \fR\fB\fIpath\fR\fR +\fB\-\-local\-load=\fR\fB\fIdir_name\fR\fR, +\fB\-l \fR\fB\fIdir_name\fR\fR .sp Prepare local temporary files for LOAD DATA INFILE @@ -849,9 +849,9 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .\} .\" mysqlbinlog: plugin-dir option .\" plugin-dir option: mysqlbinlog -\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp -The directory in which to look for plugins\&. It may be necessary to specify this option if the +The directory in which to look for plugins\&. Specify this option if the \fB\-\-default\-auth\fR option is used to specify an authentication plugin but \fBmysqlbinlog\fR diff --git a/man/mysqlbug.1 b/man/mysqlbug.1 index 72459def49a5..eb831fcb90fb 100644 --- a/man/mysqlbug.1 +++ b/man/mysqlbug.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbug\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBUG\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBUG\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index ba7fca176b9a..534826ea7c6f 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -323,7 +323,7 @@ that is supplied with MySQL Cluster\&. It is not available in standard MySQL Ser .\} .\" mysqlcheck: character-sets-dir option .\" character-sets-dir option: mysqlcheck -\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. @@ -415,7 +415,7 @@ Compress all information sent between the client and the server if both support .sp Process all tables in the named databases\&. Normally, \fBmysqlcheck\fR -treats the first name argument on the command line as a database name and following names as table names\&. With this option, it treats all name arguments as database names\&. +treats the first name argument on the command line as a database name and any following names as table names\&. With this option, it treats all name arguments as database names\&. .sp This option may be used to dump the INFORMATION_SCHEMA @@ -780,9 +780,9 @@ On Windows, connect to the server using a named pipe\&. This option applies only .\} .\" mysqlcheck: plugin-dir option .\" plugin-dir option: mysqlcheck -\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp -The directory in which to look for plugins\&. It may be necessary to specify this option if the +The directory in which to look for plugins\&. Specify this option if the \fB\-\-default\-auth\fR option is used to specify an authentication plugin but \fBmysqlcheck\fR diff --git a/man/mysqld.8 b/man/mysqld.8 index 577a77274ca2..e27e19ad917a 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index 89969d9f4233..4e40c12f86d5 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index 55883e0e7b4c..e74154162325 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -132,7 +132,7 @@ Display a help message and exit\&. .\} .\" mysqld_safe: basedir option .\" basedir option: mysqld_safe -\fB\-\-basedir=\fR\fB\fIpath\fR\fR +\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. .RE @@ -165,7 +165,7 @@ should be able to create\&. The option value is passed to .\} .\" mysqld_safe: datadir option .\" datadir option: mysqld_safe -\fB\-\-datadir=\fR\fB\fIpath\fR\fR +\fB\-\-datadir=\fR\fB\fIdir_name\fR\fR .sp The path to the data directory\&. .RE @@ -180,7 +180,7 @@ The path to the data directory\&. .\} .\" mysqld_safe: defaults-extra-file option .\" defaults-extra-file option: mysqld_safe -\fB\-\-defaults\-extra\-file=\fR\fB\fIpath\fR\fR +\fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp The name of an option file to be read in addition to the usual option files\&. This must be the first option on the command line if it is used\&. If the file does not exist or is otherwise inaccessible, the server will exit with an error\&. .RE @@ -210,7 +210,7 @@ The name of an option file to be read instead of the usual option files\&. This .\} .\" mysqld_safe: ledir option .\" ledir option: mysqld_safe -\fB\-\-ledir=\fR\fB\fIpath\fR\fR +\fB\-\-ledir=\fR\fB\fIdir_name\fR\fR .sp If \fBmysqld_safe\fR @@ -244,7 +244,8 @@ Section\ \&5.2.2, \(lqThe Error Log\(rq\&. .\" mysqld_safe: malloc-lib option .\" mysqld option: malloc-lib \fB\-\-malloc\-lib=[\fR\fB\fIlib_name\fR\fR\fB]\fR -.sp +.\" memory allocation library +.\" tcmalloc: memory allocation library The name of the library to use for memory allocation instead of the system malloc() library\&. Any library can be used by specifying its path name, but there is a shortcut form to enable use of the @@ -405,7 +406,7 @@ option to indicate the path name to the directory where the server is located\&. .sp This option is similar to the \fB\-\-mysqld\fR -option, but you specify only the suffix for the server program name\&. The basename is assumed to be +option, but you specify only the suffix for the server program name\&. The base name is assumed to be \fBmysqld\fR\&. For example, if you use \fB\-\-mysqld\-version=debug\fR, \fBmysqld_safe\fR @@ -518,7 +519,7 @@ The path name of the process ID file\&. .\} .\" mysqld_safe: plugin-dir option .\" plugin-dir option: mysqld_safe -\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The path name of the plugin directory\&. This option was added in MySQL 5\&.5\&.3\&. .RE diff --git a/man/mysqldump.1 b/man/mysqldump.1 index 0fb81fc5d92b..a84993be245e 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -38,11 +38,44 @@ mysqldump \- a database backup program .HP \w'\fBmysqldump\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB\ \&.\&.\&.]]\fR\ 'u \fBmysqldump [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.]]\fR .SH "DESCRIPTION" +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Performance and Scalability Considerations +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Invocation Syntax +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Option Syntax - Alphabetical Summary +.RE .PP The \fBmysqldump\fR -client is a utility that performs -logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both\&. It dumps one or more MySQL database for backup or transfer to another SQL server\&. The +client utility performs +logical backups, producing a set of SQL statements that can be executed to reproduce the original database object definitions and table data\&. It dumps one or more MySQL databases for backup or transfer to another SQL server\&. The \fBmysqldump\fR command can also generate output in CSV, other delimited text, or XML format\&. .PP @@ -59,9 +92,9 @@ if the \fB\-\-single\-transaction\fR option is not used\&. Certain options might require other privileges as noted in the option descriptions\&. .PP -To reload a dump file, you must have the same privileges needed to create each of the dumped objects by issuing +To reload a dump file, you must have the privileges required to execute the statements that it contains, such as the appropriate CREATE -statements manually\&. +privileges for objects created by those statements\&. .PP \fBmysqldump\fR output can include @@ -94,7 +127,7 @@ A dump made using PowerShell on Windows with output redirection creates a file t .RS 4 .\} .nf -mysqldump [options] > dump\&.sql +shell> \fBmysqldump [options] > dump\&.sql\fR .fi .if n \{\ .RE @@ -109,7 +142,7 @@ option, which creates the output in ASCII format: .RS 4 .\} .nf -mysqldump [options] \-\-result\-file=dump\&.sql +shell> \fBmysqldump [options] \-\-result\-file=dump\&.sql\fR .fi .if n \{\ .RE @@ -190,7 +223,7 @@ option\&. For additional information about \fBmysqldump\fR, see Section\ \&7.4, \(lqUsing mysqldump for Backups\(rq\&. -Syntax.PP +Invocation Syntax.PP There are in general three ways to use \fBmysqldump\fR\(emin order to dump a set of one or more tables, a set of one or more complete databases, or an entire MySQL server\(emas shown here: .sp @@ -378,7 +411,7 @@ instead\&. For additional information about \fBmysqldump\fR, see Section\ \&7.4, \(lqUsing mysqldump for Backups\(rq\&. -.PP +Option Syntax \- Alphabetical Summary.PP \fBmysqldump\fR supports the following options, which can be specified on the command line or in the [mysqldump] @@ -415,7 +448,7 @@ Display a help message and exit\&. .\" add-drop-database option: mysqldump \fB\-\-add\-drop\-database\fR .sp -Add a +Write a DROP DATABASE statement before each CREATE DATABASE @@ -440,7 +473,7 @@ statements are written unless one of those options is specified\&. .\" add-drop-table option: mysqldump \fB\-\-add\-drop\-table\fR .sp -Add a +Write a DROP TABLE statement before each CREATE TABLE @@ -459,7 +492,7 @@ statement\&. .\" add-drop-trigger option: mysqldump \fB\-\-add\-drop\-trigger\fR .sp -Add a +Write a DROP TRIGGER statement before each CREATE TRIGGER @@ -607,7 +640,7 @@ that is supplied with MySQL Cluster\&. It is not available in standard MySQL Ser .\} .\" mysqldump: character-sets-dir option .\" character-sets-dir option: mysqldump -\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. @@ -1090,9 +1123,9 @@ privileges for those databases\&. \fB\-\-extended\-insert\fR, \fB\-e\fR .sp -Use multiple\-row +Write INSERT -syntax that include several +statements using multiple\-row syntax that includes several VALUES lists\&. This results in a smaller dump file and speeds up inserts when the file is reloaded\&. .RE @@ -1388,6 +1421,12 @@ because it does not need to lock the tables at all\&. Because \fB\-\-lock\-tables\fR locks tables for each database separately, this option does not guarantee that the tables in the dump file are logically consistent between databases\&. Tables in different databases may be dumped in completely different states\&. +.sp +Some options, such as +\fB\-\-opt\fR, automatically enable +\fB\-\-lock\-tables\fR\&. If you want to override this, use +\fB\-\-skip\-lock\-tables\fR +at the end of the option list\&. .RE .sp .RS 4 @@ -1625,7 +1664,7 @@ statements\&. \fB\-\-no\-create\-db\fR, \fB\-n\fR .sp -This option suppresses the +Suppress the CREATE DATABASE statements that are otherwise included in the output if the \fB\-\-databases\fR @@ -1649,7 +1688,7 @@ option is given\&. .sp Do not write CREATE TABLE -statements that re\-create each dumped table\&. +statements that create each dumped table\&. .if n \{\ .sp .\} @@ -1664,7 +1703,7 @@ statements that re\-create each dumped table\&. .br This option does \fInot\fR -not exclude statements creating log file groups or tablespaces from +exclude statements creating log file groups or tablespaces from \fBmysqldump\fR output; however, you can use the \fB\-\-no\-tablespaces\fR @@ -1847,9 +1886,9 @@ On Windows, connect to the server using a named pipe\&. This option applies only .\} .\" mysqldump: plugin-dir option .\" plugin-dir option: mysqldump -\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp -The directory in which to look for plugins\&. It may be necessary to specify this option if the +The directory in which to look for plugins\&. Specify this option if the \fB\-\-default\-auth\fR option is used to specify an authentication plugin but \fBmysqldump\fR @@ -1982,11 +2021,13 @@ statements\&. \fB\-\-result\-file=\fR\fB\fIfile_name\fR\fR, \fB\-r \fR\fB\fIfile_name\fR\fR .sp -Direct output to a given file\&. This option should be used on Windows to prevent newline +Direct output to the named file\&. The result file is created and its previous contents overwritten, even if an error occurs while generating the dump\&. +.sp +This option should be used on Windows to prevent newline \(lq\en\(rq characters from being converted to \(lq\er\en\(rq -carriage return/newline sequences\&. The result file is created and its previous contents overwritten, even if an error occurs while generating the dump\&. +carriage return/newline sequences\&. .RE .sp .RS 4 @@ -2006,15 +2047,17 @@ Include stored routines (procedures and functions) for the dumped databases in t SELECT privilege for the mysql\&.proc -table\&. The output generated by using +table\&. +.sp +The output generated by using \fB\-\-routines\fR contains CREATE PROCEDURE and CREATE FUNCTION -statements to re\-create the routines\&. However, these statements do not include attributes such as the routine creation and modification timestamps\&. This means that when the routines are reloaded, they will be created with the timestamps equal to the reload time\&. +statements to create the routines\&. However, these statements do not include attributes such as the routine creation and modification timestamps, so when the routines are reloaded, they are created with timestamps equal to the reload time\&. .sp -If you require routines to be re\-created with their original timestamp attributes, do not use +If you require routines to be created with their original timestamp attributes, do not use \fB\-\-routines\fR\&. Instead, dump and reload the contents of the mysql\&.proc table directly, using a MySQL account that has appropriate privileges for the @@ -2038,7 +2081,7 @@ option\&. (Bug #11760384, Bug #52792) .\" set-charset option: mysqldump \fB\-\-set\-charset\fR .sp -Add +Write SET NAMES \fIdefault_character_set\fR to the output\&. This option is enabled by default\&. To suppress the SET NAMES @@ -2210,8 +2253,8 @@ Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. .\} .\" mysqldump: tab option .\" tab option: mysqldump -\fB\-\-tab=\fR\fB\fIpath\fR\fR, -\fB\-T \fR\fB\fIpath\fR\fR +\fB\-\-tab=\fR\fB\fIdir_name\fR\fR, +\fB\-T \fR\fB\fIdir_name\fR\fR .sp Produce tab\-separated text\-format data files\&. For each dumped table, \fBmysqldump\fR @@ -2550,15 +2593,9 @@ option), \fBmysqldump\fR creates rows up to net_buffer_length -length\&. If you increase this variable, you should also ensure that the +bytes long\&. If you increase this variable, ensure that the MySQL server net_buffer_length -variable in the MySQL server is at least this large\&. -.sp -Some options, such as -\fB\-\-opt\fR, automatically enable -\fB\-\-lock\-tables\fR\&. If you want to override this, use -\fB\-\-skip\-lock\-tables\fR -at the end of the option list\&. +system variable has a value at least this large\&. .RE .PP A common use of diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index ce7ece80f04b..cc02d6cc30d1 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 index 8b02463c57e9..09b7148253bd 100644 --- a/man/mysqlhotcopy.1 +++ b/man/mysqlhotcopy.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlhotcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLHOTCOPY\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLHOTCOPY\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -192,14 +192,14 @@ and table .\} .\" mysqlhotcopy: chroot option .\" chroot option: mysqlhotcopy -\fB\-\-chroot=\fR\fB\fIpath\fR\fR +\fB\-\-chroot=\fR\fB\fIdir_name\fR\fR .sp Base directory of the \fBchroot\fR jail in which \fBmysqld\fR operates\&. The -\fIpath\fR +\fIdir_name\fR value should match that of the \fB\-\-chroot\fR option given to @@ -500,7 +500,7 @@ The suffix to use for names of copied databases\&. .\} .\" mysqlhotcopy: tmpdir option .\" tmpdir option: mysqlhotcopy -\fB\-\-tmpdir=\fR\fB\fIpath\fR\fR +\fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR .sp The temporary directory\&. The default is /tmp\&. diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index 4f09a89191d1..1f6c53acf226 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -95,6 +95,19 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. \fB\-?\fR .sp Display a help message and exit\&. +.sp +The output generated by using +\fB\-\-events\fR +contains +CREATE EVENT +statements to create the events\&. However, these statements do not include attributes such as the event creation and modification timestamps, so when the events are reloaded, they are created with timestamps equal to the reload time\&. +.sp +If you require events to be created with their original timestamp attributes, do not use +\fB\-\-events\fR\&. Instead, dump and reload the contents of the +mysql\&.event +table directly, using a MySQL account that has appropriate privileges for the +mysql +database\&. .RE .sp .RS 4 @@ -126,7 +139,7 @@ that is supplied with MySQL Cluster\&. It is not available in standard MySQL Ser .\} .\" mysqlimport: character-sets-dir option .\" character-sets-dir option: mysqlimport -\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. @@ -571,9 +584,9 @@ On Windows, connect to the server using a named pipe\&. This option applies only .\} .\" mysqlimport: plugin-dir option .\" plugin-dir option: mysqlimport -\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp -The directory in which to look for plugins\&. It may be necessary to specify this option if the +The directory in which to look for plugins\&. Specify this option if the \fB\-\-default\-auth\fR option is used to specify an authentication plugin but \fBmysqlimport\fR diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index 1d0faf06c7c0..8540af64647f 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -173,7 +173,7 @@ that is supplied with MySQL Cluster\&. It is not available in standard MySQL Ser .\} .\" mysqlshow: character-sets-dir option .\" character-sets-dir option: mysqlshow -\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. @@ -465,9 +465,9 @@ On Windows, connect to the server using a named pipe\&. This option applies only .\} .\" mysqlshow: plugin-dir option .\" plugin-dir option: mysqlshow -\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp -The directory in which to look for plugins\&. It may be necessary to specify this option if the +The directory in which to look for plugins\&. Specify this option if the \fB\-\-default\-auth\fR option is used to specify an authentication plugin but \fBmysqlshow\fR diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index 2a2cc464aede..30831ea95161 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -856,9 +856,9 @@ On Windows, connect to the server using a named pipe\&. This option applies only .\} .\" mysqlslap: plugin-dir option .\" plugin-dir option: mysqlslap -\fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR +\fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp -The directory in which to look for plugins\&. It may be necessary to specify this option if the +The directory in which to look for plugins\&. Specify this option if the \fB\-\-default\-auth\fR option is used to specify an authentication plugin but \fBmysqlslap\fR diff --git a/man/mysqltest.1 b/man/mysqltest.1 index b928335c8f6f..b90d7c71a5f5 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/16/2015 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "06/25/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "09/16/2015" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb-common-options.1 b/man/ndb-common-options.1 index d7be8f386021..f121694d4913 100644 --- a/man/ndb-common-options.1 +++ b/man/ndb-common-options.1 @@ -2,12 +2,12 @@ .\" Title: Options Common to MySQL Cluster Programs .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "OPTIONS COMMON TO MY" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "OPTIONS COMMON TO MY" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -175,7 +175,7 @@ All MySQL 5.5 based releases T} T{ .PP ---character-sets-dir=path +--character-sets-dir=dir_name T}:T{ Directory where character sets are installed T}:T{ @@ -275,14 +275,14 @@ l l l s T{ \fBCommand\-Line Format\fR T}:T{ -\-\-character\-sets\-dir=path +\-\-character\-sets\-dir=dir_name T} T{ \fBPermitted Values\fR T}:T{ \fBType\fR T}:T{ -file name +directory name T} :T{ \fBDefault\fR @@ -304,9 +304,9 @@ Tells the program where to find character set information\&. .\" ndb-connectstring option (MySQL Cluster programs) .\" connect-string option (MySQL Cluster programs) .\" -c option (MySQL Cluster programs) -\fB\-\-ndb\-connectstring=\fR\fB\fIconnect_string\fR\fR, -\fB\-\-connect\-string=\fR\fB\fIconnect_string\fR\fR, -\fB\-c \fR\fB\fIconnect_string\fR\fR +\fB\-\-ndb\-connectstring=\fR\fB\fIconnection_string\fR\fR, +\fB\-\-connect\-string=\fR\fB\fIconnection_string\fR\fR, +\fB\-c \fR\fB\fIconnection_string\fR\fR .TS allbox tab(:); l l s s diff --git a/man/ndb_blob_tool.1 b/man/ndb_blob_tool.1 index ce48eaa3af46..0d193bc99b2a 100644 --- a/man/ndb_blob_tool.1 +++ b/man/ndb_blob_tool.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_blob_tool\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_BLOB_TOOL\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_BLOB_TOOL\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_config.1 b/man/ndb_config.1 index d8bc57cf51ac..fffd801747ae 100644 --- a/man/ndb_config.1 +++ b/man/ndb_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CONFIG\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CONFIG\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -183,7 +183,7 @@ All MySQL 5.5 based releases T} T{ .PP ---config-file=path +--config-file=file_name T}:T{ Set the path to config.ini file T}:T{ @@ -378,8 +378,8 @@ to print a version information string, and then exit\&. .\} .\" ndb_config: ndb-connectstring option .\" ndb-connectstring option: ndb_config -\fB\-\-ndb\-connectstring=\fR\fB\fIconnect_string\fR\fR, -\fB\-c \fR\fB\fIconnect_string\fR\fR +\fB\-\-ndb\-connectstring=\fR\fB\fIconnection_string\fR\fR, +\fB\-c \fR\fB\fIconnection_string\fR\fR .TS allbox tab(:); l l s s @@ -434,7 +434,7 @@ l l l s T{ \fBCommand\-Line Format\fR T}:T{ -\-\-config\-file=path +\-\-config\-file=file_name T} T{ \fBPermitted Values\fR @@ -1156,7 +1156,7 @@ option\&. A portion of the resulting output is shown in this example: .\} .nf shell> \fBndb_config \-\-configinfo \-\-xml\fR -
diff --git a/man/ndb_cpcd.1 b/man/ndb_cpcd.1 index 788a1c70b9c0..7c7ada72e419 100644 --- a/man/ndb_cpcd.1 +++ b/man/ndb_cpcd.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_cpcd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CPCD\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CPCD\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_delete_all.1 b/man/ndb_delete_all.1 index 91f1b54188b9..22dde28e447a 100644 --- a/man/ndb_delete_all.1 +++ b/man/ndb_delete_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_delete_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DELETE_ALL\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DELETE_ALL\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -48,7 +48,7 @@ Usage .RS 4 .\} .nf -ndb_delete_all \-c \fIconnect_string\fR \fItbl_name\fR \-d \fIdb_name\fR +ndb_delete_all \-c \fIconnection_string\fR \fItbl_name\fR \-d \fIdb_name\fR .fi .if n \{\ .RE diff --git a/man/ndb_desc.1 b/man/ndb_desc.1 index 5f18ff21baf2..7061358de1e2 100644 --- a/man/ndb_desc.1 +++ b/man/ndb_desc.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_desc\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DESC\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DESC\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -45,7 +45,7 @@ Usage .RS 4 .\} .nf -ndb_desc \-c \fIconnect_string\fR \fItbl_name\fR \-d \fIdb_name\fR [\-p] +ndb_desc \-c \fIconnection_string\fR \fItbl_name\fR \-d \fIdb_name\fR [\fIoptions\fR] .fi .if n \{\ .RE @@ -57,12 +57,15 @@ ndb_desc \-c \fIconnect_string\fR \fItbl_name\fR \-d \fIdb_name\fR [\-p] .RS 4 .\} .nf -ndb_desc \-c \fIconnect_string\fR \fIindex_name\fR \-d \fIdb_name\fR \-t \fItbl_name\fR +ndb_desc \-c \fIconnection_string\fR \fIindex_name\fR \-d \fIdb_name\fR \-t \fItbl_name\fR .fi .if n \{\ .RE .\} -.sp +.PP +Additional options that can be used with +\fBndb_desc\fR +are listed later in this section\&. Sample Output.PP MySQL table creation and population statements: .sp diff --git a/man/ndb_drop_index.1 b/man/ndb_drop_index.1 index 0b0a3f08d357..73572cfe6586 100644 --- a/man/ndb_drop_index.1 +++ b/man/ndb_drop_index.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_index\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_INDEX\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_INDEX\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -46,7 +46,7 @@ Usage .RS 4 .\} .nf -ndb_drop_index \-c \fIconnect_string\fR \fItable_name\fR \fIindex\fR \-d \fIdb_name\fR +ndb_drop_index \-c \fIconnection_string\fR \fItable_name\fR \fIindex\fR \-d \fIdb_name\fR .fi .if n \{\ .RE @@ -123,7 +123,7 @@ Enter password: ******* Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with \-A Welcome to the MySQL monitor\&. Commands end with ; or \eg\&. -Your MySQL connection id is 7 to server version: 5\&.5\&.44\-ndb\-7\&.2\&.21 +Your MySQL connection id is 7 to server version: 5\&.5\&.45\-ndb\-7\&.2\&.22 Type \*(Aqhelp;\*(Aq or \*(Aq\eh\*(Aq for help\&. Type \*(Aq\ec\*(Aq to clear the buffer\&. mysql> \fBSHOW TABLES;\fR +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ diff --git a/man/ndb_drop_table.1 b/man/ndb_drop_table.1 index 44eb90e9c697..aa4b4c5287a4 100644 --- a/man/ndb_drop_table.1 +++ b/man/ndb_drop_table.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_table\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_TABLE\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_TABLE\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -51,7 +51,7 @@ Usage .RS 4 .\} .nf -ndb_drop_table \-c \fIconnect_string\fR \fItbl_name\fR \-d \fIdb_name\fR +ndb_drop_table \-c \fIconnection_string\fR \fItbl_name\fR \-d \fIdb_name\fR .fi .if n \{\ .RE diff --git a/man/ndb_error_reporter.1 b/man/ndb_error_reporter.1 index 23166c310935..d3121ed2a816 100644 --- a/man/ndb_error_reporter.1 +++ b/man/ndb_error_reporter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_error_reporter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_ERROR_REPORTE" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_ERROR_REPORTE" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_index_stat.1 b/man/ndb_index_stat.1 index 34eaaf5a18a0..57eee8949e47 100644 --- a/man/ndb_index_stat.1 +++ b/man/ndb_index_stat.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_index_stat\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_INDEX_STAT\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_INDEX_STAT\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_mgm.1 b/man/ndb_mgm.1 index b30773b27eb5..616c7fe484ce 100644 --- a/man/ndb_mgm.1 +++ b/man/ndb_mgm.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgm\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGM\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGM\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_mgmd.8 b/man/ndb_mgmd.8 index c4c90d58ede4..4275ff83177c 100644 --- a/man/ndb_mgmd.8 +++ b/man/ndb_mgmd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgmd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGMD\FR" "8" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGMD\FR" "8" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -336,7 +336,7 @@ Do not perform any checks of node IDs\&. .IP \(bu 2.3 .\} .\" configdir option (ndb_mgmd) -\fB\-\-configdir=\fR\fB\fIpath\fR\fR +\fB\-\-configdir=\fR\fB\fIdir_name\fR\fR .TS allbox tab(:); l l s s diff --git a/man/ndb_print_backup_file.1 b/man/ndb_print_backup_file.1 index bbbc8fa98544..d447c70e291a 100644 --- a/man/ndb_print_backup_file.1 +++ b/man/ndb_print_backup_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_backup_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_BACKUP_" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_BACKUP_" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_file.1 b/man/ndb_print_file.1 index 7d19ec474d96..b2c16b512b0f 100644 --- a/man/ndb_print_file.1 +++ b/man/ndb_print_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_FILE\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_FILE\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_schema_file.1 b/man/ndb_print_schema_file.1 index 93cb9c911bcb..c263d650a410 100644 --- a/man/ndb_print_schema_file.1 +++ b/man/ndb_print_schema_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_schema_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SCHEMA_" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SCHEMA_" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_sys_file.1 b/man/ndb_print_sys_file.1 index 746514597859..7a8eba583aeb 100644 --- a/man/ndb_print_sys_file.1 +++ b/man/ndb_print_sys_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_sys_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SYS_FIL" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SYS_FIL" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_restore.1 b/man/ndb_restore.1 index bc1f3f84ea3b..859d8702e2e5 100644 --- a/man/ndb_restore.1 +++ b/man/ndb_restore.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_restore\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_RESTORE\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_RESTORE\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -308,7 +308,7 @@ All MySQL 5.5 based releases T} T{ .PP ---backup_path=path +--backup_path=dir_name T}:T{ Path to backup files directory T}:T{ @@ -386,9 +386,9 @@ All MySQL 5.5 based releases T} T{ .PP ---tab=path, +--tab=dir_name, .PP --T +-T dir_name T}:T{ Creates a tab-separated .txt file for each table in the given path T}:T{ @@ -753,7 +753,7 @@ column can be restored to a column of type INT or BIGINT\&. See -Section\ \&17.4.1.9.2, \(lqReplication of Columns Having Different Data Types\(rq, for a table of type conversions currently supported by attribute promotion\&. +Section\ \&17.4.1.10.2, \(lqReplication of Columns Having Different Data Types\(rq, for a table of type conversions currently supported by attribute promotion\&. .PP Attribute promotion by \fBndb_restore\fR @@ -868,7 +868,7 @@ This option is intended to complement the option\&. Using \fB\-\-lossy\-conversions\fR allows lossy conversions of column values (type demotions or changes in sign) when restoring data from backup\&. With some exceptions, the rules governing demotion are the same as for MySQL replication; see -Section\ \&17.4.1.9.2, \(lqReplication of Columns Having Different Data Types\(rq, for information about specific type conversions currently supported by attribute demotion\&. +Section\ \&17.4.1.10.2, \(lqReplication of Columns Having Different Data Types\(rq, for information about specific type conversions currently supported by attribute demotion\&. .PP \fBndb_restore\fR reports any truncation of data that it performs during lossy conversions once per attribute and column\&. @@ -1097,11 +1097,19 @@ stdout, or to a file\&. These are similar to some of the options used with \fB\-T\fR .TS allbox tab(:); -l l s s. +l l s s +l l l s. T{ \fBCommand\-Line Format\fR T}:T{ -\-\-tab=path +\-\-tab=dir_name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +directory name T} .TE .sp 1 diff --git a/man/ndb_select_all.1 b/man/ndb_select_all.1 index c6905c3c8653..fa28f381d5ef 100644 --- a/man/ndb_select_all.1 +++ b/man/ndb_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_ALL\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_ALL\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,8 +31,8 @@ .SH "NAME" ndb_select_all \- print rows from an NDB table .SH "SYNOPSIS" -.HP \w'\fBndb_select_all\ \-c\ \fR\fB\fIconnect_string\fR\fR\fB\ \fR\fB\fItbl_name\fR\fR\fB\ \-d\ \fR\fB\fIdb_name\fR\fR\fB\ [>\ \fR\fB\fIfile_name\fR\fR\fB]\fR\ 'u -\fBndb_select_all \-c \fR\fB\fIconnect_string\fR\fR\fB \fR\fB\fItbl_name\fR\fR\fB \-d \fR\fB\fIdb_name\fR\fR\fB [> \fR\fB\fIfile_name\fR\fR\fB]\fR +.HP \w'\fBndb_select_all\ \-c\ \fR\fB\fIconnection_string\fR\fR\fB\ \fR\fB\fItbl_name\fR\fR\fB\ \-d\ \fR\fB\fIdb_name\fR\fR\fB\ [>\ \fR\fB\fIfile_name\fR\fR\fB]\fR\ 'u +\fBndb_select_all \-c \fR\fB\fIconnection_string\fR\fR\fB \fR\fB\fItbl_name\fR\fR\fB \-d \fR\fB\fIdb_name\fR\fR\fB [> \fR\fB\fIfile_name\fR\fR\fB]\fR .SH "DESCRIPTION" .PP \fBndb_select_all\fR @@ -46,7 +46,7 @@ Usage .RS 4 .\} .nf -ndb_select_all \-c \fIconnect_string\fR \fItbl_name\fR \-d \fIdb_name\fR [> \fIfile_name\fR] +ndb_select_all \-c \fIconnection_string\fR \fItbl_name\fR \-d \fIdb_name\fR [> \fIfile_name\fR] .fi .if n \{\ .RE diff --git a/man/ndb_select_count.1 b/man/ndb_select_count.1 index 4781c63e85c9..3a744bda19da 100644 --- a/man/ndb_select_count.1 +++ b/man/ndb_select_count.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_count\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_COUNT\" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_COUNT\" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,8 +31,8 @@ .SH "NAME" ndb_select_count \- print row counts for NDB tables .SH "SYNOPSIS" -.HP \w'\fBndb_select_count\ [\-c\ \fR\fB\fIconnect_string\fR\fR\fB]\ \-d\ \fR\fB\fIdb_name\fR\fR\fB\ \fR\fB\fItbl_name\fR\fR\fB[\ \fR\fB\fItbl_name2\fR\fR\fB[\ \&.\&.\&.]]\fR\ 'u -\fBndb_select_count [\-c \fR\fB\fIconnect_string\fR\fR\fB] \-d \fR\fB\fIdb_name\fR\fR\fB \fR\fB\fItbl_name\fR\fR\fB[ \fR\fB\fItbl_name2\fR\fR\fB[ \&.\&.\&.]]\fR +.HP \w'\fBndb_select_count\ [\-c\ \fR\fB\fIconnection_string\fR\fR\fB]\ \-d\ \fR\fB\fIdb_name\fR\fR\fB\ \fR\fB\fItbl_name\fR\fR\fB[\ \fR\fB\fItbl_name2\fR\fR\fB[\ \&.\&.\&.]]\fR\ 'u +\fBndb_select_count [\-c \fR\fB\fIconnection_string\fR\fR\fB] \-d \fR\fB\fIdb_name\fR\fR\fB \fR\fB\fItbl_name\fR\fR\fB[ \fR\fB\fItbl_name2\fR\fR\fB[ \&.\&.\&.]]\fR .SH "DESCRIPTION" .PP \fBndb_select_count\fR @@ -46,7 +46,7 @@ Usage .RS 4 .\} .nf -ndb_select_count [\-c \fIconnect_string\fR] \-d\fIdb_name\fR \fItbl_name\fR[, \fItbl_name2\fR[, \&.\&.\&.]] +ndb_select_count [\-c \fIconnection_string\fR] \-d\fIdb_name\fR \fItbl_name\fR[, \fItbl_name2\fR[, \&.\&.\&.]] .fi .if n \{\ .RE diff --git a/man/ndb_show_tables.1 b/man/ndb_show_tables.1 index 1582d689d521..ed8fda612df9 100644 --- a/man/ndb_show_tables.1 +++ b/man/ndb_show_tables.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_show_tables\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SHOW_TABLES\F" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SHOW_TABLES\F" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -142,7 +142,7 @@ Usage .RS 4 .\} .nf -ndb_show_tables [\-c \fIconnect_string\fR] +ndb_show_tables [\-c \fIconnection_string\fR] .fi .if n \{\ .RE diff --git a/man/ndb_size.pl.1 b/man/ndb_size.pl.1 index 4721d3cd27ab..85bb74d13b5d 100644 --- a/man/ndb_size.pl.1 +++ b/man/ndb_size.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_size.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SIZE\&.PL\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SIZE\&.PL\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -146,7 +146,7 @@ All MySQL 5.5 based releases T} T{ .PP ---socket=file +--socket=file_name T}:T{ Specify a socket to connect to T}:T{ diff --git a/man/ndb_waiter.1 b/man/ndb_waiter.1 index bbc7e384f4b2..aa95f1752905 100644 --- a/man/ndb_waiter.1 +++ b/man/ndb_waiter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_waiter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_WAITER\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_WAITER\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -229,7 +229,7 @@ Usage .RS 4 .\} .nf -ndb_waiter [\-c \fIconnect_string\fR] +ndb_waiter [\-c \fIconnection_string\fR] .fi .if n \{\ .RE diff --git a/man/ndbd.8 b/man/ndbd.8 index a5cac0c46cea..f1003cc82fcd 100644 --- a/man/ndbd.8 +++ b/man/ndbd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD\FR" "8" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD\FR" "8" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbd_redo_log_reader.1 b/man/ndbd_redo_log_reader.1 index 3042a7648d19..809ecb16a284 100644 --- a/man/ndbd_redo_log_reader.1 +++ b/man/ndbd_redo_log_reader.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbd_redo_log_reader\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD_REDO_LOG_REA" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD_REDO_LOG_REA" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbinfo_select_all.1 b/man/ndbinfo_select_all.1 index ca556d163a5e..c6382f3ea005 100644 --- a/man/ndbinfo_select_all.1 +++ b/man/ndbinfo_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbinfo_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBINFO_SELECT_AL" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBINFO_SELECT_AL" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbmtd.8 b/man/ndbmtd.8 index 8ce5d6d1ed1c..97813fd5d508 100644 --- a/man/ndbmtd.8 +++ b/man/ndbmtd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbmtd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBMTD\FR" "8" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBMTD\FR" "8" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/perror.1 b/man/perror.1 index 678047526723..e51625e3545f 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -2,12 +2,12 @@ .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/replace.1 b/man/replace.1 index 064bab089d36..c36092653741 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -2,12 +2,12 @@ .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index 8f0f9908cfc1..06887ac108cf 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -125,7 +125,7 @@ Display version information and exit\&. .RE .PP For more information, see -Section\ \&24.4.1.5, \(lqUsing a Stack Trace\(rq\&. +Section\ \&24.5.1.5, \(lqUsing a Stack Trace\(rq\&. .SH "COPYRIGHT" .br .PP diff --git a/man/resolveip.1 b/man/resolveip.1 index 3f78cd3d77f2..28567aa1670e 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 06/25/2015 +.\" Date: 09/18/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "06/25/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- From 24c68e05c063c262eec8a991e86b4ef3795ebe9e Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Mon, 16 Nov 2015 04:07:08 -0800 Subject: [PATCH 070/305] Bump WSREP_PATCH_VERSION in cmake/wsrep.cmake to 13 --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 67d7f918f71f..a52c46cc7d82 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "12") +SET(WSREP_PATCH_VERSION "13") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From 6e34db301f5c6a3a4da410be309f6f9895fb0c52 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Mon, 11 Jan 2016 12:03:05 +0200 Subject: [PATCH 071/305] Update man pages to 5.5.47 --- man/comp_err.1 | 4 +-- man/innochecksum.1 | 4 +-- man/msql2mysql.1 | 4 +-- man/my_print_defaults.1 | 4 +-- man/myisam_ftdump.1 | 4 +-- man/myisamchk.1 | 21 ++------------ man/myisamlog.1 | 4 +-- man/myisampack.1 | 4 +-- man/mysql-stress-test.pl.1 | 4 +-- man/mysql-test-run.pl.1 | 4 +-- man/mysql.1 | 10 +++---- man/mysql.server.1 | 4 +-- man/mysql_client_test.1 | 4 +-- man/mysql_config.1 | 4 +-- man/mysql_convert_table_format.1 | 4 +-- man/mysql_find_rows.1 | 4 +-- man/mysql_fix_extensions.1 | 4 +-- man/mysql_install_db.1 | 4 +-- man/mysql_plugin.1 | 4 +-- man/mysql_secure_installation.1 | 4 +-- man/mysql_setpermission.1 | 4 +-- man/mysql_tzinfo_to_sql.1 | 4 +-- man/mysql_upgrade.1 | 4 +-- man/mysql_waitpid.1 | 4 +-- man/mysql_zap.1 | 4 +-- man/mysqlaccess.1 | 4 +-- man/mysqladmin.1 | 4 +-- man/mysqlbinlog.1 | 4 +-- man/mysqlbug.1 | 4 +-- man/mysqlcheck.1 | 24 +++++++++++++-- man/mysqld.8 | 4 +-- man/mysqld_multi.1 | 4 +-- man/mysqld_safe.1 | 4 +-- man/mysqldump.1 | 26 +++++++++++++++-- man/mysqldumpslow.1 | 4 +-- man/mysqlhotcopy.1 | 4 +-- man/mysqlimport.1 | 24 +++++++++++++-- man/mysqlshow.1 | 24 +++++++++++++-- man/mysqlslap.1 | 4 +-- man/mysqltest.1 | 4 +-- man/ndb-common-options.1 | 50 ++++++++++++++++---------------- man/ndb_blob_tool.1 | 4 +-- man/ndb_config.1 | 16 +++++----- man/ndb_cpcd.1 | 4 +-- man/ndb_delete_all.1 | 4 +-- man/ndb_desc.1 | 4 +-- man/ndb_drop_index.1 | 6 ++-- man/ndb_drop_table.1 | 4 +-- man/ndb_error_reporter.1 | 4 +-- man/ndb_index_stat.1 | 4 +-- man/ndb_mgm.1 | 19 ++++++++++-- man/ndb_mgmd.8 | 16 +++++----- man/ndb_print_backup_file.1 | 4 +-- man/ndb_print_file.1 | 4 +-- man/ndb_print_schema_file.1 | 4 +-- man/ndb_print_sys_file.1 | 4 +-- man/ndb_restore.1 | 8 ++--- man/ndb_select_all.1 | 4 +-- man/ndb_select_count.1 | 4 +-- man/ndb_show_tables.1 | 4 +-- man/ndb_size.pl.1 | 4 +-- man/ndb_waiter.1 | 4 +-- man/ndbd.8 | 17 ++++++----- man/ndbd_redo_log_reader.1 | 4 +-- man/ndbinfo_select_all.1 | 4 +-- man/ndbmtd.8 | 6 ++-- man/perror.1 | 4 +-- man/replace.1 | 4 +-- man/resolve_stack_dump.1 | 4 +-- man/resolveip.1 | 4 +-- 70 files changed, 284 insertions(+), 207 deletions(-) diff --git a/man/comp_err.1 b/man/comp_err.1 index a7e858efb6df..3adce25a2de0 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -2,12 +2,12 @@ .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 85e9669b2cc8..116586f532ea 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -2,12 +2,12 @@ .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 index 2402b13c697f..784e8a315e17 100644 --- a/man/msql2mysql.1 +++ b/man/msql2mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmsql2mysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMSQL2MYSQL\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMSQL2MYSQL\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index 043d935dc3e8..09d9555bccfe 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -2,12 +2,12 @@ .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index e3bff42b0042..dc250db186df 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisamchk.1 b/man/myisamchk.1 index dcc6758eee50..47c26a6a01fe 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1179,23 +1179,6 @@ key_buffer_size\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: set-character-set option -.\" set-character-set option: myisamchk -\fB\-\-set\-character\-set=\fR\fB\fIname\fR\fR -.sp -Change the character set used by the table indexes\&. This option was replaced by -\fB\-\-set\-collation\fR -in MySQL 5\&.0\&.3\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} .\" myisamchk: set-collation option .\" set-collation option: myisamchk \fB\-\-set\-collation=\fR\fB\fIname\fR\fR diff --git a/man/myisamlog.1 b/man/myisamlog.1 index ce83d453e408..3b6833103a78 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisampack.1 b/man/myisampack.1 index 7f33f96e70a0..c34c5ef5a35b 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index c28af0381363..c8d2b9944ac7 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/16/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "09/16/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "11/06/2015" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index 1217a2b90278..94c2485a578a 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/16/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "09/16/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "11/06/2015" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql.1 b/man/mysql.1 index f1ccedda586a..ecb8a99ce830 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1712,7 +1712,7 @@ For server side help, type \*(Aqhelp contents\*(Aq .PP Each command has both a long and short form\&. The long form is not case sensitive; the short form is\&. The long form can be followed by an optional semicolon terminator, but the short form should not\&. .PP -The use of short\-form commands within multi\-line +The use of short\-form commands within multiple\-line /* \&.\&.\&. */ comments is not supported\&. .sp @@ -2761,7 +2761,7 @@ Consequently, an input statement that spans multiple lines can be logged twice\& mysql> \fBSELECT\fR \-> \fB\*(AqToday is\*(Aq\fR \-> \fB,\fR - \-> \fBCONCAT()\fR + \-> \fBCURDATE()\fR \-> \fB;\fR .fi .if n \{\ @@ -2774,7 +2774,7 @@ logs the \(lqSELECT\(rq, \(lq\*(AqToday is\*(Aq\(rq, \(lq,\(rq, -\(lqCONCAT()\(rq, and +\(lqCURDATE()\(rq, and \(lq;\(rq lines as it reads them\&. It also logs the complete statement, after mapping SELECT\en\*(AqToday is\*(Aq\en,\enCURDATE() diff --git a/man/mysql.server.1 b/man/mysql.server.1 index ec4063a11bbb..235763483f5e 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index f060236ebb22..90912ce0f069 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/16/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "09/16/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "11/06/2015" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_config.1 b/man/mysql_config.1 index 9c39d015c278..973dc2b170fc 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 index 79151c8a397f..1a90fd3510da 100644 --- a/man/mysql_convert_table_format.1 +++ b/man/mysql_convert_table_format.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_convert_table_format\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONVERT_TAB" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONVERT_TAB" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 index 3be653a230cf..73eecb6b98ed 100644 --- a/man/mysql_find_rows.1 +++ b/man/mysql_find_rows.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_find_rows\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIND_ROWS\F" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 index 7c7ed98cfb17..2ecb6a2d54e3 100644 --- a/man/mysql_fix_extensions.1 +++ b/man/mysql_fix_extensions.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_fix_extensions\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIX_EXTENSI" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index f80159a2a15f..6a852a6c6e48 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index e4bc51d80eca..3d593d2888c1 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index 84168ff32972..568bb68dd1ad 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 index 0dfc3295b891..9055b98908be 100644 --- a/man/mysql_setpermission.1 +++ b/man/mysql_setpermission.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_setpermission\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SETPERMISSI" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SETPERMISSI" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index 6a789c5680b1..46afbbe9b06f 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index b15bc152693a..39e6147ecf94 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 index ed32f6853686..cfb1c603a417 100644 --- a/man/mysql_waitpid.1 +++ b/man/mysql_waitpid.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_waitpid\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_WAITPID\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_WAITPID\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 index ed6764359e6e..e544df553b23 100644 --- a/man/mysql_zap.1 +++ b/man/mysql_zap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_zap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_ZAP\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_ZAP\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index 9db54b325e84..b0b6c5a1bf72 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlaccess\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLACCESS\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLACCESS\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index 4bff5267c52f..a2de345a4fd2 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index 2a85d8bb5c15..a161067a0cd1 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlbug.1 b/man/mysqlbug.1 index eb831fcb90fb..4f98720dd72a 100644 --- a/man/mysqlbug.1 +++ b/man/mysqlbug.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbug\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBUG\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBUG\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index 534826ea7c6f..a7a5fd9ee1cd 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -604,6 +604,26 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysqlcheck: enable-cleartext-plugin option +.\" enable-cleartext-plugin option: mysqlcheck +\fB\-\-enable\-cleartext\-plugin\fR +.sp +Enable the +mysql_clear_password +cleartext authentication plugin\&. (See +Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +.sp +This option was added in MySQL 5\&.5\&.47\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysqlcheck: fast option .\" fast option: mysqlcheck \fB\-\-fast\fR, diff --git a/man/mysqld.8 b/man/mysqld.8 index e27e19ad917a..265a959c218c 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index 4e40c12f86d5..5f352d0a8ca1 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index e74154162325..e6b3d9d7191d 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqldump.1 b/man/mysqldump.1 index a84993be245e..38168cc1c3c1 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1265,6 +1265,26 @@ prints the error message, but it also writes an SQL comment containing the view .sp -1 .IP \(bu 2.3 .\} +.\" mysqldump: enable-cleartext-plugin option +.\" enable-cleartext-plugin option: mysqldump +\fB\-\-enable\-cleartext\-plugin\fR +.sp +Enable the +mysql_clear_password +cleartext authentication plugin\&. (See +Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +.sp +This option was added in MySQL 5\&.5\&.47\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysqldump: host option .\" host option: mysqldump \fB\-\-host=\fR\fB\fIhost_name\fR\fR, @@ -2740,7 +2760,7 @@ Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .\" mysqldump: workarounds .PP If you encounter problems backing up views, please read the section that covers restrictions on views which describes a workaround for backing up views when this fails due to insufficient privileges\&. See -Section\ \&D.5, \(lqRestrictions on Views\(rq\&. +Section\ \&C.5, \(lqRestrictions on Views\(rq\&. .SH "COPYRIGHT" .br .PP diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index cc02d6cc30d1..c199888f4eda 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 index 09b7148253bd..e3aac1322b04 100644 --- a/man/mysqlhotcopy.1 +++ b/man/mysqlhotcopy.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlhotcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLHOTCOPY\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLHOTCOPY\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index 1f6c53acf226..361881ab13b4 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -351,6 +351,26 @@ Empty the table before importing the text file\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysqlimport: enable-cleartext-plugin option +.\" enable-cleartext-plugin option: mysqlimport +\fB\-\-enable\-cleartext\-plugin\fR +.sp +Enable the +mysql_clear_password +cleartext authentication plugin\&. (See +Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +.sp +This option was added in MySQL 5\&.5\&.47\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysqldump: fields-terminated-by option .\" fields-terminated-by option: mysqldump \fB\-\-fields\-terminated\-by=\&.\&.\&.\fR, diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index 8540af64647f..e543f848693e 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -369,6 +369,26 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysqlshow: enable-cleartext-plugin option +.\" enable-cleartext-plugin option: mysqlshow +\fB\-\-enable\-cleartext\-plugin\fR +.sp +Enable the +mysql_clear_password +cleartext authentication plugin\&. (See +Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +.sp +This option was added in MySQL 5\&.5\&.47\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysqlshow: host option .\" host option: mysqlshow \fB\-\-host=\fR\fB\fIhost_name\fR\fR, diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index 30831ea95161..06c7c5885008 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqltest.1 b/man/mysqltest.1 index b90d7c71a5f5..7561e554a3d9 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/16/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "09/16/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "11/06/2015" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb-common-options.1 b/man/ndb-common-options.1 index f121694d4913..a164b3540d49 100644 --- a/man/ndb-common-options.1 +++ b/man/ndb-common-options.1 @@ -2,12 +2,12 @@ .\" Title: Options Common to MySQL Cluster Programs .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "OPTIONS COMMON TO MY" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "OPTIONS COMMON TO MY" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -133,70 +133,70 @@ All MySQL 5.5 based releases T} T{ .PP ---ndb-connectstring=connectstring, -.PP ---connect-string=connectstring, -.PP --c +--character-sets-dir=dir_name T}:T{ -Set connection string for connecting to ndb_mgmd. Syntax: - [nodeid=;][host=][:]. - Overrides entries specified in NDB_CONNECTSTRING or my.cnf. +Directory where character sets are installed T}:T{ .PP All MySQL 5.5 based releases T} T{ .PP ---ndb-mgmd-host=host[:port] +--core-file T}:T{ -Set the host (and port, if desired) for connecting to management server +Write core on errors (defaults to TRUE in debug builds) T}:T{ .PP All MySQL 5.5 based releases T} T{ .PP ---ndb-nodeid=# +--debug=options T}:T{ -Set node id for this node +Enable output from debug calls. Can be used only for versions compiled + with debugging enabled T}:T{ .PP All MySQL 5.5 based releases T} T{ .PP ---ndb-optimized-node-selection +--ndb-connectstring=connectstring, +.PP +--connect-string=connectstring, +.PP +-c T}:T{ -Select nodes for transactions in a more optimal way +Set connection string for connecting to ndb_mgmd. Syntax: + [nodeid=;][host=][:]. + Overrides entries specified in NDB_CONNECTSTRING or my.cnf. T}:T{ .PP All MySQL 5.5 based releases T} T{ .PP ---character-sets-dir=dir_name +--ndb-mgmd-host=host[:port] T}:T{ -Directory where character sets are installed +Set the host (and port, if desired) for connecting to management server T}:T{ .PP All MySQL 5.5 based releases T} T{ .PP ---debug=options +--ndb-nodeid=# T}:T{ -Enable output from debug calls. Can be used only for versions compiled - with debugging enabled +Set node id for this node T}:T{ .PP All MySQL 5.5 based releases T} T{ .PP ---core-file +--ndb-optimized-node-selection T}:T{ -Write core on errors (defaults to TRUE in debug builds) +Select nodes for transactions in a more optimal way T}:T{ .PP All MySQL 5.5 based releases @@ -219,7 +219,7 @@ For options specific to individual MySQL Cluster programs, see Section\ \&18.4, \(lqMySQL Cluster Programs\(rq\&. .PP See -Section\ \&18.3.4.2, \(lqMySQL Server Options for MySQL Cluster\(rq, for +Section\ \&18.3.3.8.1, \(lqMySQL Server Options for MySQL Cluster\(rq, for \fBmysqld\fR options relating to MySQL Cluster\&. .sp @@ -350,7 +350,7 @@ shell> \fBndbd \-\-ndb\-connectstring="nodeid=2;host=ndb_mgmd\&.mysql\&.com:1186 .\} .sp For more information, see -Section\ \&18.3.2.3, \(lqMySQL Cluster Connection Strings\(rq\&. +Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq\&. .RE .sp .RS 4 diff --git a/man/ndb_blob_tool.1 b/man/ndb_blob_tool.1 index 0d193bc99b2a..453b0108fec3 100644 --- a/man/ndb_blob_tool.1 +++ b/man/ndb_blob_tool.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_blob_tool\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_BLOB_TOOL\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_BLOB_TOOL\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_config.1 b/man/ndb_config.1 index fffd801747ae..07b2b0b11977 100644 --- a/man/ndb_config.1 +++ b/man/ndb_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CONFIG\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CONFIG\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -411,7 +411,7 @@ T} .TE .sp 1 Specifies the connection string to use in connecting to the management server\&. The format for the connection string is the same as described in -Section\ \&18.3.2.3, \(lqMySQL Cluster Connection Strings\(rq, and defaults to +Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq, and defaults to localhost:1186\&. .RE .sp @@ -716,7 +716,7 @@ to print information relating only to parameters defined in an or [ndbd default] section of the cluster configuration file (see -Section\ \&18.3.2.6, \(lqDefining MySQL Cluster Data Nodes\(rq)\&. +Section\ \&18.3.3.6, \(lqDefining MySQL Cluster Data Nodes\(rq)\&. .sp This option is mutually exclusive with \fB\-\-connections\fR @@ -771,9 +771,9 @@ information only\(emthat is, information about parameters found in the [shm], or [shm default] sections of the cluster configuration file (see -Section\ \&18.3.2.8, \(lqMySQL Cluster TCP/IP Connections\(rq, -Section\ \&18.3.2.11, \(lqSCI Transport Connections in MySQL Cluster\(rq, and -Section\ \&18.3.2.10, \(lqMySQL Cluster Shared-Memory Connections\(rq, for more information)\&. +Section\ \&18.3.3.9, \(lqMySQL Cluster TCP/IP Connections\(rq, +Section\ \&18.3.3.12, \(lqSCI Transport Connections in MySQL Cluster\(rq, and +Section\ \&18.3.3.11, \(lqMySQL Cluster Shared-Memory Connections\(rq, for more information)\&. .sp This option is mutually exclusive with \fB\-\-nodes\fR @@ -1156,7 +1156,7 @@ option\&. A portion of the resulting output is shown in this example: .\} .nf shell> \fBndb_config \-\-configinfo \-\-xml\fR -
diff --git a/man/ndb_cpcd.1 b/man/ndb_cpcd.1 index 7c7ada72e419..2fba9c048632 100644 --- a/man/ndb_cpcd.1 +++ b/man/ndb_cpcd.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_cpcd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CPCD\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CPCD\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_delete_all.1 b/man/ndb_delete_all.1 index 22dde28e447a..3c86abd2f93f 100644 --- a/man/ndb_delete_all.1 +++ b/man/ndb_delete_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_delete_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DELETE_ALL\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DELETE_ALL\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_desc.1 b/man/ndb_desc.1 index 7061358de1e2..6a7b9be582ec 100644 --- a/man/ndb_desc.1 +++ b/man/ndb_desc.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_desc\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DESC\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DESC\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_drop_index.1 b/man/ndb_drop_index.1 index 73572cfe6586..99f3d02a22c5 100644 --- a/man/ndb_drop_index.1 +++ b/man/ndb_drop_index.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_index\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_INDEX\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_INDEX\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -123,7 +123,7 @@ Enter password: ******* Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with \-A Welcome to the MySQL monitor\&. Commands end with ; or \eg\&. -Your MySQL connection id is 7 to server version: 5\&.5\&.45\-ndb\-7\&.2\&.22 +Your MySQL connection id is 7 to server version: 5\&.5\&.46\-ndb\-7\&.2\&.23 Type \*(Aqhelp;\*(Aq or \*(Aq\eh\*(Aq for help\&. Type \*(Aq\ec\*(Aq to clear the buffer\&. mysql> \fBSHOW TABLES;\fR +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ diff --git a/man/ndb_drop_table.1 b/man/ndb_drop_table.1 index aa4b4c5287a4..3af8dbec2a8c 100644 --- a/man/ndb_drop_table.1 +++ b/man/ndb_drop_table.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_table\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_TABLE\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_TABLE\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_error_reporter.1 b/man/ndb_error_reporter.1 index d3121ed2a816..96510bd98b18 100644 --- a/man/ndb_error_reporter.1 +++ b/man/ndb_error_reporter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_error_reporter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_ERROR_REPORTE" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_ERROR_REPORTE" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_index_stat.1 b/man/ndb_index_stat.1 index 57eee8949e47..73210ec8ae05 100644 --- a/man/ndb_index_stat.1 +++ b/man/ndb_index_stat.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_index_stat\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_INDEX_STAT\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_INDEX_STAT\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_mgm.1 b/man/ndb_mgm.1 index 616c7fe484ce..06332a9d6b02 100644 --- a/man/ndb_mgm.1 +++ b/man/ndb_mgm.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgm\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGM\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGM\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -107,7 +107,8 @@ T{ .PP -t T}:T{ -Specify number of tries for connecting to ndb_mgmd (0 = infinite) +Set the number of times to retry a connection before giving up; 0 means + 1 attempt only (and no retries) T}:T{ .PP All MySQL 5.5 based releases @@ -203,6 +204,8 @@ be enclosed in quotation marks\&. Either single or double quotation marks may be allbox tab(:); l l s s l l l s +^ l l s +^ l l s ^ l l s. T{ \fBCommand\-Line Format\fR @@ -221,6 +224,16 @@ T} T}:T{ 3 T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} .TE .sp 1 If the connection to the management server is broken, the node tries to reconnect to it every 5 seconds until it succeeds\&. By using this option, it is possible to limit the number of attempts to diff --git a/man/ndb_mgmd.8 b/man/ndb_mgmd.8 index 4275ff83177c..dc4c43e80528 100644 --- a/man/ndb_mgmd.8 +++ b/man/ndb_mgmd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgmd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGMD\FR" "8" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGMD\FR" "8" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -413,7 +413,7 @@ TRUE, or ON), can be used to disable the management server\*(Aqs configuration cache, so that it reads its configuration from config\&.ini every time it starts (see -Section\ \&18.3.2, \(lqMySQL Cluster Configuration Files\(rq)\&. You can do this by starting the +Section\ \&18.3.3, \(lqMySQL Cluster Configuration Files\(rq)\&. You can do this by starting the \fBndb_mgmd\fR process with any one of the following options: .sp @@ -576,7 +576,7 @@ option, or because the management server could not find any configuration cache\ \fBndb_mgmd\fR was started with \fB\-\-config\-cache=OFF\fR\&. See -Section\ \&18.3.2, \(lqMySQL Cluster Configuration Files\(rq, for more information\&. +Section\ \&18.3.3, \(lqMySQL Cluster Configuration Files\(rq, for more information\&. .sp Formerly, using this option together with \fB\-\-initial\fR @@ -744,7 +744,7 @@ T} .TE .sp 1 Configuration data is cached internally, rather than being read from the cluster global configuration file each time the management server is started (see -Section\ \&18.3.2, \(lqMySQL Cluster Configuration Files\(rq)\&. Using the +Section\ \&18.3.3, \(lqMySQL Cluster Configuration Files\(rq)\&. Using the \fB\-\-initial\fR option overrides this behavior, by forcing the management server to delete any existing cache files, and then to re\-read the configuration data from the cluster configuration file and to build a new cache\&. .sp @@ -932,7 +932,7 @@ T} .TE .sp 1 In MySQL Cluster NDB 7\&.2, configuration data is stored internally rather than being read from the cluster global configuration file each time the management server is started (see -Section\ \&18.3.2, \(lqMySQL Cluster Configuration Files\(rq)\&. Using this option forces the management server to check its internal data store against the cluster configuration file and to reload the configuration if it finds that the configuration file does not match the cache\&. Existing configuration cache files are preserved, but not used\&. +Section\ \&18.3.3, \(lqMySQL Cluster Configuration Files\(rq)\&. Using this option forces the management server to check its internal data store against the cluster configuration file and to reload the configuration if it finds that the configuration file does not match the cache\&. Existing configuration cache files are preserved, but not used\&. .sp This differs in two ways from the \fB\-\-initial\fR @@ -1078,7 +1078,7 @@ shell> \fBndbd \-c 192\&.168\&.0\&.150,192\&.168\&.0\&.151\fR The same is true with regard to the connection string used with any \fBmysqld\fR processes that you wish to start as MySQL Cluster SQL nodes connected to this cluster\&. See -Section\ \&18.3.2.3, \(lqMySQL Cluster Connection Strings\(rq, for more information\&. +Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq, for more information\&. .sp When used with \fBndb_mgmd\fR, this option affects the behavior of the management node with regard to other management nodes only\&. Do not confuse it with the @@ -1112,7 +1112,7 @@ management server, its configuration must match that of the management server th It is not strictly necessary to specify a connection string when starting the management server\&. However, if you are using more than one management server, a connection string should be provided and each node in the cluster should specify its node ID explicitly\&. .PP See -Section\ \&18.3.2.3, \(lqMySQL Cluster Connection Strings\(rq, for information about using connection strings\&. +Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq, for information about using connection strings\&. \fBndb_mgmd\fR(8), describes other options for \fBndb_mgmd\fR\&. .PP diff --git a/man/ndb_print_backup_file.1 b/man/ndb_print_backup_file.1 index d447c70e291a..9843c90b8f61 100644 --- a/man/ndb_print_backup_file.1 +++ b/man/ndb_print_backup_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_backup_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_BACKUP_" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_BACKUP_" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_file.1 b/man/ndb_print_file.1 index b2c16b512b0f..8ca854b4efaf 100644 --- a/man/ndb_print_file.1 +++ b/man/ndb_print_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_FILE\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_FILE\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_schema_file.1 b/man/ndb_print_schema_file.1 index c263d650a410..de98aa7761bc 100644 --- a/man/ndb_print_schema_file.1 +++ b/man/ndb_print_schema_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_schema_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SCHEMA_" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SCHEMA_" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_sys_file.1 b/man/ndb_print_sys_file.1 index 7a8eba583aeb..e575d8c40c70 100644 --- a/man/ndb_print_sys_file.1 +++ b/man/ndb_print_sys_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_sys_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SYS_FIL" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SYS_FIL" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_restore.1 b/man/ndb_restore.1 index 859d8702e2e5..274e47b69473 100644 --- a/man/ndb_restore.1 +++ b/man/ndb_restore.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_restore\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_RESTORE\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_RESTORE\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -609,7 +609,7 @@ The option is used to specify a connection string which tells ndb_restore where to locate the cluster management server\&. (See -Section\ \&18.3.2.3, \(lqMySQL Cluster Connection Strings\(rq, for information on connection strings\&.) If this option is not used, then +Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq, for information on connection strings\&.) If this option is not used, then \fBndb_restore\fR attempts to connect to a management server on localhost:1186\&. This utility acts as a cluster API node, and so requires a free connection @@ -627,7 +627,7 @@ or section in config\&.ini that is not being used for a MySQL server or other application for this reason (see -Section\ \&18.3.2.7, \(lqDefining SQL and Other API Nodes in a MySQL Cluster\(rq)\&. +Section\ \&18.3.3.7, \(lqDefining SQL and Other API Nodes in a MySQL Cluster\(rq)\&. .PP You can verify that \fBndb_restore\fR diff --git a/man/ndb_select_all.1 b/man/ndb_select_all.1 index fa28f381d5ef..7749b2a41631 100644 --- a/man/ndb_select_all.1 +++ b/man/ndb_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_ALL\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_ALL\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_select_count.1 b/man/ndb_select_count.1 index 3a744bda19da..c324b113dc64 100644 --- a/man/ndb_select_count.1 +++ b/man/ndb_select_count.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_count\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_COUNT\" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_COUNT\" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_show_tables.1 b/man/ndb_show_tables.1 index ed8fda612df9..5706fc466b08 100644 --- a/man/ndb_show_tables.1 +++ b/man/ndb_show_tables.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_show_tables\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SHOW_TABLES\F" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SHOW_TABLES\F" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_size.pl.1 b/man/ndb_size.pl.1 index 85bb74d13b5d..aa52a550954b 100644 --- a/man/ndb_size.pl.1 +++ b/man/ndb_size.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_size.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SIZE\&.PL\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SIZE\&.PL\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_waiter.1 b/man/ndb_waiter.1 index aa95f1752905..ea97392f4a12 100644 --- a/man/ndb_waiter.1 +++ b/man/ndb_waiter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_waiter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_WAITER\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_WAITER\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbd.8 b/man/ndbd.8 index f1003cc82fcd..9353c9840826 100644 --- a/man/ndbd.8 +++ b/man/ndbd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD\FR" "8" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD\FR" "8" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -187,8 +187,8 @@ T{ .PP --connect-retries=# T}:T{ -Number of times to try contacting the management server; set to -1 to - keep trying indefinitely +Set the number of times to retry a connection before giving up; 0 means + 1 attempt only (and no retries) T}:T{ .PP ADDED: NDB 7.2.9 @@ -197,7 +197,8 @@ T{ .PP --connect-delay=# T}:T{ -Time to wait between attempts to contact a management server, in seconds +Time to wait between attempts to contact a management server, in + seconds; 0 means do not wait between attempts T}:T{ .PP ADDED: NDB 7.2.9 @@ -880,7 +881,7 @@ T} :T{ \fBMin Value\fR T}:T{ -\-1 +0 T} :T{ \fBMax Value\fR @@ -1127,10 +1128,10 @@ shell> \fBndbd \-\-connect\-string="nodeid=2;host=ndb_mgmd\&.mysql\&.com:1186"\f .\} .PP See -Section\ \&18.3.2.3, \(lqMySQL Cluster Connection Strings\(rq, for additional information about this issue\&. +Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq, for additional information about this issue\&. Options Common to MySQL Cluster Programs(1), describes other command\-line options which can be used with \fBndbd\fR\&. For information about data node configuration parameters, see -Section\ \&18.3.2.6, \(lqDefining MySQL Cluster Data Nodes\(rq\&. +Section\ \&18.3.3.6, \(lqDefining MySQL Cluster Data Nodes\(rq\&. .PP When \fBndbd\fR diff --git a/man/ndbd_redo_log_reader.1 b/man/ndbd_redo_log_reader.1 index 809ecb16a284..0cacb1bd32dc 100644 --- a/man/ndbd_redo_log_reader.1 +++ b/man/ndbd_redo_log_reader.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbd_redo_log_reader\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD_REDO_LOG_REA" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD_REDO_LOG_REA" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbinfo_select_all.1 b/man/ndbinfo_select_all.1 index c6382f3ea005..209f0bc5b9cd 100644 --- a/man/ndbinfo_select_all.1 +++ b/man/ndbinfo_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbinfo_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBINFO_SELECT_AL" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBINFO_SELECT_AL" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbmtd.8 b/man/ndbmtd.8 index 97813fd5d508..65ac5b2be6d6 100644 --- a/man/ndbmtd.8 +++ b/man/ndbmtd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbmtd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBMTD\FR" "8" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBMTD\FR" "8" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -59,7 +59,7 @@ Command\-line options and configuration parameters used with also apply to \fBndbmtd\fR\&. For more information about these options and parameters, see \fBndbd\fR(8), and -Section\ \&18.3.2.6, \(lqDefining MySQL Cluster Data Nodes\(rq, respectively\&. +Section\ \&18.3.3.6, \(lqDefining MySQL Cluster Data Nodes\(rq, respectively\&. .PP \fBndbmtd\fR is also file system\-compatible with diff --git a/man/perror.1 b/man/perror.1 index e51625e3545f..111e88eccbef 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -2,12 +2,12 @@ .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/replace.1 b/man/replace.1 index c36092653741..52c83f098277 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -2,12 +2,12 @@ .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index 06887ac108cf..d7b22c1bd2bd 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolveip.1 b/man/resolveip.1 index 28567aa1670e..ada9c68642f6 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/18/2015 +.\" Date: 11/06/2015 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "09/18/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- From 99491376dd4b717118fd0bcc898b9f37c3291e0c Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Mon, 11 Jan 2016 12:03:35 +0200 Subject: [PATCH 072/305] Bump WSREP_PATCH_VERSION in cmake/wsrep.cmake to 14 --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index a52c46cc7d82..028d6811265e 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "13") +SET(WSREP_PATCH_VERSION "14") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From 3a03afbc9026633b5206cfbd5ac65b6b76638d23 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 4 Mar 2016 11:54:16 +0200 Subject: [PATCH 073/305] Refs MW-253 - initializing THD in rollbacker thread before calling trans_rollback() for idle victim - added warning messages if client rollback fails - removed a block of obsolete code in wsrep_thd.cc --- sql/handler.cc | 3 +++ sql/wsrep_thd.cc | 70 +++++++++--------------------------------------- 2 files changed, 15 insertions(+), 58 deletions(-) diff --git a/sql/handler.cc b/sql/handler.cc index f4c80d3562c3..bb649d7e14b4 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1595,6 +1595,9 @@ int ha_rollback_low(THD *thd, bool all) { // cannot happen my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err); error= 1; + WSREP_WARN("handlerton rollback failed, thd %lu %lld conf %d SQL %s", + thd->thread_id, thd->query_id, thd->wsrep_conflict_state, + thd->query()); } status_var_increment(thd->status_var.ha_rollback_count); ha_info_next= ha_info->next(); diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index 159501220585..e79ec4a753a1 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -36,14 +36,18 @@ int wsrep_show_bf_aborts (THD *thd, SHOW_VAR *var, char *buff) /* must have (&thd->LOCK_wsrep_thd) */ void wsrep_client_rollback(THD *thd) { - WSREP_DEBUG("client rollback due to BF abort for (%ld), query: %s", - thd->thread_id, WSREP_QUERY(thd)); + WSREP_DEBUG("client rollback due to BF abort for (%ld %lld), query: %s", + thd->thread_id, thd->query_id, WSREP_QUERY(thd)); my_atomic_add64(&wsrep_bf_aborts_counter, 1); thd->wsrep_conflict_state= ABORTING; mysql_mutex_unlock(&thd->LOCK_wsrep_thd); - trans_rollback(thd); + if (trans_rollback(thd)) + { + WSREP_WARN("client rollback failed for: %lu %lld, conf: %d", + thd->thread_id, thd->query_id, thd->wsrep_conflict_state); + } if (thd->locked_tables_mode && thd->lock) { @@ -86,61 +90,6 @@ static Relay_log_info* wsrep_relay_log_init(const char* log_fname) new Format_description_log_event(BINLOG_VERSION)); return (rli); - -#ifdef REMOVED - Rpl_info_handler* handler_src= NULL; - Rpl_info_handler* handler_dest= NULL; - ulong *key_info_idx= NULL; - const char *msg= "Failed to allocate memory for the relay log info " - "structure"; - - DBUG_ENTER("Rpl_info_factory::create_rli"); - - if (!(rli= new Relay_log_info(false -#ifdef HAVE_PSI_INTERFACE - ,&key_relay_log_info_run_lock, - &key_relay_log_info_data_lock, - &key_relay_log_info_sleep_lock, - &key_relay_log_info_data_cond, - &key_relay_log_info_start_cond, - &key_relay_log_info_stop_cond, - &key_relay_log_info_sleep_cond -#endif /* HAVE_PSI_INTERFACE */ - ))) - goto err; - - if (!(key_info_idx= new ulong[NUMBER_OF_FIELDS_TO_IDENTIFY_COORDINATOR])) - goto err; - key_info_idx[0]= server_id; - rli->set_idx_info(key_info_idx, NUMBER_OF_FIELDS_TO_IDENTIFY_COORDINATOR); - - if(Rpl_info_factory::init_rli_repositories(rli, rli_option, &handler_src, - &handler_dest, &msg)) - goto err; - - if (Rpl_info_factory::decide_repository(rli, rli_option, &handler_src, - &handler_dest, &msg)) - goto err; - - DBUG_RETURN(rli); -err: - delete handler_src; - delete handler_dest; - delete []key_info_idx; - if (rli) - { - /* - The handler was previously deleted so we need to remove - any reference to it. - */ - rli->set_idx_info(NULL, 0); - rli->set_rpl_info_handler(NULL); - rli->set_rpl_info_type(INVALID_INFO_REPOSITORY); - delete rli; - } - WSREP_ERROR("Error creating relay log info: %s.", msg); - DBUG_RETURN(NULL); -#endif /* REMOVED */ } static void wsrep_prepare_bf_thd(THD *thd, struct wsrep_thd_shadow* shadow) @@ -447,6 +396,11 @@ static void wsrep_rollback_process(THD *thd) aborting->store_globals(); mysql_mutex_lock(&aborting->LOCK_wsrep_thd); + + /* prepare THD for rollback processing */ + mysql_reset_thd_for_next_command(aborting); + aborting->lex->sql_command= SQLCOM_ROLLBACK; + wsrep_client_rollback(aborting); WSREP_DEBUG("WSREP rollbacker aborted thd: (%lu %llu)", aborting->thread_id, (long long)aborting->real_id); From 1082d0ef999ed67937720e356a5df54af8885a26 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Fri, 4 Mar 2016 14:17:47 +0200 Subject: [PATCH 074/305] Update man pages to 5.5.48 --- man/comp_err.1 | 6 ++-- man/innochecksum.1 | 6 ++-- man/msql2mysql.1 | 6 ++-- man/my_print_defaults.1 | 6 ++-- man/myisam_ftdump.1 | 6 ++-- man/myisamchk.1 | 8 ++--- man/myisamlog.1 | 6 ++-- man/myisampack.1 | 14 +++------ man/mysql-stress-test.pl.1 | 6 ++-- man/mysql-test-run.pl.1 | 22 +++++++------- man/mysql.1 | 13 +++++--- man/mysql.server.1 | 6 ++-- man/mysql_client_test.1 | 6 ++-- man/mysql_config.1 | 6 ++-- man/mysql_convert_table_format.1 | 6 ++-- man/mysql_find_rows.1 | 6 ++-- man/mysql_fix_extensions.1 | 6 ++-- man/mysql_install_db.1 | 6 ++-- man/mysql_plugin.1 | 6 ++-- man/mysql_secure_installation.1 | 6 ++-- man/mysql_setpermission.1 | 6 ++-- man/mysql_tzinfo_to_sql.1 | 8 ++--- man/mysql_upgrade.1 | 8 ++--- man/mysql_waitpid.1 | 6 ++-- man/mysql_zap.1 | 6 ++-- man/mysqlaccess.1 | 6 ++-- man/mysqladmin.1 | 16 +++++----- man/mysqlbinlog.1 | 8 ++--- man/mysqlbug.1 | 6 ++-- man/mysqlcheck.1 | 8 ++--- man/mysqld.8 | 6 ++-- man/mysqld_multi.1 | 52 +++++++++++++++++--------------- man/mysqld_safe.1 | 6 ++-- man/mysqldump.1 | 18 +++++++---- man/mysqldumpslow.1 | 6 ++-- man/mysqlhotcopy.1 | 6 ++-- man/mysqlimport.1 | 8 ++--- man/mysqlshow.1 | 8 ++--- man/mysqlslap.1 | 8 ++--- man/mysqltest.1 | 23 ++++++++++++-- man/ndb-common-options.1 | 6 ++-- man/ndb_blob_tool.1 | 6 ++-- man/ndb_config.1 | 8 ++--- man/ndb_cpcd.1 | 6 ++-- man/ndb_delete_all.1 | 6 ++-- man/ndb_desc.1 | 6 ++-- man/ndb_drop_index.1 | 6 ++-- man/ndb_drop_table.1 | 6 ++-- man/ndb_error_reporter.1 | 6 ++-- man/ndb_index_stat.1 | 6 ++-- man/ndb_mgm.1 | 10 +++--- man/ndb_mgmd.8 | 6 ++-- man/ndb_print_backup_file.1 | 6 ++-- man/ndb_print_file.1 | 6 ++-- man/ndb_print_schema_file.1 | 6 ++-- man/ndb_print_sys_file.1 | 6 ++-- man/ndb_restore.1 | 8 ++--- man/ndb_select_all.1 | 6 ++-- man/ndb_select_count.1 | 6 ++-- man/ndb_show_tables.1 | 6 ++-- man/ndb_size.pl.1 | 6 ++-- man/ndb_waiter.1 | 6 ++-- man/ndbd.8 | 6 ++-- man/ndbd_redo_log_reader.1 | 6 ++-- man/ndbinfo_select_all.1 | 32 +++++++++----------- man/ndbmtd.8 | 6 ++-- man/perror.1 | 6 ++-- man/replace.1 | 6 ++-- man/resolve_stack_dump.1 | 6 ++-- man/resolveip.1 | 6 ++-- 70 files changed, 303 insertions(+), 283 deletions(-) diff --git a/man/comp_err.1 b/man/comp_err.1 index 3adce25a2de0..19afcef10ab5 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -2,12 +2,12 @@ .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -264,7 +264,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 116586f532ea..6ef183794d6f 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -2,12 +2,12 @@ .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -152,7 +152,7 @@ Verbose mode; print a progress indicator every five seconds\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 index 784e8a315e17..c9101bde9765 100644 --- a/man/msql2mysql.1 +++ b/man/msql2mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmsql2mysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMSQL2MYSQL\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMSQL2MYSQL\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -69,7 +69,7 @@ utility to make the function name substitutions\&. See .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index 09d9555bccfe..b7dcee8381e1 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -2,12 +2,12 @@ .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -204,7 +204,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index dc250db186df..2519bca347eb 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -251,7 +251,7 @@ Verbose mode\&. Print more output about what the program does\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/myisamchk.1 b/man/myisamchk.1 index 47c26a6a01fe..11d663c2a63a 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1613,7 +1613,7 @@ File\-version .sp Version of MyISAM -format\&. Currently always 1\&. +format\&. Always 1\&. .RE .sp .RS 4 @@ -2563,7 +2563,7 @@ instead of .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/myisamlog.1 b/man/myisamlog.1 index 3b6833103a78..0129dafb0e69 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -228,7 +228,7 @@ Display version information\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/myisampack.1 b/man/myisampack.1 index c34c5ef5a35b..08f5d5c389b4 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -245,13 +245,7 @@ have identical structure (same column names and types, same indexes, and so fort \fIbig_tbl_name\fR must not exist prior to the join operation\&. All source tables named on the command line to be merged into \fIbig_tbl_name\fR -must exist\&. The source tables are read for the join operation but not modified\&. The join operation does not create a -\&.frm -file for -\fIbig_tbl_name\fR, so after the join operation finishes, copy the -\&.frm -file from one of the source tables and name it -\fIbig_tbl_name\fR\&.frm\&. +must exist\&. The source tables are read for the join operation but not modified\&. .RE .sp .RS 4 @@ -860,7 +854,7 @@ option to .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index c8d2b9944ac7..0279cf72c21e 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "11/06/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "01/14/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -498,7 +498,7 @@ Verbose mode\&. Print more information about what the program does\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index 94c2485a578a..213f9d276ce3 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "11/06/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "01/14/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -865,13 +865,13 @@ option\&. .\} .\" mysql-test-run.pl: debug-sync-timeout option .\" debug-sync-timeout option: mysql-test-run.pl -\fB\-\-debug\-sync\-timeout=\fR\fB\fIN\fR\fR +\fB\-\-debug\-sync\-timeout=\fR\fB\fIseconds\fR\fR .sp Controls whether the Debug Sync facility for testing and debugging is enabled\&. The option value is a timeout in seconds\&. The default value is 300\&. A value of 0 disables Debug Sync\&. The value of this option also becomes the default timeout for individual synchronization points\&. .sp \fBmysql\-test\-run\&.pl\fR passes -\fB\-\-loose\-debug\-sync\-timeout=\fR\fB\fIN\fR\fR +\fB\-\-loose\-debug\-sync\-timeout=\fR\fB\fIseconds\fR\fR to \fBmysqld\fR\&. The \fB\-\-loose\fR @@ -1562,7 +1562,7 @@ not to generate a timing file\&. The effect of this is that the report from each .\" nounit-tests option: mysql-test-run.pl \fB\-\-nounit\-tests\fR .sp -Do not run unit tests, overriding default behaviour or setting of the +Do not run unit tests, overriding default behavior or setting of the MTR_UNIT_TESTS variable\&. .sp @@ -1809,7 +1809,7 @@ Allow a failed and retried test to fail more than the default 2 times before giv .\} .\" mysql-test-run.pl: shutdown-timeout option .\" shutdown-timeout option: mysql-test-run.pl -\fB\-\-shutdown\-timeout=\fR\fB\fISECONDS\fR\fR +\fB\-\-shutdown\-timeout=\fR\fB\fIseconds\fR\fR .sp Max number of seconds to wait for servers to do controlled shutdown before killing them\&. Default is 10\&. .RE @@ -2206,7 +2206,7 @@ directory)\&. .\" suite-timeout option: mysql-test-run.pl \fB\-\-suite\-timeout=\fR\fB\fIminutes\fR\fR .sp -Specify the maximum test suite runtime\&. +Specify the maximum test suite runtime in minutes\&. .RE .sp .RS 4 @@ -2219,9 +2219,9 @@ Specify the maximum test suite runtime\&. .\} .\" mysql-test-run.pl: testcase-timeout option .\" testcase-timeout option: mysql-test-run.pl -\fB\-\-testcase\-timeout\fR +\fB\-\-testcase\-timeout=\fR\fB\fIminutes\fR\fR .sp -Specify the maximum test case runtime\&. +Specify the maximum test case runtime in minutes\&. .RE .sp .RS 4 @@ -2303,7 +2303,7 @@ will be set to the path for this directory, whether it has the default value or .\" unit-tests option: mysql-test-run.pl \fB\-\-unit\-tests\fR .sp -Force running of unit tests, overriding default behaviour or setting of the +Force running of unit tests, overriding default behavior or setting of the MTR_UNIT_TESTS variable\&. .sp @@ -2626,7 +2626,7 @@ in their name\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql.1 b/man/mysql.1 index ecb8a99ce830..3bfe7316afb2 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -357,6 +357,11 @@ Write a debugging log\&. A typical string is d:t:o,\fIfile_name\fR\&. The default is d:t:o,/tmp/mysql\&.trace\&. +.sp +This option is available only if MySQL was built using +\fBWITH_DEBUG\fR\&. MySQL release binaries provided by Oracle are +\fInot\fR +built using this option\&. .RE .sp .RS 4 @@ -1375,7 +1380,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. .RE .sp .RS 4 @@ -3357,7 +3362,7 @@ Section\ \&23.8.16, \(lqControlling Automatic Reconnection Behavior\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql.server.1 b/man/mysql.server.1 index 235763483f5e..379a8f6168c4 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -339,7 +339,7 @@ exits with an error\&. The default value is 900\&. A value of 0 means not to wai .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index 90912ce0f069..2a0e3e6ad3dd 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "11/06/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "01/14/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -335,7 +335,7 @@ mysql\-test/var\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_config.1 b/man/mysql_config.1 index 973dc2b170fc..0f3c02827ebf 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -259,7 +259,7 @@ gcc \-o progname progname\&.o `mysql_config \-\-libs` .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 index 1a90fd3510da..3cb7f0f42aea 100644 --- a/man/mysql_convert_table_format.1 +++ b/man/mysql_convert_table_format.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_convert_table_format\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONVERT_TAB" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONVERT_TAB" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -225,7 +225,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 index 73eecb6b98ed..7320928623d9 100644 --- a/man/mysql_find_rows.1 +++ b/man/mysql_find_rows.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_find_rows\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIND_ROWS\F" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -160,7 +160,7 @@ Start output from this row\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 index 2ecb6a2d54e3..23e575a1c51b 100644 --- a/man/mysql_fix_extensions.1 +++ b/man/mysql_fix_extensions.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_fix_extensions\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIX_EXTENSI" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -70,7 +70,7 @@ shell> \fBmysql_fix_extensions \fR\fB\fIdata_dir\fR\fR .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index 6a852a6c6e48..b9c9b420453c 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -381,7 +381,7 @@ For internal use\&. This option is used for creating Windows distributions\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index 3d593d2888c1..d7bb42e893a2 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -370,7 +370,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index 568bb68dd1ad..86887fb3284c 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -110,7 +110,7 @@ When executed, the script prompts you to determine which actions to perform\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 index 9055b98908be..633973c8da8b 100644 --- a/man/mysql_setpermission.1 +++ b/man/mysql_setpermission.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_setpermission\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SETPERMISSI" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SETPERMISSI" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -172,7 +172,7 @@ The MySQL user name to use when connecting to the server\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index 46afbbe9b06f..caae9505c17c 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -41,7 +41,7 @@ The program loads the time zone tables in the mysql database\&. It is used on systems that have a -zoneinfo +\fIzoneinfo\fR database (the set of files describing time zones)\&. Examples of such systems are Linux, FreeBSD, Solaris, and OS X\&. One likely location for these files is the /usr/share/zoneinfo directory (/usr/share/lib/zoneinfo @@ -122,7 +122,7 @@ After running .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index 39e6147ecf94..e4a0c0577754 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -698,7 +698,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. .RE .sp .RS 4 @@ -808,7 +808,7 @@ runs\&. This is the default behavior; to disable binary logging during the upgra .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 index cfb1c603a417..06f197003d3b 100644 --- a/man/mysql_waitpid.1 +++ b/man/mysql_waitpid.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_waitpid\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_WAITPID\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_WAITPID\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -129,7 +129,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 index e544df553b23..e80d6665399b 100644 --- a/man/mysql_zap.1 +++ b/man/mysql_zap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_zap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_ZAP\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_ZAP\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -125,7 +125,7 @@ Test mode\&. Display information about each process but do not kill it\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index b0b6c5a1bf72..a171b5b94465 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlaccess\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLACCESS\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLACCESS\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -432,7 +432,7 @@ error will occur when you run .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index a2de345a4fd2..d0008e19f391 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -215,7 +215,7 @@ Kill server threads\&. If multiple thread ID values are given, there must be no .sp -1 .IP \(bu 2.3 .\} -old\-password \fInew\-password\fR +old\-password \fInew_password\fR .sp This is like the password @@ -231,10 +231,10 @@ Section\ \&6.1.2.4, \(lqPassword Hashing in MySQL\(rq\&.) .sp -1 .IP \(bu 2.3 .\} -password \fInew\-password\fR +password \fInew_password\fR .sp Set a new password\&. This changes the password to -\fInew\-password\fR +\fInew_password\fR for the account that you use with \fBmysqladmin\fR for connecting to the server\&. Thus, the next time you invoke @@ -242,7 +242,7 @@ for connecting to the server\&. Thus, the next time you invoke (or any other client program) using the same account, you will need to specify the new password\&. .sp If the -\fInew\-password\fR +\fInew_password\fR value contains spaces or other characters that are special to your command interpreter, you need to enclose it within quotation marks\&. On Windows, be sure to use double quotation marks rather than single quotation marks; single quotation marks are not stripped from the password, but rather are interpreted as part of the password\&. For example: .sp .if n \{\ @@ -1158,7 +1158,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. .RE .sp .RS 4 @@ -1282,7 +1282,7 @@ The maximum number of seconds to wait for server shutdown\&. The default value i .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index a161067a0cd1..164390ca0294 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1809,7 +1809,7 @@ Master Pos: The position of the next event in the original master log file\&. .sp -1 .IP \(bu 2.3 .\} -Flags: 16 flags\&. Currently, the following flags are used\&. The others are reserved for future use\&. +Flags: 16 flags\&. The following flags are used\&. The others are reserved for future use\&. .TS allbox tab(:); lB lB lB. @@ -2240,7 +2240,7 @@ option can be used to prevent this header from being written\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlbug.1 b/man/mysqlbug.1 index 4f98720dd72a..a783e2c99a8f 100644 --- a/man/mysqlbug.1 +++ b/man/mysqlbug.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbug\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBUG\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBUG\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -42,7 +42,7 @@ The normal way to report bugs is to visit .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index a7a5fd9ee1cd..47abb1781ba2 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -961,7 +961,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. .RE .sp .RS 4 @@ -1081,7 +1081,7 @@ when these statements should not be sent to replication slaves or run when using .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqld.8 b/man/mysqld.8 index 265a959c218c..f0ad419f32fd 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -62,7 +62,7 @@ Chapter\ \&2, Installing and Upgrading MySQL\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index 5f352d0a8ca1..1ede9aea911c 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -659,42 +659,44 @@ in the option file\&. This gives you more flexibility\&. .RS 4 .\} .nf -# This file should probably be in your home dir (~/\&.my\&.cnf) -# or /etc/my\&.cnf -# Version 2\&.1 by Jani Tolonen +# This is an example of a my\&.cnf file for mysqld_multi\&. +# Usually this file is located in home dir ~/\&.my\&.cnf or /etc/my\&.cnf [mysqld_multi] -mysqld = /usr/local/bin/mysqld_safe -mysqladmin = /usr/local/bin/mysqladmin +mysqld = /usr/local/mysql/bin/mysqld_safe +mysqladmin = /usr/local/mysql/bin/mysqladmin user = multi_admin -password = multipass +password = my_password [mysqld2] socket = /tmp/mysql\&.sock2 port = 3307 -pid\-file = /usr/local/mysql/var2/hostname\&.pid2 -datadir = /usr/local/mysql/var2 -language = /usr/local/share/mysql/english -user = john +pid\-file = /usr/local/mysql/data2/hostname\&.pid2 +datadir = /usr/local/mysql/data2 +language = /usr/local/mysql/share/mysql/english +user = unix_user1 [mysqld3] +mysqld = /path/to/mysqld_safe +ledir = /path/to/mysqld\-binary/ +mysqladmin = /path/to/mysqladmin socket = /tmp/mysql\&.sock3 port = 3308 -pid\-file = /usr/local/mysql/var3/hostname\&.pid3 -datadir = /usr/local/mysql/var3 -language = /usr/local/share/mysql/swedish -user = monty +pid\-file = /usr/local/mysql/data3/hostname\&.pid3 +datadir = /usr/local/mysql/data3 +language = /usr/local/mysql/share/mysql/swedish +user = unix_user2 [mysqld4] socket = /tmp/mysql\&.sock4 port = 3309 -pid\-file = /usr/local/mysql/var4/hostname\&.pid4 -datadir = /usr/local/mysql/var4 -language = /usr/local/share/mysql/estonia -user = tonu +pid\-file = /usr/local/mysql/data4/hostname\&.pid4 +datadir = /usr/local/mysql/data4 +language = /usr/local/mysql/share/mysql/estonia +user = unix_user3 [mysqld6] socket = /tmp/mysql\&.sock6 port = 3311 -pid\-file = /usr/local/mysql/var6/hostname\&.pid6 -datadir = /usr/local/mysql/var6 -language = /usr/local/share/mysql/japanese -user = jani +pid\-file = /usr/local/mysql/data6/hostname\&.pid6 +datadir = /usr/local/mysql/data6 +language = /usr/local/mysql/share/mysql/japanese +user = unix_user4 .fi .if n \{\ .RE @@ -705,7 +707,7 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index e6b3d9d7191d..5534dd213a7a 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -871,7 +871,7 @@ might be overwritten if you upgrade MySQL in the future, so you should make a co .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqldump.1 b/man/mysqldump.1 index 38168cc1c3c1..fc6e3e69c770 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -2260,7 +2260,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. .RE .sp .RS 4 @@ -2301,9 +2301,15 @@ This option should be used only when \fBmysqldump\fR is run on the same machine as the \fBmysqld\fR -server\&. You must have the +server\&. Because the server creates files +*\&.txt +file in the directory that you specify, the directory must be writable by the server and the MySQL account that you use must have the FILE -privilege, and the server must have permission to write files in the directory that you specify\&. +privilege\&. Because +\fBmysqldump\fR +creates +*\&.sql +in the same directory, it must be writable by your system login account\&. .sp .5v .RE By default, the @@ -2764,7 +2770,7 @@ Section\ \&C.5, \(lqRestrictions on Views\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index c199888f4eda..3e9104aeab6b 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -323,7 +323,7 @@ Count: 3 Time=2\&.13s (6s) Lock=0\&.00s (0s) Rows=0\&.0 (0), root[root]@local .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 index e3aac1322b04..c006b730dafd 100644 --- a/man/mysqlhotcopy.1 +++ b/man/mysqlhotcopy.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlhotcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLHOTCOPY\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLHOTCOPY\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -544,7 +544,7 @@ shell> \fBperldoc mysqlhotcopy\fR .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index 361881ab13b4..b3535a447358 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -753,7 +753,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. .RE .sp .RS 4 @@ -857,7 +857,7 @@ shell> \fBmysql \-e \*(AqSELECT * FROM imptest\*(Aq test\fR .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index e543f848693e..e5c82252f5c1 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -616,7 +616,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. .RE .sp .RS 4 @@ -685,7 +685,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index 06c7c5885008..09964813b47e 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1060,7 +1060,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.4, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. .RE .sp .RS 4 @@ -1113,7 +1113,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqltest.1 b/man/mysqltest.1 index 7561e554a3d9..029c0c234d4d 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "11/06/2015" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "01/14/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -868,6 +868,23 @@ for its reporting\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysqltest: tls-version option +.\" tls-version option: mysqltest +\fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR +.sp +The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more of these protocols: TLSv1, TLSv1\&.1, TLSv1\&.2\&. (TLSv1\&.2 is supported only if MySQL was compiled using OpenSSL 1\&.0\&.1 or higher\&. It is not supported if MySQL was compiled using yaSSL\&.) +.sp +This option was added in MySQL 5\&.7\&.10\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysqltest: tmpdir option .\" tmpdir option: mysqltest \fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, @@ -943,7 +960,7 @@ statement is wrapped inside a view\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb-common-options.1 b/man/ndb-common-options.1 index a164b3540d49..c38bf01013e7 100644 --- a/man/ndb-common-options.1 +++ b/man/ndb-common-options.1 @@ -2,12 +2,12 @@ .\" Title: Options Common to MySQL Cluster Programs .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "OPTIONS COMMON TO MY" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "OPTIONS COMMON TO MY" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -586,7 +586,7 @@ Section\ \&18.5.5, \(lqPerforming a Rolling Restart of a MySQL Cluster\(rq), for .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_blob_tool.1 b/man/ndb_blob_tool.1 index 453b0108fec3..7d196026fc74 100644 --- a/man/ndb_blob_tool.1 +++ b/man/ndb_blob_tool.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_blob_tool\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_BLOB_TOOL\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_BLOB_TOOL\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -450,7 +450,7 @@ Section\ \&11.7, \(lqData Type Storage Requirements\(rq, for more information\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_config.1 b/man/ndb_config.1 index 07b2b0b11977..076f0ffdb60f 100644 --- a/man/ndb_config.1 +++ b/man/ndb_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CONFIG\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CONFIG\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -531,7 +531,7 @@ T} .TE .sp 1 This is a comma\-delimited list of -query options\(emthat is, a list of one or more node attributes to be returned\&. These include +\fIquery options\fR\(emthat is, a list of one or more node attributes to be returned\&. These include id (node ID), type (node type\(emthat is, ndbd, @@ -1447,7 +1447,7 @@ option\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_cpcd.1 b/man/ndb_cpcd.1 index 2fba9c048632..c42d79b0142a 100644 --- a/man/ndb_cpcd.1 +++ b/man/ndb_cpcd.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_cpcd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CPCD\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CPCD\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -39,7 +39,7 @@ A utility having this name was formerly part of an internal automated test frame .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_delete_all.1 b/man/ndb_delete_all.1 index 3c86abd2f93f..08b1b65ec973 100644 --- a/man/ndb_delete_all.1 +++ b/man/ndb_delete_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_delete_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DELETE_ALL\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DELETE_ALL\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -162,7 +162,7 @@ With very large tables, using this option may cause the number of operations ava .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_desc.1 b/man/ndb_desc.1 index 6a7b9be582ec..64686488f7fe 100644 --- a/man/ndb_desc.1 +++ b/man/ndb_desc.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_desc\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DESC\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DESC\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -566,7 +566,7 @@ Use unqualified table names\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_drop_index.1 b/man/ndb_drop_index.1 index 99f3d02a22c5..eb4e23e03cd1 100644 --- a/man/ndb_drop_index.1 +++ b/man/ndb_drop_index.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_index\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_INDEX\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_INDEX\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -154,7 +154,7 @@ utility (see .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_drop_table.1 b/man/ndb_drop_table.1 index 3af8dbec2a8c..f0041644bcdc 100644 --- a/man/ndb_drop_table.1 +++ b/man/ndb_drop_table.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_table\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_TABLE\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_TABLE\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -95,7 +95,7 @@ T} .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_error_reporter.1 b/man/ndb_error_reporter.1 index 96510bd98b18..1cc86446812d 100644 --- a/man/ndb_error_reporter.1 +++ b/man/ndb_error_reporter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_error_reporter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_ERROR_REPORTE" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_ERROR_REPORTE" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -311,7 +311,7 @@ Skip all nodes belong to the node group having the supplied node group ID\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_index_stat.1 b/man/ndb_index_stat.1 index 73210ec8ae05..e7009781caea 100644 --- a/man/ndb_index_stat.1 +++ b/man/ndb_index_stat.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_index_stat\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_INDEX_STAT\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_INDEX_STAT\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1012,7 +1012,7 @@ Repeat commands this number of times (for use in testing)\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_mgm.1 b/man/ndb_mgm.1 index 06332a9d6b02..45a12a51f934 100644 --- a/man/ndb_mgm.1 +++ b/man/ndb_mgm.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgm\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGM\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGM\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -107,8 +107,8 @@ T{ .PP -t T}:T{ -Set the number of times to retry a connection before giving up; 0 means - 1 attempt only (and no retries) +Set the number of times to retry a connection before giving up; synonym + for --connect-retries T}:T{ .PP All MySQL 5.5 based releases @@ -248,7 +248,7 @@ Section\ \&18.5.2, \(lqCommands in the MySQL Cluster Management Client\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_mgmd.8 b/man/ndb_mgmd.8 index dc4c43e80528..ff638b67689a 100644 --- a/man/ndb_mgmd.8 +++ b/man/ndb_mgmd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgmd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGMD\FR" "8" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGMD\FR" "8" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1308,7 +1308,7 @@ option has no effect on non\-Windows platforms\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_print_backup_file.1 b/man/ndb_print_backup_file.1 index 9843c90b8f61..b3dc2efb7205 100644 --- a/man/ndb_print_backup_file.1 +++ b/man/ndb_print_backup_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_backup_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_BACKUP_" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_BACKUP_" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -73,7 +73,7 @@ None\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_print_file.1 b/man/ndb_print_file.1 index 8ca854b4efaf..b0fc75fffb1c 100644 --- a/man/ndb_print_file.1 +++ b/man/ndb_print_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_FILE\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_FILE\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -107,7 +107,7 @@ Section\ \&18.5.12, \(lqMySQL Cluster Disk Data Tables\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_print_schema_file.1 b/man/ndb_print_schema_file.1 index de98aa7761bc..d9bc5c2fd9ca 100644 --- a/man/ndb_print_schema_file.1 +++ b/man/ndb_print_schema_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_schema_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SCHEMA_" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SCHEMA_" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -67,7 +67,7 @@ None\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_print_sys_file.1 b/man/ndb_print_sys_file.1 index e575d8c40c70..256a7e8ba016 100644 --- a/man/ndb_print_sys_file.1 +++ b/man/ndb_print_sys_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_sys_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SYS_FIL" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SYS_FIL" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -70,7 +70,7 @@ None\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_restore.1 b/man/ndb_restore.1 index 274e47b69473..1319ce3ff705 100644 --- a/man/ndb_restore.1 +++ b/man/ndb_restore.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_restore\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_RESTORE\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_RESTORE\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -739,7 +739,7 @@ Different distribution key settings .\" promote-attributes option (ndb_restore) \fBndb_restore\fR supports limited -attribute promotion +\fIattribute promotion\fR in much the same way that it is supported by MySQL replication; that is, data backed up from a column of a given type can generally be restored to a column using a \(lqlarger, similar\(rq type\&. For example, data from a @@ -2208,7 +2208,7 @@ START SLAVE\&. This is a known issue in MySQL Cluster\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_select_all.1 b/man/ndb_select_all.1 index 7749b2a41631..4b727e1151ae 100644 --- a/man/ndb_select_all.1 +++ b/man/ndb_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_ALL\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_ALL\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -602,7 +602,7 @@ NDBT_ProgramExit: 0 \- OK .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_select_count.1 b/man/ndb_select_count.1 index c324b113dc64..570221959cf8 100644 --- a/man/ndb_select_count.1 +++ b/man/ndb_select_count.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_count\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_COUNT\" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_COUNT\" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -131,7 +131,7 @@ NDBT_ProgramExit: 0 \- OK .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_show_tables.1 b/man/ndb_show_tables.1 index 5706fc466b08..e59c5e758bb7 100644 --- a/man/ndb_show_tables.1 +++ b/man/ndb_show_tables.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_show_tables\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SHOW_TABLES\F" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SHOW_TABLES\F" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -307,7 +307,7 @@ API applications such as .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_size.pl.1 b/man/ndb_size.pl.1 index aa52a550954b..ff6daf1d0ba5 100644 --- a/man/ndb_size.pl.1 +++ b/man/ndb_size.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_size.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SIZE\&.PL\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SIZE\&.PL\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -397,7 +397,7 @@ required per table and table row\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_waiter.1 b/man/ndb_waiter.1 index ea97392f4a12..4cdf8806067e 100644 --- a/man/ndb_waiter.1 +++ b/man/ndb_waiter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_waiter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_WAITER\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_WAITER\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -481,7 +481,7 @@ Connecting to mgmsrv at (null)\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndbd.8 b/man/ndbd.8 index 9353c9840826..251a67c01ced 100644 --- a/man/ndbd.8 +++ b/man/ndbd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD\FR" "8" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD\FR" "8" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1159,7 +1159,7 @@ Section\ \&18.1.6, \(lqKnown Limitations of MySQL Cluster\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndbd_redo_log_reader.1 b/man/ndbd_redo_log_reader.1 index 0cacb1bd32dc..89d0b8e12b69 100644 --- a/man/ndbd_redo_log_reader.1 +++ b/man/ndbd_redo_log_reader.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbd_redo_log_reader\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD_REDO_LOG_REA" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD_REDO_LOG_REA" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -231,7 +231,7 @@ must be run on a cluster data node, since it accesses the data node file system .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndbinfo_select_all.1 b/man/ndbinfo_select_all.1 index 209f0bc5b9cd..282605aac5b8 100644 --- a/man/ndbinfo_select_all.1 +++ b/man/ndbinfo_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbinfo_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBINFO_SELECT_AL" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBINFO_SELECT_AL" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -43,21 +43,17 @@ database\&. It is included with the MySQL Cluster distribution beginning with My .PP Not all ndbinfo -tables can be accessed by this program\&. -ndbinfo_select_all -can access the -counters, -diskpagebuffer, -logbuffers, -logspaces, -nodes, -resources, -threadblocks, -threadstat, -threadblocks, -threadstat, and -transporters -tables\&. +tables available in the +\fBmysql\fR +client can be read by this program\&. In addition, +\fBndbinfo_select_all\fR +can show information about some tables internal to +ndbinfo +which cannot be accessed using SQL, including the +tables +and +columns +metadata tables\&. .PP To select from one or more ndbinfo @@ -289,7 +285,7 @@ to set the time between loops\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndbmtd.8 b/man/ndbmtd.8 index 65ac5b2be6d6..7e08865a6e59 100644 --- a/man/ndbmtd.8 +++ b/man/ndbmtd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbmtd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBMTD\FR" "8" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBMTD\FR" "8" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -203,7 +203,7 @@ concurrently on different data nodes in the same MySQL Cluster\&. However, such .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/perror.1 b/man/perror.1 index 111e88eccbef..0542dd6c1b3f 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -2,12 +2,12 @@ .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -190,7 +190,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/replace.1 b/man/replace.1 index 52c83f098277..3402a7d56f08 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -2,12 +2,12 @@ .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -169,7 +169,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index d7b22c1bd2bd..87422b567898 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -129,7 +129,7 @@ Section\ \&24.5.1.5, \(lqUsing a Stack Trace\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/resolveip.1 b/man/resolveip.1 index ada9c68642f6..ae0f9f0df431 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 11/06/2015 +.\" Date: 01/14/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "11/06/2015" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -108,7 +108,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2015, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP From 3525589d2d0d5e34961045722d27cdd730eda710 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Fri, 4 Mar 2016 14:18:32 +0200 Subject: [PATCH 075/305] Bump WSREP_PATCH_VERSION to 15 --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 028d6811265e..1f5eebb48209 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "14") +SET(WSREP_PATCH_VERSION "15") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From 9f6a286dcda03540e6dd2cf49f261fc2acaa5d6b Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 4 May 2016 11:45:57 +0300 Subject: [PATCH 076/305] Man pages from 5.5.49 --- man/comp_err.1 | 4 +- man/innochecksum.1 | 4 +- man/msql2mysql.1 | 4 +- man/my_print_defaults.1 | 4 +- man/myisam_ftdump.1 | 4 +- man/myisamchk.1 | 4 +- man/myisamlog.1 | 4 +- man/myisampack.1 | 4 +- man/mysql-stress-test.pl.1 | 4 +- man/mysql-test-run.pl.1 | 83 ++++++++++++++++++++++++++++++-- man/mysql.1 | 10 ++-- man/mysql.server.1 | 4 +- man/mysql_client_test.1 | 4 +- man/mysql_config.1 | 4 +- man/mysql_convert_table_format.1 | 4 +- man/mysql_find_rows.1 | 4 +- man/mysql_fix_extensions.1 | 4 +- man/mysql_install_db.1 | 4 +- man/mysql_plugin.1 | 4 +- man/mysql_secure_installation.1 | 4 +- man/mysql_setpermission.1 | 4 +- man/mysql_tzinfo_to_sql.1 | 4 +- man/mysql_upgrade.1 | 6 +-- man/mysql_waitpid.1 | 4 +- man/mysql_zap.1 | 4 +- man/mysqlaccess.1 | 4 +- man/mysqladmin.1 | 8 +-- man/mysqlbinlog.1 | 4 +- man/mysqlbug.1 | 4 +- man/mysqlcheck.1 | 8 +-- man/mysqld.8 | 4 +- man/mysqld_multi.1 | 4 +- man/mysqld_safe.1 | 4 +- man/mysqldump.1 | 12 ++--- man/mysqldumpslow.1 | 4 +- man/mysqlhotcopy.1 | 4 +- man/mysqlimport.1 | 8 +-- man/mysqlshow.1 | 8 +-- man/mysqlslap.1 | 8 +-- man/mysqltest.1 | 24 ++++++++- man/ndb-common-options.1 | 4 +- man/ndb_blob_tool.1 | 4 +- man/ndb_config.1 | 6 +-- man/ndb_cpcd.1 | 4 +- man/ndb_delete_all.1 | 4 +- man/ndb_desc.1 | 4 +- man/ndb_drop_index.1 | 6 +-- man/ndb_drop_table.1 | 4 +- man/ndb_error_reporter.1 | 4 +- man/ndb_index_stat.1 | 4 +- man/ndb_mgm.1 | 4 +- man/ndb_mgmd.8 | 4 +- man/ndb_print_backup_file.1 | 4 +- man/ndb_print_file.1 | 4 +- man/ndb_print_schema_file.1 | 4 +- man/ndb_print_sys_file.1 | 4 +- man/ndb_restore.1 | 4 +- man/ndb_select_all.1 | 4 +- man/ndb_select_count.1 | 4 +- man/ndb_show_tables.1 | 4 +- man/ndb_size.pl.1 | 4 +- man/ndb_waiter.1 | 4 +- man/ndbd.8 | 4 +- man/ndbd_redo_log_reader.1 | 4 +- man/ndbinfo_select_all.1 | 4 +- man/ndbmtd.8 | 4 +- man/perror.1 | 4 +- man/replace.1 | 4 +- man/resolve_stack_dump.1 | 4 +- man/resolveip.1 | 4 +- 70 files changed, 257 insertions(+), 162 deletions(-) diff --git a/man/comp_err.1 b/man/comp_err.1 index 19afcef10ab5..89b8052bd372 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -2,12 +2,12 @@ .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 6ef183794d6f..41be3d9983de 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -2,12 +2,12 @@ .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 index c9101bde9765..e07f5d59269d 100644 --- a/man/msql2mysql.1 +++ b/man/msql2mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmsql2mysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMSQL2MYSQL\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMSQL2MYSQL\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index b7dcee8381e1..18b00c2a701e 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -2,12 +2,12 @@ .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index 2519bca347eb..d7864d660454 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisamchk.1 b/man/myisamchk.1 index 11d663c2a63a..63ce4d5b73cb 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisamlog.1 b/man/myisamlog.1 index 0129dafb0e69..6146713292d3 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisampack.1 b/man/myisampack.1 index 08f5d5c389b4..1d0eaaf2463a 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index 0279cf72c21e..9d36a2314565 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 02/29/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "01/14/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "02/29/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index 213f9d276ce3..ff7716bb5711 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 02/29/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "01/14/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "02/29/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -231,6 +231,44 @@ uses several environment variables\&. Some of them are listed in the following t \fBmysql\-test\-run\&.pl\fR, others are set by \fBmysql\-test\-run\&.pl\fR instead, and may be referred to in tests\&. +.\" MTR_MEM environment variable +.\" environment variable: MTR_MEM +.\" MTR_PARALLEL environment variable +.\" environment variable: MTR_PARALLEL +.\" MTR_BUILD_THREAD environment variable +.\" environment variable: MTR_BUILD_THREAD +.\" MTR_PORT_BASE environment variable +.\" environment variable: MTR_PORT_BASE +.\" MTR_TESTCASE_TIMEOUT environment variable +.\" environment variable: MTR_TESTCASE_TIMEOUT +.\" MTR_SUITE_TIMEOUT environment variable +.\" environment variable: MTR_SUITE_TIMEOUT +.\" MTR_START_TIMEOUT environment variable +.\" environment variable: MTR_START_TIMEOUT +.\" MTR_SHUTDOWN_TIMEOUT environment variable +.\" environment variable: MTR_SHUTDOWN_TIMEOUT +.\" MTR_CTEST_TIMEOUT environment variable +.\" environment variable: MTR_CTEST_TIMEOUT +.\" MYSQL_CONFIG_EDITOR environment variable +.\" environment variable: MYSQL_CONFIG_EDITOR +.\" MYSQL_TEST environment variable +.\" environment variable: MYSQL_TEST +.\" MYSQL_TEST_LOGIN_FILE environment variable +.\" environment variable: MYSQL_TEST_LOGIN_FILE +.\" MYSQLD_BOOTSTRAP environment variable +.\" environment variable: MYSQLD_BOOTSTRAP +.\" MYSQLD_BOOTSTRAP_CMD environment variable +.\" environment variable: MYSQLD_BOOTSTRAP_CMD +.\" MYSQLD environment variable +.\" environment variable: MYSQLD +.\" MYSQLD_CMD environment variable +.\" environment variable: MYSQLD_CMD +.\" MYSQLTEST_VARDIR environment variable +.\" environment variable: MYSQLTEST_VARDIR +.\" MYSQL_TEST_DIR environment variable +.\" environment variable: MYSQL_TEST_DIR +.\" MYSQL_TMP_DIR environment variable +.\" environment variable: MYSQL_TMP_DIR .TS allbox tab(:); lB lB. @@ -286,8 +324,11 @@ Setting of a timeout in minutes or seconds, corresponding to command \fB\-\-\fR\fB\fIname\fR\fR\fB\-timeout\fR\&. Avaliable timeout names are TESTCASE, SUITE (both in minutes) and - START, SHUTDOWN - (both in seconds)\&. + START, SHUTDOWN, + CTEST (all in seconds)\&. + MTR_CTEST_TIMEOUT is for + \fBctest\fR unit tests; it was added in + MySQL 5\&.8\&.0\&. T} T{ MYSQL_CONFIG_EDITOR @@ -1473,6 +1514,24 @@ options to set more than one variable\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysql-test-run.pl: mysqltest option +.\" mysqltest option: mysql-test-run.pl +\fB\-\-mysqltest=\fR\fB\fIoptions\fR\fR +.sp +Extra options to pass to +\fBmysqltest\fR\&. +.sp +This option was added in MySQL 5\&.8\&.0\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysql-test-run.pl: ndb-connectstring option .\" ndb-connectstring option: mysql-test-run.pl \fB\-\-ndb\-connectstring=\fR\fB\fIstr\fR\fR @@ -2623,6 +2682,22 @@ Run only test cases that have ndb in their name\&. .RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +The hostname resolves to 127\&.0\&.0\&.1 and not to the actual IP address\&. +.sp .5v +.RE .SH "COPYRIGHT" .br .PP diff --git a/man/mysql.1 b/man/mysql.1 index 3bfe7316afb2..f60540b33af5 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -557,7 +557,7 @@ the section called \(lqMYSQL COMMANDS\(rq\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. +Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. .RE .sp .RS 4 @@ -1380,7 +1380,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -3110,7 +3110,7 @@ left\-arrow and right\-arrow keys move horizontally within the current input line, and the -up\-arror +up\-arrow and down\-arrow keys move up and down through the set of previously entered lines\&. diff --git a/man/mysql.server.1 b/man/mysql.server.1 index 379a8f6168c4..7f9cc2369bc0 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index 2a0e3e6ad3dd..24b54c5839c1 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 02/29/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "01/14/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "02/29/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_config.1 b/man/mysql_config.1 index 0f3c02827ebf..8144e5efa859 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 index 3cb7f0f42aea..bce1bd75ee3a 100644 --- a/man/mysql_convert_table_format.1 +++ b/man/mysql_convert_table_format.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_convert_table_format\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONVERT_TAB" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONVERT_TAB" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 index 7320928623d9..b6a089877893 100644 --- a/man/mysql_find_rows.1 +++ b/man/mysql_find_rows.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_find_rows\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIND_ROWS\F" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 index 23e575a1c51b..f3c90249ad55 100644 --- a/man/mysql_fix_extensions.1 +++ b/man/mysql_fix_extensions.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_fix_extensions\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIX_EXTENSI" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index b9c9b420453c..ed48b40cfe5c 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index d7bb42e893a2..98f253281854 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index 86887fb3284c..8c9a9b43d829 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 index 633973c8da8b..eebdf875240a 100644 --- a/man/mysql_setpermission.1 +++ b/man/mysql_setpermission.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_setpermission\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SETPERMISSI" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SETPERMISSI" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index caae9505c17c..11e7ac76b64a 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index e4a0c0577754..282c94e522e1 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -698,7 +698,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 index 06f197003d3b..edce9004b1a4 100644 --- a/man/mysql_waitpid.1 +++ b/man/mysql_waitpid.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_waitpid\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_WAITPID\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_WAITPID\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 index e80d6665399b..48db04c7fb08 100644 --- a/man/mysql_zap.1 +++ b/man/mysql_zap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_zap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_ZAP\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_ZAP\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index a171b5b94465..1dc75d5c5e05 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlaccess\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLACCESS\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLACCESS\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index d0008e19f391..cad6e58c39e4 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -862,7 +862,7 @@ groups\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. +Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. .RE .sp .RS 4 @@ -1158,7 +1158,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index 164390ca0294..83f51e0cca81 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlbug.1 b/man/mysqlbug.1 index a783e2c99a8f..572395b1d994 100644 --- a/man/mysqlbug.1 +++ b/man/mysqlbug.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbug\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBUG\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBUG\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index 47abb1781ba2..a14a780927b5 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -611,7 +611,7 @@ This option was added in MySQL 5\&.5\&.10\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp This option was added in MySQL 5\&.5\&.47\&. .RE @@ -961,7 +961,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqld.8 b/man/mysqld.8 index f0ad419f32fd..76084a8b5355 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index 1ede9aea911c..d4456170c487 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index 5534dd213a7a..893a7eea3452 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqldump.1 b/man/mysqldump.1 index fc6e3e69c770..2b6b7c20a0ed 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1272,7 +1272,7 @@ prints the error message, but it also writes an SQL comment containing the view Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp This option was added in MySQL 5\&.5\&.47\&. .RE @@ -1497,13 +1497,13 @@ option automatically turns off also is specified, in which case, a global read lock is acquired only for a short time at the beginning of the dump (see the description for \fB\-\-single\-transaction\fR)\&. In all cases, any action on logs happens at the exact moment of the dump\&. .sp -It is also possible to set up a slave by dumping an existing slave of the master\&. In MySQL 5\&.5\&.3 and later, you can create such a dump using the +It is also possible to set up a slave by dumping an existing slave of the master\&. In MySQL 5\&.5\&.3 and higher, you can create such a dump using the \fB\-\-dump\-slave\fR option, which overrides \fB\-\-master\-data\fR and causes it to be ignored if both options are used\&. .sp -In MySQL 5\&.2\&.2 and earlier, use the following procedure on the existing slave: +Before MySQL 5\&.5\&.3, use the following procedure on the existing slave: .sp .RS 4 .ie n \{\ @@ -2260,7 +2260,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index 3e9104aeab6b..197e151a27ee 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 index c006b730dafd..03b3ed94235e 100644 --- a/man/mysqlhotcopy.1 +++ b/man/mysqlhotcopy.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlhotcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLHOTCOPY\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLHOTCOPY\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index b3535a447358..436715133d74 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -358,7 +358,7 @@ Empty the table before importing the text file\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp This option was added in MySQL 5\&.5\&.47\&. .RE @@ -753,7 +753,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index e5c82252f5c1..3bca90ff37e5 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -376,7 +376,7 @@ groups\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp This option was added in MySQL 5\&.5\&.47\&. .RE @@ -616,7 +616,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index 09964813b47e..32aadb18ea71 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -629,7 +629,7 @@ statements\&. The default is 0 (connections are not detached)\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.3.7.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. +Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. .RE .sp .RS 4 @@ -1060,7 +1060,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.9.5, \(lqSSL Command Options\(rq\&. +Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqltest.1 b/man/mysqltest.1 index 029c0c234d4d..32824ca4273c 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 02/29/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "01/14/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "02/29/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -901,6 +901,26 @@ The temporary directory where socket files are created\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysqltest: trace-exec option +.\" trace-exec option: mysqltest +\fB\-\-trace\-exec\fR +.sp +If enabled, this option causes +\fBmysqltest\fR +to immediately display the output from executed programs to +stdout\&. +.sp +This option was added in MySQL 5\&.8\&.0\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysqltest: user option .\" user option: mysqltest \fB\-\-user=\fR\fB\fIuser_name\fR\fR, diff --git a/man/ndb-common-options.1 b/man/ndb-common-options.1 index c38bf01013e7..b37acbd081d7 100644 --- a/man/ndb-common-options.1 +++ b/man/ndb-common-options.1 @@ -2,12 +2,12 @@ .\" Title: Options Common to MySQL Cluster Programs .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "OPTIONS COMMON TO MY" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "OPTIONS COMMON TO MY" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_blob_tool.1 b/man/ndb_blob_tool.1 index 7d196026fc74..29a2bf34c835 100644 --- a/man/ndb_blob_tool.1 +++ b/man/ndb_blob_tool.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_blob_tool\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_BLOB_TOOL\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_BLOB_TOOL\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_config.1 b/man/ndb_config.1 index 076f0ffdb60f..f8ddfd8a8132 100644 --- a/man/ndb_config.1 +++ b/man/ndb_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CONFIG\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CONFIG\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1156,7 +1156,7 @@ option\&. A portion of the resulting output is shown in this example: .\} .nf shell> \fBndb_config \-\-configinfo \-\-xml\fR -
diff --git a/man/ndb_cpcd.1 b/man/ndb_cpcd.1 index c42d79b0142a..8e85435588f1 100644 --- a/man/ndb_cpcd.1 +++ b/man/ndb_cpcd.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_cpcd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CPCD\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CPCD\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_delete_all.1 b/man/ndb_delete_all.1 index 08b1b65ec973..68fbcd279444 100644 --- a/man/ndb_delete_all.1 +++ b/man/ndb_delete_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_delete_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DELETE_ALL\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DELETE_ALL\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_desc.1 b/man/ndb_desc.1 index 64686488f7fe..bd29c4936a3b 100644 --- a/man/ndb_desc.1 +++ b/man/ndb_desc.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_desc\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DESC\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DESC\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_drop_index.1 b/man/ndb_drop_index.1 index eb4e23e03cd1..99cde7355bd8 100644 --- a/man/ndb_drop_index.1 +++ b/man/ndb_drop_index.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_index\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_INDEX\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_INDEX\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -123,7 +123,7 @@ Enter password: ******* Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with \-A Welcome to the MySQL monitor\&. Commands end with ; or \eg\&. -Your MySQL connection id is 7 to server version: 5\&.5\&.46\-ndb\-7\&.2\&.23 +Your MySQL connection id is 7 to server version: 5\&.5\&.48\-ndb\-7\&.2\&.24 Type \*(Aqhelp;\*(Aq or \*(Aq\eh\*(Aq for help\&. Type \*(Aq\ec\*(Aq to clear the buffer\&. mysql> \fBSHOW TABLES;\fR +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ diff --git a/man/ndb_drop_table.1 b/man/ndb_drop_table.1 index f0041644bcdc..6479b49fc849 100644 --- a/man/ndb_drop_table.1 +++ b/man/ndb_drop_table.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_table\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_TABLE\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_TABLE\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_error_reporter.1 b/man/ndb_error_reporter.1 index 1cc86446812d..d14369079fdc 100644 --- a/man/ndb_error_reporter.1 +++ b/man/ndb_error_reporter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_error_reporter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_ERROR_REPORTE" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_ERROR_REPORTE" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_index_stat.1 b/man/ndb_index_stat.1 index e7009781caea..22a64931b6b2 100644 --- a/man/ndb_index_stat.1 +++ b/man/ndb_index_stat.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_index_stat\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_INDEX_STAT\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_INDEX_STAT\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_mgm.1 b/man/ndb_mgm.1 index 45a12a51f934..de15ab4f0a52 100644 --- a/man/ndb_mgm.1 +++ b/man/ndb_mgm.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgm\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGM\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGM\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_mgmd.8 b/man/ndb_mgmd.8 index ff638b67689a..16e79201ec24 100644 --- a/man/ndb_mgmd.8 +++ b/man/ndb_mgmd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgmd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGMD\FR" "8" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGMD\FR" "8" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_backup_file.1 b/man/ndb_print_backup_file.1 index b3dc2efb7205..56e3b7401fb6 100644 --- a/man/ndb_print_backup_file.1 +++ b/man/ndb_print_backup_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_backup_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_BACKUP_" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_BACKUP_" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_file.1 b/man/ndb_print_file.1 index b0fc75fffb1c..d5a47687fa14 100644 --- a/man/ndb_print_file.1 +++ b/man/ndb_print_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_FILE\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_FILE\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_schema_file.1 b/man/ndb_print_schema_file.1 index d9bc5c2fd9ca..e027d697ae18 100644 --- a/man/ndb_print_schema_file.1 +++ b/man/ndb_print_schema_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_schema_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SCHEMA_" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SCHEMA_" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_sys_file.1 b/man/ndb_print_sys_file.1 index 256a7e8ba016..531a394abc08 100644 --- a/man/ndb_print_sys_file.1 +++ b/man/ndb_print_sys_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_sys_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SYS_FIL" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SYS_FIL" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_restore.1 b/man/ndb_restore.1 index 1319ce3ff705..17dd7af05ecf 100644 --- a/man/ndb_restore.1 +++ b/man/ndb_restore.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_restore\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_RESTORE\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_RESTORE\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_select_all.1 b/man/ndb_select_all.1 index 4b727e1151ae..5975affbdb58 100644 --- a/man/ndb_select_all.1 +++ b/man/ndb_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_ALL\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_ALL\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_select_count.1 b/man/ndb_select_count.1 index 570221959cf8..84f21fe72b1a 100644 --- a/man/ndb_select_count.1 +++ b/man/ndb_select_count.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_count\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_COUNT\" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_COUNT\" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_show_tables.1 b/man/ndb_show_tables.1 index e59c5e758bb7..5e3247c9afa1 100644 --- a/man/ndb_show_tables.1 +++ b/man/ndb_show_tables.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_show_tables\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SHOW_TABLES\F" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SHOW_TABLES\F" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_size.pl.1 b/man/ndb_size.pl.1 index ff6daf1d0ba5..7d556f9843da 100644 --- a/man/ndb_size.pl.1 +++ b/man/ndb_size.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_size.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SIZE\&.PL\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SIZE\&.PL\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_waiter.1 b/man/ndb_waiter.1 index 4cdf8806067e..770666c8e237 100644 --- a/man/ndb_waiter.1 +++ b/man/ndb_waiter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_waiter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_WAITER\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_WAITER\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbd.8 b/man/ndbd.8 index 251a67c01ced..ef311305b376 100644 --- a/man/ndbd.8 +++ b/man/ndbd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD\FR" "8" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD\FR" "8" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbd_redo_log_reader.1 b/man/ndbd_redo_log_reader.1 index 89d0b8e12b69..011eeebe8490 100644 --- a/man/ndbd_redo_log_reader.1 +++ b/man/ndbd_redo_log_reader.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbd_redo_log_reader\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD_REDO_LOG_REA" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD_REDO_LOG_REA" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbinfo_select_all.1 b/man/ndbinfo_select_all.1 index 282605aac5b8..4ffc366bc5d8 100644 --- a/man/ndbinfo_select_all.1 +++ b/man/ndbinfo_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbinfo_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBINFO_SELECT_AL" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBINFO_SELECT_AL" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbmtd.8 b/man/ndbmtd.8 index 7e08865a6e59..bf39d8e09d04 100644 --- a/man/ndbmtd.8 +++ b/man/ndbmtd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbmtd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBMTD\FR" "8" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBMTD\FR" "8" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/perror.1 b/man/perror.1 index 0542dd6c1b3f..83ba411e6826 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -2,12 +2,12 @@ .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/replace.1 b/man/replace.1 index 3402a7d56f08..b749dcbd5359 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -2,12 +2,12 @@ .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index 87422b567898..e54b5582cb3f 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolveip.1 b/man/resolveip.1 index ae0f9f0df431..8fb9200bcdc3 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 01/14/2016 +.\" Date: 03/01/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "01/14/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- From 74812b4fbf2211c2fad7cc1bf237f79247cc7a9e Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 4 May 2016 11:48:03 +0300 Subject: [PATCH 077/305] Bump WSREP_PATCH_VERSION in WSREP_PATCH_VERSION --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 1f5eebb48209..2bc3139d2aa5 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "15") +SET(WSREP_PATCH_VERSION "16") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From 2537cca367af054ab2fc5ab1c0c2980fa5b606da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Wed, 22 Jun 2016 12:47:49 +0300 Subject: [PATCH 078/305] Debian: ignore current branch to allow more flexible git-buildpackage use --- debian/gbp.conf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/gbp.conf b/debian/gbp.conf index 9985daf383f4..93187dc3a421 100644 --- a/debian/gbp.conf +++ b/debian/gbp.conf @@ -1,6 +1,8 @@ [DEFAULT] -# native package configuration -debian-branch = 5.5-debian -upstream-branch = 5.5-debian +# Ignore requirement to use branch name 'master' to make it easier +# for contributors to work with feature and bugfix branches +ignore-branch = True + +upstream-branch = 5.5 upstream-tree = branch pristine-tar = False From a573acd321c3bbc2deb4d9abff72098a23050a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Wed, 22 Jun 2016 12:48:12 +0300 Subject: [PATCH 079/305] Debian: bump version in changelog --- debian/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 109caae4b592..7e80818d59bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -mysql-wsrep-5.5 (5.5.42-25.11-1) UNRELEASED; urgency=low +mysql-wsrep-5.5 (5.5.49-25.16-1) UNRELEASED; urgency=low - * Bumped version numbers + * Bump version numbers - -- Otto Kekäläinen Fri, 27 Mar 2015 15:50:10 +0200 + -- Otto Kekäläinen Wed, 22 Jun 2016 12:57:00 +0300 mysql-wsrep-5.5 (5.5.41-1) UNRELEASED; urgency=medium From 3a2c1374d15a6f4e9d76d7d137891d41e0fce014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Thu, 23 Jun 2016 22:57:12 +0300 Subject: [PATCH 080/305] Rename package file listings to match package name in Debian control file Fixes regression introduced in commit 13b0556. --- debian/{mysql-wsrep-common.dirs => mysql-wsrep-common-5.5.dirs} | 0 debian/{mysql-wsrep-common.files => mysql-wsrep-common-5.5.files} | 0 ...lintian-overrides => mysql-wsrep-common-5.5.lintian-overrides} | 0 .../{mysql-wsrep-common.postrm => mysql-wsrep-common-5.5.postrm} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename debian/{mysql-wsrep-common.dirs => mysql-wsrep-common-5.5.dirs} (100%) rename debian/{mysql-wsrep-common.files => mysql-wsrep-common-5.5.files} (100%) rename debian/{mysql-wsrep-common.lintian-overrides => mysql-wsrep-common-5.5.lintian-overrides} (100%) rename debian/{mysql-wsrep-common.postrm => mysql-wsrep-common-5.5.postrm} (100%) diff --git a/debian/mysql-wsrep-common.dirs b/debian/mysql-wsrep-common-5.5.dirs similarity index 100% rename from debian/mysql-wsrep-common.dirs rename to debian/mysql-wsrep-common-5.5.dirs diff --git a/debian/mysql-wsrep-common.files b/debian/mysql-wsrep-common-5.5.files similarity index 100% rename from debian/mysql-wsrep-common.files rename to debian/mysql-wsrep-common-5.5.files diff --git a/debian/mysql-wsrep-common.lintian-overrides b/debian/mysql-wsrep-common-5.5.lintian-overrides similarity index 100% rename from debian/mysql-wsrep-common.lintian-overrides rename to debian/mysql-wsrep-common-5.5.lintian-overrides diff --git a/debian/mysql-wsrep-common.postrm b/debian/mysql-wsrep-common-5.5.postrm similarity index 100% rename from debian/mysql-wsrep-common.postrm rename to debian/mysql-wsrep-common-5.5.postrm From 79e1ff68574a774025959f997b85e5d3f8b49918 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 15 Jul 2016 02:31:45 -0700 Subject: [PATCH 081/305] MW-292 Reset timestamp after transaction replay Transaction replay causes the THD to re-apply the replication events from execution, using the same path appliers do. While applying the log events, the THD's timestamp is set to the timestamp of the event. Setting the timestamp explicitly causes function NOW() to always the timestamp that was set. To avoid this behavior we reset the timestamp after replaying is done. --- sql/sql_class.h | 1 + sql/wsrep_thd.cc | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sql/sql_class.h b/sql/sql_class.h index 14c17598f2e6..dd677ee04d1b 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -51,6 +51,7 @@ struct wsrep_thd_shadow { ulong tx_isolation; char *db; size_t db_length; + time_t user_time; }; #endif class Reprepare_observer; diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index 7f945ae3a6f7..77e21d546ce7 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -122,6 +122,8 @@ static void wsrep_prepare_bf_thd(THD *thd, struct wsrep_thd_shadow* shadow) shadow->db = thd->db; shadow->db_length = thd->db_length; thd->reset_db(NULL, 0); + + shadow->user_time = thd->user_time; } static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow) @@ -132,6 +134,7 @@ static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow) thd->net.vio = shadow->vio; thd->variables.tx_isolation = shadow->tx_isolation; thd->reset_db(shadow->db, shadow->db_length); + thd->user_time = shadow->user_time; } void wsrep_replay_transaction(THD *thd) From 6147ec2315e0cf82feb4045373563c7497cb8d65 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 9 Aug 2016 12:28:18 +0300 Subject: [PATCH 082/305] Update manpages from 5.5.50 --- man/comp_err.1 | 29 +- man/innochecksum.1 | 7 +- man/msql2mysql.1 | 7 +- man/my_print_defaults.1 | 27 +- man/myisam_ftdump.1 | 19 +- man/myisamchk.1 | 118 +----- man/myisamlog.1 | 7 +- man/myisampack.1 | 35 +- man/mysql-stress-test.pl.1 | 59 +-- man/mysql-test-run.pl.1 | 306 ++-------------- man/mysql.1 | 230 +----------- man/mysql.server.1 | 16 +- man/mysql_client_test.1 | 38 +- man/mysql_client_test_embedded.1 | 2 +- man/mysql_config.1 | 29 +- man/mysql_convert_table_format.1 | 27 +- man/mysql_find_rows.1 | 17 +- man/mysql_fix_extensions.1 | 7 +- man/mysql_install_db.1 | 36 +- man/mysql_plugin.1 | 33 +- man/mysql_secure_installation.1 | 7 +- man/mysql_setpermission.1 | 19 +- man/mysql_tzinfo_to_sql.1 | 8 +- man/mysql_upgrade.1 | 73 +--- man/mysql_waitpid.1 | 13 +- man/mysql_zap.1 | 7 +- man/mysqlaccess.1 | 47 +-- man/mysqladmin.1 | 101 +---- man/mysqlbinlog.1 | 98 +---- man/mysqlbug.1 | 7 +- man/mysqlcheck.1 | 107 +----- man/mysqld.8 | 8 +- man/mysqld_multi.1 | 46 +-- man/mysqld_safe.1 | 77 +--- man/mysqldump.1 | 198 +--------- man/mysqldumpslow.1 | 15 +- man/mysqlhotcopy.1 | 59 +-- man/mysqlimport.1 | 97 +---- man/mysqlshow.1 | 74 +--- man/mysqlslap.1 | 120 +----- man/mysqltest.1 | 98 +---- man/mysqltest_embedded.1 | 2 +- man/ndb-common-options.1 | 142 +------- man/ndb_blob_tool.1 | 83 +---- man/ndb_config.1 | 228 +----------- man/ndb_cpcd.1 | 7 +- man/ndb_delete_all.1 | 65 +--- man/ndb_desc.1 | 120 +----- man/ndb_drop_index.1 | 33 +- man/ndb_drop_table.1 | 31 +- man/ndb_error_reporter.1 | 66 +--- man/ndb_index_stat.1 | 187 +--------- man/ndb_mgm.1 | 56 +-- man/ndb_mgmd.8 | 230 +----------- man/ndb_print_backup_file.1 | 7 +- man/ndb_print_file.1 | 7 +- man/ndb_print_schema_file.1 | 7 +- man/ndb_print_sys_file.1 | 7 +- man/ndb_restore.1 | 608 +------------------------------ man/ndb_select_all.1 | 204 +---------- man/ndb_select_count.1 | 55 +-- man/ndb_show_tables.1 | 101 +---- man/ndb_size.pl.1 | 131 +------ man/ndb_waiter.1 | 98 +---- man/ndbd.8 | 183 +--------- man/ndbd_redo_log_reader.1 | 49 +-- man/ndbinfo_select_all.1 | 71 +--- man/ndbmtd.8 | 16 +- man/perror.1 | 20 +- man/replace.1 | 8 +- man/resolve_stack_dump.1 | 15 +- man/resolveip.1 | 13 +- 72 files changed, 323 insertions(+), 4855 deletions(-) diff --git a/man/comp_err.1 b/man/comp_err.1 index 89b8052bd372..d796ac936e92 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" comp_err .SH "NAME" comp_err \- compile MySQL error message file .SH "SYNOPSIS" @@ -83,8 +82,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: help option -.\" help option: comp_err \fB\-\-help\fR, \fB\-?\fR .sp @@ -99,8 +96,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: charset option -.\" charset option: comp_err \fB\-\-charset=\fR\fB\fIdir_name\fR\fR, \fB\-C \fR\fB\fIdir_name\fR\fR .sp @@ -116,8 +111,6 @@ The character set directory\&. The default is .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: debug option -.\" debug option: comp_err \fB\-\-debug=\fR\fB\fIdebug_options\fR\fR, \fB\-# \fR\fB\fIdebug_options\fR\fR .sp @@ -136,8 +129,6 @@ d:t:O,/tmp/comp_err\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: debug-info option -.\" debug-info option: comp_err \fB\-\-debug\-info\fR, \fB\-T\fR .sp @@ -152,8 +143,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: header_file option -.\" header_file option: comp_err \fB\-\-header_file=\fR\fB\fIfile_name\fR\fR, \fB\-H \fR\fB\fIfile_name\fR\fR .sp @@ -169,8 +158,6 @@ mysqld_error\&.h\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: in_file option -.\" in_file option: comp_err \fB\-\-in_file=\fR\fB\fIfile_name\fR\fR, \fB\-F \fR\fB\fIfile_name\fR\fR .sp @@ -186,8 +173,6 @@ The name of the input file\&. The default is .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: name_file option -.\" name_file option: comp_err \fB\-\-name_file=\fR\fB\fIfile_name\fR\fR, \fB\-N \fR\fB\fIfile_name\fR\fR .sp @@ -203,8 +188,6 @@ mysqld_ername\&.h\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: out_dir option -.\" out_dir option: comp_err \fB\-\-out_dir=\fR\fB\fIdir_name\fR\fR, \fB\-D \fR\fB\fIdir_name\fR\fR .sp @@ -220,8 +203,6 @@ The name of the output base directory\&. The default is .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: out_file option -.\" out_file option: comp_err \fB\-\-out_file=\fR\fB\fIfile_name\fR\fR, \fB\-O \fR\fB\fIfile_name\fR\fR .sp @@ -237,8 +218,6 @@ errmsg\&.sys\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: statefile option -.\" statefile option: comp_err \fB\-\-statefile=\fR\fB\fIfile_name\fR\fR, \fB\-S \fR\fB\fIfile_name\fR\fR .sp @@ -254,8 +233,6 @@ sql_state\&.h\&. .sp -1 .IP \(bu 2.3 .\} -.\" comp_err: version option -.\" version option: comp_err \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 41be3d9983de..7b0f6cc39fa1 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" innochecksum .SH "NAME" innochecksum \- offline InnoDB file checksum utility .SH "SYNOPSIS" diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 index e07f5d59269d..0353ddde5ff3 100644 --- a/man/msql2mysql.1 +++ b/man/msql2mysql.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmsql2mysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMSQL2MYSQL\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMSQL2MYSQL\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" msql2mysql .SH "NAME" msql2mysql \- convert mSQL programs for use with MySQL .SH "SYNOPSIS" diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index 18b00c2a701e..6faa03a8e612 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" my_print_defaults .SH "NAME" my_print_defaults \- display options from option files .SH "SYNOPSIS" @@ -72,8 +71,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: help option -.\" help option: my_print_defaults \fB\-\-help\fR, \fB\-?\fR .sp @@ -88,11 +85,7 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: config-file option -.\" config-file option: my_print_defaults \fB\-\-config\-file=\fR\fB\fIfile_name\fR\fR, -.\" my_print_defaults: defaults-file option -.\" defaults-file option: my_print_defaults \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR, \fB\-c \fR\fB\fIfile_name\fR\fR .sp @@ -107,8 +100,6 @@ Read only the given option file\&. .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: debug option -.\" debug option: my_print_defaults \fB\-\-debug=\fR\fB\fIdebug_options\fR\fR, \fB\-# \fR\fB\fIdebug_options\fR\fR .sp @@ -127,11 +118,7 @@ d:t:o,/tmp/my_print_defaults\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: defaults-extra-file option -.\" defaults-extra-file option: my_print_defaults \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR, -.\" my_print_defaults: extra-file option -.\" extra-file option: my_print_defaults \fB\-\-extra\-file=\fR\fB\fIfile_name\fR\fR, \fB\-e \fR\fB\fIfile_name\fR\fR .sp @@ -146,8 +133,6 @@ Read this option file after the global option file but (on Unix) before the user .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: defaults-group-suffix option -.\" defaults-group-suffix option: my_print_defaults \fB\-\-defaults\-group\-suffix=\fR\fB\fIsuffix\fR\fR, \fB\-g \fR\fB\fIsuffix\fR\fR .sp @@ -162,8 +147,6 @@ In addition to the groups named on the command line, read groups that have the g .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: no-defaults option -.\" no-defaults option: my_print_defaults \fB\-\-no\-defaults\fR, \fB\-n\fR .sp @@ -178,8 +161,6 @@ Return an empty string\&. .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: verbose option -.\" verbose option: my_print_defaults \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -194,8 +175,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" my_print_defaults: version option -.\" version option: my_print_defaults \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index d7864d660454..c33142719adf 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" myisam_ftdump .SH "NAME" myisam_ftdump \- display full\-text index information .SH "SYNOPSIS" @@ -160,8 +159,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" myisam_ftdump: help option -.\" help option: myisam_ftdump \fB\-\-help\fR, \fB\-h\fR \fB\-?\fR @@ -177,8 +174,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisam_ftdump: count option -.\" count option: myisam_ftdump \fB\-\-count\fR, \fB\-c\fR .sp @@ -193,8 +188,6 @@ Calculate per\-word statistics (counts and global weights)\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisam_ftdump: dump option -.\" dump option: myisam_ftdump \fB\-\-dump\fR, \fB\-d\fR .sp @@ -209,8 +202,6 @@ Dump the index, including data offsets and word weights\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisam_ftdump: length option -.\" length option: myisam_ftdump \fB\-\-length\fR, \fB\-l\fR .sp @@ -225,8 +216,6 @@ Report the length distribution\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisam_ftdump: stats option -.\" stats option: myisam_ftdump \fB\-\-stats\fR, \fB\-s\fR .sp @@ -241,8 +230,6 @@ Report global index statistics\&. This is the default operation if no other oper .sp -1 .IP \(bu 2.3 .\} -.\" myisam_ftdump: verbose option -.\" verbose option: myisam_ftdump \fB\-\-verbose\fR, \fB\-v\fR .sp diff --git a/man/myisamchk.1 b/man/myisamchk.1 index 63ce4d5b73cb..badeef9e30c4 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" myisamchk .SH "NAME" myisamchk \- MyISAM table\-maintenance utility .SH "SYNOPSIS" @@ -252,8 +251,6 @@ supports the following options, which can be specified on the command line or in group of an option file\&. For information about option files used by MySQL programs, see Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .SH "MYISAMCHK GENERAL OPTIONS" -.\" options: myisamchk -.\" myisamchk: options .PP The options described in this section can be used for any type of table maintenance operation performed by \fBmyisamchk\fR\&. The sections following this one describe options that pertain only to specific operations, such as table checking or repairing\&. @@ -266,8 +263,6 @@ The options described in this section can be used for any type of table maintena .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: help option -.\" help option: myisamchk \fB\-\-help\fR, \fB\-?\fR .sp @@ -282,8 +277,6 @@ Display a help message and exit\&. Options are grouped by type of operation\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: HELP option -.\" HELP option: myisamchk \fB\-\-HELP\fR, \fB\-H\fR .sp @@ -298,8 +291,6 @@ Display a help message and exit\&. Options are presented in a single list\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: debug option -.\" debug option: myisamchk \fB\-\-debug=\fR\fB\fIdebug_options\fR\fR, \fB\-# \fR\fB\fIdebug_options\fR\fR .sp @@ -318,8 +309,6 @@ d:t:o,/tmp/myisamchk\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: defaults-extra-file option -.\" defaults-extra-file option: myisamchk \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -335,8 +324,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: defaults-file option -.\" defaults-file option: myisamchk \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -352,8 +339,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: defaults-group-suffix option -.\" defaults-group-suffix option: myisamchk \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -378,8 +363,6 @@ group\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: no-defaults option -.\" no-defaults option: myisamchk \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -395,8 +378,6 @@ can be used to prevent them from being read\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: print-defaults option -.\" print-defaults option: myisamchk \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -410,8 +391,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: silent option -.\" silent option: myisamchk \fB\-\-silent\fR, \fB\-s\fR .sp @@ -430,8 +409,6 @@ very silent\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: verbose option -.\" verbose option: myisamchk \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -452,8 +429,6 @@ multiple times (\fB\-vv\fR, .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: version option -.\" version option: myisamchk \fB\-\-version\fR, \fB\-V\fR .sp @@ -468,8 +443,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: wait option -.\" wait option: myisamchk \fB\-\-wait\fR, \fB\-w\fR .sp @@ -483,18 +456,6 @@ command\&. You can also set the following variables by using \fB\-\-\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR syntax: -.\" decode_bits myisamchk variable -.\" ft_max_word_len myisamchk variable -.\" ft_min_word_len myisamchk variable -.\" ft_stopword_file myisamchk variable -.\" key_buffer_size myisamchk variable -.\" myisam_block_size myisamchk variable -.\" read_buffer_size myisamchk variable -.\" sort_buffer_size myisamchk variable -.\" myisam_sort_buffer_size myisamchk variable -.\" sort_key_blocks myisamchk variable -.\" stats_method myisamchk variable -.\" write_buffer_size myisamchk variable .TS allbox tab(:); lB lB. @@ -726,8 +687,6 @@ ANALYZE TABLE, OPTIMIZE TABLE, or ALTER TABLE\&. These statements are performed by the server, which knows the proper full\-text parameter values to use\&. .SH "MYISAMCHK CHECK OPTIONS" -.\" check options: myisamchk -.\" tables: checking .PP \fBmyisamchk\fR supports the following options for table checking operations: @@ -740,8 +699,6 @@ supports the following options for table checking operations: .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: check option -.\" check option: myisamchk \fB\-\-check\fR, \fB\-c\fR .sp @@ -756,8 +713,6 @@ Check the table for errors\&. This is the default operation if you specify no op .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: check-only-changed option -.\" check-only-changed option: myisamchk \fB\-\-check\-only\-changed\fR, \fB\-C\fR .sp @@ -772,8 +727,6 @@ Check only tables that have changed since the last check\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: extend-check option -.\" extend-check option: myisamchk \fB\-\-extend\-check\fR, \fB\-e\fR .sp @@ -803,8 +756,6 @@ the section called \(lqOBTAINING TABLE INFORMATION WITH MYISAMCHK\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: fast option -.\" fast option: myisamchk \fB\-\-fast\fR, \fB\-F\fR .sp @@ -819,8 +770,6 @@ Check only tables that haven\*(Aqt been closed properly\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: force option -.\" force option: myisamchk \fB\-\-force\fR, \fB\-f\fR .sp @@ -841,8 +790,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: information option -.\" information option: myisamchk \fB\-\-information\fR, \fB\-i\fR .sp @@ -857,8 +804,6 @@ Print informational statistics about the table that is checked\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: medium-check option -.\" medium-check option: myisamchk \fB\-\-medium\-check\fR, \fB\-m\fR .sp @@ -875,8 +820,6 @@ operation\&. This finds only 99\&.99% of all errors, which should be good enough .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: read-only option -.\" read-only option: myisamchk \fB\-\-read\-only\fR, \fB\-T\fR .sp @@ -895,8 +838,6 @@ when run with external locking disabled\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: update-state option -.\" update-state option: myisamchk \fB\-\-update\-state\fR, \fB\-U\fR .sp @@ -909,8 +850,6 @@ option, but you shouldn\*(Aqt use this option if the server is using the table and you are running it with external locking disabled\&. .RE .SH "MYISAMCHK REPAIR OPTIONS" -.\" repair options: myisamchk -.\" files: repairing .PP \fBmyisamchk\fR supports the following options for table repair operations (operations performed when an option such as @@ -927,8 +866,6 @@ is given): .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: backup option -.\" backup option: myisamchk \fB\-\-backup\fR, \fB\-B\fR .sp @@ -946,8 +883,6 @@ file as .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: character-sets-dir option -.\" character-sets-dir option: myisamchk \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -962,8 +897,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: correct-checksum option -.\" correct-checksum option: myisamchk \fB\-\-correct\-checksum\fR .sp Correct the checksum information for the table\&. @@ -977,8 +910,6 @@ Correct the checksum information for the table\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: data-file-length option -.\" data-file-length option: myisamchk \fB\-\-data\-file\-length=\fR\fB\fIlen\fR\fR, \fB\-D \fR\fB\fIlen\fR\fR .sp @@ -994,8 +925,6 @@ The maximum length of the data file (when re\-creating data file when it is .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: extend-check option -.\" extend-check option: myisamchk \fB\-\-extend\-check\fR, \fB\-e\fR .sp @@ -1015,8 +944,6 @@ the section called \(lqOBTAINING TABLE INFORMATION WITH MYISAMCHK\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: force option -.\" force option: myisamchk \fB\-\-force\fR, \fB\-f\fR .sp @@ -1032,8 +959,6 @@ Overwrite old intermediate files (files with names like .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: keys-used option -.\" keys-used option: myisamchk \fB\-\-keys\-used=\fR\fB\fIval\fR\fR, \fB\-k \fR\fB\fIval\fR\fR .sp @@ -1050,8 +975,6 @@ For .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: no-symlinks option -.\" no-symlinks option: myisamchk \fB\-\-no\-symlinks\fR, \fB\-l\fR .sp @@ -1068,8 +991,6 @@ repairs the table that a symlink points to\&. This option does not exist as of M .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: max-record-length option -.\" max-record-length option: myisamchk \fB\-\-max\-record\-length=\fR\fB\fIlen\fR\fR .sp Skip rows larger than the given length if @@ -1085,8 +1006,6 @@ cannot allocate memory to hold them\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: parallel-recover option -.\" parallel-recover option: myisamchk \fB\-\-parallel\-recover\fR, \fB\-p\fR .sp @@ -1105,8 +1024,6 @@ and .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: quick option -.\" quick option: myisamchk \fB\-\-quick\fR, \fB\-q\fR .sp @@ -1123,8 +1040,6 @@ to modify the original data file in case of duplicate keys\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: recover option -.\" recover option: myisamchk \fB\-\-recover\fR, \fB\-r\fR .sp @@ -1151,8 +1066,6 @@ myisam_sort_buffer_size\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: safe-recover option -.\" safe-recover option: myisamchk \fB\-\-safe\-recover\fR, \fB\-o\fR .sp @@ -1179,8 +1092,6 @@ key_buffer_size\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: set-collation option -.\" set-collation option: myisamchk \fB\-\-set\-collation=\fR\fB\fIname\fR\fR .sp Specify the collation to use for sorting table indexes\&. The character set name is implied by the first part of the collation name\&. @@ -1194,8 +1105,6 @@ Specify the collation to use for sorting table indexes\&. The character set name .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: sort-recover option -.\" sort-recover option: myisamchk \fB\-\-sort\-recover\fR, \fB\-n\fR .sp @@ -1212,8 +1121,6 @@ to use sorting to resolve the keys even if the temporary files would be very lar .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: tmpdir option -.\" tmpdir option: myisamchk \fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, \fB\-t \fR\fB\fIdir_name\fR\fR .sp @@ -1234,8 +1141,6 @@ can be set to a list of directory paths that are used successively in round\-rob .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: unpack option -.\" unpack option: myisamchk \fB\-\-unpack\fR, \fB\-u\fR .sp @@ -1255,8 +1160,6 @@ supports the following options for actions other than table checks and repairs: .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: analyze option -.\" analyze option: myisamchk \fB\-\-analyze\fR, \fB\-a\fR .sp @@ -1275,8 +1178,6 @@ statement\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: block-search option -.\" block-search option: myisamchk \fB\-\-block\-search=\fR\fB\fIoffset\fR\fR, \fB\-b \fR\fB\fIoffset\fR\fR .sp @@ -1291,8 +1192,6 @@ Find the record that a block at the given offset belongs to\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: description option -.\" description option: myisamchk \fB\-\-description\fR, \fB\-d\fR .sp @@ -1310,8 +1209,6 @@ the section called \(lqOBTAINING TABLE INFORMATION WITH MYISAMCHK\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: set-auto-increment[ option -.\" set-auto-increment[ option: myisamchk \fB\-\-set\-auto\-increment[=\fR\fB\fIvalue\fR\fR\fB]\fR, \fB\-A[\fR\fB\fIvalue\fR\fR\fB]\fR .sp @@ -1334,8 +1231,6 @@ numbers for new records begin with the largest value currently in the table, plu .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: sort-index option -.\" sort-index option: myisamchk \fB\-\-sort\-index\fR, \fB\-S\fR .sp @@ -1350,8 +1245,6 @@ Sort the index tree blocks in high\-low order\&. This optimizes seeks and makes .sp -1 .IP \(bu 2.3 .\} -.\" myisamchk: sort-records option -.\" sort-records option: myisamchk \fB\-\-sort\-records=\fR\fB\fIN\fR\fR, \fB\-R \fR\fB\fIN\fR\fR .sp @@ -1371,10 +1264,6 @@ sorts and moves records, it just overwrites record offsets in the index\&. If ke must unpack key blocks first, then re\-create indexes and pack the key blocks again\&. (In this case, re\-creating indexes is faster than updating offsets for each index\&.) .RE .SH "OBTAINING TABLE INFORMATION WITH MYISAMCHK" -.\" table description: myisamchk -.\" tables: information -.\" examples: myisamchk output -.\" myisamchk: example output .PP To obtain a description of a MyISAM @@ -2437,7 +2326,6 @@ Linkdata is the sum of the amount of storage used by all such pointers\&. .RE .SH "MYISAMCHK MEMORY USAGE" -.\" memory usage: myisamchk .PP Memory allocation is important when you run \fBmyisamchk\fR\&. diff --git a/man/myisamlog.1 b/man/myisamlog.1 index 6146713292d3..adabadffad11 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" myisamlog .SH "NAME" myisamlog \- display MyISAM log file contents .SH "SYNOPSIS" diff --git a/man/myisampack.1 b/man/myisampack.1 index 1d0eaaf2463a..1bf12164db39 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,10 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" myisampack -.\" compressed tables -.\" tables: compressed -.\" MyISAM: compressed tables .SH "NAME" myisampack \- generate compressed, read\-only MyISAM tables .SH "SYNOPSIS" @@ -132,8 +128,6 @@ Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\ .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: help option -.\" help option: myisampack \fB\-\-help\fR, \fB\-?\fR .sp @@ -148,8 +142,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: backup option -.\" backup option: myisampack \fB\-\-backup\fR, \fB\-b\fR .sp @@ -165,8 +157,6 @@ Make a backup of each table\*(Aqs data file using the name .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: character-sets-dir option -.\" character-sets-dir option: myisampack \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -181,8 +171,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: debug option -.\" debug option: myisampack \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -201,8 +189,6 @@ d:t:o\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: force option -.\" force option: myisampack \fB\-\-force\fR, \fB\-f\fR .sp @@ -232,8 +218,6 @@ packs the table anyway\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: join option -.\" join option: myisampack \fB\-\-join=\fR\fB\fIbig_tbl_name\fR\fR, \fB\-j \fR\fB\fIbig_tbl_name\fR\fR .sp @@ -256,8 +240,6 @@ must exist\&. The source tables are read for the join operation but not modified .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: silent option -.\" silent option: myisampack \fB\-\-silent\fR, \fB\-s\fR .sp @@ -272,8 +254,6 @@ Silent mode\&. Write output only when errors occur\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: test option -.\" test option: myisampack \fB\-\-test\fR, \fB\-t\fR .sp @@ -288,8 +268,6 @@ Do not actually pack the table, just test packing it\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: tmpdir option -.\" tmpdir option: myisampack \fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, \fB\-T \fR\fB\fIdir_name\fR\fR .sp @@ -306,8 +284,6 @@ creates temporary files\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: verbose option -.\" verbose option: myisampack \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -322,8 +298,6 @@ Verbose mode\&. Write information about the progress of the packing operation an .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: version option -.\" version option: myisampack \fB\-\-version\fR, \fB\-V\fR .sp @@ -338,8 +312,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" myisampack: wait option -.\" wait option: myisampack \fB\-\-wait\fR, \fB\-w\fR .sp @@ -349,7 +321,6 @@ server was invoked with external locking disabled, it is not a good idea to invo \fBmyisampack\fR if the table might be updated by the server during the packing process\&. .RE -.\" examples: compressed tables .PP The following sequence of commands illustrates a typical table compression session: .sp diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index 9d36a2314565..58e7cf176415 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 02/29/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "02/29/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "05/13/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql-stress-test.pl .SH "NAME" mysql-stress-test.pl \- server stress test program .SH "SYNOPSIS" @@ -67,8 +66,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: help option -.\" help option: mysql-stress-test.pl \fB\-\-help\fR .sp Display a help message and exit\&. @@ -82,8 +79,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: abort-on-error option -.\" abort-on-error option: mysql-stress-test.pl \fB\-\-abort\-on\-error=\fR\fB\fIN\fR\fR .sp Causes the program to abort if an error with severity less than or equal to N was encountered\&. Set to 1 to abort on any error\&. @@ -97,8 +92,6 @@ Causes the program to abort if an error with severity less than or equal to N wa .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: check-tests-file option -.\" check-tests-file option: mysql-stress-test.pl \fB\-\-check\-tests\-file\fR .sp Periodically check the file that lists the tests to be run\&. If it has been modified, reread the file\&. This can be useful if you update the list of tests to be run during a stress test\&. @@ -112,8 +105,6 @@ Periodically check the file that lists the tests to be run\&. If it has been mod .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: cleanup option -.\" cleanup option: mysql-stress-test.pl \fB\-\-cleanup\fR .sp Force cleanup of the working directory\&. @@ -127,8 +118,6 @@ Force cleanup of the working directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: log-error-details option -.\" log-error-details option: mysql-stress-test.pl \fB\-\-log\-error\-details\fR .sp Log error details in the global error log file\&. @@ -142,8 +131,6 @@ Log error details in the global error log file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: loop-count option -.\" loop-count option: mysql-stress-test.pl \fB\-\-loop\-count=\fR\fB\fIN\fR\fR .sp In sequential test mode, the number of loops to execute before exiting\&. @@ -157,8 +144,6 @@ In sequential test mode, the number of loops to execute before exiting\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: mysqltest option -.\" mysqltest option: mysql-stress-test.pl \fB\-\-mysqltest=\fR\fB\fIpath\fR\fR .sp The path name to the @@ -174,8 +159,6 @@ program\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-database option -.\" server-database option: mysql-stress-test.pl \fB\-\-server\-database=\fR\fB\fIdb_name\fR\fR .sp The database to use for the tests\&. The default is @@ -190,8 +173,6 @@ test\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-host option -.\" server-host option: mysql-stress-test.pl \fB\-\-server\-host=\fR\fB\fIhost_name\fR\fR .sp The host name of the local host to use for making a TCP/IP connection to the local server\&. By default, the connection is made to @@ -207,8 +188,6 @@ using a Unix socket file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-logs-dir option -.\" server-logs-dir option: mysql-stress-test.pl \fB\-\-server\-logs\-dir=\fR\fB\fIpath\fR\fR .sp This option is required\&. @@ -224,8 +203,6 @@ is the directory where all client session logs will be stored\&. Usually this is .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-password option -.\" server-password option: mysql-stress-test.pl \fB\-\-server\-password=\fR\fB\fIpassword\fR\fR .sp The password to use when connecting to the server\&. @@ -239,8 +216,6 @@ The password to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-port option -.\" server-port option: mysql-stress-test.pl \fB\-\-server\-port=\fR\fB\fIport_num\fR\fR .sp The TCP/IP port number to use for connecting to the server\&. The default is 3306\&. @@ -254,8 +229,6 @@ The TCP/IP port number to use for connecting to the server\&. The default is 330 .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-socket option -.\" server-socket option: mysql-stress-test.pl \fB\-\-server\-socket=\fR\fB\fIfile_name\fR\fR .sp For connections to @@ -271,8 +244,6 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: server-user option -.\" server-user option: mysql-stress-test.pl \fB\-\-server\-user=\fR\fB\fIuser_name\fR\fR .sp The MySQL user name to use when connecting to the server\&. The default is @@ -287,8 +258,6 @@ root\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: sleep-time option -.\" sleep-time option: mysql-stress-test.pl \fB\-\-sleep\-time=\fR\fB\fIN\fR\fR .sp The delay in seconds between test executions\&. @@ -302,8 +271,6 @@ The delay in seconds between test executions\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: stress-basedir option -.\" stress-basedir option: mysql-stress-test.pl \fB\-\-stress\-basedir=\fR\fB\fIpath\fR\fR .sp This option is required\&. @@ -319,8 +286,6 @@ is the working directory for the test run\&. It is used as the temporary locatio .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: stress-datadir option -.\" stress-datadir option: mysql-stress-test.pl \fB\-\-stress\-datadir=\fR\fB\fIpath\fR\fR .sp The directory of data files to be used during testing\&. The default location is the @@ -338,8 +303,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: stress-init-file option -.\" stress-init-file option: mysql-stress-test.pl \fB\-\-stress\-init\-file[=\fR\fB\fIpath\fR\fR\fB]\fR .sp \fIfile_name\fR @@ -356,8 +319,6 @@ in the test suite directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: stress-mode option -.\" stress-mode option: mysql-stress-test.pl \fB\-\-stress\-mode=\fR\fB\fImode\fR\fR .sp This option indicates the test order in stress\-test mode\&. The @@ -378,8 +339,6 @@ random\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: stress-suite-basedir option -.\" stress-suite-basedir option: mysql-stress-test.pl \fB\-\-stress\-suite\-basedir=\fR\fB\fIpath\fR\fR .sp This option is required\&. @@ -403,8 +362,6 @@ option\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: stress-tests-file option -.\" stress-tests-file option: mysql-stress-test.pl \fB\-\-stress\-tests\-file[=\fR\fB\fIfile_name\fR\fR\fB]\fR .sp Use this option to run the stress tests\&. @@ -425,8 +382,6 @@ in the stress suite directory\&. (See .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: suite option -.\" suite option: mysql-stress-test.pl \fB\-\-suite=\fR\fB\fIsuite_name\fR\fR .sp Run the named test suite\&. The default name is @@ -444,8 +399,6 @@ directory)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: test-count option -.\" test-count option: mysql-stress-test.pl \fB\-\-test\-count=\fR\fB\fIN\fR\fR .sp The number of tests to execute before exiting\&. @@ -459,8 +412,6 @@ The number of tests to execute before exiting\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: test-duration option -.\" test-duration option: mysql-stress-test.pl \fB\-\-test\-duration=\fR\fB\fIN\fR\fR .sp The duration of stress testing in seconds\&. @@ -474,8 +425,6 @@ The duration of stress testing in seconds\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: threads option -.\" threads option: mysql-stress-test.pl \fB\-\-threads=\fR\fB\fIN\fR\fR .sp The number of threads\&. The default is 1\&. @@ -489,8 +438,6 @@ The number of threads\&. The default is 1\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-stress-test.pl: verbose option -.\" verbose option: mysql-stress-test.pl \fB\-\-verbose\fR .sp Verbose mode\&. Print more information about what the program does\&. diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index ff7716bb5711..8c8241848f5e 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 02/29/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "02/29/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "05/13/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql-test-run.pl .SH "NAME" mysql-test-run.pl \- run MySQL test suite .SH "SYNOPSIS" @@ -231,44 +230,6 @@ uses several environment variables\&. Some of them are listed in the following t \fBmysql\-test\-run\&.pl\fR, others are set by \fBmysql\-test\-run\&.pl\fR instead, and may be referred to in tests\&. -.\" MTR_MEM environment variable -.\" environment variable: MTR_MEM -.\" MTR_PARALLEL environment variable -.\" environment variable: MTR_PARALLEL -.\" MTR_BUILD_THREAD environment variable -.\" environment variable: MTR_BUILD_THREAD -.\" MTR_PORT_BASE environment variable -.\" environment variable: MTR_PORT_BASE -.\" MTR_TESTCASE_TIMEOUT environment variable -.\" environment variable: MTR_TESTCASE_TIMEOUT -.\" MTR_SUITE_TIMEOUT environment variable -.\" environment variable: MTR_SUITE_TIMEOUT -.\" MTR_START_TIMEOUT environment variable -.\" environment variable: MTR_START_TIMEOUT -.\" MTR_SHUTDOWN_TIMEOUT environment variable -.\" environment variable: MTR_SHUTDOWN_TIMEOUT -.\" MTR_CTEST_TIMEOUT environment variable -.\" environment variable: MTR_CTEST_TIMEOUT -.\" MYSQL_CONFIG_EDITOR environment variable -.\" environment variable: MYSQL_CONFIG_EDITOR -.\" MYSQL_TEST environment variable -.\" environment variable: MYSQL_TEST -.\" MYSQL_TEST_LOGIN_FILE environment variable -.\" environment variable: MYSQL_TEST_LOGIN_FILE -.\" MYSQLD_BOOTSTRAP environment variable -.\" environment variable: MYSQLD_BOOTSTRAP -.\" MYSQLD_BOOTSTRAP_CMD environment variable -.\" environment variable: MYSQLD_BOOTSTRAP_CMD -.\" MYSQLD environment variable -.\" environment variable: MYSQLD -.\" MYSQLD_CMD environment variable -.\" environment variable: MYSQLD_CMD -.\" MYSQLTEST_VARDIR environment variable -.\" environment variable: MYSQLTEST_VARDIR -.\" MYSQL_TEST_DIR environment variable -.\" environment variable: MYSQL_TEST_DIR -.\" MYSQL_TMP_DIR environment variable -.\" environment variable: MYSQL_TMP_DIR .TS allbox tab(:); lB lB. @@ -430,8 +391,6 @@ not to process any following arguments as options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: help option -.\" help option: mysql-test-run.pl \fB\-\-help\fR, \fB\-h\fR .sp @@ -446,8 +405,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: big-test option -.\" big-test option: mysql-test-run.pl \fB\-\-big\-test\fR .sp Allow tests marked as "big" to run\&. Tests can be thus marked by including the line @@ -466,8 +423,6 @@ This is typically done for tests that take very long to run, or that use very mu .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: boot-dbx option -.\" boot-dbx option: mysql-test-run.pl \fB\-\-boot\-dbx\fR .sp Run the @@ -485,8 +440,6 @@ debugger\&. This option is available from MySQL 5\&.5\&.17\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: boot-ddd option -.\" boot-ddd option: mysql-test-run.pl \fB\-\-boot\-ddd\fR .sp Run the @@ -504,8 +457,6 @@ debugger\&. This option is available from MySQL 5\&.5\&.17\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: boot-gdb option -.\" boot-gdb option: mysql-test-run.pl \fB\-\-boot\-gdb\fR .sp Run the @@ -513,6 +464,10 @@ Run the server used for bootstrapping the database through the \fBgdb\fR debugger\&. This option is available from MySQL 5\&.5\&.17\&. +.sp +See also the +\fB\-\-manual\-boot\-gdb\fR +option\&. .RE .sp .RS 4 @@ -523,8 +478,6 @@ debugger\&. This option is available from MySQL 5\&.5\&.17\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: build-thread option -.\" build-thread option: mysql-test-run.pl \fB\-\-build\-thread=\fR\fB\fInumber\fR\fR .sp Specify a number to calculate port numbers from\&. The formula is 10 * @@ -552,8 +505,6 @@ is recommended instead\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: callgrind option -.\" callgrind option: mysql-test-run.pl \fB\-\-callgrind\fR .sp Instructs @@ -570,8 +521,6 @@ to use .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: check-testcases option -.\" check-testcases option: mysql-test-run.pl \fB\-\-check\-testcases\fR .sp Check test cases for side effects\&. This is done by checking system state before and after each test case; if there is any difference, a warning to that effect will be written, but the test case will not be marked as failed because of it\&. This check is enabled by default\&. @@ -585,8 +534,6 @@ Check test cases for side effects\&. This is done by checking system state befor .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: clean-vardir option -.\" clean-vardir option: mysql-test-run.pl \fB\-\-clean\-vardir\fR .sp Clean up the @@ -603,8 +550,6 @@ directory with logs and test results etc\&. after the test run, but only if ther .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: client-bindir option -.\" client-bindir option: mysql-test-run.pl \fB\-\-client\-bindir=\fR\fB\fIpath\fR\fR .sp The path to the directory where client binaries are located\&. @@ -618,8 +563,6 @@ The path to the directory where client binaries are located\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: client-dbx option -.\" client-dbx option: mysql-test-run.pl \fB\-\-client\-dbx\fR .sp Start @@ -637,8 +580,6 @@ debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: client-ddd option -.\" client-ddd option: mysql-test-run.pl \fB\-\-client\-ddd\fR .sp Start @@ -656,8 +597,6 @@ debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: client-debugger option -.\" client-debugger option: mysql-test-run.pl \fB\-\-client\-debugger=\fR\fB\fIdebugger\fR\fR .sp Start @@ -673,8 +612,6 @@ in the named debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: client-gdb option -.\" client-gdb option: mysql-test-run.pl \fB\-\-client\-gdb\fR .sp Start @@ -692,8 +629,6 @@ debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: client-libdir option -.\" client-libdir option: mysql-test-run.pl \fB\-\-client\-libdir=\fR\fB\fIpath\fR\fR .sp The path to the directory where client libraries are located\&. @@ -707,8 +642,6 @@ The path to the directory where client libraries are located\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: combination option -.\" combination option: mysql-test-run.pl \fB\-\-combination=\fR\fB\fIvalue\fR\fR .sp Extra option to pass to @@ -738,8 +671,6 @@ Section\ \&4.9, \(lqPassing Options from mysql-test-run.pl to mysqld or mysqltes .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: comment option -.\" comment option: mysql-test-run.pl \fB\-\-comment=\fR\fB\fIstr\fR\fR .sp Write @@ -756,8 +687,6 @@ to the output within lines filled with .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: compress option -.\" compress option: mysql-test-run.pl \fB\-\-compress\fR .sp Compress all information sent between the client and the server if both support compression\&. @@ -771,8 +700,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: cursor-protocol option -.\" cursor-protocol option: mysql-test-run.pl \fB\-\-cursor\-protocol\fR .sp Pass the @@ -791,8 +718,6 @@ option to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: dbx option -.\" gdb option: mysql-test-run.pl \fB\-\-dbx\fR .sp Start @@ -810,8 +735,6 @@ debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: ddd option -.\" ddd option: mysql-test-run.pl \fB\-\-ddd\fR .sp Start @@ -829,8 +752,6 @@ debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: debug option -.\" debug option: mysql-test-run.pl \fB\-\-debug\fR .sp Dump trace output for all clients and servers\&. @@ -844,8 +765,6 @@ Dump trace output for all clients and servers\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: debugger option -.\" debugger option: mysql-test-run.pl \fB\-\-debugger=\fR\fB\fIdebugger\fR\fR .sp Start @@ -861,8 +780,6 @@ using the named debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: debug-common option -.\" debug-common option: mysql-test-run.pl \fB\-\-debug\-common\fR .sp This option works similar to @@ -880,8 +797,6 @@ which are considered the most commonly used\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: debug-server option -.\" debug-server option: mysql-test-run.pl \fB\-\-debug\-server\fR .sp Runs @@ -904,8 +819,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: debug-sync-timeout option -.\" debug-sync-timeout option: mysql-test-run.pl \fB\-\-debug\-sync\-timeout=\fR\fB\fIseconds\fR\fR .sp Controls whether the Debug Sync facility for testing and debugging is enabled\&. The option value is a timeout in seconds\&. The default value is 300\&. A value of 0 disables Debug Sync\&. The value of this option also becomes the default timeout for individual synchronization points\&. @@ -932,8 +845,6 @@ Section\ \&4.14, \(lqThread Synchronization in Test Cases\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: default-myisam option -.\" default-myisam option: mysql-test-run.pl \fB\-\-default\-myisam\fR .sp Use MyISAM as default engine for all except InnoDB\-specific tests\&. This option is on by default in MySQL 5\&.5 and 5\&.6 but it off by default from MySQL 5\&.7\&. See also @@ -948,8 +859,6 @@ Use MyISAM as default engine for all except InnoDB\-specific tests\&. This optio .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: defaults-file option -.\" default-file option: mysql-test-run.pl \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use the named file as fixed config file template for all tests\&. @@ -963,8 +872,6 @@ Use the named file as fixed config file template for all tests\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: defaults_extra_file option -.\" default_extra_file option: mysql-test-run.pl \fB\-\-defaults_extra_file=\fR\fB\fIfile_name\fR\fR .sp Add setting from the named file to all generated configs\&. @@ -978,8 +885,6 @@ Add setting from the named file to all generated configs\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: do-test option -.\" do-test option: mysql-test-run.pl \fB\-\-do\-test=\fR\fB\fIprefix\fR\fR .sp Run all test cases having a name that begins with the given @@ -1014,8 +919,6 @@ xmainytestz\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: do-test-list option -.\" do-test-list option: mysql-test-run.pl \fB\-\-do\-testlist=\fR\fB\fIfile\fR\fR .sp Run all tests listed in the file @@ -1038,8 +941,6 @@ option is available from MySQL 5\&.7\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: embedded-server option -.\" embedded-server option: mysql-test-run.pl \fB\-\-embedded\-server\fR .sp Use a version of @@ -1055,8 +956,6 @@ built with the embedded server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: enable-disabled option -.\" enable-disabled option: mysql-test-run.pl \fB\-\-enable\-disabled\fR .sp Ignore any @@ -1072,8 +971,6 @@ file, and run also tests marked as disbaled\&. Success or failure of those tests .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: experimental option -.\" experimental option: mysql-test-run.pl \fB\-\-experimental=\fR\fB\fIfile_name\fR\fR .sp Specify a file that contains a list of test cases that should be displayed with the @@ -1097,8 +994,6 @@ It is also possible to supply more than one .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: explain-protocol option -.\" explain-protocol option: mysql-test-run.pl \fB\-\-explain\-protocol\fR, .sp Run @@ -1114,8 +1009,6 @@ on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: extern option -.\" extern option: mysql-test-run.pl \fB\-\-extern\fR \fIoption\fR=\fIvalue\fR .sp @@ -1150,8 +1043,6 @@ file that requires the server to be restarted with specific options, the file wi .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: fast option -.\" fast option: mysql-test-run.pl \fB\-\-fast\fR .sp Do not perform controlled shutdown when servers need to be restarted or at the end of the test run\&. This is equivalent to using @@ -1166,8 +1057,6 @@ Do not perform controlled shutdown when servers need to be restarted or at the e .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: force option -.\" force option: mysql-test-run.pl \fB\-\-force\fR .sp Normally, @@ -1185,8 +1074,6 @@ causes execution to continue regardless of test case failure\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: force-restart option -.\" force-restart option: mysql-test-run.pl \fB\-\-force\-restart\fR .sp Always restart the server(s) between each tast case, whether it\*(Aqs needed or not\&. Will also restart between repeated runs of the same test case\&. This may be useful e\&.g\&. when looking for the source of a memory leak, as there will only have been one test run before the server exits\&. @@ -1200,8 +1087,6 @@ Always restart the server(s) between each tast case, whether it\*(Aqs needed or .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: gcov option -.\" gcov option: mysql-test-run.pl \fB\-\-gcov\fR .sp Run tests with the @@ -1217,8 +1102,6 @@ test coverage tool\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: gdb option -.\" gdb option: mysql-test-run.pl \fB\-\-gdb\fR .sp Start @@ -1236,8 +1119,6 @@ debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: gprof option -.\" gprof option: mysql-test-run.pl \fB\-\-gprof\fR .sp Run tests with the @@ -1253,11 +1134,7 @@ profiling tool\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: include-ndbcluster option -.\" include-ndbcluster option: mysql-test-run.pl \fB\-\-include\-ndbcluster\fR, -.\" mysql-test-run.pl: include-ndb option -.\" include-ndb option: mysql-test-run.pl \fB\-\-include\-ndb\fR .sp Run also tests that need Cluster\&. @@ -1271,8 +1148,6 @@ Run also tests that need Cluster\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: json-explain-protocol option -.\" json-explain-protocol option: mysql-test-run.pl \fB\-\-json\-explain\-protocol\fR, .sp Run @@ -1290,8 +1165,21 @@ option is available from MySQL 5\&.6\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: manual-dbx option -.\" manual-dbx option: mysql-test-run.pl +\fB\-\-manual\-boot\-gdb\fR +.sp +This option is similar to +\fB\-\-boot\-gdb\fR +but attaches the debugger to the server during the bootstrapping process, permitting the use of a remote debugger\&. This option is available from MySQL 5\&.7\&.14\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-manual\-dbx\fR .sp Use a server that has already been started by the user in the @@ -1307,8 +1195,6 @@ debugger\&. Support for dbx is available from MySQL 5\&.5\&.12\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: manual-ddd option -.\" manual-ddd option: mysql-test-run.pl \fB\-\-manual\-ddd\fR .sp Use a server that has already been started by the user in the @@ -1324,8 +1210,6 @@ debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: manual-debug option -.\" manual-debug option: mysql-test-run.pl \fB\-\-manual\-debug\fR .sp Use a server that has already been started by the user in a debugger\&. @@ -1339,8 +1223,6 @@ Use a server that has already been started by the user in a debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: manual-gdb option -.\" manual-gdb option: mysql-test-run.pl \fB\-\-manual\-gdb\fR .sp Use a server that has already been started by the user in the @@ -1356,8 +1238,6 @@ debugger\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: mark-progress option -.\" mark-progress option: mysql-test-run.pl \fB\-\-mark\-progress\fR .sp Marks progress with timing (in milliseconds) and line number in @@ -1372,8 +1252,6 @@ var/log/\fItestname\fR\&.progress\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: max-connections option -.\" max-connections option: mysql-test-run.pl \fB\-\-max\-connections=\fR\fB\fInum\fR\fR .sp The maximum number of simultaneous server connections that may be used per test\&. If not set, the maximum is 128\&. Minimum allowed limit is 8, maximum is 5120\&. Corresponds to the same option for @@ -1388,8 +1266,6 @@ The maximum number of simultaneous server connections that may be used per test\ .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: max-save-core option -.\" max-save-core option: mysql-test-run.pl \fB\-\-max\-save\-core=\fR\fB\fIN\fR\fR .sp Limit the number of core files saved, to avoid filling up disks in case of a frequently crashing server\&. Defaults to 5, set to 0 for no limit\&. May also be set with the environment variable @@ -1404,8 +1280,6 @@ MTR_MAX_SAVE_CORE .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: max-save-datadir option -.\" max-save-datadir option: mysql-test-run.pl \fB\-\-max\-save\-datadir=\fR\fB\fIN\fR\fR .sp Limit the number of data directories saved after failed tests, to avoid filling up disks in case of frequent failures\&. Defaults to 20, set to 0 for no limit\&. May also be set with the environment variable @@ -1420,8 +1294,6 @@ MTR_MAX_SAVE_DATADIR .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: max-test-fail option -.\" max-test-fail option: mysql-test-run.pl \fB\-\-max\-test\-fail=\fR\fB\fIN\fR\fR .sp Stop execution after the specified number of tests have failed, to avoid using up resources (and time) in case of massive failures\&. retries are noe counted, nor are failures of tests marked experimental\&. Defaults to 10, set to 0 for no limit\&. May also be set with the environment variable @@ -1436,8 +1308,6 @@ MTR_MAX_TEST_FAIL .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: mem option -.\" mem option: mysql-test-run.pl \fB\-\-mem\fR .sp This option is not supported on Windows\&. @@ -1473,8 +1343,6 @@ option next time\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: mysqld option -.\" mysqld option: mysql-test-run.pl \fB\-\-mysqld=\fR\fB\fIvalue\fR\fR .sp Extra option to pass to @@ -1493,8 +1361,6 @@ Section\ \&4.9, \(lqPassing Options from mysql-test-run.pl to mysqld or mysqltes .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: mysqld-env option -.\" mysqld-env option: mysql-test-run.pl \fB\-\-mysqld\-env=\fR\fB\fIvariable\fR\fR\fB=\fR\fB\fIvalue\fR\fR .sp Sets (or changes) an environment variable before starting @@ -1514,8 +1380,6 @@ options to set more than one variable\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: mysqltest option -.\" mysqltest option: mysql-test-run.pl \fB\-\-mysqltest=\fR\fB\fIoptions\fR\fR .sp Extra options to pass to @@ -1532,8 +1396,6 @@ This option was added in MySQL 5\&.8\&.0\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: ndb-connectstring option -.\" ndb-connectstring option: mysql-test-run.pl \fB\-\-ndb\-connectstring=\fR\fB\fIstr\fR\fR .sp Pass @@ -1551,8 +1413,6 @@ from starting a cluster\&. It is assumed that there is already a cluster running .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: nocheck-testcases option -.\" nocheck-testcases option: mysql-test-run.pl \fB\-\-nocheck\-testcases\fR .sp Disable the check for test case side effects; see @@ -1568,8 +1428,6 @@ for a description\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: nodefault-myisam option -.\" nodefault-myisam option: mysql-test-run.pl \fB\-\-nodefault\-myisam\fR .sp For MySQL 5\&.5 or 5\&.6, do not override the build\-in default engine to use MyISAM instead for non\-InnoDB tests\&. Since the existing collection of tests were originally adapted for MyISAM as default, many tests will fail when this option is used, because the test behaves differently or produces different output when the engine switches to InnoDB\&. @@ -1585,8 +1443,6 @@ From MySQL 5\&.7, the default engine for tests has been changed to InnoDB and th .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: noreorder option -.\" noreorder option: mysql-test-run.pl \fB\-\-noreorder\fR .sp Do not reorder tests to reduce number of restarts, but run them in exactly the order given\&. If a whole suite is to be run, the tests are run in alphabetic order, though similiar combinations will be grouped together\&. If more than one suite is listed, the tests are run one suite at a time, in the order listed\&. @@ -1600,8 +1456,6 @@ Do not reorder tests to reduce number of restarts, but run them in exactly the o .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: notimer option -.\" notimer option: mysql-test-run.pl \fB\-\-notimer\fR .sp Cause @@ -1617,8 +1471,6 @@ not to generate a timing file\&. The effect of this is that the report from each .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: nounit-tests option -.\" nounit-tests option: mysql-test-run.pl \fB\-\-nounit\-tests\fR .sp Do not run unit tests, overriding default behavior or setting of the @@ -1636,8 +1488,6 @@ Running of unit tests was enabled from MySQL 5\&.5\&.11\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: nowarnings option -.\" nowarnings option: mysql-test-run.pl \fB\-\-nowarnings\fR .sp Do not look for and report errors and warning in the server logs\&. @@ -1651,8 +1501,6 @@ Do not look for and report errors and warning in the server logs\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: parallel option -.\" parallel option: mysql-test-run.pl \fB\-\-parallel={\fR\fB\fIN\fR\fR\fB|auto}\fR .sp Run tests using @@ -1671,8 +1519,6 @@ for auto\-setting of .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: port-base option -.\" port-base option: mysql-test-run.pl \fB\-\-port\-base=\fR\fB\fIP\fR\fR .sp Specify base of port numbers to be used; a block of 10 will be allocated\&. @@ -1699,8 +1545,6 @@ takes precedence\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: print-testcases option -.\" print-testcases option: mysql-test-run.pl \fB\-\-print\-testcases\fR .sp Do not run any tests, but print details about all tests, in the order they would have been run\&. @@ -1714,8 +1558,6 @@ Do not run any tests, but print details about all tests, in the order they would .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: ps-protocol option -.\" ps-protocol option: mysql-test-run.pl \fB\-\-ps\-protocol\fR .sp Pass the @@ -1732,8 +1574,6 @@ option to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: record option -.\" record option: mysql-test-run.pl \fB\-\-record\fR .sp Pass the @@ -1750,8 +1590,6 @@ option to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: reorder option -.\" reorder option: mysql-test-run.pl \fB\-\-reorder\fR .sp Reorder tests to minimize the number of server restarts needed\&. This is the default behavior\&. There is no guarantee that a particular set of tests will always end up in the same order\&. @@ -1765,8 +1603,6 @@ Reorder tests to minimize the number of server restarts needed\&. This is the de .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: repeat option -.\" repeat option: mysql-test-run.pl \fB\-\-repeat=\fR\fB\fIN\fR\fR .sp Run each test @@ -1782,8 +1618,6 @@ number of times\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: report-features option -.\" report-features option: mysql-test-run.pl \fB\-\-report\-features\fR .sp Display the output of @@ -1800,8 +1634,6 @@ SHOW VARIABLES\&. This can be used to verify that binaries are built with all re .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: report-times option -.\" report-times option: mysql-test-run.pl \fB\-\-report\-times\fR .sp At the end of the test run, write a summary of how much time was spent in various phases of execution\&. If you run with @@ -1824,8 +1656,6 @@ is available from MySQL 5\&.5\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: retry option -.\" retry option: mysql-test-run.pl \fB\-\-retry=\fR\fB\fIN\fR\fR .sp If a test fails, it is retried up to a maximum of @@ -1851,8 +1681,6 @@ may fail in total, as each repetition is considered a new test case, which may i .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: retry-failure option -.\" retry-failure option: mysql-test-run.pl \fB\-\-retry\-failure=\fR\fB\fIN\fR\fR .sp Allow a failed and retried test to fail more than the default 2 times before giving it up\&. Setting it to 0 or 1 effectively turns off retries @@ -1866,8 +1694,6 @@ Allow a failed and retried test to fail more than the default 2 times before giv .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: shutdown-timeout option -.\" shutdown-timeout option: mysql-test-run.pl \fB\-\-shutdown\-timeout=\fR\fB\fIseconds\fR\fR .sp Max number of seconds to wait for servers to do controlled shutdown before killing them\&. Default is 10\&. @@ -1881,8 +1707,6 @@ Max number of seconds to wait for servers to do controlled shutdown before killi .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-combinations option -.\" skip-combinations option: mysql-test-run.pl \fB\-\-skip\-combinations\fR .sp Do not apply combinations; ignore combinations file or option\&. @@ -1896,11 +1720,7 @@ Do not apply combinations; ignore combinations file or option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-ndbcluster option -.\" skip-ndbcluster option: mysql-test-run.pl \fB\-\-skip\-ndbcluster\fR, -.\" mysql-test-run.pl: skip-ndb option -.\" skip-ndb option: mysql-test-run.pl \fB\-\-skip\-ndb\fR .sp Do not start NDB Cluster; skip Cluster test cases\&. This option only has effect if you do have NDB, if not it will have no effect as it cannot run those tests anyway\&. @@ -1914,11 +1734,7 @@ Do not start NDB Cluster; skip Cluster test cases\&. This option only has effect .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-ndbcluster-slave option -.\" skip-ndbcluster-slave option: mysql-test-run.pl \fB\-\-skip\-ndbcluster\-slave\fR, -.\" mysql-test-run.pl: skip-ndb-slave option -.\" skip-ndb-slave option: mysql-test-run.pl \fB\-\-skip\-ndb\-slave\fR .sp Do not start an NDB Cluster slave\&. @@ -1932,8 +1748,6 @@ Do not start an NDB Cluster slave\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-rpl option -.\" skip-rpl option: mysql-test-run.pl \fB\-\-skip\-rpl\fR .sp Skip replication test cases\&. @@ -1947,8 +1761,6 @@ Skip replication test cases\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-ssl option -.\" skip-ssl option: mysql-test-run.pl \fB\-\-skip\-ssl\fR .sp Do not start @@ -1964,8 +1776,6 @@ with support for SSL connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-test option -.\" skip-test option: mysql-test-run.pl \fB\-\-skip\-test=\fR\fB\fIregex\fR\fR .sp Specify a regular expression to be applied to test case names\&. Cases with names that match the expression are skipped\&. tests to skip\&. @@ -1985,8 +1795,6 @@ option for details\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: skip-test-list option -.\" skip-test-list option: mysql-test-run.pl \fB\-\-skip\-test\-list=\fR\fB\fIfile\fR\fR .sp Specify a file listing tests that should be skipped (disabled)\&. @@ -2022,8 +1830,6 @@ are passed to the master server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: sleep option -.\" sleep option: mysql-test-run.pl \fB\-\-sleep=\fR\fB\fIN\fR\fR .sp Pass @@ -2040,8 +1846,6 @@ to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: sp-protocol option -.\" sp-protocol option: mysql-test-run.pl \fB\-\-sp\-protocol\fR .sp Pass the @@ -2058,8 +1862,6 @@ option to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: ssl option -.\" ssl option: mysql-test-run.pl \fB\-\-ssl\fR .sp If @@ -2082,8 +1884,6 @@ Couldn\*(Aqt find support for SSL .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: start option -.\" start option: mysql-test-run.pl \fB\-\-start\fR .sp Initialize and start servers with the startup settings for the specified test case\&. You can use this option to start a server to which you can connect later\&. For example, after building a source distribution you can start a server and connect to it with the @@ -2118,8 +1918,6 @@ will stop once the server has been started, but will terminate if the server die .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: start-and-exit option -.\" start-and-exit option: mysql-test-run.pl \fB\-\-start\-and\-exit\fR .sp This is similar to @@ -2136,8 +1934,6 @@ terminates once the server has been started, leaving just the server process run .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: start-dirty option -.\" start-dirty option: mysql-test-run.pl \fB\-\-start\-dirty\fR .sp This is similar to @@ -2152,8 +1948,6 @@ This is similar to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: start-from option -.\" start-from option: mysql-test-run.pl \fB\-\-start\-from=\fR\fB\fItest_name\fR\fR .sp \fBmysql\-test\-run\&.pl\fR @@ -2169,8 +1963,6 @@ sorts the list of names of the test cases to be run, and then begins with .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: strace-client option -.\" strace-client option: mysql-test-run.pl \fB\-\-strace\-client\fR .sp Create @@ -2194,8 +1986,6 @@ option is functional from MySQL 5\&.5\&.20, and only supported on Linux\&. The o .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: strace-server option -.\" strace-server option: mysql-test-run.pl \fB\-\-strace\-server\fR .sp Create @@ -2218,8 +2008,6 @@ option is available from MySQL 5\&.5\&.20, on Linux only\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: stress option -.\" stress option: mysql-test-run.pl \fB\-\-stress=\fR\fB\fIstress options\fR\fR .sp Start a server, but instead of running a test, run @@ -2242,8 +2030,6 @@ option was added in MySQL 5\&.5\&.17, it is not a direct replacement for the opt .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: suite option -.\" suite option: mysql-test-run.pl \fB\-\-suite=\fR\fB\fIsuite_name\fR\fR .sp Run the named test suite\&. The default name is @@ -2261,8 +2047,6 @@ directory)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: suite-timeout option -.\" suite-timeout option: mysql-test-run.pl \fB\-\-suite\-timeout=\fR\fB\fIminutes\fR\fR .sp Specify the maximum test suite runtime in minutes\&. @@ -2276,8 +2060,6 @@ Specify the maximum test suite runtime in minutes\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: testcase-timeout option -.\" testcase-timeout option: mysql-test-run.pl \fB\-\-testcase\-timeout=\fR\fB\fIminutes\fR\fR .sp Specify the maximum test case runtime in minutes\&. @@ -2291,8 +2073,6 @@ Specify the maximum test case runtime in minutes\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: timediff option -.\" timediff option: mysql-test-run.pl \fB\-\-timediff\fR .sp Adds to each test report for a test case, the total time in sconds and milliseconds passed since the preceding test ended\&. This option can only be used together with @@ -2307,8 +2087,6 @@ Adds to each test report for a test case, the total time in sconds and milliseco .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: timer option -.\" timer option: mysql-test-run.pl \fB\-\-timer\fR .sp Cause @@ -2325,8 +2103,6 @@ to generate a timing file\&. The default file is named .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: timestamp option -.\" timestamp option: mysql-test-run.pl \fB\-\-timestamp\fR .sp Prints a timestamp before the test case name in each test report line, showing when the test ended\&. @@ -2340,8 +2116,6 @@ Prints a timestamp before the test case name in each test report line, showing w .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: tmpdir option -.\" tmpdir option: mysql-test-run.pl \fB\-\-tmpdir=\fR\fB\fIpath\fR\fR .sp The directory where temporary file are stored\&. The default location is @@ -2358,8 +2132,6 @@ will be set to the path for this directory, whether it has the default value or .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: unit-tests option -.\" unit-tests option: mysql-test-run.pl \fB\-\-unit\-tests\fR .sp Force running of unit tests, overriding default behavior or setting of the @@ -2377,8 +2149,6 @@ Running of unit tests was enabled from MySQL 5\&.5\&.11\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: unit-tests-report option -.\" unit-tests-report option: mysql-test-run.pl \fB\-\-unit\-tests\-report\fR .sp Extend the unit test run by also outputting the log from the test run, independently of whether it succeeded or not\&. This option implies @@ -2396,8 +2166,6 @@ option is available in MySQL 5\&.5 from version 5\&.5\&.44, in 5\&.6 from versio .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: user option -.\" user option: mysql-test-run.pl \fB\-\-user=\fR\fB\fIuser_name\fR\fR .sp The MySQL user name to use when connecting to the server\&. @@ -2411,8 +2179,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: user-args option -.\" user-args option: mysql-test-run.pl \fB\-\-user\-args\fR .sp Drops all non\-essential command line arguments to the @@ -2434,8 +2200,6 @@ or .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: valgrind option -.\" valgrind option: mysql-test-run.pl \fB\-\-valgrind\fR .sp Run @@ -2464,8 +2228,6 @@ is added to the list of tests when the server is run in valgrind\&. This test is .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: valgrind-clients option -.\" valgrind-clients option: mysql-test-run.pl \fB\-\-valgrind\-clients\fR .sp Run all clients started by @@ -2487,8 +2249,6 @@ was added in MySQL 5\&.7\&.9\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: valgrind-mysqld option -.\" valgrind-mysqld option: mysql-test-run.pl \fB\-\-valgrind\-mysqld\fR .sp Run the @@ -2505,8 +2265,6 @@ server with .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: valgrind-mysqltest option -.\" valgrind-mysqltest option: mysql-test-run.pl \fB\-\-valgrind\-mysqltest\fR .sp Run @@ -2523,8 +2281,6 @@ with .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: valgrind-options option -.\" valgrind-options option: mysql-test-run.pl \fB\-\-valgrind\-option=\fR\fB\fIstr\fR\fR .sp Extra options to pass to @@ -2539,8 +2295,6 @@ Extra options to pass to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: valgrind-path option -.\" valgrind-path option: mysql-test-run.pl \fB\-\-valgrind\-path=\fR\fB\fIpath\fR\fR .sp Specify the path name to the @@ -2556,8 +2310,6 @@ executable\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: vardir option -.\" vardir option: mysql-test-run.pl \fB\-\-vardir=\fR\fB\fIpath\fR\fR .sp Specify the path where files generated during the test run are stored\&. The default location is @@ -2574,8 +2326,6 @@ will be set to the path for this directory, whether it has the default value or .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: verbose option -.\" verbose option: mysql-test-run.pl \fB\-\-verbose\fR .sp Give more verbose output regarding test execution\&. Use the option twice to get even more output\&. Note that the output generated within each test case is not affected\&. @@ -2589,8 +2339,6 @@ Give more verbose output regarding test execution\&. Use the option twice to get .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: verbose-restart option -.\" verbose-restart option: mysql-test-run.pl \fB\-\-verbose\-restart\fR .sp Write when and why servers are restarted between test cases\&. @@ -2604,8 +2352,6 @@ Write when and why servers are restarted between test cases\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: view-protocol option -.\" view-protocol option: mysql-test-run.pl \fB\-\-view\-protocol\fR .sp Pass the @@ -2622,8 +2368,6 @@ option to .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: vs-config option -.\" vs-config option: mysql-test-run.pl \fB\-\-vs\-config=\fR\fB\fIconfig_val\fR\fR .sp Specify the configuration used to build MySQL (for example, @@ -2639,8 +2383,6 @@ Specify the configuration used to build MySQL (for example, .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: wait-all option -.\" wait-all option: mysql-test-run.pl \fB\-\-wait\-all\fR .sp If @@ -2658,8 +2400,6 @@ is used, wait for all servers to exit before termination\&. Otherise, it will te .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: warnings option -.\" warnings option: mysql-test-run.pl \fB\-\-warnings\fR .sp Search the server log for errors or warning after each test and report any suspicious ones; if any are found, the test will be marked as failed\&. This is the default behavior, it may be turned off with @@ -2674,8 +2414,6 @@ Search the server log for errors or warning after each test and report any suspi .sp -1 .IP \(bu 2.3 .\} -.\" mysql-test-run.pl: with-ndbcluster-only option -.\" with-ndbcluster-only option: mysql-test-run.pl \fB\-\-with\-ndbcluster\-only\fR .sp Run only test cases that have diff --git a/man/mysql.1 b/man/mysql.1 index f60540b33af5..8156c1fa300f 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,12 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql -.\" command-line tool -.\" tools: command-line -.\" scripts: SQL -.\" SQL scripts -.\" batch SQL files .SH "NAME" mysql \- the MySQL command\-line tool .SH "SYNOPSIS" @@ -111,10 +105,6 @@ On Unix, the client logs statements executed interactively to a history file\&. See the section called \(lqMYSQL LOGGING\(rq\&. .SH "MYSQL OPTIONS" -.\" mysql command options -.\" command options: mysql -.\" options: command-line: mysql -.\" startup parameters: mysql .PP \fBmysql\fR supports the following options, which can be specified on the command line or in the @@ -132,8 +122,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: help option -.\" help option: mysql \fB\-\-help\fR, \fB\-?\fR .sp @@ -148,8 +136,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: auto-rehash option -.\" auto-rehash option: mysql \fB\-\-auto\-rehash\fR .sp Enable automatic rehashing\&. This option is on by default, which enables database, table, and column name completion\&. Use @@ -194,8 +180,6 @@ library is not available on Windows\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: auto-vertical-output option -.\" auto-vertical-output option: mysql \fB\-\-auto\-vertical\-output\fR .sp Cause result sets to be displayed vertically if they are too wide for the current window, and using normal tabular format otherwise\&. (This applies to statements terminated by @@ -212,8 +196,6 @@ or .sp -1 .IP \(bu 2.3 .\} -.\" mysql: batch option -.\" batch option: mysql \fB\-\-batch\fR, \fB\-B\fR .sp @@ -234,8 +216,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: bind-address option -.\" bind-address option: mysql \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -253,8 +233,6 @@ client that is supplied with MySQL Cluster\&. It is not available in standard My .sp -1 .IP \(bu 2.3 .\} -.\" mysql: character-sets-dir option -.\" character-sets-dir option: mysql \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -269,8 +247,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: column-names option -.\" column-names option: mysql \fB\-\-column\-names\fR .sp Write column names in results\&. @@ -284,8 +260,6 @@ Write column names in results\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: column-type-info option -.\" column-type-info option: mysql \fB\-\-column\-type\-info\fR .sp Display result set metadata\&. @@ -299,8 +273,6 @@ Display result set metadata\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: comments option -.\" comments option: mysql \fB\-\-comments\fR, \fB\-c\fR .sp @@ -315,8 +287,6 @@ Whether to preserve comments in statements sent to the server\&. The default is .sp -1 .IP \(bu 2.3 .\} -.\" mysql: compress option -.\" compress option: mysql \fB\-\-compress\fR, \fB\-C\fR .sp @@ -331,8 +301,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysql: database option -.\" database option: mysql \fB\-\-database=\fR\fB\fIdb_name\fR\fR, \fB\-D \fR\fB\fIdb_name\fR\fR .sp @@ -347,8 +315,6 @@ The database to use\&. This is useful primarily in an option file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: debug option -.\" debug option: mysql \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -372,8 +338,6 @@ built using this option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: debug-check option -.\" debug-check option: mysql \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -387,8 +351,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: debug-info option -.\" debug-info option: mysql \fB\-\-debug\-info\fR, \fB\-T\fR .sp @@ -403,8 +365,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysql: default-auth option -.\" default-auth option: mysql \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -421,8 +381,6 @@ This option was added in MySQL 5\&.5\&.7\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: default-character-set option -.\" default-character-set option: mysql \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -449,8 +407,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq, for more information\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: defaults-extra-file option -.\" defaults-extra-file option: mysql \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -466,8 +422,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysql: defaults-file option -.\" defaults-file option: mysql \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -483,8 +437,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysql: defaults-group-suffix option -.\" defaults-group-suffix option: mysql \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -513,8 +465,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: delimiter option -.\" delimiter option: mysql \fB\-\-delimiter=\fR\fB\fIstr\fR\fR .sp Set the statement delimiter\&. The default is the semicolon character (\(lq;\(rq)\&. @@ -528,8 +478,6 @@ Set the statement delimiter\&. The default is the semicolon character (\(lq;\(rq .sp -1 .IP \(bu 2.3 .\} -.\" mysql: disable named commands -.\" disable named command: mysql \fB\-\-disable\-named\-commands\fR .sp Disable named commands\&. Use the @@ -550,8 +498,6 @@ the section called \(lqMYSQL COMMANDS\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysql \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the @@ -568,8 +514,6 @@ Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysql: execute option -.\" execute option: mysql \fB\-\-execute=\fR\fB\fIstatement\fR\fR, \fB\-e \fR\fB\fIstatement\fR\fR .sp @@ -588,8 +532,6 @@ does not use the history file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: force option -.\" force option: mysql \fB\-\-force\fR, \fB\-f\fR .sp @@ -604,8 +546,6 @@ Continue even if an SQL error occurs\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: host option -.\" host option: mysql \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -620,8 +560,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: html option -.\" html option: mysql \fB\-\-html\fR, \fB\-H\fR .sp @@ -636,8 +574,6 @@ Produce HTML output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: ignore-spaces option -.\" ignore-spaces option: mysql \fB\-\-ignore\-spaces\fR, \fB\-i\fR .sp @@ -655,8 +591,6 @@ Section\ \&5.1.7, \(lqServer SQL Modes\(rq)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: init-command option -.\" init-command option: mysql \fB\-\-init\-command=str\fR .sp SQL statement to execute after connecting to the server\&. If auto\-reconnect is enabled, the statement is executed again after reconnection occurs\&. @@ -670,8 +604,6 @@ SQL statement to execute after connecting to the server\&. If auto\-reconnect is .sp -1 .IP \(bu 2.3 .\} -.\" mysql: line-numbers option -.\" line-numbers option: mysql \fB\-\-line\-numbers\fR .sp Write line numbers for errors\&. Disable this with @@ -686,8 +618,6 @@ Write line numbers for errors\&. Disable this with .sp -1 .IP \(bu 2.3 .\} -.\" mysql: local-infile option -.\" local-infile option: mysql \fB\-\-local\-infile[={0|1}]\fR .sp Enable or disable @@ -712,8 +642,6 @@ has no effect if the server does not also support it\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: named-commands option -.\" named-commands option: mysql \fB\-\-named\-commands\fR, \fB\-G\fR .sp @@ -737,8 +665,6 @@ the section called \(lqMYSQL COMMANDS\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: no-auto-rehash option -.\" no-auto-rehash option: mysql \fB\-\-no\-auto\-rehash\fR, \fB\-A\fR .sp @@ -755,8 +681,6 @@ This has the same effect as .sp -1 .IP \(bu 2.3 .\} -.\" mysql: no-beep option -.\" no-beep option: mysql \fB\-\-no\-beep\fR, \fB\-b\fR .sp @@ -771,8 +695,6 @@ Do not beep when errors occur\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: no-defaults option -.\" no-defaults option: mysql \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -788,8 +710,6 @@ can be used to prevent them from being read\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: no-named-commands option -.\" no-named-commands option: mysql \fB\-\-no\-named\-commands\fR, \fB\-g\fR .sp @@ -808,8 +728,6 @@ was removed in MySQL 5\&.5\&.3\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: no-pager option -.\" no-pager option: mysql \fB\-\-no\-pager\fR .sp Deprecated form of @@ -828,8 +746,6 @@ was removed in MySQL 5\&.5\&.3\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: no-tee option -.\" no-tee option: mysql \fB\-\-no\-tee\fR .sp Deprecated form of @@ -848,8 +764,6 @@ is removed in MySQL 5\&.5\&.3\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: one-database option -.\" one-database option: mysql \fB\-\-one\-database\fR, \fB\-o\fR .sp @@ -952,8 +866,6 @@ statement names a table in a different database\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: pager option -.\" pager option: mysql \fB\-\-pager[=\fR\fB\fIcommand\fR\fR\fB]\fR .sp Use the given command for paging query output\&. If the command is omitted, the default pager is the value of your @@ -974,8 +886,6 @@ the section called \(lqMYSQL COMMANDS\(rq, discusses output paging further\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: password option -.\" password option: mysql \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -1003,8 +913,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysql: pipe option -.\" pipe option: mysql \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -1019,8 +927,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysql: plugin-dir option -.\" plugin-dir option: mysql \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -1041,9 +947,6 @@ This option was added in MySQL 5\&.5\&.7\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: port option -.\" port option: mysql -.\" TCP/IP \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -1058,8 +961,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: print-defaults option -.\" print-defaults option: mysql \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -1073,8 +974,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: prompt option -.\" prompt option: mysql \fB\-\-prompt=\fR\fB\fIformat_str\fR\fR .sp Set the prompt to the specified format\&. The default is @@ -1090,8 +989,6 @@ the section called \(lqMYSQL COMMANDS\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: protocol option -.\" protocol option: mysql \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -1106,8 +1003,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: quick option -.\" quick option: mysql \fB\-\-quick\fR, \fB\-q\fR .sp @@ -1124,8 +1019,6 @@ does not use the history file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: raw option -.\" raw option: mysql \fB\-\-raw\fR, \fB\-r\fR .sp @@ -1179,8 +1072,6 @@ CHAR(92) .sp -1 .IP \(bu 2.3 .\} -.\" mysql: reconnect option -.\" reconnect option: mysql \fB\-\-reconnect\fR .sp If the connection to the server is lost, automatically try to reconnect\&. A single reconnect attempt is made each time the connection is lost\&. To suppress reconnection behavior, use @@ -1195,10 +1086,6 @@ If the connection to the server is lost, automatically try to reconnect\&. A sin .sp -1 .IP \(bu 2.3 .\} -.\" mysql: safe-updates option -.\" safe-updates option: mysql -.\" mysql: i-am-a-dummy option -.\" i-am-a-dummy option: mysql \fB\-\-safe\-updates\fR, \fB\-\-i\-am\-a\-dummy\fR, \fB\-U\fR @@ -1221,8 +1108,6 @@ the section called \(lqMYSQL TIPS\(rq, for more information about this option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: secure-auth option -.\" secure-auth option: mysql \fB\-\-secure\-auth\fR .sp Do not send passwords to the server in old (pre\-4\&.1) format\&. This prevents connections except for servers that use the newer password format\&. @@ -1251,8 +1136,6 @@ Passwords that use the pre\-4\&.1 hashing method are less secure than passwords .sp -1 .IP \(bu 2.3 .\} -.\" mysql: shared-memory-base-name option -.\" shared-memory-base-name option: mysql \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -1271,8 +1154,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: show-warnings option -.\" show-warnings option: mysql \fB\-\-show\-warnings\fR .sp Cause warnings to be shown after each statement if there are any\&. This option applies to interactive and batch mode\&. @@ -1286,8 +1167,6 @@ Cause warnings to be shown after each statement if there are any\&. This option .sp -1 .IP \(bu 2.3 .\} -.\" mysql: sigint-ignore option -.\" sigint-ignore option: mysql \fB\-\-sigint\-ignore\fR .sp Ignore @@ -1304,8 +1183,6 @@ Control+C)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: silent option -.\" silent option: mysql \fB\-\-silent\fR, \fB\-s\fR .sp @@ -1324,8 +1201,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: skip-column-names option -.\" skip-column-names option: mysql \fB\-\-skip\-column\-names\fR, \fB\-N\fR .sp @@ -1340,8 +1215,6 @@ Do not write column names in results\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: skip-line-numbers option -.\" skip-line-numbers option: mysql \fB\-\-skip\-line\-numbers\fR, \fB\-L\fR .sp @@ -1356,8 +1229,6 @@ Do not write line numbers for errors\&. Useful when you want to compare result f .sp -1 .IP \(bu 2.3 .\} -.\" mysql: socket option -.\" socket option: mysql \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -1373,8 +1244,6 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysql: SSL options -.\" SSL options: mysql \fB\-\-ssl*\fR .sp Options that begin with @@ -1391,8 +1260,6 @@ Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: table option -.\" table option: mysql \fB\-\-table\fR, \fB\-t\fR .sp @@ -1407,8 +1274,6 @@ Display output in table format\&. This is the default for interactive use, but c .sp -1 .IP \(bu 2.3 .\} -.\" mysql: tee option -.\" tee option: mysql \fB\-\-tee=\fR\fB\fIfile_name\fR\fR .sp Append a copy of output to the given file\&. This option works only in interactive mode\&. @@ -1423,8 +1288,6 @@ the section called \(lqMYSQL COMMANDS\(rq, discusses tee files further\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: unbuffered option -.\" unbuffered option: mysql \fB\-\-unbuffered\fR, \fB\-n\fR .sp @@ -1439,8 +1302,6 @@ Flush the buffer after each query\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: user option -.\" user option: mysql \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -1455,8 +1316,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: verbose option -.\" verbose option: mysql \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -1473,8 +1332,6 @@ produces table output format even in batch mode\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysql: version option -.\" version option: mysql \fB\-\-version\fR, \fB\-V\fR .sp @@ -1489,8 +1346,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: vertical option -.\" vertical option: mysql \fB\-\-vertical\fR, \fB\-E\fR .sp @@ -1506,8 +1361,6 @@ Print query output rows vertically (one line per column value)\&. Without this o .sp -1 .IP \(bu 2.3 .\} -.\" mysql: wait option -.\" wait option: mysql \fB\-\-wait\fR, \fB\-w\fR .sp @@ -1522,8 +1375,6 @@ If the connection cannot be established, wait and retry instead of aborting\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: xml option -.\" xml option: mysql \fB\-\-xml\fR, \fB\-X\fR .sp @@ -1595,8 +1446,6 @@ format is deprecated and was removed in MySQL 5\&.5\&.3\&. .sp -1 .IP \(bu 2.3 .\} -.\" timeout: connect_timeout variable -.\" connect_timeout variable connect_timeout .sp The number of seconds before connection timeout\&. (Default value is @@ -1611,7 +1460,6 @@ The number of seconds before connection timeout\&. (Default value is .sp -1 .IP \(bu 2.3 .\} -.\" max_allowed_packet variable max_allowed_packet .sp The maximum size of the buffer for client/server communication\&. The default is 16MB, the maximum is 1GB\&. @@ -1625,7 +1473,6 @@ The maximum size of the buffer for client/server communication\&. The default is .sp -1 .IP \(bu 2.3 .\} -.\" max_join_size variable max_join_size .sp The automatic limit for rows in a join when using @@ -1640,7 +1487,6 @@ The automatic limit for rows in a join when using .sp -1 .IP \(bu 2.3 .\} -.\" net_buffer_length variable net_buffer_length .sp The buffer size for TCP/IP and socket communication\&. (Default value is 16KB\&.) @@ -1654,7 +1500,6 @@ The buffer size for TCP/IP and socket communication\&. (Default value is 16KB\&. .sp -1 .IP \(bu 2.3 .\} -.\" select_limit variable select_limit .sp The automatic limit for @@ -1674,7 +1519,6 @@ or at the mysql> prompt: -.\" mysql commands: list of .sp .if n \{\ .RS 4 @@ -1729,8 +1573,6 @@ comments is not supported\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: help command -.\" help command: mysql help [\fIarg\fR], \eh [\fIarg\fR], \e? [\fIarg\fR], @@ -1745,7 +1587,7 @@ help command, \fBmysql\fR uses it as a search string to access server\-side help from the contents of the MySQL Reference Manual\&. For more information, see -the section called \(lqMYSQL SERVER-SIDE HELP\(rq\&. +the section called \(lqMYSQL SERVER\-SIDE HELP\(rq\&. .RE .sp .RS 4 @@ -1756,8 +1598,6 @@ the section called \(lqMYSQL SERVER-SIDE HELP\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: charset command -.\" charset command: mysql charset \fIcharset_name\fR, \eC \fIcharset_name\fR .sp @@ -1776,8 +1616,6 @@ is run with auto\-reconnect enabled (which is not recommended), because the spec .sp -1 .IP \(bu 2.3 .\} -.\" mysql: clear command -.\" clear command: mysql clear, \ec .sp @@ -1792,8 +1630,6 @@ Clear the current input\&. Use this if you change your mind about executing the .sp -1 .IP \(bu 2.3 .\} -.\" mysql: connect command -.\" connect command: mysql connect [\fIdb_name\fR \fIhost_name\fR]], \er [\fIdb_name\fR \fIhost_name\fR]] .sp @@ -1808,8 +1644,6 @@ Reconnect to the server\&. The optional database name and host name arguments ma .sp -1 .IP \(bu 2.3 .\} -.\" mysql: delimiter command -.\" delimiter command: mysql delimiter \fIstr\fR, \ed \fIstr\fR .sp @@ -1850,8 +1684,6 @@ Section\ \&20.1, \(lqDefining Stored Programs\(rq)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: edit command -.\" edit command: mysql edit, \ee .sp @@ -1878,8 +1710,6 @@ command works only in Unix\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: ego command -.\" ego command: mysql ego, \eG .sp @@ -1894,8 +1724,6 @@ Send the current statement to the server to be executed and display the result u .sp -1 .IP \(bu 2.3 .\} -.\" mysql: exit command -.\" exit command: mysql exit, \eq .sp @@ -1911,8 +1739,6 @@ Exit .sp -1 .IP \(bu 2.3 .\} -.\" mysql: go command -.\" go command: mysql go, \eg .sp @@ -1927,8 +1753,6 @@ Send the current statement to the server to be executed\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: nopager command -.\" nopager command: mysql nopager, \en .sp @@ -1948,8 +1772,6 @@ command works only in Unix\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: notee command -.\" notee command: mysql notee, \et .sp @@ -1965,8 +1787,6 @@ tee\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: nowarning command -.\" nowarning command: mysql nowarning, \ew .sp @@ -1981,8 +1801,6 @@ Disable display of warnings after each statement\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: pager command -.\" pager command: mysql pager [\fIcommand\fR], \eP [\fIcommand\fR] .sp @@ -2021,8 +1839,6 @@ for browsing output in some situations\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: print command -.\" print command: mysql print, \ep .sp @@ -2037,8 +1853,6 @@ Print the current input statement without executing it\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: prompt command -.\" prompt command: mysql prompt [\fIstr\fR], \eR [\fIstr\fR] .sp @@ -2062,8 +1876,6 @@ mysql>\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: quit command -.\" quit command: mysql quit, \eq .sp @@ -2079,8 +1891,6 @@ Exit .sp -1 .IP \(bu 2.3 .\} -.\" mysql: rehash command -.\" rehash command: mysql rehash, \e# .sp @@ -2097,8 +1907,6 @@ option\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysql: source command -.\" source command: mysql source \fIfile_name\fR, \e\&. \fIfile_name\fR .sp @@ -2116,8 +1924,6 @@ or .sp -1 .IP \(bu 2.3 .\} -.\" mysql: status command -.\" status command: mysql status, \es .sp @@ -2138,8 +1944,6 @@ variables that affect your queries\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: system command -.\" system command: mysql system \fIcommand\fR, \e! \fIcommand\fR .sp @@ -2158,8 +1962,6 @@ command works only in Unix\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: tee command -.\" tee command: mysql tee [\fIfile_name\fR], \eT [\fIfile_name\fR] .sp @@ -2189,8 +1991,6 @@ again re\-enables logging\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: use command -.\" use command: mysql use \fIdb_name\fR, \eu \fIdb_name\fR .sp @@ -2207,8 +2007,6 @@ as the default database\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql: warnings command -.\" warnings command: mysql warnings, \eW .sp @@ -2373,7 +2171,6 @@ does not log quite that much\&. Additionally, tee file logging can be turned on and off interactively from within \fBmysql\fR\&. This is useful when you want to log some queries to a file, but not others\&. -.\" mysql prompt command .PP The prompt @@ -2699,13 +2496,6 @@ mysql> .\} .RE .SH "MYSQL LOGGING" -.\" MYSQL_HISTFILE environment variable -.\" environment variable: MYSQL_HISTFILE -.\" HOME environment variable -.\" environment variable: HOME -.\" mysql history file -.\" command-line history: mysql -.\" .mysql_history file .PP On Unix, the \fBmysql\fR @@ -2848,7 +2638,7 @@ shell> \fBln \-s /dev/null $HOME/\&.mysql_history\fR .RE .\} .RE -.SH "MYSQL SERVER-SIDE HELP" +.SH "MYSQL SERVER\-SIDE HELP" .sp .if n \{\ .RS 4 @@ -2992,15 +2782,6 @@ topics: .RE .\} .SH "EXECUTING SQL STATEMENTS FROM A TEXT FILE" -.\" executing SQL statements from text files -.\" importing: data -.\" data: importing -.\" files: text -.\" text files: importing -.\" source (mysql client command) -.\" \. (mysql client command) -.\" mysql source (command for reading from text files) -.\" mysql \. (command for reading from text files) .PP The \fBmysql\fR @@ -3207,7 +2988,6 @@ Monty .RE .\} .SS "Using the \-\-safe\-updates Option" -.\" safe-updates option .PP For beginners, a useful startup option is \fB\-\-safe\-updates\fR diff --git a/man/mysql.server.1 b/man/mysql.server.1 index 7f9cc2369bc0..45c006a5521c 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql.server .SH "NAME" mysql.server \- MySQL server startup script .SH "SYNOPSIS" @@ -212,7 +211,6 @@ sections of option files\&. For backward compatibility, it also reads [mysql_server] sections, but to be current you should rename such sections to [mysql\&.server]\&. -.\" changing: socket location .PP You can add options for \fBmysql\&.server\fR @@ -258,8 +256,6 @@ as command\-line arguments\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql.server: basedir option -.\" basedir option: mysql.server \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. @@ -273,8 +269,6 @@ The path to the MySQL installation directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql.server: datadir option -.\" datadir option: mysql.server \fB\-\-datadir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL data directory\&. @@ -288,8 +282,6 @@ The path to the MySQL data directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql.server: pid-file option -.\" pid-file option: mysql.server \fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR .sp The path name of the file in which the server should write its process ID\&. @@ -328,8 +320,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql.server: service-startup-timeout option -.\" service-startup-timeout option: mysql.server \fB\-\-service\-startup\-timeout=\fR\fB\fIseconds\fR\fR .sp How long in seconds to wait for confirmation of server startup\&. If the server does not start within this time, diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index 24b54c5839c1..1cc1d818bfa4 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 02/29/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "02/29/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "05/13/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_client_test -.\" mysql_client_test_embedded .SH "NAME" mysql_client_test \- test client API .br @@ -68,8 +66,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: help option -.\" help option: mysql_client_test \fB\-\-help\fR, \fB\-?\fR .sp @@ -85,8 +81,6 @@ Display a help message and exit\&. .IP \(bu 2.3 .\} \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR, -.\" mysql_client_test: basedir option -.\" basedir option: mysql_client_test \fB\-b \fR\fB\fIdir_name\fR\fR .sp The base directory for the tests\&. @@ -101,8 +95,6 @@ The base directory for the tests\&. .IP \(bu 2.3 .\} \fB\-\-count=\fR\fB\fIcount\fR\fR, -.\" mysql_client_test: count option -.\" count option: mysql_client_test \fB\-t \fR\fB\fIcount\fR\fR .sp The number of times to execute the tests\&. @@ -116,8 +108,6 @@ The number of times to execute the tests\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: database option -.\" database option: mysql_client_test \fB\-\-database=\fR\fB\fIdb_name\fR\fR, \fB\-D \fR\fB\fIdb_name\fR\fR .sp @@ -132,8 +122,6 @@ The database to use\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: debug option -.\" debug option: mysql_client_test \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-#[\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -152,8 +140,6 @@ value is .IP \(bu 2.3 .\} \fB\-\-getopt\-ll\-test=\fR\fB\fIoption\fR\fR, -.\" mysql_client_test: getopt-ll-test option -.\" getopt-ll-test option: mysql_client_test \fB\-g \fR\fB\fIoption\fR\fR .sp Option to use for testing bugs in the @@ -169,8 +155,6 @@ library\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: host option -.\" host option: mysql_client_test \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -185,8 +169,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: password option -.\" password option: mysql_client_test \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -195,8 +177,6 @@ The password to use when connecting to the server\&. If you use the short option have a space between the option and the password\&. If you omit the \fIpassword\fR value following the -.\" mysql_client_test: password option -.\" password option: mysql_client_test \fB\-\-password\fR or \fB\-p\fR @@ -211,8 +191,6 @@ option on the command line, you are prompted for one\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: port option -.\" port option: mysql_client_test \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -228,8 +206,6 @@ The TCP/IP port number to use for the connection\&. .IP \(bu 2.3 .\} \fB\-\-server\-arg=\fR\fB\fIarg\fR\fR, -.\" mysql_client_test: server-arg option -.\" server-arg option: mysql_client_test \fB\-A \fR\fB\fIarg\fR\fR .sp Argument to send to the embedded server\&. @@ -257,8 +233,6 @@ Show all test names\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: silent option -.\" silent option: mysql_client_test \fB\-\-silent\fR, \fB\-s\fR .sp @@ -273,8 +247,6 @@ Be more silent\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: socket option -.\" socket option: mysql_client_test \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -308,8 +280,6 @@ may optionally behave in a different way than if called manually, for example by .sp -1 .IP \(bu 2.3 .\} -.\" mysql_client_test: user option -.\" user option: mysql_client_test \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -325,8 +295,6 @@ The MySQL user name to use when connecting to the server\&. .IP \(bu 2.3 .\} \fB\-v \fR\fB\fIdir_name\fR\fR, -.\" mysql_client_test: vardir option -.\" vardir option: mysql_client_test \fB\-\-vardir=\fR\fB\fIdir_name\fR\fR .sp The data directory for tests\&. The default is diff --git a/man/mysql_client_test_embedded.1 b/man/mysql_client_test_embedded.1 index 21d9d77b002b..44fb517331e2 100644 --- a/man/mysql_client_test_embedded.1 +++ b/man/mysql_client_test_embedded.1 @@ -1 +1 @@ -.so man/mysql_client_test.1 +.so mysql_client_test.1 diff --git a/man/mysql_config.1 b/man/mysql_config.1 index 8144e5efa859..e4764f27a1e8 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_config .SH "NAME" mysql_config \- display options for compiling clients .SH "SYNOPSIS" @@ -49,8 +48,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: cflags option -.\" cflags option: mysql_config \fB\-\-cflags\fR .sp Compiler flags to find include files and critical compiler flags and defines used when compiling the @@ -68,8 +65,6 @@ for more portable options that contain only include paths\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: include option -.\" include option: mysql_config \fB\-\-include\fR .sp Compiler options to find MySQL include files\&. @@ -83,10 +78,6 @@ Compiler options to find MySQL include files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: libmysqld-libs option -.\" libmysqld-libs option: mysql_config -.\" mysql_config: embedded option -.\" embedded option: mysql_config \fB\-\-libmysqld\-libs\fR, \fB\-\-embedded\fR .sp @@ -101,8 +92,6 @@ Libraries and options required to link with the MySQL embedded server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: libs option -.\" libs option: mysql_config \fB\-\-libs\fR .sp Libraries and options required to link with the MySQL client library\&. @@ -116,8 +105,6 @@ Libraries and options required to link with the MySQL client library\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: libs_r option -.\" libs_r option: mysql_config \fB\-\-libs_r\fR .sp Libraries and options required to link with the thread\-safe MySQL client library\&. In MySQL 5\&.5, all client libraries are thread\-safe, so this option need not be used\&. The @@ -133,8 +120,6 @@ option can be used in all cases\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: plugindir option -.\" plugindir option: mysql_config \fB\-\-plugindir\fR .sp The default plugin directory path name, defined when configuring MySQL\&. @@ -148,8 +133,6 @@ The default plugin directory path name, defined when configuring MySQL\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: port option -.\" port option: mysql_config \fB\-\-port\fR .sp The default TCP/IP port number, defined when configuring MySQL\&. @@ -163,8 +146,6 @@ The default TCP/IP port number, defined when configuring MySQL\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: socket option -.\" socket option: mysql_config \fB\-\-socket\fR .sp The default Unix socket file, defined when configuring MySQL\&. @@ -178,8 +159,6 @@ The default Unix socket file, defined when configuring MySQL\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: variable option -.\" variable option: mysql_config \fB\-\-variable=\fR\fB\fIvar_name\fR\fR .sp Display the value of the named configuration variable\&. Permitted @@ -201,8 +180,6 @@ plugindir .sp -1 .IP \(bu 2.3 .\} -.\" mysql_config: version option -.\" version option: mysql_config \fB\-\-version\fR .sp Version number for the MySQL distribution\&. diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 index bce1bd75ee3a..fdaf6582b427 100644 --- a/man/mysql_convert_table_format.1 +++ b/man/mysql_convert_table_format.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_convert_table_format\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONVERT_TAB" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONVERT_TAB" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_convert_table_format .SH "NAME" mysql_convert_table_format \- convert tables to use a given storage engine .SH "SYNOPSIS" @@ -75,8 +74,6 @@ supports the options described in the following list\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: help option -.\" help option: mysql_convert_table_format \fB\-\-help\fR .sp Display a help message and exit\&. @@ -90,8 +87,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: force option -.\" force option: mysql_convert_table_format \fB\-\-force\fR .sp Continue even if errors occur\&. @@ -105,8 +100,6 @@ Continue even if errors occur\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: host option -.\" host option: mysql_convert_table_format \fB\-\-host=\fR\fB\fIhost_name\fR\fR .sp Connect to the MySQL server on the given host\&. @@ -120,8 +113,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: password option -.\" password option: mysql_convert_table_format \fB\-\-password=\fR\fB\fIpassword\fR\fR .sp The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. @@ -138,8 +129,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: port option -.\" port option: mysql_convert_table_format \fB\-\-port=\fR\fB\fIport_num\fR\fR .sp The TCP/IP port number to use for the connection\&. @@ -153,8 +142,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: socket option -.\" socket option: mysql_convert_table_format \fB\-\-socket=\fR\fB\fIpath\fR\fR .sp For connections to @@ -169,8 +156,6 @@ localhost, the Unix socket file to use\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: type option -.\" type option: mysql_convert_table_format \fB\-\-type=\fR\fB\fIengine_name\fR\fR .sp Specify the storage engine that the tables should be converted to use\&. The default is @@ -186,8 +171,6 @@ if this option is not given\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: user option -.\" user option: mysql_convert_table_format \fB\-\-user=\fR\fB\fIuser_name\fR\fR .sp The MySQL user name to use when connecting to the server\&. @@ -201,8 +184,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: verbose option -.\" verbose option: mysql_convert_table_format \fB\-\-verbose\fR .sp Verbose mode\&. Print more information about what the program does\&. @@ -216,8 +197,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_convert_table_format: version option -.\" version option: mysql_convert_table_format \fB\-\-version\fR .sp Display version information and exit\&. diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 index b6a089877893..274947a30280 100644 --- a/man/mysql_find_rows.1 +++ b/man/mysql_find_rows.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_find_rows\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIND_ROWS\F" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_find_rows .SH "NAME" mysql_find_rows \- extract SQL statements from files .SH "SYNOPSIS" @@ -86,8 +85,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" mysql_find_rows: help option -.\" help option: mysql_find_rows \fB\-\-help\fR, \fB\-\-Information\fR .sp @@ -102,8 +99,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_find_rows: regexp option -.\" regexp option: mysql_find_rows \fB\-\-regexp=\fR\fB\fIpattern\fR\fR .sp Display queries that match the pattern\&. @@ -117,8 +112,6 @@ Display queries that match the pattern\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_find_rows: rows option -.\" rows option: mysql_find_rows \fB\-\-rows=\fR\fB\fIN\fR\fR .sp Quit after displaying @@ -134,8 +127,6 @@ queries\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_find_rows: skip-use-db option -.\" skip-use-db option: mysql_find_rows \fB\-\-skip\-use\-db\fR .sp Do not include @@ -151,8 +142,6 @@ statements in the output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_find_rows: start_row option -.\" start_row option: mysql_find_rows \fB\-\-start_row=\fR\fB\fIN\fR\fR .sp Start output from this row\&. diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 index f3c90249ad55..88eaf25ad0f0 100644 --- a/man/mysql_fix_extensions.1 +++ b/man/mysql_fix_extensions.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_fix_extensions\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIX_EXTENSI" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_fix_extensions .SH "NAME" mysql_fix_extensions \- normalize table file name extensions .SH "SYNOPSIS" diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index ed48b40cfe5c..b47115f1fe27 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_install_db .SH "NAME" mysql_install_db \- initialize MySQL data directory .SH "SYNOPSIS" @@ -130,8 +129,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: help option -.\" help option: mysql_install_db \fB\-\-help\fR .sp Display a help message and exit\&. @@ -145,8 +142,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: basedir option -.\" basedir option: mysql_install_db \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. @@ -160,8 +155,6 @@ The path to the MySQL installation directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: builddir option -.\" builddir option: mysql_install_db \fB\-\-builddir=\fR\fB\fIdir_name\fR\fR .sp For use with @@ -177,8 +170,6 @@ and out\-of\-source builds\&. Set this to the location of the directory where th .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: cross-bootstrap option -.\" cross-bootstrap option: mysql_install_db \fB\-\-cross\-bootstrap\fR .sp For internal use\&. This option is used for building system tables on one host intended for another\&. @@ -192,8 +183,6 @@ For internal use\&. This option is used for building system tables on one host i .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: datadir option -.\" datadir option: mysql_install_db \fB\-\-datadir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL data directory\&. @@ -207,7 +196,6 @@ The path to the MySQL data directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" defaults-extra-file option \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -223,7 +211,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" defaults-file option \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. @@ -239,8 +226,6 @@ is interpreted relative to the current directory if given as a relative path nam .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: force option -.\" force option: mysql_install_db \fB\-\-force\fR .sp Cause @@ -256,8 +241,6 @@ to run even if DNS does not work\&. Grant table entries normally created using h .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: ldata option -.\" ldata option: mysql_install_db \fB\-\-ldata=\fR\fB\fIdir_name\fR\fR .sp A synonym for @@ -272,7 +255,6 @@ A synonym for .sp -1 .IP \(bu 2.3 .\} -.\" no-defaults option \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -288,8 +270,6 @@ can be used to prevent them from being read\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: rpm option -.\" rpm option: mysql_install_db \fB\-\-rpm\fR .sp For internal use\&. This option is used during the MySQL installation process for install operations performed using RPM packages\&. @@ -303,8 +283,6 @@ For internal use\&. This option is used during the MySQL installation process fo .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: skip-name-resolve option -.\" skip-name-resolve option: mysql_install_db \fB\-\-skip\-name\-resolve\fR .sp Use IP addresses rather than host names when creating grant table entries\&. This option can be useful if your DNS does not work\&. @@ -318,8 +296,6 @@ Use IP addresses rather than host names when creating grant table entries\&. Thi .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: srcdir option -.\" srcdir option: mysql_install_db \fB\-\-srcdir=\fR\fB\fIdir_name\fR\fR .sp For internal use\&. This option specifies the directory under which @@ -335,8 +311,6 @@ looks for support files such as the error message file and the file for populati .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: user option -.\" user option: mysql_install_db \fB\-\-user=\fR\fB\fIuser_name\fR\fR .sp The system (login) user name to use for running @@ -357,8 +331,6 @@ runs using your current login name and files and directories that it creates wil .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: verbose option -.\" verbose option: mysql_install_db \fB\-\-verbose\fR .sp Verbose mode\&. Print more information about what the program does\&. @@ -372,8 +344,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_install_db: windows option -.\" windows option: mysql_install_db \fB\-\-windows\fR .sp For internal use\&. This option is used for creating Windows distributions\&. diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index 98f253281854..110517d25a14 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_plugin .SH "NAME" mysql_plugin \- configure MySQL server plugins .SH "SYNOPSIS" @@ -62,7 +61,7 @@ Section\ \&5.1.8.1, \(lqInstalling and Uninstalling Plugins\(rq\&. .PP Each invocation of \fBmysql_plugin\fR -reads a configuration file to determine how to configure the plugins contained in a single plugin library object file\&. To invoke +reads a configuration file to determine how to configure the plugins contained in a single plugin library file\&. To invoke \fBmysql_plugin\fR, use this syntax: .sp .if n \{\ @@ -120,7 +119,7 @@ plugin3 .PP The first line in the myplugins\&.ini -file is the name of the library object file, without any extension such as +file is the name of the library file, without any extension such as \&.so or \&.dll\&. The remaining lines are the names of the components to be enabled or disabled\&. Each value in the file should be on a separate line\&. Lines on which the first character is @@ -174,8 +173,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: help option -.\" help option: mysql_plugin \fB\-\-help\fR, \fB\-?\fR .sp @@ -190,8 +187,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: basedir option -.\" basedir option: mysql_plugin \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR, \fB\-b \fR\fB\fIdir_name\fR\fR .sp @@ -206,8 +201,6 @@ The server base directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: datadir option -.\" datadir option: mysql_plugin \fB\-\-datadir=\fR\fB\fIdir_name\fR\fR, \fB\-d \fR\fB\fIdir_name\fR\fR .sp @@ -222,8 +215,6 @@ The server data directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: my-print-defaults option -.\" my-print-defaults option: mysql_plugin \fB\-\-my\-print\-defaults=\fR\fB\fIfile_name\fR\fR, \fB\-b \fR\fB\fIfile_name\fR\fR .sp @@ -240,8 +231,6 @@ program\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: mysqld option -.\" mysqld option: mysql_plugin \fB\-\-mysqld=\fR\fB\fIfile_name\fR\fR, \fB\-b \fR\fB\fIfile_name\fR\fR .sp @@ -258,8 +247,6 @@ server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: no-defaults option -.\" no-defaults option: mysql_plugin \fB\-\-no\-defaults\fR, \fB\-p\fR .sp @@ -278,8 +265,6 @@ With .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: plugin-dir option -.\" plugin-dir option: mysql_plugin \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR, \fB\-p \fR\fB\fIdir_name\fR\fR .sp @@ -294,8 +279,6 @@ The server plugin directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: plugin-ini option -.\" plugin-ini option: mysql_plugin \fB\-\-plugin\-ini=\fR\fB\fIfile_name\fR\fR, \fB\-i \fR\fB\fIfile_name\fR\fR .sp @@ -318,8 +301,6 @@ argument on the command line\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: print-defaults option -.\" print-defaults option: mysql_plugin \fB\-\-print\-defaults\fR, \fB\-P\fR .sp @@ -344,8 +325,6 @@ With .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: verbose option -.\" verbose option: mysql_plugin \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -360,8 +339,6 @@ Verbose mode\&. Print more information about what the program does\&. This optio .sp -1 .IP \(bu 2.3 .\} -.\" mysql_plugin: version option -.\" version option: mysql_plugin \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index 8c9a9b43d829..4f3bedd82ab7 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_secure_installation .SH "NAME" mysql_secure_installation \- improve MySQL installation security .SH "SYNOPSIS" diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 index eebdf875240a..7855bf3602c5 100644 --- a/man/mysql_setpermission.1 +++ b/man/mysql_setpermission.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_setpermission\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SETPERMISSI" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SETPERMISSI" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_setpermission .SH "NAME" mysql_setpermission \- interactively set permissions in grant tables .SH "SYNOPSIS" @@ -84,8 +83,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" mysql_setpermission: help option -.\" help option: mysql_setpermission \fB\-\-help\fR .sp Display a help message and exit\&. @@ -99,8 +96,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_setpermission: host option -.\" host option: mysql_setpermission \fB\-\-host=\fR\fB\fIhost_name\fR\fR .sp Connect to the MySQL server on the given host\&. @@ -114,8 +109,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_setpermission: password option -.\" password option: mysql_setpermission \fB\-\-password=\fR\fB\fIpassword\fR\fR .sp The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. @@ -132,8 +125,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysql_setpermission: port option -.\" port option: mysql_setpermission \fB\-\-port=\fR\fB\fIport_num\fR\fR .sp The TCP/IP port number to use for the connection\&. @@ -147,8 +138,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_setpermission: socket option -.\" socket option: mysql_setpermission \fB\-\-socket=\fR\fB\fIpath\fR\fR .sp For connections to @@ -163,8 +152,6 @@ localhost, the Unix socket file to use\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_setpermission: user option -.\" user option: mysql_setpermission \fB\-\-user=\fR\fB\fIuser_name\fR\fR .sp The MySQL user name to use when connecting to the server\&. diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index 11e7ac76b64a..089c65254f9c 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_tzinfo_to_sql -.\" time zone tables .SH "NAME" mysql_tzinfo_to_sql \- load the time zone tables .SH "SYNOPSIS" diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index 282c94e522e1..fcd0e8613660 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_upgrade -.\" upgrading MySQL -.\" MySQL: upgrading .SH "NAME" mysql_upgrade \- check and upgrade MySQL tables .SH "SYNOPSIS" @@ -230,8 +227,6 @@ database\&. All checked and repaired tables are marked with the current MySQL version number\&. This ensures that next time you run \fBmysql_upgrade\fR with the same version of the server, it can tell whether there is any need to check or repair the table again\&. -.\" mysql_upgrade_info file: mysql_upgrade -.\" mysql_upgrade: mysql_upgrade_info file .PP \fBmysql_upgrade\fR also saves the MySQL version number in a file named @@ -261,8 +256,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: help option -.\" help option: mysql_upgrade \fB\-\-help\fR .sp Display a short help message and exit\&. @@ -276,8 +269,6 @@ Display a short help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: basedir option -.\" basedir option: mysql_upgrade \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. This option is accepted for backward compatibility but ignored\&. It is removed in MySQL 5\&.7\&. @@ -291,8 +282,6 @@ The path to the MySQL installation directory\&. This option is accepted for back .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: character-sets-dir option -.\" character-sets-dir option: mysql_upgrade \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -307,8 +296,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: compress option -.\" compress option: mysql_upgrade \fB\-\-compress\fR .sp Compress all information sent between the client and the server if both support compression\&. @@ -322,8 +309,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: datadir option -.\" datadir option: mysql_upgrade \fB\-\-datadir=\fR\fB\fIdir_name\fR\fR .sp The path to the data directory\&. This option is accepted for backward compatibility but ignored\&. It is removed in MySQL 5\&.7\&. @@ -337,8 +322,6 @@ The path to the data directory\&. This option is accepted for backward compatibi .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: debug option -.\" debug option: mysql_upgrade \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -357,8 +340,6 @@ d:t:O,/tmp/mysql_upgrade\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: debug-check option -.\" debug-check option: mysql_upgrade \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -372,8 +353,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: debug-info option -.\" debug-info option: mysql_upgrade \fB\-\-debug\-info\fR, \fB\-T\fR .sp @@ -388,8 +367,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: default-auth option -.\" default-auth option: mysql_upgrade \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -406,8 +383,6 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: default-character-set option -.\" default-character-set option: mysql_upgrade \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -424,8 +399,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: defaults-extra-file option -.\" defaults-extra-file option: mysql_upgrade \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -441,8 +414,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: defaults-file option -.\" defaults-file option: mysql_upgrade \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -458,8 +429,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: defaults-group-suffix option -.\" defaults-group-suffix option: mysql_upgrade \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -488,8 +457,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: force option -.\" force option: mysql_upgrade \fB\-\-force\fR .sp Ignore the @@ -507,8 +474,6 @@ has already been executed for the current version of MySQL\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: host option -.\" host option: mysql_upgrade \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -523,8 +488,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: no-defaults option -.\" no-defaults option: mysql_upgrade \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -540,8 +503,6 @@ can be used to prevent them from being read\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: password option -.\" password option: mysql_upgrade \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -569,8 +530,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: pipe option -.\" pipe option: mysql_upgrade \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -585,8 +544,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: plugin-dir option -.\" plugin-dir option: mysql_upgrade \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -607,8 +564,6 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: port option -.\" port option: mysql_upgrade \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -623,8 +578,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: print-defaults option -.\" print-defaults option: mysql_upgrade \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -638,8 +591,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: protocol option -.\" protocol option: mysql_upgrade \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -654,8 +605,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: shared-memory-base-name option -.\" shared-memory-base-name option: mysql_upgrade \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -674,8 +623,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: socket option -.\" socket option: mysql_upgrade \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -691,8 +638,6 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: SSL options -.\" SSL options: mysql_upgrade \fB\-\-ssl*\fR .sp Options that begin with @@ -709,8 +654,6 @@ Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: tmpdir option -.\" tmpdir option: mysql_upgrade \fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, \fB\-t \fR\fB\fIdir_name\fR\fR .sp @@ -725,8 +668,6 @@ The path name of the directory to use for creating temporary files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: upgrade-system-tables option -.\" upgrade-system-tables option: mysql_upgrade \fB\-\-upgrade\-system\-tables\fR, \fB\-s\fR .sp @@ -741,8 +682,6 @@ Upgrade only the system tables, do not upgrade data\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: user option -.\" user option: mysql_upgrade \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -758,8 +697,6 @@ root\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: verbose option -.\" verbose option: mysql_upgrade \fB\-\-verbose\fR .sp Verbose mode\&. Print more information about what the program does\&. @@ -773,8 +710,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: version-check option -.\" version-check option: mysql_upgrade \fB\-\-version\-check\fR, \fB\-k\fR .sp @@ -796,8 +731,6 @@ exits\&. This option is enabled by default; to disable the check, use .sp -1 .IP \(bu 2.3 .\} -.\" mysql_upgrade: write-binlog option -.\" write-binlog option: mysql_upgrade \fB\-\-write\-binlog\fR .sp Cause binary logging to be enabled while diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 index edce9004b1a4..4f151da9560a 100644 --- a/man/mysql_waitpid.1 +++ b/man/mysql_waitpid.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_waitpid\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_WAITPID\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_WAITPID\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_waitpid .SH "NAME" mysql_waitpid \- kill process and wait for its termination .SH "SYNOPSIS" @@ -86,8 +85,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" mysql_waitpid: help option -.\" help option: mysql_waitpid \fB\-\-help\fR, \fB\-?\fR, \fB\-I\fR @@ -103,8 +100,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysql_waitpid: verbose option -.\" verbose option: mysql_waitpid \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -119,8 +114,6 @@ Verbose mode\&. Display a warning if signal 0 could not be used and signal 1 is .sp -1 .IP \(bu 2.3 .\} -.\" mysql_waitpid: version option -.\" version option: mysql_waitpid \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 index 48db04c7fb08..a6794b0753bb 100644 --- a/man/mysql_zap.1 +++ b/man/mysql_zap.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysql_zap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_ZAP\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_ZAP\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysql_zap .SH "NAME" mysql_zap \- kill processes that match a pattern .SH "SYNOPSIS" diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index 1dc75d5c5e05..8b8ab467aa73 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlaccess\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLACCESS\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLACCESS\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlaccess .SH "NAME" mysqlaccess \- client for checking access privileges .SH "SYNOPSIS" @@ -73,8 +72,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: help option -.\" help option: mysqlaccess \fB\-\-help\fR, \fB\-?\fR .sp @@ -89,8 +86,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: brief option -.\" brief option: mysqlaccess \fB\-\-brief\fR, \fB\-b\fR .sp @@ -105,8 +100,6 @@ Generate reports in single\-line tabular format\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: commit option -.\" commit option: mysqlaccess \fB\-\-commit\fR .sp Copy the new access privileges from the temporary tables to the original grant tables\&. The grant tables must be flushed for the new privileges to take effect\&. (For example, execute a @@ -122,8 +115,6 @@ command\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: copy option -.\" copy option: mysqlaccess \fB\-\-copy\fR .sp Reload the temporary grant tables from original ones\&. @@ -137,8 +128,6 @@ Reload the temporary grant tables from original ones\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: db option -.\" db option: mysqlaccess \fB\-\-db=\fR\fB\fIdb_name\fR\fR, \fB\-d \fR\fB\fIdb_name\fR\fR .sp @@ -153,8 +142,6 @@ Specify the database name\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: debug option -.\" debug option: mysqlaccess \fB\-\-debug=\fR\fB\fIN\fR\fR .sp Specify the debug level\&. @@ -170,8 +157,6 @@ can be an integer from 0 to 3\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: host option -.\" host option: mysqlaccess \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -186,8 +171,6 @@ The host name to use in the access privileges\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: howto option -.\" howto option: mysqlaccess \fB\-\-howto\fR .sp Display some examples that show how to use @@ -202,8 +185,6 @@ Display some examples that show how to use .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: old_server option -.\" old_server option: mysqlaccess \fB\-\-old_server\fR .sp Assume that the server is an old MySQL server (before MySQL 3\&.21) that does not yet know how to handle full @@ -219,8 +200,6 @@ clauses\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: password option -.\" password option: mysqlaccess \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -246,8 +225,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: plan option -.\" plan option: mysqlaccess \fB\-\-plan\fR .sp Display suggestions and ideas for future releases\&. @@ -261,8 +238,6 @@ Display suggestions and ideas for future releases\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: preview option -.\" preview option: mysqlaccess \fB\-\-preview\fR .sp Show the privilege differences after making changes to the temporary grant tables\&. @@ -276,8 +251,6 @@ Show the privilege differences after making changes to the temporary grant table .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: relnotes option -.\" relnotes option: mysqlaccess \fB\-\-relnotes\fR .sp Display the release notes\&. @@ -291,8 +264,6 @@ Display the release notes\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: rhost option -.\" rhost option: mysqlaccess \fB\-\-rhost=\fR\fB\fIhost_name\fR\fR, \fB\-H \fR\fB\fIhost_name\fR\fR .sp @@ -307,8 +278,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: rollback option -.\" rollback option: mysqlaccess \fB\-\-rollback\fR .sp Undo the most recent changes to the temporary grant tables\&. @@ -322,8 +291,6 @@ Undo the most recent changes to the temporary grant tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: spassword option -.\" spassword option: mysqlaccess \fB\-\-spassword[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-P[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -349,8 +316,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: superuser option -.\" superuser option: mysqlaccess \fB\-\-superuser=\fR\fB\fIuser_name\fR\fR, \fB\-U \fR\fB\fIuser_name\fR\fR .sp @@ -365,8 +330,6 @@ Specify the user name for connecting as the superuser\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: table option -.\" table option: mysqlaccess \fB\-\-table\fR, \fB\-t\fR .sp @@ -381,8 +344,6 @@ Generate reports in table format\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: user option -.\" user option: mysqlaccess \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -397,8 +358,6 @@ The user name to use in the access privileges\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlaccess: version option -.\" version option: mysqlaccess \fB\-\-version\fR, \fB\-v\fR .sp diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index cad6e58c39e4..528cdc3f0132 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqladmin -.\" administration: server -.\" server administration .SH "NAME" mysqladmin \- client for administering a MySQL server .SH "SYNOPSIS" @@ -449,8 +446,6 @@ Open tables: 19 Queries per second avg: 0\&.0268 .if n \{\ .RE .\} -.sp -.\" status command: results .PP The \fBmysqladmin status\fR @@ -464,7 +459,6 @@ command result displays the following values: .sp -1 .IP \(bu 2.3 .\} -.\" uptime Uptime .sp The number of seconds the MySQL server has been running\&. @@ -478,7 +472,6 @@ The number of seconds the MySQL server has been running\&. .sp -1 .IP \(bu 2.3 .\} -.\" threads Threads .sp The number of active threads (clients)\&. @@ -492,7 +485,6 @@ The number of active threads (clients)\&. .sp -1 .IP \(bu 2.3 .\} -.\" questions Questions .sp The number of questions (queries) from clients since the server was started\&. @@ -506,13 +498,12 @@ The number of questions (queries) from clients since the server was started\&. .sp -1 .IP \(bu 2.3 .\} -.\" slow queries Slow queries .sp The number of queries that have taken more than long_query_time seconds\&. See -Section\ \&5.2.5, \(lqThe Slow Query Log\(rq\&. +Section\ \&5.4.5, \(lqThe Slow Query Log\(rq\&. .RE .sp .RS 4 @@ -523,7 +514,6 @@ Section\ \&5.2.5, \(lqThe Slow Query Log\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" opens Opens .sp The number of tables the server has opened\&. @@ -537,8 +527,6 @@ The number of tables the server has opened\&. .sp -1 .IP \(bu 2.3 .\} -.\" flush tables -.\" tables: flush Flush tables .sp The number of @@ -556,7 +544,6 @@ commands the server has executed\&. .sp -1 .IP \(bu 2.3 .\} -.\" open tables Open tables .sp The number of tables that currently are open\&. @@ -570,7 +557,6 @@ The number of tables that currently are open\&. .sp -1 .IP \(bu 2.3 .\} -.\" memory use Memory in use .sp The amount of memory allocated directly by @@ -586,7 +572,6 @@ safemalloc, which is available only before MySQL 5\&.5\&.6\&. .sp -1 .IP \(bu 2.3 .\} -.\" maximum memory used Maximum memory used .sp The maximum amount of memory allocated directly by @@ -599,10 +584,6 @@ If you execute when connecting to a local server using a Unix socket file, \fBmysqladmin\fR waits until the server\*(Aqs process ID file has been removed, to ensure that the server has stopped properly\&. -.\" mysqladmin command options -.\" command options: mysqladmin -.\" options: command-line: mysqladmin -.\" startup parameters: mysqladmin .PP \fBmysqladmin\fR supports the following options, which can be specified on the command line or in the @@ -620,8 +601,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: help option -.\" help option: mysqladmin \fB\-\-help\fR, \fB\-?\fR .sp @@ -636,8 +615,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: bind-address option -.\" bind-address option: mysqladmin \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -655,8 +632,6 @@ that is supplied with MySQL Cluster\&. It is not available in standard MySQL Ser .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: character-sets-dir option -.\" character-sets-dir option: mysqladmin \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -671,8 +646,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: compress option -.\" compress option: mysqladmin \fB\-\-compress\fR, \fB\-C\fR .sp @@ -687,8 +660,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: count option -.\" count option: mysqladmin \fB\-\-count=\fR\fB\fIN\fR\fR, \fB\-c \fR\fB\fIN\fR\fR .sp @@ -705,8 +676,6 @@ option is given\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: debug option -.\" debug option: mysqladmin \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -725,8 +694,6 @@ d:t:o,/tmp/mysqladmin\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: debug-check option -.\" debug-check option: mysqladmin \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -740,8 +707,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: debug-info option -.\" debug-info option: mysqladmin \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -755,8 +720,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: default-auth option -.\" default-auth option: mysqladmin \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -773,8 +736,6 @@ This option was added in MySQL 5\&.5\&.9\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: default-character-set option -.\" default-character-set option: mysqladmin \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -791,8 +752,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: defaults-extra-file option -.\" defaults-extra-file option: mysqladmin \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -808,8 +767,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: defaults-file option -.\" defaults-file option: mysqladmin \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -825,8 +782,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: defaults-group-suffix option -.\" defaults-group-suffix option: mysqladmin \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -855,8 +810,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysqladmin \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the @@ -873,8 +826,6 @@ Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: force option -.\" force option: mysqladmin \fB\-\-force\fR, \fB\-f\fR .sp @@ -891,8 +842,6 @@ command\&. With multiple commands, continue even if an error occurs\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: host option -.\" host option: mysqladmin \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -907,8 +856,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: no-beep option -.\" no-beep option: mysqladmin \fB\-\-no\-beep\fR, \fB\-b\fR .sp @@ -923,8 +870,6 @@ Suppress the warning beep that is emitted by default for errors such as a failur .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: no-defaults option -.\" no-defaults option: mysqladmin \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -940,8 +885,6 @@ can be used to prevent them from being read\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: password option -.\" password option: mysqladmin \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -969,8 +912,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: pipe option -.\" pipe option: mysqladmin \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -985,8 +926,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: plugin-dir option -.\" plugin-dir option: mysqladmin \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -1007,8 +946,6 @@ This option was added in MySQL 5\&.5\&.9\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: port option -.\" port option: mysqladmin \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -1023,8 +960,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: print-defaults option -.\" print-defaults option: mysqladmin \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -1038,8 +973,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: protocol option -.\" protocol option: mysqladmin \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -1054,8 +987,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: relative option -.\" relative option: mysqladmin \fB\-\-relative\fR, \fB\-r\fR .sp @@ -1074,8 +1005,6 @@ command\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: shared-memory-base-name option -.\" shared-memory-base-name option: mysqladmin \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -1094,8 +1023,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: silent option -.\" silent option: mysqladmin \fB\-\-silent\fR, \fB\-s\fR .sp @@ -1110,8 +1037,6 @@ Exit silently if a connection to the server cannot be established\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: sleep option -.\" sleep option: mysqladmin \fB\-\-sleep=\fR\fB\fIdelay\fR\fR, \fB\-i \fR\fB\fIdelay\fR\fR .sp @@ -1134,8 +1059,6 @@ executes commands indefinitely until interrupted\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: socket option -.\" socket option: mysqladmin \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -1151,8 +1074,6 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: SSL options -.\" SSL options: mysqladmin \fB\-\-ssl*\fR .sp Options that begin with @@ -1169,8 +1090,6 @@ Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: user option -.\" user option: mysqladmin \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -1185,8 +1104,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: verbose option -.\" verbose option: mysqladmin \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -1201,8 +1118,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: version option -.\" version option: mysqladmin \fB\-\-version\fR, \fB\-V\fR .sp @@ -1217,8 +1132,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: vertical option -.\" vertical option: mysqladmin \fB\-\-vertical\fR, \fB\-E\fR .sp @@ -1234,8 +1147,6 @@ Print output vertically\&. This is similar to .sp -1 .IP \(bu 2.3 .\} -.\" mysqladmin: wait option -.\" wait option: mysqladmin \fB\-\-wait[=\fR\fB\fIcount\fR\fR\fB]\fR, \fB\-w[\fR\fB\fIcount\fR\fR\fB]\fR .sp @@ -1258,8 +1169,6 @@ format is deprecated and was removed in MySQL 5\&.5\&.3\&. syntax: .sp -1 .IP \(bu 2.3 .\} -.\" connect_timeout variable -.\" timeout: connect_timeout variable connect_timeout .sp The maximum number of seconds before connection timeout\&. The default value is 43200 (12 hours)\&. @@ -1273,8 +1182,6 @@ The maximum number of seconds before connection timeout\&. The default value is .sp -1 .IP \(bu 2.3 .\} -.\" shutdown_timeout variable -.\" timeout: shutdown_timeout variable shutdown_timeout .sp The maximum number of seconds to wait for server shutdown\&. The default value is 3600 (1 hour)\&. diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index 83f51e0cca81..914107c60069 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlbinlog .SH "NAME" mysqlbinlog \- utility for processing binary log files .SH "SYNOPSIS" @@ -42,7 +41,7 @@ that describe modifications to database contents\&. The server writes these file utility\&. You can also use \fBmysqlbinlog\fR to display the contents of relay log files written by a slave server in a replication setup because relay logs have the same format as binary logs\&. The binary log and relay log are discussed further in -Section\ \&5.2.4, \(lqThe Binary Log\(rq, and +Section\ \&5.4.4, \(lqThe Binary Log\(rq, and Section\ \&17.2.2, \(lqReplication Relay and Status Logs\(rq\&. .PP Invoke @@ -168,8 +167,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: help option -.\" help option: mysqlbinlog \fB\-\-help\fR, \fB\-?\fR .sp @@ -184,8 +181,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: base64-output option -.\" base64-output option: mysqlbinlog \fB\-\-base64\-output[=\fR\fB\fIvalue\fR\fR\fB]\fR .sp This option determines when events should be displayed encoded as base\-64 strings using @@ -319,8 +314,6 @@ the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: bind-address option -.\" bind-address option: mysqlbinlog \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -336,8 +329,6 @@ This option is supported beginning with MySQL 5\&.5\&.8\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: character-sets-dir option -.\" character-sets-dir option: mysqlbinlog \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -352,8 +343,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: database option -.\" database option: mysqlbinlog \fB\-\-database=\fR\fB\fIdb_name\fR\fR, \fB\-d \fR\fB\fIdb_name\fR\fR .sp @@ -471,8 +460,7 @@ INSERT statements following USE db2\&. .PP -\fBRow-based logging\fR. -\fBmysqlbinlog\fR +\fBRow-based logging\fR. \fBmysqlbinlog\fR outputs only entries that change tables belonging to \fIdb_name\fR\&. The default database has no effect on this\&. Suppose that the binary log just described was created using row\-based logging rather than statement\-based logging\&. \fBmysqlbinlog \-\-database=test\fR @@ -517,8 +505,6 @@ Prior to MySQL Cluster NDB 7\&.2\&.2, this option did not work correctly with My .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: debug option -.\" debug option: mysqlbinlog \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -537,8 +523,6 @@ d:t:o,/tmp/mysqlbinlog\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: debug-check option -.\" debug-check option: mysqlbinlog \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -552,8 +536,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: debug-info option -.\" debug-info option: mysqlbinlog \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -567,8 +549,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: default-auth option -.\" default-auth option: mysqlbinlog \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -585,8 +565,6 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: defaults-extra-file option -.\" defaults-extra-file option: mysqlbinlog \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -602,8 +580,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: defaults-file option -.\" defaults-file option: mysqlbinlog \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -619,8 +595,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: defaults-group-suffix option -.\" defaults-group-suffix option: mysqlbinlog \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -649,8 +623,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: disable-log-bin option -.\" disable-log-bin option: mysqlbinlog \fB\-\-disable\-log\-bin\fR, \fB\-D\fR .sp @@ -679,8 +651,6 @@ privilege\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: force-if-open option -.\" force-if-open option: mysqlbinlog \fB\-\-force\-if\-open\fR, \fB\-F\fR .sp @@ -695,8 +665,6 @@ Read binary log files even if they are open or were not closed properly\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: force-read option -.\" force-read option: mysqlbinlog \fB\-\-force\-read\fR, \fB\-f\fR .sp @@ -715,8 +683,6 @@ stops if it reads such an event\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: hexdump option -.\" hexdump option: mysqlbinlog \fB\-\-hexdump\fR, \fB\-H\fR .sp @@ -732,8 +698,6 @@ the section called \(lqMYSQLBINLOG HEX DUMP FORMAT\(rq\&. The hex output can be .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: host option -.\" host option: mysqlbinlog \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -748,8 +712,6 @@ Get the binary log from the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: local-load option -.\" local-load option: mysqlbinlog \fB\-\-local\-load=\fR\fB\fIdir_name\fR\fR, \fB\-l \fR\fB\fIdir_name\fR\fR .sp @@ -783,8 +745,6 @@ or any other MySQL program\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: no-defaults option -.\" no-defaults option: mysqlbinlog \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -800,8 +760,6 @@ can be used to prevent them from being read\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: offset option -.\" offset option: mysqlbinlog \fB\-\-offset=\fR\fB\fIN\fR\fR, \fB\-o \fR\fB\fIN\fR\fR .sp @@ -818,8 +776,6 @@ entries in the log\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: password option -.\" password option: mysqlbinlog \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -847,8 +803,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: plugin-dir option -.\" plugin-dir option: mysqlbinlog \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -869,8 +823,6 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: port option -.\" port option: mysqlbinlog \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -885,8 +837,6 @@ The TCP/IP port number to use for connecting to a remote server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: position option -.\" position option: mysqlbinlog \fB\-\-position=\fR\fB\fIN\fR\fR .sp Deprecated\&. Use @@ -904,8 +854,6 @@ was removed in MySQL 5\&.5\&.3\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: print-defaults option -.\" print-defaults option: mysqlbinlog \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -919,8 +867,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: protocol option -.\" protocol option: mysqlbinlog \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -935,8 +881,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: read-from-remote-server option -.\" read-from-remote-server option: mysqlbinlog \fB\-\-read\-from\-remote\-server\fR, \fB\-R\fR .sp @@ -959,8 +903,6 @@ This option requires that the remote server be running\&. It works only for bina .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: result-file option -.\" result-file option: mysqlbinlog \fB\-\-result\-file=\fR\fB\fIname\fR\fR, \fB\-r \fR\fB\fIname\fR\fR .sp @@ -975,8 +917,6 @@ Direct output to the given file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: server-id option -.\" server-id option: mysqlbinlog \fB\-\-server\-id=\fR\fB\fIid\fR\fR .sp Display only those events created by the server having the given server ID\&. @@ -990,8 +930,6 @@ Display only those events created by the server having the given server ID\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: server-id-bits option -.\" server-id-bits option: mysqlbinlog \fB\-\-server\-id\-bits=\fR\fB\fIN\fR\fR .sp Use only the first @@ -1019,8 +957,6 @@ supplied with the MySQL Cluster distribution, or built from the MySQL Cluster so .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: set-charset option -.\" set-charset option: mysqlbinlog \fB\-\-set\-charset=\fR\fB\fIcharset_name\fR\fR .sp Add a @@ -1036,8 +972,6 @@ statement to the output to specify the character set to be used for processing l .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: shared-memory-base-name option -.\" shared-memory-base-name option: mysqlbinlog \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -1056,8 +990,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: short-form option -.\" short-form option: mysqlbinlog \fB\-\-short\-form\fR, \fB\-s\fR .sp @@ -1072,8 +1004,6 @@ Display only the statements contained in the log, without any extra information .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: socket option -.\" socket option: mysqlbinlog \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -1089,8 +1019,6 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: start-datetime option -.\" start-datetime option: mysqlbinlog \fB\-\-start\-datetime=\fR\fB\fIdatetime\fR\fR .sp Start reading the binary log at the first event having a timestamp equal to or later than the @@ -1126,8 +1054,6 @@ Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: start-position option -.\" start-position option: mysqlbinlog \fB\-\-start\-position=\fR\fB\fIN\fR\fR, \fB\-j \fR\fB\fIN\fR\fR .sp @@ -1146,8 +1072,6 @@ Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: stop-datetime option -.\" stop-datetime option: mysqlbinlog \fB\-\-stop\-datetime=\fR\fB\fIdatetime\fR\fR .sp Stop reading the binary log at the first event having a timestamp equal to or later than the @@ -1170,8 +1094,6 @@ Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: stop-position option -.\" stop-position option: mysqlbinlog \fB\-\-stop\-position=\fR\fB\fIN\fR\fR .sp Stop reading the binary log at the first event having a position equal to or greater than @@ -1189,8 +1111,6 @@ Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: to-last-log option -.\" to-last-log option: mysqlbinlog \fB\-\-to\-last\-log\fR, \fB\-t\fR .sp @@ -1206,8 +1126,6 @@ Do not stop at the end of the requested binary log from a MySQL server, but rath .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: user option -.\" user option: mysqlbinlog \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -1222,8 +1140,6 @@ The MySQL user name to use when connecting to a remote server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: verbose option -.\" verbose option: mysqlbinlog \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -1245,8 +1161,6 @@ the section called \(lqMYSQLBINLOG ROW EVENT DISPLAY\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlbinlog: version option -.\" version option: mysqlbinlog \fB\-\-version\fR, \fB\-V\fR .sp @@ -1269,7 +1183,6 @@ syntax: .sp -1 .IP \(bu 2.3 .\} -.\" open_files_limit variable open_files_limit .sp Specify the number of open file descriptors to reserve\&. @@ -1867,7 +1780,6 @@ T} .sp 1 .RE .SH "MYSQLBINLOG ROW EVENT DISPLAY" -.\" BINLOG statement: mysqlbinlog output .PP The following examples illustrate how \fBmysqlbinlog\fR diff --git a/man/mysqlbug.1 b/man/mysqlbug.1 index 572395b1d994..511d2d39341f 100644 --- a/man/mysqlbug.1 +++ b/man/mysqlbug.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlbug\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBUG\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBUG\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlbug .SH "NAME" mysqlbug \- generate bug report .SH "SYNOPSIS" diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index a14a780927b5..61f6afe38316 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlcheck -.\" maintenance: tables -.\" repair: tables -.\" tables: maintenance -.\" tables: repair .SH "NAME" mysqlcheck \- a table maintenance program .SH "SYNOPSIS" @@ -215,8 +210,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: help option -.\" help option: mysqlcheck \fB\-\-help\fR, \fB\-?\fR .sp @@ -231,8 +224,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: all-databases option -.\" all-databases option: mysqlcheck \fB\-\-all\-databases\fR, \fB\-A\fR .sp @@ -255,8 +246,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: all-in-1 option -.\" all-in-1 option: mysqlcheck \fB\-\-all\-in\-1\fR, \fB\-1\fR .sp @@ -271,8 +260,6 @@ Instead of issuing a statement for each table, execute a single statement for ea .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: analyze option -.\" analyze option: mysqlcheck \fB\-\-analyze\fR, \fB\-a\fR .sp @@ -287,8 +274,6 @@ Analyze the tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: auto-repair option -.\" auto-repair option: mysqlcheck \fB\-\-auto\-repair\fR .sp If a checked table is corrupted, automatically fix it\&. Any necessary repairs are done after all tables have been checked\&. @@ -302,8 +287,6 @@ If a checked table is corrupted, automatically fix it\&. Any necessary repairs a .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: bind-address option -.\" bind-address option: mysqlcheck \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -321,8 +304,6 @@ that is supplied with MySQL Cluster\&. It is not available in standard MySQL Ser .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: character-sets-dir option -.\" character-sets-dir option: mysqlcheck \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -337,8 +318,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: check option -.\" check option: mysqlcheck \fB\-\-check\fR, \fB\-c\fR .sp @@ -353,8 +332,6 @@ Check the tables for errors\&. This is the default operation\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: check-only-changed option -.\" check-only-changed option: mysqlcheck \fB\-\-check\-only\-changed\fR, \fB\-C\fR .sp @@ -369,8 +346,6 @@ Check only tables that have changed since the last check or that have not been c .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: check-upgrade option -.\" check-upgrade option: mysqlcheck \fB\-\-check\-upgrade\fR, \fB\-g\fR .sp @@ -393,8 +368,6 @@ options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: compress option -.\" compress option: mysqlcheck \fB\-\-compress\fR .sp Compress all information sent between the client and the server if both support compression\&. @@ -408,8 +381,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: databases option -.\" databases option: mysqlcheck \fB\-\-databases\fR, \fB\-B\fR .sp @@ -436,8 +407,6 @@ option\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: debug option -.\" debug option: mysqlcheck \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -456,8 +425,6 @@ d:t:o\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: debug-check option -.\" debug-check option: mysqlcheck \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -471,8 +438,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: debug-info option -.\" debug-info option: mysqlcheck \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -486,8 +451,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: default-character-set option -.\" default-character-set option: mysqlcheck \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -504,8 +467,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: defaults-extra-file option -.\" defaults-extra-file option: mysqlcheck \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -521,8 +482,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: defaults-file option -.\" defaults-file option: mysqlcheck \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -538,8 +497,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: defaults-group-suffix option -.\" defaults-group-suffix option: mysqlcheck \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -568,8 +525,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: extended option -.\" extended option: mysqlcheck \fB\-\-extended\fR, \fB\-e\fR .sp @@ -586,8 +541,6 @@ If you are using this option to repair tables, it runs an extended repair that m .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: default-auth option -.\" default-auth option: mysqlcheck \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -604,8 +557,6 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysqlcheck \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the @@ -624,8 +575,6 @@ This option was added in MySQL 5\&.5\&.47\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: fast option -.\" fast option: mysqlcheck \fB\-\-fast\fR, \fB\-F\fR .sp @@ -640,8 +589,6 @@ Check only tables that have not been closed properly\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: fix-db-names option -.\" fix-db-names option: mysqlcheck \fB\-\-fix\-db\-names\fR .sp Convert database names to 5\&.1 format\&. Only database names that contain special characters are affected\&. @@ -655,8 +602,6 @@ Convert database names to 5\&.1 format\&. Only database names that contain speci .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: fix-table-names option -.\" fix-table-names option: mysqlcheck \fB\-\-fix\-table\-names\fR .sp Convert table names to 5\&.1 format\&. Only table names that contain special characters are affected\&. This option also applies to views\&. @@ -670,8 +615,6 @@ Convert table names to 5\&.1 format\&. Only table names that contain special cha .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: force option -.\" force option: mysqlcheck \fB\-\-force\fR, \fB\-f\fR .sp @@ -686,8 +629,6 @@ Continue even if an SQL error occurs\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: host option -.\" host option: mysqlcheck \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -702,8 +643,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: medium-check option -.\" medium-check option: mysqlcheck \fB\-\-medium\-check\fR, \fB\-m\fR .sp @@ -720,8 +659,6 @@ operation\&. This finds only 99\&.99% of all errors, which should be good enough .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: no-defaults option -.\" no-defaults option: mysqlcheck \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -737,8 +674,6 @@ can be used to prevent them from being read\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: optimize option -.\" optimize option: mysqlcheck \fB\-\-optimize\fR, \fB\-o\fR .sp @@ -753,8 +688,6 @@ Optimize the tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: password option -.\" password option: mysqlcheck \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -782,8 +715,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: pipe option -.\" pipe option: mysql \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -798,8 +729,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: plugin-dir option -.\" plugin-dir option: mysqlcheck \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -820,8 +749,6 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: port option -.\" port option: mysqlcheck \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -836,8 +763,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: print-defaults option -.\" print-defaults option: mysqlcheck \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -851,8 +776,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: protocol option -.\" protocol option: mysqlcheck \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -867,8 +790,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: quick option -.\" quick option: mysqlcheck \fB\-\-quick\fR, \fB\-q\fR .sp @@ -885,8 +806,6 @@ If you are using this option to repair tables, it tries to repair only the index .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: repair option -.\" repair option: mysqlcheck \fB\-\-repair\fR, \fB\-r\fR .sp @@ -901,8 +820,6 @@ Perform a repair that can fix almost anything except unique keys that are not un .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: shared-memory-base-name option -.\" shared-memory-base-name option: mysqlcheck \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -921,8 +838,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: silent option -.\" silent option: mysqlcheck \fB\-\-silent\fR, \fB\-s\fR .sp @@ -937,8 +852,6 @@ Silent mode\&. Print only error messages\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: socket option -.\" socket option: mysqlcheck \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -954,8 +867,6 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: SSL options -.\" SSL options: mysqlcheck \fB\-\-ssl*\fR .sp Options that begin with @@ -972,8 +883,6 @@ Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: tables option -.\" tables option: mysqlcheck \fB\-\-tables\fR .sp Override the @@ -991,8 +900,6 @@ option\&. All name arguments following the option are regarded as table names\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: use-frm option -.\" use-frm option: mysqlcheck \fB\-\-use\-frm\fR .sp For repair operations on @@ -1012,8 +919,6 @@ header is corrupted\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: user option -.\" user option: mysqlcheck \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -1028,8 +933,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: verbose option -.\" verbose option: mysqlcheck \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -1044,8 +947,6 @@ Verbose mode\&. Print information about the various stages of program operation\ .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: version option -.\" version option: mysqlcheck \fB\-\-version\fR, \fB\-V\fR .sp @@ -1060,8 +961,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlcheck: write-binlog option -.\" write-binlog option: mysqlcheck \fB\-\-write\-binlog\fR .sp This option is enabled by default, so that diff --git a/man/mysqld.8 b/man/mysqld.8 index 76084a8b5355..acd60b2beeca 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqld: MySQL server -.\" MySQL server: mysqld .SH "NAME" mysqld \- the MySQL server .SH "SYNOPSIS" diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index d4456170c487..1f8e83b953dd 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,10 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqld_multi -.\" tools: mysqld_multi -.\" scripts -.\" multi mysqld .SH "NAME" mysqld_multi \- manage multiple MySQL servers .SH "SYNOPSIS" @@ -60,7 +56,7 @@ to specify which servers you want to start, stop, or obtain a status report for\ group used for starting \fBmysqld\fR\&. (See, for example, Section\ \&2.10.5, \(lqStarting and Stopping MySQL Automatically\(rq\&.) However, when using multiple servers, it is necessary that each one use its own value for options such as the Unix socket file and TCP/IP port number\&. For more information on which options must be unique per server in a multiple\-server environment, see -Section\ \&5.3, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. +Section\ \&5.5, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. .PP To invoke \fBmysqld_multi\fR, use the following syntax: @@ -155,8 +151,6 @@ searches for option files as follows: .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: no-defaults option -.\" no-defaults option: mysqld_multi With \fB\-\-no\-defaults\fR, no option files are read\&. .RE @@ -169,8 +163,6 @@ With .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: defaults-file option -.\" defaults-file option: mysqld_multi With \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR, only the named file is read\&. .RE @@ -183,8 +175,6 @@ With .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: defaults-extra-file option -.\" defaults-extra-file option: mysqld_multi Otherwise, option files in the standard list of locations are read, including any file named by the \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR option, if one is given\&. (If the option is given multiple times, the last value is used\&.) @@ -230,8 +220,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: help option -.\" help option: mysqld_multi \fB\-\-help\fR .sp Display a help message and exit\&. @@ -245,8 +233,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: config-file option -.\" config-file option: mysqld_multi \fB\-\-config\-file=\fR\fB\fIfile_name\fR\fR .sp This option is deprecated\&. If given, it is treated the same way as @@ -263,8 +249,6 @@ was removed in MySQL 5\&.5\&.3\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: example option -.\" example option: mysqld_multi \fB\-\-example\fR .sp Display a sample option file\&. @@ -278,8 +262,6 @@ Display a sample option file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: log option -.\" log option: mysqld_multi \fB\-\-log=\fR\fB\fIfile_name\fR\fR .sp Specify the name of the log file\&. If the file exists, log output is appended to it\&. @@ -293,8 +275,6 @@ Specify the name of the log file\&. If the file exists, log output is appended t .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: mysqladmin option -.\" mysqladmin option: mysqld_multi \fB\-\-mysqladmin=\fR\fB\fIprog_name\fR\fR .sp The @@ -310,8 +290,6 @@ binary to be used to stop servers\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: mysqld option -.\" mysqld option: mysqld_multi \fB\-\-mysqld=\fR\fB\fIprog_name\fR\fR .sp The @@ -352,8 +330,6 @@ ledir = /opt/local/mysql/libexec .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: no-log option -.\" no-log option: mysqld_multi \fB\-\-no\-log\fR .sp Print log information to @@ -369,8 +345,6 @@ rather than to the log file\&. By default, output goes to the log file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: password option -.\" password option: mysqld_multi \fB\-\-password=\fR\fB\fIpassword\fR\fR .sp The password of the MySQL account to use when invoking @@ -385,8 +359,6 @@ The password of the MySQL account to use when invoking .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: silent option -.\" silent option: mysqld_multi \fB\-\-silent\fR .sp Silent mode; disable warnings\&. @@ -400,8 +372,6 @@ Silent mode; disable warnings\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: tcp-ip option -.\" tcp-ip option: mysqld_multi \fB\-\-tcp\-ip\fR .sp Connect to each MySQL server through the TCP/IP port instead of the Unix socket file\&. (If a socket file is missing, the server might still be running, but accessible only through the TCP/IP port\&.) By default, connections are made using the Unix socket file\&. This option affects @@ -419,8 +389,6 @@ operations\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: user option -.\" user option: mysqld_multi \fB\-\-user=\fR\fB\fIuser_name\fR\fR .sp The user name of the MySQL account to use when invoking @@ -435,8 +403,6 @@ The user name of the MySQL account to use when invoking .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: verbose option -.\" verbose option: mysqld_multi \fB\-\-verbose\fR .sp Be more verbose\&. @@ -450,8 +416,6 @@ Be more verbose\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_multi: version option -.\" version option: mysqld_multi \fB\-\-version\fR .sp Display version information and exit\&. @@ -483,7 +447,7 @@ servers with the same data directory\&. Use separate data directories, unless yo what you are doing\&. Starting multiple servers with the same data directory does \fInot\fR give you extra performance in a threaded system\&. See -Section\ \&5.3, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. +Section\ \&5.5, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index 893a7eea3452..632a745eaeb1 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,9 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqld_safe -.\" tools: mysqld_safe -.\" scripts .SH "NAME" mysqld_safe \- MySQL server startup script .SH "SYNOPSIS" @@ -115,8 +112,6 @@ Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\ .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: help option -.\" help option: mysqld_safe \fB\-\-help\fR .sp Display a help message and exit\&. @@ -130,8 +125,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: basedir option -.\" basedir option: mysqld_safe \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. @@ -145,8 +138,6 @@ The path to the MySQL installation directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: core-file-size option -.\" core-file-size option: mysqld_safe \fB\-\-core\-file\-size=\fR\fB\fIsize\fR\fR .sp The size of the core file that @@ -163,8 +154,6 @@ should be able to create\&. The option value is passed to .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: datadir option -.\" datadir option: mysqld_safe \fB\-\-datadir=\fR\fB\fIdir_name\fR\fR .sp The path to the data directory\&. @@ -178,8 +167,6 @@ The path to the data directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: defaults-extra-file option -.\" defaults-extra-file option: mysqld_safe \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp The name of an option file to be read in addition to the usual option files\&. This must be the first option on the command line if it is used\&. If the file does not exist or is otherwise inaccessible, the server will exit with an error\&. @@ -193,8 +180,6 @@ The name of an option file to be read in addition to the usual option files\&. T .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: defaults-file option -.\" defaults-file option: mysqld_safe \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp The name of an option file to be read instead of the usual option files\&. This must be the first option on the command line if it is used\&. @@ -208,8 +193,6 @@ The name of an option file to be read instead of the usual option files\&. This .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: ledir option -.\" ledir option: mysqld_safe \fB\-\-ledir=\fR\fB\fIdir_name\fR\fR .sp If @@ -225,12 +208,10 @@ cannot find the server, use this option to indicate the path name to the directo .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: log-error option -.\" log-error option: mysqld_safe \fB\-\-log\-error=\fR\fB\fIfile_name\fR\fR .sp Write the error log to the given file\&. See -Section\ \&5.2.2, \(lqThe Error Log\(rq\&. +Section\ \&5.4.2, \(lqThe Error Log\(rq\&. .RE .sp .RS 4 @@ -241,17 +222,29 @@ Section\ \&5.2.2, \(lqThe Error Log\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: malloc-lib option -.\" mysqld option: malloc-lib \fB\-\-malloc\-lib=[\fR\fB\fIlib_name\fR\fR\fB]\fR -.\" memory allocation library -.\" tcmalloc: memory allocation library The name of the library to use for memory allocation instead of the system malloc() library\&. Any library can be used by specifying its path name, but there is a shortcut form to enable use of the tcmalloc library that is shipped with binary MySQL distributions for Linux in MySQL 5\&.5\&. It is possible that the shortcut form will not work under certain configurations, in which case you should specify a path name instead\&. +.if n \{\ .sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +As of MySQL 5\&.5\&.50, MySQL distributions no longer include a +tcmalloc +library\&. +.sp .5v +.RE The \fB\-\-malloc\-lib\fR option works by modifying the @@ -379,8 +372,6 @@ malloc\-lib=/opt/lib/libtcmalloc_minimal\&.so .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: mysqld option -.\" mysqld option: mysqld_safe \fB\-\-mysqld=\fR\fB\fIprog_name\fR\fR .sp The name of the server program (in the @@ -400,8 +391,6 @@ option to indicate the path name to the directory where the server is located\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: mysqld-version option -.\" mysqld-version option: mysqld_safe \fB\-\-mysqld\-version=\fR\fB\fIsuffix\fR\fR .sp This option is similar to the @@ -433,8 +422,6 @@ directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: nice option -.\" nice option: mysqld_safe \fB\-\-nice=\fR\fB\fIpriority\fR\fR .sp Use the @@ -450,8 +437,6 @@ program to set the server\*(Aqs scheduling priority to the given value\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: no-defaults option -.\" no-defaults option: mysqld_safe \fB\-\-no\-defaults\fR .sp Do not read any option files\&. This must be the first option on the command line if it is used\&. @@ -465,8 +450,6 @@ Do not read any option files\&. This must be the first option on the command lin .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: open-files-limit option -.\" open-files-limit option: mysqld_safe \fB\-\-open\-files\-limit=\fR\fB\fIcount\fR\fR .sp The number of files that @@ -502,8 +485,6 @@ for this to function properly\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: pid-file option -.\" pid-file option: mysqld_safe \fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR .sp The path name of the process ID file\&. @@ -517,8 +498,6 @@ The path name of the process ID file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: plugin-dir option -.\" plugin-dir option: mysqld_safe \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The path name of the plugin directory\&. This option was added in MySQL 5\&.5\&.3\&. @@ -532,8 +511,6 @@ The path name of the plugin directory\&. This option was added in MySQL 5\&.5\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: port option -.\" port option: mysqld_safe \fB\-\-port=\fR\fB\fIport_num\fR\fR .sp The port number that the server should use when listening for TCP/IP connections\&. The port number must be 1024 or higher unless the server is started by the @@ -549,8 +526,6 @@ system user\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: skip-kill-mysqld option -.\" skip-kill-mysqld option: mysqld_safe \fB\-\-skip\-kill\-mysqld\fR .sp Do not try to kill stray @@ -566,8 +541,6 @@ processes at startup\&. This option works only on Linux\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: socket option -.\" socket option: mysqld_safe \fB\-\-socket=\fR\fB\fIpath\fR\fR .sp The Unix socket file that the server should use when listening for local connections\&. @@ -581,10 +554,6 @@ The Unix socket file that the server should use when listening for local connect .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: syslog option -.\" syslog option: mysqld_safe -.\" mysqld_safe: skip-syslog option -.\" skip-syslog option: mysqld_safe \fB\-\-syslog\fR, \fB\-\-skip\-syslog\fR .sp @@ -613,8 +582,6 @@ syslog facility/severity is used for all log messages\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: syslog-tag option -.\" syslog-tag option: mysqld_safe \fB\-\-syslog\-tag=\fR\fB\fItag\fR\fR .sp For logging to @@ -640,8 +607,6 @@ mysqld\-\fItag\fR\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: timezone option -.\" timezone option: mysqld_safe \fB\-\-timezone=\fR\fB\fItimezone\fR\fR .sp Set the @@ -657,8 +622,6 @@ time zone environment variable to the given option value\&. Consult your operati .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: user option -.\" user option: mysqld_safe \fB\-\-user={\fR\fB\fIuser_name\fR\fR\fB|\fR\fB\fIuser_id\fR\fR\fB}\fR .sp Run the diff --git a/man/mysqldump.1 b/man/mysqldump.1 index 2b6b7c20a0ed..e640f9c998cc 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqldump -.\" dumping: databases and tables -.\" backups: databases and tables -.\" databases: dumping -.\" tables: dumping .SH "NAME" mysqldump \- a database backup program .SH "SYNOPSIS" @@ -134,7 +129,7 @@ shell> \fBmysqldump [options] > dump\&.sql\fR .\} .PP However, UTF\-16 is not permitted as a connection character set (see -Section\ \&10.1.4, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the +Section\ \&10.1.5, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the \fB\-\-result\-file\fR option, which creates the output in ASCII format: .sp @@ -428,8 +423,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: help option -.\" help option: mysqldump \fB\-\-help\fR, \fB\-?\fR .sp @@ -444,8 +437,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: add-drop-database option -.\" add-drop-database option: mysqldump \fB\-\-add\-drop\-database\fR .sp Write a @@ -469,8 +460,6 @@ statements are written unless one of those options is specified\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: add-drop-table option -.\" add-drop-table option: mysqldump \fB\-\-add\-drop\-table\fR .sp Write a @@ -488,8 +477,6 @@ statement\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: add-drop-trigger option -.\" add-drop-trigger option: mysqldump \fB\-\-add\-drop\-trigger\fR .sp Write a @@ -524,8 +511,6 @@ as supplied with MySQL Cluster\&. It is not available when using MySQL Server 5\ .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: add-locks option -.\" add-locks option: mysqldump \fB\-\-add\-locks\fR .sp Surround each table dump with @@ -544,8 +529,6 @@ Section\ \&8.2.2.1, \(lqSpeed of INSERT Statements\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: all-databases option -.\" all-databases option: mysqldump \fB\-\-all\-databases\fR, \fB\-A\fR .sp @@ -562,8 +545,6 @@ option and naming all the databases on the command line\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: all-tablespaces option -.\" all-tablespaces option: mysqldump \fB\-\-all\-tablespaces\fR, \fB\-Y\fR .sp @@ -581,8 +562,6 @@ table\&. This information is not otherwise included in the output from .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: allow-keywords option -.\" allow-keywords option: mysqldump \fB\-\-allow\-keywords\fR .sp Permit creation of column names that are keywords\&. This works by prefixing each column name with the table name\&. @@ -596,8 +575,6 @@ Permit creation of column names that are keywords\&. This works by prefixing eac .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: apply-slave-statements option -.\" apply-slave-statements option: mysqldump \fB\-\-apply\-slave\-statements\fR .sp For a slave dump produced with the @@ -619,8 +596,6 @@ statement at the end of the output\&. This option was added in MySQL 5\&.5\&.3\& .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: bind-address option -.\" bind-address option: mysqldump \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -638,8 +613,6 @@ that is supplied with MySQL Cluster\&. It is not available in standard MySQL Ser .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: character-sets-dir option -.\" character-sets-dir option: mysqldump \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -654,8 +627,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: comments option -.\" comments option: mysqldump \fB\-\-comments\fR, \fB\-i\fR .sp @@ -671,8 +642,6 @@ Write additional information in the dump file such as program version, server ve .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: compact option -.\" compact option: mysqldump \fB\-\-compact\fR .sp Produce more compact output\&. This option enables the @@ -692,8 +661,6 @@ options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: compatible option -.\" compatible option: mysqldump \fB\-\-compatible=\fR\fB\fIname\fR\fR .sp Produce output that is more compatible with other database systems or with older MySQL servers\&. The value of @@ -727,8 +694,6 @@ does not map data types to Oracle types or use Oracle comment syntax\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: complete-insert option -.\" complete-insert option: mysqldump \fB\-\-complete\-insert\fR, \fB\-c\fR .sp @@ -745,8 +710,6 @@ statements that include column names\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: compress option -.\" compress option: mysqldump \fB\-\-compress\fR, \fB\-C\fR .sp @@ -761,8 +724,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: create-options option -.\" create-options option: mysqldump \fB\-\-create\-options\fR .sp Include all MySQL\-specific table options in the @@ -778,8 +739,6 @@ statements\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: databases option -.\" databases option: mysqldump \fB\-\-databases\fR, \fB\-B\fR .sp @@ -800,8 +759,6 @@ statements are included in the output before each new database\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: debug option -.\" debug option: mysqldump \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -820,8 +777,6 @@ d:t:o,/tmp/mysqldump\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: debug-check option -.\" debug-check option: mysqldump \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -835,8 +790,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: debug-info option -.\" debug-info option: mysqldump \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -850,8 +803,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: default-auth option -.\" default-auth option: mysqldump \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -868,8 +819,6 @@ This option was added in MySQL 5\&.5\&.9\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: default-character-set option -.\" default-character-set option: mysqldump \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -889,8 +838,6 @@ utf8\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: defaults-extra-file option -.\" defaults-extra-file option: mysqldump \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -906,8 +853,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: defaults-file option -.\" defaults-file option: mysqldump \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -923,8 +868,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: defaults-group-suffix option -.\" defaults-group-suffix option: mysqldump \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -953,8 +896,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: delayed-insert option -.\" delayed-insert option: mysqldump \fB\-\-delayed\-insert\fR .sp Write @@ -972,8 +913,6 @@ statements\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: delete-master-logs option -.\" delete-master-logs option: mysqldump \fB\-\-delete\-master\-logs\fR .sp On a master replication server, delete the binary logs by sending a @@ -990,8 +929,6 @@ statement to the server after performing the dump operation\&. This option autom .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: disable-keys option -.\" disable-keys option: mysqldump \fB\-\-disable\-keys\fR, \fB\-K\fR .sp @@ -1014,8 +951,6 @@ tables\&. It has no effect for other tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: dump-date option -.\" dump-date option: mysqldump \fB\-\-dump\-date\fR .sp If the @@ -1053,8 +988,6 @@ suppresses date printing\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: dump-slave option -.\" dump-slave option: mysqldump \fB\-\-dump\-slave[=\fR\fB\fIvalue\fR\fR\fB]\fR .sp This option is similar to @@ -1100,8 +1033,6 @@ This option was added in MySQL 5\&.5\&.3\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: events option -.\" events option: mysqldump \fB\-\-events\fR, \fB\-E\fR .sp @@ -1118,8 +1049,6 @@ privileges for those databases\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: extended-insert option -.\" extended-insert option: mysqldump \fB\-\-extended\-insert\fR, \fB\-e\fR .sp @@ -1138,17 +1067,9 @@ lists\&. This results in a smaller dump file and speeds up inserts when the file .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: fields-terminated-by option -.\" fields-terminated-by option: mysqldump \fB\-\-fields\-terminated\-by=\&.\&.\&.\fR, -.\" mysqldump: fields-enclosed-by option -.\" fields-enclosed-by option: mysqldump \fB\-\-fields\-enclosed\-by=\&.\&.\&.\fR, -.\" mysqldump: fields-optionally-enclosed-by option -.\" fields-optionally-enclosed-by option: mysqldump \fB\-\-fields\-optionally\-enclosed\-by=\&.\&.\&.\fR, -.\" mysqldump: fields-escaped-by option -.\" fields-escaped-by option: mysqldump \fB\-\-fields\-escaped\-by=\&.\&.\&.\fR .sp These options are used with the @@ -1168,8 +1089,6 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: first-slave option -.\" first-slave option: mysqldump \fB\-\-first\-slave\fR .sp Deprecated\&. Use @@ -1187,8 +1106,6 @@ was removed in MySQL 5\&.5\&.3\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: flush-logs option -.\" flush-logs option: mysqldump \fB\-\-flush\-logs\fR, \fB\-F\fR .sp @@ -1216,8 +1133,6 @@ together with .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: flush-privileges option -.\" flush-privileges option: mysqldump \fB\-\-flush\-privileges\fR .sp Add a @@ -1239,8 +1154,6 @@ database for proper restoration\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: force option -.\" force option: mysqldump \fB\-\-force\fR, \fB\-f\fR .sp @@ -1265,8 +1178,6 @@ prints the error message, but it also writes an SQL comment containing the view .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysqldump \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the @@ -1285,8 +1196,6 @@ This option was added in MySQL 5\&.5\&.47\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: host option -.\" host option: mysqldump \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -1302,8 +1211,6 @@ localhost\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: hex-blob option -.\" hex-blob option: mysqldump \fB\-\-hex\-blob\fR .sp Dump binary columns using hexadecimal notation (for example, @@ -1325,8 +1232,6 @@ BIT\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: include-master-host-port option -.\" include-master-host-port option: mysqldump \fB\-\-include\-master\-host\-port\fR .sp For the @@ -1348,8 +1253,6 @@ options for the host name and TCP/IP port number of the slave\*(Aqs master\&. Th .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: ignore-table option -.\" ignore-table option: mysqldump \fB\-\-ignore\-table=\fR\fB\fIdb_name\&.tbl_name\fR\fR .sp Do not dump the given table, which must be specified using both the database and table names\&. To ignore multiple tables, use this option multiple times\&. This option also can be used to ignore views\&. @@ -1363,8 +1266,6 @@ Do not dump the given table, which must be specified using both the database and .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: insert-ignore option -.\" insert-ignore option: mysqldump \fB\-\-insert\-ignore\fR .sp Write @@ -1382,8 +1283,6 @@ statements\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: lines-terminated-by option -.\" lines-terminated-by option: mysqldump \fB\-\-lines\-terminated\-by=\&.\&.\&.\fR .sp This option is used with the @@ -1403,8 +1302,6 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: lock-all-tables option -.\" lock-all-tables option: mysqldump \fB\-\-lock\-all\-tables\fR, \fB\-x\fR .sp @@ -1422,8 +1319,6 @@ and .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: lock-tables option -.\" lock-tables option: mysqldump \fB\-\-lock\-tables\fR, \fB\-l\fR .sp @@ -1457,8 +1352,6 @@ at the end of the option list\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: log-error option -.\" log-error option: mysqldump \fB\-\-log\-error=\fR\fB\fIfile_name\fR\fR .sp Log warnings and errors by appending them to the named file\&. The default is to do no logging\&. @@ -1472,8 +1365,6 @@ Log warnings and errors by appending them to the named file\&. The default is to .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: master-data option -.\" master-data option: mysqldump \fB\-\-master\-data[=\fR\fB\fIvalue\fR\fR\fB]\fR .sp Use this option to dump a master replication server to produce a dump file that can be used to set up another server as a slave of the master\&. It causes the dump output to include a @@ -1658,8 +1549,6 @@ to point the slave to the correct master server host\&. Add any such parameters .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-autocommit option -.\" no-autocommit option: mysqldump \fB\-\-no\-autocommit\fR .sp Enclose the @@ -1679,8 +1568,6 @@ statements\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-create-db option -.\" no-create-db option: mysqldump \fB\-\-no\-create\-db\fR, \fB\-n\fR .sp @@ -1701,8 +1588,6 @@ option is given\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-create-info option -.\" no-create-info option: mysqldump \fB\-\-no\-create\-info\fR, \fB\-t\fR .sp @@ -1740,8 +1625,6 @@ option for this purpose\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-data option -.\" no-data option: mysqldump \fB\-\-no\-data\fR, \fB\-d\fR .sp @@ -1758,8 +1641,6 @@ statement for the table (for example, to create an empty copy of the table by lo .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-defaults option -.\" no-defaults option: mysqldump \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -1775,8 +1656,6 @@ can be used to prevent them from being read\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-set-names option -.\" no-set-names option: mysqldump \fB\-\-no\-set\-names\fR, \fB\-N\fR .sp @@ -1792,8 +1671,6 @@ This has the same effect as .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: no-tablespaces option -.\" no-tablespaces option: mysqldump \fB\-\-no\-tablespaces\fR, \fB\-y\fR .sp @@ -1813,8 +1690,6 @@ statements in the output of .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: opt option -.\" opt option: mysqldump \fB\-\-opt\fR .sp This option is shorthand\&. It is the same as specifying @@ -1840,8 +1715,6 @@ See the discussion at the beginning of this section for information about select .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: order-by-primary option -.\" order-by-primary option: mysqldump \fB\-\-order\-by\-primary\fR .sp Dump each table\*(Aqs rows sorted by its primary key, or by its first unique index, if such an index exists\&. This is useful when dumping a @@ -1859,8 +1732,6 @@ table, but will make the dump operation take considerably longer\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: password option -.\" password option: mysqldump \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -1888,8 +1759,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: pipe option -.\" pipe option: mysqldump \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -1904,8 +1773,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: plugin-dir option -.\" plugin-dir option: mysqldump \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -1926,8 +1793,6 @@ This option was added in MySQL 5\&.5\&.9\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: port option -.\" port option: mysqldump \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -1942,8 +1807,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: print-defaults option -.\" print-defaults option: mysqldump \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -1957,8 +1820,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: protocol option -.\" protocol option: mysqldump \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -1973,8 +1834,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: quick option -.\" quick option: mysqldump \fB\-\-quick\fR, \fB\-q\fR .sp @@ -1991,8 +1850,6 @@ to retrieve rows for a table from the server a row at a time rather than retriev .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: quote-names option -.\" quote-names option: mysqldump \fB\-\-quote\-names\fR, \fB\-Q\fR .sp @@ -2017,8 +1874,6 @@ that may enable .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: replace option -.\" replace option: mysqldump \fB\-\-replace\fR .sp Write @@ -2036,8 +1891,6 @@ statements\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: result-file option -.\" result-file option: mysqldump \fB\-\-result\-file=\fR\fB\fIfile_name\fR\fR, \fB\-r \fR\fB\fIfile_name\fR\fR .sp @@ -2058,8 +1911,6 @@ carriage return/newline sequences\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: routines option -.\" routines option: mysqldump \fB\-\-routines\fR, \fB\-R\fR .sp @@ -2097,8 +1948,6 @@ option\&. (Bug #11760384, Bug #52792) .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: set-charset option -.\" set-charset option: mysqldump \fB\-\-set\-charset\fR .sp Write @@ -2117,8 +1966,6 @@ statement, use .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: shared-memory-base-name option -.\" shared-memory-base-name option: mysqldump \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -2137,8 +1984,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: single-transaction option -.\" single-transaction option: mysqldump \fB\-\-single\-transaction\fR .sp This option sets the transaction isolation mode to @@ -2202,8 +2047,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: skip-comments option -.\" skip-comments option: mysqldump \fB\-\-skip\-comments\fR .sp See the description for the @@ -2219,8 +2062,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: skip-opt option -.\" skip-opt option: mysqldump \fB\-\-skip\-opt\fR .sp See the description for the @@ -2236,8 +2077,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: socket option -.\" socket option: mysqldump \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -2253,8 +2092,6 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: SSL options -.\" SSL options: mysqldump \fB\-\-ssl*\fR .sp Options that begin with @@ -2271,8 +2108,6 @@ Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: tab option -.\" tab option: mysqldump \fB\-\-tab=\fR\fB\fIdir_name\fR\fR, \fB\-T \fR\fB\fIdir_name\fR\fR .sp @@ -2333,8 +2168,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: tables option -.\" tables option: mysqldump \fB\-\-tables\fR .sp Override the @@ -2354,12 +2187,14 @@ regards all name arguments following the option as table names\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: triggers option -.\" triggers option: mysqldump \fB\-\-triggers\fR .sp Include triggers for each dumped table in the output\&. This option is enabled by default; disable it with \fB\-\-skip\-triggers\fR\&. +.sp +To be able to dump a table\*(Aqs triggers, you must have the +TRIGGER +privilege for the table\&. .RE .sp .RS 4 @@ -2370,8 +2205,6 @@ Include triggers for each dumped table in the output\&. This option is enabled b .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: tz-utc option -.\" tz-utc option: mysqldump \fB\-\-tz\-utc\fR .sp This option enables @@ -2398,8 +2231,6 @@ is enabled by default\&. To disable it, use .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: user option -.\" user option: mysqldump \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -2414,8 +2245,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: verbose option -.\" verbose option: mysqldump \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -2430,8 +2259,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: version option -.\" version option: mysqldump \fB\-\-version\fR, \fB\-V\fR .sp @@ -2446,8 +2273,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: where option -.\" where option: mysqldump \fB\-\-where=\*(Aq\fR\fB\fIwhere_condition\fR\fR\fB\*(Aq\fR, \fB\-w \*(Aq\fR\fB\fIwhere_condition\fR\fR\fB\*(Aq\fR .sp @@ -2478,8 +2303,6 @@ Examples: .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: xml option -.\" xml option: mysqldump \fB\-\-xml\fR, \fB\-X\fR .sp @@ -2725,7 +2548,7 @@ statement is issued, the MySQL server may get stalled until those statements fin For point\-in\-time recovery (also known as \(lqroll\-forward,\(rq when you need to restore an old backup and replay the changes that happened since that backup), it is often useful to rotate the binary log (see -Section\ \&5.2.4, \(lqThe Binary Log\(rq) or at least know the binary log coordinates to which the dump corresponds: +Section\ \&5.4.4, \(lqThe Binary Log\(rq) or at least know the binary log coordinates to which the dump corresponds: .sp .if n \{\ .RS 4 @@ -2761,9 +2584,6 @@ storage engine\&. For more information on making backups, see Section\ \&7.2, \(lqDatabase Backup Methods\(rq, and Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. -.\" mysqldump: views -.\" mysqldump: problems -.\" mysqldump: workarounds .PP If you encounter problems backing up views, please read the section that covers restrictions on views which describes a workaround for backing up views when this fails due to insufficient privileges\&. See Section\ \&C.5, \(lqRestrictions on Views\(rq\&. diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index 197e151a27ee..5931da9ec40d 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqldumpslow .SH "NAME" mysqldumpslow \- Summarize slow query log files .SH "SYNOPSIS" @@ -36,7 +35,7 @@ mysqldumpslow \- Summarize slow query log files .SH "DESCRIPTION" .PP The MySQL slow query log contains information about queries that take a long time to execute (see -Section\ \&5.2.5, \(lqThe Slow Query Log\(rq)\&. +Section\ \&5.4.5, \(lqThe Slow Query Log\(rq)\&. \fBmysqldumpslow\fR parses MySQL slow query log files and prints a summary of their contents\&. .PP @@ -79,8 +78,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldumpslow: help option -.\" help option: mysqldumpslow \fB\-\-help\fR .sp Display a help message and exit\&. @@ -110,8 +107,6 @@ and strings to .sp -1 .IP \(bu 2.3 .\} -.\" mysqldumpslow: debug option -.\" debug option: mysqldumpslow \fB\-\-debug\fR, \fB\-d\fR .sp @@ -294,8 +289,6 @@ queries in the output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldumpslow: verbose option -.\" verbose option: mysqldumpslow \fB\-\-verbose\fR, \fB\-v\fR .sp diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 index 03b3ed94235e..5bdfe0d86bf4 100644 --- a/man/mysqlhotcopy.1 +++ b/man/mysqlhotcopy.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlhotcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLHOTCOPY\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLHOTCOPY\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlhotcopy -.\" dumping: databases and tables -.\" backups: databases and tables -.\" databases: dumping -.\" tables: dumping .SH "NAME" mysqlhotcopy \- a database backup program .SH "SYNOPSIS" @@ -124,8 +119,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: help option -.\" help option: mysqlhotcopy \fB\-\-help\fR, \fB\-?\fR .sp @@ -140,8 +133,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: addtodest option -.\" addtodest option: mysqlhotcopy \fB\-\-addtodest\fR .sp Do not rename target directory (if it exists); merely add files to it\&. @@ -155,8 +146,6 @@ Do not rename target directory (if it exists); merely add files to it\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: allowold option -.\" allowold option: mysqlhotcopy \fB\-\-allowold\fR .sp Do not abort if a target exists; rename it by adding an @@ -172,8 +161,6 @@ suffix\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: checkpoint option -.\" checkpoint option: mysqlhotcopy \fB\-\-checkpoint=\fR\fB\fIdb_name\fR\fR\fB\&.\fR\fB\fItbl_name\fR\fR .sp Insert checkpoint entries into the specified database @@ -190,8 +177,6 @@ and table .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: chroot option -.\" chroot option: mysqlhotcopy \fB\-\-chroot=\fR\fB\fIdir_name\fR\fR .sp Base directory of the @@ -214,8 +199,6 @@ option given to .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: debug option -.\" debug option: mysqlhotcopy \fB\-\-debug\fR .sp Enable debug output\&. @@ -229,8 +212,6 @@ Enable debug output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: dryrun option -.\" dryrun option: mysqlhotcopy \fB\-\-dryrun\fR, \fB\-n\fR .sp @@ -245,8 +226,6 @@ Report actions without performing them\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: flushlog option -.\" flushlog option: mysqlhotcopy \fB\-\-flushlog\fR .sp Flush logs after all tables are locked\&. @@ -260,8 +239,6 @@ Flush logs after all tables are locked\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: host option -.\" host option: mysqlhotcopy \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -278,8 +255,6 @@ using a Unix socket file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: keepold option -.\" keepold option: mysqlhotcopy \fB\-\-keepold\fR .sp Do not delete previous (renamed) target when done\&. @@ -293,8 +268,6 @@ Do not delete previous (renamed) target when done\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: method option -.\" method option: mysqlhotcopy \fB\-\-method=\fR\fB\fIcommand\fR\fR .sp The method for copying files (cp @@ -311,8 +284,6 @@ cp\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: noindices option -.\" noindices option: mysqlhotcopy \fB\-\-noindices\fR .sp Do not include full index files for @@ -329,8 +300,6 @@ tables in the backup\&. This makes the backup smaller and faster\&. The indexes .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: password option -.\" password option: mysqlhotcopy \fB\-\-password=\fR\fB\fIpassword\fR\fR, \fB\-p\fR\fB\fIpassword\fR\fR .sp @@ -348,8 +317,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: port option -.\" port option: mysqlhotcopy \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -364,8 +331,6 @@ The TCP/IP port number to use when connecting to the local server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: old_server option -.\" old_server option: mysqlhotcopy \fB\-\-old_server\fR .sp As of MySQL 5\&.5\&.3, @@ -385,8 +350,6 @@ option if the server is older than 5\&.5\&.3, which is when that statement was i .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: quiet option -.\" quiet option: mysqlhotcopy \fB\-\-quiet\fR, \fB\-q\fR .sp @@ -401,8 +364,6 @@ Be silent except for errors\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: record_log_pos option -.\" record_log_pos option: mysqlhotcopy \fB\-\-record_log_pos=\fR\fB\fIdb_name\fR\fR\fB\&.\fR\fB\fItbl_name\fR\fR .sp Record master and slave status in the specified database @@ -419,8 +380,6 @@ and table .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: regexp option -.\" regexp option: mysqlhotcopy \fB\-\-regexp=\fR\fB\fIexpr\fR\fR .sp Copy all databases with names that match the given regular expression\&. @@ -434,8 +393,6 @@ Copy all databases with names that match the given regular expression\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: resetmaster option -.\" resetmaster option: mysqlhotcopy \fB\-\-resetmaster\fR .sp Reset the binary log after locking all the tables\&. @@ -449,8 +406,6 @@ Reset the binary log after locking all the tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: resetslave option -.\" resetslave option: mysqlhotcopy \fB\-\-resetslave\fR .sp Reset the @@ -466,8 +421,6 @@ file after locking all the tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: socket option -.\" socket option: mysqlhotcopy \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -483,8 +436,6 @@ localhost\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: suffix option -.\" suffix option: mysqlhotcopy \fB\-\-suffix=\fR\fB\fIstr\fR\fR .sp The suffix to use for names of copied databases\&. @@ -498,8 +449,6 @@ The suffix to use for names of copied databases\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: tmpdir option -.\" tmpdir option: mysqlhotcopy \fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR .sp The temporary directory\&. The default is @@ -514,8 +463,6 @@ The temporary directory\&. The default is .sp -1 .IP \(bu 2.3 .\} -.\" mysqlhotcopy: user option -.\" user option: mysqlhotcopy \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index 436715133d74..79113ed23617 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlimport -.\" importing: data -.\" data: importing -.\" files: text -.\" text files: importing .SH "NAME" mysqlimport \- a data import program .SH "SYNOPSIS" @@ -89,8 +84,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: help option -.\" help option: mysqlimport \fB\-\-help\fR, \fB\-?\fR .sp @@ -118,8 +111,6 @@ database\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: bind-address option -.\" bind-address option: mysqlimport \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -137,8 +128,6 @@ that is supplied with MySQL Cluster\&. It is not available in standard MySQL Ser .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: character-sets-dir option -.\" character-sets-dir option: mysqlimport \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -153,8 +142,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: columns option -.\" columns option: mysqlimport \fB\-\-columns=\fR\fB\fIcolumn_list\fR\fR, \fB\-c \fR\fB\fIcolumn_list\fR\fR .sp @@ -169,8 +156,6 @@ This option takes a comma\-separated list of column names as its value\&. The or .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: compress option -.\" compress option: mysqlimport \fB\-\-compress\fR, \fB\-C\fR .sp @@ -185,8 +170,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: debug option -.\" debug option: mysqlimport \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -205,8 +188,6 @@ d:t:o\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: debug-check option -.\" debug-check option: mysqlimport \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -220,8 +201,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: debug-info option -.\" debug-info option: mysqlimport \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -235,8 +214,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: default-character-set option -.\" default-character-set option: mysqlimport \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -253,8 +230,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: default-auth option -.\" default-auth option: mysqlimport \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -271,8 +246,6 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: defaults-extra-file option -.\" defaults-extra-file option: mysqlimport \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -288,8 +261,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: defaults-file option -.\" defaults-file option: mysqlimport \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -305,8 +276,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: defaults-group-suffix option -.\" defaults-group-suffix option: mysqlimport \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -335,8 +304,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: delete option -.\" delete option: mysqlimport \fB\-\-delete\fR, \fB\-D\fR .sp @@ -351,8 +318,6 @@ Empty the table before importing the text file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysqlimport \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the @@ -371,17 +336,9 @@ This option was added in MySQL 5\&.5\&.47\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: fields-terminated-by option -.\" fields-terminated-by option: mysqldump \fB\-\-fields\-terminated\-by=\&.\&.\&.\fR, -.\" mysqldump: fields-enclosed-by option -.\" fields-enclosed-by option: mysqldump \fB\-\-fields\-enclosed\-by=\&.\&.\&.\fR, -.\" mysqldump: fields-optionally-enclosed-by option -.\" fields-optionally-enclosed-by option: mysqldump \fB\-\-fields\-optionally\-enclosed\-by=\&.\&.\&.\fR, -.\" mysqldump: fields-escaped-by option -.\" fields-escaped-by option: mysqldump \fB\-\-fields\-escaped\-by=\&.\&.\&.\fR .sp These options have the same meaning as the corresponding clauses for @@ -397,8 +354,6 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: force option -.\" force option: mysqlimport \fB\-\-force\fR, \fB\-f\fR .sp @@ -416,8 +371,6 @@ exits if a table does not exist\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: host option -.\" host option: mysqlimport \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -433,8 +386,6 @@ localhost\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: ignore option -.\" ignore option: mysqlimport \fB\-\-ignore\fR, \fB\-i\fR .sp @@ -451,8 +402,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: ignore-lines option -.\" ignore-lines option: mysqlimport \fB\-\-ignore\-lines=\fR\fB\fIN\fR\fR .sp Ignore the first @@ -468,8 +417,6 @@ lines of the data file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: lines-terminated-by option -.\" lines-terminated-by option: mysqldump \fB\-\-lines\-terminated\-by=\&.\&.\&.\fR .sp This option has the same meaning as the corresponding clause for @@ -486,8 +433,6 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: local option -.\" local option: mysqlimport \fB\-\-local\fR, \fB\-L\fR .sp @@ -502,8 +447,6 @@ Read input files locally from the client host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: lock-tables option -.\" lock-tables option: mysqlimport \fB\-\-lock\-tables\fR, \fB\-l\fR .sp @@ -520,8 +463,6 @@ tables for writing before processing any text files\&. This ensures that all tab .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: low-priority option -.\" low-priority option: mysqlimport \fB\-\-low\-priority\fR .sp Use @@ -540,8 +481,6 @@ MERGE)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: no-defaults option -.\" no-defaults option: mysqlimport \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -557,8 +496,6 @@ can be used to prevent them from being read\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: password option -.\" password option: mysqlimport \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -586,8 +523,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: pipe option -.\" pipe option: mysqlimport \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -602,8 +537,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: plugin-dir option -.\" plugin-dir option: mysqlimport \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -624,8 +557,6 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: port option -.\" port option: mysqlimport \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -640,8 +571,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: print-defaults option -.\" print-defaults option: mysqlimport \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -655,8 +584,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: protocol option -.\" protocol option: mysqlimport \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -671,8 +598,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: replace option -.\" replace option: mysqlimport \fB\-\-replace\fR, \fB\-r\fR .sp @@ -693,8 +618,6 @@ options control handling of input rows that duplicate existing rows on unique ke .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: shared-memory-base-name option -.\" shared-memory-base-name option: mysqlimport \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -713,8 +636,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: silent option -.\" silent option: mysqlimport \fB\-\-silent\fR, \fB\-s\fR .sp @@ -729,8 +650,6 @@ Silent mode\&. Produce output only when errors occur\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: socket option -.\" socket option: mysqlimport \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -746,8 +665,6 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: SSL options -.\" SSL options: mysqlimport \fB\-\-ssl*\fR .sp Options that begin with @@ -764,8 +681,6 @@ Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: user option -.\" user option: mysqlimport \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -780,8 +695,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: use-threads option -.\" use-threads option: mysqlimport \fB\-\-use\-threads=\fR\fB\fIN\fR\fR .sp Load files in parallel using @@ -797,8 +710,6 @@ threads\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: verbose option -.\" verbose option: mysqlimport \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -813,8 +724,6 @@ Verbose mode\&. Print more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlimport: version option -.\" version option: mysqlimport \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index 3bca90ff37e5..a64a9b198855 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,12 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlshow -.\" databases: displaying -.\" displaying: database information -.\" tables: displaying -.\" columns: displaying -.\" showing: database information .SH "NAME" mysqlshow \- display database, table, and column information .SH "SYNOPSIS" @@ -136,8 +130,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: help option -.\" help option: mysqlshow \fB\-\-help\fR, \fB\-?\fR .sp @@ -152,8 +144,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: bind-address option -.\" bind-address option: mysqlshow \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -171,8 +161,6 @@ that is supplied with MySQL Cluster\&. It is not available in standard MySQL Ser .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: character-sets-dir option -.\" character-sets-dir option: mysqlshow \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See @@ -187,8 +175,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: compress option -.\" compress option: mysqlshow \fB\-\-compress\fR, \fB\-C\fR .sp @@ -203,8 +189,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: count option -.\" count option: mysqlshow \fB\-\-count\fR .sp Show the number of rows per table\&. This can be slow for non\-MyISAM @@ -219,8 +203,6 @@ tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: debug option -.\" debug option: mysqlshow \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -239,8 +221,6 @@ d:t:o\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: debug-check option -.\" debug-check option: mysqlshow \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -254,8 +234,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: debug-info option -.\" debug-info option: mysqlshow \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -269,8 +247,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: default-character-set option -.\" default-character-set option: mysqlshow \fB\-\-default\-character\-set=\fR\fB\fIcharset_name\fR\fR .sp Use @@ -287,8 +263,6 @@ Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: default-auth option -.\" default-auth option: mysqlshow \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -305,8 +279,6 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: defaults-extra-file option -.\" defaults-extra-file option: mysqlshow \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -322,8 +294,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: defaults-file option -.\" defaults-file option: mysqlshow \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -339,8 +309,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: defaults-group-suffix option -.\" defaults-group-suffix option: mysqlshow \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -369,8 +337,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysqlshow \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the @@ -389,8 +355,6 @@ This option was added in MySQL 5\&.5\&.47\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: host option -.\" host option: mysqlshow \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -405,8 +369,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: keys option -.\" keys option: mysqlshow \fB\-\-keys\fR, \fB\-k\fR .sp @@ -421,8 +383,6 @@ Show table indexes\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: no-defaults option -.\" no-defaults option: mysqlshow \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -438,8 +398,6 @@ can be used to prevent them from being read\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: password option -.\" password option: mysqlshow \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -467,8 +425,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: pipe option -.\" pipe option: mysqlshow \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -483,8 +439,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: plugin-dir option -.\" plugin-dir option: mysqlshow \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -505,8 +459,6 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: port option -.\" port option: mysqlshow \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -521,8 +473,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: print-defaults option -.\" print-defaults option: mysqlshow \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -536,8 +486,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: protocol option -.\" protocol option: mysqlshow \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -552,8 +500,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: shared-memory-base-name option -.\" shared-memory-base-name option: mysqlshow \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. The default value is @@ -572,8 +518,6 @@ option to enable shared\-memory connections\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: show-table-type option -.\" show-table-type option: mysqlshow \fB\-\-show\-table\-type\fR, \fB\-t\fR .sp @@ -592,8 +536,6 @@ VIEW\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: socket option -.\" socket option: mysqlshow \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -609,8 +551,6 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: SSL options -.\" SSL options: mysqlshow \fB\-\-ssl*\fR .sp Options that begin with @@ -627,8 +567,6 @@ Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: status option -.\" status option: mysqlshow \fB\-\-status\fR, \fB\-i\fR .sp @@ -643,8 +581,6 @@ Display extra information about each table\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: user option -.\" user option: mysqlshow \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -659,8 +595,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: verbose option -.\" verbose option: mysqlshow \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -675,8 +609,6 @@ Verbose mode\&. Print more information about what the program does\&. This optio .sp -1 .IP \(bu 2.3 .\} -.\" mysqlshow: version option -.\" version option: mysqlshow \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index 32aadb18ea71..3df8f11b73ad 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqlslap -.\" load emulation .SH "NAME" mysqlslap \- load emulation client .SH "SYNOPSIS" @@ -173,8 +171,6 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: help option -.\" help option: mysqlslap \fB\-\-help\fR, \fB\-?\fR .sp @@ -189,8 +185,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql option -.\" auto-generate-sql option: mysqlslap \fB\-\-auto\-generate\-sql\fR, \fB\-a\fR .sp @@ -205,8 +199,6 @@ Generate SQL statements automatically when they are not supplied in files or usi .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-add-autoincrement option -.\" auto-generate-sql-add-autoincrement option: mysqlslap \fB\-\-auto\-generate\-sql\-add\-autoincrement\fR .sp Add an @@ -222,8 +214,6 @@ column to automatically generated tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-execute-number option -.\" auto-generate-sql-execute-number option: mysqlslap \fB\-\-auto\-generate\-sql\-execute\-number=\fR\fB\fIN\fR\fR .sp Specify how many queries to generate automatically\&. @@ -237,8 +227,6 @@ Specify how many queries to generate automatically\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-guid-primary option -.\" auto-generate-sql-guid-primary option: mysqlslap \fB\-\-auto\-generate\-sql\-guid\-primary\fR .sp Add a GUID\-based primary key to automatically generated tables\&. @@ -252,8 +240,6 @@ Add a GUID\-based primary key to automatically generated tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-load-type option -.\" auto-generate-sql-load-type option: mysqlslap \fB\-\-auto\-generate\-sql\-load\-type=\fR\fB\fItype\fR\fR .sp Specify the test load type\&. The permissible values are @@ -278,8 +264,6 @@ mixed\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-secondary-indexes option -.\" auto-generate-sql-secondary-indexes option: mysqlslap \fB\-\-auto\-generate\-sql\-secondary\-indexes=\fR\fB\fIN\fR\fR .sp Specify how many secondary indexes to add to automatically generated tables\&. By default, none are added\&. @@ -293,8 +277,6 @@ Specify how many secondary indexes to add to automatically generated tables\&. B .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-unique-query-number option -.\" auto-generate-sql-unique-query-number option: mysqlslap \fB\-\-auto\-generate\-sql\-unique\-query\-number=\fR\fB\fIN\fR\fR .sp How many different queries to generate for automatic tests\&. For example, if you run a @@ -310,8 +292,6 @@ test that performs 1000 selects, you can use this option with a value of 1000 to .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-unique-write-number option -.\" auto-generate-sql-unique-write-number option: mysqlslap \fB\-\-auto\-generate\-sql\-unique\-write\-number=\fR\fB\fIN\fR\fR .sp How many different queries to generate for @@ -326,11 +306,9 @@ How many different queries to generate for .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: auto-generate-sql-write-number option -.\" auto-generate-sql-write-number option: mysqlslap \fB\-\-auto\-generate\-sql\-write\-number=\fR\fB\fIN\fR\fR .sp -How many row inserts to perform on each thread\&. The default is 100\&. +How many row inserts to perform\&. The default is 100\&. .RE .sp .RS 4 @@ -341,8 +319,6 @@ How many row inserts to perform on each thread\&. The default is 100\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: commit option -.\" commit option: mysqlslap \fB\-\-commit=\fR\fB\fIN\fR\fR .sp How many statements to execute before committing\&. The default is 0 (no commits are done)\&. @@ -356,8 +332,6 @@ How many statements to execute before committing\&. The default is 0 (no commits .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: compress option -.\" compress option: mysqlslap \fB\-\-compress\fR, \fB\-C\fR .sp @@ -372,14 +346,10 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: concurrency option -.\" concurrency option: mysqlslap \fB\-\-concurrency=\fR\fB\fIN\fR\fR, \fB\-c \fR\fB\fIN\fR\fR .sp -The number of clients to simulate when issuing the -SELECT -statement\&. +The number of parallel clients to simulate\&. .RE .sp .RS 4 @@ -390,8 +360,6 @@ statement\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: create option -.\" create option: mysqlslap \fB\-\-create=\fR\fB\fIvalue\fR\fR .sp The file or string containing the statement to use for creating the table\&. @@ -405,8 +373,6 @@ The file or string containing the statement to use for creating the table\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: create-schema option -.\" create-schema option: mysqlslap \fB\-\-create\-schema=\fR\fB\fIvalue\fR\fR .sp The schema in which to run the tests\&. @@ -441,8 +407,6 @@ option as well\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: csv option -.\" csv option: mysqlslap \fB\-\-csv[=\fR\fB\fIfile_name\fR\fR\fB]\fR .sp Generate output in comma\-separated values format\&. The output goes to the named file, or to the standard output if no file is given\&. @@ -456,8 +420,6 @@ Generate output in comma\-separated values format\&. The output goes to the name .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: debug option -.\" debug option: mysqlslap \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-# [\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -476,8 +438,6 @@ d:t:o,/tmp/mysqlslap\&.trace\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: debug-check option -.\" debug-check option: mysqlslap \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -491,8 +451,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: debug-info option -.\" debug-info option: mysqlslap \fB\-\-debug\-info\fR, \fB\-T\fR .sp @@ -507,8 +465,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: default-auth option -.\" default-auth option: mysqlslap \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See @@ -525,8 +481,6 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: defaults-extra-file option -.\" defaults-extra-file option: mysqlslap \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp Read this option file after the global option file but (on Unix) before the user option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -542,8 +496,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: defaults-file option -.\" defaults-file option: mysqlslap \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. Before MySQL 5\&.5\&.8, @@ -559,8 +511,6 @@ must be the full path name to the file\&. As of MySQL 5\&.5\&.8, the name is int .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: defaults-group-suffix option -.\" defaults-group-suffix option: mysqlslap \fB\-\-defaults\-group\-suffix=\fR\fB\fIstr\fR\fR .sp Read not only the usual option groups, but also groups with the usual names and a suffix of @@ -589,8 +539,6 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: delimiter option -.\" delimiter option: mysqlslap \fB\-\-delimiter=\fR\fB\fIstr\fR\fR, \fB\-F \fR\fB\fIstr\fR\fR .sp @@ -605,8 +553,6 @@ The delimiter to use in SQL statements supplied in files or using command option .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: detach option -.\" detach option: mysqlslap \fB\-\-detach=\fR\fB\fIN\fR\fR .sp Detach (close and reopen) each connection after each @@ -622,8 +568,6 @@ statements\&. The default is 0 (connections are not detached)\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: enable-cleartext-plugin option -.\" enable-cleartext-plugin option: mysqlslap \fB\-\-enable\-cleartext\-plugin\fR .sp Enable the @@ -640,8 +584,6 @@ Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: engine option -.\" engine option: mysqlslap \fB\-\-engine=\fR\fB\fIengine_name\fR\fR, \fB\-e \fR\fB\fIengine_name\fR\fR .sp @@ -656,8 +598,6 @@ The storage engine to use for creating tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: host option -.\" host option: mysqlslap \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -672,8 +612,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: iterations option -.\" iterations option: mysqlslap \fB\-\-iterations=\fR\fB\fIN\fR\fR, \fB\-i \fR\fB\fIN\fR\fR .sp @@ -688,8 +626,6 @@ The number of times to run the tests\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: no-drop option -.\" no-drop option: mysqlslap \fB\-\-no\-drop\fR .sp Prevent @@ -705,8 +641,6 @@ from dropping any schema it creates during the test run\&. This option was added .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: no-defaults option -.\" no-defaults option: mysqlslap \fB\-\-no\-defaults\fR .sp Do not read any option files\&. If program startup fails due to reading unknown options from an option file, @@ -722,8 +656,6 @@ can be used to prevent them from being read\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: number-char-cols option -.\" number-char-cols option: mysqlslap \fB\-\-number\-char\-cols=\fR\fB\fIN\fR\fR, \fB\-x \fR\fB\fIN\fR\fR .sp @@ -742,8 +674,6 @@ is specified\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: number-int-cols option -.\" number-int-cols option: mysqlslap \fB\-\-number\-int\-cols=\fR\fB\fIN\fR\fR, \fB\-y \fR\fB\fIN\fR\fR .sp @@ -762,8 +692,6 @@ is specified\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: number-of-queries option -.\" number-of-queries option: mysqlslap \fB\-\-number\-of\-queries=\fR\fB\fIN\fR\fR .sp Limit each client to approximately this many queries\&. Query counting takes into account the statement delimiter\&. For example, if you invoke @@ -792,8 +720,6 @@ shell> \fBmysqlslap \-\-delimiter=";" \-\-number\-of\-queries=10\fR .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: only-print option -.\" only-print option: mysqlslap \fB\-\-only\-print\fR .sp Do not connect to databases\&. @@ -809,8 +735,6 @@ only prints what it would have done\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: password option -.\" password option: mysqlslap \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -838,8 +762,6 @@ Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: pipe option -.\" pipe option: mysqlslap \fB\-\-pipe\fR, \fB\-W\fR .sp @@ -854,8 +776,6 @@ On Windows, connect to the server using a named pipe\&. This option applies only .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: plugin-dir option -.\" plugin-dir option: mysqlslap \fB\-\-plugin\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory in which to look for plugins\&. Specify this option if the @@ -876,8 +796,6 @@ This option was added in MySQL 5\&.5\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: port option -.\" port option: mysqlslap \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -892,8 +810,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: post-query option -.\" post-query option: mysqlslap \fB\-\-post\-query=\fR\fB\fIvalue\fR\fR .sp The file or string containing the statement to execute after the tests have completed\&. This execution is not counted for timing purposes\&. @@ -907,8 +823,6 @@ The file or string containing the statement to execute after the tests have comp .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: post-system option -.\" post-system option: mysqlslap \fB\-\-post\-system=\fR\fB\fIstr\fR\fR .sp The string to execute using @@ -924,8 +838,6 @@ after the tests have completed\&. This execution is not counted for timing purpo .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: pre-query option -.\" pre-query option: mysqlslap \fB\-\-pre\-query=\fR\fB\fIvalue\fR\fR .sp The file or string containing the statement to execute before running the tests\&. This execution is not counted for timing purposes\&. @@ -939,8 +851,6 @@ The file or string containing the statement to execute before running the tests\ .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: pre-system option -.\" pre-system option: mysqlslap \fB\-\-pre\-system=\fR\fB\fIstr\fR\fR .sp The string to execute using @@ -956,8 +866,6 @@ before running the tests\&. This execution is not counted for timing purposes\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: print-defaults option -.\" print-defaults option: mysqlslap \fB\-\-print\-defaults\fR .sp Print the program name and all options that it gets from option files\&. @@ -971,8 +879,6 @@ Print the program name and all options that it gets from option files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: protocol option -.\" protocol option: mysqlslap \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see @@ -987,8 +893,6 @@ Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: query option -.\" query option: mysqlslap \fB\-\-query=\fR\fB\fIvalue\fR\fR, \fB\-q \fR\fB\fIvalue\fR\fR .sp @@ -1005,8 +909,6 @@ statement to use for retrieving data\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: shared-memory-base-name option -.\" shared-memory-base-name option: mysqlslap \fB\-\-shared\-memory\-base\-name=\fR\fB\fIname\fR\fR .sp On Windows, the shared\-memory name to use, for connections made using shared memory to a local server\&. This option applies only if the server supports shared\-memory connections\&. @@ -1020,8 +922,6 @@ On Windows, the shared\-memory name to use, for connections made using shared me .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: silent option -.\" silent option: mysqlslap \fB\-\-silent\fR, \fB\-s\fR .sp @@ -1036,8 +936,6 @@ Silent mode\&. No output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: socket option -.\" socket option: mysqlslap \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -1053,8 +951,6 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: SSL options -.\" SSL options: mysqlslap \fB\-\-ssl*\fR .sp Options that begin with @@ -1071,8 +967,6 @@ Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: user option -.\" user option: mysqlslap \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -1087,8 +981,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: verbose option -.\" verbose option: mysqlslap \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -1103,8 +995,6 @@ Verbose mode\&. Print more information about what the program does\&. This optio .sp -1 .IP \(bu 2.3 .\} -.\" mysqlslap: version option -.\" version option: mysqlslap \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/man/mysqltest.1 b/man/mysqltest.1 index 32824ca4273c..e677cd10de73 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 02/29/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "02/29/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "05/13/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" mysqltest -.\" mysqltest_embedded .SH "NAME" mysqltest \- program to run test cases .br @@ -152,8 +150,6 @@ supports the following options: .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: help option -.\" help option: mysqltest \fB\-\-help\fR, \fB\-?\fR .sp @@ -168,8 +164,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: basedir option -.\" basedir option: mysqltest \fB\-\-basedir=\fR\fB\fIdir_name\fR\fR, \fB\-b \fR\fB\fIdir_name\fR\fR .sp @@ -184,8 +178,6 @@ The base directory for tests\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: character-sets-dir option -.\" character-sets-dir option: mysqltest \fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR .sp The directory where character sets are installed\&. @@ -199,8 +191,6 @@ The directory where character sets are installed\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: compress option -.\" compress option: mysqltest \fB\-\-compress\fR, \fB\-C\fR .sp @@ -215,8 +205,6 @@ Compress all information sent between the client and the server if both support .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: currsor-protocol option -.\" cursor-protocol option: mysqltest \fB\-\-cursor\-protocol\fR .sp Use cursors for prepared statements\&. @@ -230,8 +218,6 @@ Use cursors for prepared statements\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: database option -.\" database option: mysqltest \fB\-\-database=\fR\fB\fIdb_name\fR\fR, \fB\-D \fR\fB\fIdb_name\fR\fR .sp @@ -246,8 +232,6 @@ The default database to use\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: debug option -.\" debug option: mysqltest \fB\-\-debug[=\fR\fB\fIdebug_options\fR\fR\fB]\fR, \fB\-#[\fR\fB\fIdebug_options\fR\fR\fB]\fR .sp @@ -265,8 +249,6 @@ value is .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: debug-check option -.\" debug-check option: mysqltest \fB\-\-debug\-check\fR .sp Print some debugging information when the program exits\&. @@ -280,8 +262,6 @@ Print some debugging information when the program exits\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: debug-info option -.\" debug-info option: mysqltest \fB\-\-debug\-info\fR .sp Print debugging information and memory and CPU usage statistics when the program exits\&. @@ -295,8 +275,6 @@ Print debugging information and memory and CPU usage statistics when the program .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: explain-protocol option -.\" explain-protocol option: mysqltest \fB\-\-explain\-protocol\fR, .sp Run @@ -312,8 +290,6 @@ on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: host option -.\" host option: mysqltest \fB\-\-host=\fR\fB\fIhost_name\fR\fR, \fB\-h \fR\fB\fIhost_name\fR\fR .sp @@ -328,8 +304,6 @@ Connect to the MySQL server on the given host\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: include option -.\" include option: mysqltest \fB\-\-include=\fR\fB\fIfile_name\fR\fR, \fB\-i \fR\fB\fIfile_name\fR\fR .sp @@ -348,8 +322,6 @@ command as the first line of the test file\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: json-explain-protocol option -.\" json-explain-protocol option: mysqltest \fB\-\-json\-explain\-protocol\fR, .sp Run @@ -367,8 +339,6 @@ option is available from MySQL 5\&.6\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: logdir option -.\" logdir option: mysqltest \fB\-\-logdir=\fR\fB\fIdir_name\fR\fR .sp The directory to use for log files\&. @@ -382,8 +352,6 @@ The directory to use for log files\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: mark-progress option -.\" mark-progress option: mysqltest \fB\-\-mark\-progress\fR .sp Write the line number and elapsed time to @@ -398,8 +366,6 @@ Write the line number and elapsed time to .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: max-connect-retries option -.\" max-connect-retries option: mysqltest \fB\-\-max\-connect\-retries=\fR\fB\fInum\fR\fR .sp The maximum number of connection attempts when connecting to server\&. @@ -413,8 +379,6 @@ The maximum number of connection attempts when connecting to server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: max-connections option -.\" max-connections option: mysqltest \fB\-\-max\-connections=\fR\fB\fInum\fR\fR .sp The maximum number of simultaneous server connections per client (that is, per test)\&. If not set, the maximum is 128\&. Minimum allowed limit is 8, maximum is 5120\&. @@ -428,8 +392,6 @@ The maximum number of simultaneous server connections per client (that is, per t .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: no-defaults option -.\" no-defaults option: mysqltest \fB\-\-no\-defaults\fR .sp Do not read default options from any option files\&. If used, this must be the first option\&. @@ -443,8 +405,6 @@ Do not read default options from any option files\&. If used, this must be the f .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: plugin-dir option -.\" plugin-dir option: mysqltest \fB\-\-plugin\-dir=\fR\fB\fIpath\fR\fR .sp The directory in which to look for plugins\&. It may be necessary to specify this option if the @@ -464,8 +424,6 @@ does not find it\&. This option was added in MySQL 5\&.5\&.7\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: password option -.\" password option: mysqltest \fB\-\-password[=\fR\fB\fIpassword\fR\fR\fB]\fR, \fB\-p[\fR\fB\fIpassword\fR\fR\fB]\fR .sp @@ -488,8 +446,6 @@ option on the command line, you are prompted for one\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: port option -.\" port option: mysqltest \fB\-\-port=\fR\fB\fIport_num\fR\fR, \fB\-P \fR\fB\fIport_num\fR\fR .sp @@ -504,8 +460,6 @@ The TCP/IP port number to use for the connection\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: protocol option -.\" protocol option: mysqltest \fB\-\-protocol=\fR\fB{TCP|SOCKET|PIPE|MEMORY}\fR .sp Choose the protocol for communication with the server\&. @@ -525,8 +479,6 @@ option is ignored if running with the embedded server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: ps-protocol option -.\" ps-protocol option: mysqltest \fB\-\-ps\-protocol\fR .sp Use the prepared\-statement protocol for communication\&. @@ -540,13 +492,9 @@ Use the prepared\-statement protocol for communication\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: quiet option -.\" quiet option: mysqltest \fB\-\-quiet\fR .sp Suppress all normal output\&. This is a synonym for -.\" mysqltest: silent option -.\" silent option: mysqltest \fB\-\-silent\fR\&. .RE .sp @@ -558,8 +506,6 @@ Suppress all normal output\&. This is a synonym for .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: record option -.\" record option: mysqltest \fB\-\-record\fR, \fB\-r\fR .sp @@ -577,8 +523,6 @@ option, if that option is given\&. It is an error to use this option without als .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: result-file option -.\" result-file option: mysqltest \fB\-\-result\-file=\fR\fB\fIfile_name\fR\fR, \fB\-R \fR\fB\fIfile_name\fR\fR .sp @@ -663,8 +607,6 @@ updates the given file by writing the actual test results to it\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: server-arg option -.\" server-arg option: mysqltest \fB\-\-server\-arg=\fR\fB\fIvalue\fR\fR, \fB\-A \fR\fB\fIvalue\fR\fR .sp @@ -682,8 +624,6 @@ or .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: server-file option -.\" server-file option: mysqltest \fB\-\-server\-file=\fR\fB\fIfile_name\fR\fR, \fB\-F \fR\fB\fIfile_name\fR\fR .sp @@ -698,8 +638,6 @@ Read arguments for the embedded server from the given file\&. The file should co .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: server-public-key-path option -.\" server-public-key-path option: mysqltest \fB\-\-server\-public\-key\-path=\fR\fBfile_name\fR .sp The path name to a file containing the server RSA public key\&. The file must be in PEM format\&. The public key is used for RSA encryption of the client password for connections to the server made using accounts that authenticate with the @@ -727,8 +665,6 @@ and renamed in 5\&.6\&.7 to .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: silent option -.\" silent option: mysqltest \fB\-\-silent\fR, \fB\-s\fR .sp @@ -743,8 +679,6 @@ Suppress all normal output\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: skip-safemalloc option -.\" skip-safemalloc option: mysqltest \fB\-\-skip\-safemalloc\fR .sp Do not use memory allocation checking\&. @@ -758,8 +692,6 @@ Do not use memory allocation checking\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: sleep option -.\" sleep option: mysqltest \fB\-\-sleep=\fR\fB\fInum\fR\fR, \fB\-T \fR\fB\fInum\fR\fR .sp @@ -784,8 +716,6 @@ commands in the test case\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: socket option -.\" socket option: mysqltest \fB\-\-socket=\fR\fB\fIpath\fR\fR, \fB\-S \fR\fB\fIpath\fR\fR .sp @@ -802,8 +732,6 @@ localhost .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: sp-protocol option -.\" sp-protocol option: mysqltest \fB\-\-sp\-protocol\fR .sp Execute DML statements within a stored procedure\&. For every DML statement, @@ -819,8 +747,6 @@ creates and invokes a stored procedure that executes the statement rather than e .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: tail-lines option -.\" tail-lines option: mysqltest \fB\-\-tail\-lines=\fR\fB\fInn\fR\fR .sp Specify how many lines of the result to include in the output if the test fails because an SQL statement fails\&. The default is 0, meaning no lines of result printed\&. @@ -834,8 +760,6 @@ Specify how many lines of the result to include in the output if the test fails .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: test-file option -.\" test-file option: mysqltest \fB\-\-test\-file=\fR\fB\fIfile_name\fR\fR, \fB\-x \fR\fB\fIfile_name\fR\fR .sp @@ -850,8 +774,6 @@ Read test input from this file\&. The default is to read from the standard input .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: timer-file option -.\" timer-file option: mysqltest \fB\-\-timer\-file=\fR\fB\fIfile_name\fR\fR, \fB\-m \fR\fB\fIfile_name\fR\fR .sp @@ -868,8 +790,6 @@ for its reporting\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: tls-version option -.\" tls-version option: mysqltest \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more of these protocols: TLSv1, TLSv1\&.1, TLSv1\&.2\&. (TLSv1\&.2 is supported only if MySQL was compiled using OpenSSL 1\&.0\&.1 or higher\&. It is not supported if MySQL was compiled using yaSSL\&.) @@ -885,8 +805,6 @@ This option was added in MySQL 5\&.7\&.10\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: tmpdir option -.\" tmpdir option: mysqltest \fB\-\-tmpdir=\fR\fB\fIdir_name\fR\fR, \fB\-t \fR\fB\fIdir_name\fR\fR .sp @@ -901,8 +819,6 @@ The temporary directory where socket files are created\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: trace-exec option -.\" trace-exec option: mysqltest \fB\-\-trace\-exec\fR .sp If enabled, this option causes @@ -921,8 +837,6 @@ This option was added in MySQL 5\&.8\&.0\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: user option -.\" user option: mysqltest \fB\-\-user=\fR\fB\fIuser_name\fR\fR, \fB\-u \fR\fB\fIuser_name\fR\fR .sp @@ -937,8 +851,6 @@ The MySQL user name to use when connecting to the server\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: verbose option -.\" verbose option: mysqltest \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -953,8 +865,6 @@ Verbose mode\&. Print out more information about what the program does\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: version option -.\" version option: mysqltest \fB\-\-version\fR, \fB\-V\fR .sp @@ -969,8 +879,6 @@ Display version information and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqltest: view-protocol option -.\" view-protocol option: mysqltest \fB\-\-view\-protocol\fR .sp Every diff --git a/man/mysqltest_embedded.1 b/man/mysqltest_embedded.1 index 1ac6945674cd..22c913168d6b 100644 --- a/man/mysqltest_embedded.1 +++ b/man/mysqltest_embedded.1 @@ -1 +1 @@ -.so man/mysqltest.1 +.so mysqltest.1 diff --git a/man/ndb-common-options.1 b/man/ndb-common-options.1 index b37acbd081d7..8a96776f6d0b 100644 --- a/man/ndb-common-options.1 +++ b/man/ndb-common-options.1 @@ -1,13 +1,13 @@ '\" t .\" Title: Options Common to MySQL Cluster Programs .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "OPTIONS COMMON TO MY" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "OPTIONS COMMON TO MY" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,12 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" MySQL Cluster: administration -.\" command-line options (MySQL Cluster) -.\" program options (MySQL Cluster) -.\" MySQL Cluster: ndbd -.\" MySQL Cluster: mgm -.\" MySQL Cluster: mgmd .SH "NAME" ndb-common-options \- MySQL Cluster Common Program Options .SH "DESCRIPTION" @@ -97,121 +91,10 @@ The options in the following table are common to all MySQL Cluster executables ( .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.88.\ \& This table describes command-line options common to all MySQL Cluster programs +.B Table\ \&18.88.\ \& This table describes command\-line options common to all MySQL Cluster programs .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l. -T{ -.PP ---help, -.PP ---usage, -.PP --? -T}:T{ -Display help message and exit -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---character-sets-dir=dir_name -T}:T{ -Directory where character sets are installed -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---core-file -T}:T{ -Write core on errors (defaults to TRUE in debug builds) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---debug=options -T}:T{ -Enable output from debug calls. Can be used only for versions compiled - with debugging enabled -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---ndb-connectstring=connectstring, -.PP ---connect-string=connectstring, -.PP --c -T}:T{ -Set connection string for connecting to ndb_mgmd. Syntax: - [nodeid=;][host=][:]. - Overrides entries specified in NDB_CONNECTSTRING or my.cnf. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---ndb-mgmd-host=host[:port] -T}:T{ -Set the host (and port, if desired) for connecting to management server -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---ndb-nodeid=# -T}:T{ -Set node id for this node -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---ndb-optimized-node-selection -T}:T{ -Select nodes for transactions in a more optimal way -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---version, -.PP --V -T}:T{ -Output version information and exit -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .PP @@ -231,9 +114,6 @@ options relating to MySQL Cluster\&. .sp -1 .IP \(bu 2.3 .\} -.\" help option (MySQL Cluster programs) -.\" usage option (MySQL Cluster programs) -.\" -? option (MySQL Cluster programs) \fB\-\-help\fR, \fB\-\-usage\fR, \fB\-?\fR @@ -264,8 +144,6 @@ Prints a short list with descriptions of the available command options\&. .sp -1 .IP \(bu 2.3 .\} -.\" character-sets-dir option (MySQL Cluster programs) -.\" character-sets-dir option (MySQL Cluster programs) \fB\-\-character\-sets\-dir=\fR\fB\fIname\fR\fR .TS allbox tab(:); @@ -301,9 +179,6 @@ Tells the program where to find character set information\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb-connectstring option (MySQL Cluster programs) -.\" connect-string option (MySQL Cluster programs) -.\" -c option (MySQL Cluster programs) \fB\-\-ndb\-connectstring=\fR\fB\fIconnection_string\fR\fR, \fB\-\-connect\-string=\fR\fB\fIconnection_string\fR\fR, \fB\-c \fR\fB\fIconnection_string\fR\fR @@ -361,7 +236,6 @@ Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq\&. .sp -1 .IP \(bu 2.3 .\} -.\" core-file option (MySQL Cluster programs) \fB\-\-core\-file\fR .TS allbox tab(:); @@ -410,7 +284,6 @@ is disabled by default\&. .sp -1 .IP \(bu 2.3 .\} -.\" debug option (MySQL Cluster programs) \fB\-\-debug[=\fR\fB\fIoptions\fR\fR\fB]\fR .TS allbox tab(:); @@ -449,7 +322,6 @@ process\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb-mgmd-host option (MySQL Cluster programs) \fB\-\-ndb\-mgmd\-host=\fR\fB\fIhost\fR\fR\fB[:\fR\fB\fIport\fR\fR\fB]\fR .TS allbox tab(:); @@ -488,7 +360,6 @@ option instead\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb-nodeid option (MySQL Cluster programs) \fB\-\-ndb\-nodeid=\fR\fB\fI#\fR\fR .TS allbox tab(:); @@ -527,7 +398,6 @@ Section\ \&18.1.6.2, \(lqLimits and Differences of MySQL Cluster from Standard M .sp -1 .IP \(bu 2.3 .\} -.\" ndb-optimized-node-selection option (MySQL Cluster) \fB\-\-ndb\-optimized\-node\-selection\fR .TS allbox tab(:); @@ -564,8 +434,6 @@ Optimize selection of nodes for transactions\&. Enabled by default\&. .sp -1 .IP \(bu 2.3 .\} -.\" version option (MySQL Cluster programs) -.\" -V option (MySQL Cluster programs) \fB\-\-version\fR, \fB\-V\fR .TS diff --git a/man/ndb_blob_tool.1 b/man/ndb_blob_tool.1 index 29a2bf34c835..715d157f28e9 100644 --- a/man/ndb_blob_tool.1 +++ b/man/ndb_blob_tool.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_blob_tool\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_BLOB_TOOL\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_BLOB_TOOL\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_blob_tool .SH "NAME" ndb_blob_tool \- check and repair BLOB and TEXT columns of MySQL Cluster tables .SH "SYNOPSIS" @@ -94,72 +93,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.73.\ \& This table describes command-line options for the ndb_blob_tool program +.B Table\ \&18.73.\ \& This table describes command\-line options for the ndb_blob_tool program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l -l l l. -T{ -.PP ---check-orphans -T}:T{ -Check for orphan blob parts -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---database=db_name, -.PP --d -T}:T{ -Database to find the table in. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---delete-orphans -T}:T{ -Delete orphan blob parts -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---dump-file=file -T}:T{ -Write orphan keys to specified file -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---verbose, -.PP --v -T}:T{ -Verbose output -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .sp @@ -171,8 +108,6 @@ T} .sp -1 .IP \(bu 2.3 .\} -.\" ndb_blob_tool: check-orphans option -.\" check-orphans option: ndb_blob_tool \fB\-\-check\-orphans\fR .TS allbox tab(:); @@ -209,8 +144,6 @@ Check for orphaned BLOB parts in MySQL Cluster tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_blob_tool: database option -.\" database option: ndb_blob_tool \fB\-\-database=\fR\fB\fIdb_name\fR\fR, \fB\-d\fR .TS @@ -248,8 +181,6 @@ Specify the database to find the table in\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_blob_tool: delete-orphans option -.\" delete-orphans option: ndb_blob_tool \fB\-\-delete\-orphans\fR .TS allbox tab(:); @@ -286,8 +217,6 @@ Remove orphaned BLOB parts from MySQL Cluster tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_blob_tool: dump-file option -.\" dump-file option: ndb_blob_tool \fB\-\-dump\-file=\fR\fB\fIfile\fR\fR .TS allbox tab(:); @@ -325,8 +254,6 @@ Writes a list of orphaned BLOB column parts to .sp -1 .IP \(bu 2.3 .\} -.\" ndb_blob_tool: verbose option -.\" verbose option: ndb_blob_tool \fB\-\-verbose\fR .TS allbox tab(:); diff --git a/man/ndb_config.1 b/man/ndb_config.1 index f8ddfd8a8132..53f3af320298 100644 --- a/man/ndb_config.1 +++ b/man/ndb_config.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CONFIG\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CONFIG\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_config .SH "NAME" ndb_config \- extract MySQL Cluster configuration information .SH "SYNOPSIS" @@ -69,187 +68,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.74.\ \& This table describes command-line options for the ndb_config program +.B Table\ \&18.74.\ \& This table describes command\-line options for the ndb_config program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l. -T{ -.PP ---nodes -T}:T{ -Print node information ([ndbd] or [ndbd default] section of cluster - configuration file) only. Cannot be used with --system or - --connections. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---connections -T}:T{ -Print connections information ([tcp], [tcp default], [sci], [sci - default], [shm], or [shm default] sections of cluster - configuration file) only. Cannot be used with --system or - --nodes. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---query=string, -.PP --q -T}:T{ -One or more query options (attributes) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---host=name -T}:T{ -Specify host -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---type=name -T}:T{ -Specify node type -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---nodeid, -.PP ---id -T}:T{ -Get configuration of node with this ID -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---fields=string, -.PP --f -T}:T{ -Field separator -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---rows=string, -.PP --r -T}:T{ -Row separator -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---config-file=file_name -T}:T{ -Set the path to config.ini file -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---mycnf -T}:T{ -Read configuration data from my.cnf file -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP --c -T}:T{ -Short form for --ndb-connectstring -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---configinfo -T}:T{ -Dumps information about all NDB configuration parameters in text format - with default, maximum, and minimum values. Use with --xml to - obtain XML output. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---configinfo --xml -T}:T{ -Use --xml with --configinfo to obtain a dump of all NDB configuration - parameters in XML format with default, maximum, and minimum - values. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---system -T}:T{ -Print SYSTEM section information only (see ndb_config --configinfo - output). Cannot be used with --nodes or --connections. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---config_from_node=# -T}:T{ -Obtain configuration data from the node having this ID (must be a data - node). -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .sp @@ -261,8 +83,6 @@ T} .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: usage option -.\" usage option: ndb_config \fB\-\-usage\fR, \fB\-\-help\fR, or \fB\-?\fR @@ -295,8 +115,6 @@ to print a list of available options, and then exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: config_from_node option -.\" config_from_node option: ndb_config \fB\-\-config_from_node=#\fR .TS allbox tab(:); @@ -349,8 +167,6 @@ fails with an error\&. (To obtain configuration data from the management node in .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: version option -.\" version option: ndb_config \fB\-\-version\fR, \fB\-V\fR .TS @@ -376,8 +192,6 @@ to print a version information string, and then exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: ndb-connectstring option -.\" ndb-connectstring option: ndb_config \fB\-\-ndb\-connectstring=\fR\fB\fIconnection_string\fR\fR, \fB\-c \fR\fB\fIconnection_string\fR\fR .TS @@ -423,8 +237,6 @@ localhost:1186\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: config-file option -.\" config-file option: ndb_config \fB\-\-config\-file=\fR\fB\fIpath\-to\-file\fR\fR .TS allbox tab(:); @@ -462,8 +274,6 @@ is invoked, then an absolute path must be used\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: mycnf option -.\" mycnf option: ndb_config \fB\-\-mycnf\fR .TS allbox tab(:); @@ -502,8 +312,6 @@ file\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: query option -.\" query option: ndb_config \fB\-\-query=\fR\fB\fIquery\-options\fR\fR, \fB\-q\fR \fIquery\-options\fR @@ -539,8 +347,6 @@ mysqld, or ndb_mgmd), and any configuration parameters whose values are to be obtained\&. .sp For example, -.\" ndb_config: query option -.\" query option: ndb_config \fB\-\-query=id,type,indexmemory,datamemory\fR returns the node ID, node type, DataMemory, and @@ -571,8 +377,6 @@ If a given parameter is not applicable to a certain type of node, than an empty .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: host option -.\" host option: ndb_config \fB\-\-host=\fR\fB\fIhostname\fR\fR .TS allbox tab(:); @@ -638,12 +442,8 @@ in the same fashion\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: id option -.\" id option: ndb_config \fB\-\-id=\fR\fB\fInode_id\fR\fR .sp -.\" ndb_config: nodeid option -.\" nodeid option: ndb_config \fB\-\-nodeid=\fR\fB\fInode_id\fR\fR .TS allbox tab(:); @@ -682,8 +482,6 @@ is the preferred form\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: nodes option -.\" nodes option: ndb_config \fB\-\-nodes\fR .TS allbox tab(:); @@ -732,8 +530,6 @@ and .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: connections option -.\" connections option: ndb_config \fB\-\-connections\fR .TS allbox tab(:); @@ -789,8 +585,6 @@ and .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: system option -.\" system option: ndb_config \fB\-\-system\fR .TS allbox tab(:); @@ -839,8 +633,6 @@ and .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: type option -.\" type option: ndb_config \fB\-\-type=\fR\fB\fInode_type\fR\fR .TS allbox tab(:); @@ -895,8 +687,6 @@ ndb_mgmd) are returned\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: fields option -.\" fields option: ndb_config \fB\-\-fields=\fR\fB\fIdelimiter\fR\fR, \fB\-f\fR \fIdelimiter\fR @@ -957,8 +747,6 @@ for the linefeed character), then it must be quoted\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: rows option -.\" rows option: ndb_config \fB\-\-rows=\fR\fB\fIseparator\fR\fR, \fB\-r\fR \fIseparator\fR @@ -1017,8 +805,6 @@ for the linefeed character), then it must be quoted\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_config: configinfo option -.\" configinfo option: ndb_config \fB\-\-configinfo\fR .sp The @@ -1116,8 +902,6 @@ Default: 0 (Min: 0, Max: 4294967039) .RE .\} .sp -.\" ndb_config: xml option -.\" xml option: ndb_config \fB\-\-configinfo\fR \fB\-\-xml\fR .TS @@ -1156,7 +940,7 @@ option\&. A portion of the resulting output is shown in this example: .\} .nf shell> \fBndb_config \-\-configinfo \-\-xml\fR -
diff --git a/man/ndb_cpcd.1 b/man/ndb_cpcd.1 index 8e85435588f1..e5b67ce956ab 100644 --- a/man/ndb_cpcd.1 +++ b/man/ndb_cpcd.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_cpcd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CPCD\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CPCD\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_cpcd .SH "NAME" ndb_cpcd \- automate testing of NDB (development use only) .SH "SYNOPSIS" diff --git a/man/ndb_delete_all.1 b/man/ndb_delete_all.1 index 68fbcd279444..0779da076ba8 100644 --- a/man/ndb_delete_all.1 +++ b/man/ndb_delete_all.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_delete_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DELETE_ALL\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DELETE_ALL\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_delete_all .SH "NAME" ndb_delete_all \- delete all rows from an NDB table .SH "SYNOPSIS" @@ -70,62 +69,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.75.\ \& This table describes command-line options for the ndb_delete_all program +.B Table\ \&18.75.\ \& This table describes command\-line options for the ndb_delete_all program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l. -T{ -.PP ---database=dbname, -.PP --d -T}:T{ -Name of the database in which the table is found -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---transactional, -.PP --t -T}:T{ -Perform the delete in a single transaction (may run out of operations) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---tupscan -T}:T{ -Run tup scan -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---diskscan -T}:T{ -Run disk scan -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .sp @@ -137,8 +84,6 @@ T} .sp -1 .IP \(bu 2.3 .\} -.\" ndb_delete_all: transactional option -.\" transactional option: ndb_delete_all \fB\-\-transactional\fR, \fB\-t\fR .sp diff --git a/man/ndb_desc.1 b/man/ndb_desc.1 index bd29c4936a3b..9bf2403f803d 100644 --- a/man/ndb_desc.1 +++ b/man/ndb_desc.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_desc\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DESC\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DESC\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_desc .SH "NAME" ndb_desc \- describe NDB tables .SH "SYNOPSIS" @@ -336,105 +335,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.76.\ \& This table describes command-line options for the ndb_desc program +.B Table\ \&18.76.\ \& This table describes command\-line options for the ndb_desc program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l -l l l -l l l -l l l. -T{ -.PP ---blob-info, -.PP --b -T}:T{ -Include partition information for BLOB tables in output. Requires that - the -p option also be used -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---database=dbname, -.PP --d -T}:T{ -Name of database containing table -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---extra-node-info, -.PP --n -T}:T{ -Include partition-to-data-node mappings in output. Requires that the -p - option also be used -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---extra-partition-info, -.PP --p -T}:T{ -Display information about partitions -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---retries=#, -.PP --r -T}:T{ -Number of times to retry the connection (once per second) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---table=tbl_name, -.PP --t -T}:T{ -Specify the table in which to find an index. When this option is used, - -p and -n have no effect and are ignored. -T}:T{ -.PP -ADDED: NDB 7.2.9 -T} -T{ -.PP ---unqualified, -.PP --u -T}:T{ -Use unqualified table names -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .sp @@ -446,8 +350,6 @@ T} .sp -1 .IP \(bu 2.3 .\} -.\" ndb_desc: blob-info option -.\" blob-info option: ndb_desc \fB\-\-blob\-info\fR, \fB\-b\fR .sp @@ -470,8 +372,6 @@ Use of this option also requires the use of the .sp -1 .IP \(bu 2.3 .\} -.\" ndb_desc: database option -.\" database option: ndb_desc \fB\-\-database=\fR\fB\fIdb_name\fR\fR, \fB\-d\fR .sp @@ -486,8 +386,6 @@ Specify the database in which the table should be found\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_desc: extra-node-info option -.\" extra-node-info option: ndb_desc \fB\-\-extra\-node\-info\fR, \fB\-n\fR .sp @@ -506,8 +404,6 @@ Use of this option also requires the use of the .sp -1 .IP \(bu 2.3 .\} -.\" ndb_desc: extra-partition-info option -.\" extra-partition-info option: ndb_desc \fB\-\-extra\-partition\-info\fR, \fB\-p\fR .sp @@ -522,8 +418,6 @@ Print additional information about the table\*(Aqs partitions\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_desc: retries option -.\" retries option: ndb_desc \fB\-\-retries=\fR\fB\fI#\fR\fR, \fB\-r\fR .sp @@ -538,8 +432,6 @@ Try to connect this many times before giving up\&. One connect attempt is made p .sp -1 .IP \(bu 2.3 .\} -.\" ndb_desc: table option -.\" table option: ndb_desc \fB\-\-table=\fR\fB\fItbl_name\fR\fR, \fB\-t\fR .sp @@ -556,8 +448,6 @@ This option was added in MySQL Cluster NDB 7\&.2\&.9\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_desc: unqualified option -.\" unqualified option: ndb_desc \fB\-\-unqualified\fR, \fB\-u\fR .sp diff --git a/man/ndb_drop_index.1 b/man/ndb_drop_index.1 index 99cde7355bd8..a28406506fb8 100644 --- a/man/ndb_drop_index.1 +++ b/man/ndb_drop_index.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_drop_index\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_INDEX\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_INDEX\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_drop_index .SH "NAME" ndb_drop_index \- drop index from an NDB table .SH "SYNOPSIS" @@ -68,30 +67,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.77.\ \& This table describes command-line options for the ndb_drop_index program +.B Table\ \&18.77.\ \& This table describes command\-line options for the ndb_drop_index program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l. -T{ -.PP ---database=dbname, -.PP --d -T}:T{ -Name of the database in which the table is found -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .if n \{\ @@ -123,7 +102,7 @@ Enter password: ******* Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with \-A Welcome to the MySQL monitor\&. Commands end with ; or \eg\&. -Your MySQL connection id is 7 to server version: 5\&.5\&.48\-ndb\-7\&.2\&.24 +Your MySQL connection id is 7 to server version: 5\&.5\&.49\-ndb\-7\&.2\&.25 Type \*(Aqhelp;\*(Aq or \*(Aq\eh\*(Aq for help\&. Type \*(Aq\ec\*(Aq to clear the buffer\&. mysql> \fBSHOW TABLES;\fR +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ diff --git a/man/ndb_drop_table.1 b/man/ndb_drop_table.1 index 6479b49fc849..639c13216d99 100644 --- a/man/ndb_drop_table.1 +++ b/man/ndb_drop_table.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_drop_table\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_TABLE\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_TABLE\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_drop_table .SH "NAME" ndb_drop_table \- drop an NDB table .SH "SYNOPSIS" @@ -66,30 +65,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.78.\ \& This table describes command-line options for the ndb_drop_table program +.B Table\ \&18.78.\ \& This table describes command\-line options for the ndb_drop_table program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l. -T{ -.PP ---database=dbname, -.PP --d -T}:T{ -Name of the database in which the table is found -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .SH "COPYRIGHT" diff --git a/man/ndb_error_reporter.1 b/man/ndb_error_reporter.1 index d14369079fdc..bfbffa11cb16 100644 --- a/man/ndb_error_reporter.1 +++ b/man/ndb_error_reporter.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_error_reporter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_ERROR_REPORTE" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_ERROR_REPORTE" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_error_reporter -.\" bugs: MySQL Cluster: reporting .SH "NAME" ndb_error_reporter \- NDB error\-reporting utility .SH "SYNOPSIS" @@ -58,59 +56,10 @@ options were also added in this release (Bug #16602002)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.79.\ \& This table describes command-line options for the ndb_error_reporter program +.B Table\ \&18.79.\ \& This table describes command\-line options for the ndb_error_reporter program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l. -T{ -.PP ---connection-timeout=timeout -T}:T{ -Number of seconds to wait when connecting to nodes before timing out. -T}:T{ -.PP -ADDED: NDB 7.2.14 -T} -T{ -.PP ---dry-scp -T}:T{ -Disable scp with remote hosts; used only for testing. -T}:T{ -.PP -ADDED: NDB 7.2.14 -T} -T{ -.PP ---fs -T}:T{ -Include file system data in error report; can use a large amount of disk - space -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---skip-nodegroup=nodegroup_id -T}:T{ -Skip all nodes in the node group having this ID. -T}:T{ -.PP -ADDED: NDB 7.2.14 -T} +. .TE .sp 1 Usage @@ -133,7 +82,6 @@ ndb_error_report_\fIYYYYMMDDHHMMSS\fR\&.tar\&.bz2, where \fIYYYYMMDDHHMMSS\fR is a datetime string\&. .PP -.\" ndb_error_reporter: options \fBndb_error_reporter\fR also accepts the options listed here: .sp @@ -145,7 +93,6 @@ also accepts the options listed here: .sp -1 .IP \(bu 2.3 .\} -.\" connection-timeout option (ndb_error_reporter) \fB\-\-connection\-timeout=\fR\fB\fItimeout\fR\fR .TS allbox tab(:); @@ -188,7 +135,6 @@ Wait this many seconds when trying to connect to nodes before timing out\&. .sp -1 .IP \(bu 2.3 .\} -.\" dry-scp option (ndb_error_reporter) \fB\-\-dry\-scp\fR .TS allbox tab(:); @@ -233,7 +179,6 @@ without using scp from remote hosts\&. Used for testing only\&. .sp -1 .IP \(bu 2.3 .\} -.\" fs option (ndb_error_reporter) \fB\-\-fs\fR .TS allbox tab(:); @@ -274,7 +219,6 @@ send archives created using this option to Oracle unless you are specifically re .sp -1 .IP \(bu 2.3 .\} -.\" skip-nodegroup option (ndb_error_reporter) \fB\-\-skip\-nodegroup=\fR\fB\fInodegroup_id\fR\fR .TS allbox tab(:); diff --git a/man/ndb_index_stat.1 b/man/ndb_index_stat.1 index 22a64931b6b2..d44a40982dd5 100644 --- a/man/ndb_index_stat.1 +++ b/man/ndb_index_stat.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_index_stat\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_INDEX_STAT\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_INDEX_STAT\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_index_stat .SH "NAME" ndb_index_stat \- NDB index statistics utility .SH "SYNOPSIS" @@ -67,8 +66,6 @@ mytable in the test database: -.\" ndb_index_stat: interpreting output -.\" ndb_index_stat: example .sp .if n \{\ .RS 4 @@ -169,169 +166,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.80.\ \& This table describes command-line options for the ndb_index_stat program +.B Table\ \&18.80.\ \& This table describes command\-line options for the ndb_index_stat program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l. -T{ -.PP ---database=name, -.PP --d -T}:T{ -Name of the database containing the table. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---delete -T}:T{ -Delete index statistics for the given table, stopping any auto-update - previously configured. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---update -T}:T{ -Update index statistics for the given table, restarting any auto-update - previously configured. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---dump -T}:T{ -Print the query cache. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---query=# -T}:T{ -Perform a number of random range queries on first key attr (must be int - unsigned). -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---sys-drop -T}:T{ -Drop any statistics tables and events in NDB kernel (all statistics are - lost) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---sys-create -T}:T{ -Create all statistics tables and events in NDB kernel, if none of them - already exist -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---sys-create-if-not-exist -T}:T{ -Create any statistics tables and events in NDB kernel that do not - already exist. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---sys-create-if-not-valid -T}:T{ -Create any statistics tables or events that do not already exist in the - NDB kernel. after dropping any that are invalid. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---sys-check -T}:T{ -Verify that NDB system index statistics and event tables exist. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---sys-skip-tables -T}:T{ -Do not apply sys-* options to tables. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---sys-skip-events -T}:T{ -Do not apply sys-* options to events. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---verbose, -.PP --v -T}:T{ -Turn on verbose output -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---loops=# -T}:T{ -Set the number of times to perform a given command. Default is 0. -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .PP @@ -346,8 +184,6 @@ ndb_index_stat system options)\&. .sp -1 .IP \(bu 2.3 .\} -.\" database option (ndb_index_stat) -.\" -d option (ndb_index_stat) \fB\-\-database=\fR\fB\fIname\fR\fR, \fB\-d \fR\fB\fIname\fR\fR .TS @@ -395,7 +231,6 @@ The name of the database that contains the table being queried\&. .sp -1 .IP \(bu 2.3 .\} -.\" delete option (ndb_index_stat) \fB\-\-delete\fR .TS allbox tab(:); @@ -442,7 +277,6 @@ Delete the index statistics for the given table, stopping any auto\-update that .sp -1 .IP \(bu 2.3 .\} -.\" update option (ndb_index_stat) \fB\-\-update\fR .TS allbox tab(:); @@ -489,7 +323,6 @@ Update the index statistics for the given table, and restart any auto\-update th .sp -1 .IP \(bu 2.3 .\} -.\" dump option (ndb_index_stat) \fB\-\-dump\fR .TS allbox tab(:); @@ -536,7 +369,6 @@ Dump the contents of the query cache\&. .sp -1 .IP \(bu 2.3 .\} -.\" query option (ndb_index_stat) \fB\-\-query=\fR\fB\fI#\fR\fR .TS allbox tab(:); @@ -588,7 +420,6 @@ ndb_index_stat statistics options)\&. .sp -1 .IP \(bu 2.3 .\} -.\" sys-drop option (ndb_index_stat) \fB\-\-sys\-drop\fR .TS allbox tab(:); @@ -636,7 +467,6 @@ Drop all statistics tables and events in the NDB kernel\&. .sp -1 .IP \(bu 2.3 .\} -.\" sys-create option (ndb_index_stat) \fB\-\-sys\-create\fR .TS allbox tab(:); @@ -683,7 +513,6 @@ Create all statistics tables and events in the NDB kernel\&. This works only if .sp -1 .IP \(bu 2.3 .\} -.\" sys-create-if-not-exist option (ndb_index_stat) \fBsys\-create\-if\-not\-exist\fR .TS allbox tab(:); @@ -730,7 +559,6 @@ Create any NDB system statistics tables or events (or both) that do not already .sp -1 .IP \(bu 2.3 .\} -.\" sys-create-if-not-valid option (ndb_index_stat) \fB\-\-sys\-create\-if\-not\-valid\fR .TS allbox tab(:); @@ -777,7 +605,6 @@ Create any NDB system statistics tables or events that do not already exist, aft .sp -1 .IP \(bu 2.3 .\} -.\" sys-check option (ndb_index_stat) \fB\-\-sys\-check\fR .TS allbox tab(:); @@ -824,7 +651,6 @@ Verify that all required system statistics tables and events exist in the NDB ke .sp -1 .IP \(bu 2.3 .\} -.\" sys-skip-tables option (ndb_index_stat) \fB\-\-sys\-skip\-tables\fR .TS allbox tab(:); @@ -873,7 +699,6 @@ options to any statistics tables\&. .sp -1 .IP \(bu 2.3 .\} -.\" sys-skip-events option (ndb_index_stat) \fB\-\-sys\-skip\-events\fR .TS allbox tab(:); @@ -922,7 +747,6 @@ options to any events\&. .sp -1 .IP \(bu 2.3 .\} -.\" verbose option (ndb_index_stat) \fB\-\-verbose\fR .TS allbox tab(:); @@ -969,7 +793,6 @@ Turn on verbose output\&. .sp -1 .IP \(bu 2.3 .\} -.\" loops option (ndb_index_stat) \fB\-\-loops=\fR\fB\fI#\fR\fR .TS allbox tab(:); diff --git a/man/ndb_mgm.1 b/man/ndb_mgm.1 index de15ab4f0a52..15fd305506e9 100644 --- a/man/ndb_mgm.1 +++ b/man/ndb_mgm.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_mgm\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGM\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGM\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,13 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_mgm -.\" MySQL Cluster: ndb_mgm -.\" MySQL Cluster: management client (ndb_mgm) -.\" management client (MySQL Cluster) -.\" ndb_mgm -.\" MySQL Cluster: administration -.\" administration of MySQL Cluster .SH "NAME" ndb_mgm \- the MySQL Cluster management client .SH "SYNOPSIS" @@ -73,10 +66,6 @@ shell> \fBndb_mgm ndb_mgmd\&.mysql\&.com 1186\fR The default host name and port number are localhost and 1186, respectively\&. -.\" MySQL Cluster: administration -.\" MySQL Cluster: commands -.\" command options (MySQL Cluster): ndb_mgm -.\" MySQL Cluster: mgm process .PP The following table includes options that are specific to the MySQL Cluster management client program \fBndb_mgm\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including @@ -87,43 +76,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.72.\ \& This table describes command-line options for the ndb_mgm program +.B Table\ \&18.72.\ \& This table describes command\-line options for the ndb_mgm program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l. -T{ -.PP ---try-reconnect=#, -.PP --t -T}:T{ -Set the number of times to retry a connection before giving up; synonym - for --connect-retries -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---execute=name, -.PP --e -T}:T{ -Execute command and exit -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .sp @@ -135,8 +91,6 @@ T} .sp -1 .IP \(bu 2.3 .\} -.\" execute option (ndb_mgm) -.\" -e option (ndb_mgm) \fB\-\-execute=\fR\fBcommand\fR, \fB\-e \fR\fBcommand\fR .TS diff --git a/man/ndb_mgmd.8 b/man/ndb_mgmd.8 index 16e79201ec24..76aaa9a8089f 100644 --- a/man/ndb_mgmd.8 +++ b/man/ndb_mgmd.8 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_mgmd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGMD\FR" "8" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGMD\FR" "8" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_mgmd (MySQL Cluster process) -.\" MySQL Cluster: ndb_mgmd process -.\" MySQL Cluster: management nodes -.\" management nodes (MySQL Cluster) -.\" ndb_mgmd .SH "NAME" ndb_mgmd \- the MySQL Cluster management server daemon .SH "SYNOPSIS" @@ -40,10 +35,6 @@ ndb_mgmd \- the MySQL Cluster management server daemon .SH "DESCRIPTION" .PP The management server is the process that reads the cluster configuration file and distributes this information to all nodes in the cluster that request it\&. It also maintains a log of cluster activities\&. Management clients can connect to the management server and check the cluster\*(Aqs status\&. -.\" MySQL Cluster: administration -.\" MySQL Cluster: commands -.\" command options (MySQL Cluster): ndb_mgmd -.\" MySQL Cluster: mgmd process .PP The following table includes options that are specific to the MySQL Cluster management server program \fBndb_mgmd\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including @@ -54,197 +45,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.71.\ \& This table describes command-line options for the ndb_mgmd program +.B Table\ \&18.71.\ \& This table describes command\-line options for the ndb_mgmd program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l. -T{ -.PP ---config-file=file, -.PP --f -T}:T{ -Specify the cluster configuration file; in NDB-6.4.0 and later, needs - --reload or --initial to override configuration cache if - present -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---configdir=directory, -.PP ---config-dir=directory -T}:T{ -Specify the cluster management server's configuration cache directory -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---bind-address=ip_address -T}:T{ -Local bind address -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---print-full-config, -.PP --P -T}:T{ -Print full configuration and exit -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---daemon, -.PP --d -T}:T{ -Run ndb_mgmd in daemon mode (default) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---nodaemon -T}:T{ -Do not run ndb_mgmd as a daemon -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---interactive -T}:T{ -Run ndb_mgmd in interactive mode (not officially supported in - production; for testing purposes only) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---log-name=name -T}:T{ -A name to use when writing messages applying to this node in the cluster - log. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---no-nodeid-checks -T}:T{ -Do not provide any node id checks -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---mycnf -T}:T{ -Read cluster configuration data from the my.cnf file -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---reload -T}:T{ -Causes the management server to compare the configuration file with its - configuration cache -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---initial -T}:T{ -Causes the management server reload its configuration data from the - configuration file, bypassing the configuration cache -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---nowait-nodes=list -T}:T{ -Do not wait for these management nodes when starting this management - server. Also requires --ndb-nodeid to be used. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---config-cache[=TRUE|FALSE] -T}:T{ -Enable the management server configuration cache; TRUE by default. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---install[=name] -T}:T{ -Used to install the management server process as a Windows service. Does - not apply on non-Windows platforms. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---remove[=name] -T}:T{ -Used to remove a management server process that was previously installed - as a Windows service, optionally specifying the name of the - service to be removed. Does not apply on non-Windows - platforms. -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .sp @@ -256,7 +60,6 @@ T} .sp -1 .IP \(bu 2.3 .\} -.\" bind-address option (ndb_mgmd) \fB\-\-bind\-address=\fR\fB\fIhost\fR\fR\fB[:\fR\fB\fIport\fR\fR\fB]\fR .TS allbox tab(:); @@ -298,7 +101,6 @@ is not specified, the management client attempts to use port 1186\&. .sp -1 .IP \(bu 2.3 .\} -.\" no-nodeid-checks option (ndb_mgmd) \fB\-\-no\-nodeid\-checks\fR .TS allbox tab(:); @@ -335,7 +137,6 @@ Do not perform any checks of node IDs\&. .sp -1 .IP \(bu 2.3 .\} -.\" configdir option (ndb_mgmd) \fB\-\-configdir=\fR\fB\fIdir_name\fR\fR .TS allbox tab(:); @@ -380,7 +181,6 @@ is an alias for this option\&. .sp -1 .IP \(bu 2.3 .\} -.\" config-cache option (ndb_mgmd) \fB\-\-config\-cache\fR .TS allbox tab(:); @@ -531,9 +331,6 @@ is used\&. (Bug #13428853) .sp -1 .IP \(bu 2.3 .\} -.\" config-file option (ndb_mgmd) -.\" -f option (ndb_mgmd) -.\" -c option (ndb_mgmd) (OBSOLETE) \fB\-\-config\-file=\fR\fB\fIfilename\fR\fR, \fB\-f \fR\fB\fIfilename\fR\fR .TS @@ -591,8 +388,6 @@ caused removal of the configuration cache even if the file was not found\&. This .sp -1 .IP \(bu 2.3 .\} -.\" ndb_mgmd: mycnf option -.\" mycnf option: ndb_mgmd \fB\-\-mycnf\fR .TS allbox tab(:); @@ -631,8 +426,6 @@ file\&. .sp -1 .IP \(bu 2.3 .\} -.\" daemon option (ndb_mgmd) -.\" -d option (ndb_mgmd) \fB\-\-daemon\fR, \fB\-d\fR .TS @@ -676,7 +469,6 @@ on Windows platforms\&. .sp -1 .IP \(bu 2.3 .\} -.\" interactive option (ndb_mgmd) \fB\-\-interactive\fR .TS allbox tab(:); @@ -717,7 +509,6 @@ client session is started as soon as the management server is running\&. This op .sp -1 .IP \(bu 2.3 .\} -.\" initial option (ndb_mgmd) \fB\-\-initial\fR .TS allbox tab(:); @@ -782,7 +573,6 @@ option caused removal of the configuration cache even if the file was not found\ .sp -1 .IP \(bu 2.3 .\} -.\" log-name option (ndb_mgmd) \fB\-\-log\-name=\fR\fB\fIname\fR\fR .TS allbox tab(:); @@ -819,7 +609,6 @@ Provides a name to be used for this node in the cluster log\&. .sp -1 .IP \(bu 2.3 .\} -.\" nodaemon option (ndb_mgmd) \fB\-\-nodaemon\fR .TS allbox tab(:); @@ -862,8 +651,6 @@ on Windows is to run in the foreground, making this option unnecessary on Window .sp -1 .IP \(bu 2.3 .\} -.\" print-full-config option (ndb_mgmd) -.\" -P option (ndb_mgmd) \fB\-\-print\-full\-config\fR, \fB\-P\fR .TS @@ -905,7 +692,6 @@ process prints information about the cluster setup including an extensive list o .sp -1 .IP \(bu 2.3 .\} -.\" reload option (ndb_mgmd) \fB\-\-reload\fR .TS allbox tab(:); @@ -962,7 +748,6 @@ Section\ \&18.5.5, \(lqPerforming a Rolling Restart of a MySQL Cluster\(rq, for .sp -1 .IP \(bu 2.3 .\} -.\" nowait-nodes option (ndb_mgmd) \fB\-\-nowait\-nodes\fR .TS allbox tab(:); @@ -1134,9 +919,6 @@ is the unique node identifier\&. .sp -1 .IP \(bu 2.3 .\} -.\" MySQL Cluster: configuration -.\" configuring MySQL Cluster -.\" config.ini (MySQL Cluster) config\&.ini is the configuration file for the cluster as a whole\&. This file is created by the user and read by the management server\&. Section\ \&18.3, \(lqConfiguration of MySQL Cluster\(rq, discusses how to set up this file\&. @@ -1199,7 +981,6 @@ is the process ID file used when running the management server as a daemon\&. .sp -1 .IP \(bu 2.3 .\} -.\" install option (ndb_mgmd) \fB\-\-install[=\fR\fB\fIname\fR\fR\fB]\fR .TS allbox tab(:); @@ -1264,7 +1045,6 @@ option has no effect on non\-Windows platforms\&. .sp -1 .IP \(bu 2.3 .\} -.\" remove option (ndb_mgmd) \fB\-\-remove[=\fR\fB\fIname\fR\fR\fB]\fR .TS allbox tab(:); diff --git a/man/ndb_print_backup_file.1 b/man/ndb_print_backup_file.1 index 56e3b7401fb6..b241d6bc55e6 100644 --- a/man/ndb_print_backup_file.1 +++ b/man/ndb_print_backup_file.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_print_backup_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_BACKUP_" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_BACKUP_" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_print_backup_file .SH "NAME" ndb_print_backup_file \- print NDB backup file contents .SH "SYNOPSIS" diff --git a/man/ndb_print_file.1 b/man/ndb_print_file.1 index d5a47687fa14..21a31b411c73 100644 --- a/man/ndb_print_file.1 +++ b/man/ndb_print_file.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_print_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_FILE\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_FILE\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_print_file .SH "NAME" ndb_print_file \- print NDB Disk Data file contents .SH "SYNOPSIS" diff --git a/man/ndb_print_schema_file.1 b/man/ndb_print_schema_file.1 index e027d697ae18..a29b31f8d13e 100644 --- a/man/ndb_print_schema_file.1 +++ b/man/ndb_print_schema_file.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_print_schema_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SCHEMA_" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SCHEMA_" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_print_schema_file .SH "NAME" ndb_print_schema_file \- print NDB schema file contents .SH "SYNOPSIS" diff --git a/man/ndb_print_sys_file.1 b/man/ndb_print_sys_file.1 index 531a394abc08..f7f0de72d363 100644 --- a/man/ndb_print_sys_file.1 +++ b/man/ndb_print_sys_file.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_print_sys_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SYS_FIL" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SYS_FIL" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_print_sys_file .SH "NAME" ndb_print_sys_file \- print NDB system file contents .SH "SYNOPSIS" diff --git a/man/ndb_restore.1 b/man/ndb_restore.1 index 17dd7af05ecf..8a851e2869ce 100644 --- a/man/ndb_restore.1 +++ b/man/ndb_restore.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_restore\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_RESTORE\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_RESTORE\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" MySQL Cluster: backups -.\" backups: in MySQL Cluster -.\" MySQL Cluster: restoring backups -.\" restoring backups: in MySQL Cluster -.\" ndb_restore .SH "NAME" ndb_restore \- restore a MySQL Cluster backup .SH "SYNOPSIS" @@ -49,7 +44,6 @@ must be executed once for each of the backup files that were created by the START BACKUP command used to create the backup (see Section\ \&18.5.3.2, \(lqUsing The MySQL Cluster Management Client to Create a Backup\(rq)\&. This is equal to the number of data nodes in the cluster at the time that the backup was created\&. -.\" single user mode (MySQL Cluster): and ndb_restore .if n \{\ .sp .\} @@ -78,505 +72,12 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.82.\ \& This table describes command-line options for the ndb_restore program +.B Table\ \&18.82.\ \& This table describes command\-line options for the ndb_restore program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l. -T{ -.PP ---connect, -.PP --c -T}:T{ -Alias for --connectstring. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---nodeid=#, -.PP --n -T}:T{ -Restore backup files to node with this ID -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---backupid=#, -.PP --b -T}:T{ -Restore from the backup with the given ID -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---restore_data, -.PP --r -T}:T{ -Restore table data and logs into NDB Cluster using the NDB API -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---restore_meta, -.PP --m -T}:T{ -Restore metadata to NDB Cluster using the NDB API -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---no-upgrade, -.PP --u -T}:T{ -Do not upgrade array type for varsize attributes which do not already - resize VAR data, and do not change column attributes -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---promote-attributes, -.PP --A -T}:T{ -Allow attributes to be promoted when restoring data from backup -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---preserve-trailing-spaces, -.PP --P -T}:T{ -Allow preservation of trailing spaces (including padding) when promoting - fixed-width string types to variable-width types -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---no-restore-disk-objects, -.PP --d -T}:T{ -Do not restore objects relating to Disk Data -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---restore_epoch, -.PP --e -T}:T{ -Restore epoch info into the status table. Convenient on a MySQL Cluster - replication slave for starting replication. The row in - mysql.ndb_apply_status with id 0 will be updated/inserted. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---skip-table-check, -.PP --s -T}:T{ -Skip table structure check during restoring of data -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---parallelism=#, -.PP --p -T}:T{ -Number of parallel transactions to use while restoring data -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---print -T}:T{ -Print metadata, data and log to stdout (equivalent to --print_meta - --print_data --print_log) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---print_meta -T}:T{ -Print metadata to stdout -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---print_data -T}:T{ -Print data to stdout -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---print_log -T}:T{ -Print to stdout -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---backup_path=dir_name -T}:T{ -Path to backup files directory -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---dont_ignore_systab_0, -.PP --f -T}:T{ -Do not ignore system table during restore. Experimental only; not for - production use -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---ndb-nodegroup-map=map, -.PP --z -T}:T{ -Nodegroup map for NDBCLUSTER storage engine. Syntax: list of - (source_nodegroup, destination_nodegroup) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---fields-enclosed-by=char -T}:T{ -Fields are enclosed with the indicated character -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---fields-terminated-by=char -T}:T{ -Fields are terminated by the indicated character -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---fields-optionally-enclosed-by -T}:T{ -Fields are optionally enclosed with the indicated character -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---lines-terminated-by=char -T}:T{ -Lines are terminated by the indicated character -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---hex -T}:T{ -Print binary types in hexadecimal format -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---tab=dir_name, -.PP --T dir_name -T}:T{ -Creates a tab-separated .txt file for each table in the given path -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---append -T}:T{ -Append data to a tab-delimited file -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---progress-frequency=# -T}:T{ -Print status of restoration each given number of seconds -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---no-binlog -T}:T{ -If a mysqld is connected and using binary logging, do not log the - restored data -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---verbose=# -T}:T{ -Level of verbosity in output -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---include-databases=db-list -T}:T{ -List of one or more databases to restore (excludes those not named) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---exclude-databases=db-list -T}:T{ -List of one or more databases to exclude (includes those not named) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---include-tables=table-list -T}:T{ -List of one or more tables to restore (excludes those in same database - that are not named); each table reference must include the - database name -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---exclude-tables=table-list -T}:T{ -List of one or more tables to exclude (includes those in the same - database that are not named); each table reference must - include the database name -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---exclude-missing-columns -T}:T{ -Causes columns from the backup version of a table that are missing from - the version of the table in the database to be ignored. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---exclude-missing-tables -T}:T{ -Causes tables from the backup that are missing from the database to be - ignored. -T}:T{ -.PP -ADDED: NDB 7.2.18 -T} -T{ -.PP ---disable-indexes -T}:T{ -Causes indexes from a backup to be ignored; may decrease time needed to - restore data. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---rebuild-indexes -T}:T{ -Causes multi-threaded rebuilding of ordered indexes found in the backup. - Number of threads used is determined by setting - BuildIndexThreads parameter. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---skip-broken-objects -T}:T{ -Causes missing blob tables in the backup file to be ignored. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---skip-unknown-objects -T}:T{ -Causes schema objects not recognized by ndb_restore to be ignored when - restoring a backup made from a newer MySQL Cluster version to - an older version. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---rewrite-database=olddb,newdb -T}:T{ -Restores to a database with a different name than the original -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---lossy-conversions, -.PP --L -T}:T{ -Allow lossy conversions of column values (type demotions or changes in - sign) when restoring data from backup -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---restore-privilege-tables -T}:T{ -Restore MySQL privilege tables that were previously moved to NDB. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---exclude-intermediate-sql-tables[=TRUE|FALSE] -T}:T{ -If TRUE (the default), do not restore any intermediate tables (having - names prefixed with '#sql-') that were left over from copying - ALTER TABLE operations. -T}:T{ -.PP -ADDED: NDB 7.2.17 -T} +. .TE .sp 1 -.\" ndb_restore: typical and required options .PP Typical options for this utility are shown here: .sp @@ -603,7 +104,6 @@ requires at a minimum the \fB\-\-backup_path\fR options\&. .PP -.\" restore_connect option (ndb_restore) The \fB\-c\fR option is used to specify a connection string which tells @@ -647,7 +147,6 @@ shell> \fBndb_mgm \-e "SHOW"\fR .RE .\} .PP -.\" nodeid option (ndb_restore) The \fB\-\-nodeid\fR or @@ -664,7 +163,6 @@ with \fB\-\-initial\fR prior to performing the restore\&.) .PP -.\" restore_skip-table-check option (ndb_restore) It is possible to restore data without restoring table metadata\&. The default behavior when doing this is for \fBndb_restore\fR to fail with an error if table data do not match the table schema; this can be overridden using the @@ -734,9 +232,6 @@ Different default values Different distribution key settings .RE .PP -.\" attribute promotion: ndb_restore -.\" ndb_restore: attribute promotion -.\" promote-attributes option (ndb_restore) \fBndb_restore\fR supports limited \fIattribute promotion\fR @@ -834,8 +329,6 @@ with \fBndb_restore\fR following a successful restoration\&. .PP -.\" ndb_restore: lossy-conversions option -.\" lossy-conversions option (ndb_restore) \fB\-\-lossy\-conversions\fR, \fB\-L\fR .TS @@ -873,7 +366,6 @@ Section\ \&17.4.1.10.2, \(lqReplication of Columns Having Different Data Types\( \fBndb_restore\fR reports any truncation of data that it performs during lossy conversions once per attribute and column\&. .PP -.\" preserve-trailing-spaces option (ndb_restore) The \fB\-\-preserve\-trailing\-spaces\fR option (short form @@ -916,7 +408,6 @@ BINARY\&. .sp .5v .RE .PP -.\" backupid option (ndb_restore) The \fB\-b\fR option is used to specify the ID or sequence number of the backup, and is the same number shown by the management client in the @@ -940,7 +431,6 @@ When restoring cluster backups, you must be sure to restore all data nodes from .sp .5v .RE .PP -.\" restore_epoch option (ndb_restore) \fB\-\-restore_epoch\fR (short form: \fB\-e\fR) adds (or restores) epoch information to the cluster replication status table\&. This is useful for starting replication on a MySQL Cluster replication slave\&. When this option is used, the row in the @@ -952,7 +442,6 @@ id column is updated if it already exists; such a row is inserted if it does not already exist\&. (See Section\ \&18.6.9, \(lqMySQL Cluster Backups With MySQL Cluster Replication\(rq\&.) .PP -.\" restore_data option (ndb_restore) \fB\-\-restore_data\fR .PP This option causes @@ -961,7 +450,6 @@ to output NDB table data and logs\&. .PP -.\" restore_meta option (ndb_restore) \fB\-\-restore_meta\fR .PP This option causes @@ -970,8 +458,6 @@ to print NDB table metadata\&. Generally, you need only use this option when restoring the first data node of a cluster; additional data nodes can obtain the metadata from the first one\&. .PP -.\" restore-privilege-tables option (ndb_restore) -.\" ndb_restore: restore-privilege-tables option \fB\-\-restore\-privilege\-tables\fR .PP \fBndb_restore\fR @@ -984,8 +470,6 @@ NDB before the backup was taken\&. For more information, see Section\ \&18.5.14, \(lqDistributed MySQL Privileges for MySQL Cluster\(rq\&. .PP -.\" backup_path option (ndb_restore) -.\" ndb_restore: backup_path option \fB\-\-backup_path\fR .PP The path to the backup directory is required; this is supplied to @@ -1046,8 +530,6 @@ file available for each concurrent \fBndb_restore\fR process\&. However, the data files must always be applied before the logs\&. .PP -.\" no-upgrade option (ndb_restore) -.\" ndb_restore: no-upgrade option \fB\-\-no\-upgrade\fR .PP When using @@ -1060,8 +542,6 @@ option (short form: \fB\-u\fR) when running \fBndb_restore\fR\&. .PP -.\" print_data option (ndb_restore) -.\" ndb_restore: print_data option \fB\-\-print_data\fR .PP The @@ -1091,8 +571,6 @@ stdout, or to a file\&. These are similar to some of the options used with .sp -1 .IP \(bu 2.3 .\} -.\" ndb_restore: tab option -.\" tab option (ndb_restore) \fB\-\-tab\fR, \fB\-T\fR .TS @@ -1129,8 +607,6 @@ for the current directory\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_restore: fields-enclosed-by option -.\" fields-enclosed-by option (ndb_restore) \fB\-\-fields\-enclosed\-by=\fR\fB\fIstring\fR\fR .TS allbox tab(:); @@ -1166,8 +642,6 @@ Each column values are enclosed by the string passed to this option (regardless .sp -1 .IP \(bu 2.3 .\} -.\" ndb_restore: fields-optionally-enclosed-by option -.\" fields-optionally-enclosed-by option (ndb_restore) \fB\-\-fields\-optionally\-enclosed\-by=\fR\fB\fIstring\fR\fR .TS allbox tab(:); @@ -1208,8 +682,6 @@ ENUM)\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_restore: fields-terminated-by option -.\" fields-terminated-by option (ndb_restore) \fB\-\-fields\-terminated\-by=\fR\fB\fIstring\fR\fR .TS allbox tab(:); @@ -1246,8 +718,6 @@ The string passed to this option is used to separate column values\&. The defaul .sp -1 .IP \(bu 2.3 .\} -.\" ndb_restore: hex option -.\" hex option (ndb_restore) \fB\-\-hex\fR .TS allbox tab(:); @@ -1270,8 +740,6 @@ If this option is used, all binary values are output in hexadecimal format\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_restore: fields-terminated-by option -.\" fields-terminated-by option (ndb_restore) \fB\-\-fields\-terminated\-by=\fR\fB\fIstring\fR\fR .TS allbox tab(:); @@ -1308,8 +776,6 @@ This option specifies the string used to end each line of output\&. The default .sp -1 .IP \(bu 2.3 .\} -.\" ndb_restore: append option -.\" append option (ndb_restore) \fB\-\-append\fR .TS allbox tab(:); @@ -1346,8 +812,6 @@ option includes the table\*(Aqs hidden primary key\&. .sp .5v .RE .PP -.\" ndb_restore: print_meta option -.\" print_meta option (ndb_restore) \fB\-\-print_meta\fR .PP This option causes @@ -1355,8 +819,6 @@ This option causes to print all metadata to stdout\&. .PP -.\" ndb_restore: print_log option -.\" print_log option (ndb_restore) \fB\-\-print_log\fR .PP The @@ -1366,8 +828,6 @@ option causes to output its log to stdout\&. .PP -.\" ndb_restore: print option -.\" print option (ndb_restore) \fB\-\-print\fR .PP Causes @@ -1402,8 +862,6 @@ makes no attempt to restore data or metadata to a MySQL Cluster\&. .sp .5v .RE .PP -.\" ndb_restore: dont_ignore_systab_0 option -.\" dont_ignore_systab_0 option (ndb_restore) \fB\-\-dont_ignore_systab_0\fR .PP Normally, when restoring table data and metadata, @@ -1415,24 +873,18 @@ system table that is present in the backup\&. causes the system table to be restored\&. \fIThis option is intended for experimental and development use only, and is not recommended in a production environment\fR\&. .PP -.\" ndb_restore: ndb-nodegroup-map option -.\" ndb-nodegroup-map option (ndb_restore) \fB\-\-ndb\-nodegroup\-map\fR, \fB\-z\fR .PP This option can be used to restore a backup taken from one node group to a different node group\&. Its argument is a list of the form \fIsource_node_group\fR, \fItarget_node_group\fR\&. .PP -.\" ndb_restore: no-binlog option -.\" no-binlog option (ndb_restore) \fB\-\-no\-binlog\fR .PP This option prevents any connected SQL nodes from writing data restored by \fBndb_restore\fR to their binary logs\&. .PP -.\" ndb_restore: no-restore-disk-objects option -.\" no-restore-disk-objects option (ndb_restore) \fB\-\-no\-restore\-disk\-objects\fR, \fB\-d\fR .PP @@ -1441,25 +893,24 @@ This option stops from restoring any MySQL Cluster Disk Data objects, such as tablespaces and log file groups; see Section\ \&18.5.12, \(lqMySQL Cluster Disk Data Tables\(rq, for more information about these\&. .PP -.\" ndb_restore: parallelism option -.\" parallelism option (ndb_restore) \fB\-\-parallelism=#\fR, \fB\-p\fR .PP -Determines the maximum number of parallel transactions that +\fBndb_restore\fR +uses single\-row transactions to apply many rows concurrently\&. This parameter determines the number of parallel transactions (concurrent rows) that an instance of \fBndb_restore\fR tries to use\&. By default, this is 128; the minimum is 1, and the maximum is 1024\&. .PP -.\" ndb_restore: progress-frequency option -.\" progress-frequency option (ndb_restore) +The work of performing the inserts is parallelized across the threads in the data nodes involved\&. This mechanism is employed for restoring bulk data from the +\&.Data +file\(emthat is, the fuzzy snapshot of the data; it is not used for building or rebuilding indexes\&. The change log is applied serially; index drops and builds are DDL operations and handled separately\&. There is no thread\-level parallelism on the client side of the restore\&. +.PP \fB\-\-progress\-frequency=\fR\fB\fIN\fR\fR .PP Print a status report each \fIN\fR seconds while the backup is in progress\&. 0 (the default) causes no status reports to be printed\&. The maximum is 65535\&. .PP -.\" ndb_restore: verbose option -.\" verbose option (ndb_restore) \fB\-\-verbose=#\fR .PP Sets the level for the verbosity of the output\&. The minimum is 0; the maximum is 255\&. The default value is 1\&. @@ -1500,8 +951,6 @@ All tables from one or more databases One or more tables from a single database .RE .PP -.\" ndb_restore: include-databases option -.\" include-databases option (ndb_restore) \fB\-\-include\-databases=\fR\fB\fIdb_name\fR\fR\fB[,\fR\fB\fIdb_name\fR\fR\fB][,\&.\&.\&.]\fR .TS allbox tab(:); @@ -1527,8 +976,6 @@ T} .TE .sp 1 .PP -.\" ndb_restore: include-tables option -.\" include-tables option (ndb_restore) \fB\-\-include\-tables=\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB[,\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB][,\&.\&.\&.]\fR .TS allbox tab(:); @@ -1649,8 +1096,6 @@ shell> \fBndb_restore [\&.\&.\&.] \-\-include\-databases=db1,db2 \-\-include\-ta .PP (Again we have omitted other, possibly required, options in the example just shown\&.) .PP -.\" ndb_restore: exclude-databases option -.\" exclude-databases option (ndb_restore) \fB\-\-exclude\-databases=\fR\fB\fIdb_name\fR\fR\fB[,\fR\fB\fIdb_name\fR\fR\fB][,\&.\&.\&.]\fR .TS allbox tab(:); @@ -1676,8 +1121,6 @@ T} .TE .sp 1 .PP -.\" ndb_restore: exclude-tables option -.\" exclude-tables option (ndb_restore) \fB\-\-exclude\-tables=\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB[,\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB][,\&.\&.\&.]\fR .TS allbox tab(:); @@ -1891,8 +1334,6 @@ db1: .RE .\} .PP -.\" ndb_restore: exclude-missing-columns option -.\" exclude-missing-columns option (ndb_restore) \fB\-\-exclude\-missing\-columns\fR .TS allbox tab(:); @@ -1911,8 +1352,6 @@ option\&. When this option is used, \fBndb_restore\fR ignores any columns missing from tables being restored as compared to the versions of those tables found in the backup\&. This option applies to all tables being restored\&. If you wish to apply this option only to selected tables or databases, you can use it in combination with one or more of the options described in the previous paragraph to do so, then restore data to the remaining tables using a complementary set of these options\&. .PP -.\" ndb_restore: exclude-missing-tables option -.\" exclude-missing-tables option (ndb_restore) \fB\-\-exclude\-missing\-tables\fR .TS allbox tab(:); @@ -1935,8 +1374,6 @@ Beginning with MySQL Cluster NDB 7\&.2\&.17, it is also possible to restore only \fBndb_restore\fR to ignore any tables from the backup that are not found in the target database\&. .PP -.\" ndb_restore: disable-indexes option -.\" disable-indexes option (ndb_restore) \fB\-\-disable\-indexes\fR .TS allbox tab(:); @@ -1952,8 +1389,6 @@ T} Disable restoration of indexes during restoration of the data from a native NDB backup\&. Afterwards, you can restore indexes for all tables at once with multi\-threaded building of indexes using \fB\-\-rebuild\-indexes\fR, which should be faster than rebuilding indexes concurrently for very large tables\&. .PP -.\" ndb_restore: rebuild-indexes option -.\" rebuild-indexes option (ndb_restore) \fB\-\-rebuild\-indexes\fR .TS allbox tab(:); @@ -1975,13 +1410,17 @@ backup\&. The number of threads used for building ordered indexes by with this option is controlled by the BuildIndexThreads data node configuration parameter (MySQL Cluster NDB 6\&.3\&.30 and later; MySQL Cluster NDB 7\&.0\&.11 and later)\&. -.\" indexes: and ndb_restore .PP It is necessary to use this option only for the first run of \fBndb_restore\fR; this causes all ordered indexes to be rebuilt without using \fB\-\-rebuild\-indexes\fR again when restoring subsequent nodes\&. You should use this option prior to inserting new rows into the database; otherwise, it is possible for a row to be inserted that later causes a unique constraint violation when trying to rebuild the indexes\&. .PP +Building of ordered indices is parallelized with the number of LDMs by default\&. Offline index builds performed during node and system restarts can be made faster using the +BuildIndexThreads +data node configuration parameter; this parameter has no effect on dropping and rebuilding of indexes by +\fBndb_restore\fR, which is performed online\&. +.PP Rebuilding of unique indexes uses disk write bandwidth for redo logging and local checkpointing\&. An insufficient amount of this bandwith can lead to redo buffer overload or log overload errors\&. In such cases you can run \fBndb_restore\fR \fB\-\-rebuild\-indexes\fR @@ -1990,10 +1429,10 @@ again; the process resumes at the point where the error occurred\&. You can also \fB\-\-rebuild\-indexes\fR indefinitely; you may be able to stop such errors by reducing the value of DiskCheckpointSpeed -to provide additional disk bandwidth to redo logging\&. +to provide additional disk bandwidth to redo logging, or reducing the +\fB\-\-parallelism\fR\&. If the problem is insufficient space, you can increase the size of the redo log (FragmentLogFileSize +node configuration parameter), or you can increase the speed at which LCPs are performed (DiskCheckpointSpeed), in order to free space more quickly\&. .PP -.\" ndb_restore: skip-broken-objects option -.\" skip-broken-objects option (ndb_restore) \fB\-\-skip\-broken\-objects\fR .TS allbox tab(:); @@ -2014,8 +1453,6 @@ backup, and to continue restoring any remaining tables (that are not also corrup \fB\-\-skip\-broken\-objects\fR option works only in the case of missing blob parts tables\&. .PP -.\" ndb_restore: skip-unknown-objects option -.\" skip-unknown-objects option (ndb_restore) \fB\-\-skip\-unknown\-objects\fR .TS allbox tab(:); @@ -2034,8 +1471,6 @@ to ignore any schema objects it does not recognize while reading a native NDB backup\&. This can be used for restoring a backup made from a cluster running MySQL Cluster NDB 7\&.2 to a cluster running MySQL Cluster NDB 7\&.1\&. .PP -.\" ndb_restore: rewrite-database option -.\" rewrite-database option (ndb_restore) \fB\-\-rewrite\-database=\fR\fB\fIold_dbname\fR\fR\fB,\fR\fB\fInew_dbname\fR\fR .TS allbox tab(:); @@ -2127,8 +1562,6 @@ When restoring from multiple backup databases into a single target database usin .sp .5v .RE .PP -.\" ndb_restore: exclude-intermediate-sql-tables option -.\" exclude-intermediate-sql-tables option (ndb_restore) \fB\-\-exclude\-intermediate\-sql\-tables[=TRUE|FALSE]\fR .TS allbox tab(:); @@ -2179,8 +1612,7 @@ The \fB\-\-exclude\-intermediate\-sql\-tables\fR option was introduced in MySQL Cluster NDB 7\&.2\&.17\&. (Bug #17882305) .PP -\fBError reporting\fR. .\" ndb_restore: errors -\fBndb_restore\fR +\fBError reporting\fR. \fBndb_restore\fR reports both temporary and permanent errors\&. In the case of temporary errors, it may able to recover from them, and reports Restore successful, but encountered temporary error, please look at configuration in such cases\&. diff --git a/man/ndb_select_all.1 b/man/ndb_select_all.1 index 5975affbdb58..f1b094497b59 100644 --- a/man/ndb_select_all.1 +++ b/man/ndb_select_all.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_ALL\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_ALL\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_select_all .SH "NAME" ndb_select_all \- print rows from an NDB table .SH "SYNOPSIS" @@ -61,177 +60,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.83.\ \& This table describes command-line options for the ndb_select_all program +.B Table\ \&18.83.\ \& This table describes command\-line options for the ndb_select_all program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l. -T{ -.PP ---database=dbname, -.PP --d -T}:T{ -Name of the database in which the table is found -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---parallelism=#, -.PP --p -T}:T{ -Degree of parallelism -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---lock=#, -.PP --l -T}:T{ -Lock type -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---order=index, -.PP --o -T}:T{ -Sort resultset according to index whose name is supplied -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---descending, -.PP --z -T}:T{ -Sort resultset in descending order (requires order flag) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---header, -.PP --h -T}:T{ -Print header (set to 0|FALSE to disable headers in output) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---useHexFormat, -.PP --x -T}:T{ -Output numbers in hexadecimal format -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---delimiter=char, -.PP --D -T}:T{ -Set a column delimiter -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---disk -T}:T{ -Print disk references (useful only for Disk Data tables having - nonindexed columns) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---rowid -T}:T{ -Print rowid -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---gci -T}:T{ -Include GCI in output -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---gci64 -T}:T{ -Include GCI and row epoch in output -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---tup, -.PP --t -T}:T{ -Scan in tup order -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---nodata -T}:T{ -Do not print table column data -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .sp @@ -243,7 +75,6 @@ T} .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: database option \fB\-\-database=\fR\fB\fIdbname\fR\fR, \fB\-d\fR \fIdbname\fR @@ -260,7 +91,6 @@ TEST_DB\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: parallelism option \fBparallelism=\fR\fB\fI#\fR\fR, \fB\-p\fR \fI#\fR @@ -276,8 +106,6 @@ Specifies the degree of parallelism\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: lock option -.\" lock option: ndb_select_all \fB\-\-lock=\fR\fB\fIlock_type\fR\fR, \fB\-l \fR\fB\fIlock_type\fR\fR .sp @@ -329,8 +157,6 @@ There is no default value for this option\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: order option -.\" order option: ndb_select_all \fB\-\-order=\fR\fB\fIindex_name\fR\fR, \fB\-o \fR\fB\fIindex_name\fR\fR .sp @@ -346,8 +172,6 @@ Orders the output according to the index named .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: descending option -.\" descending option: ndb_select_all \fB\-\-descending\fR, \fB\-z\fR .sp @@ -364,8 +188,6 @@ Sorts the output in descending order\&. This option can be used only in conjunct .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: header option -.\" header option: ndb_select_all \fB\-\-header=FALSE\fR .sp Excludes column headers from the output\&. @@ -379,8 +201,6 @@ Excludes column headers from the output\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: useHexFormat option -.\" useHexFormat option: ndb_select_all \fB\-\-useHexFormat\fR \fB\-x\fR .sp @@ -395,8 +215,6 @@ Causes all numeric values to be displayed in hexadecimal format\&. This does not .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: delimiter option -.\" delimiter option: ndb_select_all \fB\-\-delimiter=\fR\fB\fIcharacter\fR\fR, \fB\-D \fR\fB\fIcharacter\fR\fR .sp @@ -415,8 +233,6 @@ The default delimiter is the tab character\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: disk option -.\" disk option: ndb_select_all \fB\-\-disk\fR .sp Adds a disk reference column to the output\&. The column is nonempty only for Disk Data tables having nonindexed columns\&. @@ -430,8 +246,6 @@ Adds a disk reference column to the output\&. The column is nonempty only for Di .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: rowid option -.\" rowid option: ndb_select_all \fB\-\-rowid\fR .sp Adds a @@ -447,8 +261,6 @@ column providing information about the fragments in which rows are stored\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: gci option -.\" gci option: ndb_select_all \fB\-\-gci\fR .sp Adds a @@ -466,8 +278,6 @@ Section\ \&18.5.6.2, \(lqMySQL Cluster Log Events\(rq, for more information abou .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: gci64 option -.\" gci64 option: ndb_select_all \fB\-\-gci64\fR .sp Adds a @@ -483,8 +293,6 @@ column to the output showing the global checkpoint at which each row was last up .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: tupscan option -.\" tupscan option: ndb_select_all \fB\-\-tupscan\fR, \fB\-t\fR .sp @@ -499,8 +307,6 @@ Scan the table in the order of the tuples\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_select_all: nodata option -.\" nodata option: ndb_select_all \fB\-\-nodata\fR .sp Causes any table data to be omitted\&. diff --git a/man/ndb_select_count.1 b/man/ndb_select_count.1 index 84f21fe72b1a..b7a74b442aeb 100644 --- a/man/ndb_select_count.1 +++ b/man/ndb_select_count.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_select_count\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_COUNT\" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_COUNT\" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_select_count .SH "NAME" ndb_select_count \- print row counts for NDB tables .SH "SYNOPSIS" @@ -61,54 +60,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.84.\ \& This table describes command-line options for the ndb_select_count program +.B Table\ \&18.84.\ \& This table describes command\-line options for the ndb_select_count program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l. -T{ -.PP ---database=dbname, -.PP --d -T}:T{ -Name of the database in which the table is found -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---parallelism=#, -.PP --p -T}:T{ -Degree of parallelism -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---lock=#, -.PP --l -T}:T{ -Lock type -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .PP diff --git a/man/ndb_show_tables.1 b/man/ndb_show_tables.1 index 5e3247c9afa1..98a9421cb729 100644 --- a/man/ndb_show_tables.1 +++ b/man/ndb_show_tables.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_show_tables\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SHOW_TABLES\F" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SHOW_TABLES\F" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_show_tables .SH "NAME" ndb_show_tables \- display list of NDB tables .SH "SYNOPSIS" @@ -52,88 +51,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.85.\ \& This table describes command-line options for the ndb_show_tables program +.B Table\ \&18.85.\ \& This table describes command\-line options for the ndb_show_tables program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l -l l l -l l l. -T{ -.PP ---database=string, -.PP --d -T}:T{ -Specifies the database in which the table is found -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---loops=#, -.PP --l -T}:T{ -Number of times to repeat output -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---type=#, -.PP --t -T}:T{ -Limit output to objects of this type -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---unqualified, -.PP --u -T}:T{ -Do not qualify table names -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---parsable, -.PP --p -T}:T{ -Return output suitable for MySQL LOAD DATA INFILE statement -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---show-temp-status -T}:T{ -Show table temporary flag -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 Usage @@ -156,8 +77,6 @@ ndb_show_tables [\-c \fIconnection_string\fR] .sp -1 .IP \(bu 2.3 .\} -.\" ndb_show_tables: database option -.\" database option: ndb_show_tables \fB\-\-database\fR, \fB\-d\fR .sp @@ -172,8 +91,6 @@ Specifies the name of the database in which the tables are found\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_show_tables: loops option -.\" loops option: ndb_show_tables \fB\-\-loops\fR, \fB\-l\fR .sp @@ -188,8 +105,6 @@ Specifies the number of times the utility should execute\&. This is 1 when this .sp -1 .IP \(bu 2.3 .\} -.\" ndb_show_tables: parsable option -.\" parsable option: ndb_show_tables \fB\-\-parsable\fR, \fB\-p\fR .sp @@ -205,8 +120,6 @@ LOAD DATA INFILE\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_show_tables: show-temp-status option -.\" show-temp-status option: ndb_show_tables \fB\-\-show\-temp\-status\fR .sp If specified, this causes temporary tables to be displayed\&. @@ -220,8 +133,6 @@ If specified, this causes temporary tables to be displayed\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_show_tables: type option -.\" type option: ndb_show_tables \fB\-\-type\fR, \fB\-t\fR .sp @@ -273,8 +184,6 @@ database objects to be listed (the default)\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_show_tables: unqualified option -.\" unqualified option: ndb_show_tables \fB\-\-unqualified\fR, \fB\-u\fR .sp diff --git a/man/ndb_size.pl.1 b/man/ndb_size.pl.1 index 7d556f9843da..a0932f3e7767 100644 --- a/man/ndb_size.pl.1 +++ b/man/ndb_size.pl.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_size.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SIZE\&.PL\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SIZE\&.PL\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_size.pl .SH "NAME" ndb_size.pl \- NDBCLUSTER Size Requirement Estimator .SH "SYNOPSIS" @@ -102,130 +101,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.86.\ \& This table describes command-line options for the ndb_size.pl program +.B Table\ \&18.86.\ \& This table describes command\-line options for the ndb_size\&.pl program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l. -T{ -.PP ---database=dbname -T}:T{ -The database or databases to examine; accepts a comma-delimited list; - the default is ALL (use all databases found on the server) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---hostname[:port] -T}:T{ -Specify host and optional port as host[:port] -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---socket=file_name -T}:T{ -Specify a socket to connect to -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---user=string -T}:T{ -Specify a MySQL user name -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---password=string -T}:T{ -Specify a MySQL user password -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---format=string -T}:T{ -Set output format (text or HTML) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---excludetables=tbl_list -T}:T{ -Skip any tables in a comma-separated list of tables -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---excludedbs=db_list -T}:T{ -Skip any databases in a comma-separated list of databases -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---savequeries=file -T}:T{ -Saves all queries to the database into the file specified -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---loadqueries=file -T}:T{ -Loads all queries from the file specified; does not connect to a - database -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---real_table_name=table -T}:T{ -Designates a table to handle unique index size calculations -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 Usage diff --git a/man/ndb_waiter.1 b/man/ndb_waiter.1 index 770666c8e237..e6639dd53e59 100644 --- a/man/ndb_waiter.1 +++ b/man/ndb_waiter.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndb_waiter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_WAITER\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_WAITER\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndb_waiter .SH "NAME" ndb_waiter \- wait for MySQL Cluster to reach a given status .SH "SYNOPSIS" @@ -142,85 +141,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.87.\ \& This table describes command-line options for the ndb_waiter program +.B Table\ \&18.87.\ \& This table describes command\-line options for the ndb_waiter program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l -l l l -l l l. -T{ -.PP ---no-contact, -.PP --n -T}:T{ -Wait for cluster to reach NO CONTACT state -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---not-started -T}:T{ -Wait for cluster to reach NOT STARTED state -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---single-user -T}:T{ -Wait for cluster to enter single user mode -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---timeout=#, -.PP --t -T}:T{ -Wait this many seconds, then exit whether or not cluster has reached - desired state; default is 2 minutes (120 seconds) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---nowait-nodes=list -T}:T{ -List of nodes not to be waited for. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---wait-nodes=list, -.PP --w -T}:T{ -List of nodes to be waited for. -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 Usage @@ -244,8 +168,6 @@ Additional Options .sp -1 .IP \(bu 2.3 .\} -.\" ndb_waiter: no-contact option -.\" no-contact option: ndb_waiter \fB\-\-no\-contact\fR, \fB\-n\fR .sp @@ -266,8 +188,6 @@ status before exiting\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_waiter: not-started option -.\" not-started option: ndb_waiter \fB\-\-not\-started\fR .sp Instead of waiting for the @@ -287,8 +207,6 @@ status before exiting\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_waiter: timeout option -.\" timeout option: ndb_waiter \fB\-\-timeout=\fR\fB\fIseconds\fR\fR, \fB\-t \fR\fB\fIseconds\fR\fR .sp @@ -303,8 +221,6 @@ Time to wait\&. The program exits if the desired state is not achieved within th .sp -1 .IP \(bu 2.3 .\} -.\" ndb_waiter: single-user option -.\" single-user option: ndb_waiter \fB\-\-single\-user\fR .sp The program waits for the cluster to enter single user mode\&. @@ -318,8 +234,6 @@ The program waits for the cluster to enter single user mode\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_waiter: nowait-nodes option -.\" nowait-nodes option: ndb_waiter \fB\-\-nowait\-nodes=\fR\fB\fIlist\fR\fR .sp When this option is used, ndb_waiter does not wait for the nodes whose IDs are listed\&. The list is comma\-delimited; ranges can be indicated by dashes, as shown here: @@ -362,8 +276,6 @@ option\&. .sp -1 .IP \(bu 2.3 .\} -.\" ndb_waiter: wait-nodes option -.\" wait-nodes option: ndb_waiter \fB\-\-wait\-nodes=\fR\fB\fIlist\fR\fR, \fB\-w \fR\fB\fIlist\fR\fR .sp diff --git a/man/ndbd.8 b/man/ndbd.8 index ef311305b376..8d667ab90000 100644 --- a/man/ndbd.8 +++ b/man/ndbd.8 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndbd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD\FR" "8" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD\FR" "8" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndbd -.\" MySQL Cluster: ndbd -.\" MySQL Cluster: data nodes -.\" data nodes (MySQL Cluster) -.\" storage nodes - see data nodes, ndbd .SH "NAME" ndbd \- the MySQL Cluster data node daemon .SH "SYNOPSIS" @@ -45,10 +40,6 @@ is the process that is used to handle all the data in tables using the NDB Clust In a MySQL Cluster, a set of \fBndbd\fR processes cooperate in handling data\&. These processes can execute on the same computer (host) or on different computers\&. The correspondences between data nodes and Cluster hosts is completely configurable\&. -.\" MySQL Cluster: administration -.\" MySQL Cluster: commands -.\" command options (MySQL Cluster): ndbd -.\" MySQL Cluster: ndbd process .PP The following table includes command options specific to the MySQL Cluster data node program \fBndbd\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including @@ -59,150 +50,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.69.\ \& This table describes command-line options for the ndbd program +.B Table\ \&18.69.\ \& This table describes command\-line options for the ndbd program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l -l l l. -T{ -.PP ---initial -T}:T{ -Perform initial start of ndbd, including cleaning the file system. - Consult the documentation before using this option -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---nostart, -.PP --n -T}:T{ -Don't start ndbd immediately; ndbd waits for command to start from - ndb_mgmd -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---daemon, -.PP --d -T}:T{ -Start ndbd as daemon (default); override with --nodaemon -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---nodaemon -T}:T{ -Do not start ndbd as daemon; provided for testing purposes -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---foreground -T}:T{ -Run ndbd in foreground, provided for debugging purposes (implies - --nodaemon) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---nowait-nodes=list -T}:T{ -Do not wait for these data nodes to start (takes comma-separated list of - node IDs). Also requires --ndb-nodeid to be used. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---initial-start -T}:T{ -Perform partial initial start (requires --nowait-nodes) -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---bind-address=name -T}:T{ -Local bind address -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---install[=name] -T}:T{ -Used to install the data node process as a Windows service. Does not - apply on non-Windows platforms. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---remove[=name] -T}:T{ -Used to remove a data node process that was previously installed as a - Windows service. Does not apply on non-Windows platforms. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---connect-retries=# -T}:T{ -Set the number of times to retry a connection before giving up; 0 means - 1 attempt only (and no retries) -T}:T{ -.PP -ADDED: NDB 7.2.9 -T} -T{ -.PP ---connect-delay=# -T}:T{ -Time to wait between attempts to contact a management server, in - seconds; 0 means do not wait between attempts -T}:T{ -.PP -ADDED: NDB 7.2.9 -T} +. .TE .sp 1 .if n \{\ @@ -416,8 +267,6 @@ on Windows platforms\&. .sp -1 .IP \(bu 2.3 .\} -.\" initial option (ndbd) -.\" initial option (ndbmtd) \fB\-\-initial\fR .TS allbox tab(:); @@ -550,8 +399,6 @@ necessary to do so\&. .sp -1 .IP \(bu 2.3 .\} -.\" initial-start option (ndbd) -.\" initial-start option (ndbmtd) \fB\-\-initial\-start\fR .TS allbox tab(:); @@ -625,8 +472,6 @@ option for .sp -1 .IP \(bu 2.3 .\} -.\" nowait-nodes option (ndbd) -.\" nowait-nodes option (ndbmtd) \fB\-\-nowait\-nodes=\fR\fB\fInode_id_1\fR\fR\fB[, \fR\fB\fInode_id_2\fR\fR\fB[, \&.\&.\&.]]\fR .TS allbox tab(:); @@ -676,10 +521,6 @@ If you wanted to start up the same cluster as in the previous example without on .sp -1 .IP \(bu 2.3 .\} -.\" nostart option (ndbd) -.\" -n option (ndbd) -.\" nostart option (ndbmtd) -.\" -n option (ndbmtd) \fB\-\-nostart\fR, \fB\-n\fR .TS @@ -724,8 +565,6 @@ Section\ \&18.5.2, \(lqCommands in the MySQL Cluster Management Client\(rq)\&. .sp -1 .IP \(bu 2.3 .\} -.\" install option (ndbd) -.\" install option (ndbmtd) \fB\-\-install[=\fR\fB\fIname\fR\fR\fB]\fR .TS allbox tab(:); @@ -794,8 +633,6 @@ option has no effect on non\-Windows platforms\&. .sp -1 .IP \(bu 2.3 .\} -.\" remove option (ndbd) -.\" remove option (ndbmtd) \fB\-\-remove[=\fR\fB\fIname\fR\fR\fB]\fR .TS allbox tab(:); @@ -845,8 +682,6 @@ option has no effect on non\-Windows platforms\&. .sp -1 .IP \(bu 2.3 .\} -.\" connect-retries option (ndbd) -.\" connect-retries option (ndbmtd) \fB\-\-connect\-retries=\fR\fB\fI#\fR\fR .TS allbox tab(:); @@ -905,8 +740,6 @@ This option was added in MySQL Cluster NDB 7\&.2\&.9\&. .sp -1 .IP \(bu 2.3 .\} -.\" connect-delay option (ndbd) -.\" connect-delay option (ndbmtd) \fB\-\-connect\-delay=\fR\fB\fI#\fR\fR .TS allbox tab(:); @@ -956,8 +789,6 @@ option)\&. The default is 5 attempts\&. .sp This option was added in MySQL Cluster NDB 7\&.2\&.9\&. .RE -.\" MySQL Cluster: log files -.\" log files (MySQL Cluster) .PP \fBndbd\fR generates a set of log files which are placed in the directory specified by @@ -983,8 +814,6 @@ is the error log generated by the data node whose node ID is .sp -1 .IP \(bu 2.3 .\} -.\" MySQL Cluster: error logs -.\" error logs (MySQL Cluster) ndb_\fInode_id\fR_error\&.log is a file containing records of all crashes which the referenced \fBndbd\fR @@ -1043,8 +872,6 @@ file (see below)\&. Error log entries are thus overwritten in a cyclical and not .sp -1 .IP \(bu 2.3 .\} -.\" MySQL Cluster: trace files -.\" trace files (MySQL Cluster) ndb_\fInode_id\fR_trace\&.log\&.\fItrace_id\fR is a trace file describing exactly what happened just before the error occurred\&. This information is useful for analysis by the MySQL Cluster development team\&. .sp diff --git a/man/ndbd_redo_log_reader.1 b/man/ndbd_redo_log_reader.1 index 011eeebe8490..60a29aa8e4e8 100644 --- a/man/ndbd_redo_log_reader.1 +++ b/man/ndbd_redo_log_reader.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndbd_redo_log_reader\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD_REDO_LOG_REA" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD_REDO_LOG_REA" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndbd_redo_log_reader .SH "NAME" ndbd_redo_log_reader \- check and print content of cluster redo log .SH "SYNOPSIS" @@ -55,48 +54,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.81.\ \& This table describes command-line options for the ndbd_redo_log_reader program +.B Table\ \&18.81.\ \& This table describes command\-line options for the ndbd_redo_log_reader program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l. -T{ -.PP --noprint -T}:T{ -Do not print records -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP --nocheck -T}:T{ -Do not check records for errors -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---help -T}:T{ -Print usage information -T}:T{ -.PP -ADDED: NDB 7.2.15 -T} +. .TE .sp 1 Usage diff --git a/man/ndbinfo_select_all.1 b/man/ndbinfo_select_all.1 index 4ffc366bc5d8..72b29f3cde26 100644 --- a/man/ndbinfo_select_all.1 +++ b/man/ndbinfo_select_all.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndbinfo_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBINFO_SELECT_AL" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBINFO_SELECT_AL" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndbinfo_select_all -.\" MySQL Cluster: ndbinfo_select_all .SH "NAME" ndbinfo_select_all \- select from ndbinfo tables .SH "SYNOPSIS" @@ -106,8 +104,6 @@ shell> .if n \{\ .RE .\} -.sp -.\" command options (MySQL Cluster): ndbinfo_select_all .PP The following table includes options that are specific to \fBndbinfo_select_all\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including @@ -118,64 +114,10 @@ Options Common to MySQL Cluster Programs(1)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.70.\ \& This table describes command-line options for the ndbinfo_select_all program +.B Table\ \&18.70.\ \& This table describes command\-line options for the ndbinfo_select_all program .TS allbox tab(:); -lB lB lB. -T{ -Format -T}:T{ -Description -T}:T{ -Added or Removed -T} -.T& -l l l -l l l -l l l -l l l. -T{ -.PP ---delay=# -T}:T{ -Set the delay in seconds between loops. Default is 5. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---loops=#, -.PP --l -T}:T{ -Set the number of times to perform the select. Default is 1. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---database=db_name, -.PP --d -T}:T{ -Name of the database where the table located. -T}:T{ -.PP -All MySQL 5.5 based releases -T} -T{ -.PP ---parallelism=#, -.PP --p -T}:T{ -Set the degree of parallelism. -T}:T{ -.PP -All MySQL 5.5 based releases -T} +. .TE .sp 1 .sp @@ -187,7 +129,6 @@ T} .sp -1 .IP \(bu 2.3 .\} -.\" delay option (ndbinfo_select_all) \fB\-\-delay=\fR\fBseconds\fR .TS allbox tab(:); @@ -238,8 +179,6 @@ is set to 0 or 1\&. .sp -1 .IP \(bu 2.3 .\} -.\" loops option (ndbinfo_select_all) -.\" -l option (ndbinfo_select_all) \fB\-\-loops=\fR\fBnumber\fR, \fB\-l \fR\fB\fInumber\fR\fR .TS diff --git a/man/ndbmtd.8 b/man/ndbmtd.8 index bf39d8e09d04..5c06d1d34065 100644 --- a/man/ndbmtd.8 +++ b/man/ndbmtd.8 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBndbmtd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBMTD\FR" "8" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBMTD\FR" "8" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,11 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" ndbmtd -.\" MySQL Cluster: ndbmtd -.\" MySQL Cluster: data nodes -.\" data nodes (MySQL Cluster) -.\" storage nodes - see data nodes, ndbd, ndbmtd .SH "NAME" ndbmtd \- the MySQL Cluster data node daemon (multi\-threaded version) .SH "SYNOPSIS" @@ -124,11 +119,6 @@ processes in a somewhat different fashion from how these are generated by \fBndbd\fR failures\&. These differences are discussed in more detail in the next few paragraphs\&. .RE -.\" ndbmtd: trace files -.\" trace files: ndbmtd -.\" MySQL Cluster: log files -.\" log files (MySQL Cluster): ndbmtd -.\" ndbmtd: trace files .PP Like \fBndbd\fR, diff --git a/man/perror.1 b/man/perror.1 index 83ba411e6826..5bbfdf3455d7 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,10 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" perror -.\" error messages: displaying -.\" errno -.\" Errcode .SH "NAME" perror \- explain error codes .SH "SYNOPSIS" @@ -115,8 +111,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" perror: help option -.\" help option: perror \fB\-\-help\fR, \fB\-\-info\fR, \fB\-I\fR, @@ -133,8 +127,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" perror: ndb option -.\" ndb option: perror \fB\-\-ndb\fR .sp Print the error message for a MySQL Cluster error code\&. @@ -148,8 +140,6 @@ Print the error message for a MySQL Cluster error code\&. .sp -1 .IP \(bu 2.3 .\} -.\" perror: silent option -.\" silent option: perror \fB\-\-silent\fR, \fB\-s\fR .sp @@ -164,8 +154,6 @@ Silent mode\&. Print only the error message\&. .sp -1 .IP \(bu 2.3 .\} -.\" perror: verbose option -.\" verbose option: perror \fB\-\-verbose\fR, \fB\-v\fR .sp @@ -180,8 +168,6 @@ Verbose mode\&. Print error code and message\&. This is the default behavior\&. .sp -1 .IP \(bu 2.3 .\} -.\" perror: version option -.\" version option: perror \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/man/replace.1 b/man/replace.1 index b749dcbd5359..ed12caea01d7 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,8 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" replace utility -.\" string replacement: replace utility .SH "NAME" replace \- a string\-replacement utility .SH "SYNOPSIS" diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index e54b5582cb3f..bda24b5f462b 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" resolve_stack_dump .SH "NAME" resolve_stack_dump \- resolve numeric stack trace dump to symbols .SH "SYNOPSIS" @@ -68,8 +67,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolve_stack_dump: help option -.\" help option: resolve_stack_dump \fB\-\-help\fR, \fB\-h\fR .sp @@ -84,8 +81,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolve_stack_dump: numeric-dump-file option -.\" numeric-dump-file option: resolve_stack_dump \fB\-\-numeric\-dump\-file=\fR\fB\fIfile_name\fR\fR, \fB\-n \fR\fB\fIfile_name\fR\fR .sp @@ -100,8 +95,6 @@ Read the stack trace from the given file\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolve_stack_dump: symbols-file option -.\" symbols-file option: resolve_stack_dump \fB\-\-symbols\-file=\fR\fB\fIfile_name\fR\fR, \fB\-s \fR\fB\fIfile_name\fR\fR .sp @@ -116,8 +109,6 @@ Use the given symbols file\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolve_stack_dump: version option -.\" version option: resolve_stack_dump \fB\-\-version\fR, \fB\-V\fR .sp diff --git a/man/resolveip.1 b/man/resolveip.1 index 8fb9200bcdc3..3690425d9d8d 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -1,13 +1,13 @@ '\" t .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 03/01/2016 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 05/13/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "03/01/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -27,7 +27,6 @@ .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.\" resolveip .SH "NAME" resolveip \- resolve host name to IP address or vice versa .SH "SYNOPSIS" @@ -64,8 +63,6 @@ supports the following options\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolveip: help option -.\" help option: resolveip \fB\-\-help\fR, \fB\-\-info\fR, \fB\-?\fR, @@ -82,8 +79,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolveip: silent option -.\" silent option: resolveip \fB\-\-silent\fR, \fB\-s\fR .sp @@ -98,8 +93,6 @@ Silent mode\&. Produce less output\&. .sp -1 .IP \(bu 2.3 .\} -.\" resolveip: version option -.\" version option: resolveip \fB\-\-version\fR, \fB\-V\fR .sp From 6323fccd3bcae1521ef6b3d670ad9b7f92fcdf6e Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 9 Aug 2016 12:33:33 +0300 Subject: [PATCH 083/305] Bump WSREP_PATCH_VERSION to 17 --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 2bc3139d2aa5..c293c2f67e08 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "16") +SET(WSREP_PATCH_VERSION "17") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From d285bf9501d2b17cc842c660011fc02b66f7ee54 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 13 Sep 2016 11:55:21 +0300 Subject: [PATCH 084/305] Refs: MW-303 fix after mysql 5.5.52 merge * same issue happened in 5.6.33 merge as well --- sql/wsrep_hton.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index 61072eec1cbf..90d9daa2f699 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -395,7 +395,8 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) "sql_log_bin: %d, " "wsrep status (%d %d %d)", thd->query(), thd->stmt_da->affected_rows(), - stmt_has_updated_trans_table(thd), thd->variables.sql_log_bin, + stmt_has_updated_trans_table(thd->transaction.stmt.ha_list), + thd->variables.sql_log_bin, thd->wsrep_exec_mode, thd->wsrep_query_state, thd->wsrep_conflict_state); } From 76954554f6c8150603bbe7351027717ad48a5fa3 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 14 Sep 2016 14:25:44 +0300 Subject: [PATCH 085/305] Man pages from 5.5.52 --- man/comp_err.1 | 8 +- man/innochecksum.1 | 4 +- man/msql2mysql.1 | 4 +- man/my_print_defaults.1 | 4 +- man/myisam_ftdump.1 | 4 +- man/myisamchk.1 | 4 +- man/myisamlog.1 | 4 +- man/myisampack.1 | 4 +- man/mysql-stress-test.pl.1 | 4 +- man/mysql-test-run.pl.1 | 136 ++++++++++++++++++++++--------- man/mysql.1 | 23 +++--- man/mysql.server.1 | 4 +- man/mysql_client_test.1 | 4 +- man/mysql_config.1 | 4 +- man/mysql_convert_table_format.1 | 4 +- man/mysql_find_rows.1 | 4 +- man/mysql_fix_extensions.1 | 4 +- man/mysql_install_db.1 | 4 +- man/mysql_plugin.1 | 6 +- man/mysql_secure_installation.1 | 4 +- man/mysql_setpermission.1 | 4 +- man/mysql_tzinfo_to_sql.1 | 4 +- man/mysql_upgrade.1 | 8 +- man/mysql_waitpid.1 | 4 +- man/mysql_zap.1 | 4 +- man/mysqlaccess.1 | 4 +- man/mysqladmin.1 | 8 +- man/mysqlbinlog.1 | 4 +- man/mysqlbug.1 | 4 +- man/mysqlcheck.1 | 8 +- man/mysqld.8 | 4 +- man/mysqld_multi.1 | 8 +- man/mysqld_safe.1 | 14 +++- man/mysqldump.1 | 8 +- man/mysqldumpslow.1 | 4 +- man/mysqlhotcopy.1 | 4 +- man/mysqlimport.1 | 8 +- man/mysqlshow.1 | 8 +- man/mysqlslap.1 | 8 +- man/mysqltest.1 | 4 +- man/ndb-common-options.1 | 4 +- man/ndb_blob_tool.1 | 8 +- man/ndb_config.1 | 14 ++-- man/ndb_cpcd.1 | 4 +- man/ndb_delete_all.1 | 4 +- man/ndb_desc.1 | 8 +- man/ndb_drop_index.1 | 6 +- man/ndb_drop_table.1 | 4 +- man/ndb_error_reporter.1 | 4 +- man/ndb_index_stat.1 | 4 +- man/ndb_mgm.1 | 4 +- man/ndb_mgmd.8 | 4 +- man/ndb_print_backup_file.1 | 4 +- man/ndb_print_file.1 | 4 +- man/ndb_print_schema_file.1 | 6 +- man/ndb_print_sys_file.1 | 4 +- man/ndb_restore.1 | 6 +- man/ndb_select_all.1 | 4 +- man/ndb_select_count.1 | 4 +- man/ndb_show_tables.1 | 4 +- man/ndb_size.pl.1 | 12 +-- man/ndb_waiter.1 | 4 +- man/ndbd.8 | 4 +- man/ndbd_redo_log_reader.1 | 4 +- man/ndbinfo_select_all.1 | 6 +- man/ndbmtd.8 | 4 +- man/perror.1 | 4 +- man/replace.1 | 4 +- man/resolve_stack_dump.1 | 4 +- man/resolveip.1 | 4 +- 70 files changed, 289 insertions(+), 224 deletions(-) diff --git a/man/comp_err.1 b/man/comp_err.1 index d796ac936e92..1af5285eb163 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -2,12 +2,12 @@ .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -44,7 +44,7 @@ to determine the error messages to display for different error codes\&. normally is run automatically when MySQL is built\&. It compiles the errmsg\&.sys file from the text file located at -sql/share/errmsg\&.txt +sql/share/errmsg\-utf8\&.txt in MySQL source distributions\&. .PP \fBcomp_err\fR @@ -162,7 +162,7 @@ mysqld_error\&.h\&. \fB\-F \fR\fB\fIfile_name\fR\fR .sp The name of the input file\&. The default is -\&.\&./sql/share/errmsg\&.txt\&. +\&.\&./sql/share/errmsg\-utf8\&.txt\&. .RE .sp .RS 4 diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 7b0f6cc39fa1..021b6bf4a46f 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -2,12 +2,12 @@ .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 index 0353ddde5ff3..378e693e75de 100644 --- a/man/msql2mysql.1 +++ b/man/msql2mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmsql2mysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMSQL2MYSQL\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMSQL2MYSQL\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index 6faa03a8e612..1b5cb1716bbd 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -2,12 +2,12 @@ .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index c33142719adf..a22b306e2a88 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisamchk.1 b/man/myisamchk.1 index badeef9e30c4..91019f848ab0 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisamlog.1 b/man/myisamlog.1 index adabadffad11..3f18134f2f2d 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisampack.1 b/man/myisampack.1 index 1bf12164db39..d59d70494e46 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index 58e7cf176415..9b1116b8582b 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "05/13/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "08/25/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index 8c8241848f5e..553fa257edf8 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "05/13/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "08/25/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -166,7 +166,7 @@ testa with anything in between\&. In the latter case, the pattern match is not anchored to the beginning of the test name, so it also matches names such as xmainytesta\&. .PP -From MySQL 5\&.7 it is possible to put a list of test names in a file and have +As of MySQL 5\&.7, it is possible to put a list of test names in a file and have \fBmysql\-test\-run\&.pl\fR run those tests, using the option \fB\-\-do\-test\-list=\fR\fB\fIfile\fR\fR\&. The tests should be listed one per line in the file, using the fully qualified name @@ -174,6 +174,14 @@ run those tests, using the option # indicates a comment and is ignored\&. .PP +As of MySQL 8\&.0, +\fBmysql\-test\-run\&.pl\fR +supports a +\fB\-\-do\-suite\fR +option, which is similar to +\fB\-\-do\-test\fR +but permits specifying entire suites of tests to run\&. +.PP To perform setup prior to running tests, \fBmysql\-test\-run\&.pl\fR needs to invoke @@ -253,8 +261,14 @@ l l l l l l l l +l l l l. T{ +MTR_BUILD_THREAD +T}:T{ +If set, defines which port number range is used for the server +T} +T{ MTR_MEM T}:T{ If set to anything, will run tests with files in "memory" using tmpfs or @@ -262,20 +276,10 @@ If set to anything, will run tests with files in "memory" using tmpfs or \fB\-\-mem\fR option T} T{ -MTR_PARALLEL -T}:T{ -If set, defines number of parallel threads executing tests\&. Same as - \fB\-\-parallel\fR option -T} -T{ -MTR_BUILD_THREAD -T}:T{ -If set, defines which port number range is used for the server -T} -T{ -MTR_PORT_BASE +MTR_MAX_PARALLEL T}:T{ -If set, defines which port number range is used for the server +If set, defines maximum number of parallel threads if + \fB\-\-parallel=auto\fR is given T} T{ MTR_\fINAME\fR_TIMEOUT @@ -292,6 +296,17 @@ Setting of a timeout in minutes or seconds, corresponding to command MySQL 5\&.8\&.0\&. T} T{ +MTR_PARALLEL +T}:T{ +If set, defines number of parallel threads executing tests\&. Same as + \fB\-\-parallel\fR option +T} +T{ +MTR_PORT_BASE +T}:T{ +If set, defines which port number range is used for the server +T} +T{ MYSQL_CONFIG_EDITOR T}:T{ Path name to \fBmysql_config_editor\fR binary\&. Supported as @@ -303,6 +318,12 @@ T}:T{ Path name to \fBmysqltest\fR binary T} T{ +MYSQL_TEST_DIR +T}:T{ +Full path to the mysql\-test directory where tests + are being run from +T} +T{ MYSQL_TEST_LOGIN_FILE T}:T{ Path name to login file used by \fBmysql_config_editor\fR\&. @@ -312,6 +333,17 @@ Path name to login file used by \fBmysql_config_editor\fR\&. Windows\&. Supported as of MySQL 5\&.6\&.6\&. T} T{ +MYSQL_TMP_DIR +T}:T{ +Path to temp directory used for temporary files during tests +T} +T{ +MYSQLD +T}:T{ +Full path to server executable used in tests\&. Supported as of MySQL + 5\&.5\&.17\&. +T} +T{ MYSQLD_BOOTSTRAP T}:T{ Full path name to \fBmysqld\fR that has all options enabled @@ -322,12 +354,6 @@ T}:T{ Full command line used for initial database setup for this test batch T} T{ -MYSQLD -T}:T{ -Full path to server executable used in tests\&. Supported as of MySQL - 5\&.5\&.17\&. -T} -T{ MYSQLD_CMD T}:T{ Command line for starting server as used in tests, with the minimum set @@ -339,17 +365,6 @@ T}:T{ Path name to the var directory that is used for logs, temporary files, and so forth T} -T{ -MYSQL_TEST_DIR -T}:T{ -Full path to the mysql\-test directory where tests - are being run from -T} -T{ -MYSQL_TMP_DIR -T}:T{ -Path to temp directory used for temporary files during tests -T} .TE .sp 1 .PP @@ -885,15 +900,42 @@ Add setting from the named file to all generated configs\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-do\-test=\fR\fB\fIprefix\fR\fR +\fB\-\-do\-suite=\fR\fB\fIprefix or regex\fR\fR +.sp +Run all test cases from suites having a name that begins with the given +\fIprefix\fR +value or matches the regular expression\&. If the argument matches no existing suites, +\fBmysql\-test\-run\&.pl\fR +aborts\&. +.sp +The argument for the +\fB\-\-do\-suite\fR +option allows more flexible specification of which tests to perform\&. See the description of the +\fB\-\-do\-test\fR +option for details\&. +.sp +The +\fB\-\-do\-suite\fR +option was added in MySQL 8\&.0\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-do\-test=\fR\fB\fIprefix or regex\fR\fR .sp Run all test cases having a name that begins with the given \fIprefix\fR -value\&. This option provides a convenient way to run a family of similarly named tests\&. +value or matches the regular expression\&. This option provides a convenient way to run a family of similarly named tests\&. .sp The argument for the \fB\-\-do\-test\fR -option also allows more flexible specification of which tests to perform\&. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern\&. If the argument contains a lone period or does not contain any pattern metacharacters, it is interpreted the same way as previously and matches test names that begin with the argument value\&. For example, +option allows more flexible specification of which tests to perform\&. If the argument contains a pattern metacharacter other than a lone period, it is interpreted as a Perl regular expression and applies to test names that match the pattern\&. If the argument contains a lone period or does not contain any pattern metacharacters, it is interpreted the same way as previously and matches test names that begin with the argument value\&. For example, \fB\-\-do\-test=testa\fR matches tests that begin with testa, @@ -1507,8 +1549,26 @@ Run tests using \fIN\fR parallel threads\&. By default, 1 thread is used\&. Use \fB\-\-parallel=auto\fR -for auto\-setting of -\fIN\fR\&. +to set +\fIN\fR +automatically\&. +.sp +Setting the +MTR_PARALLEL +environment variable to +\fIN\fR +has the same effect as specifying +\fB\-\-parallel=\fR\fB\fIN\fR\fR\&. +.sp +The +MTR_MAX_PARALLEL +environment variable, if set, specifies the maximum number of parallel workers that can be spawned when the +\fB\-\-parallel=auto\fR +option is specified\&. If +\fB\-\-parallel=auto\fR +is not specified, +MTR_MAX_PARALLEL +variable has no effect\&. .RE .sp .RS 4 diff --git a/man/mysql.1 b/man/mysql.1 index 8156c1fa300f..43d31634033b 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -387,16 +387,13 @@ Use \fIcharset_name\fR as the default character set for the client and connection\&. .sp -A common issue that can occur when the operating system uses -utf8 -or another multibyte character set is that output from the +This option can be useful if the operating system uses one character set and the \fBmysql\fR -client is formatted incorrectly, due to the fact that the MySQL client uses the -latin1 -character set by default\&. You can usually fix such issues by using this option to force the client to use the system character set instead\&. +client by default uses another\&. In this case, output may be formatted incorrectly\&. You can usually fix such issues by using this option to force the client to use the system character set instead\&. .sp -See -Section\ \&10.5, \(lqCharacter Set Configuration\(rq, for more information\&. +For more information, see +Section\ \&10.1.5, \(lqConnection Character Sets and Collations\(rq, and +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -503,7 +500,7 @@ the section called \(lqMYSQL COMMANDS\(rq\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. +Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. .RE .sp .RS 4 @@ -1249,7 +1246,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -2657,7 +2654,7 @@ command, uses it as a search string to access server\-side help from the contents of the MySQL Reference Manual\&. The proper operation of this command requires that the help tables in the mysql database be initialized with help topic information (see -Section\ \&5.1.10, \(lqServer-Side Help\(rq)\&. +Section\ \&5.1.9, \(lqServer-Side Help\(rq)\&. .PP If there is no match for the search string, the search fails: .sp diff --git a/man/mysql.server.1 b/man/mysql.server.1 index 45c006a5521c..75bd26772f1d 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index 1cc1d818bfa4..25fa050ef181 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "05/13/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "08/25/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_config.1 b/man/mysql_config.1 index e4764f27a1e8..51291d2dae37 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 index fdaf6582b427..609774ecbdfa 100644 --- a/man/mysql_convert_table_format.1 +++ b/man/mysql_convert_table_format.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_convert_table_format\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONVERT_TAB" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONVERT_TAB" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 index 274947a30280..806108d38021 100644 --- a/man/mysql_find_rows.1 +++ b/man/mysql_find_rows.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_find_rows\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIND_ROWS\F" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 index 88eaf25ad0f0..5b7ea7483a56 100644 --- a/man/mysql_fix_extensions.1 +++ b/man/mysql_fix_extensions.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_fix_extensions\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIX_EXTENSI" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index b47115f1fe27..db5ce4ca6168 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index 110517d25a14..45b1d786e555 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -57,7 +57,7 @@ mysql\&.plugin automatically\&. For additional control over plugin activation, use \fB\-\-\fR\fB\fIplugin_name\fR\fR options named for specific plugins, as described in -Section\ \&5.1.8.1, \(lqInstalling and Uninstalling Plugins\(rq\&. +Section\ \&5.5.2, \(lqInstalling and Uninstalling Plugins\(rq\&. .PP Each invocation of \fBmysql_plugin\fR diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index 4f3bedd82ab7..535458224c51 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 index 7855bf3602c5..1a5d3fd7ebe6 100644 --- a/man/mysql_setpermission.1 +++ b/man/mysql_setpermission.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_setpermission\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SETPERMISSI" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SETPERMISSI" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index 089c65254f9c..5e7a37e81ed3 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index fcd0e8613660..8044650651ea 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -237,7 +237,7 @@ option\&. .PP \fBmysql_upgrade\fR does not upgrade the contents of the help tables\&. For upgrade instructions, see -Section\ \&5.1.10, \(lqServer-Side Help\(rq\&. +Section\ \&5.1.9, \(lqServer-Side Help\(rq\&. .PP \fBmysql_upgrade\fR supports the following options, which can be specified on the command line or in the @@ -643,7 +643,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 index 4f151da9560a..84f5dec5b4d7 100644 --- a/man/mysql_waitpid.1 +++ b/man/mysql_waitpid.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_waitpid\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_WAITPID\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_WAITPID\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 index a6794b0753bb..f5da5a6e0432 100644 --- a/man/mysql_zap.1 +++ b/man/mysql_zap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_zap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_ZAP\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_ZAP\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index 8b8ab467aa73..31136bb8feee 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlaccess\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLACCESS\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLACCESS\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index 528cdc3f0132..cf5d0d475f75 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -815,7 +815,7 @@ groups\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. +Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. .RE .sp .RS 4 @@ -1079,7 +1079,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index 914107c60069..cbea755cb0e8 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlbug.1 b/man/mysqlbug.1 index 511d2d39341f..a9f8baafd09d 100644 --- a/man/mysqlbug.1 +++ b/man/mysqlbug.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbug\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBUG\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBUG\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index 61f6afe38316..a535c9a5fdf9 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -562,7 +562,7 @@ This option was added in MySQL 5\&.5\&.10\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp This option was added in MySQL 5\&.5\&.47\&. .RE @@ -872,7 +872,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqld.8 b/man/mysqld.8 index acd60b2beeca..c92890ffeeb4 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index 1f8e83b953dd..eaff3ac7cf8e 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -56,7 +56,7 @@ to specify which servers you want to start, stop, or obtain a status report for\ group used for starting \fBmysqld\fR\&. (See, for example, Section\ \&2.10.5, \(lqStarting and Stopping MySQL Automatically\(rq\&.) However, when using multiple servers, it is necessary that each one use its own value for options such as the Unix socket file and TCP/IP port number\&. For more information on which options must be unique per server in a multiple\-server environment, see -Section\ \&5.5, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. +Section\ \&5.6, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. .PP To invoke \fBmysqld_multi\fR, use the following syntax: @@ -447,7 +447,7 @@ servers with the same data directory\&. Use separate data directories, unless yo what you are doing\&. Starting multiple servers with the same data directory does \fInot\fR give you extra performance in a threaded system\&. See -Section\ \&5.5, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. +Section\ \&5.6, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index 632a745eaeb1..6e7b3891ac65 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -225,7 +225,11 @@ Section\ \&5.4.2, \(lqThe Error Log\(rq\&. \fB\-\-malloc\-lib=[\fR\fB\fIlib_name\fR\fR\fB]\fR The name of the library to use for memory allocation instead of the system malloc() -library\&. Any library can be used by specifying its path name, but there is a shortcut form to enable use of the +library\&. As of MySQL 5\&.5\&.52, the option value must be one of the directories +/usr/lib, +/usr/lib64, +/usr/lib/i386\-linux\-gnu, or +/usr/lib/x86_64\-linux\-gnu\&. Prior to MySQL 5\&.5\&.52, any library can be used by specifying its path name, but there is a shortcut form to enable use of the tcmalloc library that is shipped with binary MySQL distributions for Linux in MySQL 5\&.5\&. It is possible that the shortcut form will not work under certain configurations, in which case you should specify a path name instead\&. .if n \{\ @@ -381,6 +385,8 @@ directory) that you want to start\&. This option is needed if you use the MySQL cannot find the server, use the \fB\-\-ledir\fR option to indicate the path name to the directory where the server is located\&. +.sp +As of MySQL 5\&.5\&.52, this option can be given only on the command line and not in an option file\&. .RE .sp .RS 4 @@ -412,6 +418,8 @@ uses in the ledir directory\&. +.sp +As of MySQL 5\&.5\&.52, this option can be given only on the command line and not in an option file\&. .RE .sp .RS 4 diff --git a/man/mysqldump.1 b/man/mysqldump.1 index e640f9c998cc..f0812eb36f99 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1183,7 +1183,7 @@ prints the error message, but it also writes an SQL comment containing the view Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp This option was added in MySQL 5\&.5\&.47\&. .RE @@ -2097,7 +2097,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index 5931da9ec40d..4597f10e3e23 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 index 5bdfe0d86bf4..df1b51ded694 100644 --- a/man/mysqlhotcopy.1 +++ b/man/mysqlhotcopy.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlhotcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLHOTCOPY\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLHOTCOPY\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index 79113ed23617..19066c479346 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -323,7 +323,7 @@ Empty the table before importing the text file\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp This option was added in MySQL 5\&.5\&.47\&. .RE @@ -670,7 +670,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index a64a9b198855..94ec48674047 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -342,7 +342,7 @@ groups\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp This option was added in MySQL 5\&.5\&.47\&. .RE @@ -556,7 +556,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index 3df8f11b73ad..df1eefbc4257 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -573,7 +573,7 @@ statements\&. The default is 0 (connections are not detached)\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.4.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. +Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. .RE .sp .RS 4 @@ -956,7 +956,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&6.3.8.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 diff --git a/man/mysqltest.1 b/man/mysqltest.1 index e677cd10de73..41a447dab534 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "05/13/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "08/25/2016" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb-common-options.1 b/man/ndb-common-options.1 index 8a96776f6d0b..05f31021dc7f 100644 --- a/man/ndb-common-options.1 +++ b/man/ndb-common-options.1 @@ -2,12 +2,12 @@ .\" Title: Options Common to MySQL Cluster Programs .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "OPTIONS COMMON TO MY" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "OPTIONS COMMON TO MY" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_blob_tool.1 b/man/ndb_blob_tool.1 index 715d157f28e9..ff6ef57e7492 100644 --- a/man/ndb_blob_tool.1 +++ b/man/ndb_blob_tool.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_blob_tool\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_BLOB_TOOL\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_BLOB_TOOL\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -296,8 +296,8 @@ statement shown here: .nf USE test; CREATE TABLE btest ( - c0 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - c1 TEXT, + c0 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + c1 TEXT, c2 BLOB ) ENGINE=NDB; .fi diff --git a/man/ndb_config.1 b/man/ndb_config.1 index 53f3af320298..6be96075116b 100644 --- a/man/ndb_config.1 +++ b/man/ndb_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CONFIG\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CONFIG\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -940,7 +940,7 @@ option\&. A portion of the resulting output is shown in this example: .\} .nf shell> \fBndb_config \-\-configinfo \-\-xml\fR -
@@ -952,10 +952,10 @@ shell> \fBndb_config \-\-configinfo \-\-xml\fR type="unsigned" default="0" min="0" max="4294967039"/>
- - \&... @@ -1010,7 +1010,7 @@ attributes highlighted for visibility): .RS 4 .\} .nf - .fi .if n \{\ @@ -1146,7 +1146,7 @@ To produce a connection string that can be used by data, SQL, and API nodes to c .RS 4 .\} .nf -shell> \fB\&./ndb_config \-\-config\-file=usr/local/mysql/cluster\-data/config\&.ini \e +shell> \fB\&./ndb_config \-\-config\-file=usr/local/mysql/cluster\-data/config\&.ini \e \-\-query=hostname,portnumber \-\-fields=: \-\-rows=, \-\-type=ndb_mgmd\fR 192\&.168\&.0\&.179:1186 .fi diff --git a/man/ndb_cpcd.1 b/man/ndb_cpcd.1 index e5b67ce956ab..576feb37194d 100644 --- a/man/ndb_cpcd.1 +++ b/man/ndb_cpcd.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_cpcd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CPCD\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CPCD\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_delete_all.1 b/man/ndb_delete_all.1 index 0779da076ba8..3e3c1db96381 100644 --- a/man/ndb_delete_all.1 +++ b/man/ndb_delete_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_delete_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DELETE_ALL\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DELETE_ALL\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_desc.1 b/man/ndb_desc.1 index 9bf2403f803d..d01f6348322c 100644 --- a/man/ndb_desc.1 +++ b/man/ndb_desc.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_desc\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DESC\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DESC\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -182,7 +182,7 @@ TableStatus: Retrieved \-\- Attributes \-\- name Varchar(20;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY NDB$TNODE Unsigned [64] PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY -\-\- Indexes \-\- +\-\- Indexes \-\- PRIMARY KEY(NDB$TNODE) \- UniqueHashIndex NDBT_ProgramExit: 0 \- OK .fi @@ -259,7 +259,7 @@ CREATE TABLE fish ( weight_gm INT(11) NOT NULL, PRIMARY KEY pk (id), UNIQUE KEY uk (name) -) TABLESPACE ts_1 STORAGE DISK +) TABLESPACE ts_1 STORAGE DISK ENGINE=NDB; INSERT INTO fish VALUES (\*(Aq\*(Aq,\*(Aqguppy\*(Aq, 35, 2), (\*(Aq\*(Aq,\*(Aqtuna\*(Aq, 2500, 150000), diff --git a/man/ndb_drop_index.1 b/man/ndb_drop_index.1 index a28406506fb8..63097b2880c3 100644 --- a/man/ndb_drop_index.1 +++ b/man/ndb_drop_index.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_index\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_INDEX\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_INDEX\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -102,7 +102,7 @@ Enter password: ******* Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with \-A Welcome to the MySQL monitor\&. Commands end with ; or \eg\&. -Your MySQL connection id is 7 to server version: 5\&.5\&.49\-ndb\-7\&.2\&.25 +Your MySQL connection id is 7 to server version: 5\&.5\&.51\-ndb\-7\&.2\&.26 Type \*(Aqhelp;\*(Aq or \*(Aq\eh\*(Aq for help\&. Type \*(Aq\ec\*(Aq to clear the buffer\&. mysql> \fBSHOW TABLES;\fR +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ diff --git a/man/ndb_drop_table.1 b/man/ndb_drop_table.1 index 639c13216d99..d9d088a3f99f 100644 --- a/man/ndb_drop_table.1 +++ b/man/ndb_drop_table.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_table\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_TABLE\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_TABLE\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_error_reporter.1 b/man/ndb_error_reporter.1 index bfbffa11cb16..6300916739f4 100644 --- a/man/ndb_error_reporter.1 +++ b/man/ndb_error_reporter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_error_reporter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_ERROR_REPORTE" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_ERROR_REPORTE" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_index_stat.1 b/man/ndb_index_stat.1 index d44a40982dd5..8c5ce3427b71 100644 --- a/man/ndb_index_stat.1 +++ b/man/ndb_index_stat.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_index_stat\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_INDEX_STAT\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_INDEX_STAT\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_mgm.1 b/man/ndb_mgm.1 index 15fd305506e9..fe385534a6b4 100644 --- a/man/ndb_mgm.1 +++ b/man/ndb_mgm.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgm\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGM\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGM\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_mgmd.8 b/man/ndb_mgmd.8 index 76aaa9a8089f..9d7e938814d7 100644 --- a/man/ndb_mgmd.8 +++ b/man/ndb_mgmd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgmd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGMD\FR" "8" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGMD\FR" "8" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_backup_file.1 b/man/ndb_print_backup_file.1 index b241d6bc55e6..322876cdd182 100644 --- a/man/ndb_print_backup_file.1 +++ b/man/ndb_print_backup_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_backup_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_BACKUP_" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_BACKUP_" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_file.1 b/man/ndb_print_file.1 index 21a31b411c73..24f87951368c 100644 --- a/man/ndb_print_file.1 +++ b/man/ndb_print_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_FILE\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_FILE\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_print_schema_file.1 b/man/ndb_print_schema_file.1 index a29b31f8d13e..2badc4628e1b 100644 --- a/man/ndb_print_schema_file.1 +++ b/man/ndb_print_schema_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_schema_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SCHEMA_" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SCHEMA_" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -59,7 +59,7 @@ and (and unlike most of the other NDB utilities that are intended to be run on a management server host or to connect to a management server) -\fBndb_schema_backup_file\fR +\fBndb_print_schema_file\fR must be run on a cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. Additional Options.PP None\&. diff --git a/man/ndb_print_sys_file.1 b/man/ndb_print_sys_file.1 index f7f0de72d363..40f49ffaada4 100644 --- a/man/ndb_print_sys_file.1 +++ b/man/ndb_print_sys_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_sys_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SYS_FIL" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SYS_FIL" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_restore.1 b/man/ndb_restore.1 index 8a851e2869ce..c771016994f1 100644 --- a/man/ndb_restore.1 +++ b/man/ndb_restore.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_restore\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_RESTORE\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_RESTORE\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1424,7 +1424,7 @@ data node configuration parameter; this parameter has no effect on dropping and Rebuilding of unique indexes uses disk write bandwidth for redo logging and local checkpointing\&. An insufficient amount of this bandwith can lead to redo buffer overload or log overload errors\&. In such cases you can run \fBndb_restore\fR \fB\-\-rebuild\-indexes\fR -again; the process resumes at the point where the error occurred\&. You can also do this when you have encountered temporarary errors\&. You can repeat execution of +again; the process resumes at the point where the error occurred\&. You can also do this when you have encountered temporary errors\&. You can repeat execution of \fBndb_restore\fR \fB\-\-rebuild\-indexes\fR indefinitely; you may be able to stop such errors by reducing the value of diff --git a/man/ndb_select_all.1 b/man/ndb_select_all.1 index f1b094497b59..45148730335d 100644 --- a/man/ndb_select_all.1 +++ b/man/ndb_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_ALL\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_ALL\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_select_count.1 b/man/ndb_select_count.1 index b7a74b442aeb..6526d5ab6dd1 100644 --- a/man/ndb_select_count.1 +++ b/man/ndb_select_count.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_count\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_COUNT\" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_COUNT\" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_show_tables.1 b/man/ndb_show_tables.1 index 98a9421cb729..49b268ae61c6 100644 --- a/man/ndb_show_tables.1 +++ b/man/ndb_show_tables.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_show_tables\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SHOW_TABLES\F" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SHOW_TABLES\F" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndb_size.pl.1 b/man/ndb_size.pl.1 index a0932f3e7767..ada50b78dc38 100644 --- a/man/ndb_size.pl.1 +++ b/man/ndb_size.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_size.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SIZE\&.PL\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SIZE\&.PL\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -113,9 +113,9 @@ Usage .RS 4 .\} .nf -perl ndb_size\&.pl [\-\-database={\fIdb_name\fR|ALL}] [\-\-hostname=\fIhost\fR[:\fIport\fR]] [\-\-socket=\fIsocket\fR] \e - [\-\-user=\fIuser\fR] [\-\-password=\fIpassword\fR] \e - [\-\-help|\-h] [\-\-format={html|text}] \e +perl ndb_size\&.pl [\-\-database={\fIdb_name\fR|ALL}] [\-\-hostname=\fIhost\fR[:\fIport\fR]] [\-\-socket=\fIsocket\fR] \e + [\-\-user=\fIuser\fR] [\-\-password=\fIpassword\fR] \e + [\-\-help|\-h] [\-\-format={html|text}] \e [\-\-loadqueries=\fIfile_name\fR] [\-\-savequeries=\fIfile_name\fR] .fi .if n \{\ @@ -178,7 +178,7 @@ Summary (for THIS table): 4\&.1 5\&.0 5\&.1 Fixed Overhead DM/Row 12 12 16 NULL Bytes/Row 4 4 4 - DataMemory/Row 96 96 48 + DataMemory/Row 96 96 48 (Includes overhead, bitmap and indexes) Varsize Overhead DM/Row 0 0 8 Varsize NULL Bytes/Row 0 0 4 diff --git a/man/ndb_waiter.1 b/man/ndb_waiter.1 index e6639dd53e59..897a883c7c69 100644 --- a/man/ndb_waiter.1 +++ b/man/ndb_waiter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_waiter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_WAITER\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_WAITER\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbd.8 b/man/ndbd.8 index 8d667ab90000..5b1d4aa703e9 100644 --- a/man/ndbd.8 +++ b/man/ndbd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD\FR" "8" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD\FR" "8" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbd_redo_log_reader.1 b/man/ndbd_redo_log_reader.1 index 60a29aa8e4e8..be605d900994 100644 --- a/man/ndbd_redo_log_reader.1 +++ b/man/ndbd_redo_log_reader.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbd_redo_log_reader\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD_REDO_LOG_REA" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD_REDO_LOG_REA" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/ndbinfo_select_all.1 b/man/ndbinfo_select_all.1 index 72b29f3cde26..a73dad2e0d50 100644 --- a/man/ndbinfo_select_all.1 +++ b/man/ndbinfo_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbinfo_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBINFO_SELECT_AL" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBINFO_SELECT_AL" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -99,7 +99,7 @@ node_id log_type log_id log_part total used high 8 0 0 1 268435456 0 0 8 0 0 2 268435456 0 0 8 0 0 3 268435456 0 0 -shell> +shell> .fi .if n \{\ .RE diff --git a/man/ndbmtd.8 b/man/ndbmtd.8 index 5c06d1d34065..133a9ad74751 100644 --- a/man/ndbmtd.8 +++ b/man/ndbmtd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbmtd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBMTD\FR" "8" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBMTD\FR" "8" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/perror.1 b/man/perror.1 index 5bbfdf3455d7..862974c7e69e 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -2,12 +2,12 @@ .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/replace.1 b/man/replace.1 index ed12caea01d7..4bcc4d07053f 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -2,12 +2,12 @@ .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index bda24b5f462b..71e04e04f887 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolveip.1 b/man/resolveip.1 index 3690425d9d8d..5df65be56b9a 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 05/13/2016 +.\" Date: 08/25/2016 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "05/13/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- From cea7ed27cab63084ed10be1b0006e75b10c1deea Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 14 Sep 2016 14:33:11 +0300 Subject: [PATCH 086/305] Bump WSREP_PATCH_VERSION to 18 --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index c293c2f67e08..71b0dc1390e0 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "17") +SET(WSREP_PATCH_VERSION "18") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From 9c3335331bb2967ab954587988d7351ab0008e75 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 2 Nov 2016 00:21:25 +0200 Subject: [PATCH 087/305] Refs: MW-253 GAL-410 * fix for BF aborting of ROLLBACK TO SAVEPOINT statement --- sql/binlog.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sql/binlog.cc b/sql/binlog.cc index 1e0fa53c6393..cd5c2b4f8016 100644 --- a/sql/binlog.cc +++ b/sql/binlog.cc @@ -1410,7 +1410,12 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all) { DBUG_ENTER("binlog_rollback"); int error= 0; +#ifdef WITH_WSREP + if (thd->lex->sql_command == SQLCOM_ROLLBACK_TO_SAVEPOINT && + thd->wsrep_conflict_state != ABORTING) +#else if (thd->lex->sql_command == SQLCOM_ROLLBACK_TO_SAVEPOINT) +#endif error= mysql_bin_log.rollback(thd, all); DBUG_RETURN(error); } @@ -1602,7 +1607,12 @@ int MYSQL_BIN_LOG::rollback(THD *thd, bool all) the caches since this function is called as part of the engine rollback. */ +#ifdef WITH_WSREP + if (thd->lex->sql_command != SQLCOM_ROLLBACK_TO_SAVEPOINT || + thd->wsrep_conflict_state == ABORTING) +#else if (thd->lex->sql_command != SQLCOM_ROLLBACK_TO_SAVEPOINT) +#endif /* WITH_WSREP */ if ((error= ha_rollback_low(thd, all))) goto end; From 546a1ca066015bbb6c8bdc7d23cf6da025b16993 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 8 Nov 2016 01:48:17 -0800 Subject: [PATCH 088/305] MW-315: Make sure the /var/lib/mysql-files directory is created during .deb install, as it is required for new --secure-file-priv behavior --- debian/mysql-wsrep-server-5.5.postinst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/mysql-wsrep-server-5.5.postinst b/debian/mysql-wsrep-server-5.5.postinst index 00608a9a0cff..7e07305935f7 100644 --- a/debian/mysql-wsrep-server-5.5.postinst +++ b/debian/mysql-wsrep-server-5.5.postinst @@ -69,6 +69,7 @@ case "$1" in mysql_cfgdir=/etc/mysql mysql_newlogdir=/var/log/mysql mysql_upgradedir=/var/lib/mysql-upgrade + mysql_filesdir=/var/lib/mysql-files # first things first, if the following symlink exists, it is a preserved # copy the old data dir from a mysql upgrade that would have otherwise @@ -108,6 +109,15 @@ EOF # Ensure the existence and right permissions for the database and # log files. + + # MySQL 5.5.53 needs this + if [ ! -d ${mysql_filesdir} -a ! -L ${mysql_filesdir} ]; + then + mkdir ${mysql_filesdir} + chown mysql:mysql ${mysql_filesdir} + chmod 770 ${mysql_filesdir} + fi + if [ ! -d "$mysql_statedir" -a ! -L "$mysql_statedir" ]; then mkdir "$mysql_statedir"; fi if [ ! -d "$mysql_statedir/mysql" -a ! -L "$mysql_statedir/mysql" ]; then mkdir "$mysql_statedir/mysql"; fi if [ ! -d "$mysql_newlogdir" -a ! -L "$mysql_newlogdir" ]; then mkdir "$mysql_newlogdir"; fi From 3026fb9e9bf4ad26150a3dcc8812cc3fc0bf4e63 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 8 Nov 2016 15:18:16 +0200 Subject: [PATCH 089/305] Bump WSREP_PATCH_VERSION to 19 --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 71b0dc1390e0..7c395168f087 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "18") +SET(WSREP_PATCH_VERSION "19") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From f623cf8443e3dafbb55d9deba3dcfaee6a6d4819 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 16 Nov 2016 00:42:19 -0800 Subject: [PATCH 090/305] Galera MTR tests: Make the mysqlhotcopy tests pass on Ubuntu 16.04 --- mysql-test/include/mysqlhotcopy.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/include/mysqlhotcopy.inc b/mysql-test/include/mysqlhotcopy.inc index 2661ffadea09..79bb82cae7e1 100644 --- a/mysql-test/include/mysqlhotcopy.inc +++ b/mysql-test/include/mysqlhotcopy.inc @@ -107,7 +107,7 @@ DROP DATABASE hotcopy_save; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR --list_files $MYSQLD_DATADIR/hotcopy_save --replace_result $MASTER_MYSOCK MASTER_MYSOCK ---error 9,11,110,2304 +--error 9,11,110,2304,255 --exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save --replace_result $MASTER_MYSOCK MASTER_MYSOCK --exec $MYSQLHOTCOPY --quiet --allowold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save From 14301279075dc2b420f3173cc9c2eb7912db63de Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 18 Nov 2016 12:45:42 +0200 Subject: [PATCH 091/305] Refs: MW-319 * replicating write set containing only GTID event of totally filtered transaction coming in through mysql replication * note that replicated WS will have no keys, and current debug version of Galera 3.19 will assert for no keys --- sql/binlog.cc | 9 +++++++++ sql/sql_class.cc | 2 ++ sql/sql_class.h | 1 + sql/wsrep_hton.cc | 23 ++++++++++++++++++++++- sql/wsrep_mysqld.cc | 22 ++++++---------------- sql/wsrep_mysqld.h | 14 ++++++++++++++ 6 files changed, 54 insertions(+), 17 deletions(-) diff --git a/sql/binlog.cc b/sql/binlog.cc index 78f642348935..693aaee2506c 100644 --- a/sql/binlog.cc +++ b/sql/binlog.cc @@ -1182,6 +1182,9 @@ int gtid_empty_group_log_and_cleanup(THD *thd) gtid_before_write_cache(thd, cache_data)) goto err; +#ifdef WITH_WSREP + if (thd->slave_thread) thd->wsrep_replicate_GTID= true; +#endif /* WITH_WSREP */ ret= mysql_bin_log.commit(thd, true); err: @@ -6625,6 +6628,12 @@ TC_LOG::enum_result MYSQL_BIN_LOG::commit(THD *thd, bool all) */ if (stuff_logged) { +#ifdef WITH_WSREP + if (thd->wsrep_replicate_GTID) + { + wsrep_replicate_GTID(thd); + } +#endif /* WITH_WSREP */ if (ordered_commit(thd, all)) DBUG_RETURN(RESULT_INCONSISTENT); } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 6fd518971104..6e98d73bc531 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1217,6 +1217,7 @@ THD::THD(bool enable_plugins) wsrep_TOI_pre_query_len = 0; wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED; wsrep_affected_rows = 0; + wsrep_replicate_GTID = false; #endif /* Call to init() below requires fully initialized Open_tables_state. */ reset_open_tables_state(); @@ -1627,6 +1628,7 @@ void THD::init(void) wsrep_TOI_pre_query_len = 0; wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED; wsrep_affected_rows = 0; + wsrep_replicate_GTID = false; #endif binlog_row_event_extra_data= 0; diff --git a/sql/sql_class.h b/sql/sql_class.h index 4f85e41441de..3c77bafdcdef 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3218,6 +3218,7 @@ class THD :public MDL_context_owner, bool wsrep_apply_toi; /* applier processing in TOI */ wsrep_gtid_t wsrep_sync_wait_gtid; ulong wsrep_affected_rows; + bool wsrep_replicate_GTID; #endif /* WITH_WSREP */ /** Internal parser state. diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index cbe8c0a01e9b..9b2c36aa848f 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -458,7 +458,8 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) DBUG_RETURN(WSREP_TRX_OK); } - if (WSREP_UNDEFINED_TRX_ID == thd->wsrep_ws_handle.trx_id) + if (WSREP_UNDEFINED_TRX_ID == thd->wsrep_ws_handle.trx_id && + !thd->wsrep_replicate_GTID) { WSREP_WARN("SQL statement was ineffective, THD: %lu, buf: %zu\n" "schema: %s \n" @@ -580,6 +581,26 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) DBUG_RETURN(WSREP_TRX_OK); } +void wsrep_replicate_GTID(THD *thd) +{ + if (thd->slave_thread) + { + WSREP_DEBUG("GTID replication"); + enum wsrep_trx_status rcode= wsrep_run_wsrep_commit(thd, wsrep_hton, true); + if (rcode) + { + /* + TODO: should error here cause stopping of MySQL slave? + Slave applying was totally filtered out, and fauílure in replicating + GTID event, would cause a hole in GTID history in other cluster nodes + + */ + WSREP_WARN("GTID replication failed"); + } + wsrep_post_commit(thd, true); + } + thd->wsrep_replicate_GTID= false; +} static int wsrep_hton_init(void *p) { diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 96004983989d..7646d76b011c 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -851,17 +851,7 @@ bool wsrep_sync_wait (THD* thd, uint mask) return false; } -/* - * Helpers to deal with TOI key arrays - */ -typedef struct wsrep_key_arr -{ - wsrep_key_t* keys; - size_t keys_len; -} wsrep_key_arr_t; - - -static void wsrep_keys_free(wsrep_key_arr_t* key_arr) +void wsrep_keys_free(wsrep_key_arr_t* key_arr) { for (size_t i= 0; i < key_arr->keys_len; ++i) { @@ -926,11 +916,11 @@ static bool wsrep_prepare_key_for_isolation(const char* db, } /* Prepare key list from db/table and table_list */ -static bool wsrep_prepare_keys_for_isolation(THD* thd, - const char* db, - const char* table, - const TABLE_LIST* table_list, - wsrep_key_arr_t* ka) +bool wsrep_prepare_keys_for_isolation(THD* thd, + const char* db, + const char* table, + const TABLE_LIST* table_list, + wsrep_key_arr_t* ka) { ka->keys= 0; ka->keys_len= 0; diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index bfc94af94f13..acc4e9890d9c 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -332,4 +332,18 @@ bool wsrep_stmt_rollback_is_safe(THD* thd); void wsrep_init_sidno(const wsrep_uuid_t&); bool wsrep_node_is_donor(); bool wsrep_node_is_synced(); +void wsrep_replicate_GTID(THD* thd); + +typedef struct wsrep_key_arr +{ + wsrep_key_t* keys; + size_t keys_len; +} wsrep_key_arr_t; +bool wsrep_prepare_keys_for_isolation(THD* thd, + const char* db, + const char* table, + const TABLE_LIST* table_list, + wsrep_key_arr_t* ka); +void wsrep_keys_free(wsrep_key_arr_t* key_arr); + #endif /* WSREP_MYSQLD_H */ From 5772735a9c57fb9e521f3b112697dfc5b15341e6 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Mon, 21 Nov 2016 10:38:20 +0200 Subject: [PATCH 092/305] refs: MW-319 * silenced the WSREP_ERROR, this fires for all replication filtered DDL, and is false positive --- sql/wsrep_hton.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index 9b2c36aa848f..8960d95cb1d3 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -315,7 +315,7 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) int replay_round= 0; if (thd->get_stmt_da()->is_error()) { - WSREP_ERROR("commit issue, error: %d %s", + WSREP_DEBUG("commit issue, error: %d %s", thd->get_stmt_da()->sql_errno(), thd->get_stmt_da()->message()); } From fbc71ce7844bd71a613f0a15f529c544af505cfe Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Fri, 18 Nov 2016 15:22:16 +0200 Subject: [PATCH 093/305] MW-28, codership/mysql-wsrep#28 Fix sync_thread_levels debug assert Introduced a new wsrep_trx_print_locking() which may be called under lock_sys->mutex if the trx has locks. --- storage/innobase/include/trx0trx.h | 17 +++++ storage/innobase/lock/lock0lock.cc | 6 +- storage/innobase/trx/trx0trx.cc | 112 +++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+), 4 deletions(-) diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 4ea505264899..fa1fa415f6a5 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -333,6 +333,23 @@ trx_print_latched( or 0 to use the default max length */ MY_ATTRIBUTE((nonnull)); +#ifdef WITH_WSREP +/**********************************************************************//** +Prints info about a transaction. +Transaction information may be retrieved without having trx_sys->mutex acquired +so it may not be completely accurate. The caller must own lock_sys->mutex +and the trx must have some locks to make sure that it does not escape +without locking lock_sys->mutex. */ +UNIV_INTERN +void +wsrep_trx_print_locking( +/*==============*/ + FILE* f, /*!< in: output stream */ + const trx_t* trx, /*!< in: transaction */ + ulint max_query_len) /*!< in: max query length to print, + or 0 to use the default max length */ + MY_ATTRIBUTE((nonnull)); +#endif /* WITH_WSREP */ /**********************************************************************//** Prints info about a transaction. Acquires and releases lock_sys->mutex and trx_sys->mutex. */ diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 133e513038a0..c7d05090e8d7 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -1653,14 +1653,13 @@ wsrep_kill_victim(const trx_t * const trx, const lock_t *lock) { is in the queue*/ } else if (lock->trx != trx) { if (wsrep_log_conflicts) { - mutex_enter(&trx_sys->mutex); if (bf_this) fputs("\n*** Priority TRANSACTION:\n", stderr); else fputs("\n*** Victim TRANSACTION:\n", stderr); - trx_print_latched(stderr, trx, 3000); + wsrep_trx_print_locking(stderr, trx, 3000); if (bf_other) fputs("\n*** Priority TRANSACTION:\n", @@ -1668,9 +1667,8 @@ wsrep_kill_victim(const trx_t * const trx, const lock_t *lock) { else fputs("\n*** Victim TRANSACTION:\n", stderr); - trx_print_latched(stderr, lock->trx, 3000); + wsrep_trx_print_locking(stderr, lock->trx, 3000); - mutex_exit(&trx_sys->mutex); fputs("*** WAITING FOR THIS LOCK TO BE GRANTED:\n", stderr); diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index dc09e2884f1e..e3a131b5f0f2 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -1874,6 +1874,118 @@ trx_print_latched( mem_heap_get_size(trx->lock.lock_heap)); } +#ifdef WITH_WSREP +/**********************************************************************//** +Prints info about a transaction. +Transaction information may be retrieved without having trx_sys->mutex acquired +so it may not be completely accurate. The caller must own lock_sys->mutex +and the trx must have some locks to make sure that it does not escape +without locking lock_sys->mutex. */ +UNIV_INTERN +void +wsrep_trx_print_locking( +/*==========*/ + FILE* f, + /*!< in: output stream */ + const trx_t* trx, + /*!< in: transaction */ + ulint max_query_len) + /*!< in: max query length to print, + or 0 to use the default max length */ +{ + ibool newline; + const char* op_info; + + ut_ad(lock_mutex_own()); + ut_ad(trx->lock.trx_locks.count > 0); + + fprintf(f, "TRANSACTION " TRX_ID_FMT, trx->id); + + /* trx->state may change since trx_sys->mutex is not required */ + switch (trx->state) { + case TRX_STATE_NOT_STARTED: + fputs(", not started", f); + goto state_ok; + case TRX_STATE_ACTIVE: + fprintf(f, ", ACTIVE %lu sec", + (ulong) difftime(time(NULL), trx->start_time)); + goto state_ok; + case TRX_STATE_PREPARED: + fprintf(f, ", ACTIVE (PREPARED) %lu sec", + (ulong) difftime(time(NULL), trx->start_time)); + goto state_ok; + case TRX_STATE_COMMITTED_IN_MEMORY: + fputs(", COMMITTED IN MEMORY", f); + goto state_ok; + } + fprintf(f, ", state %lu", (ulong) trx->state); + ut_ad(0); +state_ok: + + /* prevent a race condition */ + op_info = trx->op_info; + + if (*op_info) { + putc(' ', f); + fputs(op_info, f); + } + + if (trx->is_recovered) { + fputs(" recovered trx", f); + } + + if (trx->declared_to_be_inside_innodb) { + fprintf(f, ", thread declared inside InnoDB %lu", + (ulong) trx->n_tickets_to_enter_innodb); + } + + putc('\n', f); + + if (trx->n_mysql_tables_in_use > 0 || trx->mysql_n_tables_locked > 0) { + fprintf(f, "mysql tables in use %lu, locked %lu\n", + (ulong) trx->n_mysql_tables_in_use, + (ulong) trx->mysql_n_tables_locked); + } + + newline = TRUE; + + /* trx->lock.que_state of an ACTIVE transaction may change + while we are not holding trx->mutex. We perform a dirty read + for performance reasons. */ + + switch (trx->lock.que_state) { + case TRX_QUE_RUNNING: + newline = FALSE; break; + case TRX_QUE_LOCK_WAIT: + fputs("LOCK WAIT ", f); break; + case TRX_QUE_ROLLING_BACK: + fputs("ROLLING BACK ", f); break; + case TRX_QUE_COMMITTING: + fputs("COMMITTING ", f); break; + default: + fprintf(f, "que state %lu ", (ulong) trx->lock.que_state); + } + + if (trx->has_search_latch) { + newline = TRUE; + fputs(", holds adaptive hash latch", f); + } + + if (trx->undo_no != 0) { + newline = TRUE; + fprintf(f, ", undo log entries " TRX_ID_FMT, trx->undo_no); + } + + if (newline) { + putc('\n', f); + } + + if (trx->mysql_thd != NULL) { + innobase_mysql_print_thd( + f, trx->mysql_thd, static_cast(max_query_len)); + } +} +#endif /* WITH_WSREP */ /**********************************************************************//** Prints info about a transaction. Acquires and releases lock_sys->mutex and trx_sys->mutex. */ From ded7834bfde53b6d72fc55782967065a2cbdf133 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 22 Nov 2016 11:09:23 +0200 Subject: [PATCH 094/305] Refs: MW-319 * Fix for GTID support for replication filtering issue, had leaked in this pull request, cleaned out unnecessary parts * added one debug level assert --- sql/wsrep_hton.cc | 1 + sql/wsrep_mysqld.cc | 22 ++++++++++++++++------ sql/wsrep_mysqld.h | 12 ------------ 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index 8960d95cb1d3..f1c6cc91bb73 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -586,6 +586,7 @@ void wsrep_replicate_GTID(THD *thd) if (thd->slave_thread) { WSREP_DEBUG("GTID replication"); + DBUG_ASSERT (WSREP_UNDEFINED_TRX_ID == thd->wsrep_ws_handle.trx_id); enum wsrep_trx_status rcode= wsrep_run_wsrep_commit(thd, wsrep_hton, true); if (rcode) { diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 7646d76b011c..96004983989d 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -851,7 +851,17 @@ bool wsrep_sync_wait (THD* thd, uint mask) return false; } -void wsrep_keys_free(wsrep_key_arr_t* key_arr) +/* + * Helpers to deal with TOI key arrays + */ +typedef struct wsrep_key_arr +{ + wsrep_key_t* keys; + size_t keys_len; +} wsrep_key_arr_t; + + +static void wsrep_keys_free(wsrep_key_arr_t* key_arr) { for (size_t i= 0; i < key_arr->keys_len; ++i) { @@ -916,11 +926,11 @@ static bool wsrep_prepare_key_for_isolation(const char* db, } /* Prepare key list from db/table and table_list */ -bool wsrep_prepare_keys_for_isolation(THD* thd, - const char* db, - const char* table, - const TABLE_LIST* table_list, - wsrep_key_arr_t* ka) +static bool wsrep_prepare_keys_for_isolation(THD* thd, + const char* db, + const char* table, + const TABLE_LIST* table_list, + wsrep_key_arr_t* ka) { ka->keys= 0; ka->keys_len= 0; diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index acc4e9890d9c..5dd4c419357d 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -334,16 +334,4 @@ bool wsrep_node_is_donor(); bool wsrep_node_is_synced(); void wsrep_replicate_GTID(THD* thd); -typedef struct wsrep_key_arr -{ - wsrep_key_t* keys; - size_t keys_len; -} wsrep_key_arr_t; -bool wsrep_prepare_keys_for_isolation(THD* thd, - const char* db, - const char* table, - const TABLE_LIST* table_list, - wsrep_key_arr_t* ka); -void wsrep_keys_free(wsrep_key_arr_t* key_arr); - #endif /* WSREP_MYSQLD_H */ From a442b79209f7dd2f5658114379a5086b8dafb694 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 22 Nov 2016 23:27:25 +0200 Subject: [PATCH 095/305] Refs: MW-319 * using query ID as trx ID when replicating GTID event (there is no InnoDB transaction live) --- sql/wsrep_hton.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index f1c6cc91bb73..64df48edbee9 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -458,8 +458,7 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) DBUG_RETURN(WSREP_TRX_OK); } - if (WSREP_UNDEFINED_TRX_ID == thd->wsrep_ws_handle.trx_id && - !thd->wsrep_replicate_GTID) + if (WSREP_UNDEFINED_TRX_ID == thd->wsrep_ws_handle.trx_id) { WSREP_WARN("SQL statement was ineffective, THD: %lu, buf: %zu\n" "schema: %s \n" @@ -587,6 +586,10 @@ void wsrep_replicate_GTID(THD *thd) { WSREP_DEBUG("GTID replication"); DBUG_ASSERT (WSREP_UNDEFINED_TRX_ID == thd->wsrep_ws_handle.trx_id); + (void)wsrep_ws_handle_for_trx(&thd->wsrep_ws_handle, thd->query_id); + DBUG_ASSERT (WSREP_UNDEFINED_TRX_ID != thd->wsrep_ws_handle.trx_id); + WSREP_DEBUG("slave trx using query ID %lu for replication GTID", + thd->wsrep_ws_handle.trx_id); enum wsrep_trx_status rcode= wsrep_run_wsrep_commit(thd, wsrep_hton, true); if (rcode) { From ba647dc7b1ecd29c812c841768418220b9cdb25d Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 23 Nov 2016 02:55:36 -0800 Subject: [PATCH 096/305] Galera MTR Test: Test for MW-28 : Assertion with --wsrep-log-conflicts --- .../galera/r/galera_wsrep_log_conficts.result | 18 ++++++ .../t/galera_wsrep_log_conficts-master.opt | 1 + .../galera/t/galera_wsrep_log_conficts.test | 55 +++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 mysql-test/suite/galera/r/galera_wsrep_log_conficts.result create mode 100644 mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt create mode 100644 mysql-test/suite/galera/t/galera_wsrep_log_conficts.test diff --git a/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result b/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result new file mode 100644 index 000000000000..b535c6477b7a --- /dev/null +++ b/mysql-test/suite/galera/r/galera_wsrep_log_conficts.result @@ -0,0 +1,18 @@ +CREATE TABLE t1 ( +f1 VARCHAR(255) PRIMARY KEY +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +INSERT INTO t1 VALUES ('abc'); +SELECT f1 = 'abc' FROM t1; +f1 = 'abc' +1 +SET AUTOCOMMIT=OFF; +START TRANSACTION; +UPDATE t1 SET f1 = 'klm'; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +UPDATE t1 SET f1 = 'xyz'; +COMMIT; +COMMIT; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +include/assert_grep.inc [cluster conflict due to high priority abort for threads] +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt b/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt new file mode 100644 index 000000000000..930c483bd642 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt @@ -0,0 +1 @@ +--wsrep_log_conflicts=ON diff --git a/mysql-test/suite/galera/t/galera_wsrep_log_conficts.test b/mysql-test/suite/galera/t/galera_wsrep_log_conficts.test new file mode 100644 index 000000000000..3af08cbf637c --- /dev/null +++ b/mysql-test/suite/galera/t/galera_wsrep_log_conficts.test @@ -0,0 +1,55 @@ +# +# Test --wsrep_log_conflicts=ON +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE t1 ( + f1 VARCHAR(255) PRIMARY KEY +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO t1 VALUES ('abc'); + +--connection node_2 +SELECT f1 = 'abc' FROM t1; + +# +# Provoke a conflict +# + +--connection node_1 +SET AUTOCOMMIT=OFF; +START TRANSACTION; +UPDATE t1 SET f1 = 'klm'; + +--connection node_2 +SET AUTOCOMMIT=OFF; +START TRANSACTION; +UPDATE t1 SET f1 = 'xyz'; + +--connection node_1 +COMMIT; + +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +--connection node_2a +--let $wait_condition = SELECT f1 = 'klm' FROM t1; +--source include/wait_condition.inc + +--connection node_2 +--error ER_LOCK_DEADLOCK +COMMIT; + +# +# We can not really check the log output very much because it is quite variable +# + +--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err +--let $assert_only_after = CURRENT_TEST + +--let $assert_text = cluster conflict due to high priority abort for threads +--let $assert_select = cluster conflict due to high priority abort for threads +--let $assert_match = cluster conflict due to high priority abort for threads +--source include/assert_grep.inc + +DROP TABLE t1; From 0f12a08923f94bb9f0130ecb29e2c5314fce65dd Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 25 Nov 2016 10:50:24 +0200 Subject: [PATCH 097/305] Refs: MW-319 * propagating error from wsrep_replicate_GTID --- sql/binlog.cc | 6 ++++-- sql/wsrep_hton.cc | 8 +++++++- sql/wsrep_mysqld.h | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sql/binlog.cc b/sql/binlog.cc index 693aaee2506c..cf5ae74801e2 100644 --- a/sql/binlog.cc +++ b/sql/binlog.cc @@ -6629,9 +6629,11 @@ TC_LOG::enum_result MYSQL_BIN_LOG::commit(THD *thd, bool all) if (stuff_logged) { #ifdef WITH_WSREP - if (thd->wsrep_replicate_GTID) + if (thd->wsrep_replicate_GTID && + wsrep_replicate_GTID(thd)) { - wsrep_replicate_GTID(thd); + /* GTID replication failed */ + DBUG_RETURN(RESULT_ABORTED); } #endif /* WITH_WSREP */ if (ordered_commit(thd, all)) diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index 64df48edbee9..ba072dfb2ceb 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -580,7 +580,7 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) DBUG_RETURN(WSREP_TRX_OK); } -void wsrep_replicate_GTID(THD *thd) +bool wsrep_replicate_GTID(THD *thd) { if (thd->slave_thread) { @@ -600,10 +600,16 @@ void wsrep_replicate_GTID(THD *thd) */ WSREP_WARN("GTID replication failed"); + wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle); + thd->wsrep_replicate_GTID= false; + + return true; } wsrep_post_commit(thd, true); } thd->wsrep_replicate_GTID= false; + + return false; } static int wsrep_hton_init(void *p) diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index 5dd4c419357d..d91f0e6687b7 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -332,6 +332,6 @@ bool wsrep_stmt_rollback_is_safe(THD* thd); void wsrep_init_sidno(const wsrep_uuid_t&); bool wsrep_node_is_donor(); bool wsrep_node_is_synced(); -void wsrep_replicate_GTID(THD* thd); +bool wsrep_replicate_GTID(THD* thd); #endif /* WSREP_MYSQLD_H */ From 0babfb6ae4da89f02357a7874f6e6b323e80129c Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Fri, 25 Nov 2016 01:41:26 -0800 Subject: [PATCH 098/305] Galera MTR Tests: Tests for MW-319 - Support for replication filtering together with gtid mode --- ...alera_as_slave_gtid_replicate_do_db.result | 184 +++++++++++ ...ra_as_slave_gtid_replicate_do_db_cc.result | 295 ++++++++++++++++++ .../galera_as_slave_gtid_replicate_do_db.cnf | 16 + .../galera_as_slave_gtid_replicate_do_db.test | 146 +++++++++ ...alera_as_slave_gtid_replicate_do_db_cc.cnf | 16 + ...lera_as_slave_gtid_replicate_do_db_cc.test | 167 ++++++++++ 6 files changed, 824 insertions(+) create mode 100644 mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result create mode 100644 mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result create mode 100644 mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.cnf create mode 100644 mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test create mode 100644 mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.cnf create mode 100644 mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result new file mode 100644 index 000000000000..2dd2f3fc6297 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result @@ -0,0 +1,184 @@ +RESET MASTER; +RESET MASTER; +RESET MASTER; +START SLAVE USER='root'; +Warnings: +Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. +CREATE SCHEMA test1; +CREATE SCHEMA test2; +USE test1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB; +USE test2; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB; +INSERT INTO test1.t1 (f1) VALUES (1); +INSERT INTO test2.t1 (f1) VALUES (1); +INSERT INTO test1.t1 (f1) VALUES (2); +INSERT INTO test2.t1 (f1) VALUES (2); +INSERT INTO test1.t1 (f1) VALUES (3); +INSERT INTO test2.t1 (f1) VALUES (3); +UPDATE test2.t1 SET test2.t1.f2 = 'cde'; +UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz'; +DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO test2.t1 (f1) VALUES (999); +INSERT INTO test2.t1 (f1) VALUES (9999); +COMMIT; +START TRANSACTION; +INSERT INTO test1.t1 (f1) VALUES (111); +INSERT INTO test1.t1 (f1) VALUES (222); +COMMIT; +START TRANSACTION; +INSERT INTO test1.t1 (f1) VALUES (333); +INSERT INTO test2.t1 (f1) VALUES (99999); +COMMIT; +SHOW BINLOG EVENTS IN 'mysqld-bin.000001'; +Log_name Pos Event_type Server_id End_log_pos Info +mysqld-bin.000001 4 Format_desc 2 120 Server ver: 5.6.34-log, Binlog ver: 4 +mysqld-bin.000001 120 Previous_gtids 2 151 +mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= ':1' +mysqld-bin.000001 199 Query 1 294 CREATE SCHEMA test1 +mysqld-bin.000001 294 Gtid 1 342 SET @@SESSION.GTID_NEXT= ':2' +mysqld-bin.000001 342 Query 1 415 BEGIN +mysqld-bin.000001 415 Query 1 489 COMMIT +mysqld-bin.000001 489 Gtid 1 537 SET @@SESSION.GTID_NEXT= ':3' +mysqld-bin.000001 537 Query 1 692 use `test1`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB +mysqld-bin.000001 692 Gtid 1 740 SET @@SESSION.GTID_NEXT= ':4' +mysqld-bin.000001 740 Query 1 813 BEGIN +mysqld-bin.000001 813 Query 1 887 COMMIT +mysqld-bin.000001 887 Gtid 1 935 SET @@SESSION.GTID_NEXT= ':5' +mysqld-bin.000001 935 Query 1 998 BEGIN +mysqld-bin.000001 998 Table_map 1 1047 table_id: ### (test1.t1) +mysqld-bin.000001 1047 Write_rows 1 1091 table_id: ### flags: STMT_END_F +mysqld-bin.000001 1091 Xid 1 1122 COMMIT /* xid=### */ +mysqld-bin.000001 1122 Gtid 1 1170 SET @@SESSION.GTID_NEXT= ':6' +mysqld-bin.000001 1170 Query 1 1233 BEGIN +mysqld-bin.000001 1233 Query 1 1297 COMMIT +mysqld-bin.000001 1297 Gtid 1 1345 SET @@SESSION.GTID_NEXT= ':7' +mysqld-bin.000001 1345 Query 1 1408 BEGIN +mysqld-bin.000001 1408 Table_map 1 1457 table_id: ### (test1.t1) +mysqld-bin.000001 1457 Write_rows 1 1501 table_id: ### flags: STMT_END_F +mysqld-bin.000001 1501 Xid 1 1532 COMMIT /* xid=### */ +mysqld-bin.000001 1532 Gtid 1 1580 SET @@SESSION.GTID_NEXT= ':8' +mysqld-bin.000001 1580 Query 1 1643 BEGIN +mysqld-bin.000001 1643 Query 1 1707 COMMIT +mysqld-bin.000001 1707 Gtid 1 1755 SET @@SESSION.GTID_NEXT= ':9' +mysqld-bin.000001 1755 Query 1 1818 BEGIN +mysqld-bin.000001 1818 Table_map 1 1867 table_id: ### (test1.t1) +mysqld-bin.000001 1867 Write_rows 1 1911 table_id: ### flags: STMT_END_F +mysqld-bin.000001 1911 Xid 1 1942 COMMIT /* xid=### */ +mysqld-bin.000001 1942 Gtid 1 1990 SET @@SESSION.GTID_NEXT= ':10' +mysqld-bin.000001 1990 Query 1 2053 BEGIN +mysqld-bin.000001 2053 Query 1 2117 COMMIT +mysqld-bin.000001 2117 Gtid 1 2165 SET @@SESSION.GTID_NEXT= ':11' +mysqld-bin.000001 2165 Query 1 2228 BEGIN +mysqld-bin.000001 2228 Query 1 2292 COMMIT +mysqld-bin.000001 2292 Gtid 1 2340 SET @@SESSION.GTID_NEXT= ':12' +mysqld-bin.000001 2340 Query 1 2403 BEGIN +mysqld-bin.000001 2403 Table_map 1 2452 table_id: ### (test1.t1) +mysqld-bin.000001 2452 Update_rows 1 2542 table_id: ### flags: STMT_END_F +mysqld-bin.000001 2542 Xid 1 2573 COMMIT /* xid=### */ +mysqld-bin.000001 2573 Gtid 1 2621 SET @@SESSION.GTID_NEXT= ':13' +mysqld-bin.000001 2621 Query 1 2684 BEGIN +mysqld-bin.000001 2684 Table_map 1 2733 table_id: ### (test1.t1) +mysqld-bin.000001 2733 Delete_rows 1 2777 table_id: ### flags: STMT_END_F +mysqld-bin.000001 2777 Xid 1 2808 COMMIT /* xid=### */ +mysqld-bin.000001 2808 Gtid 1 2856 SET @@SESSION.GTID_NEXT= ':14' +mysqld-bin.000001 2856 Query 1 2919 BEGIN +mysqld-bin.000001 2919 Query 1 2983 COMMIT +mysqld-bin.000001 2983 Gtid 1 3031 SET @@SESSION.GTID_NEXT= ':15' +mysqld-bin.000001 3031 Query 1 3094 BEGIN +mysqld-bin.000001 3094 Table_map 1 3143 table_id: ### (test1.t1) +mysqld-bin.000001 3143 Write_rows 1 3187 table_id: ### flags: STMT_END_F +mysqld-bin.000001 3187 Table_map 1 3236 table_id: ### (test1.t1) +mysqld-bin.000001 3236 Write_rows 1 3280 table_id: ### flags: STMT_END_F +mysqld-bin.000001 3280 Xid 1 3311 COMMIT /* xid=### */ +mysqld-bin.000001 3311 Gtid 1 3359 SET @@SESSION.GTID_NEXT= ':16' +mysqld-bin.000001 3359 Query 1 3422 BEGIN +mysqld-bin.000001 3422 Table_map 1 3471 table_id: ### (test1.t1) +mysqld-bin.000001 3471 Write_rows 1 3515 table_id: ### flags: STMT_END_F +mysqld-bin.000001 3515 Xid 1 3546 COMMIT /* xid=### */ +gtid_executed_equal +1 +SHOW BINLOG EVENTS IN 'mysqld-bin.000001'; +Log_name Pos Event_type Server_id End_log_pos Info +mysqld-bin.000001 4 Format_desc 3 120 Server ver: 5.6.34-log, Binlog ver: 4 +mysqld-bin.000001 120 Previous_gtids 3 151 +mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= ':1' +mysqld-bin.000001 199 Query 1 294 CREATE SCHEMA test1 +mysqld-bin.000001 294 Gtid 1 342 SET @@SESSION.GTID_NEXT= ':2' +mysqld-bin.000001 342 Query 1 415 BEGIN +mysqld-bin.000001 415 Query 1 489 COMMIT +mysqld-bin.000001 489 Gtid 1 537 SET @@SESSION.GTID_NEXT= ':3' +mysqld-bin.000001 537 Query 1 692 use `test1`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB +mysqld-bin.000001 692 Gtid 1 740 SET @@SESSION.GTID_NEXT= ':4' +mysqld-bin.000001 740 Query 1 813 BEGIN +mysqld-bin.000001 813 Query 1 887 COMMIT +mysqld-bin.000001 887 Gtid 1 935 SET @@SESSION.GTID_NEXT= ':5' +mysqld-bin.000001 935 Query 1 998 BEGIN +mysqld-bin.000001 998 Table_map 1 1047 table_id: ### (test1.t1) +mysqld-bin.000001 1047 Write_rows 1 1091 table_id: ### flags: STMT_END_F +mysqld-bin.000001 1091 Xid 1 1122 COMMIT /* xid=### */ +mysqld-bin.000001 1122 Gtid 1 1170 SET @@SESSION.GTID_NEXT= ':6' +mysqld-bin.000001 1170 Query 1 1233 BEGIN +mysqld-bin.000001 1233 Query 1 1297 COMMIT +mysqld-bin.000001 1297 Gtid 1 1345 SET @@SESSION.GTID_NEXT= ':7' +mysqld-bin.000001 1345 Query 1 1408 BEGIN +mysqld-bin.000001 1408 Table_map 1 1457 table_id: ### (test1.t1) +mysqld-bin.000001 1457 Write_rows 1 1501 table_id: ### flags: STMT_END_F +mysqld-bin.000001 1501 Xid 1 1532 COMMIT /* xid=### */ +mysqld-bin.000001 1532 Gtid 1 1580 SET @@SESSION.GTID_NEXT= ':8' +mysqld-bin.000001 1580 Query 1 1643 BEGIN +mysqld-bin.000001 1643 Query 1 1707 COMMIT +mysqld-bin.000001 1707 Gtid 1 1755 SET @@SESSION.GTID_NEXT= ':9' +mysqld-bin.000001 1755 Query 1 1818 BEGIN +mysqld-bin.000001 1818 Table_map 1 1867 table_id: ### (test1.t1) +mysqld-bin.000001 1867 Write_rows 1 1911 table_id: ### flags: STMT_END_F +mysqld-bin.000001 1911 Xid 1 1942 COMMIT /* xid=### */ +mysqld-bin.000001 1942 Gtid 1 1990 SET @@SESSION.GTID_NEXT= ':10' +mysqld-bin.000001 1990 Query 1 2053 BEGIN +mysqld-bin.000001 2053 Query 1 2117 COMMIT +mysqld-bin.000001 2117 Gtid 1 2165 SET @@SESSION.GTID_NEXT= ':11' +mysqld-bin.000001 2165 Query 1 2228 BEGIN +mysqld-bin.000001 2228 Query 1 2292 COMMIT +mysqld-bin.000001 2292 Gtid 1 2340 SET @@SESSION.GTID_NEXT= ':12' +mysqld-bin.000001 2340 Query 1 2403 BEGIN +mysqld-bin.000001 2403 Table_map 1 2452 table_id: ### (test1.t1) +mysqld-bin.000001 2452 Update_rows 1 2542 table_id: ### flags: STMT_END_F +mysqld-bin.000001 2542 Xid 1 2573 COMMIT /* xid=### */ +mysqld-bin.000001 2573 Gtid 1 2621 SET @@SESSION.GTID_NEXT= ':13' +mysqld-bin.000001 2621 Query 1 2684 BEGIN +mysqld-bin.000001 2684 Table_map 1 2733 table_id: ### (test1.t1) +mysqld-bin.000001 2733 Delete_rows 1 2777 table_id: ### flags: STMT_END_F +mysqld-bin.000001 2777 Xid 1 2808 COMMIT /* xid=### */ +mysqld-bin.000001 2808 Gtid 1 2856 SET @@SESSION.GTID_NEXT= ':14' +mysqld-bin.000001 2856 Query 1 2919 BEGIN +mysqld-bin.000001 2919 Query 1 2983 COMMIT +mysqld-bin.000001 2983 Gtid 1 3031 SET @@SESSION.GTID_NEXT= ':15' +mysqld-bin.000001 3031 Query 1 3094 BEGIN +mysqld-bin.000001 3094 Table_map 1 3143 table_id: ### (test1.t1) +mysqld-bin.000001 3143 Write_rows 1 3187 table_id: ### flags: STMT_END_F +mysqld-bin.000001 3187 Table_map 1 3236 table_id: ### (test1.t1) +mysqld-bin.000001 3236 Write_rows 1 3280 table_id: ### flags: STMT_END_F +mysqld-bin.000001 3280 Xid 1 3311 COMMIT /* xid=### */ +mysqld-bin.000001 3311 Gtid 1 3359 SET @@SESSION.GTID_NEXT= ':16' +mysqld-bin.000001 3359 Query 1 3422 BEGIN +mysqld-bin.000001 3422 Table_map 1 3471 table_id: ### (test1.t1) +mysqld-bin.000001 3471 Write_rows 1 3515 table_id: ### flags: STMT_END_F +mysqld-bin.000001 3515 Xid 1 3546 COMMIT /* xid=### */ +include/diff_servers.inc [servers=2 3] +SELECT COUNT(*) = 2 FROM test1.t1 WHERE f1 IN (1,2); +COUNT(*) = 2 +1 +SELECT COUNT(*) = 3 FROM test1.t1 WHERE f1 IN (111,222,333); +COUNT(*) = 3 +1 +SELECT COUNT(*) = 2 FROM test1.t1 WHERE f2 = 'klm'; +COUNT(*) = 2 +1 +USE test2; +ERROR 42000: Unknown database 'test2' +DROP SCHEMA test1; +DROP SCHEMA test2; +STOP SLAVE; +RESET SLAVE ALL; diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result new file mode 100644 index 000000000000..c968312b1848 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result @@ -0,0 +1,295 @@ +RESET MASTER; +RESET MASTER; +RESET MASTER; +START SLAVE USER='root'; +Warnings: +Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. +CREATE SCHEMA test1; +CREATE SCHEMA test2; +USE test1; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +USE test2; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO test1.t1 (f1) VALUES (1); +INSERT INTO test2.t1 (f1) VALUES (1); +INSERT INTO test1.t1 (f1) VALUES (2); +INSERT INTO test2.t1 (f1) VALUES (2); +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +INSERT INTO test1.t1 (f1) VALUES (3); +INSERT INTO test2.t1 (f1) VALUES (3); +INSERT INTO test1.t1 (f1) VALUES (3); +INSERT INTO test2.t1 (f1) VALUES (3); +INSERT INTO test1.t1 (f1) VALUES (3); +INSERT INTO test2.t1 (f1) VALUES (3); +INSERT INTO test1.t1 (f1) VALUES (3); +INSERT INTO test2.t1 (f1) VALUES (3); +SET SESSION wsrep_on=OFF; +include/wait_for_slave_sql_error.inc [errno=1047] +INSERT INTO test1.t1 (f1) VALUES (4); +INSERT INTO test2.t1 (f1) VALUES (4); +INSERT INTO test1.t1 (f1) VALUES (4); +INSERT INTO test2.t1 (f1) VALUES (4); +INSERT INTO test1.t1 (f1) VALUES (4); +INSERT INTO test2.t1 (f1) VALUES (4); +INSERT INTO test1.t1 (f1) VALUES (4); +INSERT INTO test2.t1 (f1) VALUES (4); +INSERT INTO test1.t1 (f1) VALUES (4); +INSERT INTO test2.t1 (f1) VALUES (4); +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; +INSERT INTO test1.t1 (f1) VALUES (5); +INSERT INTO test2.t1 (f1) VALUES (5); +SET SESSION wsrep_on=ON; +INSERT INTO test1.t1 (f1) VALUES (6); +INSERT INTO test2.t1 (f1) VALUES (6); +START SLAVE; +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; +Log_name Pos Event_type Server_id End_log_pos Info +mysqld-bin.000001 120 Previous_gtids 2 151 +mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= ':1' +mysqld-bin.000001 199 Query 1 294 CREATE SCHEMA test1 +mysqld-bin.000001 294 Gtid 1 342 SET @@SESSION.GTID_NEXT= ':2' +mysqld-bin.000001 342 Query 1 415 BEGIN +mysqld-bin.000001 415 Query 1 489 COMMIT +mysqld-bin.000001 489 Gtid 1 537 SET @@SESSION.GTID_NEXT= ':3' +mysqld-bin.000001 537 Query 1 655 use `test1`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 655 Gtid 1 703 SET @@SESSION.GTID_NEXT= ':4' +mysqld-bin.000001 703 Query 1 776 BEGIN +mysqld-bin.000001 776 Query 1 850 COMMIT +mysqld-bin.000001 850 Gtid 1 898 SET @@SESSION.GTID_NEXT= ':5' +mysqld-bin.000001 898 Query 1 961 BEGIN +mysqld-bin.000001 961 Table_map 1 1007 table_id: ### (test1.t1) +mysqld-bin.000001 1007 Write_rows 1 1047 table_id: ### flags: STMT_END_F +mysqld-bin.000001 1047 Xid 1 1078 COMMIT /* xid=### */ +mysqld-bin.000001 1078 Gtid 1 1126 SET @@SESSION.GTID_NEXT= ':6' +mysqld-bin.000001 1126 Query 1 1189 BEGIN +mysqld-bin.000001 1189 Query 1 1253 COMMIT +mysqld-bin.000001 1253 Gtid 1 1301 SET @@SESSION.GTID_NEXT= ':7' +mysqld-bin.000001 1301 Query 1 1364 BEGIN +mysqld-bin.000001 1364 Table_map 1 1410 table_id: ### (test1.t1) +mysqld-bin.000001 1410 Write_rows 1 1450 table_id: ### flags: STMT_END_F +mysqld-bin.000001 1450 Xid 1 1481 COMMIT /* xid=### */ +mysqld-bin.000001 1481 Gtid 1 1529 SET @@SESSION.GTID_NEXT= ':8' +mysqld-bin.000001 1529 Query 1 1592 BEGIN +mysqld-bin.000001 1592 Query 1 1656 COMMIT +mysqld-bin.000001 1656 Gtid 1 1704 SET @@SESSION.GTID_NEXT= ':9' +mysqld-bin.000001 1704 Query 1 1767 BEGIN +mysqld-bin.000001 1767 Table_map 1 1813 table_id: ### (test1.t1) +mysqld-bin.000001 1813 Write_rows 1 1853 table_id: ### flags: STMT_END_F +mysqld-bin.000001 1853 Xid 1 1884 COMMIT /* xid=### */ +mysqld-bin.000001 1884 Gtid 1 1932 SET @@SESSION.GTID_NEXT= ':10' +mysqld-bin.000001 1932 Query 1 1995 BEGIN +mysqld-bin.000001 1995 Query 1 2059 COMMIT +mysqld-bin.000001 2059 Gtid 1 2107 SET @@SESSION.GTID_NEXT= ':11' +mysqld-bin.000001 2107 Query 1 2170 BEGIN +mysqld-bin.000001 2170 Table_map 1 2216 table_id: ### (test1.t1) +mysqld-bin.000001 2216 Write_rows 1 2256 table_id: ### flags: STMT_END_F +mysqld-bin.000001 2256 Xid 1 2287 COMMIT /* xid=### */ +mysqld-bin.000001 2287 Gtid 1 2335 SET @@SESSION.GTID_NEXT= ':12' +mysqld-bin.000001 2335 Query 1 2398 BEGIN +mysqld-bin.000001 2398 Query 1 2462 COMMIT +mysqld-bin.000001 2462 Gtid 1 2510 SET @@SESSION.GTID_NEXT= ':13' +mysqld-bin.000001 2510 Query 1 2573 BEGIN +mysqld-bin.000001 2573 Table_map 1 2619 table_id: ### (test1.t1) +mysqld-bin.000001 2619 Write_rows 1 2659 table_id: ### flags: STMT_END_F +mysqld-bin.000001 2659 Xid 1 2690 COMMIT /* xid=### */ +mysqld-bin.000001 2690 Gtid 1 2738 SET @@SESSION.GTID_NEXT= ':14' +mysqld-bin.000001 2738 Query 1 2801 BEGIN +mysqld-bin.000001 2801 Query 1 2865 COMMIT +mysqld-bin.000001 2865 Gtid 1 2913 SET @@SESSION.GTID_NEXT= ':15' +mysqld-bin.000001 2913 Query 1 2976 BEGIN +mysqld-bin.000001 2976 Table_map 1 3022 table_id: ### (test1.t1) +mysqld-bin.000001 3022 Write_rows 1 3062 table_id: ### flags: STMT_END_F +mysqld-bin.000001 3062 Xid 1 3093 COMMIT /* xid=### */ +mysqld-bin.000001 3093 Gtid 1 3141 SET @@SESSION.GTID_NEXT= ':16' +mysqld-bin.000001 3141 Query 1 3204 BEGIN +mysqld-bin.000001 3204 Query 1 3268 COMMIT +mysqld-bin.000001 3268 Gtid 1 3316 SET @@SESSION.GTID_NEXT= ':17' +mysqld-bin.000001 3316 Query 1 3379 BEGIN +mysqld-bin.000001 3379 Table_map 1 3425 table_id: ### (test1.t1) +mysqld-bin.000001 3425 Write_rows 1 3465 table_id: ### flags: STMT_END_F +mysqld-bin.000001 3465 Xid 1 3496 COMMIT /* xid=### */ +mysqld-bin.000001 3496 Gtid 1 3544 SET @@SESSION.GTID_NEXT= ':18' +mysqld-bin.000001 3544 Query 1 3607 BEGIN +mysqld-bin.000001 3607 Query 1 3671 COMMIT +mysqld-bin.000001 3671 Gtid 1 3719 SET @@SESSION.GTID_NEXT= ':19' +mysqld-bin.000001 3719 Query 1 3782 BEGIN +mysqld-bin.000001 3782 Table_map 1 3828 table_id: ### (test1.t1) +mysqld-bin.000001 3828 Write_rows 1 3868 table_id: ### flags: STMT_END_F +mysqld-bin.000001 3868 Xid 1 3899 COMMIT /* xid=### */ +mysqld-bin.000001 3899 Gtid 1 3947 SET @@SESSION.GTID_NEXT= ':20' +mysqld-bin.000001 3947 Query 1 4010 BEGIN +mysqld-bin.000001 4010 Query 1 4074 COMMIT +mysqld-bin.000001 4074 Gtid 1 4122 SET @@SESSION.GTID_NEXT= ':21' +mysqld-bin.000001 4122 Query 1 4185 BEGIN +mysqld-bin.000001 4185 Table_map 1 4231 table_id: ### (test1.t1) +mysqld-bin.000001 4231 Write_rows 1 4271 table_id: ### flags: STMT_END_F +mysqld-bin.000001 4271 Xid 1 4302 COMMIT /* xid=### */ +mysqld-bin.000001 4302 Gtid 1 4350 SET @@SESSION.GTID_NEXT= ':22' +mysqld-bin.000001 4350 Query 1 4413 BEGIN +mysqld-bin.000001 4413 Query 1 4477 COMMIT +mysqld-bin.000001 4477 Gtid 1 4525 SET @@SESSION.GTID_NEXT= ':23' +mysqld-bin.000001 4525 Query 1 4588 BEGIN +mysqld-bin.000001 4588 Table_map 1 4634 table_id: ### (test1.t1) +mysqld-bin.000001 4634 Write_rows 1 4674 table_id: ### flags: STMT_END_F +mysqld-bin.000001 4674 Xid 1 4705 COMMIT /* xid=### */ +mysqld-bin.000001 4705 Gtid 1 4753 SET @@SESSION.GTID_NEXT= ':24' +mysqld-bin.000001 4753 Query 1 4816 BEGIN +mysqld-bin.000001 4816 Query 1 4880 COMMIT +mysqld-bin.000001 4880 Gtid 1 4928 SET @@SESSION.GTID_NEXT= ':25' +mysqld-bin.000001 4928 Query 1 4991 BEGIN +mysqld-bin.000001 4991 Table_map 1 5037 table_id: ### (test1.t1) +mysqld-bin.000001 5037 Write_rows 1 5077 table_id: ### flags: STMT_END_F +mysqld-bin.000001 5077 Xid 1 5108 COMMIT /* xid=### */ +mysqld-bin.000001 5108 Gtid 1 5156 SET @@SESSION.GTID_NEXT= ':26' +mysqld-bin.000001 5156 Query 1 5219 BEGIN +mysqld-bin.000001 5219 Query 1 5283 COMMIT +mysqld-bin.000001 5283 Gtid 1 5331 SET @@SESSION.GTID_NEXT= ':27' +mysqld-bin.000001 5331 Query 1 5394 BEGIN +mysqld-bin.000001 5394 Table_map 1 5440 table_id: ### (test1.t1) +mysqld-bin.000001 5440 Write_rows 1 5480 table_id: ### flags: STMT_END_F +mysqld-bin.000001 5480 Xid 1 5511 COMMIT /* xid=### */ +mysqld-bin.000001 5511 Gtid 1 5559 SET @@SESSION.GTID_NEXT= ':28' +mysqld-bin.000001 5559 Query 1 5622 BEGIN +mysqld-bin.000001 5622 Query 1 5686 COMMIT +mysqld-bin.000001 5686 Gtid 1 5734 SET @@SESSION.GTID_NEXT= ':29' +mysqld-bin.000001 5734 Query 1 5797 BEGIN +mysqld-bin.000001 5797 Table_map 1 5843 table_id: ### (test1.t1) +mysqld-bin.000001 5843 Write_rows 1 5883 table_id: ### flags: STMT_END_F +mysqld-bin.000001 5883 Xid 1 5914 COMMIT /* xid=### */ +mysqld-bin.000001 5914 Gtid 1 5962 SET @@SESSION.GTID_NEXT= ':30' +mysqld-bin.000001 5962 Query 1 6025 BEGIN +mysqld-bin.000001 6025 Query 1 6089 COMMIT +USE test2; +ERROR 42000: Unknown database 'test2' +gtid_executed_equal +1 +USE test2; +ERROR 42000: Unknown database 'test2' +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; +Log_name Pos Event_type Server_id End_log_pos Info +mysqld-bin.000001 120 Previous_gtids 4 151 +mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= ':1' +mysqld-bin.000001 199 Query 1 294 CREATE SCHEMA test1 +mysqld-bin.000001 294 Gtid 1 342 SET @@SESSION.GTID_NEXT= ':2' +mysqld-bin.000001 342 Query 1 415 BEGIN +mysqld-bin.000001 415 Query 1 489 COMMIT +mysqld-bin.000001 489 Gtid 1 537 SET @@SESSION.GTID_NEXT= ':3' +mysqld-bin.000001 537 Query 1 655 use `test1`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 655 Gtid 1 703 SET @@SESSION.GTID_NEXT= ':4' +mysqld-bin.000001 703 Query 1 776 BEGIN +mysqld-bin.000001 776 Query 1 850 COMMIT +mysqld-bin.000001 850 Gtid 1 898 SET @@SESSION.GTID_NEXT= ':5' +mysqld-bin.000001 898 Query 1 961 BEGIN +mysqld-bin.000001 961 Table_map 1 1007 table_id: ### (test1.t1) +mysqld-bin.000001 1007 Write_rows 1 1047 table_id: ### flags: STMT_END_F +mysqld-bin.000001 1047 Xid 1 1078 COMMIT /* xid=### */ +mysqld-bin.000001 1078 Gtid 1 1126 SET @@SESSION.GTID_NEXT= ':6' +mysqld-bin.000001 1126 Query 1 1189 BEGIN +mysqld-bin.000001 1189 Query 1 1253 COMMIT +mysqld-bin.000001 1253 Gtid 1 1301 SET @@SESSION.GTID_NEXT= ':7' +mysqld-bin.000001 1301 Query 1 1364 BEGIN +mysqld-bin.000001 1364 Table_map 1 1410 table_id: ### (test1.t1) +mysqld-bin.000001 1410 Write_rows 1 1450 table_id: ### flags: STMT_END_F +mysqld-bin.000001 1450 Xid 1 1481 COMMIT /* xid=### */ +mysqld-bin.000001 1481 Gtid 1 1529 SET @@SESSION.GTID_NEXT= ':8' +mysqld-bin.000001 1529 Query 1 1592 BEGIN +mysqld-bin.000001 1592 Query 1 1656 COMMIT +mysqld-bin.000001 1656 Gtid 1 1704 SET @@SESSION.GTID_NEXT= ':9' +mysqld-bin.000001 1704 Query 1 1767 BEGIN +mysqld-bin.000001 1767 Table_map 1 1813 table_id: ### (test1.t1) +mysqld-bin.000001 1813 Write_rows 1 1853 table_id: ### flags: STMT_END_F +mysqld-bin.000001 1853 Xid 1 1884 COMMIT /* xid=### */ +mysqld-bin.000001 1884 Gtid 1 1932 SET @@SESSION.GTID_NEXT= ':10' +mysqld-bin.000001 1932 Query 1 1995 BEGIN +mysqld-bin.000001 1995 Query 1 2059 COMMIT +mysqld-bin.000001 2059 Gtid 1 2107 SET @@SESSION.GTID_NEXT= ':11' +mysqld-bin.000001 2107 Query 1 2170 BEGIN +mysqld-bin.000001 2170 Table_map 1 2216 table_id: ### (test1.t1) +mysqld-bin.000001 2216 Write_rows 1 2256 table_id: ### flags: STMT_END_F +mysqld-bin.000001 2256 Xid 1 2287 COMMIT /* xid=### */ +mysqld-bin.000001 2287 Gtid 1 2335 SET @@SESSION.GTID_NEXT= ':12' +mysqld-bin.000001 2335 Query 1 2398 BEGIN +mysqld-bin.000001 2398 Query 1 2462 COMMIT +mysqld-bin.000001 2462 Gtid 1 2510 SET @@SESSION.GTID_NEXT= ':13' +mysqld-bin.000001 2510 Query 1 2573 BEGIN +mysqld-bin.000001 2573 Table_map 1 2619 table_id: ### (test1.t1) +mysqld-bin.000001 2619 Write_rows 1 2659 table_id: ### flags: STMT_END_F +mysqld-bin.000001 2659 Xid 1 2690 COMMIT /* xid=### */ +mysqld-bin.000001 2690 Gtid 1 2738 SET @@SESSION.GTID_NEXT= ':14' +mysqld-bin.000001 2738 Query 1 2801 BEGIN +mysqld-bin.000001 2801 Query 1 2865 COMMIT +mysqld-bin.000001 2865 Gtid 1 2913 SET @@SESSION.GTID_NEXT= ':15' +mysqld-bin.000001 2913 Query 1 2976 BEGIN +mysqld-bin.000001 2976 Table_map 1 3022 table_id: ### (test1.t1) +mysqld-bin.000001 3022 Write_rows 1 3062 table_id: ### flags: STMT_END_F +mysqld-bin.000001 3062 Xid 1 3093 COMMIT /* xid=### */ +mysqld-bin.000001 3093 Gtid 1 3141 SET @@SESSION.GTID_NEXT= ':16' +mysqld-bin.000001 3141 Query 1 3204 BEGIN +mysqld-bin.000001 3204 Query 1 3268 COMMIT +mysqld-bin.000001 3268 Gtid 1 3316 SET @@SESSION.GTID_NEXT= ':17' +mysqld-bin.000001 3316 Query 1 3379 BEGIN +mysqld-bin.000001 3379 Table_map 1 3425 table_id: ### (test1.t1) +mysqld-bin.000001 3425 Write_rows 1 3465 table_id: ### flags: STMT_END_F +mysqld-bin.000001 3465 Xid 1 3496 COMMIT /* xid=### */ +mysqld-bin.000001 3496 Gtid 1 3544 SET @@SESSION.GTID_NEXT= ':18' +mysqld-bin.000001 3544 Query 1 3607 BEGIN +mysqld-bin.000001 3607 Query 1 3671 COMMIT +mysqld-bin.000001 3671 Gtid 1 3719 SET @@SESSION.GTID_NEXT= ':19' +mysqld-bin.000001 3719 Query 1 3782 BEGIN +mysqld-bin.000001 3782 Table_map 1 3828 table_id: ### (test1.t1) +mysqld-bin.000001 3828 Write_rows 1 3868 table_id: ### flags: STMT_END_F +mysqld-bin.000001 3868 Xid 1 3899 COMMIT /* xid=### */ +mysqld-bin.000001 3899 Gtid 1 3947 SET @@SESSION.GTID_NEXT= ':20' +mysqld-bin.000001 3947 Query 1 4010 BEGIN +mysqld-bin.000001 4010 Query 1 4074 COMMIT +mysqld-bin.000001 4074 Gtid 1 4122 SET @@SESSION.GTID_NEXT= ':21' +mysqld-bin.000001 4122 Query 1 4185 BEGIN +mysqld-bin.000001 4185 Table_map 1 4231 table_id: ### (test1.t1) +mysqld-bin.000001 4231 Write_rows 1 4271 table_id: ### flags: STMT_END_F +mysqld-bin.000001 4271 Xid 1 4302 COMMIT /* xid=### */ +mysqld-bin.000001 4302 Gtid 1 4350 SET @@SESSION.GTID_NEXT= ':22' +mysqld-bin.000001 4350 Query 1 4413 BEGIN +mysqld-bin.000001 4413 Query 1 4477 COMMIT +mysqld-bin.000001 4477 Gtid 1 4525 SET @@SESSION.GTID_NEXT= ':23' +mysqld-bin.000001 4525 Query 1 4588 BEGIN +mysqld-bin.000001 4588 Table_map 1 4634 table_id: ### (test1.t1) +mysqld-bin.000001 4634 Write_rows 1 4674 table_id: ### flags: STMT_END_F +mysqld-bin.000001 4674 Xid 1 4705 COMMIT /* xid=### */ +mysqld-bin.000001 4705 Gtid 1 4753 SET @@SESSION.GTID_NEXT= ':24' +mysqld-bin.000001 4753 Query 1 4816 BEGIN +mysqld-bin.000001 4816 Query 1 4880 COMMIT +mysqld-bin.000001 4880 Gtid 1 4928 SET @@SESSION.GTID_NEXT= ':25' +mysqld-bin.000001 4928 Query 1 4991 BEGIN +mysqld-bin.000001 4991 Table_map 1 5037 table_id: ### (test1.t1) +mysqld-bin.000001 5037 Write_rows 1 5077 table_id: ### flags: STMT_END_F +mysqld-bin.000001 5077 Xid 1 5108 COMMIT /* xid=### */ +mysqld-bin.000001 5108 Gtid 1 5156 SET @@SESSION.GTID_NEXT= ':26' +mysqld-bin.000001 5156 Query 1 5219 BEGIN +mysqld-bin.000001 5219 Query 1 5283 COMMIT +mysqld-bin.000001 5283 Gtid 1 5331 SET @@SESSION.GTID_NEXT= ':27' +mysqld-bin.000001 5331 Query 1 5394 BEGIN +mysqld-bin.000001 5394 Table_map 1 5440 table_id: ### (test1.t1) +mysqld-bin.000001 5440 Write_rows 1 5480 table_id: ### flags: STMT_END_F +mysqld-bin.000001 5480 Xid 1 5511 COMMIT /* xid=### */ +mysqld-bin.000001 5511 Gtid 1 5559 SET @@SESSION.GTID_NEXT= ':28' +mysqld-bin.000001 5559 Query 1 5622 BEGIN +mysqld-bin.000001 5622 Query 1 5686 COMMIT +mysqld-bin.000001 5686 Gtid 1 5734 SET @@SESSION.GTID_NEXT= ':29' +mysqld-bin.000001 5734 Query 1 5797 BEGIN +mysqld-bin.000001 5797 Table_map 1 5843 table_id: ### (test1.t1) +mysqld-bin.000001 5843 Write_rows 1 5883 table_id: ### flags: STMT_END_F +mysqld-bin.000001 5883 Xid 1 5914 COMMIT /* xid=### */ +mysqld-bin.000001 5914 Gtid 1 5962 SET @@SESSION.GTID_NEXT= ':30' +mysqld-bin.000001 5962 Query 1 6025 BEGIN +mysqld-bin.000001 6025 Query 1 6089 COMMIT +DROP SCHEMA test1; +DROP SCHEMA test2; +STOP SLAVE; +RESET SLAVE ALL; +CALL mtr.add_suppression("GTID replication failed"); +CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed"); +CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047"); +CALL mtr.add_suppression("TO isolation failed for"); +CALL mtr.add_suppression("Slave SQL: Error 'Deadlock found when trying to get lock; try restarting transaction' on query"); +CALL mtr.add_suppression("Slave SQL: Error 'WSREP has not yet prepared node for application use' on query"); +CALL mtr.add_suppression("Slave: WSREP has not yet prepared node for application use Error_code: 1047"); diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.cnf b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.cnf new file mode 100644 index 000000000000..56102fbe2cf8 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.cnf @@ -0,0 +1,16 @@ +!include ../galera_2nodes_as_slave.cnf + +[mysqld] +gtid-mode=ON +log-bin=mysqld-bin +log-slave-updates +enforce-gtid-consistency +binlog-format=ROW + +[mysqld.2] +replicate-do-db=test1 +replicate-wild-do-table=test1.% + +[mysqld.3] +replicate-do-db=test1 +replicate-wild-do-table=test1.% diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test new file mode 100644 index 000000000000..bf6356251450 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test @@ -0,0 +1,146 @@ +# +# Test Galera as a slave to a MySQL master using GTIDs +# + +--source include/have_innodb.inc +--source include/have_log_bin.inc + +# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +--source include/galera_cluster.inc + +--connection node_1 +RESET MASTER; + +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +--connection node_3 +RESET MASTER; + +--connection node_2 +RESET MASTER; +--disable_query_log +--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1; +--enable_query_log +START SLAVE USER='root'; + +--connection node_1 +CREATE SCHEMA test1; +CREATE SCHEMA test2; +USE test1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB; +USE test2; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB; + +# +# First , some autocommit stuff +# + +# Simple inserts + +INSERT INTO test1.t1 (f1) VALUES (1); +INSERT INTO test2.t1 (f1) VALUES (1); + +INSERT INTO test1.t1 (f1) VALUES (2); +INSERT INTO test2.t1 (f1) VALUES (2); + +INSERT INTO test1.t1 (f1) VALUES (3); +INSERT INTO test2.t1 (f1) VALUES (3); + +# Update that only covers test2.t1 + +UPDATE test2.t1 SET test2.t1.f2 = 'cde'; + +# Multi-table UPDATE + +UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz'; + +# Multi-table DELETE + +DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3; + +# +# Multi-statement transactions +# + +# Transaction which is not replicated at all + +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO test2.t1 (f1) VALUES (999); +INSERT INTO test2.t1 (f1) VALUES (9999); +COMMIT; + +# Transaction that is completely replicated +START TRANSACTION; +INSERT INTO test1.t1 (f1) VALUES (111); +INSERT INTO test1.t1 (f1) VALUES (222); +COMMIT; + +# Transaction that is partially replicated + +START TRANSACTION; +INSERT INTO test1.t1 (f1) VALUES (333); +INSERT INTO test2.t1 (f1) VALUES (99999); +COMMIT; + +# +# Make sure binary logs and gtid_executed strings are equal +# + +--sleep 2 +--connection node_2 +--let $effective_uuid = `SELECT LEFT(@@global.gtid_executed, 36)` +--let $gtid_executed_node2 = `SELECT @@global.gtid_executed;` + +--replace_result $effective_uuid +--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/ +SHOW BINLOG EVENTS IN 'mysqld-bin.000001'; + +--connection node_3 + +--disable_query_log +--eval SELECT '$gtid_executed_node2' = @@global.gtid_executed AS gtid_executed_equal; +--enable_query_log + +--replace_result $effective_uuid +--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/ +SHOW BINLOG EVENTS IN 'mysqld-bin.000001'; + +# +# Final consistency checks +# + +--let $diff_servers = 2 3 +--source include/diff_servers.inc + +--connection node_3 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--source include/wait_condition.inc + +SELECT COUNT(*) = 2 FROM test1.t1 WHERE f1 IN (1,2); +SELECT COUNT(*) = 3 FROM test1.t1 WHERE f1 IN (111,222,333); +SELECT COUNT(*) = 2 FROM test1.t1 WHERE f2 = 'klm'; + +--error 1049 +USE test2; + +# +# Cleanup +# + +--connection node_1 +DROP SCHEMA test1; +DROP SCHEMA test2; + +--sleep 1 + +--connection node_3 +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--source include/wait_condition.inc + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--source include/wait_condition.inc + +STOP SLAVE; +RESET SLAVE ALL; diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.cnf b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.cnf new file mode 100644 index 000000000000..2669da8c2a73 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.cnf @@ -0,0 +1,16 @@ +!include ../galera_3nodes_as_slave.cnf + +[mysqld] +gtid-mode=ON +log-bin=mysqld-bin +log-slave-updates +enforce-gtid-consistency +binlog-format=ROW + +[mysqld.2] +replicate-do-db=test1 +replicate-wild-do-table=test1.% + +[mysqld.3] +replicate-do-db=test1 +replicate-wild-do-table=test1.% diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test new file mode 100644 index 000000000000..bc3c234d4ba2 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test @@ -0,0 +1,167 @@ +# +# Test the case where a Galera slave to async replication goes non-prim while +# a stream of replication events including filtered events is arriving +# + +--source include/have_innodb.inc +--source include/have_log_bin.inc +--source include/big_test.inc + +# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +--source include/galera_cluster.inc + +--connection node_1 +RESET MASTER; + +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +--connection node_3 +RESET MASTER; + +--connection node_2 +RESET MASTER; + +--connection node_2 +--disable_query_log +--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1; +--enable_query_log +START SLAVE USER='root'; + +--connection node_1 +CREATE SCHEMA test1; +CREATE SCHEMA test2; +USE test1; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +USE test2; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; + +INSERT INTO test1.t1 (f1) VALUES (1); +INSERT INTO test2.t1 (f1) VALUES (1); + +INSERT INTO test1.t1 (f1) VALUES (2); +INSERT INTO test2.t1 (f1) VALUES (2); + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT COUNT(*) = 2 FROM test1.t1; +--source include/wait_condition.inc + +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; + +--connection node_1 +INSERT INTO test1.t1 (f1) VALUES (3); +INSERT INTO test2.t1 (f1) VALUES (3); +INSERT INTO test1.t1 (f1) VALUES (3); +INSERT INTO test2.t1 (f1) VALUES (3); +INSERT INTO test1.t1 (f1) VALUES (3); +INSERT INTO test2.t1 (f1) VALUES (3); +INSERT INTO test1.t1 (f1) VALUES (3); +INSERT INTO test2.t1 (f1) VALUES (3); + +--connection node_2 +SET SESSION wsrep_on=OFF; +--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_status'; +--source include/wait_condition.inc + +--let $slave_sql_errno = 1047 +--source include/wait_for_slave_sql_error.inc + +--connection node_1 +INSERT INTO test1.t1 (f1) VALUES (4); +INSERT INTO test2.t1 (f1) VALUES (4); +INSERT INTO test1.t1 (f1) VALUES (4); +INSERT INTO test2.t1 (f1) VALUES (4); +INSERT INTO test1.t1 (f1) VALUES (4); +INSERT INTO test2.t1 (f1) VALUES (4); +INSERT INTO test1.t1 (f1) VALUES (4); +INSERT INTO test2.t1 (f1) VALUES (4); +INSERT INTO test1.t1 (f1) VALUES (4); +INSERT INTO test2.t1 (f1) VALUES (4); + +--connection node_2 +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; + +--connection node_1 +INSERT INTO test1.t1 (f1) VALUES (5); +INSERT INTO test2.t1 (f1) VALUES (5); + +--connection node_2 +--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_status'; +--source include/wait_condition.inc +SET SESSION wsrep_on=ON; +--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_ready'; +--source include/wait_condition.inc + +--connection node_1 +INSERT INTO test1.t1 (f1) VALUES (6); +INSERT INTO test2.t1 (f1) VALUES (6); + +--connection node_2 +START SLAVE; + +# +# Consistency checks +# + +--connection node_2 +--let $wait_condition = SELECT COUNT(DISTINCT f1) = 6 FROM test1.t1; +--source include/wait_condition.inc + +--connection node_3 +--let $wait_condition = SELECT COUNT(DISTINCT f1) = 6 FROM test1.t1; +--source include/wait_condition.inc + +--connection node_2 +--let $gtid_executed_node2 = `SELECT @@global.gtid_executed;` +--let $effective_uuid = `SELECT LEFT(@@global.gtid_executed, 36)` + +--replace_result $effective_uuid +--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/ +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; + +--error 1049 +USE test2; + +--connection node_3 + +--disable_query_log +--eval SELECT '$gtid_executed_node2' = @@global.gtid_executed AS gtid_executed_equal; +--enable_query_log + +--error 1049 +USE test2; + +--replace_result $effective_uuid +--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/ +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; + +# +# Cleanup +# + +--connection node_1 +DROP SCHEMA test1; +DROP SCHEMA test2; + +--sleep 1 + +--connection node_3 +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--source include/wait_condition.inc + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--source include/wait_condition.inc + +--connection node_2 +STOP SLAVE; +RESET SLAVE ALL; +CALL mtr.add_suppression("GTID replication failed"); +CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed"); +CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047"); +CALL mtr.add_suppression("TO isolation failed for"); +CALL mtr.add_suppression("Slave SQL: Error 'Deadlock found when trying to get lock; try restarting transaction' on query"); +CALL mtr.add_suppression("Slave SQL: Error 'WSREP has not yet prepared node for application use' on query"); +CALL mtr.add_suppression("Slave: WSREP has not yet prepared node for application use Error_code: 1047"); From de641f23a95514a86f415bfab5212492447884ef Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Fri, 25 Nov 2016 16:56:57 -0200 Subject: [PATCH 099/305] GAL-480 MTR test --- mysql-test/suite/galera/r/GAL-480.result | 39 ++++++++++++++++++++ mysql-test/suite/galera/t/GAL-480.test | 46 ++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 mysql-test/suite/galera/r/GAL-480.result create mode 100644 mysql-test/suite/galera/t/GAL-480.test diff --git a/mysql-test/suite/galera/r/GAL-480.result b/mysql-test/suite/galera/r/GAL-480.result new file mode 100644 index 000000000000..b762e07423e3 --- /dev/null +++ b/mysql-test/suite/galera/r/GAL-480.result @@ -0,0 +1,39 @@ +CREATE TABLE t1 (f1 CHAR(10), f0 integer) ENGINE=InnoDB; +FLUSH TABLE t1 FOR EXPORT; +UNLOCK TABLES; +ALTER TABLE t1 DROP COLUMN f1; +SET SESSION wsrep_osu_method='RSU'; +ALTER TABLE t1 ADD COLUMN f1 CHAR(10); +ALTER TABLE t1 DROP COLUMN f1; +ALTER TABLE t1 ADD COLUMN f2 CHAR(10); +ALTER TABLE t1 DROP COLUMN f2; +ALTER TABLE t1 ADD COLUMN f3 CHAR(10); +ALTER TABLE t1 DROP COLUMN f3; +ALTER TABLE t1 ADD COLUMN f4 CHAR(10); +ALTER TABLE t1 DROP COLUMN f4; +ALTER TABLE t1 ADD COLUMN f5 CHAR(10); +ALTER TABLE t1 DROP COLUMN f5; +ALTER TABLE t1 ADD COLUMN f6 CHAR(10); +ALTER TABLE t1 DROP COLUMN f6; +ALTER TABLE t1 ADD COLUMN f7 CHAR(10); +ALTER TABLE t1 DROP COLUMN f7; +ALTER TABLE t1 ADD COLUMN f8 CHAR(10); +ALTER TABLE t1 DROP COLUMN f8; +ALTER TABLE t1 ADD COLUMN f9 CHAR(10); +ALTER TABLE t1 DROP COLUMN f9; +ALTER TABLE t1 ADD COLUMN f10 CHAR(10); +ALTER TABLE t1 DROP COLUMN f10; +ALTER TABLE t1 ADD COLUMN f11 CHAR(10); +ALTER TABLE t1 DROP COLUMN f11; +ALTER TABLE t1 ADD COLUMN f12 CHAR(10); +ALTER TABLE t1 DROP COLUMN f12; +ALTER TABLE t1 ADD COLUMN f13 CHAR(10); +ALTER TABLE t1 DROP COLUMN f13; +ALTER TABLE t1 ADD COLUMN f14 CHAR(10); +ALTER TABLE t1 DROP COLUMN f14; +ALTER TABLE t1 ADD COLUMN f15 CHAR(10); +ALTER TABLE t1 DROP COLUMN f15; +ALTER TABLE t1 ADD COLUMN f16 CHAR(10); +ALTER TABLE t1 DROP COLUMN f16; +SET SESSION wsrep_osu_method='TOI'; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/GAL-480.test b/mysql-test/suite/galera/t/GAL-480.test new file mode 100644 index 000000000000..c2b34f2a935c --- /dev/null +++ b/mysql-test/suite/galera/t/GAL-480.test @@ -0,0 +1,46 @@ +--source include/galera_cluster.inc + +--connection node_1 +CREATE TABLE t1 (f1 CHAR(10), f0 integer) ENGINE=InnoDB; + +FLUSH TABLE t1 FOR EXPORT; +UNLOCK TABLES; + +ALTER TABLE t1 DROP COLUMN f1; + +SET SESSION wsrep_osu_method='RSU'; +ALTER TABLE t1 ADD COLUMN f1 CHAR(10); +ALTER TABLE t1 DROP COLUMN f1; +ALTER TABLE t1 ADD COLUMN f2 CHAR(10); +ALTER TABLE t1 DROP COLUMN f2; +ALTER TABLE t1 ADD COLUMN f3 CHAR(10); +ALTER TABLE t1 DROP COLUMN f3; +ALTER TABLE t1 ADD COLUMN f4 CHAR(10); +ALTER TABLE t1 DROP COLUMN f4; +ALTER TABLE t1 ADD COLUMN f5 CHAR(10); +ALTER TABLE t1 DROP COLUMN f5; +ALTER TABLE t1 ADD COLUMN f6 CHAR(10); +ALTER TABLE t1 DROP COLUMN f6; +ALTER TABLE t1 ADD COLUMN f7 CHAR(10); +ALTER TABLE t1 DROP COLUMN f7; +ALTER TABLE t1 ADD COLUMN f8 CHAR(10); +ALTER TABLE t1 DROP COLUMN f8; +ALTER TABLE t1 ADD COLUMN f9 CHAR(10); +ALTER TABLE t1 DROP COLUMN f9; +ALTER TABLE t1 ADD COLUMN f10 CHAR(10); +ALTER TABLE t1 DROP COLUMN f10; +ALTER TABLE t1 ADD COLUMN f11 CHAR(10); +ALTER TABLE t1 DROP COLUMN f11; +ALTER TABLE t1 ADD COLUMN f12 CHAR(10); +ALTER TABLE t1 DROP COLUMN f12; +ALTER TABLE t1 ADD COLUMN f13 CHAR(10); +ALTER TABLE t1 DROP COLUMN f13; +ALTER TABLE t1 ADD COLUMN f14 CHAR(10); +ALTER TABLE t1 DROP COLUMN f14; +ALTER TABLE t1 ADD COLUMN f15 CHAR(10); +ALTER TABLE t1 DROP COLUMN f15; +ALTER TABLE t1 ADD COLUMN f16 CHAR(10); +ALTER TABLE t1 DROP COLUMN f16; + +SET SESSION wsrep_osu_method='TOI'; +DROP TABLE t1; From 104cb35c709fd125f9784f71188170ae8a316abe Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Mon, 28 Nov 2016 00:50:02 -0800 Subject: [PATCH 100/305] Galera MTR Tests: fix variable output in galera_as_slave_gtid_replicate_do_db.result --- .../galera/r/galera_as_slave_gtid_replicate_do_db.result | 6 ++---- .../galera/t/galera_as_slave_gtid_replicate_do_db.test | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result index 2dd2f3fc6297..27bebf2ff6ec 100644 --- a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result +++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result @@ -32,9 +32,8 @@ START TRANSACTION; INSERT INTO test1.t1 (f1) VALUES (333); INSERT INTO test2.t1 (f1) VALUES (99999); COMMIT; -SHOW BINLOG EVENTS IN 'mysqld-bin.000001'; +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 4 Format_desc 2 120 Server ver: 5.6.34-log, Binlog ver: 4 mysqld-bin.000001 120 Previous_gtids 2 151 mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= ':1' mysqld-bin.000001 199 Query 1 294 CREATE SCHEMA test1 @@ -100,9 +99,8 @@ mysqld-bin.000001 3471 Write_rows 1 3515 table_id: ### flags: STMT_END_F mysqld-bin.000001 3515 Xid 1 3546 COMMIT /* xid=### */ gtid_executed_equal 1 -SHOW BINLOG EVENTS IN 'mysqld-bin.000001'; +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 4 Format_desc 3 120 Server ver: 5.6.34-log, Binlog ver: 4 mysqld-bin.000001 120 Previous_gtids 3 151 mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= ':1' mysqld-bin.000001 199 Query 1 294 CREATE SCHEMA test1 diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test index bf6356251450..5f3fbd5e6bbd 100644 --- a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test +++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test @@ -94,7 +94,7 @@ COMMIT; --replace_result $effective_uuid --replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/ -SHOW BINLOG EVENTS IN 'mysqld-bin.000001'; +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; --connection node_3 @@ -104,7 +104,7 @@ SHOW BINLOG EVENTS IN 'mysqld-bin.000001'; --replace_result $effective_uuid --replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/ -SHOW BINLOG EVENTS IN 'mysqld-bin.000001'; +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; # # Final consistency checks From e76cb774fbfb8317ebdeb2f8f8430011f1e6a319 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 6 Dec 2016 23:28:45 -0800 Subject: [PATCH 101/305] Galera MTR tests: Make the mysqlhotcopy tests pass on Ubuntu 16.04 --- mysql-test/include/mysqlhotcopy.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/include/mysqlhotcopy.inc b/mysql-test/include/mysqlhotcopy.inc index fcf57a68644c..da816ab5c079 100644 --- a/mysql-test/include/mysqlhotcopy.inc +++ b/mysql-test/include/mysqlhotcopy.inc @@ -107,7 +107,7 @@ DROP DATABASE hotcopy_save; --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR --list_files $MYSQLD_DATADIR/hotcopy_save --replace_result $MASTER_MYSOCK MASTER_MYSOCK ---error 9,11,2304 +--error 9,11,2304,255 --exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save --replace_result $MASTER_MYSOCK MASTER_MYSOCK --exec $MYSQLHOTCOPY --quiet --allowold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save From 07f542f4b8d44a737afbdeaf682b10119a9e0f89 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 6 Dec 2016 23:43:11 -0800 Subject: [PATCH 102/305] Galera MTR Tests: Remove EDH-RSA-DES-CBC-SHA from t/openssl_1.test since is it no longer supported by OpenSSL --- mysql-test/r/openssl_1.result | 2 -- mysql-test/t/openssl_1.test | 1 - 2 files changed, 3 deletions(-) diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index f8dde3d4b5bd..e6a3e0e1dc8c 100644 --- a/mysql-test/r/openssl_1.result +++ b/mysql-test/r/openssl_1.result @@ -196,8 +196,6 @@ Ssl_cipher DHE-RSA-AES256-SHA Variable_name Value Ssl_cipher EDH-RSA-DES-CBC3-SHA Variable_name Value -Ssl_cipher EDH-RSA-DES-CBC-SHA -Variable_name Value Ssl_cipher RC4-SHA select 'is still running; no cipher request crashed the server' as result from dual; result diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test index 1b64239dcf95..15aeea7ee877 100644 --- a/mysql-test/t/openssl_1.test +++ b/mysql-test/t/openssl_1.test @@ -214,7 +214,6 @@ DROP TABLE t1; # Common ciphers to openssl and yassl --exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=DHE-RSA-AES256-SHA --exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=EDH-RSA-DES-CBC3-SHA ---exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=EDH-RSA-DES-CBC-SHA --exec $MYSQL --host=localhost -e "SHOW STATUS LIKE 'Ssl_cipher';" --ssl-cipher=RC4-SHA --disable_query_log --disable_result_log From 16a6d4d3d8ea400520fbf60d86964469ac6bbf36 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 7 Dec 2016 17:17:15 +0100 Subject: [PATCH 103/305] MW-329 Fix incorrect affected rows count after replay Fixes wsrep_replay_transaction so that it preserves affected rows, last insert id, and message from diagnostics area. --- sql/sql_class.h | 1 + sql/wsrep_thd.cc | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/sql/sql_class.h b/sql/sql_class.h index 3c77bafdcdef..08568f19b57c 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -84,6 +84,7 @@ struct wsrep_thd_shadow { char *db; size_t db_length; struct timeval user_time; + longlong row_count_func; }; #endif class Reprepare_observer; diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index 077838934724..657378f51f50 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -174,6 +174,7 @@ static void wsrep_prepare_bf_thd(THD *thd, struct wsrep_thd_shadow* shadow) thd->reset_db(NULL, 0); shadow->user_time = thd->user_time; + shadow->row_count_func= thd->get_row_count_func(); } static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow) @@ -185,6 +186,7 @@ static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow) thd->variables.tx_isolation = shadow->tx_isolation; thd->reset_db(shadow->db, shadow->db_length); thd->user_time = shadow->user_time; + thd->set_row_count_func(shadow->row_count_func); } void wsrep_replay_transaction(THD *thd) @@ -207,6 +209,25 @@ void wsrep_replay_transaction(THD *thd) WSREP_WARN("dangling observer in replay transaction: (thr %lu %lld %s)", thd->thread_id, thd->query_id, thd->query()); } + + struct da_shadow + { + enum Diagnostics_area::enum_diagnostics_status status; + ulonglong affected_rows; + ulonglong last_insert_id; + char message[MYSQL_ERRMSG_SIZE]; + }; + struct da_shadow da_status; + da_status.status= thd->get_stmt_da()->status(); + if (da_status.status == Diagnostics_area::DA_OK) + { + da_status.affected_rows= thd->get_stmt_da()->affected_rows(); + da_status.last_insert_id= thd->get_stmt_da()->last_insert_id(); + strmake(da_status.message, + thd->get_stmt_da()->message(), + sizeof(da_status.message)-1); + } + thd->get_stmt_da()->reset_diagnostics_area(); thd->wsrep_conflict_state= REPLAYING; @@ -273,7 +294,17 @@ void wsrep_replay_transaction(THD *thd) } else { - my_ok(thd); + if (da_status.status == Diagnostics_area::DA_OK) + { + my_ok(thd, + da_status.affected_rows, + da_status.last_insert_id, + da_status.message); + } + else + { + my_ok(thd); + } } break; case WSREP_TRX_FAIL: From 88b8fca03fdf6bf9d950fc41b6b0f3cbbd782996 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Thu, 8 Dec 2016 00:17:28 -0800 Subject: [PATCH 104/305] Galera MTR Tests: Test for MW-329 Fix incorrect affected rows count after replay --- mysql-test/suite/galera/r/MW-329.result | 80 +++++++++++++++++++++++++ mysql-test/suite/galera/t/MW-329.test | 61 +++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 mysql-test/suite/galera/r/MW-329.result create mode 100644 mysql-test/suite/galera/t/MW-329.test diff --git a/mysql-test/suite/galera/r/MW-329.result b/mysql-test/suite/galera/r/MW-329.result new file mode 100644 index 000000000000..c782bf38f48f --- /dev/null +++ b/mysql-test/suite/galera/r/MW-329.result @@ -0,0 +1,80 @@ +CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; +INSERT INTO t1 (f1) VALUES (1),(65535); +FLUSH STATUS; +SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'; +VARIABLE_VALUE = 0 +1 +CREATE PROCEDURE proc_insert () +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END; +SET SESSION wsrep_sync_wait = 0; +WHILE 1 DO +INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 )); +END WHILE; +END| +CALL proc_insert();; +SELECT ROW_COUNT() > 0; +ROW_COUNT() > 0 +1 +SELECT FOUND_ROWS() > 0; +FOUND_ROWS() > 0 +1 +SELECT ROW_COUNT() > 0; +ROW_COUNT() > 0 +1 +SELECT FOUND_ROWS() > 0; +FOUND_ROWS() > 0 +1 +SELECT ROW_COUNT() > 0; +ROW_COUNT() > 0 +1 +SELECT FOUND_ROWS() > 0; +FOUND_ROWS() > 0 +1 +SELECT ROW_COUNT() > 0; +ROW_COUNT() > 0 +1 +SELECT FOUND_ROWS() > 0; +FOUND_ROWS() > 0 +1 +SELECT ROW_COUNT() > 0; +ROW_COUNT() > 0 +1 +SELECT FOUND_ROWS() > 0; +FOUND_ROWS() > 0 +1 +SELECT ROW_COUNT() > 0; +ROW_COUNT() > 0 +1 +SELECT FOUND_ROWS() > 0; +FOUND_ROWS() > 0 +1 +SELECT ROW_COUNT() > 0; +ROW_COUNT() > 0 +1 +SELECT FOUND_ROWS() > 0; +FOUND_ROWS() > 0 +1 +SELECT ROW_COUNT() > 0; +ROW_COUNT() > 0 +1 +SELECT FOUND_ROWS() > 0; +FOUND_ROWS() > 0 +1 +SELECT ROW_COUNT() > 0; +ROW_COUNT() > 0 +1 +SELECT FOUND_ROWS() > 0; +FOUND_ROWS() > 0 +1 +SELECT ROW_COUNT() > 0; +ROW_COUNT() > 0 +1 +SELECT FOUND_ROWS() > 0; +FOUND_ROWS() > 0 +1 +SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'; +VARIABLE_VALUE > 0 +1 +DROP PROCEDURE proc_insert; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MW-329.test b/mysql-test/suite/galera/t/MW-329.test new file mode 100644 index 000000000000..d22eb4d6a79c --- /dev/null +++ b/mysql-test/suite/galera/t/MW-329.test @@ -0,0 +1,61 @@ +# +# #MW-329 Fix incorrect affected rows count after replay +# + +--source include/galera_cluster.inc + +CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; + +# We start with a populated table +INSERT INTO t1 (f1) VALUES (1),(65535); + +# Clear the wsrep_local_replays counter + +FLUSH STATUS; +SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'; + +# +# Run concurrent INSERTs +# + +DELIMITER |; +CREATE PROCEDURE proc_insert () +BEGIN + DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END; + SET SESSION wsrep_sync_wait = 0; + WHILE 1 DO + INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 )); + END WHILE; +END| +DELIMITER ;| + +--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1b +--send CALL proc_insert(); + +# +# Run concurrent UPDATEs. We expect that each UPDATE will report that +# some rows were matched and updated +# + +--connection node_2 +--let $count = 10 +while ($count) +{ + --let $signature = `SELECT LEFT(MD5(RAND()), 10)` + --disable_query_log + --eval UPDATE t1 SET f2 = '$signature' + --enable_query_log + SELECT ROW_COUNT() > 0; + SELECT FOUND_ROWS() > 0; + --dec $count +} + +# +# Confirm that some transaction replays occurred +# + +SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'; + +DROP PROCEDURE proc_insert; +DROP TABLE t1; From 21f3a5050e3c2786c1a11e732f13a962b633f8f4 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Thu, 8 Dec 2016 05:15:31 -0800 Subject: [PATCH 105/305] Galera MTR Tests: Stability fix for MW-329 --- mysql-test/suite/galera/r/MW-329.result | 60 --------------------- mysql-test/suite/galera/t/MW-329-master.opt | 1 + mysql-test/suite/galera/t/MW-329.test | 24 ++++++++- 3 files changed, 23 insertions(+), 62 deletions(-) create mode 100644 mysql-test/suite/galera/t/MW-329-master.opt diff --git a/mysql-test/suite/galera/r/MW-329.result b/mysql-test/suite/galera/r/MW-329.result index c782bf38f48f..655d8e9e2917 100644 --- a/mysql-test/suite/galera/r/MW-329.result +++ b/mysql-test/suite/galera/r/MW-329.result @@ -13,66 +13,6 @@ INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 )); END WHILE; END| CALL proc_insert();; -SELECT ROW_COUNT() > 0; -ROW_COUNT() > 0 -1 -SELECT FOUND_ROWS() > 0; -FOUND_ROWS() > 0 -1 -SELECT ROW_COUNT() > 0; -ROW_COUNT() > 0 -1 -SELECT FOUND_ROWS() > 0; -FOUND_ROWS() > 0 -1 -SELECT ROW_COUNT() > 0; -ROW_COUNT() > 0 -1 -SELECT FOUND_ROWS() > 0; -FOUND_ROWS() > 0 -1 -SELECT ROW_COUNT() > 0; -ROW_COUNT() > 0 -1 -SELECT FOUND_ROWS() > 0; -FOUND_ROWS() > 0 -1 -SELECT ROW_COUNT() > 0; -ROW_COUNT() > 0 -1 -SELECT FOUND_ROWS() > 0; -FOUND_ROWS() > 0 -1 -SELECT ROW_COUNT() > 0; -ROW_COUNT() > 0 -1 -SELECT FOUND_ROWS() > 0; -FOUND_ROWS() > 0 -1 -SELECT ROW_COUNT() > 0; -ROW_COUNT() > 0 -1 -SELECT FOUND_ROWS() > 0; -FOUND_ROWS() > 0 -1 -SELECT ROW_COUNT() > 0; -ROW_COUNT() > 0 -1 -SELECT FOUND_ROWS() > 0; -FOUND_ROWS() > 0 -1 -SELECT ROW_COUNT() > 0; -ROW_COUNT() > 0 -1 -SELECT FOUND_ROWS() > 0; -FOUND_ROWS() > 0 -1 -SELECT ROW_COUNT() > 0; -ROW_COUNT() > 0 -1 -SELECT FOUND_ROWS() > 0; -FOUND_ROWS() > 0 -1 SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'; VARIABLE_VALUE > 0 1 diff --git a/mysql-test/suite/galera/t/MW-329-master.opt b/mysql-test/suite/galera/t/MW-329-master.opt new file mode 100644 index 000000000000..6565a6af3c4d --- /dev/null +++ b/mysql-test/suite/galera/t/MW-329-master.opt @@ -0,0 +1 @@ +--wsrep-retry-autocommit=0 diff --git a/mysql-test/suite/galera/t/MW-329.test b/mysql-test/suite/galera/t/MW-329.test index d22eb4d6a79c..445f8795dff6 100644 --- a/mysql-test/suite/galera/t/MW-329.test +++ b/mysql-test/suite/galera/t/MW-329.test @@ -31,6 +31,7 @@ DELIMITER ;| --connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1 --connection node_1b +--let $connection_id = `SELECT CONNECTION_ID()` --send CALL proc_insert(); # @@ -44,10 +45,15 @@ while ($count) { --let $signature = `SELECT LEFT(MD5(RAND()), 10)` --disable_query_log + --error 0,ER_LOCK_DEADLOCK --eval UPDATE t1 SET f2 = '$signature' --enable_query_log - SELECT ROW_COUNT() > 0; - SELECT FOUND_ROWS() > 0; + --let $row_count = `SELECT ROW_COUNT()` + if (`SELECT @@error_count = 0`) { + if (`SELECT $row_count = 0`) { + --die ROW_COUNT() = 0 + } + } --dec $count } @@ -57,5 +63,19 @@ while ($count) SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'; +# +# Terminate the stored procedure +# + +--connection node_1 +--disable_query_log +--eval KILL CONNECTION $connection_id +--enable_query_log + +--connection node_1b +--error 0,2013,1317 +--reap + +--connection node_1 DROP PROCEDURE proc_insert; DROP TABLE t1; From cc54b12a8743918c3f9707deda5ce5295207c4b2 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Thu, 15 Dec 2016 01:22:44 -0800 Subject: [PATCH 106/305] Galera MTR Tests: restore galera_autoinc_sst_xtrabackup.test to use xtrabackup SST --- mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf | 5 ++--- mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf b/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf index 7d684cef67d5..b4bf5f021713 100644 --- a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf +++ b/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf @@ -1,9 +1,8 @@ !include ../galera_2nodes.cnf [mysqld] -#wsrep_sst_method=xtrabackup-v2 -#wsrep_sst_auth="root:" -#wsrep_debug=ON +wsrep_sst_method=xtrabackup-v2 +wsrep_sst_auth="root:" [mysqld.1] wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test b/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test index 251450f70992..30ce9bc4ceb4 100644 --- a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test +++ b/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test @@ -1,6 +1,6 @@ # # Test that autoincrement works correctly while the cluster membership -# is changing and IST takes place. +# is changing and SST takes place. # --source include/big_test.inc From 0122a99b9d9f2a376fa5b5cde28c2fed27220cf4 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 14 Dec 2016 11:10:42 +0100 Subject: [PATCH 107/305] MW-328 Fix unnecessary/silent BF aborts This patch fixes the following BF abort related issues: * Unnecessary BF abort on subsequent query (autocommit mode). If pre_commit returns WSREP_OK and MUST_ABORT conflict state is ignored, then also THD::killed must be cleared. Otherwise THD::killed persists and subsequent statement is killed. * Protocol::end_statement() triggers assertion due to DA_EMPTY diagnostics area. This happens because wsrep_mysql_parse() may reset diagnostics area and later tries to sets deadlock error using my_error(), which in turn calls THD::raise_condition(). THD:raise_condition() ignores errors on INSERT ... SELECT with IGNORE keyword. Changed THD::raise_condition() so that errors is are not ignored if wsrep_conflict_state is set to ABORTED or MUST_ABORT. --- sql/sql_class.cc | 7 +++++++ sql/wsrep_hton.cc | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 6e98d73bc531..df51236e6e3d 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1494,8 +1494,15 @@ Sql_condition* THD::raise_condition(uint sql_errno, thd->lex->current_select == 0 if lex structure is not inited (not query command (COM_QUERY)) */ +#ifdef WITH_WSREP + if (lex->current_select && + lex->current_select->no_error && !is_fatal_error && + (!(wsrep_conflict_state == ABORTED || + wsrep_conflict_state == MUST_ABORT))) +#else if (lex->current_select && lex->current_select->no_error && !is_fatal_error) +#endif { DBUG_PRINT("error", ("Error converted to warning: current_select: no_error %d " diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index ba072dfb2ceb..0e84d57c190d 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -515,7 +515,10 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) set to NO_CONFLICT and commit proceeds as usual. */ if (thd->wsrep_conflict_state == MUST_ABORT) - thd->wsrep_conflict_state= NO_CONFLICT; + { + thd->killed= THD::NOT_KILLED; + thd->wsrep_conflict_state= NO_CONFLICT; + } if (thd->wsrep_conflict_state != NO_CONFLICT) { From 5667ab4a13f335d3ac1f21e0c187ed26b514ed21 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Fri, 16 Dec 2016 02:30:09 -0800 Subject: [PATCH 108/305] Galera MTR Tests: Tests for MW-328 Fix unnecessary/silent BF aborts --- mysql-test/suite/galera/r/MW-328A.result | 21 ++++++++ mysql-test/suite/galera/r/MW-328B.result | 17 +++++++ mysql-test/suite/galera/r/MW-328C.result | 17 +++++++ mysql-test/suite/galera/r/MW-328D.result | 15 ++++++ mysql-test/suite/galera/r/MW-328E.result | 15 ++++++ mysql-test/suite/galera/t/MW-328-footer.inc | 18 +++++++ mysql-test/suite/galera/t/MW-328-header.inc | 29 +++++++++++ mysql-test/suite/galera/t/MW-328A.test | 55 +++++++++++++++++++++ mysql-test/suite/galera/t/MW-328B.test | 35 +++++++++++++ mysql-test/suite/galera/t/MW-328C.test | 35 +++++++++++++ mysql-test/suite/galera/t/MW-328D.test | 39 +++++++++++++++ mysql-test/suite/galera/t/MW-328E.test | 40 +++++++++++++++ 12 files changed, 336 insertions(+) create mode 100644 mysql-test/suite/galera/r/MW-328A.result create mode 100644 mysql-test/suite/galera/r/MW-328B.result create mode 100644 mysql-test/suite/galera/r/MW-328C.result create mode 100644 mysql-test/suite/galera/r/MW-328D.result create mode 100644 mysql-test/suite/galera/r/MW-328E.result create mode 100644 mysql-test/suite/galera/t/MW-328-footer.inc create mode 100644 mysql-test/suite/galera/t/MW-328-header.inc create mode 100644 mysql-test/suite/galera/t/MW-328A.test create mode 100644 mysql-test/suite/galera/t/MW-328B.test create mode 100644 mysql-test/suite/galera/t/MW-328C.test create mode 100644 mysql-test/suite/galera/t/MW-328D.test create mode 100644 mysql-test/suite/galera/t/MW-328E.test diff --git a/mysql-test/suite/galera/r/MW-328A.result b/mysql-test/suite/galera/r/MW-328A.result new file mode 100644 index 000000000000..daed2469f112 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-328A.result @@ -0,0 +1,21 @@ +CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; +INSERT INTO t1 (f1) VALUES (1); +CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB; +CREATE PROCEDURE proc_update () +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END; +SET SESSION wsrep_sync_wait = 0; +WHILE 1 DO +UPDATE t1 SET f2 = LEFT(MD5(RAND()), 4); +END WHILE; +END| +CALL proc_update();; +SET SESSION wsrep_retry_autocommit = 0; +have_successes +1 +have_deadlocks +1 +Got one of the listed errors +DROP PROCEDURE proc_update; +DROP TABLE t1, t2; +CALL mtr.add_suppression("conflict state 3 after post commit"); diff --git a/mysql-test/suite/galera/r/MW-328B.result b/mysql-test/suite/galera/r/MW-328B.result new file mode 100644 index 000000000000..780988938f68 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-328B.result @@ -0,0 +1,17 @@ +CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; +INSERT INTO t1 (f1) VALUES (1); +CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB; +CREATE PROCEDURE proc_update () +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END; +SET SESSION wsrep_sync_wait = 0; +WHILE 1 DO +UPDATE t1 SET f2 = LEFT(MD5(RAND()), 4); +END WHILE; +END| +CALL proc_update();; +SET SESSION wsrep_retry_autocommit = 0; +Got one of the listed errors +DROP PROCEDURE proc_update; +DROP TABLE t1, t2; +CALL mtr.add_suppression("conflict state 3 after post commit"); diff --git a/mysql-test/suite/galera/r/MW-328C.result b/mysql-test/suite/galera/r/MW-328C.result new file mode 100644 index 000000000000..5cd74f05171b --- /dev/null +++ b/mysql-test/suite/galera/r/MW-328C.result @@ -0,0 +1,17 @@ +CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; +INSERT INTO t1 (f1) VALUES (1); +CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB; +CREATE PROCEDURE proc_update () +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END; +SET SESSION wsrep_sync_wait = 0; +WHILE 1 DO +UPDATE t1 SET f2 = LEFT(MD5(RAND()), 4); +END WHILE; +END| +CALL proc_update();; +SET SESSION wsrep_retry_autocommit = 10000; +Got one of the listed errors +DROP PROCEDURE proc_update; +DROP TABLE t1, t2; +CALL mtr.add_suppression("conflict state 3 after post commit"); diff --git a/mysql-test/suite/galera/r/MW-328D.result b/mysql-test/suite/galera/r/MW-328D.result new file mode 100644 index 000000000000..f6d055def93a --- /dev/null +++ b/mysql-test/suite/galera/r/MW-328D.result @@ -0,0 +1,15 @@ +CREATE TABLE t1 (i INT) ENGINE = InnoDB; +INSERT INTO t1 (i) VALUES(1); +CREATE TABLE t2 (i INT) ENGINE = InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +SELECT * FROM t1 WHERE i = 1 LOCK IN SHARE MODE; +i +1 +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT IGNORE INTO t2 SELECT * FROM t1 WHERE i = 1 FOR UPDATE;; +DELETE FROM t1 WHERE i = 1; +COMMIT; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +DROP TABLE t1, t2; diff --git a/mysql-test/suite/galera/r/MW-328E.result b/mysql-test/suite/galera/r/MW-328E.result new file mode 100644 index 000000000000..5829559fa4da --- /dev/null +++ b/mysql-test/suite/galera/r/MW-328E.result @@ -0,0 +1,15 @@ +create table t1 (i int primary key, j int) engine=innodb; +create table t2 (i int primary key, j int) engine=innodb; +insert into t1 values (1,0); +insert into t2 values (2,0); +set autocommit=off; +start transaction; +update t1 set j=1 where i=1; +set autocommit=off; +start transaction; +begin; +update t2 set j=1 where i=2; +insert into t1 select * from t2;; +insert into t2 select * from t1; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +DROP TABLE t1, t2; diff --git a/mysql-test/suite/galera/t/MW-328-footer.inc b/mysql-test/suite/galera/t/MW-328-footer.inc new file mode 100644 index 000000000000..5b736df220f9 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-328-footer.inc @@ -0,0 +1,18 @@ +# +# Cleanup for MW-328 tests +# + +--connection node_1 +--disable_query_log +--eval KILL CONNECTION $sp_connection_id +--enable_query_log + +--connection node_1X +--error 2013,1317 +--reap + +--connection node_1 +DROP PROCEDURE proc_update; +DROP TABLE t1, t2; + +CALL mtr.add_suppression("conflict state 3 after post commit"); diff --git a/mysql-test/suite/galera/t/MW-328-header.inc b/mysql-test/suite/galera/t/MW-328-header.inc new file mode 100644 index 000000000000..f0a6ccaccc6e --- /dev/null +++ b/mysql-test/suite/galera/t/MW-328-header.inc @@ -0,0 +1,29 @@ +# +# Initialization for MW-328 tests +# + +CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; +INSERT INTO t1 (f1) VALUES (1); + +CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB; + +# +# Have some random updates going on against t1 +# + +DELIMITER |; +CREATE PROCEDURE proc_update () +BEGIN + DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END; + SET SESSION wsrep_sync_wait = 0; + WHILE 1 DO + UPDATE t1 SET f2 = LEFT(MD5(RAND()), 4); + END WHILE; +END| + +DELIMITER ;| + +--connect node_1X, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1X +--let $sp_connection_id = `SELECT CONNECTION_ID()` +--send CALL proc_update(); diff --git a/mysql-test/suite/galera/t/MW-328A.test b/mysql-test/suite/galera/t/MW-328A.test new file mode 100644 index 000000000000..836dd088749f --- /dev/null +++ b/mysql-test/suite/galera/t/MW-328A.test @@ -0,0 +1,55 @@ +# +# MW-328 Fix unnecessary/silent BF aborts +# + +# +# Attempt to insert into t2 and check if insert actually inserted rows if +# a success was reported. +# + +--source include/galera_cluster.inc +--source suite/galera/t/MW-328-header.inc + +--connection node_2 +--let $count = 100 +--let $successes = 0 +--let $deadlocks = 0 + +SET SESSION wsrep_retry_autocommit = 0; + +--disable_query_log + +while ($count) +{ + TRUNCATE TABLE t2; + + --error 0,1213 + INSERT IGNORE INTO t2 SELECT f2 FROM t1; + if ($mysql_errno != 1213) { + --inc $successes + if (`SELECT COUNT(*) = 0 FROM t2`) { + --die No rows arrived in table t2 + } + } + + if ($mysql_errno == 1213) { + --inc $deadlocks + + } + + --dec $count +} + +--enable_query_log + +# +# Check that the test produced both deadlocks and successes +# + +--disable_query_log +--eval SELECT $successes > 0 AS have_successes +--eval SELECT $deadlocks > 0 AS have_deadlocks +--enable_query_log + + +--source suite/galera/t/MW-328-footer.inc diff --git a/mysql-test/suite/galera/t/MW-328B.test b/mysql-test/suite/galera/t/MW-328B.test new file mode 100644 index 000000000000..11969dd0b475 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-328B.test @@ -0,0 +1,35 @@ +# +# MW-328 Fix unnecessary/silent BF aborts +# + +# +# Make sure an unrelated SELECT following a BF-aborted query never +# gets the deadlock error +# + +--source include/galera_cluster.inc +--source suite/galera/t/MW-328-header.inc + +--connection node_2 +--let $count = 100 + +SET SESSION wsrep_retry_autocommit = 0; + +--disable_query_log + +while ($count) +{ + --error 0,1213 + INSERT IGNORE INTO t2 SELECT f2 FROM t1; + + --disable_result_log + --error 0 + SELECT 1 FROM DUAL; + --enable_result_log + + --dec $count +} + +--enable_query_log + +--source suite/galera/t/MW-328-footer.inc diff --git a/mysql-test/suite/galera/t/MW-328C.test b/mysql-test/suite/galera/t/MW-328C.test new file mode 100644 index 000000000000..7241dfbdbcad --- /dev/null +++ b/mysql-test/suite/galera/t/MW-328C.test @@ -0,0 +1,35 @@ +# +# MW-328 Fix unnecessary/silent BF aborts +# + +# +# Make sure that a high value of wsrep_retry_autocommit +# masks all deadlock errors +# + +--source include/galera_cluster.inc +--source suite/galera/t/MW-328-header.inc + +--connection node_2 +--let $count = 100 + +SET SESSION wsrep_retry_autocommit = 10000; + +--disable_query_log + +while ($count) +{ + --error 0 + INSERT IGNORE INTO t2 SELECT f2 FROM t1; + + --disable_result_log + --error 0 + SELECT 1 FROM DUAL; + --enable_result_log + + --dec $count +} + +--enable_query_log + +--source suite/galera/t/MW-328-footer.inc diff --git a/mysql-test/suite/galera/t/MW-328D.test b/mysql-test/suite/galera/t/MW-328D.test new file mode 100644 index 000000000000..e8a22f22a996 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-328D.test @@ -0,0 +1,39 @@ +# +# MW-328 Fix unnecessary/silent BF aborts +# + +# +# Test that non-Galera deadlock error still behaves as expected +# + +--source include/galera_cluster.inc + +CREATE TABLE t1 (i INT) ENGINE = InnoDB; +INSERT INTO t1 (i) VALUES(1); + +CREATE TABLE t2 (i INT) ENGINE = InnoDB; + +# Create a deadlock situation + +--connection node_1 +SET AUTOCOMMIT=OFF; +START TRANSACTION; +SELECT * FROM t1 WHERE i = 1 LOCK IN SHARE MODE; + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +SET AUTOCOMMIT=OFF; +START TRANSACTION; +--send INSERT IGNORE INTO t2 SELECT * FROM t1 WHERE i = 1 FOR UPDATE; + +--connection node_1 +--sleep 2 +DELETE FROM t1 WHERE i = 1; +COMMIT; + +# We expect that ER_LOCK_DEADLOCK will be delivered even though it was a INSERT INGORE statement +--connection node_1a +--error ER_LOCK_DEADLOCK +--reap + +DROP TABLE t1, t2; diff --git a/mysql-test/suite/galera/t/MW-328E.test b/mysql-test/suite/galera/t/MW-328E.test new file mode 100644 index 000000000000..34b17be7b088 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-328E.test @@ -0,0 +1,40 @@ +# +# MW-328 Fix unnecessary/silent BF aborts +# + +# +# Test that non-Galera deadlock error still behaves as expected (case #2) +# + +--source include/galera_cluster.inc + +create table t1 (i int primary key, j int) engine=innodb; +create table t2 (i int primary key, j int) engine=innodb; + +insert into t1 values (1,0); +insert into t2 values (2,0); + +set autocommit=off; +start transaction; +update t1 set j=1 where i=1; + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +set autocommit=off; +start transaction; +begin; +update t2 set j=1 where i=2; + +--connection node_1 +# Hang expected here +--send insert into t1 select * from t2; + +--sleep 2 +--connection node_1a +--error ER_LOCK_DEADLOCK +insert into t2 select * from t1; + +--connection node_1 +--reap + +DROP TABLE t1, t2; From 8fa05e3dbf71808f15fa0a698bd3fd10b487ad35 Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Fri, 16 Dec 2016 14:06:15 +0000 Subject: [PATCH 109/305] MW-332 fixed syntax incompatibilities with GCC 6 (C++14) --- sql/sql_class.cc | 4 ++-- storage/innobase/handler/ha_innodb.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index f8aa8d4cac5e..7b5504227f1b 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -857,11 +857,11 @@ extern "C" wsrep_ws_handle_t* wsrep_thd_ws_handle(THD *thd) return &thd->wsrep_ws_handle; } -extern "C"void wsrep_thd_LOCK(THD *thd) +extern "C" void wsrep_thd_LOCK(THD *thd) { mysql_mutex_lock(&thd->LOCK_wsrep_thd); } -extern "C"void wsrep_thd_UNLOCK(THD *thd) +extern "C" void wsrep_thd_UNLOCK(THD *thd) { mysql_mutex_unlock(&thd->LOCK_wsrep_thd); } diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 571ce038d241..d5449e771a10 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -324,8 +324,8 @@ extern "C" void wsrep_thd_set_conflict_state( extern "C" void wsrep_thd_set_trx_to_replay(THD *thd, uint64 trx_id); -extern "C"void wsrep_thd_LOCK(THD *thd); -extern "C"void wsrep_thd_UNLOCK(THD *thd); +extern "C" void wsrep_thd_LOCK(THD *thd); +extern "C" void wsrep_thd_UNLOCK(THD *thd); extern "C" uint32 wsrep_thd_wsrep_rand(THD *thd); extern "C" time_t wsrep_thd_query_start(THD *thd); extern "C" my_thread_id wsrep_thd_thread_id(THD *thd); From 3ebc60d8d2d373ef41746976a176fda070db6df9 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 12 Aug 2016 14:32:30 +0300 Subject: [PATCH 110/305] MW-267 Fix Galera crash at startup when compiled with gcc 6 --- sql/wsrep_mysqld.cc | 6 +----- sql/wsrep_mysqld.h | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 038c6ce5d714..35941e4875a7 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -70,11 +70,7 @@ my_bool wsrep_slave_FK_checks = 0; // slave thread does FK checks * End configuration options */ -static const wsrep_uuid_t cluster_uuid = WSREP_UUID_UNDEFINED; -const wsrep_uuid_t* wsrep_cluster_uuid() -{ - return &cluster_uuid; -} +static wsrep_uuid_t cluster_uuid = WSREP_UUID_UNDEFINED; static char cluster_uuid_str[40]= { 0, }; static const char* cluster_status_str[WSREP_VIEW_MAX] = { diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index 92d21da76857..a979e282be7e 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -306,7 +306,6 @@ int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len); int wsrep_create_event_query(THD *thd, uchar** buf, size_t* buf_len); int wsrep_alter_event_query(THD *thd, uchar** buf, size_t* buf_len); -const wsrep_uuid_t* wsrep_cluster_uuid(); struct xid_t; void wsrep_set_SE_checkpoint(xid_t*); void wsrep_get_SE_checkpoint(wsrep_uuid_t&, wsrep_seqno_t&); From 328ade03d4d8709dd27d06818cd4802bc52abe68 Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Fri, 12 Aug 2016 14:21:01 +0300 Subject: [PATCH 111/305] MW-267: followup to the original pull request, removed unnecessary cast. --- sql/wsrep_mysqld.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 35941e4875a7..f04d35b912ad 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -232,8 +232,7 @@ wsrep_view_handler_cb (void* app_ctx, if (memcmp(&cluster_uuid, &view->state_id.uuid, sizeof(wsrep_uuid_t))) { - memcpy((wsrep_uuid_t*)&cluster_uuid, &view->state_id.uuid, - sizeof(cluster_uuid)); + memcpy(&cluster_uuid, &view->state_id.uuid, sizeof(cluster_uuid)); wsrep_uuid_print (&cluster_uuid, cluster_uuid_str, sizeof(cluster_uuid_str)); From 9d31fa282ec8584e34f1adc9d209ee20bbc1a02a Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 18 May 2016 11:07:58 +0200 Subject: [PATCH 112/305] MW-175 Fix definitively lost memory in wsrep_get_params --- sql/wsrep_var.cc | 5 ++--- wsrep/wsrep_dummy.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index 12bce1769d4a..6a66b91a2bec 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -191,9 +191,8 @@ static bool refresh_provider_options() char* opts= wsrep->options_get(wsrep); if (opts) { - if (wsrep_provider_options) my_free((void *)wsrep_provider_options); - wsrep_provider_options = (char*)my_memdup(opts, strlen(opts) + 1, - MYF(MY_WME)); + wsrep_provider_options_init(opts); + free(opts); } else { diff --git a/wsrep/wsrep_dummy.c b/wsrep/wsrep_dummy.c index bab5329dc028..5f1ea63cc403 100644 --- a/wsrep/wsrep_dummy.c +++ b/wsrep/wsrep_dummy.c @@ -86,7 +86,7 @@ static wsrep_status_t dummy_options_set( static char* dummy_options_get (wsrep_t* w) { WSREP_DBUG_ENTER(w); - return WSREP_DUMMY(w)->options; + return strdup(WSREP_DUMMY(w)->options); } static wsrep_status_t dummy_connect( From 0e800a6d9b60783ba000f24d0e741e795f8e7c44 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Mon, 13 Jun 2016 17:49:42 +0200 Subject: [PATCH 113/305] GCF-837 Check wsrep interface version before loading provider --- wsrep/wsrep_loader.c | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/wsrep/wsrep_loader.c b/wsrep/wsrep_loader.c index c330c77718f4..904f9a1c4775 100644 --- a/wsrep/wsrep_loader.c +++ b/wsrep/wsrep_loader.c @@ -37,6 +37,22 @@ static wsrep_log_cb_t logger = default_logger; * Library loader **************************************************************************/ +static int wsrep_check_iface_version(const char* found, const char* iface_ver) +{ + const size_t msg_len = 128; + char msg[128]; + + if (strcmp(found, iface_ver)) { + snprintf (msg, msg_len, + "provider interface version mismatch: need '%s', found '%s'", + iface_ver, found); + logger (WSREP_LOG_ERROR, msg); + return EINVAL; + } + + return 0; +} + static int verify(const wsrep_t *wh, const char *iface_ver) { const size_t msg_len = 128; @@ -51,13 +67,8 @@ static int verify(const wsrep_t *wh, const char *iface_ver) VERIFY(wh); VERIFY(wh->version); - if (strcmp(wh->version, iface_ver)) { - snprintf (msg, msg_len, - "provider interface version mismatch: need '%s', found '%s'", - iface_ver, wh->version); - logger (WSREP_LOG_ERROR, msg); + if (wsrep_check_iface_version(wh->version, iface_ver)) return EINVAL; - } VERIFY(wh->init); VERIFY(wh->options_set); @@ -108,6 +119,15 @@ static wsrep_loader_fun wsrep_dlf(void *dlh, const char *sym) return alias.dlfun; } +static int wsrep_check_version_symbol(void *dlh) +{ + char** dlversion = NULL; + dlversion = (char**) dlsym(dlh, "wsrep_interface_version"); + if (dlversion == NULL) + return 0; + return wsrep_check_iface_version(*dlversion, WSREP_INTERFACE_VERSION); +} + extern int wsrep_dummy_loader(wsrep_t *w); int wsrep_load(const char *spec, wsrep_t **hptr, wsrep_log_cb_t log_cb) @@ -154,6 +174,11 @@ int wsrep_load(const char *spec, wsrep_t **hptr, wsrep_log_cb_t log_cb) goto out; } + if (wsrep_check_version_symbol(dlh) != 0) { + ret = EINVAL; + goto out; + } + if ((ret = (*dlfun)(*hptr)) != 0) { snprintf(msg, msg_len, "wsrep_load(): loader failed: %s", strerror(ret)); From e27e4d6b99a314c70bb6b38ee066e4f2d4cd2b6e Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Fri, 16 Dec 2016 14:06:15 +0000 Subject: [PATCH 114/305] MW-332 fixed syntax incompatibilities with GCC 6 (C++14) --- sql/sql_class.cc | 4 ++-- storage/innobase/handler/ha_innodb.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 6e98d73bc531..123ecb66ea2a 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -911,11 +911,11 @@ extern "C" wsrep_ws_handle_t* wsrep_thd_ws_handle(THD *thd) return &thd->wsrep_ws_handle; } -extern "C"void wsrep_thd_LOCK(THD *thd) +extern "C" void wsrep_thd_LOCK(THD *thd) { mysql_mutex_lock(&thd->LOCK_wsrep_thd); } -extern "C"void wsrep_thd_UNLOCK(THD *thd) +extern "C" void wsrep_thd_UNLOCK(THD *thd) { mysql_mutex_unlock(&thd->LOCK_wsrep_thd); } diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 5990443ddbc0..898d47a53307 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -464,8 +464,8 @@ extern "C" void wsrep_thd_set_conflict_state( extern "C" void wsrep_thd_set_trx_to_replay(THD *thd, uint64 trx_id); -extern "C"void wsrep_thd_LOCK(THD *thd); -extern "C"void wsrep_thd_UNLOCK(THD *thd); +extern "C" void wsrep_thd_LOCK(THD *thd); +extern "C" void wsrep_thd_UNLOCK(THD *thd); extern "C" uint32 wsrep_thd_wsrep_rand(THD *thd); extern "C" time_t wsrep_thd_query_start(THD *thd); extern "C" my_thread_id wsrep_thd_thread_id(THD *thd); From 4a5d6d01a004e1ccb70fb2beacf55e55fc26680d Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Fri, 16 Dec 2016 18:10:13 +0000 Subject: [PATCH 115/305] MW-332: fixed GCC 6 warnings (nonnull ptr compare) in wsrep code --- sql/binlog.cc | 20 ++++++++++---------- sql/sql_class.cc | 14 +++++++------- sql/transaction.cc | 2 +- sql/wsrep_mysqld.cc | 8 ++++---- sql/wsrep_mysqld.h | 12 ++++++++++-- sql/wsrep_sst.cc | 4 ++-- sql/wsrep_thd.cc | 10 +++++----- 7 files changed, 39 insertions(+), 31 deletions(-) diff --git a/sql/binlog.cc b/sql/binlog.cc index cf5ae74801e2..e22711e231b4 100644 --- a/sql/binlog.cc +++ b/sql/binlog.cc @@ -7788,7 +7788,7 @@ int THD::binlog_write_table_map(TABLE *table, bool is_transactional, /* Pre-conditions */ #ifdef WITH_WSREP DBUG_ASSERT(is_current_stmt_binlog_format_row() && - (WSREP_EMULATE_BINLOG(this) || mysql_bin_log.is_open())); + (WSREP_EMULATE_BINLOG_NNULL(this) || mysql_bin_log.is_open())); #else DBUG_ASSERT(is_current_stmt_binlog_format_row() && mysql_bin_log.is_open()); #endif /* WITH_WSREP */ @@ -8188,10 +8188,10 @@ int THD::decide_logging_format(TABLE_LIST *tables) binlog by filtering rules. */ #ifdef WITH_WSREP - if ((WSREP_EMULATE_BINLOG(this) || + if ((WSREP_EMULATE_BINLOG_NNULL(this) || (mysql_bin_log.is_open() && (variables.option_bits & OPTION_BIN_LOG))) && !(WSREP_BINLOG_FORMAT(variables.binlog_format) == BINLOG_FORMAT_STMT && - !binlog_filter->db_ok(db))) + !binlog_filter->db_ok(db))) #else if (mysql_bin_log.is_open() && (variables.option_bits & OPTION_BIN_LOG) && !(variables.binlog_format == BINLOG_FORMAT_STMT && @@ -8533,7 +8533,7 @@ int THD::decide_logging_format(TABLE_LIST *tables) limited to row-logging when binlog_format = STATEMENT */ #ifdef WITH_WSREP - if (!WSREP(this) || wsrep_exec_mode == LOCAL_STATE) + if (!WSREP_NNULL(this) || wsrep_exec_mode == LOCAL_STATE) { #endif /* WITH_WSREP */ my_error((error= ER_BINLOG_STMT_MODE_AND_ROW_ENGINE), MYF(0), ""); @@ -8998,7 +8998,7 @@ int THD::binlog_write_row(TABLE* table, bool is_trans, { #ifdef WITH_WSREP DBUG_ASSERT(is_current_stmt_binlog_format_row() && - ((WSREP_EMULATE_BINLOG(this) || mysql_bin_log.is_open()))); + ((WSREP_EMULATE_BINLOG_NNULL(this) || mysql_bin_log.is_open()))); #else DBUG_ASSERT(is_current_stmt_binlog_format_row() && mysql_bin_log.is_open()); #endif /* WITH_WSREP */ @@ -9033,7 +9033,7 @@ int THD::binlog_update_row(TABLE* table, bool is_trans, { #ifdef WITH_WSREP DBUG_ASSERT(is_current_stmt_binlog_format_row() && - ((WSREP_EMULATE_BINLOG(this) || mysql_bin_log.is_open()))); + ((WSREP_EMULATE_BINLOG_NNULL(this) || mysql_bin_log.is_open()))); #else DBUG_ASSERT(is_current_stmt_binlog_format_row() && mysql_bin_log.is_open()); #endif /* WITH_WSREP */ @@ -9105,7 +9105,7 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans, { #ifdef WITH_WSREP DBUG_ASSERT(is_current_stmt_binlog_format_row() && - ((WSREP_EMULATE_BINLOG(this) || mysql_bin_log.is_open()))); + ((WSREP_EMULATE_BINLOG_NNULL(this) || mysql_bin_log.is_open()))); #else DBUG_ASSERT(is_current_stmt_binlog_format_row() && mysql_bin_log.is_open()); #endif /* WITH_WSREP */ @@ -9228,7 +9228,7 @@ int THD::binlog_flush_pending_rows_event(bool stmt_end, bool is_transactional) flushing anything (e.g., if we have explicitly locked tables). */ #ifdef WITH_WSREP - if (!(WSREP_EMULATE_BINLOG(this) || mysql_bin_log.is_open())) + if (!(WSREP_EMULATE_BINLOG_NNULL(this) || mysql_bin_log.is_open())) #else if (!mysql_bin_log.is_open()) #endif /* WITH_WSREP */ @@ -9501,8 +9501,8 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg, DBUG_PRINT("enter", ("qtype: %s query: '%s'", show_query_type(qtype), query_arg)); #ifdef WITH_WSREP - DBUG_ASSERT(query_arg && (WSREP_EMULATE_BINLOG(this) - || mysql_bin_log.is_open())); + DBUG_ASSERT(query_arg && (WSREP_EMULATE_BINLOG_NNULL(this) + || mysql_bin_log.is_open())); #else DBUG_ASSERT(query_arg && mysql_bin_log.is_open()); #endif /* WITH_WSREP */ diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 123ecb66ea2a..c83f76d9e56a 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -2141,13 +2141,13 @@ bool THD::notify_shared_lock(MDL_context_owner *ctx_in_use, if (!thd_table->needs_reopen()) #ifdef WITH_WSREP { - signalled|= mysql_lock_abort_for_thread(this, thd_table); - if (this && WSREP(this) && wsrep_thd_is_BF((void *)this, FALSE)) - { - WSREP_DEBUG("remove_table_from_cache: %llu", - (unsigned long long) this->real_id); - wsrep_abort_thd((void *)this, (void *)in_use, FALSE); - } + signalled|= mysql_lock_abort_for_thread(this, thd_table); + if (WSREP_NNULL(this) && wsrep_thd_is_BF((void *)this, FALSE)) + { + WSREP_DEBUG("remove_table_from_cache: %llu", + (unsigned long long) this->real_id); + wsrep_abort_thd((void *)this, (void *)in_use, FALSE); + } } #else signalled|= mysql_lock_abort_for_thread(this, thd_table); diff --git a/sql/transaction.cc b/sql/transaction.cc index 124791786471..5f3b4c95343c 100644 --- a/sql/transaction.cc +++ b/sql/transaction.cc @@ -702,7 +702,7 @@ bool trans_rollback_to_savepoint(THD *thd, LEX_STRING name) #ifdef WITH_WSREP bool mdl_can_safely_rollback_to_savepoint= (!((WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()) - && thd->variables.sql_log_bin) || + && thd->variables.sql_log_bin) || ha_rollback_to_savepoint_can_release_mdl(thd)); #else bool mdl_can_safely_rollback_to_savepoint= diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 96004983989d..ded6d871a8ca 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -1226,7 +1226,7 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_, if (buf) my_free(buf); wsrep_keys_free(&key_arr); WSREP_DEBUG("TO BEGIN: %lld, %d",(long long)wsrep_thd_trx_seqno(thd), - thd->wsrep_exec_mode); + thd->wsrep_exec_mode); } else if (key_arr.keys_len > 0) { /* jump to error handler in mysql_execute_command() */ @@ -1234,7 +1234,7 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_, "connection state and retry the query.", ret, (thd->db ? thd->db : "(null)"), WSREP_QUERY(thd)); my_error(ER_LOCK_DEADLOCK, MYF(0), "WSREP replication failed. Check " - "your wsrep connection state and retry the query."); + "your wsrep connection state and retry the query."); if (buf) my_free(buf); wsrep_keys_free(&key_arr); return -1; @@ -1242,8 +1242,8 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_, else { /* non replicated DDL, affecting temporary tables only */ WSREP_DEBUG("TO isolation skipped for: %d, sql: %s." - "Only temporary tables affected.", - ret, WSREP_QUERY(thd)); + "Only temporary tables affected.", + ret, WSREP_QUERY(thd)); return 1; } return 0; diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index d91f0e6687b7..098ae79a8688 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -206,11 +206,19 @@ extern wsrep_seqno_t wsrep_locked_seqno; wsrep_provider && \ strcmp(wsrep_provider, WSREP_NONE)) +/* use xxxxxx_NNULL macros when thd pointer is guaranteed to be non-null to + * avoid compiler warnings (GCC 6 and later) */ +#define WSREP_NNULL(thd) \ + (WSREP_ON && wsrep && thd->variables.wsrep_on) + #define WSREP(thd) \ - (WSREP_ON && wsrep && (thd && thd->variables.wsrep_on)) + (thd && WSREP_NNULL(thd)) #define WSREP_CLIENT(thd) \ - (WSREP(thd) && thd->wsrep_client_thread) + (WSREP(thd) && thd->wsrep_client_thread) + +#define WSREP_EMULATE_BINLOG_NNULL(thd) \ + (WSREP_NNULL(thd) && wsrep_emulate_bin_log) #define WSREP_EMULATE_BINLOG(thd) \ (WSREP(thd) && wsrep_emulate_bin_log) diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index 54d165c377e7..8042339ae150 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -811,7 +811,7 @@ static int sst_donate_mysqldump (const char* addr, "%s", host, port, mysqld_port, mysqld_unix_port, wsrep_defaults_file, uuid_str, - (long long)seqno, bypass ? " "WSREP_SST_OPT_BYPASS : ""); + (long long)seqno, bypass ? " " WSREP_SST_OPT_BYPASS : ""); if (ret < 0 || ret >= cmd_len) { @@ -1074,7 +1074,7 @@ static int sst_donate_other (const char* method, wsrep_defaults_file, wsrep_defaults_group_suffix, binlog_opt, binlog_opt_val, uuid, (long long) seqno, - bypass ? " "WSREP_SST_OPT_BYPASS : ""); + bypass ? " " WSREP_SST_OPT_BYPASS : ""); my_free(binlog_opt_val); if (ret < 0 || ret >= cmd_len) diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index 657378f51f50..ddf1aaf6e7d3 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -553,9 +553,9 @@ my_bool wsrep_thd_is_BF(void *thd_ptr, my_bool sync) { THD* thd = (THD*)thd_ptr; if (sync) mysql_mutex_lock(&thd->LOCK_wsrep_thd); - + status = ((thd->wsrep_exec_mode == REPL_RECV) || - (thd->wsrep_exec_mode == TOTAL_ORDER)); + (thd->wsrep_exec_mode == TOTAL_ORDER)); if (sync) mysql_mutex_unlock(&thd->LOCK_wsrep_thd); } return status; @@ -569,10 +569,10 @@ my_bool wsrep_thd_is_BF_or_commit(void *thd_ptr, my_bool sync) { THD* thd = (THD*)thd_ptr; if (sync) mysql_mutex_lock(&thd->LOCK_wsrep_thd); - + status = ((thd->wsrep_exec_mode == REPL_RECV) || - (thd->wsrep_exec_mode == TOTAL_ORDER) || - (thd->wsrep_exec_mode == LOCAL_COMMIT)); + (thd->wsrep_exec_mode == TOTAL_ORDER) || + (thd->wsrep_exec_mode == LOCAL_COMMIT)); if (sync) mysql_mutex_unlock(&thd->LOCK_wsrep_thd); } return status; From 3395d362e53a681562736f1c6c748c7804b844bf Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 3 Jan 2017 00:39:35 -0800 Subject: [PATCH 116/305] MTR Tests: fix events_2.test so that it continues to run past 2017 --- mysql-test/r/events_2.result | 4 ++-- mysql-test/t/events_2.test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/events_2.result b/mysql-test/r/events_2.result index 66ec00d73578..92f3ac59d086 100644 --- a/mysql-test/r/events_2.result +++ b/mysql-test/r/events_2.result @@ -1,10 +1,10 @@ drop database if exists events_test; create database events_test; use events_test; -create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5; +create event e_26 on schedule at '2038-01-19 03:14:07' disable do set @a = 5; select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event; db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion -events_test e_26 set @a = 5 root@localhost 2017-01-01 00:00:00 DROP +events_test e_26 set @a = 5 root@localhost 2038-01-19 03:14:07 DROP drop event e_26; create event e_26 on schedule at NULL disable do set @a = 5; ERROR HY000: Incorrect AT value: 'NULL' diff --git a/mysql-test/t/events_2.test b/mysql-test/t/events_2.test index 3d609654b214..e92aa1781246 100644 --- a/mysql-test/t/events_2.test +++ b/mysql-test/t/events_2.test @@ -13,7 +13,7 @@ use events_test; # mysql.event intact checking end # -create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5; +create event e_26 on schedule at '2038-01-19 03:14:07' disable do set @a = 5; select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event; drop event e_26; --error ER_WRONG_VALUE From 71d003e85ba36c79c7b5aec62c41ee491f61ca01 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 3 Jan 2017 00:39:35 -0800 Subject: [PATCH 117/305] MTR Tests: fix events_2.test so that it continues to run past 2017 --- mysql-test/r/events_2.result | 4 ++-- mysql-test/t/events_2.test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/events_2.result b/mysql-test/r/events_2.result index de1925407156..102cfee05df6 100644 --- a/mysql-test/r/events_2.result +++ b/mysql-test/r/events_2.result @@ -1,10 +1,10 @@ drop database if exists events_test; create database events_test; use events_test; -create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5; +create event e_26 on schedule at '2038-01-19 03:14:07' disable do set @a = 5; select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event; db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion -events_test e_26 set @a = 5 root@localhost 2017-01-01 00:00:00 DROP +events_test e_26 set @a = 5 root@localhost 2038-01-19 03:14:07 DROP drop event e_26; create event e_26 on schedule at NULL disable do set @a = 5; ERROR HY000: Incorrect AT value: 'NULL' diff --git a/mysql-test/t/events_2.test b/mysql-test/t/events_2.test index e12201dd870c..4e6467025892 100644 --- a/mysql-test/t/events_2.test +++ b/mysql-test/t/events_2.test @@ -13,7 +13,7 @@ use events_test; # mysql.event intact checking end # -create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5; +create event e_26 on schedule at '2038-01-19 03:14:07' disable do set @a = 5; select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event; drop event e_26; --error ER_WRONG_VALUE From 75718ed06c79c5b3d5ad39d7c42beb383251d0df Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Fri, 6 Jan 2017 02:42:33 -0800 Subject: [PATCH 118/305] Galera MTR Tests: do not run innodb.innodb_stats_del_mark with Galera, as it produces warnings --- mysql-test/suite/innodb/t/galera.skip | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/innodb/t/galera.skip b/mysql-test/suite/innodb/t/galera.skip index e90f9f1cd431..45eebdb54e43 100644 --- a/mysql-test/suite/innodb/t/galera.skip +++ b/mysql-test/suite/innodb/t/galera.skip @@ -45,3 +45,4 @@ innodb-lock-inherit-read_commited : Cannot execute statement: impossible to wri innodb-index-debug : Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT flush-hang : Unsafe statement written to the binary log innodb_deadlock_with_autoinc : Test uses autoinc_lock_mode = 0 +innodb_stats_del_mark : Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. From 1f9ae89ff9a129faebb06e02cc4604fed6222922 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Fri, 6 Jan 2017 03:31:04 -0800 Subject: [PATCH 119/305] Remove unnecessary debian/patches/fix-mysqlhotcopy-test-failure.patch as the underlying file has been permanently fixed --- .../fix-mysqlhotcopy-test-failure.patch | 18 ------------------ debian/patches/series | 1 - 2 files changed, 19 deletions(-) delete mode 100644 debian/patches/fix-mysqlhotcopy-test-failure.patch diff --git a/debian/patches/fix-mysqlhotcopy-test-failure.patch b/debian/patches/fix-mysqlhotcopy-test-failure.patch deleted file mode 100644 index 0209176d46cb..000000000000 --- a/debian/patches/fix-mysqlhotcopy-test-failure.patch +++ /dev/null @@ -1,18 +0,0 @@ -Description: Include return code 255 in list of valid error codes - Perl 5.20 changed the behaviour of mysqlhotcopy to return 255 on error - . - Add this error code to the list of allowable return codes -Author: James Page -Forwarded: no - ---- a/mysql-test/include/mysqlhotcopy.inc -+++ b/mysql-test/include/mysqlhotcopy.inc -@@ -107,7 +107,7 @@ DROP DATABASE hotcopy_save; - --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR - --list_files $MYSQLD_DATADIR/hotcopy_save - --replace_result $MASTER_MYSOCK MASTER_MYSOCK ----error 9,11,110,2304 -+--error 9,11,110,255,2304 - --exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save - --replace_result $MASTER_MYSOCK MASTER_MYSOCK - --exec $MYSQLHOTCOPY --quiet --allowold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save diff --git a/debian/patches/series b/debian/patches/series index c92237ffac88..08ed2f90f446 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,4 +2,3 @@ hurd.patch scripts__mysqld_safe.sh__signals.patch fix_standalone_tests.patch kfreebsd_tests.patch -fix-mysqlhotcopy-test-failure.patch From 487aceb1c09befc0862d5bdd0584497efa347892 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 12 Jan 2017 23:28:31 +0200 Subject: [PATCH 120/305] Refs: MW-322 * merged the fix from mysql-wsrep-features * however, trx_id is here still using innodb's trx->id, not query id --- sql/handler.cc | 5 +++++ sql/sql_insert.cc | 29 +++++++++++++++++++++++++++ sql/table_cache.cc | 10 +++++++++ sql/wsrep_mysqld.cc | 24 +++++++--------------- sql/wsrep_mysqld.h | 11 ++++++++++ storage/innobase/handler/ha_innodb.cc | 19 ++++++++++-------- 6 files changed, 73 insertions(+), 25 deletions(-) diff --git a/sql/handler.cc b/sql/handler.cc index ecb2a35f8f4c..34d1c1ccd3e3 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -7621,6 +7621,11 @@ void ha_wsrep_fake_trx_id(THD *thd) DBUG_VOID_RETURN; } + if (thd->wsrep_ws_handle.trx_id != WSREP_UNDEFINED_TRX_ID) + { + WSREP_DEBUG("fake trx id skipped: %lu", thd->wsrep_ws_handle.trx_id); + DBUG_VOID_RETURN; + } handlerton *hton= installed_htons[DB_TYPE_INNODB]; if (hton && hton->wsrep_fake_trx_id) { diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 31fbf8b386d0..9d5315b2ce56 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -4442,9 +4442,38 @@ bool select_create::send_eof() */ if (!table->s->tmp_table) { + #ifdef WITH_WSREP + /* + append table level exclusive key for CTAS + */ + wsrep_key_arr_t key_arr= {0, 0}; + wsrep_prepare_keys_for_isolation(thd, + create_table->db, + create_table->table_name, + table_list, + &key_arr); + int rcode = wsrep->append_key( + wsrep, + &thd->wsrep_ws_handle, + key_arr.keys, //&wkey, + key_arr.keys_len, + WSREP_KEY_EXCLUSIVE, + false); + wsrep_keys_free(&key_arr); + if (rcode) { + DBUG_PRINT("wsrep", ("row key failed: %d", rcode)); + WSREP_ERROR("Appending table key for CTAS failed: %s, %d", + (wsrep_thd_query(thd)) ? + wsrep_thd_query(thd) : "void", rcode); + return true; + } + /* If commit fails, we should be able to reset the OK status. */ + thd->get_stmt_da()->set_overwrite_status(true); +#endif /* WITH_WSREP */ trans_commit_stmt(thd); trans_commit_implicit(thd); #ifdef WITH_WSREP + thd->get_stmt_da()->set_overwrite_status(false); mysql_mutex_lock(&thd->LOCK_wsrep_thd); if (thd->wsrep_conflict_state != NO_CONFLICT) { diff --git a/sql/table_cache.cc b/sql/table_cache.cc index e87b0a23f8d9..326d63907e23 100644 --- a/sql/table_cache.cc +++ b/sql/table_cache.cc @@ -361,7 +361,17 @@ void Table_cache_manager::free_table(THD *thd, #ifndef DBUG_OFF if (remove_type == TDC_RT_REMOVE_ALL) +#ifdef WITH_WSREP + { + /* following assert may cause false posivive fire for CTAS */ + if (thd->lex->sql_command != SQLCOM_CREATE_TABLE) + { +#endif /* WITH_WSREP */ DBUG_ASSERT(cache_el[i]->used_tables.is_empty()); +#ifdef WITH_WSREP + } + } +#endif /* WITH_WSREP */ else if (remove_type == TDC_RT_REMOVE_NOT_OWN || remove_type == TDC_RT_REMOVE_NOT_OWN_KEEP_SHARE) { diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index ded6d871a8ca..a529a1bdd244 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -851,17 +851,7 @@ bool wsrep_sync_wait (THD* thd, uint mask) return false; } -/* - * Helpers to deal with TOI key arrays - */ -typedef struct wsrep_key_arr -{ - wsrep_key_t* keys; - size_t keys_len; -} wsrep_key_arr_t; - - -static void wsrep_keys_free(wsrep_key_arr_t* key_arr) +void wsrep_keys_free(wsrep_key_arr_t* key_arr) { for (size_t i= 0; i < key_arr->keys_len; ++i) { @@ -926,11 +916,11 @@ static bool wsrep_prepare_key_for_isolation(const char* db, } /* Prepare key list from db/table and table_list */ -static bool wsrep_prepare_keys_for_isolation(THD* thd, - const char* db, - const char* table, - const TABLE_LIST* table_list, - wsrep_key_arr_t* ka) +bool wsrep_prepare_keys_for_isolation(THD* thd, + const char* db, + const char* table, + const TABLE_LIST* table_list, + wsrep_key_arr_t* ka) { ka->keys= 0; ka->keys_len= 0; @@ -1500,7 +1490,7 @@ wsrep_grant_mdl_exception(MDL_context *requestor_ctx, } else if (request_thd->lex->sql_command == SQLCOM_DROP_TABLE) { - WSREP_DEBUG("DROP caused BF abort"); + WSREP_DEBUG("DROP caused BF abort, conf %d", granted_thd->wsrep_conflict_state); ticket->wsrep_report(wsrep_debug); mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd); wsrep_abort_thd((void*)request_thd, (void*)granted_thd, 1); diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index 098ae79a8688..a53327d813a9 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -342,4 +342,15 @@ bool wsrep_node_is_donor(); bool wsrep_node_is_synced(); bool wsrep_replicate_GTID(THD* thd); +typedef struct wsrep_key_arr +{ + wsrep_key_t* keys; + size_t keys_len; +} wsrep_key_arr_t; +bool wsrep_prepare_keys_for_isolation(THD* thd, + const char* db, + const char* table, + const TABLE_LIST* table_list, + wsrep_key_arr_t* ka); +void wsrep_keys_free(wsrep_key_arr_t* key_arr); #endif /* WSREP_MYSQLD_H */ diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 5580517afc49..33fea984eefc 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -7476,8 +7476,9 @@ ha_innobase::write_row( user_thd); #ifdef WITH_WSREP if (!error_result && wsrep_thd_exec_mode(user_thd) == LOCAL_STATE && - wsrep_on(user_thd) && !wsrep_consistency_check(user_thd) && - (sql_command != SQLCOM_LOAD || + wsrep_on(user_thd) && !wsrep_consistency_check(user_thd) && + (sql_command != SQLCOM_CREATE_TABLE) && + (sql_command != SQLCOM_LOAD || thd_binlog_format(user_thd) == BINLOG_FORMAT_ROW)) { if (wsrep_append_keys(user_thd, false, record, NULL)) { @@ -17079,8 +17080,10 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, (long long)wsrep_thd_thread_id(thd), (long long)victim_trx->id); - WSREP_DEBUG("Aborting query: %s", - (thd && wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void"); + WSREP_DEBUG("Aborting query: %s conf %d trx: %lld", + (thd && wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void", + wsrep_thd_conflict_state(thd), + wsrep_thd_ws_handle(thd)->trx_id); wsrep_thd_LOCK(thd); DBUG_EXECUTE_IF("sync.wsrep_after_BF_victim_lock", @@ -17141,9 +17144,8 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, } else { rcode = wsrep->abort_pre_commit( wsrep, bf_seqno, - (wsrep_trx_id_t)victim_trx->id + (wsrep_trx_id_t)wsrep_thd_ws_handle(thd)->trx_id ); - switch (rcode) { case WSREP_WARNING: WSREP_DEBUG("cancel commit warning: %llu", @@ -17266,9 +17268,10 @@ wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd, DBUG_ENTER("wsrep_innobase_abort_thd"); trx_t* victim_trx = thd_to_trx(victim_thd); trx_t* bf_trx = (bf_thd) ? thd_to_trx(bf_thd) : NULL; - WSREP_DEBUG("abort transaction: BF: %s victim: %s", + WSREP_DEBUG("abort transaction: BF: %s victim: %s victim conf: %d", wsrep_thd_query(bf_thd), - wsrep_thd_query(victim_thd)); + wsrep_thd_query(victim_thd), + wsrep_thd_conflict_state(victim_thd)); if (victim_trx) { From c1cbdc8dd627a3882cdc2b645fc6d3a224a366de Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 12 Jan 2017 23:58:50 +0200 Subject: [PATCH 121/305] Refs: MW-323 * running wsrep_replicate_GTID only if wsrep provider has been set --- sql/binlog.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/binlog.cc b/sql/binlog.cc index bacb3257cb5a..9be49498ab64 100644 --- a/sql/binlog.cc +++ b/sql/binlog.cc @@ -1183,7 +1183,7 @@ int gtid_empty_group_log_and_cleanup(THD *thd) goto err; #ifdef WITH_WSREP - if (thd->slave_thread) thd->wsrep_replicate_GTID= true; + if (WSREP_ON && thd->slave_thread) thd->wsrep_replicate_GTID= true; #endif /* WITH_WSREP */ ret= mysql_bin_log.commit(thd, true); @@ -6639,7 +6639,7 @@ TC_LOG::enum_result MYSQL_BIN_LOG::commit(THD *thd, bool all) if (stuff_logged) { #ifdef WITH_WSREP - if (thd->wsrep_replicate_GTID && + if (WSREP_ON && thd->wsrep_replicate_GTID && wsrep_replicate_GTID(thd)) { /* GTID replication failed */ From 6d8b84b310f17af49d83334dd337148269da1f5d Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 13 Jan 2017 13:10:35 +0200 Subject: [PATCH 122/305] refs: MW-322 * fix for compile error in devel server --- storage/innobase/handler/ha_innodb.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 33fea984eefc..5dfe5a76df4b 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -17080,7 +17080,7 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, (long long)wsrep_thd_thread_id(thd), (long long)victim_trx->id); - WSREP_DEBUG("Aborting query: %s conf %d trx: %lld", + WSREP_DEBUG("Aborting query: %s conf %d trx: %lu", (thd && wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void", wsrep_thd_conflict_state(thd), wsrep_thd_ws_handle(thd)->trx_id); From 2af72d7fecbbbf35595365e7ca62a69a7931819a Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Mon, 19 Dec 2016 03:13:32 -0800 Subject: [PATCH 123/305] Galera MTR Tests: Tests for MW-322, MW-317, various CREATE TABLE AS SELECT scenarios --- .../r/galera_create_table_as_select.result | 78 ++++++++++ .../t/galera_create_table_as_select.test | 145 ++++++++++++++++++ 2 files changed, 223 insertions(+) create mode 100644 mysql-test/suite/galera/r/galera_create_table_as_select.result create mode 100644 mysql-test/suite/galera/t/galera_create_table_as_select.test diff --git a/mysql-test/suite/galera/r/galera_create_table_as_select.result b/mysql-test/suite/galera/r/galera_create_table_as_select.result new file mode 100644 index 000000000000..68f30d3c2dde --- /dev/null +++ b/mysql-test/suite/galera/r/galera_create_table_as_select.result @@ -0,0 +1,78 @@ +SET SESSION default_storage_engine=InnoDB; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +CREATE TABLE t1 AS SELECT * FROM t2; +ERROR 42S01: Table 't1' already exists +DROP TABLE t1,t2; +CREATE TABLE t1 AS SELECT * FROM t2; +ERROR 42S02: Table 'test.t2' doesn't exist +CREATE TABLE t1 AS SELECT 1 FROM DUAL; +SELECT COUNT(*) = 1 FROM t1; +COUNT(*) = 1 +1 +DROP TABLE t1; +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +CREATE TABLE t1 AS SELECT * FROM t2; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +DROP TABLE t1,t2; +CREATE TABLE t2 (f1 INTEGER) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); +CREATE TABLE t1 AS SELECT * FROM t2; +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +DROP TABLE t1,t2; +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); +CREATE TABLE t1 AS SELECT MAX(f1) AS f1 FROM t2; +SELECT COUNT(*) = 1 FROM t1; +COUNT(*) = 1 +1 +SELECT f1 = 5 FROM t1; +f1 = 5 +1 +DROP TABLE t1,t2; +CREATE PROCEDURE sp1 () +BEGIN +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); +CREATE TABLE t1 AS SELECT * FROM t2; +END| +CALL sp1(); +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +SELECT COUNT(*) = 5 FROM t1; +COUNT(*) = 5 +1 +DROP TABLE t1, t2; +DROP PROCEDURE sp1; +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); +PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT * FROM t2'; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +DROP TABLE t1, t2; +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); +LOCK TABLE t2 WRITE; +CREATE TABLE t1 AS SELECT * FROM t2;; +SELECT COUNT(*) = 5 FROM t2; +COUNT(*) = 5 +1 +CREATE TABLE t1 AS SELECT * FROM t2; +UNLOCK TABLES; +Got one of the listed errors +DROP TABLE t1, t2; +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); +CREATE TEMPORARY TABLE t1 AS SELECT * FROM t2; +SELECT * FROM t1; +ERROR 42S02: Table 'test.t1' doesn't exist +CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query"); +DROP TABLE t1, t2; diff --git a/mysql-test/suite/galera/t/galera_create_table_as_select.test b/mysql-test/suite/galera/t/galera_create_table_as_select.test new file mode 100644 index 000000000000..a6c1f6572805 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_create_table_as_select.test @@ -0,0 +1,145 @@ +# +# CREATE TABLE AS SELECT tests +# + +--source include/galera_cluster.inc + +--connection node_1 +SET SESSION default_storage_engine=InnoDB; + +# Left table already exists + +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +--error ER_TABLE_EXISTS_ERROR +CREATE TABLE t1 AS SELECT * FROM t2; +DROP TABLE t1,t2; + +# Right table does not exist +--error ER_NO_SUCH_TABLE +CREATE TABLE t1 AS SELECT * FROM t2; + +# No right table at all +CREATE TABLE t1 AS SELECT 1 FROM DUAL; + +--connection node_2 +SELECT COUNT(*) = 1 FROM t1; + +--connection node_1 +DROP TABLE t1; + +# Empty right table +--connection node_1 +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +CREATE TABLE t1 AS SELECT * FROM t2; + +--connection node_2 +SELECT COUNT(*) = 0 FROM t1; + +--connection node_1 +DROP TABLE t1,t2; + +# Right table is MyISAM + +CREATE TABLE t2 (f1 INTEGER) ENGINE=MyISAM; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); +CREATE TABLE t1 AS SELECT * FROM t2; +SELECT COUNT(*) = 5 FROM t1; + +--connection node_2 +SELECT COUNT(*) = 5 FROM t1; + +--connection node_1 +DROP TABLE t1,t2; + +# Right side is a subquery + +--connection node_1 +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); +CREATE TABLE t1 AS SELECT MAX(f1) AS f1 FROM t2; + +--connection node_2 +SELECT COUNT(*) = 1 FROM t1; +SELECT f1 = 5 FROM t1; + +--connection node_1 +DROP TABLE t1,t2; + +# Inside a stored procedure + +--connection node_1 +DELIMITER |; +CREATE PROCEDURE sp1 () +BEGIN + CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; + INSERT INTO t2 VALUES (1),(2),(3),(4),(5); + CREATE TABLE t1 AS SELECT * FROM t2; +END| +DELIMITER ;| +CALL sp1(); +SELECT COUNT(*) = 5 FROM t1; + +--connection node_2 +SELECT COUNT(*) = 5 FROM t1; + +--connection node_1 +DROP TABLE t1, t2; +DROP PROCEDURE sp1; + +# Inside a prepared statement + +--connection node_1 +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); + +PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT * FROM t2'; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +DROP TABLE t1, t2; + +# +# Multi-master conflict +# + +--connection node_1 + +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +LOCK TABLE t2 WRITE; + +--connection node_1 +--send CREATE TABLE t1 AS SELECT * FROM t2; + +--connection node_2 +SELECT COUNT(*) = 5 FROM t2; +CREATE TABLE t1 AS SELECT * FROM t2; + +--connection node_1a +UNLOCK TABLES; + +--connection node_1 +--error ER_TABLE_EXISTS_ERROR,ER_LOCK_DEADLOCK +--reap + +DROP TABLE t1, t2; + +# +# Temporary table +# + +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5); + +CREATE TEMPORARY TABLE t1 AS SELECT * FROM t2; + +--connection node_2 +--error ER_NO_SUCH_TABLE +SELECT * FROM t1; + +CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query"); + +--connection node_1 +DROP TABLE t1, t2; From 282eecada80d4a6efea41287c27dbb5d9c50909c Mon Sep 17 00:00:00 2001 From: sjaakola Date: Mon, 16 Jan 2017 16:10:37 +0200 Subject: [PATCH 124/305] refs: MW-322 * generating fake trx id for CTAS, requires trx_sys mutex protection to be safe for concurrent CTAS processors --- storage/innobase/handler/ha_innodb.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 5dfe5a76df4b..c65cca0a5bf3 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -17323,8 +17323,10 @@ wsrep_fake_trx_id( handlerton *hton, THD *thd) /*!< in: user thread handle */ { + mutex_enter(&trx_sys->mutex); trx_id_t trx_id = trx_sys_get_new_trx_id(); - + mutex_exit(&trx_sys->mutex); + WSREP_DEBUG("innodb fake trx id: %lu thd: %s", trx_id, wsrep_thd_query(thd)); (void *)wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd), trx_id); } From 687f068c203f9aef262dbc2f6c9cf7a2b2b5e372 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 17 Jan 2017 21:24:05 +0200 Subject: [PATCH 125/305] Refs: MW-343 * setting error code if GTID replication fails, it is needed to avoid assert later on Please enter the commit message for your changes. Lines starting --- sql/wsrep_hton.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index 0e84d57c190d..b2be92459309 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -602,10 +602,11 @@ bool wsrep_replicate_GTID(THD *thd) GTID event, would cause a hole in GTID history in other cluster nodes */ - WSREP_WARN("GTID replication failed"); + WSREP_INFO("GTID replication failed: %d", rcode); wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle); thd->wsrep_replicate_GTID= false; - + my_message(ER_ERROR_DURING_COMMIT, + "WSREP GTID replication was interrupted", MYF(0)); return true; } wsrep_post_commit(thd, true); From ebd02fc971152523e5d548269d0531783c842dc8 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 18 Jan 2017 01:29:35 -0800 Subject: [PATCH 126/305] Galera MTR Tests: fortify galera_as_slave_gtid_replicate_do_db_cc against sporadic failures --- .../suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test index bc3c234d4ba2..0324c8d5ec23 100644 --- a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test +++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test @@ -105,6 +105,7 @@ START SLAVE; # Consistency checks # +--sleep 2 --connection node_2 --let $wait_condition = SELECT COUNT(DISTINCT f1) = 6 FROM test1.t1; --source include/wait_condition.inc From 03c22517c8793ca242cbff06317c8c6c47605f71 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 25 Jan 2017 09:57:01 +0200 Subject: [PATCH 127/305] Bump WSREP_PATCH_VERSION to 20 --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 7c395168f087..1a511b9c6c80 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "19") +SET(WSREP_PATCH_VERSION "20") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From ace3688592ee9b7076b4a5cd1bae37aaf2557465 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 25 Jan 2017 09:58:07 +0200 Subject: [PATCH 128/305] Bump WSREP_PATCH_VERSION to 19 --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 71b0dc1390e0..7c395168f087 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "18") +SET(WSREP_PATCH_VERSION "19") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From a99e0f80b1116a13a52c9f1ae943885a82824129 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Mon, 6 Feb 2017 18:07:21 +0100 Subject: [PATCH 129/305] MW-357 Reset thd->wsrep_apply_toi regardless of applier exiting Applier does not reset thd->wsrep_apply_toi if applier thread decides to exit by setting 'exit= true'. The problem is that galera side may decide not to kill the applier thread: for instance if we try to SET wsrep_slave_threads = 0; then galera refuses to kill the last applier thread. If this happens we are left with a thd which has not been reset to the initial state. This patch ensures that the thd is reset regardless of the applier thread exiting or not. --- mysql-test/suite/galera/r/MW-357.result | 6 ++++++ mysql-test/suite/galera/t/MW-357.test | 13 +++++++++++++ sql/wsrep_applier.cc | 4 +++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 mysql-test/suite/galera/r/MW-357.result create mode 100644 mysql-test/suite/galera/t/MW-357.test diff --git a/mysql-test/suite/galera/r/MW-357.result b/mysql-test/suite/galera/r/MW-357.result new file mode 100644 index 000000000000..d249d5997f70 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-357.result @@ -0,0 +1,6 @@ +SET GLOBAL wsrep_slave_threads = 0; +Warnings: +Warning 1292 Truncated incorrect wsrep_slave_threads value: '0' +CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; +INSERT INTO t1 VALUES (1); +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MW-357.test b/mysql-test/suite/galera/t/MW-357.test new file mode 100644 index 000000000000..d13cf058aeb9 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-357.test @@ -0,0 +1,13 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--connection node_2 +SET GLOBAL wsrep_slave_threads = 0; + +--connection node_1 +CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; + +--connection node_1 +INSERT INTO t1 VALUES (1); + +DROP TABLE t1; diff --git a/sql/wsrep_applier.cc b/sql/wsrep_applier.cc index 3932478163c3..9248b82cbcec 100644 --- a/sql/wsrep_applier.cc +++ b/sql/wsrep_applier.cc @@ -200,6 +200,8 @@ wsrep_cb_status_t wsrep_apply_cb(void* const ctx, { THD* const thd((THD*)ctx); + assert(thd->wsrep_apply_toi == false); + // Allow tests to block the applier thread using the DBUG facilities DBUG_EXECUTE_IF("sync.wsrep_apply_cb", { @@ -363,7 +365,7 @@ wsrep_cb_status_t wsrep_commit_cb(void* const ctx, mysql_mutex_unlock(&LOCK_wsrep_slave_threads); } - if (*exit == false && thd->wsrep_applier) + if (thd->wsrep_applier) { /* From trans_begin() */ thd->variables.option_bits|= OPTION_BEGIN; From 0529b054d9cfe85022c2189dc44e9e8cfd797fb7 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 8 Feb 2017 06:56:00 -0800 Subject: [PATCH 130/305] Galera MTR Tests: MW-359 Include include/have_innodb.inc part of include/galera_cluster.inc --- mysql-test/include/galera_cluster.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/include/galera_cluster.inc b/mysql-test/include/galera_cluster.inc index bc6522257226..c1834c3c26f2 100644 --- a/mysql-test/include/galera_cluster.inc +++ b/mysql-test/include/galera_cluster.inc @@ -8,3 +8,5 @@ --let $galera_cluster_size = 2 --source include/galera_init.inc + +--source include/have_innodb.inc From d80ba579eab5fe05400dd39c7250d8acaa1f05e1 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 8 Feb 2017 23:36:34 +0100 Subject: [PATCH 131/305] MW-336 Avoid slave threads leaking This patch fixes two problems that may arise when changing the value of wsrep_slave_threads: 1) Threads may be leaked if wsrep_slave_threads is changed repeatedly. Specifically, when changing the number of slave threads, we keep track of wsrep_slave_count_change, the number of slaves to start / stop. The problem arises when wsrep_slave_count_change is updated before slaves had a chance to exit (threads may take some time to exit, as they exit only after commiting one more replication event). The fix is to update wsrep_slave_count_change such that it reflects the number of threads that already exited or are scheduled to exit. 2) Attempting to set out of range value for wsrep_slave_threads (below 1 / above 512) results in wsrep_slave_count_change to be computed based on the out of range value, even though a warning is generated and wsrep_slave_threads is set to a truncated value. wsrep_slave_count_change is computed in wsrep_slave_threads_check(), which is called before mysql checks for valid range. Fix is to update wsrep_count_change whenever wsrep_slave_threads is updated with a valid value. --- mysql-test/suite/galera/r/MW-336.result | 42 ++++++++++++++++ mysql-test/suite/galera/t/MW-336.test | 64 +++++++++++++++++++++++++ sql/sys_vars.cc | 2 +- sql/wsrep_var.cc | 12 ++--- 4 files changed, 113 insertions(+), 7 deletions(-) create mode 100644 mysql-test/suite/galera/r/MW-336.result create mode 100644 mysql-test/suite/galera/t/MW-336.test diff --git a/mysql-test/suite/galera/r/MW-336.result b/mysql-test/suite/galera/r/MW-336.result new file mode 100644 index 000000000000..9bdb61c1a9c9 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-336.result @@ -0,0 +1,42 @@ +CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; +SET GLOBAL wsrep_slave_threads = 10; +SET GLOBAL wsrep_slave_threads = 1; +INSERT INTO t1 VALUES (1); +SET GLOBAL wsrep_slave_threads = 10; +SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; +COUNT(*) = 11 +1 +SET GLOBAL wsrep_slave_threads = 20; +SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; +COUNT(*) = 21 +1 +SET GLOBAL wsrep_slave_threads = 1; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +INSERT INTO t1 VALUES (6); +INSERT INTO t1 VALUES (7); +INSERT INTO t1 VALUES (8); +INSERT INTO t1 VALUES (9); +SET GLOBAL wsrep_slave_threads = 10; +SET GLOBAL wsrep_slave_threads = 0; +Warnings: +Warning 1292 Truncated incorrect wsrep_slave_threads value: '0' +INSERT INTO t1 VALUES (10); +INSERT INTO t1 VALUES (11); +INSERT INTO t1 VALUES (12); +INSERT INTO t1 VALUES (13); +INSERT INTO t1 VALUES (14); +INSERT INTO t1 VALUES (15); +INSERT INTO t1 VALUES (16); +INSERT INTO t1 VALUES (17); +INSERT INTO t1 VALUES (18); +INSERT INTO t1 VALUES (19); +INSERT INTO t1 VALUES (20); +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; +COUNT(*) = 2 +1 +SET GLOBAL wsrep_slave_threads = 1; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MW-336.test b/mysql-test/suite/galera/t/MW-336.test new file mode 100644 index 000000000000..79d8951a822c --- /dev/null +++ b/mysql-test/suite/galera/t/MW-336.test @@ -0,0 +1,64 @@ +# +# MW-336 Slave threads may leak if variable wsrep_slave_threads is set repeatedly +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; + +--connection node_1 +SET GLOBAL wsrep_slave_threads = 10; +SET GLOBAL wsrep_slave_threads = 1; + +--connection node_2 +INSERT INTO t1 VALUES (1); + +--connection node_1 +--sleep 0.5 +SET GLOBAL wsrep_slave_threads = 10; +--sleep 0.5 +SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; + +SET GLOBAL wsrep_slave_threads = 20; +--sleep 0.5 +SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; + + +SET GLOBAL wsrep_slave_threads = 1; + +--connection node_2 +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +INSERT INTO t1 VALUES (6); +INSERT INTO t1 VALUES (7); +INSERT INTO t1 VALUES (8); +INSERT INTO t1 VALUES (9); + + +--connection node_1 +SET GLOBAL wsrep_slave_threads = 10; +SET GLOBAL wsrep_slave_threads = 0; + +--connection node_2 +INSERT INTO t1 VALUES (10); +INSERT INTO t1 VALUES (11); +INSERT INTO t1 VALUES (12); +INSERT INTO t1 VALUES (13); +INSERT INTO t1 VALUES (14); +INSERT INTO t1 VALUES (15); +INSERT INTO t1 VALUES (16); +INSERT INTO t1 VALUES (17); +INSERT INTO t1 VALUES (18); +INSERT INTO t1 VALUES (19); +INSERT INTO t1 VALUES (20); + +--connection node_1 +--sleep 0.5 +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user'; + +SET GLOBAL wsrep_slave_threads = 1; +DROP TABLE t1; diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 078b861f069c..525db472ad6b 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -4319,7 +4319,7 @@ static Sys_var_ulong Sys_wsrep_slave_threads( GLOBAL_VAR(wsrep_slave_threads), CMD_LINE(REQUIRED_ARG), VALID_RANGE(1, 512), DEFAULT(1), BLOCK_SIZE(1), &PLock_wsrep_slave_threads, NOT_IN_BINLOG, - ON_CHECK(wsrep_slave_threads_check), + ON_CHECK(NULL), ON_UPDATE(wsrep_slave_threads_update)); static Sys_var_charptr Sys_wsrep_dbug_option( diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index cb7c4fdac0ee..1707fe33601e 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -40,6 +40,8 @@ const char* wsrep_node_incoming_address = 0; const char* wsrep_start_position = 0; ulong wsrep_reject_queries; +static long wsrep_prev_slave_threads = wsrep_slave_threads; + int wsrep_init_vars() { wsrep_provider = my_strdup(WSREP_NONE, MYF(MY_WME)); @@ -529,17 +531,15 @@ void wsrep_node_address_init (const char* value) wsrep_node_address = (value) ? my_strdup(value, MYF(0)) : NULL; } -bool wsrep_slave_threads_check (sys_var *self, THD* thd, set_var* var) +static void wsrep_slave_count_change_update () { - mysql_mutex_lock(&LOCK_wsrep_slave_threads); - wsrep_slave_count_change = var->value->val_int() - wsrep_slave_threads; - mysql_mutex_unlock(&LOCK_wsrep_slave_threads); - - return 0; + wsrep_slave_count_change += (wsrep_slave_threads - wsrep_prev_slave_threads); + wsrep_prev_slave_threads = wsrep_slave_threads; } bool wsrep_slave_threads_update (sys_var *self, THD* thd, enum_var_type type) { + wsrep_slave_count_change_update(); if (wsrep_slave_count_change > 0) { wsrep_create_appliers(wsrep_slave_count_change); From 855ace7e4be31c9b36171d914e3396a8d5e01b64 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Mon, 13 Feb 2017 11:23:17 +0200 Subject: [PATCH 132/305] Refs: MW-362 * Skipping GTID initialization for RESET MASTER command * with this fix, GTID sequence remains the same in all nodes * However, when using is native mysql mode, RESET MASTER should behave in native mysql manner --- sql/binlog.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sql/binlog.cc b/sql/binlog.cc index 9be49498ab64..3bdadec55928 100644 --- a/sql/binlog.cc +++ b/sql/binlog.cc @@ -4009,10 +4009,26 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd) } else { +#ifdef WITH_WSREP + /* initialize GTID sequence only once + * RESET MASTER tries to re-initialize here, but for wsrep, we have to + * maintain original seqeunce + -*/ + if (wsrep_sidno == -1) + { + WSREP_DEBUG("Initializing GTID state"); +#endif /* WITH_WSREP */ gtid_state->clear(); // don't clear global_sid_map because it's used by the relay log too if (gtid_state->init() != 0) goto err; +#ifdef WITH_WSREP + } + else + { + WSREP_DEBUG("Skipping GTID state init because of wsrep GTID map"); + } +#endif /* WITH_WSREP */ } #endif From ff2041a972ff416b39e472b450a065512e238969 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 16 Feb 2017 23:19:10 +0200 Subject: [PATCH 133/305] Refs: MW-360 * splitting DROP TABLE query in separate DROP commands for temporary and real tables * not replicating temporary table DROP command * using wsrep_sidno GTID group only for innodb table drop command part all this follows more or less the logic of how mysql wants to split drop table list --- sql/rpl_gtid_cache.cc | 5 +- sql/sql_class.cc | 2 + sql/sql_class.h | 1 + sql/sql_parse.cc | 28 +++++++---- sql/sql_parse.h | 25 ++-------- sql/sql_partition_admin.cc | 2 +- sql/sql_table.cc | 100 +++++++++++++++++++++++++++++++++++++ sql/sql_truncate.cc | 2 +- sql/wsrep_hton.cc | 1 + sql/wsrep_mysqld.cc | 11 ++-- sql/wsrep_mysqld.h | 24 ++++++++- 11 files changed, 161 insertions(+), 40 deletions(-) diff --git a/sql/rpl_gtid_cache.cc b/sql/rpl_gtid_cache.cc index 7e8a36849634..3d9c0809dc95 100644 --- a/sql/rpl_gtid_cache.cc +++ b/sql/rpl_gtid_cache.cc @@ -152,8 +152,11 @@ enum_return_status Group_cache::generate_automatic_gno(THD *thd) Replace sidno with wsrep_sidno if transaction went through wsrep commit */ - if (WSREP(thd) && thd->wsrep_trx_meta.gtid.seqno != -1) + if (WSREP(thd) && thd->wsrep_trx_meta.gtid.seqno != -1 && + !thd->wsrep_skip_wsrep_GTID) { + WSREP_DEBUG("using wsrep_sidno, seqno %lu %s", + thd->wsrep_trx_meta.gtid.seqno, thd->query()); automatic_gtid.sidno= wsrep_sidno; } else diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 2397125e61c2..b75b4c27650e 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1223,6 +1223,7 @@ THD::THD(bool enable_plugins) wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED; wsrep_affected_rows = 0; wsrep_replicate_GTID = false; + wsrep_skip_wsrep_GTID = false; #endif /* Call to init() below requires fully initialized Open_tables_state. */ reset_open_tables_state(); @@ -1641,6 +1642,7 @@ void THD::init(void) wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED; wsrep_affected_rows = 0; wsrep_replicate_GTID = false; + wsrep_skip_wsrep_GTID = false; #endif binlog_row_event_extra_data= 0; diff --git a/sql/sql_class.h b/sql/sql_class.h index 33fe0a3efa5b..e3c14efb7799 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3230,6 +3230,7 @@ class THD :public MDL_context_owner, wsrep_gtid_t wsrep_sync_wait_gtid; ulong wsrep_affected_rows; bool wsrep_replicate_GTID; + bool wsrep_skip_wsrep_GTID; #endif /* WITH_WSREP */ /** Internal parser state. diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 3634646e8e07..291462ad05b5 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4101,16 +4101,24 @@ case SQLCOM_PREPARE: goto error; /* purecov: inspected */ } #ifdef WITH_WSREP - for (TABLE_LIST *table= all_tables; table; table= table->next_global) - { - if (!lex->drop_temporary && - (!thd->is_current_stmt_binlog_format_row() || - !find_temporary_table(thd, table))) - { - WSREP_TO_ISOLATION_BEGIN(NULL, NULL, all_tables); - break; - } - } + bool has_tmp_tables= false; + for (TABLE_LIST *table= all_tables; table; table= table->next_global) + { + if (lex->drop_temporary || find_temporary_table(thd, table)) + { + has_tmp_tables= true; + break; + } + } + if (has_tmp_tables) + { + wsrep_replicate_drop_query(thd, first_table, lex->drop_if_exists, + lex->drop_temporary, false); + } + else + { + WSREP_TO_ISOLATION_BEGIN(NULL, NULL, all_tables); + } #endif /* WITH_WSREP */ /* DDL and binlog write order are protected by metadata locks. */ res= mysql_rm_table(thd, first_table, lex->drop_if_exists, diff --git a/sql/sql_parse.h b/sql/sql_parse.h index 7c10ac4a9733..21d0739a69f3 100644 --- a/sql/sql_parse.h +++ b/sql/sql_parse.h @@ -210,29 +210,12 @@ inline bool is_supported_parser_charset(const CHARSET_INFO *cs) { return (cs->mbminlen == 1); } -#ifdef WITH_WSREP - -#define WSREP_MYSQL_DB (char *)"mysql" -#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \ - if (WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error; - -#define WSREP_TO_ISOLATION_END \ - if (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER)) \ - wsrep_to_isolation_end(thd); - -/* Checks if lex->no_write_to_binlog is set for statements that use - LOCAL or NO_WRITE_TO_BINLOG -*/ -#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) \ - if (WSREP(thd) && !thd->lex->no_write_to_binlog \ - && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error; - -#else +#ifndef WITH_WSREP #define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) -#define WSREP_TO_ISOLATION_END -#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) - +#define WSREP_TO_ISOLATION_BEGIN_QUERY(db_, query_, table_, table_list_) +#define WSREP_TO_ISOLATION_END +#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, query_, table_, table_list_) #endif /* WITH_WSREP */ diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index 857f050c68a8..04ca8e422df6 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -773,7 +773,7 @@ bool Sql_cmd_alter_table_truncate_partition::execute(THD *thd) if (WSREP(thd) && (!thd->is_current_stmt_binlog_format_row() || !find_temporary_table(thd, first_table)) && wsrep_to_isolation_begin( - thd, first_table->db, first_table->table_name, NULL) + thd, NULL, first_table->db, first_table->table_name, NULL) ) { WSREP_WARN("ALTER TABLE isolation failure"); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 00cb417b7499..977e79d2e1ab 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2217,7 +2217,95 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists, DBUG_RETURN(FALSE); } +#ifdef WITH_WSREP +static void +wsrep_append_name(THD *thd, String *packet, const char *name, uint length, + const CHARSET_INFO *from_cs, const CHARSET_INFO *to_cs) +{ + const char *to_name= name; + size_t to_length= length; + String to_string(name,length, from_cs); + if (from_cs != NULL && to_cs != NULL && from_cs != to_cs) + thd->convert_string(&to_string, from_cs, to_cs); + + if (to_cs != NULL) + { + to_name= to_string.c_ptr(); + to_length= to_string.length(); + } + packet->append(to_name, to_length, packet->charset()); +} + +int wsrep_replicate_drop_query(THD *thd, TABLE_LIST *tables, bool if_exists, + bool drop_temporary, bool dont_log_query) +{ + TABLE_LIST *table; + int error= 0; + String built_query; + bool non_tmp_table_deleted= FALSE; + + DBUG_ENTER("wsrep_build_drop_query"); + + if (!dont_log_query) + { + if (!drop_temporary) + { + built_query.set_charset(system_charset_info); + if (if_exists) + built_query.append("DROP TABLE IF EXISTS "); + else + built_query.append("DROP TABLE "); + } + } + + for (table= tables; table; table= table->next_local) + { + char *db=table->db; + int db_len= table->db_length; + + DBUG_PRINT("table", ("table_l: '%s'.'%s' table: 0x%lx s: 0x%lx", + table->db, table->table_name, (long) table->table, + table->table ? (long) table->table->s : (long) -1)); + + if (!find_temporary_table(thd, table)) + { + non_tmp_table_deleted= TRUE; + + if (thd->db == NULL || strcmp(db,thd->db) != 0) + { + wsrep_append_name(thd, &built_query, db, db_len, + system_charset_info, thd->charset()); + built_query.append("."); + } + + thd->variables.option_bits &= ~OPTION_QUOTE_SHOW_CREATE; + wsrep_append_name(thd, &built_query, table->table_name, + strlen(table->table_name), system_charset_info, + thd->charset()); + built_query.append(","); + } + } +err: + if (non_tmp_table_deleted) + { + /* Chop of the last comma */ + built_query.chop(); + built_query.append(" /* generated by server */"); + WSREP_DEBUG("TOI for %s", built_query.ptr()); + if (WSREP_TO_ISOLATION_BEGIN_QUERY(built_query.ptr(), NULL, NULL, tables)) + { + WSREP_DEBUG("TOI failed for DROP TABLE: %s", WSREP_QUERY(thd)); + error= 1; + goto end; + } + } + +end: + DBUG_RETURN(error); +} + +#endif /* WITH_WSREP */ /** Execute the drop of a normal or temporary table. @@ -2658,6 +2746,9 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, /* Chop of the last comma */ built_non_trans_tmp_query.chop(); built_non_trans_tmp_query.append(" /* generated by server */"); +#ifdef WITH_WSREP + thd->wsrep_skip_wsrep_GTID = true; +#endif /* WITH_WSREP */ error |= thd->binlog_query(THD::STMT_QUERY_TYPE, built_non_trans_tmp_query.ptr(), built_non_trans_tmp_query.length(), @@ -2684,6 +2775,9 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, /* Chop of the last comma */ built_trans_tmp_query.chop(); built_trans_tmp_query.append(" /* generated by server */"); +#ifdef WITH_WSREP + thd->wsrep_skip_wsrep_GTID = true; +#endif /* WITH_WSREP */ error |= thd->binlog_query(THD::STMT_QUERY_TYPE, built_trans_tmp_query.ptr(), built_trans_tmp_query.length(), @@ -2714,6 +2808,9 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, built_query.append(" /* generated by server */"); int error_code = (non_tmp_error ? (foreign_key_error ? ER_ROW_IS_REFERENCED : ER_BAD_TABLE_ERROR) : 0); +#ifdef WITH_WSREP + thd->wsrep_skip_wsrep_GTID = false; +#endif /* WITH_WSREP */ error |= thd->binlog_query(THD::STMT_QUERY_TYPE, built_query.ptr(), built_query.length(), @@ -2761,6 +2858,9 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, } end: +#ifdef WITH_WSREP + thd->wsrep_skip_wsrep_GTID = false; +#endif /* WITH_WSREP */ DBUG_RETURN(error); } diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc index 4818e5a9cd62..75da87967bc2 100644 --- a/sql/sql_truncate.cc +++ b/sql/sql_truncate.cc @@ -471,7 +471,7 @@ bool Sql_cmd_truncate_table::truncate_table(THD *thd, TABLE_LIST *table_ref) bool hton_can_recreate; #ifdef WITH_WSREP - if (WSREP(thd) && wsrep_to_isolation_begin(thd, + if (WSREP(thd) && wsrep_to_isolation_begin(thd, NULL, table_ref->db, table_ref->table_name, NULL)) DBUG_RETURN(TRUE); diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index b2be92459309..0c5ec5217131 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -46,6 +46,7 @@ void wsrep_cleanup_transaction(THD *thd) thd->wsrep_trx_meta.depends_on= WSREP_SEQNO_UNDEFINED; thd->wsrep_exec_mode= LOCAL_STATE; thd->wsrep_affected_rows= 0; + thd->wsrep_skip_wsrep_GTID= false; return; } diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index ded6d871a8ca..47616bb98a07 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -1177,7 +1177,7 @@ create_view_query(THD *thd, uchar** buf, size_t* buf_len) 1: TOI replication was skipped -1: TOI replication failed */ -static int wsrep_TOI_begin(THD *thd, char *db_, char *table_, +static int wsrep_TOI_begin(THD *thd, const char *query, char *db_, char *table_, const TABLE_LIST* table_list) { wsrep_status_t ret(WSREP_WARNING); @@ -1206,8 +1206,9 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_, buf_err= wsrep_alter_event_query(thd, &buf, &buf_len); break; default: - buf_err= wsrep_to_buf_helper(thd, thd->query(), thd->query_length(), &buf, - &buf_len); + buf_err= wsrep_to_buf_helper(thd, (query) ? query : thd->query(), + (query) ? strlen(query) : thd->query_length(), + &buf, &buf_len); break; } @@ -1350,7 +1351,7 @@ static void wsrep_RSU_end(THD *thd) thd->variables.wsrep_on = 1; } -int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_, +int wsrep_to_isolation_begin(THD *thd, const char *query, char *db_, char *table_, const TABLE_LIST* table_list) { @@ -1403,7 +1404,7 @@ int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_, if (thd->variables.wsrep_on && thd->wsrep_exec_mode==LOCAL_STATE) { switch (thd->variables.wsrep_OSU_method) { - case WSREP_OSU_TOI: ret = wsrep_TOI_begin(thd, db_, table_, + case WSREP_OSU_TOI: ret = wsrep_TOI_begin(thd, query, db_, table_, table_list); break; case WSREP_OSU_RSU: ret = wsrep_RSU_begin(thd, db_, table_); break; default: diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index 098ae79a8688..cccd9314c23d 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -324,7 +324,7 @@ extern PSI_mutex_key key_LOCK_wsrep_slave_threads; extern PSI_mutex_key key_LOCK_wsrep_desync; #endif /* HAVE_PSI_INTERFACE */ struct TABLE_LIST; -int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_, +int wsrep_to_isolation_begin(THD *thd, const char * query, char *db_, char *table_, const TABLE_LIST* table_list); void wsrep_to_isolation_end(THD *thd); void wsrep_cleanup_transaction(THD *thd); @@ -341,5 +341,27 @@ void wsrep_init_sidno(const wsrep_uuid_t&); bool wsrep_node_is_donor(); bool wsrep_node_is_synced(); bool wsrep_replicate_GTID(THD* thd); +int wsrep_replicate_drop_query(THD *thd, TABLE_LIST *tables, bool if_exists, + bool drop_temporary, bool dont_log_query); + + +#define WSREP_MYSQL_DB (char *)"mysql" +#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \ + if (WSREP(thd) && wsrep_to_isolation_begin(thd, NULL, db_, table_, table_list_)) goto error; + +#define WSREP_TO_ISOLATION_BEGIN_QUERY(query, db_, table_, table_list_) \ + (WSREP(thd) && wsrep_to_isolation_begin(thd, query, db_, table_, table_list_)) + +#define WSREP_TO_ISOLATION_END \ + if (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER)) \ + wsrep_to_isolation_end(thd); + +/* Checks if lex->no_write_to_binlog is set for statements that use + LOCAL or NO_WRITE_TO_BINLOG +*/ +#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) \ + if (WSREP(thd) && !thd->lex->no_write_to_binlog \ + && wsrep_to_isolation_begin(thd, NULL, db_, table_, table_list_)) goto error; + #endif /* WSREP_MYSQLD_H */ From 9850e84d4f186edbdb8506ac5ae4bb866e20c433 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 17 Feb 2017 10:25:05 +0200 Subject: [PATCH 134/305] Refs: MW-360, fix for compiler warning --- sql/sql_table.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 977e79d2e1ab..dd8a1375294e 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2286,7 +2286,6 @@ int wsrep_replicate_drop_query(THD *thd, TABLE_LIST *tables, bool if_exists, } } -err: if (non_tmp_table_deleted) { /* Chop of the last comma */ From f98df592de6f82ae931a12146e0c2710043de2ac Mon Sep 17 00:00:00 2001 From: sjaakola Date: Mon, 20 Feb 2017 23:29:25 +0200 Subject: [PATCH 135/305] Refs: MW-360 * merged relevant parts of DROP TABLE query splitting from mysql-wsrep-features --- sql/sql_parse.cc | 21 +--- sql/sql_table.cc | 88 -------------- sql/wsrep_mysqld.cc | 289 ++++++++++++++++++++++++++++++++------------ sql/wsrep_mysqld.h | 3 - 4 files changed, 213 insertions(+), 188 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 291462ad05b5..facfda52db4c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4100,26 +4100,7 @@ case SQLCOM_PREPARE: if (check_table_access(thd, DROP_ACL, all_tables, FALSE, UINT_MAX, FALSE)) goto error; /* purecov: inspected */ } -#ifdef WITH_WSREP - bool has_tmp_tables= false; - for (TABLE_LIST *table= all_tables; table; table= table->next_global) - { - if (lex->drop_temporary || find_temporary_table(thd, table)) - { - has_tmp_tables= true; - break; - } - } - if (has_tmp_tables) - { - wsrep_replicate_drop_query(thd, first_table, lex->drop_if_exists, - lex->drop_temporary, false); - } - else - { - WSREP_TO_ISOLATION_BEGIN(NULL, NULL, all_tables); - } -#endif /* WITH_WSREP */ + WSREP_TO_ISOLATION_BEGIN(NULL, NULL, all_tables); /* DDL and binlog write order are protected by metadata locks. */ res= mysql_rm_table(thd, first_table, lex->drop_if_exists, lex->drop_temporary); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index dd8a1375294e..f5d42a58e5a0 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2217,94 +2217,6 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists, DBUG_RETURN(FALSE); } -#ifdef WITH_WSREP -static void -wsrep_append_name(THD *thd, String *packet, const char *name, uint length, - const CHARSET_INFO *from_cs, const CHARSET_INFO *to_cs) -{ - const char *to_name= name; - size_t to_length= length; - String to_string(name,length, from_cs); - if (from_cs != NULL && to_cs != NULL && from_cs != to_cs) - thd->convert_string(&to_string, from_cs, to_cs); - - if (to_cs != NULL) - { - to_name= to_string.c_ptr(); - to_length= to_string.length(); - } - packet->append(to_name, to_length, packet->charset()); -} - -int wsrep_replicate_drop_query(THD *thd, TABLE_LIST *tables, bool if_exists, - bool drop_temporary, bool dont_log_query) -{ - TABLE_LIST *table; - int error= 0; - String built_query; - bool non_tmp_table_deleted= FALSE; - - DBUG_ENTER("wsrep_build_drop_query"); - - if (!dont_log_query) - { - if (!drop_temporary) - { - built_query.set_charset(system_charset_info); - if (if_exists) - built_query.append("DROP TABLE IF EXISTS "); - else - built_query.append("DROP TABLE "); - } - } - - for (table= tables; table; table= table->next_local) - { - char *db=table->db; - int db_len= table->db_length; - - DBUG_PRINT("table", ("table_l: '%s'.'%s' table: 0x%lx s: 0x%lx", - table->db, table->table_name, (long) table->table, - table->table ? (long) table->table->s : (long) -1)); - - if (!find_temporary_table(thd, table)) - { - non_tmp_table_deleted= TRUE; - - if (thd->db == NULL || strcmp(db,thd->db) != 0) - { - wsrep_append_name(thd, &built_query, db, db_len, - system_charset_info, thd->charset()); - built_query.append("."); - } - - thd->variables.option_bits &= ~OPTION_QUOTE_SHOW_CREATE; - wsrep_append_name(thd, &built_query, table->table_name, - strlen(table->table_name), system_charset_info, - thd->charset()); - built_query.append(","); - } - } - - if (non_tmp_table_deleted) - { - /* Chop of the last comma */ - built_query.chop(); - built_query.append(" /* generated by server */"); - WSREP_DEBUG("TOI for %s", built_query.ptr()); - if (WSREP_TO_ISOLATION_BEGIN_QUERY(built_query.ptr(), NULL, NULL, tables)) - { - WSREP_DEBUG("TOI failed for DROP TABLE: %s", WSREP_QUERY(thd)); - error= 1; - goto end; - } - } - -end: - DBUG_RETURN(error); -} - -#endif /* WITH_WSREP */ /** Execute the drop of a normal or temporary table. diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 47616bb98a07..b88476866f28 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -2,7 +2,7 @@ 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. + the Free Software Foundation; version 2 of the License.x1 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,6 +16,7 @@ #include #include #include +#include /* find_temporary_table() */ #include "wsrep_priv.h" #include "wsrep_thd.h" #include "wsrep_sst.h" @@ -932,84 +933,66 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd, const TABLE_LIST* table_list, wsrep_key_arr_t* ka) { - ka->keys= 0; - ka->keys_len= 0; + ka->keys= 0; + ka->keys_len= 0; - extern TABLE* find_temporary_table(THD*, const TABLE_LIST*); - - if (db || table) + if (db || table) + { + if (!(ka->keys= (wsrep_key_t*)my_malloc(sizeof(wsrep_key_t), MYF(0)))) { - TABLE_LIST tmp_table; - MDL_request mdl_request; - - memset(&tmp_table, 0, sizeof(tmp_table)); - tmp_table.table_name= (char*)table; - tmp_table.db= (char*)db; - tmp_table.mdl_request.init(MDL_key::GLOBAL, (db) ? db : "", - (table) ? table : "", - MDL_INTENTION_EXCLUSIVE, MDL_STATEMENT); - - if (!table || !find_temporary_table(thd, &tmp_table)) - { - if (!(ka->keys= (wsrep_key_t*)my_malloc(sizeof(wsrep_key_t), MYF(0)))) - { - WSREP_ERROR("Can't allocate memory for key_array"); - goto err; - } - ka->keys_len= 1; - if (!(ka->keys[0].key_parts= (wsrep_buf_t*) - my_malloc(sizeof(wsrep_buf_t)*2, MYF(0)))) - { - WSREP_ERROR("Can't allocate memory for key_parts"); - goto err; - } - ka->keys[0].key_parts_num= 2; - if (!wsrep_prepare_key_for_isolation( - db, table, - (wsrep_buf_t*)ka->keys[0].key_parts, - &ka->keys[0].key_parts_num)) - { - WSREP_ERROR("Preparing keys for isolation failed"); - goto err; - } - } + WSREP_ERROR("Can't allocate memory for key_array"); + goto err; + } + ka->keys_len= 1; + if (!(ka->keys[0].key_parts= (wsrep_buf_t*) + my_malloc(sizeof(wsrep_buf_t)*2, MYF(0)))) + { + WSREP_ERROR("Can't allocate memory for key_parts"); + goto err; } + ka->keys[0].key_parts_num= 2; + if (!wsrep_prepare_key_for_isolation( + db, table, + (wsrep_buf_t*)ka->keys[0].key_parts, + &ka->keys[0].key_parts_num)) + { + WSREP_ERROR("Preparing keys for isolation failed (1)"); + goto err; + } + } - for (const TABLE_LIST* table= table_list; table; table= table->next_global) + for (const TABLE_LIST* table= table_list; table; table= table->next_global) + { + wsrep_key_t* tmp; + tmp= (wsrep_key_t*)my_realloc(ka->keys, + (ka->keys_len + 1) * sizeof(wsrep_key_t), + MYF(0)); + if (!tmp) { - if (!find_temporary_table(thd, table)) - { - wsrep_key_t* tmp; - tmp= (wsrep_key_t*)my_realloc( - ka->keys, (ka->keys_len + 1) * sizeof(wsrep_key_t), MYF(0)); - if (!tmp) - { - WSREP_ERROR("Can't allocate memory for key_array"); - goto err; - } - ka->keys= tmp; - if (!(ka->keys[ka->keys_len].key_parts= (wsrep_buf_t*) - my_malloc(sizeof(wsrep_buf_t)*2, MYF(0)))) - { - WSREP_ERROR("Can't allocate memory for key_parts"); - goto err; - } - ka->keys[ka->keys_len].key_parts_num= 2; - ++ka->keys_len; - if (!wsrep_prepare_key_for_isolation( - table->db, table->table_name, - (wsrep_buf_t*)ka->keys[ka->keys_len - 1].key_parts, - &ka->keys[ka->keys_len - 1].key_parts_num)) - { - WSREP_ERROR("Preparing keys for isolation failed"); - goto err; - } - } + WSREP_ERROR("Can't allocate memory for key_array"); + goto err; } - return true; + ka->keys= tmp; + if (!(ka->keys[ka->keys_len].key_parts= (wsrep_buf_t*) + my_malloc(sizeof(wsrep_buf_t)*2, MYF(0)))) + { + WSREP_ERROR("Can't allocate memory for key_parts"); + goto err; + } + ka->keys[ka->keys_len].key_parts_num= 2; + ++ka->keys_len; + if (!wsrep_prepare_key_for_isolation(table->db, table->table_name, + (wsrep_buf_t*)ka->keys[ka->keys_len - 1].key_parts, + &ka->keys[ka->keys_len - 1].key_parts_num)) + { + WSREP_ERROR("Preparing keys for isolation failed (2)"); + goto err; + } + } + return 0; err: wsrep_keys_free(ka); - return false; + return 1; } @@ -1171,6 +1154,146 @@ create_view_query(THD *thd, uchar** buf, size_t* buf_len) return wsrep_to_buf_helper(thd, buff.ptr(), buff.length(), buf, buf_len); } +/* + Rewrite DROP TABLE for TOI. Temporary tables are eliminated from + the query as they are visible only to client connection. + + TODO: See comments for sql_base.cc:drop_temporary_table() and refine + the function to deal with transactional locked tables. + */ +static int wsrep_drop_table_query(THD* thd, uchar** buf, size_t* buf_len) +{ + + LEX* lex= thd->lex; + SELECT_LEX* select_lex= &lex->select_lex; + TABLE_LIST* first_table= select_lex->table_list.first; + String buff; + + DBUG_ASSERT(!lex->drop_temporary); + + bool found_temp_table= false; + for (TABLE_LIST* table= first_table; table; table= table->next_global) + { + if (find_temporary_table(thd, table->db, table->table_name)) + { + found_temp_table= true; + break; + } + } + + if (found_temp_table) + { + buff.append("DROP TABLE "); + if (lex->drop_if_exists) + buff.append("IF EXISTS "); + + for (TABLE_LIST* table= first_table; table; table= table->next_global) + { + if (!find_temporary_table(thd, table->db, table->table_name)) + { + append_identifier(thd, &buff, table->db, strlen(table->db), + system_charset_info, thd->charset()); + buff.append("."); + append_identifier(thd, &buff, table->table_name, + strlen(table->table_name), + system_charset_info, thd->charset()); + buff.append(","); + } + } + + /* Chop the last comma */ + buff.chop(); + buff.append(" /* generated by wsrep */"); + + WSREP_DEBUG("Rewrote '%s' as '%s'", thd->query(), buff.ptr()); + + return wsrep_to_buf_helper(thd, buff.ptr(), buff.length(), buf, buf_len); + } + else + { + return wsrep_to_buf_helper(thd, thd->query(), thd->query_length(), + buf, buf_len); + } +} + +/* + Decide if statement should run in TOI. + + Look if table or table_list contain temporary tables. If the + statement affects only temporary tables, statement should not run + in TOI. If the table list contains mix of regular and temporary tables + (DROP TABLE, OPTIMIZE, ANALYZE), statement should be run in TOI but + should be rewritten at later time for replication to contain only + non-temporary tables. + */ +static bool wsrep_can_run_in_toi(THD *thd, const char *db, const char *table, + const TABLE_LIST *table_list) +{ + DBUG_ASSERT(!table || db); + DBUG_ASSERT(table_list || db); + + LEX* lex= thd->lex; + SELECT_LEX* select_lex= &lex->select_lex; + TABLE_LIST* first_table= select_lex->table_list.first; + + switch (lex->sql_command) + { + case SQLCOM_CREATE_TABLE: + DBUG_ASSERT(!table_list); + if (thd->lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) + { + return false; + } + return true; + + case SQLCOM_CREATE_VIEW: + + DBUG_ASSERT(!table_list); + DBUG_ASSERT(first_table); /* First table is view name */ + /* + If any of the remaining tables refer to temporary table error + is returned to client, so TOI can be skipped + */ + for (TABLE_LIST* it= first_table->next_global; it; it= it->next_global) + { + if (find_temporary_table(thd, it)) + { + return false; + } + } + return true; + + case SQLCOM_CREATE_TRIGGER: + + DBUG_ASSERT(!table_list); + DBUG_ASSERT(first_table); + + if (find_temporary_table(thd, first_table)) + { + return false; + } + return true; + + default: + if (table && !find_temporary_table(thd, db, table)) + { + return true; + } + + if (table_list) + { + for (TABLE_LIST* table= first_table; table; table= table->next_global) + { + if (!find_temporary_table(thd, table->db, table->table_name)) + { + return true; + } + } + } + return !(table || table_list); + } +} + /* returns: 0: statement was replicated as TOI @@ -1185,6 +1308,12 @@ static int wsrep_TOI_begin(THD *thd, const char *query, char *db_, char *table_, size_t buf_len(0); int buf_err; + if (wsrep_can_run_in_toi(thd, db_, table_, table_list) == false) + { + WSREP_DEBUG("No TOI for %s", WSREP_QUERY(thd)); + return 1; + } + WSREP_DEBUG("TO BEGIN: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd), thd->wsrep_exec_mode, WSREP_QUERY(thd)); switch (thd->lex->sql_command) @@ -1205,6 +1334,9 @@ static int wsrep_TOI_begin(THD *thd, const char *query, char *db_, char *table_, case SQLCOM_ALTER_EVENT: buf_err= wsrep_alter_event_query(thd, &buf, &buf_len); break; + case SQLCOM_DROP_TABLE: + buf_err= wsrep_drop_table_query(thd, &buf, &buf_len); + break; default: buf_err= wsrep_to_buf_helper(thd, (query) ? query : thd->query(), (query) ? strlen(query) : thd->query_length(), @@ -1214,9 +1346,9 @@ static int wsrep_TOI_begin(THD *thd, const char *query, char *db_, char *table_, wsrep_key_arr_t key_arr= {0, 0}; struct wsrep_buf buff = { buf, buf_len }; - if (!buf_err && - wsrep_prepare_keys_for_isolation(thd, db_, table_, table_list, &key_arr)&& - key_arr.keys_len > 0 && + if (!buf_err && + !wsrep_prepare_keys_for_isolation(thd, db_, table_, table_list, &key_arr) && + key_arr.keys_len > 0 && WSREP_OK == (ret = wsrep->to_execute_start(wsrep, thd->thread_id, key_arr.keys, key_arr.keys_len, &buff, 1, @@ -1404,9 +1536,12 @@ int wsrep_to_isolation_begin(THD *thd, const char *query, char *db_, char *table if (thd->variables.wsrep_on && thd->wsrep_exec_mode==LOCAL_STATE) { switch (thd->variables.wsrep_OSU_method) { - case WSREP_OSU_TOI: ret = wsrep_TOI_begin(thd, query, db_, table_, - table_list); break; - case WSREP_OSU_RSU: ret = wsrep_RSU_begin(thd, db_, table_); break; + case WSREP_OSU_TOI: + ret = wsrep_TOI_begin(thd, query, db_, table_, table_list); + break; + case WSREP_OSU_RSU: + ret = wsrep_RSU_begin(thd, db_, table_); + break; default: WSREP_ERROR("Unsupported OSU method: %lu", thd->variables.wsrep_OSU_method); diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index cccd9314c23d..df71d32b85a4 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -341,9 +341,6 @@ void wsrep_init_sidno(const wsrep_uuid_t&); bool wsrep_node_is_donor(); bool wsrep_node_is_synced(); bool wsrep_replicate_GTID(THD* thd); -int wsrep_replicate_drop_query(THD *thd, TABLE_LIST *tables, bool if_exists, - bool drop_temporary, bool dont_log_query); - #define WSREP_MYSQL_DB (char *)"mysql" #define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \ From 8ad585c9b5d5a7de48653444ffcc1a72b9bc32c5 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 22 Feb 2017 15:36:38 +0200 Subject: [PATCH 136/305] refs: MW-362 * reverted the previous fix to skip GTID init with RESET MASTER * now rejcting RESET MASTER if wsrep provider is initialized and gtid mode is ON --- sql/binlog.cc | 16 ---------------- sql/rpl_master.cc | 12 +++++++++++- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/sql/binlog.cc b/sql/binlog.cc index 3bdadec55928..9be49498ab64 100644 --- a/sql/binlog.cc +++ b/sql/binlog.cc @@ -4009,26 +4009,10 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd) } else { -#ifdef WITH_WSREP - /* initialize GTID sequence only once - * RESET MASTER tries to re-initialize here, but for wsrep, we have to - * maintain original seqeunce - -*/ - if (wsrep_sidno == -1) - { - WSREP_DEBUG("Initializing GTID state"); -#endif /* WITH_WSREP */ gtid_state->clear(); // don't clear global_sid_map because it's used by the relay log too if (gtid_state->init() != 0) goto err; -#ifdef WITH_WSREP - } - else - { - WSREP_DEBUG("Skipping GTID state init because of wsrep GTID map"); - } -#endif /* WITH_WSREP */ } #endif diff --git a/sql/rpl_master.cc b/sql/rpl_master.cc index 503ad4262c62..2aaf20e97eb1 100644 --- a/sql/rpl_master.cc +++ b/sql/rpl_master.cc @@ -2161,7 +2161,17 @@ int reset_master(THD* thd) ER(ER_FLUSH_MASTER_BINLOG_CLOSED), MYF(ME_BELL+ME_WAITTANG)); return 1; } - +#ifdef WITH_WSREP + if (WSREP_ON && gtid_mode > 0) + { + /* RESET MASTER will initialize GTID sequence, and that would happen locally + in this node, so better reject it + */ + my_message(ER_NOT_ALLOWED_COMMAND, + "RESET MASTER not allowed when node is in cluster", MYF(0)); + return 1; + } +#endif if (mysql_bin_log.reset_logs(thd)) return 1; (void) RUN_HOOK(binlog_transmit, after_reset_master, (thd, 0 /* flags */)); From 7755e521bb6565ad043017e607d497f02b762619 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 22 Feb 2017 23:10:36 +0200 Subject: [PATCH 137/305] Refs: MW-360 * reverted WSREP_TO_ISOLATION macros back to original form --- sql/sql_parse.cc | 13 ++++++++++++- sql/sql_parse.h | 24 +++++++++++++++++++++--- sql/sql_partition_admin.cc | 2 +- sql/sql_truncate.cc | 6 +++--- sql/wsrep_mysqld.cc | 4 ++-- sql/wsrep_mysqld.h | 21 +-------------------- 6 files changed, 40 insertions(+), 30 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index facfda52db4c..3634646e8e07 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4100,7 +4100,18 @@ case SQLCOM_PREPARE: if (check_table_access(thd, DROP_ACL, all_tables, FALSE, UINT_MAX, FALSE)) goto error; /* purecov: inspected */ } - WSREP_TO_ISOLATION_BEGIN(NULL, NULL, all_tables); +#ifdef WITH_WSREP + for (TABLE_LIST *table= all_tables; table; table= table->next_global) + { + if (!lex->drop_temporary && + (!thd->is_current_stmt_binlog_format_row() || + !find_temporary_table(thd, table))) + { + WSREP_TO_ISOLATION_BEGIN(NULL, NULL, all_tables); + break; + } + } +#endif /* WITH_WSREP */ /* DDL and binlog write order are protected by metadata locks. */ res= mysql_rm_table(thd, first_table, lex->drop_if_exists, lex->drop_temporary); diff --git a/sql/sql_parse.h b/sql/sql_parse.h index 21d0739a69f3..9b0344c614ef 100644 --- a/sql/sql_parse.h +++ b/sql/sql_parse.h @@ -211,11 +211,29 @@ inline bool is_supported_parser_charset(const CHARSET_INFO *cs) return (cs->mbminlen == 1); } -#ifndef WITH_WSREP +#ifdef WITH_WSREP + +#define WSREP_MYSQL_DB (char *)"mysql" +#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \ + if (WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error; + +#define WSREP_TO_ISOLATION_END \ + if (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER)) \ + wsrep_to_isolation_end(thd); + +/* Checks if lex->no_write_to_binlog is set for statements that use + LOCAL or NO_WRITE_TO_BINLOG +*/ +#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) \ + if (WSREP(thd) && !thd->lex->no_write_to_binlog \ + && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error; + +#else + #define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) -#define WSREP_TO_ISOLATION_BEGIN_QUERY(db_, query_, table_, table_list_) #define WSREP_TO_ISOLATION_END -#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, query_, table_, table_list_) +#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) + #endif /* WITH_WSREP */ diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index 04ca8e422df6..c2624f4af211 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -773,7 +773,7 @@ bool Sql_cmd_alter_table_truncate_partition::execute(THD *thd) if (WSREP(thd) && (!thd->is_current_stmt_binlog_format_row() || !find_temporary_table(thd, first_table)) && wsrep_to_isolation_begin( - thd, NULL, first_table->db, first_table->table_name, NULL) + thd, first_table->db, first_table->table_name, NULL) ) { WSREP_WARN("ALTER TABLE isolation failure"); diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc index 75da87967bc2..4cd6fdd16e17 100644 --- a/sql/sql_truncate.cc +++ b/sql/sql_truncate.cc @@ -471,9 +471,9 @@ bool Sql_cmd_truncate_table::truncate_table(THD *thd, TABLE_LIST *table_ref) bool hton_can_recreate; #ifdef WITH_WSREP - if (WSREP(thd) && wsrep_to_isolation_begin(thd, NULL, - table_ref->db, - table_ref->table_name, NULL)) + if (WSREP(thd) && wsrep_to_isolation_begin(thd, + table_ref->db, + table_ref->table_name, NULL)) DBUG_RETURN(TRUE); #endif /* WITH_WSREP */ if (lock_table(thd, table_ref, &hton_can_recreate)) diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index b88476866f28..d503a901b276 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -1483,7 +1483,7 @@ static void wsrep_RSU_end(THD *thd) thd->variables.wsrep_on = 1; } -int wsrep_to_isolation_begin(THD *thd, const char *query, char *db_, char *table_, +int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_, const TABLE_LIST* table_list) { @@ -1537,7 +1537,7 @@ int wsrep_to_isolation_begin(THD *thd, const char *query, char *db_, char *table { switch (thd->variables.wsrep_OSU_method) { case WSREP_OSU_TOI: - ret = wsrep_TOI_begin(thd, query, db_, table_, table_list); + ret = wsrep_TOI_begin(thd, thd->query(), db_, table_, table_list); break; case WSREP_OSU_RSU: ret = wsrep_RSU_begin(thd, db_, table_); diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index df71d32b85a4..098ae79a8688 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -324,7 +324,7 @@ extern PSI_mutex_key key_LOCK_wsrep_slave_threads; extern PSI_mutex_key key_LOCK_wsrep_desync; #endif /* HAVE_PSI_INTERFACE */ struct TABLE_LIST; -int wsrep_to_isolation_begin(THD *thd, const char * query, char *db_, char *table_, +int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_, const TABLE_LIST* table_list); void wsrep_to_isolation_end(THD *thd); void wsrep_cleanup_transaction(THD *thd); @@ -342,23 +342,4 @@ bool wsrep_node_is_donor(); bool wsrep_node_is_synced(); bool wsrep_replicate_GTID(THD* thd); -#define WSREP_MYSQL_DB (char *)"mysql" -#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \ - if (WSREP(thd) && wsrep_to_isolation_begin(thd, NULL, db_, table_, table_list_)) goto error; - -#define WSREP_TO_ISOLATION_BEGIN_QUERY(query, db_, table_, table_list_) \ - (WSREP(thd) && wsrep_to_isolation_begin(thd, query, db_, table_, table_list_)) - -#define WSREP_TO_ISOLATION_END \ - if (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER)) \ - wsrep_to_isolation_end(thd); - -/* Checks if lex->no_write_to_binlog is set for statements that use - LOCAL or NO_WRITE_TO_BINLOG -*/ -#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) \ - if (WSREP(thd) && !thd->lex->no_write_to_binlog \ - && wsrep_to_isolation_begin(thd, NULL, db_, table_, table_list_)) goto error; - - #endif /* WSREP_MYSQLD_H */ From 71dd9576a1056dfbfd7a940e3e2c92da94278019 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Sun, 26 Feb 2017 23:48:32 +0200 Subject: [PATCH 138/305] Refs: MW-360 * fixes required in pull request review --- sql/sql_table.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index f5d42a58e5a0..b7d4485b617b 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2215,6 +2215,7 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists, DBUG_RETURN(TRUE); my_ok(thd); DBUG_RETURN(FALSE); + } /** @@ -2770,7 +2771,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, end: #ifdef WITH_WSREP - thd->wsrep_skip_wsrep_GTID = false; + thd->wsrep_skip_wsrep_GTID = false; #endif /* WITH_WSREP */ DBUG_RETURN(error); } From 47be8ee434023bd4942874e6f1dbe63286216fdb Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 1 Mar 2017 11:27:33 +0200 Subject: [PATCH 139/305] Refs: MW-360, white space fix --- sql/sql_parse.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/sql_parse.h b/sql/sql_parse.h index 9b0344c614ef..b0027eb84dc9 100644 --- a/sql/sql_parse.h +++ b/sql/sql_parse.h @@ -210,7 +210,6 @@ inline bool is_supported_parser_charset(const CHARSET_INFO *cs) { return (cs->mbminlen == 1); } - #ifdef WITH_WSREP #define WSREP_MYSQL_DB (char *)"mysql" From 09dea6eabb2e27cf1f933b73c8069e3212ec89d9 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Fri, 3 Mar 2017 03:51:07 -0800 Subject: [PATCH 140/305] Galera MTR Tests: Test for GAL-491: Progress output for IST --- .../suite/galera/r/galera_ist_progress.result | 19 +++++ .../suite/galera/t/galera_ist_progress.cnf | 5 ++ .../suite/galera/t/galera_ist_progress.test | 74 +++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 mysql-test/suite/galera/r/galera_ist_progress.result create mode 100644 mysql-test/suite/galera/t/galera_ist_progress.cnf create mode 100644 mysql-test/suite/galera/t/galera_ist_progress.test diff --git a/mysql-test/suite/galera/r/galera_ist_progress.result b/mysql-test/suite/galera/r/galera_ist_progress.result new file mode 100644 index 000000000000..9fc7febbea5b --- /dev/null +++ b/mysql-test/suite/galera/r/galera_ist_progress.result @@ -0,0 +1,19 @@ +SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; +SET SESSION wsrep_on = OFF; +SET SESSION wsrep_on = ON; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +INSERT INTO t1 VALUES (6); +INSERT INTO t1 VALUES (7); +INSERT INTO t1 VALUES (8); +INSERT INTO t1 VALUES (9); +INSERT INTO t1 VALUES (10); +SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; +include/assert_grep.inc [Receiving IST: 11 writesets, seqnos] +include/assert_grep.inc [Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete] +include/assert_grep.inc [Receiving IST\.\.\.100\.0% \(11/11 events\) complete] +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_ist_progress.cnf b/mysql-test/suite/galera/t/galera_ist_progress.cnf new file mode 100644 index 000000000000..0a26f6d6c831 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_ist_progress.cnf @@ -0,0 +1,5 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true' + diff --git a/mysql-test/suite/galera/t/galera_ist_progress.test b/mysql-test/suite/galera/t/galera_ist_progress.test new file mode 100644 index 000000000000..a4d331b37d78 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_ist_progress.test @@ -0,0 +1,74 @@ +# +# Test progress output during IST +# + +--source include/galera_cluster.inc + +# Isolate node #2 +--connection node_2 +SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--connection node_2 +SET SESSION wsrep_on = OFF; +--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc +SET SESSION wsrep_on = ON; + +# Node #2 is now isolated. Run some transactions to accumulate writesets for IST + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +INSERT INTO t1 VALUES (4); +INSERT INTO t1 VALUES (5); +INSERT INTO t1 VALUES (6); +INSERT INTO t1 VALUES (7); +INSERT INTO t1 VALUES (8); +INSERT INTO t1 VALUES (9); +INSERT INTO t1 VALUES (10); + +# Restore node #2, IST is performed + +--connection node_2 +SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--connection node_2 +--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc + +# +# Grep for expected IST output in joiner log +# + +--connection node_1 + +--let $assert_count = 1 +--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err +--let $assert_only_after = Need state transfer + +--let $assert_text = Receiving IST: 11 writesets, seqnos +--let $assert_select = Receiving IST: 11 writesets, seqnos +--source include/assert_grep.inc + +--let $assert_text = Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete +--let $assert_select = Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete +--source include/assert_grep.inc + +--let $assert_text = Receiving IST\.\.\.100\.0% \(11/11 events\) complete +--let $assert_select = Receiving IST\.\.\.100\.0% \(11/11 events\) complete +--source include/assert_grep.inc + +# Cleanup + +--connection node_1 +DROP TABLE t1; From eba9407d6e3355984cd4ac40859e4d1f22f35a0b Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Thu, 2 Mar 2017 17:53:16 +0100 Subject: [PATCH 141/305] MW-365 Do not load/dump innodb buffer pool with wsrep_recover --- storage/innobase/buf/buf0dump.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc index ed27a70307d7..899850dbfbef 100644 --- a/storage/innobase/buf/buf0dump.cc +++ b/storage/innobase/buf/buf0dump.cc @@ -40,6 +40,9 @@ Created April 08, 2011 Vasil Dimov #include "sync0rw.h" /* rw_lock_s_lock() */ #include "ut0byte.h" /* ut_ull_create() */ #include "ut0sort.h" /* UT_SORT_FUNCTION_BODY */ +#ifdef WITH_WSREP +extern my_bool wsrep_recovery; +#endif /* WITH_WSREP */ enum status_severity { STATUS_INFO, @@ -605,7 +608,13 @@ DECLARE_THREAD(buf_dump_thread)( buf_load_status(STATUS_INFO, "not started"); if (srv_buffer_pool_load_at_startup) { +#ifdef WITH_WSREP + if (!wsrep_recovery) { +#endif /* WITH_WSREP */ buf_load(); +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ } while (!SHUTTING_DOWN()) { @@ -626,8 +635,14 @@ DECLARE_THREAD(buf_dump_thread)( } if (srv_buffer_pool_dump_at_shutdown && srv_fast_shutdown != 2) { +#ifdef WITH_WSREP + if (!wsrep_recovery) { +#endif /* WITH_WSREP */ buf_dump(FALSE /* ignore shutdown down flag, keep going even if we are in a shutdown state */); +#ifdef WITH_WSREP + } +#endif /* WITH_WSREP */ } srv_buf_dump_thread_active = FALSE; From db20b6bb7418a4cebabc7d8d175bc7644ac016bd Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Mon, 6 Mar 2017 02:55:25 -0800 Subject: [PATCH 142/305] Galera MTR Tests: Tests for MW-362 RESET MASTER initializes GTID sequence only in master node --- mysql-test/suite/galera/r/MW-362.result | 13 +++++++++ ...alera_as_slave_gtid_replicate_do_db.result | 4 +++ ...ra_as_slave_gtid_replicate_do_db_cc.result | 4 +++ mysql-test/suite/galera/t/MW-362-master.opt | 2 ++ mysql-test/suite/galera/t/MW-362.test | 28 +++++++++++++++++++ .../galera_as_slave_gtid_replicate_do_db.test | 5 ++++ ...lera_as_slave_gtid_replicate_do_db_cc.test | 4 +++ 7 files changed, 60 insertions(+) create mode 100644 mysql-test/suite/galera/r/MW-362.result create mode 100644 mysql-test/suite/galera/t/MW-362-master.opt create mode 100644 mysql-test/suite/galera/t/MW-362.test diff --git a/mysql-test/suite/galera/r/MW-362.result b/mysql-test/suite/galera/r/MW-362.result new file mode 100644 index 000000000000..13552f60a712 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-362.result @@ -0,0 +1,13 @@ +RESET MASTER; +ERROR 42000: RESET MASTER not allowed when node is in cluster +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +DROP TABLE t1; +SET GLOBAL WSREP_ON=OFF; +RESET MASTER; +SET GLOBAL WSREP_ON=ON; +SHOW BINARY LOGS; +Log_name File_size +mysqld-bin.000001 151 +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; +Log_name Pos Event_type Server_id End_log_pos Info +mysqld-bin.000001 120 Previous_gtids 1 151 diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result index 27bebf2ff6ec..b148128935cc 100644 --- a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result +++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db.result @@ -1,6 +1,10 @@ RESET MASTER; +SET GLOBAL wsrep_on=OFF; RESET MASTER; +SET GLOBAL wsrep_on=ON; +SET GLOBAL wsrep_on=OFF; RESET MASTER; +SET GLOBAL wsrep_on=ON; START SLAVE USER='root'; Warnings: Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result index c968312b1848..8b0e23fcafdd 100644 --- a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result +++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result @@ -1,6 +1,10 @@ RESET MASTER; +SET GLOBAL wsrep_on=OFF; RESET MASTER; +SET GLOBAL wsrep_on=ON; +SET GLOBAL wsrep_on=OFF; RESET MASTER; +SET GLOBAL wsrep_on=ON; START SLAVE USER='root'; Warnings: Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. diff --git a/mysql-test/suite/galera/t/MW-362-master.opt b/mysql-test/suite/galera/t/MW-362-master.opt new file mode 100644 index 000000000000..6cfaed135e44 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-362-master.opt @@ -0,0 +1,2 @@ +--gtid-mode=ON --log-bin --log-slave-updates --enforce-gtid-consistency + diff --git a/mysql-test/suite/galera/t/MW-362.test b/mysql-test/suite/galera/t/MW-362.test new file mode 100644 index 000000000000..d758b4ffbd48 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-362.test @@ -0,0 +1,28 @@ +# +# MW-362 RESET MASTER initializes GTID sequence only in master node +# + +--source include/galera_cluster.inc +--source include/have_binlog_format_row.inc + +# Running RESET MASTER on a live cluster results in an error + +--error 1148 +RESET MASTER; + +# But is allowed if WSREP_ON=OFF; + +# Put some events in binary log +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +DROP TABLE t1; + +SET GLOBAL WSREP_ON=OFF; +--error 0 +RESET MASTER; +SET GLOBAL WSREP_ON=ON; + +# The CREATE above is no longer in the binlog + +SHOW BINARY LOGS; +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; + diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test index 5f3fbd5e6bbd..a176bd75bb1e 100644 --- a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test +++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db.test @@ -14,10 +14,15 @@ RESET MASTER; --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 --connection node_3 +SET GLOBAL wsrep_on=OFF; RESET MASTER; +SET GLOBAL wsrep_on=ON; --connection node_2 +SET GLOBAL wsrep_on=OFF; RESET MASTER; +SET GLOBAL wsrep_on=ON; + --disable_query_log --eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1; --enable_query_log diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test index 0324c8d5ec23..b85464ccdf03 100644 --- a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test +++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test @@ -16,10 +16,14 @@ RESET MASTER; --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 --connection node_3 +SET GLOBAL wsrep_on=OFF; RESET MASTER; +SET GLOBAL wsrep_on=ON; --connection node_2 +SET GLOBAL wsrep_on=OFF; RESET MASTER; +SET GLOBAL wsrep_on=ON; --connection node_2 --disable_query_log From 5812afa454ecca121ede72056f2bcf0ec0e8fbae Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Wed, 8 Mar 2017 01:35:05 -0800 Subject: [PATCH 143/305] Galera MTR Tests: Stability fixes --- mysql-test/suite/galera/t/GAL-401.test | 2 ++ mysql-test/suite/galera/t/lp1376747-4.test | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/galera/t/GAL-401.test b/mysql-test/suite/galera/t/GAL-401.test index 4b7ec95eb680..ca95dca809c7 100644 --- a/mysql-test/suite/galera/t/GAL-401.test +++ b/mysql-test/suite/galera/t/GAL-401.test @@ -31,6 +31,8 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0'; --source include/wait_condition.inc --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --source include/wait_condition.inc +--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; +--source include/wait_condition.inc # Must return 0: SHOW STATUS LIKE 'wsrep_desync_count'; diff --git a/mysql-test/suite/galera/t/lp1376747-4.test b/mysql-test/suite/galera/t/lp1376747-4.test index be56ee5edc1a..0c707d6d681d 100644 --- a/mysql-test/suite/galera/t/lp1376747-4.test +++ b/mysql-test/suite/galera/t/lp1376747-4.test @@ -45,7 +45,7 @@ SHOW CREATE TABLE t1; --connection node_2a --reap UNLOCK TABLES; ---sleep 1 +--sleep 2 SHOW CREATE TABLE t1; SELECT * from t1; From edac4c03c7e6ec13d18cdeb6ffda84a7368e12e3 Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Fri, 3 Mar 2017 20:28:27 +0000 Subject: [PATCH 144/305] MW-366 Improved support for IPv6 networks - made mysqld and SST scripts to recognize []-escaped IPv6 addresses - pulled in latest Percona and MariaDB updates to SST scripts - instruct netcat and socat in wsrep_sst_xtrabackup-v2 to listen on IPv6 socket via sockopt parameter in the [sst] section of my.cnf In summary, wsrep_node_address and wsrep_sst_receive_address can now be set to IPv6 addresses escaped by []. Rsync SST works out ouf the box thanks to rsync daemon listening on both IPv4 and IPv6 sockets by default. For xtrabackup SST onver IPv6 one needs to set sockopt in the [sst] section of joiner's configuration file to ",pf=ip6" if using socat as a streamer or to "-6" if using netcat. --- scripts/wsrep_sst_common.sh | 57 +++++ scripts/wsrep_sst_mysqldump.sh | 5 +- scripts/wsrep_sst_rsync.sh | 37 +-- scripts/wsrep_sst_xtrabackup-v2.sh | 386 ++++++++++++++++++++++------- sql/wsrep_mysqld.cc | 22 +- sql/wsrep_sst.cc | 39 +-- sql/wsrep_utils.cc | 15 ++ sql/wsrep_utils.h | 3 + 8 files changed, 408 insertions(+), 156 deletions(-) diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 25ec0baae803..6906bcbc3154 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -30,6 +30,22 @@ while [ $# -gt 0 ]; do case "$1" in '--address') readonly WSREP_SST_OPT_ADDR="$2" + # + # Break address string into host:port/path parts + # + if echo $WSREP_SST_OPT_ADDR | grep -qe '^\[.*\]' + then + # IPv6 notation + readonly WSREP_SST_OPT_HOST=${WSREP_SST_OPT_ADDR/\]*/\]} + readonly WSREP_SST_OPT_HOST_UNESCAPED=$(echo $WSREP_SST_OPT_HOST | \ + cut -d '[' -f 2 | cut -d ']' -f 1) + else + # "traditional" notation + readonly WSREP_SST_OPT_HOST=${WSREP_SST_OPT_ADDR%%[:/]*} + fi + readonly WSREP_SST_OPT_PORT=$(echo $WSREP_SST_OPT_ADDR | \ + cut -d ']' -f 2 | cut -s -d ':' -f 2 | cut -d '/' -f 1) + readonly WSREP_SST_OPT_PATH=${WSREP_SST_OPT_ADDR#*/} shift ;; '--bypass') @@ -169,6 +185,11 @@ wsrep_log_error() wsrep_log "[ERROR] $*" } +wsrep_log_warning() +{ + wsrep_log "[WARNING] $*" +} + wsrep_log_info() { wsrep_log "[INFO] $*" @@ -202,3 +223,39 @@ wsrep_check_programs() return $ret } + +# +# user can specify xtrabackup specific settings that will be used during sst +# process like encryption, etc..... +# parse such configuration option. (group for xb settings is [sst] in my.cnf +# +# 1st param: group : name of the config file section, e.g. mysqld +# 2nd param: var : name of the variable in the section, e.g. server-id +# 3rd param: - : default value for the param +parse_cnf() +{ + local group=$1 + local var=$2 + local reval="" + + # print the default settings for given group using my_print_default. + # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) + # then grep for needed variable + # finally get the variable value (if variables has been specified multiple time use the last value only) + + # look in group+suffix + if [[ -n $WSREP_SST_OPT_CONF_SUFFIX ]]; then + reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF "${group}${WSREP_SST_OPT_CONF_SUFFIX}" | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) + fi + + # look in group + if [[ -z $reval ]]; then + reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) + fi + + # use default if we haven't found a value + if [[ -z $reval ]]; then + [[ -n $3 ]] && reval=$3 + fi + echo $reval +} diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh index af3950d4080f..733ea1a31815 100644 --- a/scripts/wsrep_sst_mysqldump.sh +++ b/scripts/wsrep_sst_mysqldump.sh @@ -27,6 +27,7 @@ local_ip() [ "$1" = "127.0.0.1" ] && return 0 [ "$1" = "localhost" ] && return 0 + [ "$1" = "[::1]" ] && return 0 [ "$1" = "$(hostname -s)" ] && return 0 [ "$1" = "$(hostname -f)" ] && return 0 [ "$1" = "$(hostname -d)" ] && return 0 @@ -104,8 +105,8 @@ DROP PREPARE stmt;" SET_START_POSITION="SET GLOBAL wsrep_start_position='$WSREP_SST_OPT_GTID';" MYSQL="$MYSQL_CLIENT --defaults-extra-file=$WSREP_SST_OPT_CONF "\ -"$AUTH -h$WSREP_SST_OPT_HOST -P$WSREP_SST_OPT_PORT "\ -"--disable-reconnect --connect_timeout=10" +"$AUTH -h${WSREP_SST_OPT_HOST_UNESCAPED:-$WSREP_SST_OPT_HOST} "\ +"-P$WSREP_SST_OPT_PORT --disable-reconnect --connect_timeout=10" # need to disable logging when loading the dump # reason is that dump contains ALTER TABLE for log tables, and diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index d6dd04f7af7b..cfff524c8fdc 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -57,6 +57,11 @@ check_pid_and_port() local rsync_pid=$2 local rsync_port=$3 + if ! which lsof > /dev/null; then + wsrep_log_error "lsof tool not found in PATH! Make sure you have it installed." + exit 2 # ENOENT + fi + local port_info=$(lsof -i :$rsync_port -Pn 2>/dev/null | \ grep "(LISTEN)") local is_rsync=$(echo $port_info | \ @@ -87,10 +92,13 @@ fi WSREP_LOG_DIR=${WSREP_LOG_DIR:-""} # if WSREP_LOG_DIR env. variable is not set, try to get it from my.cnf if [ -z "$WSREP_LOG_DIR" ]; then - WSREP_LOG_DIR=$($MY_PRINT_DEFAULTS --defaults-file \ - "$WSREP_SST_OPT_CONF" mysqld server mysqld-5.6 \ - | grep -- '--innodb[-_]log[-_]group[-_]home[-_]dir=' \ - | cut -b 29- ) + WSREP_LOG_DIR=$(parse_cnf mysqld-5.6 innodb_log_group_home_dir "") +fi +if [ -z "$WSREP_LOG_DIR" ]; then + WSREP_LOG_DIR=$(parse_cnf mysqld innodb_log_group_home_dir "") +fi +if [ -z "$WSREP_LOG_DIR" ]; then + WSREP_LOG_DIR=$(parse_cnf server innodb_log_group_home_dir "") fi if [ -n "$WSREP_LOG_DIR" ]; then @@ -198,7 +206,8 @@ then [ "$OS" == "Linux" ] && count=$(grep -c processor /proc/cpuinfo) [ "$OS" == "Darwin" -o "$OS" == "FreeBSD" ] && count=$(sysctl -n hw.ncpu) - find . -maxdepth 1 -mindepth 1 -type d -print0 | xargs -I{} -0 -P $count \ + find . -maxdepth 1 -mindepth 1 -type d -not -name "lost+found" \ + -print0 | xargs -I{} -0 -P $count \ rsync --owner --group --perms --links --specials \ --ignore-times --inplace --recursive --delete --quiet \ $WHOLE_FILE_OPT --exclude '*/ib_logfile*' "$WSREP_SST_OPT_DATA"/{}/ \ @@ -241,25 +250,24 @@ then fi rm -rf "$RSYNC_PID" - ADDR=$WSREP_SST_OPT_ADDR - RSYNC_PORT=$(echo $ADDR | awk -F ':' '{ print $2 }') - if [ -z "$RSYNC_PORT" ] - then - RSYNC_PORT=4444 - ADDR="$(echo $ADDR | awk -F ':' '{ print $1 }'):$RSYNC_PORT" - fi - trap "exit 32" HUP PIPE trap "exit 3" INT TERM ABRT trap cleanup_joiner EXIT RSYNC_CONF="$WSREP_SST_OPT_DATA/$MODULE.conf" + if [ -n "${MYSQL_TMP_DIR:-}" ] ; then + SILENT="log file = $MYSQL_TMP_DIR/rsyncd.log" + else + SILENT="" + fi + cat << EOF > "$RSYNC_CONF" pid file = $RSYNC_PID use chroot = no read only = no timeout = 300 +$SILENT [$MODULE] path = $WSREP_SST_OPT_DATA [$MODULE-log_dir] @@ -269,6 +277,7 @@ EOF # rm -rf "$DATA"/ib_logfile* # we don't want old logs around # listen at all interfaces (for firewalled setups) + readonly RSYNC_PORT=${WSREP_SST_OPT_PORT:-4444} rsync --daemon --no-detach --port $RSYNC_PORT --config "$RSYNC_CONF" & RSYNC_REAL_PID=$! @@ -277,7 +286,7 @@ EOF sleep 0.2 done - echo "ready $ADDR/$MODULE" + echo "ready $WSREP_SST_OPT_HOST:$RSYNC_PORT/$MODULE" # wait for SST to complete by monitoring magic file while [ ! -r "$MAGIC_FILE" ] && check_pid "$RSYNC_PID" && \ diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index 079ef8b15811..62284d1de8c3 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -34,8 +34,8 @@ ssystag="" XTRABACKUP_PID="" SST_PORT="" REMOTEIP="" +tca="" tcert="" -tpem="" tkey="" sockopt="" progress="" @@ -47,7 +47,6 @@ rlimit="" # Initially stagemsg="${WSREP_SST_OPT_ROLE}" cpat="" -speciald=1 ib_home_dir="" ib_log_dir="" ib_undo_dir="" @@ -71,6 +70,11 @@ xtmpdir="" scomp="" sdecomp="" +ssl_dhparams="" + +ssl_cert="" +ssl_ca="" +ssl_key="" # Required for backup locks # For backup locks it is 1 sent by joiner @@ -150,6 +154,10 @@ get_keys() if [[ -z $ekey ]];then ecmd="xbcrypt --encrypt-algo=$ealgo --encrypt-key-file=$ekeyfile" else + wsrep_log_warning "Using the 'encrypt-key' option causes the encryption key" + wsrep_log_warning "to be set via the command-line and is considered insecure." + wsrep_log_warning "It is recommended to use the 'encrypt-key-file' option instead." + ecmd="xbcrypt --encrypt-algo=$ealgo --encrypt-key=$ekey" fi @@ -160,6 +168,86 @@ get_keys() stagemsg+="-XB-Encrypted" } +# +# If the ssl_dhparams variable is already set, uses that as a source +# of dh parameters for OpenSSL. Otherwise, looks for dhparams.pem in the +# datadir, and creates it there if it can't find the file. +# No input parameters +# +check_for_dhparams() +{ + if [[ -z "$ssl_dhparams" ]]; then + if ! [[ -r "$DATA/dhparams.pem" ]]; then + wsrep_check_programs openssl + wsrep_log_info "Could not find dhparams file, creating $DATA/dhparams.pem" + + if ! openssl dhparam -out "$DATA/dhparams.pem" 2048 >/dev/null 2>&1 + then + wsrep_log_error "******** FATAL ERROR ********************************* " + wsrep_log_error "* Could not create the dhparams.pem file with OpenSSL. " + wsrep_log_error "****************************************************** " + exit 22 + fi + fi + ssl_dhparams="$DATA/dhparams.pem" + fi +} + +# +# verifies that the certificate matches the private key +# doing this will save us having to wait for a timeout that would +# otherwise occur. +# +# 1st param: path to the cert +# 2nd param: path to the private key +# +verify_cert_matches_key() +{ + local cert_path=$1 + local key_path=$2 + + wsrep_check_programs openssl diff + + # generate the public key from the cert and the key + # they should match (otherwise we can't create an SSL connection) + if ! diff <(openssl x509 -in "$cert_path" -pubkey -noout) <(openssl rsa -in "$key_path" -pubout 2>/dev/null) >/dev/null 2>&1 + then + wsrep_log_error "******** FATAL ERROR ************************* " + wsrep_log_error "* The certifcate and private key do not match. " + wsrep_log_error "* Please check your certificate and key files. " + wsrep_log_error "********************************************** " + exit 22 + fi +} + +# Checks to see if the file exists +# If the file does not exist (or cannot be read), issues an error +# and exits +# +# 1st param: file name to be checked (for read access) +# 2nd param: 1st error message (header) +# 3rd param: 2nd error message (footer, optional) +# +verify_file_exists() +{ + local file_path=$1 + local error_message1=$2 + local error_message2=$3 + + if ! [[ -r "$file_path" ]]; then + wsrep_log_error "******** FATAL ERROR ************************* " + wsrep_log_error "* $error_message1 " + wsrep_log_error "* Could not find/access : $file_path " + + if ! [[ -z "$error_message2" ]]; then + wsrep_log_error "* $error_message2 " + fi + + wsrep_log_error "********************************************** " + exit 22 + fi +} + get_transfer() { if [[ -z $SST_PORT ]];then @@ -173,15 +261,25 @@ get_transfer() wsrep_log_error "nc(netcat) not found in path: $PATH" exit 2 fi + + if [[ $encrypt -eq 2 || $encrypt -eq 3 || $encrypt -eq 4 ]]; then + wsrep_log_error "******** FATAL ERROR *********************** " + wsrep_log_error "* Using SSL encryption (encrypt= 2, 3, or 4) " + wsrep_log_error "* is not supported when using nc(netcat). " + wsrep_log_error "******************************************** " + exit 22 + fi + wsrep_log_info "Using netcat as streamer" if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then - if nc -h | grep -q ncat;then - tcmd="nc -l ${TSST_PORT}" + if nc -h 2>&1 | grep -q ncat; then + tcmd="nc $sockopt -l ${TSST_PORT}" else - tcmd="nc -dl ${TSST_PORT}" + tcmd="nc $sockopt -dl ${TSST_PORT}" fi else - tcmd="nc ${REMOTEIP} ${TSST_PORT}" + # netcat doesn't understand [] around IPv6 address + tcmd="nc ${REMOTEIP//[\[\]]/} ${TSST_PORT}" fi else tfmt='socat' @@ -191,64 +289,111 @@ get_transfer() exit 2 fi - if [[ $encrypt -eq 2 || $encrypt -eq 3 ]] && ! socat -V | grep -q WITH_OPENSSL;then - wsrep_log_info "NOTE: socat is not openssl enabled, falling back to plain transfer" - encrypt=-1 - fi + donor_extra="" + joiner_extra="" + if [[ $encrypt -eq 2 || $encrypt -eq 3 || $encrypt -eq 4 ]]; then + if ! socat -V | grep -q WITH_OPENSSL; then + wsrep_log_error "******** FATAL ERROR ****************** " + wsrep_log_error "* socat is not openssl enabled. " + wsrep_log_error "* Unable to encrypt SST communications. " + wsrep_log_error "*************************************** " + exit 2 + fi - if [[ $encrypt -eq 2 ]];then - wsrep_log_info "Using openssl based encryption with socat: with crt and pem" - if [[ -z $tpem || -z $tcert ]];then - wsrep_log_error "Both PEM and CRT files required" - exit 22 + # Determine the socat version + SOCAT_VERSION=`socat -V 2>&1 | grep -oe '[0-9]\.[0-9][\.0-9]*' | head -n1` + if [[ -z "$SOCAT_VERSION" ]]; then + wsrep_log_error "******** FATAL ERROR **************** " + wsrep_log_error "* Cannot determine the socat version. " + wsrep_log_error "************************************* " + exit 2 + fi + + # socat versions < 1.7.3 will have 512-bit dhparams (too small) + # so create 2048-bit dhparams and send that as a parameter + # socat version >= 1.7.3, checks to see if the peername matches the hostname + # set commonname="" to disable the peername checks + # + if ! check_for_version "$SOCAT_VERSION" "1.7.3"; then + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]]; then + # dhparams check (will create ssl_dhparams if needed) + check_for_dhparams + joiner_extra=",dhparam=$ssl_dhparams" + fi fi + if check_for_version "$SOCAT_VERSION" "1.7.3"; then + donor_extra=',commonname=""' + fi + fi + + if [[ $encrypt -eq 2 ]]; then + wsrep_log_warning "**** WARNING **** encrypt=2 is deprecated and will be removed in a future release" + wsrep_log_info "Using openssl based encryption with socat: with crt and ca" + + verify_file_exists "$tcert" "Both certificate and CA files are required." \ + "Please check the 'tcert' option. " + verify_file_exists "$tca" "Both certificate and CA files are required." \ + "Please check the 'tca' option. " + stagemsg+="-OpenSSL-Encrypted-2" if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then - wsrep_log_info "Decrypting with PEM $tpem, CA: $tcert" - tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=$tpem,cafile=${tcert}${sockopt} stdio" + wsrep_log_info "Decrypting with CERT: $tcert, CA: $tca" + tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=${tcert},cafile=${tca}${joiner_extra}${sockopt} stdio" else - wsrep_log_info "Encrypting with PEM $tpem, CA: $tcert" - tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=$tpem,cafile=${tcert}${sockopt}" + wsrep_log_info "Encrypting with CERT: $tcert, CA: $tca" + tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=${tcert},cafile=${tca}${donor_extra}${sockopt}" fi elif [[ $encrypt -eq 3 ]];then + wsrep_log_warning "**** WARNING **** encrypt=3 is deprecated and will be removed in a future release" wsrep_log_info "Using openssl based encryption with socat: with key and crt" - if [[ -z $tpem || -z $tkey ]];then - wsrep_log_error "Both certificate and key files required" - exit 22 - fi + + verify_file_exists "$tcert" "Both certificate and key files are required." \ + "Please check the 'tcert' option. " + verify_file_exists "$tkey" "Both certificate and key files are required." \ + "Please check the 'tkey' option. " + stagemsg+="-OpenSSL-Encrypted-3" if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then - wsrep_log_info "Decrypting with certificate $tpem, key $tkey" - tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=$tpem,key=${tkey},verify=0${sockopt} stdio" + wsrep_log_info "Decrypting with CERT: $tcert, KEY: $tkey" + tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=${tcert},key=${tkey},verify=0${joiner_extra}${sockopt} stdio" + else + wsrep_log_info "Encrypting with CERT: $tcert, KEY: $tkey" + tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=${tcert},key=${tkey},verify=0${sockopt}" + fi + elif [[ $encrypt -eq 4 ]]; then + wsrep_log_info "Using openssl based encryption with socat: with key, crt, and ca" + + verify_file_exists "$ssl_ca" "CA, certificate, and key files are required." \ + "Please check the 'ssl-ca' option. " + verify_file_exists "$ssl_cert" "CA, certificate, and key files are required." \ + "Please check the 'ssl-cert' option. " + verify_file_exists "$ssl_key" "CA, certificate, and key files are required." \ + "Please check the 'ssl-key' option. " + + # Check to see that the key matches the cert + verify_cert_matches_key $ssl_cert $ssl_key + + stagemsg+="-OpenSSL-Encrypted-4" + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]]; then + wsrep_log_info "Decrypting with CERT: $ssl_cert, KEY: $ssl_key, CA: $ssl_ca" + tcmd="socat -u openssl-listen:${TSST_PORT},reuseaddr,cert=${ssl_cert},key=${ssl_key},cafile=${ssl_ca},verify=1${joiner_extra}${sockopt} stdio" else - wsrep_log_info "Encrypting with certificate $tpem, key $tkey" - tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=$tpem,key=${tkey},verify=0${sockopt}" + wsrep_log_info "Encrypting with CERT: $ssl_cert, KEY: $ssl_key, CA: $ssl_ca" + tcmd="socat -u stdio openssl-connect:${REMOTEIP}:${TSST_PORT},cert=${ssl_cert},key=${ssl_key},cafile=${ssl_ca},verify=1${donor_extra}${sockopt}" fi - else - if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then + else + if [[ $encrypt -eq 1 ]]; then + wsrep_log_warning "**** WARNING **** encrypt=1 is deprecated and will be removed in a future release" + fi + + if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]]; then tcmd="socat -u TCP-LISTEN:${TSST_PORT},reuseaddr${sockopt} stdio" else tcmd="socat -u stdio TCP:${REMOTEIP}:${TSST_PORT}${sockopt}" fi fi fi - -} - -parse_cnf() -{ - local group=$1 - local var=$2 - # print the default settings for given group using my_print_default. - # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin) - # then grep for needed variable - # finally get the variable value (if variables has been specified multiple time use the last value only) - reval=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1) - if [[ -z $reval ]];then - [[ -n $3 ]] && reval=$3 - fi - echo $reval } get_footprint() @@ -298,15 +443,15 @@ read_cnf() { sfmt=$(parse_cnf sst streamfmt "xbstream") tfmt=$(parse_cnf sst transferfmt "socat") - tcert=$(parse_cnf sst tca "") - tpem=$(parse_cnf sst tcert "") + tca=$(parse_cnf sst tca "") + tcert=$(parse_cnf sst tcert "") tkey=$(parse_cnf sst tkey "") encrypt=$(parse_cnf sst encrypt 0) sockopt=$(parse_cnf sst sockopt "") progress=$(parse_cnf sst progress "") rebuild=$(parse_cnf sst rebuild 0) ttime=$(parse_cnf sst time 0) - cpat=$(parse_cnf sst cpat '.*galera\.cache$\|.*sst_in_progress$\|.*\.sst$\|.*gvwstate\.dat$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$') + cpat=$(parse_cnf sst cpat '.*\.pem$\|.*init\.ok$\|.*galera\.cache$\|.*sst_in_progress$\|.*\.sst$\|.*gvwstate\.dat$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$') ealgo=$(parse_cnf xtrabackup encrypt "") ekey=$(parse_cnf xtrabackup encrypt-key "") ekeyfile=$(parse_cnf xtrabackup encrypt-key-file "") @@ -320,9 +465,23 @@ read_cnf() ekey=$(parse_cnf sst encrypt-key "") ekeyfile=$(parse_cnf sst encrypt-key-file "") fi + + # Pull the parameters needed for encrypt=4 + ssl_ca=$(parse_cnf sst ssl-ca "") + if [[ -z "$ssl_ca" ]]; then + ssl_ca=$(parse_cnf mysqld ssl-ca "") + fi + ssl_cert=$(parse_cnf sst ssl-cert "") + if [[ -z "$ssl_cert" ]]; then + ssl_cert=$(parse_cnf mysqld ssl-cert "") + fi + ssl_key=$(parse_cnf sst ssl-key "") + if [[ -z "$ssl_key" ]]; then + ssl_key=$(parse_cnf mysqld ssl-key "") + fi + rlimit=$(parse_cnf sst rlimit "") uextra=$(parse_cnf sst use-extra 0) - speciald=$(parse_cnf sst sst-special-dirs 1) iopts=$(parse_cnf sst inno-backup-opts "") iapts=$(parse_cnf sst inno-apply-opts "") impts=$(parse_cnf sst inno-move-opts "") @@ -331,13 +490,8 @@ read_cnf() ssystag=$(parse_cnf mysqld_safe syslog-tag "${SST_SYSLOG_TAG:-}") ssystag+="-" - if [[ $speciald -eq 0 ]];then - wsrep_log_error "sst-special-dirs equal to 0 is not supported, falling back to 1" - speciald=1 - fi - if [[ $ssyslog -ne -1 ]];then - if my_print_defaults -c $WSREP_SST_OPT_CONF mysqld_safe | tr '_' '-' | grep -q -- "--syslog";then + if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF mysqld_safe | tr '_' '-' | grep -q -- "--syslog";then ssyslog=1 fi fi @@ -483,28 +637,30 @@ kill_xtrabackup() setup_ports() { if [[ "$WSREP_SST_OPT_ROLE" == "donor" ]];then - SST_PORT=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $2 }') - REMOTEIP=$(echo $WSREP_SST_OPT_ADDR | awk -F ':' '{ print $1 }') - lsn=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $4 }') - sst_ver=$(echo $WSREP_SST_OPT_ADDR | awk -F '[:/]' '{ print $5 }') + SST_PORT=$WSREP_SST_OPT_PORT + REMOTEIP=$WSREP_SST_OPT_HOST + lsn=$(echo $WSREP_SST_OPT_PATH | awk -F '[/]' '{ print $2 }') + sst_ver=$(echo $WSREP_SST_OPT_PATH | awk -F '[/]' '{ print $3 }') else - SST_PORT=$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $2 }') + SST_PORT=$WSREP_SST_OPT_PORT fi } -# waits ~10 seconds for nc to open the port and then reports ready +# waits ~1 minute for nc/socat to open the port and then reports ready # (regardless of timeout) wait_for_listen() { - local PORT=$1 - local ADDR=$2 + local HOST=$1 + local PORT=$2 local MODULE=$3 - for i in {1..50} + + for i in {1..300} do ss -p state listening "( sport = :$PORT )" | grep -qE 'socat|nc' && break sleep 0.2 done - echo "ready ${ADDR}/${MODULE}//$sst_ver" + + echo "ready ${HOST}:${PORT}/${MODULE}//$sst_ver" } check_extra() @@ -512,7 +668,7 @@ check_extra() local use_socket=1 if [[ $uextra -eq 1 ]];then if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--thread-handling=" | grep -q 'pool-of-threads';then - local eport=$(my_print_defaults -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--extra-port=" | cut -d= -f2) + local eport=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF mysqld | tr '_' '-' | grep -- "--extra-port=" | cut -d= -f2) if [[ -n $eport ]];then # Xtrabackup works only locally. # Hence, setting host to 127.0.0.1 unconditionally. @@ -607,11 +763,64 @@ send_donor() } +# Returns the version string in a standardized format +# Input "1.2.3" => echoes "010203" +# Wrongly formatted values => echoes "000000" +normalize_version() +{ + local major=0 + local minor=0 + local patch=0 + + # Only parses purely numeric version numbers, 1.2.3 + # Everything after the first three values are ignored + if [[ $1 =~ ^([0-9]+)\.([0-9]+)\.?([0-9]*)([\.0-9])*$ ]]; then + major=${BASH_REMATCH[1]} + minor=${BASH_REMATCH[2]} + patch=${BASH_REMATCH[3]} + fi + + printf %02d%02d%02d $major $minor $patch +} + +# Compares two version strings +# The first parameter is the version to be checked +# The second parameter is the minimum version required +# Returns 1 (failure) if $1 >= $2, 0 (success) otherwise +check_for_version() +{ + local local_version_str="$( normalize_version $1 )" + local required_version_str="$( normalize_version $2 )" + + if [[ "$local_version_str" < "$required_version_str" ]]; then + return 1 + else + return 0 + fi +} + + if [[ ! -x `which $INNOBACKUPEX_BIN` ]];then wsrep_log_error "innobackupex not in path: $PATH" exit 2 fi +# check the version, we require XB-2.4 to ensure that we can pass the +# datadir via the command-line option +XB_REQUIRED_VERSION="2.3.5" + +XB_VERSION=`$INNOBACKUPEX_BIN --version 2>&1 | grep -oe '[0-9]\.[0-9][\.0-9]*' | head -n1` +if [[ -z $XB_VERSION ]]; then + wsrep_log_error "FATAL: Cannot determine the $INNOBACKUPEX_BIN version. Needs xtrabackup-$XB_REQUIRED_VERSION or higher to perform SST" + exit 2 +fi + +if ! check_for_version $XB_VERSION $XB_REQUIRED_VERSION; then + wsrep_log_error "FATAL: The $INNOBACKUPEX_BIN version is $XB_VERSION. Needs xtrabackup-$XB_REQUIRED_VERSION or higher to perform SST" + exit 2 +fi + + rm -f "${MAGIC_FILE}" if [[ ! ${WSREP_SST_OPT_ROLE} == 'joiner' && ! ${WSREP_SST_OPT_ROLE} == 'donor' ]];then @@ -655,13 +864,13 @@ if [[ $ssyslog -eq 1 ]];then } INNOAPPLY="${INNOBACKUPEX_BIN} $disver $iapts --apply-log \$rebuildcmd \${DATA} 2>&1 | logger -p daemon.err -t ${ssystag}innobackupex-apply " - INNOMOVE="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $impts --move-back --force-non-empty-directories \${DATA} 2>&1 | logger -p daemon.err -t ${ssystag}innobackupex-move " + INNOMOVE="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $impts --datadir=${DATA} --move-back --force-non-empty-directories \${DATA} 2>&1 | logger -p daemon.err -t ${ssystag}innobackupex-move " INNOBACKUP="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2> >(logger -p daemon.err -t ${ssystag}innobackupex-backup)" fi else INNOAPPLY="${INNOBACKUPEX_BIN} $disver $iapts --apply-log \$rebuildcmd \${DATA} &>\${DATA}/innobackup.prepare.log" - INNOMOVE="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} --defaults-group=mysqld${WSREP_SST_OPT_CONF_SUFFIX} $disver $impts --move-back --force-non-empty-directories \${DATA} &>\${DATA}/innobackup.move.log" + INNOMOVE="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} --defaults-group=mysqld${WSREP_SST_OPT_CONF_SUFFIX} $disver $impts --datadir=${DATA} --move-back --force-non-empty-directories \${DATA} &>\${DATA}/innobackup.move.log" INNOBACKUP="${INNOBACKUPEX_BIN} --defaults-file=${WSREP_SST_OPT_CONF} --defaults-group=mysqld${WSREP_SST_OPT_CONF_SUFFIX} $disver $iopts \$tmpopts \$INNOEXTRA --galera-info --stream=\$sfmt \$itmpdir 2>\${DATA}/innobackup.backup.log" fi @@ -703,15 +912,6 @@ then fi get_keys - if [[ $encrypt -eq 1 ]];then - if [[ -n $ekey ]];then - INNOEXTRA+=" --encrypt=$ealgo --encrypt-key=$ekey " - else - INNOEXTRA+=" --encrypt=$ealgo --encrypt-key-file=$ekeyfile " - fi - fi - - check_extra wsrep_log_info "Streaming GTID file before SST" @@ -722,17 +922,17 @@ then if [[ $encrypt -eq 1 ]];then if [[ -n $scomp ]];then - tcmd=" $ecmd | $scomp | $tcmd " + tcmd=" \$ecmd | $scomp | $tcmd " else - tcmd=" $ecmd | $tcmd " + tcmd=" \$ecmd | $tcmd " fi elif [[ -n $scomp ]];then tcmd=" $scomp | $tcmd " fi - send_donor $DATA "${stagemsg}-gtid" + # Restore the transport commmand to its original state tcmd="$ttcmd" if [[ -n $progress ]];then get_footprint @@ -747,10 +947,16 @@ then wsrep_log_info "Streaming the backup to joiner at ${REMOTEIP} ${SST_PORT:-4444}" - if [[ -n $scomp ]];then + # Add compression to the head of the stream (if specified) + if [[ -n $scomp ]]; then tcmd="$scomp | $tcmd" fi + # Add encryption to the head of the stream (if specified) + if [[ $encrypt -eq 1 ]]; then + tcmd=" \$ecmd | $tcmd " + fi + set +e timeit "${stagemsg}-SST" "$INNOBACKUP | $tcmd; RC=( "\${PIPESTATUS[@]}" )" set -e @@ -777,9 +983,9 @@ then get_keys if [[ $encrypt -eq 1 ]];then if [[ -n $scomp ]];then - tcmd=" $ecmd | $scomp | $tcmd " + tcmd=" \$ecmd | $scomp | $tcmd " else - tcmd=" $ecmd | $tcmd " + tcmd=" \$ecmd | $tcmd " fi elif [[ -n $scomp ]];then tcmd=" $scomp | $tcmd " @@ -804,7 +1010,6 @@ then stagemsg="Joiner-Recv" - sencrypted=1 nthreads=1 @@ -815,14 +1020,7 @@ then # May need xtrabackup_checkpoints later on rm -f ${DATA}/xtrabackup_binary ${DATA}/xtrabackup_galera_info ${DATA}/xtrabackup_logfile - ADDR=${WSREP_SST_OPT_ADDR} - if [ -z "${SST_PORT}" ] - then - SST_PORT=4444 - ADDR="$(echo ${WSREP_SST_OPT_ADDR} | awk -F ':' '{ print $1 }'):${SST_PORT}" - fi - - wait_for_listen ${SST_PORT} ${ADDR} ${MODULE} & + wait_for_listen ${WSREP_SST_OPT_HOST} ${WSREP_SST_OPT_PORT:-4444} ${MODULE} & trap sig_joiner_cleanup HUP PIPE INT TERM trap cleanup_joiner EXIT @@ -835,9 +1033,9 @@ then get_keys if [[ $encrypt -eq 1 && $sencrypted -eq 1 ]];then if [[ -n $sdecomp ]];then - strmcmd=" $sdecomp | $ecmd | $strmcmd" + strmcmd=" $sdecomp | \$ecmd | $strmcmd" else - strmcmd=" $ecmd | $strmcmd" + strmcmd=" \$ecmd | $strmcmd" fi elif [[ -n $sdecomp ]];then strmcmd=" $sdecomp | $strmcmd" diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index ded6d871a8ca..156eeb567fa7 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -541,27 +541,17 @@ int wsrep_init() size_t const node_addr_len= strlen(node_addr); if (node_addr_len > 0) { - const char* const colon= strrchr(node_addr, ':'); - if (strchr(node_addr, ':') == colon) // 1 or 0 ':' + size_t const ip_len= wsrep_host_len(node_addr, node_addr_len); + if (ip_len + 7 /* :55555\0 */ < inc_addr_max) { - size_t const ip_len= colon ? colon - node_addr : node_addr_len; - if (ip_len + 7 /* :55555\0 */ < inc_addr_max) - { - memcpy (inc_addr, node_addr, ip_len); - snprintf(inc_addr + ip_len, inc_addr_max - ip_len, ":%u", - (int)mysqld_port); - } - else - { - WSREP_WARN("Guessing address for incoming client connections: " - "address too long."); - inc_addr[0]= '\0'; - } + memcpy (inc_addr, node_addr, ip_len); + snprintf(inc_addr + ip_len, inc_addr_max - ip_len, ":%u", + (int)mysqld_port); } else { WSREP_WARN("Guessing address for incoming client connections: " - "too many colons :) ."); + "address too long."); inc_addr[0]= '\0'; } } diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index 8042339ae150..345ed75407a9 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -631,18 +631,19 @@ ssize_t wsrep_sst_prepare (void** msg) // Figure out SST address. Common for all SST methods if (wsrep_sst_receive_address && - strcmp (wsrep_sst_receive_address, WSREP_SST_ADDRESS_AUTO)) + strcmp (wsrep_sst_receive_address, WSREP_SST_ADDRESS_AUTO)) { addr_in= wsrep_sst_receive_address; } else if (wsrep_node_address && strlen(wsrep_node_address)) { - const char* const colon= strchr (wsrep_node_address, ':'); - if (colon) + size_t const addr_len= strlen(wsrep_node_address); + size_t const host_len= wsrep_host_len(wsrep_node_address, addr_len); + + if (host_len < addr_len) { - ptrdiff_t const len= colon - wsrep_node_address; - strncpy (ip_buf, wsrep_node_address, len); - ip_buf[len]= '\0'; + strncpy (ip_buf, wsrep_node_address, host_len); + ip_buf[host_len]= '\0'; addr_in= ip_buf; } else @@ -769,25 +770,6 @@ static int sst_donate_mysqldump (const char* addr, bool bypass, char** env) // carries auth info { - size_t host_len; - const char* port = strchr (addr, ':'); - - if (port) - { - port += 1; - host_len = port - addr; - } - else - { - port = ""; - host_len = strlen (addr) + 1; - } - - char *host= (char*) malloc(host_len); - - strncpy (host, addr, host_len - 1); - host[host_len - 1] = '\0'; - int const cmd_len= 4096; wsp::string cmd_str(cmd_len); @@ -802,14 +784,13 @@ static int sst_donate_mysqldump (const char* addr, int ret= snprintf (cmd_str(), cmd_len, "wsrep_sst_mysqldump " - WSREP_SST_OPT_HOST" '%s' " - WSREP_SST_OPT_PORT" '%s' " + WSREP_SST_OPT_ADDR" '%s' " WSREP_SST_OPT_LPORT" '%u' " WSREP_SST_OPT_SOCKET" '%s' " WSREP_SST_OPT_CONF" '%s' " WSREP_SST_OPT_GTID" '%s:%lld'" "%s", - host, port, mysqld_port, mysqld_unix_port, + addr, mysqld_port, mysqld_unix_port, wsrep_defaults_file, uuid_str, (long long)seqno, bypass ? " " WSREP_SST_OPT_BYPASS : ""); @@ -827,8 +808,6 @@ static int sst_donate_mysqldump (const char* addr, wsrep->sst_sent (wsrep, &state_id, ret); - free(host); - return ret; } diff --git a/sql/wsrep_utils.cc b/sql/wsrep_utils.cc index 53ebb9937258..18da3dbbe02d 100644 --- a/sql/wsrep_utils.cc +++ b/sql/wsrep_utils.cc @@ -554,3 +554,18 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len) return 0; } + +/* returns the length of the host part of the address string */ +size_t wsrep_host_len(const char* const addr, size_t const addr_len) +{ + // check for IPv6 notation first + const char* const bracket= ('[' == addr[0] ? strchr(addr, ']') : NULL); + + if (bracket) { // IPv6 + return (bracket - addr + 1); + } + else { // host part ends at ':' or end of string + const char* const colon= strchr(addr, ':'); + return (colon ? colon - addr : addr_len); + } +} diff --git a/sql/wsrep_utils.h b/sql/wsrep_utils.h index 7d864603c7f1..0ae5c68df217 100644 --- a/sql/wsrep_utils.h +++ b/sql/wsrep_utils.h @@ -21,6 +21,9 @@ unsigned int wsrep_check_ip (const char* addr); size_t wsrep_guess_ip (char* buf, size_t buf_len); +/* returns the length of the host part of the address string */ +size_t wsrep_host_len(const char* addr, size_t addr_len); + namespace wsp { class node_status { From 095abde1a859fed2f9dfdf27e11953e6e64f238b Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 7 Mar 2017 23:47:22 -0800 Subject: [PATCH 145/305] Galera MTR Tests: Tests for MW-366 - improved support for IPv6 --- .../r/galera_ipv6_mysqldump.result | 26 ++++++++ .../galera_3nodes/r/galera_ipv6_rsync.result | 14 +++++ .../r/galera_ipv6_xtrabackup-v2.result | 18 ++++++ .../galera_3nodes/t/galera_ipv6_mysqldump.cnf | 22 +++++++ .../t/galera_ipv6_mysqldump.test | 56 +++++++++++++++++ .../galera_3nodes/t/galera_ipv6_rsync.cnf | 22 +++++++ .../galera_3nodes/t/galera_ipv6_rsync.test | 32 ++++++++++ .../t/galera_ipv6_xtrabackup-v2.cnf | 26 ++++++++ .../t/galera_ipv6_xtrabackup-v2.test | 62 +++++++++++++++++++ 9 files changed, 278 insertions(+) create mode 100644 mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result create mode 100644 mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result create mode 100644 mysql-test/suite/galera_3nodes/r/galera_ipv6_xtrabackup-v2.result create mode 100644 mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.cnf create mode 100644 mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test create mode 100644 mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.cnf create mode 100644 mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test create mode 100644 mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf create mode 100644 mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.test diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result new file mode 100644 index 000000000000..f519654952b9 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result @@ -0,0 +1,26 @@ +GRANT ALL PRIVILEGES ON *.* TO 'sst'; +SET GLOBAL wsrep_sst_auth = 'sst:'; +SET GLOBAL wsrep_sst_method = 'mysqldump'; +Unloading wsrep provider ... +SET GLOBAL wsrep_provider = 'none'; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +Loading wsrep provider ... +SELECT COUNT(*) = 1 FROM t1; +COUNT(*) = 1 +1 +DROP TABLE t1; +SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; +VARIABLE_VALUE LIKE '%[::1]%' +1 +CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); +DROP USER sst; +CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); +CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found"); +CALL mtr.add_suppression("InnoDB: New log files created"); +CALL mtr.add_suppression("InnoDB: Creating foreign key constraint system tables"); +CALL mtr.add_suppression("Can't open and lock time zone table"); +CALL mtr.add_suppression("Can't open and lock privilege tables"); +CALL mtr.add_suppression("Info table is not ready to be used"); +CALL mtr.add_suppression("Native table .* has the wrong structure"); +CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort"); diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result new file mode 100644 index 000000000000..a2bf5f4d98c1 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_rsync.result @@ -0,0 +1,14 @@ +SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; +VARIABLE_VALUE LIKE '%[::1]%' +1 +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +VARIABLE_VALUE = 3 +1 +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; +SELECT COUNT(*) = 1 FROM t1; +COUNT(*) = 1 +1 +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_xtrabackup-v2.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_xtrabackup-v2.result new file mode 100644 index 000000000000..53e35939a798 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_xtrabackup-v2.result @@ -0,0 +1,18 @@ +SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; +VARIABLE_VALUE LIKE '%[::1]%' +1 +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +VARIABLE_VALUE = 3 +1 +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; +SELECT COUNT(*) = 1 FROM t1; +COUNT(*) = 1 +1 +DROP TABLE t1; +include/assert_grep.inc [Streaming the backup to joiner at \[::1\]] +include/assert_grep.inc [async IST sender starting to serve tcp://\[::1\]:] +include/assert_grep.inc [IST receiver addr using tcp://\[::1\]] +include/assert_grep.inc [Prepared IST receiver, listening at: tcp://\[::1\]] diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.cnf b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.cnf new file mode 100644 index 000000000000..3728e1ce005b --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.cnf @@ -0,0 +1,22 @@ +!include ../galera_3nodes.cnf + +[mysqld] +wsrep_sst_method=rsync + +[mysqld.1] +wsrep-cluster-address=gcomm:// +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port' +wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port' +wsrep_node_incoming_address='[::1]:@mysqld.1.port' + +[mysqld.2] +wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port' +wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port' +wsrep_node_incoming_address='[::1]:@mysqld.2.port' + +[mysqld.3] +wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' +wsrep_provider_options='base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port' +wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port' +wsrep_node_incoming_address='[::1]:@mysqld.3.port' diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test new file mode 100644 index 000000000000..5b06e617eef7 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test @@ -0,0 +1,56 @@ +--source include/galera_cluster.inc +--source include/have_ipv6.inc + +--connection node_1 +GRANT ALL PRIVILEGES ON *.* TO 'sst'; + +--let $wsrep_sst_auth_orig = `SELECT @@wsrep_sst_auth` +SET GLOBAL wsrep_sst_auth = 'sst:'; + +--connection node_2 +--source include/wait_until_connected_again.inc +--let $wsrep_sst_method_orig = `SELECT @@wsrep_sst_method` +--let $wsrep_sst_receive_address_orig = `SELECT @@wsrep_sst_receive_address` + +--disable_query_log +--eval SET GLOBAL wsrep_sst_receive_address = '[::1]:$NODE_MYPORT_2'; +--enable_query_log +SET GLOBAL wsrep_sst_method = 'mysqldump'; + + +# +# Force mysqldump SST +# + +--connection node_2 +--source suite/galera/include/galera_unload_provider.inc +--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + + +--connection node_2 +--source suite/galera/include/galera_load_provider.inc + +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; +--source include/wait_condition.inc + +SELECT COUNT(*) = 1 FROM t1; + +DROP TABLE t1; + +# Confirm that initial handshake happened over ipv6 + +SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; + +--source suite/galera/include/galera_sst_restore.inc +--connection node_2 +CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort"); diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.cnf b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.cnf new file mode 100644 index 000000000000..3728e1ce005b --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.cnf @@ -0,0 +1,22 @@ +!include ../galera_3nodes.cnf + +[mysqld] +wsrep_sst_method=rsync + +[mysqld.1] +wsrep-cluster-address=gcomm:// +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port' +wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port' +wsrep_node_incoming_address='[::1]:@mysqld.1.port' + +[mysqld.2] +wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port' +wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port' +wsrep_node_incoming_address='[::1]:@mysqld.2.port' + +[mysqld.3] +wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' +wsrep_provider_options='base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port' +wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port' +wsrep_node_incoming_address='[::1]:@mysqld.3.port' diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test new file mode 100644 index 000000000000..7ee209d8e723 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_rsync.test @@ -0,0 +1,32 @@ +--source include/galera_cluster.inc +--source include/have_ipv6.inc + +# Confirm that initial handshake happened over ipv6 + +SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; + +# Force IST + +--connection node_2 +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +--connection node_2 +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; + +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; +--source include/wait_condition.inc + +SELECT COUNT(*) = 1 FROM t1; + +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf b/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf new file mode 100644 index 000000000000..8a80be0d2a90 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf @@ -0,0 +1,26 @@ +!include ../galera_3nodes.cnf + +[mysqld] +wsrep_sst_method=xtrabackup-v2 +wsrep_sst_auth="root:" + +[mysqld.1] +wsrep-cluster-address=gcomm:// +wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port' +wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port' +wsrep_node_incoming_address='[::1]:@mysqld.1.port' + +[mysqld.2] +wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' +wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port' +wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port' +wsrep_node_incoming_address='[::1]:@mysqld.2.port' + +[mysqld.3] +wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' +wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port' +wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port' +wsrep_node_incoming_address='[::1]:@mysqld.3.port' + +[SST] +sockopt=",pf=ip6" diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.test new file mode 100644 index 000000000000..84eee0177006 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.test @@ -0,0 +1,62 @@ +--source include/galera_cluster.inc +--source include/have_ipv6.inc + +# Confirm that initial handshake happened over ipv6 + +SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; + +# Force IST + +--connection node_2 +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +--connection node_2 +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; + +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; +--source include/wait_condition.inc + +SELECT COUNT(*) = 1 FROM t1; + +DROP TABLE t1; + +# Confirm that key messages around SST and IST reference IPv6 + +--connection node_1 +--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.1.err +--let $assert_only_after = CURRENT_TEST + +--let $assert_count = 2 +--let $assert_text = Streaming the backup to joiner at \[::1\] +--let $assert_select = Streaming the backup to joiner at \[::1\] +--source include/assert_grep.inc + +--let $assert_count = 1 +--let $assert_text = async IST sender starting to serve tcp://\[::1\]: +--let $assert_select = async IST sender starting to serve tcp://\[::1\]: +--source include/assert_grep.inc + +--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err + +--let $assert_text = IST receiver addr using tcp://\[::1\] +--let $assert_select = IST receiver addr using tcp://\[::1\] +--source include/assert_grep.inc + +--let $assert_text = Prepared IST receiver, listening at: tcp://\[::1\] +--let $assert_select = Prepared IST receiver, listening at: tcp://\[::1\] +--source include/assert_grep.inc + + + + From e728a133799b3079a210961ae2805a072b931698 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 8 Mar 2017 13:08:21 +0100 Subject: [PATCH 146/305] MW-86 Add separate wsrep_sync_wait bitmask value for SHOW commands Previously, setting `wsrep_sync_wait = 1` would have an effect on both SELECT and SHOW statements. This patch changes wsrep_sync_wait so that bitmask value 1 is used for SELECT statements, while bitmask value 8 is reserved for SHOW statements. It is still possible to achieve sync wait on both SELECT and SHOW statements by setting `wsrep_sync_wait = 9`. --- sql/sql_parse.cc | 84 +++++++++++----------------------------------- sql/sql_parse.h | 5 +++ sql/wsrep_mysqld.h | 5 +-- 3 files changed, 28 insertions(+), 66 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 3634646e8e07..718423b39c8d 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2981,9 +2981,7 @@ mysql_execute_command(THD *thd) { system_status_var old_status_var= thd->status_var; thd->initial_status_var= &old_status_var; -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (!(res= select_precheck(thd, lex, all_tables, first_table))) res= execute_sqlcom_select(thd, all_tables); @@ -3016,23 +3014,18 @@ mysql_execute_command(THD *thd) case SQLCOM_SHOW_PLUGINS: case SQLCOM_SHOW_FIELDS: case SQLCOM_SHOW_KEYS: -#ifndef WITH_WSREP case SQLCOM_SHOW_VARIABLES: case SQLCOM_SHOW_CHARSETS: case SQLCOM_SHOW_COLLATIONS: case SQLCOM_SHOW_STORAGE_ENGINES: case SQLCOM_SHOW_PROFILE: -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); case SQLCOM_SELECT: + { #ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; - case SQLCOM_SHOW_VARIABLES: - case SQLCOM_SHOW_CHARSETS: - case SQLCOM_SHOW_COLLATIONS: - case SQLCOM_SHOW_STORAGE_ENGINES: - case SQLCOM_SHOW_PROFILE: + if (lex->sql_command == SQLCOM_SELECT) + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ); #endif /* WITH_WSREP */ - { thd->status_var.last_query_cost= 0.0; thd->status_var.last_query_partial_plans= 0; @@ -3628,9 +3621,7 @@ case SQLCOM_PREPARE: goto error; #else { -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); /* Access check: @@ -3694,9 +3685,7 @@ case SQLCOM_PREPARE: case SQLCOM_CHECKSUM: { DBUG_ASSERT(first_table == all_tables && first_table != 0); -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ); if (check_table_access(thd, SELECT_ACL, all_tables, FALSE, UINT_MAX, FALSE)) @@ -3706,11 +3695,8 @@ case SQLCOM_PREPARE: break; } case SQLCOM_UPDATE: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE)) goto error; -#endif /* WITH_WSREP */ { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE); ha_rows found= 0, updated= 0; DBUG_ASSERT(first_table == all_tables && first_table != 0); if (update_precheck(thd, all_tables)) @@ -3749,10 +3735,7 @@ case SQLCOM_PREPARE: /* if we switched from normal update, rights are checked */ if (up_result != 2) { -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE); if ((res= multi_update_precheck(thd, all_tables))) break; } @@ -3822,10 +3805,7 @@ case SQLCOM_PREPARE: break; } case SQLCOM_REPLACE: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); #ifndef DBUG_OFF if (mysql_bin_log.is_open()) { @@ -3860,11 +3840,8 @@ case SQLCOM_PREPARE: } #endif case SQLCOM_INSERT: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE)) goto error; -#endif /* WITH_WSREP */ { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); DBUG_ASSERT(first_table == all_tables && first_table != 0); /* @@ -3909,11 +3886,8 @@ case SQLCOM_PREPARE: } case SQLCOM_REPLACE_SELECT: case SQLCOM_INSERT_SELECT: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE)) goto error; -#endif /* WITH_WSREP */ { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); select_insert *sel_result; DBUG_ASSERT(first_table == all_tables && first_table != 0); if ((res= insert_precheck(thd, all_tables))) @@ -4011,11 +3985,8 @@ case SQLCOM_PREPARE: break; } case SQLCOM_DELETE: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE)) goto error; -#endif /* WITH_WSREP */ { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE); DBUG_ASSERT(first_table == all_tables && first_table != 0); if ((res= delete_precheck(thd, all_tables))) break; @@ -4030,11 +4001,8 @@ case SQLCOM_PREPARE: break; } case SQLCOM_DELETE_MULTI: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE)) goto error; -#endif /* WITH_WSREP */ { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE); DBUG_ASSERT(first_table == all_tables && first_table != 0); TABLE_LIST *aux_tables= thd->lex->auxiliary_table_list.first; uint del_table_count; @@ -4396,9 +4364,7 @@ case SQLCOM_PREPARE: { DBUG_EXECUTE_IF("4x_server_emul", my_error(ER_UNKNOWN_ERROR, MYF(0)); goto error;); -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (check_and_convert_db_name(&lex->name, TRUE) != IDENT_NAME_OK) break; res= mysqld_show_create_db(thd, lex->name.str, &lex->create_info); @@ -4452,9 +4418,7 @@ case SQLCOM_PREPARE: /* lex->unit.cleanup() is called outside, no need to call it here */ break; case SQLCOM_SHOW_CREATE_EVENT: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); res= Events::show_create_event(thd, lex->spname->m_db, lex->spname->m_name); break; @@ -5350,18 +5314,14 @@ case SQLCOM_PREPARE: } case SQLCOM_SHOW_CREATE_PROC: { -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (sp_show_create_routine(thd, SP_TYPE_PROCEDURE, lex->spname)) goto error; break; } case SQLCOM_SHOW_CREATE_FUNC: { -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (sp_show_create_routine(thd, SP_TYPE_FUNCTION, lex->spname)) goto error; break; @@ -5374,9 +5334,7 @@ case SQLCOM_PREPARE: enum_sp_type sp_type= (lex->sql_command == SQLCOM_SHOW_PROC_CODE) ? SP_TYPE_PROCEDURE : SP_TYPE_FUNCTION; -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (sp_cache_routine(thd, sp_type, lex->spname, false, &sp)) goto error; if (!sp || sp->show_routine_code(thd)) @@ -5401,9 +5359,7 @@ case SQLCOM_PREPARE: goto error; } -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (show_create_trigger(thd, lex->spname)) goto error; /* Error has been already logged. */ diff --git a/sql/sql_parse.h b/sql/sql_parse.h index 7c10ac4a9733..94833cde7293 100644 --- a/sql/sql_parse.h +++ b/sql/sql_parse.h @@ -227,11 +227,16 @@ inline bool is_supported_parser_charset(const CHARSET_INFO *cs) if (WSREP(thd) && !thd->lex->no_write_to_binlog \ && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error; +#define WSREP_SYNC_WAIT(thd_, before_) \ + if (WSREP_CLIENT(thd_) && \ + wsrep_sync_wait(thd_, before_)) goto error; + #else #define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) #define WSREP_TO_ISOLATION_END #define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) +#define WSREP_SYNC_WAIT(thd_, before_) #endif /* WITH_WSREP */ diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index 098ae79a8688..1e07432f2d7a 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -115,11 +115,12 @@ enum enum_wsrep_OSU_method { enum enum_wsrep_sync_wait { WSREP_SYNC_WAIT_NONE = 0x0, - // show, select, begin + // select, begin WSREP_SYNC_WAIT_BEFORE_READ = 0x1, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE = 0x2, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE = 0x4, - WSREP_SYNC_WAIT_MAX = 0x7 + WSREP_SYNC_WAIT_BEFORE_SHOW = 0x8, + WSREP_SYNC_WAIT_MAX = 0xF }; // MySQL status variables From 6a9ac128827c89812a0a882497c121990566a90a Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 8 Mar 2017 13:11:57 +0100 Subject: [PATCH 147/305] MW-86 Adjust MTR tests for changes to wsrep_sync_wait --- mysql-test/suite/galera/galera_2nodes.cnf | 4 ++-- mysql-test/suite/galera/galera_2nodes_as_master.cnf | 4 ++-- mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf | 4 ++-- .../galera/galera_2nodes_as_master_with_repl_filter.cnf | 4 ++-- mysql-test/suite/galera/galera_2nodes_as_slave.cnf | 4 ++-- mysql-test/suite/galera/galera_3nodes_as_slave.cnf | 6 +++--- mysql-test/suite/galera/galera_4nodes.cnf | 8 ++++---- mysql-test/suite/galera/r/GAL-401.result | 2 +- .../suite/galera/r/galera_applier_ftwrl_table.result | 2 +- .../galera/r/galera_applier_ftwrl_table_alter.result | 2 +- .../galera/r/galera_bf_abort_flush_for_export.result | 2 +- mysql-test/suite/galera/r/galera_defaults.result | 2 +- mysql-test/suite/galera/r/galera_insert_ignore.result | 4 ++-- mysql-test/suite/galera/r/galera_many_rows.result | 2 +- .../galera/r/galera_parallel_apply_lock_table.result | 2 +- mysql-test/suite/galera/r/galera_parallel_simple.result | 2 +- .../suite/galera/r/galera_query_cache_sync_wait.result | 5 ----- mysql-test/suite/galera/r/galera_sync_wait_show.result | 2 +- .../suite/galera/r/galera_unicode_identifiers.result | 4 ++-- mysql-test/suite/galera/r/galera_var_sync_wait.result | 5 +---- mysql-test/suite/galera/r/mysql-wsrep#201.result | 1 - mysql-test/suite/galera/t/GAL-401.test | 2 +- mysql-test/suite/galera/t/galera_applier_ftwrl_table.test | 2 +- .../suite/galera/t/galera_applier_ftwrl_table_alter.test | 2 +- .../suite/galera/t/galera_bf_abort_flush_for_export.test | 2 +- mysql-test/suite/galera/t/galera_insert_ignore.test | 4 ++-- mysql-test/suite/galera/t/galera_many_rows.test | 2 +- mysql-test/suite/galera/t/galera_migrate.cnf | 2 +- mysql-test/suite/galera/t/galera_parallel_simple.test | 2 +- .../suite/galera/t/galera_query_cache_sync_wait.test | 5 ----- mysql-test/suite/galera/t/galera_ssl.cnf | 4 ++-- mysql-test/suite/galera/t/galera_sync_wait_show.test | 3 ++- mysql-test/suite/galera/t/galera_unicode_identifiers.test | 4 ++-- mysql-test/suite/galera/t/galera_var_sync_wait.test | 5 ++++- mysql-test/suite/galera/t/mysql-wsrep#201.test | 1 - mysql-test/suite/galera_3nodes/galera_3nodes.cnf | 2 +- .../suite/galera_3nodes/r/galera_var_dirty_reads2.result | 2 +- .../suite/galera_3nodes/t/galera_var_dirty_reads2.test | 2 +- 38 files changed, 53 insertions(+), 64 deletions(-) diff --git a/mysql-test/suite/galera/galera_2nodes.cnf b/mysql-test/suite/galera/galera_2nodes.cnf index 143e89c9a042..66315d944df2 100644 --- a/mysql-test/suite/galera/galera_2nodes.cnf +++ b/mysql-test/suite/galera/galera_2nodes.cnf @@ -13,7 +13,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#gale # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port @@ -33,7 +33,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#gale # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port diff --git a/mysql-test/suite/galera/galera_2nodes_as_master.cnf b/mysql-test/suite/galera/galera_2nodes_as_master.cnf index 51f6207c11bd..1057b300982a 100644 --- a/mysql-test/suite/galera/galera_2nodes_as_master.cnf +++ b/mysql-test/suite/galera/galera_2nodes_as_master.cnf @@ -20,7 +20,7 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port' # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port @@ -43,7 +43,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port' # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port diff --git a/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf b/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf index 716a790fea6f..f68fe5249044 100644 --- a/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf +++ b/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf @@ -29,7 +29,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = P # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port @@ -49,7 +49,7 @@ wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout = P # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port diff --git a/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf b/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf index 5f0af2e58e55..d5490280ab24 100644 --- a/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf +++ b/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf @@ -23,7 +23,7 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port' # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port @@ -49,7 +49,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port' # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port diff --git a/mysql-test/suite/galera/galera_2nodes_as_slave.cnf b/mysql-test/suite/galera/galera_2nodes_as_slave.cnf index ae762d234e6e..0a4378e7e8cd 100644 --- a/mysql-test/suite/galera/galera_2nodes_as_slave.cnf +++ b/mysql-test/suite/galera/galera_2nodes_as_slave.cnf @@ -23,7 +23,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = P # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port @@ -41,7 +41,7 @@ wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout = P # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port diff --git a/mysql-test/suite/galera/galera_3nodes_as_slave.cnf b/mysql-test/suite/galera/galera_3nodes_as_slave.cnf index 4f3fdb020452..a7803abd08b5 100644 --- a/mysql-test/suite/galera/galera_3nodes_as_slave.cnf +++ b/mysql-test/suite/galera/galera_3nodes_as_slave.cnf @@ -22,7 +22,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = P # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port @@ -40,7 +40,7 @@ wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout = P # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port @@ -58,7 +58,7 @@ wsrep_provider_options='base_port=@mysqld.4.#galera_port;evs.install_timeout = P # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.4.#sst_port diff --git a/mysql-test/suite/galera/galera_4nodes.cnf b/mysql-test/suite/galera/galera_4nodes.cnf index 068c73421b69..0d9a835e4e92 100644 --- a/mysql-test/suite/galera/galera_4nodes.cnf +++ b/mysql-test/suite/galera/galera_4nodes.cnf @@ -10,7 +10,7 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port' # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port @@ -28,7 +28,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port' # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port @@ -46,7 +46,7 @@ wsrep_provider_options='base_port=@mysqld.3.#galera_port' # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port @@ -64,7 +64,7 @@ wsrep_provider_options='base_port=@mysqld.4.#galera_port' # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.4.#sst_port diff --git a/mysql-test/suite/galera/r/GAL-401.result b/mysql-test/suite/galera/r/GAL-401.result index bcf83e7e1ffa..7d6ecd08b57e 100644 --- a/mysql-test/suite/galera/r/GAL-401.result +++ b/mysql-test/suite/galera/r/GAL-401.result @@ -8,7 +8,7 @@ SHOW STATUS LIKE 'wsrep_desync_count'; Variable_name Value wsrep_desync_count 0 SET @@global.wsrep_desync = 0; -SET SESSION wsrep_sync_wait=7; +SET SESSION wsrep_sync_wait=15; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result b/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result index cecbfc1f3cf1..1b2a3b937bb9 100644 --- a/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result +++ b/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result @@ -8,7 +8,7 @@ SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 diff --git a/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result b/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result index ee967356c850..c30f78896e51 100644 --- a/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result +++ b/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result @@ -12,7 +12,7 @@ SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system use COUNT(*) = 1 1 UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result index 96ed226c3ab9..3c5c07ae396f 100644 --- a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result +++ b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result @@ -6,7 +6,7 @@ SET SESSION wsrep_sync_wait = 0; UNLOCK TABLES; COMMIT; SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result index 4fd231ed109d..8db446f4e20f 100644 --- a/mysql-test/suite/galera/r/galera_defaults.result +++ b/mysql-test/suite/galera/r/galera_defaults.result @@ -46,7 +46,7 @@ WSREP_SST_AUTH WSREP_SST_DONOR WSREP_SST_DONOR_REJECTS_QUERIES OFF WSREP_SST_METHOD rsync -WSREP_SYNC_WAIT 7 +WSREP_SYNC_WAIT 15 ; ; ; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT30S; evs.info_log_mask = 0; evs.install_timeout = PT15S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT10S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; ; gcache.keep_pages_size = 0; gcache.mem_size = 0; ; gcache.page_size = 128M; gcache.recover = no; gcache.size = 128M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; ;gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; ; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; ; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = PT30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT90S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 7; socket.checksum = 2; socket.recv_buf_size = 212992; SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'wsrep_%' diff --git a/mysql-test/suite/galera/r/galera_insert_ignore.result b/mysql-test/suite/galera/r/galera_insert_ignore.result index 2d6e38e0bc12..290ccc01a46d 100644 --- a/mysql-test/suite/galera/r/galera_insert_ignore.result +++ b/mysql-test/suite/galera/r/galera_insert_ignore.result @@ -1,5 +1,5 @@ -SET GLOBAL wsrep_sync_wait = 7; -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; +SET GLOBAL wsrep_sync_wait = 15; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); INSERT IGNORE INTO t1 VALUES (1), (2); diff --git a/mysql-test/suite/galera/r/galera_many_rows.result b/mysql-test/suite/galera/r/galera_many_rows.result index a34367d6e464..e650dd6f5def 100644 --- a/mysql-test/suite/galera/r/galera_many_rows.result +++ b/mysql-test/suite/galera/r/galera_many_rows.result @@ -5,7 +5,7 @@ INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB; INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; SET SESSION wsrep_sync_wait = 0; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H'; SELECT COUNT(*) = 100000 FROM t1; COUNT(*) = 100000 diff --git a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result index 85ba022a31b4..98786ffa4b3a 100644 --- a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result +++ b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result @@ -18,7 +18,7 @@ SELECT COUNT(*) = 0 FROM t2; COUNT(*) = 0 1 UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7;; +SET SESSION wsrep_sync_wait = 15;; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_parallel_simple.result b/mysql-test/suite/galera/r/galera_parallel_simple.result index 6d023c38a572..3b10815c63d2 100644 --- a/mysql-test/suite/galera/r/galera_parallel_simple.result +++ b/mysql-test/suite/galera/r/galera_parallel_simple.result @@ -16,7 +16,7 @@ INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); SET SESSION wsrep_sync_wait = 0; UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) = 10 FROM t1; COUNT(*) = 10 0 diff --git a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result index e9faff8be8bc..57e14667878a 100644 --- a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result +++ b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result @@ -2,7 +2,6 @@ CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S"; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1; MAX(id) 1 @@ -12,7 +11,6 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; FLUSH QUERY CACHE; -SET SESSION wsrep_sync_wait = 7; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; INSERT INTO t1 VALUES (3); SELECT MAX(id) FROM t1; @@ -20,11 +18,9 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; INSERT INTO t1 VALUES (4); -SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1; MAX(id) 4 -SET SESSION wsrep_sync_wait = 7; FLUSH STATUS; SELECT MAX(id) FROM t1; MAX(id) @@ -34,7 +30,6 @@ VARIABLE_VALUE = 1 1 SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; INSERT INTO t1 VALUES (5); -SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1 ; SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; diff --git a/mysql-test/suite/galera/r/galera_sync_wait_show.result b/mysql-test/suite/galera/r/galera_sync_wait_show.result index 6602d499412b..cb4f0eae190e 100644 --- a/mysql-test/suite/galera/r/galera_sync_wait_show.result +++ b/mysql-test/suite/galera/r/galera_sync_wait_show.result @@ -1,4 +1,4 @@ -SET SESSION wsrep_sync_wait = 1; +SET SESSION wsrep_sync_wait = 8; CREATE DATABASE db1; SHOW CREATE DATABASE db1; Database Create Database diff --git a/mysql-test/suite/galera/r/galera_unicode_identifiers.result b/mysql-test/suite/galera/r/galera_unicode_identifiers.result index 212c6c65b674..78c04a2306d4 100644 --- a/mysql-test/suite/galera/r/galera_unicode_identifiers.result +++ b/mysql-test/suite/galera/r/galera_unicode_identifiers.result @@ -1,5 +1,5 @@ -SET GLOBAL wsrep_sync_wait = 7; -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; +SET GLOBAL wsrep_sync_wait = 15; CREATE DATABASE `database with space`; USE `database with space`; CREATE TABLE `table with space` ( diff --git a/mysql-test/suite/galera/r/galera_var_sync_wait.result b/mysql-test/suite/galera/r/galera_var_sync_wait.result index f6136a4ddc48..f573c251bdd5 100644 --- a/mysql-test/suite/galera/r/galera_var_sync_wait.result +++ b/mysql-test/suite/galera/r/galera_var_sync_wait.result @@ -1,8 +1,5 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; SET GLOBAL wsrep_sync_wait = 1; -SHOW TABLES LIKE '%t1'; -Tables_in_test (%t1) -t1 SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 @@ -15,7 +12,7 @@ SET GLOBAL wsrep_sync_wait = 2; UPDATE t3 SET f1 = 2; affected rows: 1 info: Rows matched: 1 Changed: 1 Warnings: 0 -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; diff --git a/mysql-test/suite/galera/r/mysql-wsrep#201.result b/mysql-test/suite/galera/r/mysql-wsrep#201.result index 1c0998e35ac8..34d184d8ec1c 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#201.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#201.result @@ -1,4 +1,3 @@ CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; INSERT INTO t1 VALUES (DEFAULT); SET GLOBAL query_cache_size=1355776; -SET SESSION wsrep_sync_wait = 7; diff --git a/mysql-test/suite/galera/t/GAL-401.test b/mysql-test/suite/galera/t/GAL-401.test index ca95dca809c7..cc6bf872f76f 100644 --- a/mysql-test/suite/galera/t/GAL-401.test +++ b/mysql-test/suite/galera/t/GAL-401.test @@ -43,7 +43,7 @@ SET @@global.wsrep_desync = 0; --let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; --source include/wait_condition.inc -SET SESSION wsrep_sync_wait=7; +SET SESSION wsrep_sync_wait=15; SHOW CREATE TABLE t1; DROP TABLE t1; CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored."); diff --git a/mysql-test/suite/galera/t/galera_applier_ftwrl_table.test b/mysql-test/suite/galera/t/galera_applier_ftwrl_table.test index 6747977812b1..97819384a753 100644 --- a/mysql-test/suite/galera/t/galera_applier_ftwrl_table.test +++ b/mysql-test/suite/galera/t/galera_applier_ftwrl_table.test @@ -28,7 +28,7 @@ SELECT COUNT(*) = 0 FROM t1; --connection node_1 UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) = 2 FROM t1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test index 99c45c04ba00..67f2108d263b 100644 --- a/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test +++ b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test @@ -29,7 +29,7 @@ SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system use UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SHOW CREATE TABLE t1; SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock'; diff --git a/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test b/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test index 86de404d7b12..b4f55a2397f0 100644 --- a/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test +++ b/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test @@ -27,7 +27,7 @@ UNLOCK TABLES; COMMIT; SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) = 1 FROM t1; --let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` diff --git a/mysql-test/suite/galera/t/galera_insert_ignore.test b/mysql-test/suite/galera/t/galera_insert_ignore.test index 4b4b0a6e9fbc..027f70e96d9d 100644 --- a/mysql-test/suite/galera/t/galera_insert_ignore.test +++ b/mysql-test/suite/galera/t/galera_insert_ignore.test @@ -2,10 +2,10 @@ --source include/have_innodb.inc --let $wsrep_sync_wait_orig = (SELECT @@wsrep_sync_wait) -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; --connection node_2 -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; # diff --git a/mysql-test/suite/galera/t/galera_many_rows.test b/mysql-test/suite/galera/t/galera_many_rows.test index 653dc2dd75aa..58ba85e1b9e7 100644 --- a/mysql-test/suite/galera/t/galera_many_rows.test +++ b/mysql-test/suite/galera/t/galera_many_rows.test @@ -16,7 +16,7 @@ INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4 --connection node_2 SET SESSION wsrep_sync_wait = 0; --let $wsrep_provider_options_node2 = `SELECT @@wsrep_provider_options` -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H'; diff --git a/mysql-test/suite/galera/t/galera_migrate.cnf b/mysql-test/suite/galera/t/galera_migrate.cnf index dfaf4a651f81..7d82f1fdc364 100644 --- a/mysql-test/suite/galera/t/galera_migrate.cnf +++ b/mysql-test/suite/galera/t/galera_migrate.cnf @@ -13,7 +13,7 @@ log-bin=mysqld-bin wsrep_node_address=127.0.0.1 wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 [mysqld.1] diff --git a/mysql-test/suite/galera/t/galera_parallel_simple.test b/mysql-test/suite/galera/t/galera_parallel_simple.test index e078a342c167..41cd0c8e6fae 100644 --- a/mysql-test/suite/galera/t/galera_parallel_simple.test +++ b/mysql-test/suite/galera/t/galera_parallel_simple.test @@ -45,7 +45,7 @@ SET SESSION wsrep_sync_wait = 0; UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) = 10 FROM t1; SELECT COUNT(*) = 10 FROM t2; diff --git a/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test index 0634eba32648..391beb670924 100644 --- a/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test +++ b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test @@ -10,7 +10,6 @@ INSERT INTO t1 VALUES (1); --let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S"; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1; # first lookup miss # @@ -27,7 +26,6 @@ SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; FLUSH QUERY CACHE; -SET SESSION wsrep_sync_wait = 7; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; # @@ -51,9 +49,7 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; INSERT INTO t1 VALUES (4); --connection node_2 -SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1; -SET SESSION wsrep_sync_wait = 7; # # Query cache hit @@ -72,7 +68,6 @@ SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; INSERT INTO t1 VALUES (5); --connection node_2 -SET SESSION wsrep_sync_wait = 7; --send SELECT MAX(id) FROM t1 --connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 diff --git a/mysql-test/suite/galera/t/galera_ssl.cnf b/mysql-test/suite/galera/t/galera_ssl.cnf index 59ea28653a2e..25b10ea9b005 100644 --- a/mysql-test/suite/galera/t/galera_ssl.cnf +++ b/mysql-test/suite/galera/t/galera_ssl.cnf @@ -10,7 +10,7 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port;socket.ssl=yes;socket.s # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port @@ -28,7 +28,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port;socket.ssl=yes;socket.s # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port diff --git a/mysql-test/suite/galera/t/galera_sync_wait_show.test b/mysql-test/suite/galera/t/galera_sync_wait_show.test index d025c8208bcf..65621c98fa4e 100644 --- a/mysql-test/suite/galera/t/galera_sync_wait_show.test +++ b/mysql-test/suite/galera/t/galera_sync_wait_show.test @@ -5,7 +5,8 @@ --source include/galera_cluster.inc --connection node_2 -SET SESSION wsrep_sync_wait = 1; +# MW-86 SHOW commands have now bitmap value 8 +SET SESSION wsrep_sync_wait = 8; --connection node_1 diff --git a/mysql-test/suite/galera/t/galera_unicode_identifiers.test b/mysql-test/suite/galera/t/galera_unicode_identifiers.test index 2f255e9a197e..6336bd0c794b 100644 --- a/mysql-test/suite/galera/t/galera_unicode_identifiers.test +++ b/mysql-test/suite/galera/t/galera_unicode_identifiers.test @@ -6,10 +6,10 @@ --source include/have_innodb.inc --let $wsrep_sync_wait_orig = (SELECT @@wsrep_sync_wait) -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; --connection node_2 -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; --connection node_1 diff --git a/mysql-test/suite/galera/t/galera_var_sync_wait.test b/mysql-test/suite/galera/t/galera_var_sync_wait.test index 935c271a4d6c..046724e16352 100644 --- a/mysql-test/suite/galera/t/galera_var_sync_wait.test +++ b/mysql-test/suite/galera/t/galera_var_sync_wait.test @@ -13,7 +13,10 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; --connection node_2 SET GLOBAL wsrep_sync_wait = 1; # Those statements should see the table -SHOW TABLES LIKE '%t1'; + +# MW-86 SHOW commands have now their own bitmask +# SHOW TABLES LIKE '%t1'; + SELECT COUNT(*) = 0 FROM t1; --connection node_1 diff --git a/mysql-test/suite/galera/t/mysql-wsrep#201.test b/mysql-test/suite/galera/t/mysql-wsrep#201.test index e93275401958..21cf05db008b 100644 --- a/mysql-test/suite/galera/t/mysql-wsrep#201.test +++ b/mysql-test/suite/galera/t/mysql-wsrep#201.test @@ -8,7 +8,6 @@ INSERT INTO t1 VALUES (DEFAULT); --connection node_2 --let $qcache_size_orig = `SELECT @@GLOBAL.query_cache_size` SET GLOBAL query_cache_size=1355776; -SET SESSION wsrep_sync_wait = 7; --disable_query_log diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf index 56ac72ef7eec..60c4fad3db26 100644 --- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf +++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf @@ -9,7 +9,7 @@ wsrep_provider=@ENV.WSREP_PROVIDER # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 # Required for Galera innodb_autoinc_lock_mode=2 diff --git a/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result b/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result index 462d50672c2b..88780a2c87fa 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result +++ b/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result @@ -24,7 +24,7 @@ PREPARE stmt_update FROM 'UPDATE t1 SET f1 = f1 + f1'; SET GLOBAL wsrep_dirty_reads = 1; SET GLOBAL wsrep_sync_wait = 0; SET GLOBAL wsrep_dirty_reads = 0; -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; SET SESSION wsrep_dirty_reads = 1; INSERT INTO t1 SELECT * FROM t1; ERROR 08S01: WSREP has not yet prepared node for application use diff --git a/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test b/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test index e9729280f2cd..129ba2e1f38c 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test +++ b/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test @@ -62,7 +62,7 @@ SET GLOBAL wsrep_sync_wait = 0; --error 0 --exec $MYSQL_DUMP -u root -S $NODE_MYSOCK_2 test >/dev/null SET GLOBAL wsrep_dirty_reads = 0; -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; # Those statements should fail From 4543278ec172cdb69297ff93342f363185f7327f Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 8 Mar 2017 15:29:31 +0100 Subject: [PATCH 148/305] MW-86 MTR test: check that SHOW commands no longer obey wsrep_sync_wait = 1 --- mysql-test/suite/galera/r/MW-86.result | 18 ++++++++++ mysql-test/suite/galera/t/MW-86.test | 46 ++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 mysql-test/suite/galera/r/MW-86.result create mode 100644 mysql-test/suite/galera/t/MW-86.test diff --git a/mysql-test/suite/galera/r/MW-86.result b/mysql-test/suite/galera/r/MW-86.result new file mode 100644 index 000000000000..d0799a0a7082 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-86.result @@ -0,0 +1,18 @@ +SET SESSION wsrep_sync_wait = 1; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +CREATE DATABASE db1; +SHOW CREATE DATABASE db1; +ERROR 42000: Unknown database 'db1' +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +SET SESSION wsrep_sync_wait = 8; +DROP DATABASE db1; +SET SESSION wsrep_sync_wait = 8; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; +CREATE DATABASE db1; +SHOW CREATE DATABASE db1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +DROP DATABASE db1; diff --git a/mysql-test/suite/galera/t/MW-86.test b/mysql-test/suite/galera/t/MW-86.test new file mode 100644 index 000000000000..cc92dbbd8188 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86.test @@ -0,0 +1,46 @@ +--source include/galera_cluster.inc + +# +# Test 1: SHOW commands no longer obey wsrep_sync_wait = 1 +# + +--connection node_2 +SET SESSION wsrep_sync_wait = 1; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; + +--connection node_1 +CREATE DATABASE db1; + +--connection node_2 +--error ER_BAD_DB_ERROR +SHOW CREATE DATABASE db1; +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +SET SESSION wsrep_sync_wait = 8; +DROP DATABASE db1; + + +# +# Test 2: SHOW commands now obey wsrep_sync_wait = 8 +# + +--connection node_2 +--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` +SET SESSION wsrep_sync_wait = 8; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; + +--connection node_1 +CREATE DATABASE db1; + +--connection node_2 +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE DATABASE db1; + +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +DROP DATABASE db1; + +--disable_query_log +--eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig" From 2838741421e70feeaf5d1aa285a088827327ff1e Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 10 Mar 2017 09:25:24 +0200 Subject: [PATCH 149/305] Refs: MW-360 * fix for regression with galera_toi_ddl_nonconflicting test --- sql/wsrep_mysqld.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index d503a901b276..5b9143c60554 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -1300,7 +1300,7 @@ static bool wsrep_can_run_in_toi(THD *thd, const char *db, const char *table, 1: TOI replication was skipped -1: TOI replication failed */ -static int wsrep_TOI_begin(THD *thd, const char *query, char *db_, char *table_, +static int wsrep_TOI_begin(THD *thd, char *db_, char *table_, const TABLE_LIST* table_list) { wsrep_status_t ret(WSREP_WARNING); @@ -1338,8 +1338,7 @@ static int wsrep_TOI_begin(THD *thd, const char *query, char *db_, char *table_, buf_err= wsrep_drop_table_query(thd, &buf, &buf_len); break; default: - buf_err= wsrep_to_buf_helper(thd, (query) ? query : thd->query(), - (query) ? strlen(query) : thd->query_length(), + buf_err= wsrep_to_buf_helper(thd, thd->query(), thd->query_length(), &buf, &buf_len); break; } @@ -1537,7 +1536,7 @@ int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_, { switch (thd->variables.wsrep_OSU_method) { case WSREP_OSU_TOI: - ret = wsrep_TOI_begin(thd, thd->query(), db_, table_, table_list); + ret = wsrep_TOI_begin(thd, db_, table_, table_list); break; case WSREP_OSU_RSU: ret = wsrep_RSU_begin(thd, db_, table_); From e0b6b313bda5bc5b3f92d698ed5725d08554c3b6 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Mon, 13 Mar 2017 02:30:01 -0700 Subject: [PATCH 150/305] Galera MTR Tests: Tests for MW-360 DROP TABLE containing temporary tables results in binlog divergence --- mysql-test/suite/galera/r/MW-360.result | 161 ++++++++++++++++++ .../galera/r/galera_ddl_multiline.result | 80 +++++++++ mysql-test/suite/galera/t/MW-360-master.opt | 2 + mysql-test/suite/galera/t/MW-360.test | 103 +++++++++++ .../suite/galera/t/galera_ddl_multiline.test | 54 ++++++ 5 files changed, 400 insertions(+) create mode 100644 mysql-test/suite/galera/r/MW-360.result create mode 100644 mysql-test/suite/galera/r/galera_ddl_multiline.result create mode 100644 mysql-test/suite/galera/t/MW-360-master.opt create mode 100644 mysql-test/suite/galera/t/MW-360.test create mode 100644 mysql-test/suite/galera/t/galera_ddl_multiline.test diff --git a/mysql-test/suite/galera/r/MW-360.result b/mysql-test/suite/galera/r/MW-360.result new file mode 100644 index 000000000000..4195b8f07bc7 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-360.result @@ -0,0 +1,161 @@ +SET GLOBAL wsrep_on=OFF; +RESET MASTER; +SET GLOBAL wsrep_on=ON; +SET GLOBAL wsrep_on=OFF; +RESET MASTER; +SET GLOBAL wsrep_on=ON; +CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +DROP TABLE t1; +CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (2); +DROP TABLE t1, t2; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (2); +DROP TABLE t1, t2; +CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (2); +CREATE TEMPORARY TABLE t3 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t3 VALUES (3); +DROP TABLE t1, t2, t3; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (2); +CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t3 VALUES (3); +DROP TABLE t1, t2, t3; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (2); +DROP TABLE t1; +DROP TABLE t1; +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; +Log_name Pos Event_type Server_id End_log_pos Info +mysqld-bin.000001 120 Previous_gtids 1 151 +mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= ':1' +mysqld-bin.000001 199 Query 1 339 use `test`; DROP TEMPORARY TABLE IF EXISTS `t1` /* generated by server */ +mysqld-bin.000001 339 Gtid 1 387 SET @@SESSION.GTID_NEXT= ':1' +mysqld-bin.000001 387 Query 1 503 use `test`; CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 503 Gtid 1 551 SET @@SESSION.GTID_NEXT= ':2' +mysqld-bin.000001 551 Query 1 628 BEGIN +mysqld-bin.000001 628 Table_map 1 673 table_id: # (test.t2) +mysqld-bin.000001 673 Write_rows 1 713 table_id: # flags: STMT_END_F +mysqld-bin.000001 713 Xid 1 744 COMMIT /* xid=# */ +mysqld-bin.000001 744 Gtid 1 792 SET @@SESSION.GTID_NEXT= ':2' +mysqld-bin.000001 792 Query 1 927 use `test`; DROP TEMPORARY TABLE IF EXISTS `t1` /* generated by server */ +mysqld-bin.000001 927 Gtid 1 975 SET @@SESSION.GTID_NEXT= ':3' +mysqld-bin.000001 975 Query 1 1090 use `test`; DROP TABLE `t2` /* generated by server */ +mysqld-bin.000001 1090 Gtid 1 1138 SET @@SESSION.GTID_NEXT= ':4' +mysqld-bin.000001 1138 Query 1 1254 use `test`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 1254 Gtid 1 1302 SET @@SESSION.GTID_NEXT= ':5' +mysqld-bin.000001 1302 Query 1 1379 BEGIN +mysqld-bin.000001 1379 Table_map 1 1424 table_id: # (test.t1) +mysqld-bin.000001 1424 Write_rows 1 1464 table_id: # flags: STMT_END_F +mysqld-bin.000001 1464 Xid 1 1495 COMMIT /* xid=# */ +mysqld-bin.000001 1495 Gtid 1 1543 SET @@SESSION.GTID_NEXT= ':3' +mysqld-bin.000001 1543 Query 1 1678 use `test`; DROP TEMPORARY TABLE IF EXISTS `t2` /* generated by server */ +mysqld-bin.000001 1678 Gtid 1 1726 SET @@SESSION.GTID_NEXT= ':6' +mysqld-bin.000001 1726 Query 1 1841 use `test`; DROP TABLE `t1` /* generated by server */ +mysqld-bin.000001 1841 Gtid 1 1889 SET @@SESSION.GTID_NEXT= ':7' +mysqld-bin.000001 1889 Query 1 2005 use `test`; CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 2005 Gtid 1 2053 SET @@SESSION.GTID_NEXT= ':8' +mysqld-bin.000001 2053 Query 1 2130 BEGIN +mysqld-bin.000001 2130 Table_map 1 2175 table_id: # (test.t2) +mysqld-bin.000001 2175 Write_rows 1 2215 table_id: # flags: STMT_END_F +mysqld-bin.000001 2215 Xid 1 2246 COMMIT /* xid=# */ +mysqld-bin.000001 2246 Gtid 1 2294 SET @@SESSION.GTID_NEXT= ':4' +mysqld-bin.000001 2294 Query 1 2434 use `test`; DROP TEMPORARY TABLE IF EXISTS `t1`,`t3` /* generated by server */ +mysqld-bin.000001 2434 Gtid 1 2482 SET @@SESSION.GTID_NEXT= ':9' +mysqld-bin.000001 2482 Query 1 2597 use `test`; DROP TABLE `t2` /* generated by server */ +mysqld-bin.000001 2597 Gtid 1 2645 SET @@SESSION.GTID_NEXT= ':10' +mysqld-bin.000001 2645 Query 1 2761 use `test`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 2761 Gtid 1 2809 SET @@SESSION.GTID_NEXT= ':11' +mysqld-bin.000001 2809 Query 1 2886 BEGIN +mysqld-bin.000001 2886 Table_map 1 2931 table_id: # (test.t1) +mysqld-bin.000001 2931 Write_rows 1 2971 table_id: # flags: STMT_END_F +mysqld-bin.000001 2971 Xid 1 3002 COMMIT /* xid=# */ +mysqld-bin.000001 3002 Gtid 1 3050 SET @@SESSION.GTID_NEXT= ':12' +mysqld-bin.000001 3050 Query 1 3166 use `test`; CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 3166 Gtid 1 3214 SET @@SESSION.GTID_NEXT= ':13' +mysqld-bin.000001 3214 Query 1 3291 BEGIN +mysqld-bin.000001 3291 Table_map 1 3336 table_id: # (test.t3) +mysqld-bin.000001 3336 Write_rows 1 3376 table_id: # flags: STMT_END_F +mysqld-bin.000001 3376 Xid 1 3407 COMMIT /* xid=# */ +mysqld-bin.000001 3407 Gtid 1 3455 SET @@SESSION.GTID_NEXT= ':5' +mysqld-bin.000001 3455 Query 1 3590 use `test`; DROP TEMPORARY TABLE IF EXISTS `t2` /* generated by server */ +mysqld-bin.000001 3590 Gtid 1 3638 SET @@SESSION.GTID_NEXT= ':14' +mysqld-bin.000001 3638 Query 1 3758 use `test`; DROP TABLE `t1`,`t3` /* generated by server */ +mysqld-bin.000001 3758 Gtid 1 3806 SET @@SESSION.GTID_NEXT= ':15' +mysqld-bin.000001 3806 Query 1 3922 use `test`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 3922 Gtid 1 3970 SET @@SESSION.GTID_NEXT= ':16' +mysqld-bin.000001 3970 Query 1 4047 BEGIN +mysqld-bin.000001 4047 Table_map 1 4092 table_id: # (test.t1) +mysqld-bin.000001 4092 Write_rows 1 4132 table_id: # flags: STMT_END_F +mysqld-bin.000001 4132 Xid 1 4163 COMMIT /* xid=# */ +mysqld-bin.000001 4163 Gtid 1 4211 SET @@SESSION.GTID_NEXT= ':6' +mysqld-bin.000001 4211 Query 1 4351 use `test`; DROP TEMPORARY TABLE IF EXISTS `t1` /* generated by server */ +mysqld-bin.000001 4351 Gtid 1 4399 SET @@SESSION.GTID_NEXT= ':17' +mysqld-bin.000001 4399 Query 1 4514 use `test`; DROP TABLE `t1` /* generated by server */ +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; +Log_name Pos Event_type Server_id End_log_pos Info +mysqld-bin.000001 120 Previous_gtids 2 151 +mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= ':1' +mysqld-bin.000001 199 Query 1 315 use `test`; CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 315 Gtid 1 363 SET @@SESSION.GTID_NEXT= ':2' +mysqld-bin.000001 363 Query 1 431 BEGIN +mysqld-bin.000001 431 Table_map 1 476 table_id: # (test.t2) +mysqld-bin.000001 476 Write_rows 1 516 table_id: # flags: STMT_END_F +mysqld-bin.000001 516 Xid 1 547 COMMIT /* xid=# */ +mysqld-bin.000001 547 Gtid 1 595 SET @@SESSION.GTID_NEXT= ':3' +mysqld-bin.000001 595 Query 1 710 use `test`; DROP TABLE `t2` /* generated by server */ +mysqld-bin.000001 710 Gtid 1 758 SET @@SESSION.GTID_NEXT= ':4' +mysqld-bin.000001 758 Query 1 874 use `test`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 874 Gtid 1 922 SET @@SESSION.GTID_NEXT= ':5' +mysqld-bin.000001 922 Query 1 990 BEGIN +mysqld-bin.000001 990 Table_map 1 1035 table_id: # (test.t1) +mysqld-bin.000001 1035 Write_rows 1 1075 table_id: # flags: STMT_END_F +mysqld-bin.000001 1075 Xid 1 1106 COMMIT /* xid=# */ +mysqld-bin.000001 1106 Gtid 1 1154 SET @@SESSION.GTID_NEXT= ':6' +mysqld-bin.000001 1154 Query 1 1269 use `test`; DROP TABLE `t1` /* generated by server */ +mysqld-bin.000001 1269 Gtid 1 1317 SET @@SESSION.GTID_NEXT= ':7' +mysqld-bin.000001 1317 Query 1 1433 use `test`; CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 1433 Gtid 1 1481 SET @@SESSION.GTID_NEXT= ':8' +mysqld-bin.000001 1481 Query 1 1549 BEGIN +mysqld-bin.000001 1549 Table_map 1 1594 table_id: # (test.t2) +mysqld-bin.000001 1594 Write_rows 1 1634 table_id: # flags: STMT_END_F +mysqld-bin.000001 1634 Xid 1 1665 COMMIT /* xid=# */ +mysqld-bin.000001 1665 Gtid 1 1713 SET @@SESSION.GTID_NEXT= ':9' +mysqld-bin.000001 1713 Query 1 1828 use `test`; DROP TABLE `t2` /* generated by server */ +mysqld-bin.000001 1828 Gtid 1 1876 SET @@SESSION.GTID_NEXT= ':10' +mysqld-bin.000001 1876 Query 1 1992 use `test`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 1992 Gtid 1 2040 SET @@SESSION.GTID_NEXT= ':11' +mysqld-bin.000001 2040 Query 1 2108 BEGIN +mysqld-bin.000001 2108 Table_map 1 2153 table_id: # (test.t1) +mysqld-bin.000001 2153 Write_rows 1 2193 table_id: # flags: STMT_END_F +mysqld-bin.000001 2193 Xid 1 2224 COMMIT /* xid=# */ +mysqld-bin.000001 2224 Gtid 1 2272 SET @@SESSION.GTID_NEXT= ':12' +mysqld-bin.000001 2272 Query 1 2388 use `test`; CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 2388 Gtid 1 2436 SET @@SESSION.GTID_NEXT= ':13' +mysqld-bin.000001 2436 Query 1 2504 BEGIN +mysqld-bin.000001 2504 Table_map 1 2549 table_id: # (test.t3) +mysqld-bin.000001 2549 Write_rows 1 2589 table_id: # flags: STMT_END_F +mysqld-bin.000001 2589 Xid 1 2620 COMMIT /* xid=# */ +mysqld-bin.000001 2620 Gtid 1 2668 SET @@SESSION.GTID_NEXT= ':14' +mysqld-bin.000001 2668 Query 1 2788 use `test`; DROP TABLE `t1`,`t3` /* generated by server */ +mysqld-bin.000001 2788 Gtid 1 2836 SET @@SESSION.GTID_NEXT= ':15' +mysqld-bin.000001 2836 Query 1 2952 use `test`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB +mysqld-bin.000001 2952 Gtid 1 3000 SET @@SESSION.GTID_NEXT= ':16' +mysqld-bin.000001 3000 Query 1 3068 BEGIN +mysqld-bin.000001 3068 Table_map 1 3113 table_id: # (test.t1) +mysqld-bin.000001 3113 Write_rows 1 3153 table_id: # flags: STMT_END_F +mysqld-bin.000001 3153 Xid 1 3184 COMMIT /* xid=# */ +mysqld-bin.000001 3184 Gtid 1 3232 SET @@SESSION.GTID_NEXT= ':17' +mysqld-bin.000001 3232 Query 1 3347 use `test`; DROP TABLE `t1` /* generated by server */ diff --git a/mysql-test/suite/galera/r/galera_ddl_multiline.result b/mysql-test/suite/galera/r/galera_ddl_multiline.result new file mode 100644 index 000000000000..602f18326e8e --- /dev/null +++ b/mysql-test/suite/galera/r/galera_ddl_multiline.result @@ -0,0 +1,80 @@ +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB;; +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t4; +Table Create Table +t4 CREATE TABLE `t4` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (1); +CREATE TABLE t5 (f1 INTEGER) ENGINE=InnoDB; +SELECT COUNT(*) = 1 FROM t1; +COUNT(*) = 1 +1 +SHOW CREATE TABLE t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT COUNT(*) = 1 FROM t1; +COUNT(*) = 1 +1 +SHOW CREATE TABLE t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +CREATE TABLE t6 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t2 VALUES (1);; +SELECT COUNT(*) = 1 FROM t2; +COUNT(*) = 1 +1 +SHOW CREATE TABLE t6; +Table Create Table +t6 CREATE TABLE `t6` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT COUNT(*) = 1 FROM t2; +COUNT(*) = 1 +1 +SHOW CREATE TABLE t6; +Table Create Table +t6 CREATE TABLE `t6` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +include/diff_servers.inc [servers=1 2] +DROP TABLE t1, t2, t3, t4, t5, t6; diff --git a/mysql-test/suite/galera/t/MW-360-master.opt b/mysql-test/suite/galera/t/MW-360-master.opt new file mode 100644 index 000000000000..6cfaed135e44 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-360-master.opt @@ -0,0 +1,2 @@ +--gtid-mode=ON --log-bin --log-slave-updates --enforce-gtid-consistency + diff --git a/mysql-test/suite/galera/t/MW-360.test b/mysql-test/suite/galera/t/MW-360.test new file mode 100644 index 000000000000..7ea743cdb3d2 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-360.test @@ -0,0 +1,103 @@ +# +# MW-360 DROP TABLE containing temporary tables results in binlog divergence +# + +--source include/galera_cluster.inc +--source include/have_binlog_format_row.inc + +--connection node_1 +SET GLOBAL wsrep_on=OFF; +RESET MASTER; +SET GLOBAL wsrep_on=ON; + +--connection node_2 +SET GLOBAL wsrep_on=OFF; +RESET MASTER; +SET GLOBAL wsrep_on=ON; + +--connection node_1 + +# +# Straightforward temporary table +# + +CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +DROP TABLE t1; +--let $local_uuid = `SELECT LEFT(@@global.gtid_executed, 36)` + +# +# A mix of normal and temporary tables +# + +# Temp table first, normal table second + +CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (2); + +DROP TABLE t1, t2; + +# Normal table first, temporary table second + +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (2); + +DROP TABLE t1, t2; + +# Temporary table first, normal table second, temp table third + +CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (2); + +CREATE TEMPORARY TABLE t3 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t3 VALUES (3); + +DROP TABLE t1, t2, t3; + +# Normal table first, temporary table second, normal table third + +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t2 VALUES (2); + +CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t3 VALUES (3); + +DROP TABLE t1, t2, t3; + +# +# A temporary table masking a normal one +# + +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (2); + +DROP TABLE t1; +DROP TABLE t1; + +--connection node_2 +--let $cluster_uuid = `SELECT LEFT(@@global.gtid_executed, 36)` + +--connection node_1 +--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/ +--replace_result $local_uuid $cluster_uuid +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; + +--connection node_2 +--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/ +--replace_result $local_uuid $cluster_uuid +SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; diff --git a/mysql-test/suite/galera/t/galera_ddl_multiline.test b/mysql-test/suite/galera/t/galera_ddl_multiline.test new file mode 100644 index 000000000000..c7155d066fab --- /dev/null +++ b/mysql-test/suite/galera/t/galera_ddl_multiline.test @@ -0,0 +1,54 @@ +# +# Test that Galera works correctly with multiline statements, in particular involving DDLs +# + +--source include/galera_cluster.inc + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB; + +SHOW CREATE TABLE t1; +SHOW CREATE TABLE t2; + +--connection node_2 +SHOW CREATE TABLE t1; +SHOW CREATE TABLE t2; + +--connection node_1 +--send CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB; +--reap + +SHOW CREATE TABLE t3; +SHOW CREATE TABLE t4; + +--connection node_2 +SHOW CREATE TABLE t3; +SHOW CREATE TABLE t4; + +--connection node_1 +INSERT INTO t1 VALUES (1); CREATE TABLE t5 (f1 INTEGER) ENGINE=InnoDB; + +SELECT COUNT(*) = 1 FROM t1; +SHOW CREATE TABLE t5; + +--connection node_2 +SELECT COUNT(*) = 1 FROM t1; +SHOW CREATE TABLE t5; + +--connection node_1 +--send CREATE TABLE t6 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t2 VALUES (1); +--reap + +SELECT COUNT(*) = 1 FROM t2; +SHOW CREATE TABLE t6; + +--connection node_2 +SELECT COUNT(*) = 1 FROM t2; +SHOW CREATE TABLE t6; + +--let $diff_servers = 1 2 +--source include/diff_servers.inc + +--connection node_1 +DROP TABLE t1, t2, t3, t4, t5, t6; + From 60c0d447c47a23727368ed447540dd7046c74a50 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Mon, 13 Mar 2017 15:35:04 +0100 Subject: [PATCH 151/305] MW-86 Additional wsrep_sync_wait coverage The following commands are now subject to wsrep_sync_wait with bitmask value 8: SHOW BINARY LOGS SHOW BINLOG EVENTS SHOW GRANTS --- sql/sql_parse.cc | 10 +++++++--- sql/sql_parse.h | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 718423b39c8d..42322519bd24 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3019,12 +3019,13 @@ mysql_execute_command(THD *thd) case SQLCOM_SHOW_COLLATIONS: case SQLCOM_SHOW_STORAGE_ENGINES: case SQLCOM_SHOW_PROFILE: - WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); case SQLCOM_SELECT: { #ifdef WITH_WSREP - if (lex->sql_command == SQLCOM_SELECT) - WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ); + if (lex->sql_command == SQLCOM_SELECT) + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ) + else + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW) #endif /* WITH_WSREP */ thd->status_var.last_query_cost= 0.0; thd->status_var.last_query_partial_plans= 0; @@ -3145,6 +3146,7 @@ case SQLCOM_PREPARE: } case SQLCOM_SHOW_BINLOG_EVENTS: { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (check_global_access(thd, REPL_SLAVE_ACL)) goto error; res = mysql_show_binlog_events(thd); @@ -3608,6 +3610,7 @@ case SQLCOM_PREPARE: { if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL)) goto error; + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); res = show_binlogs(thd); break; } @@ -4756,6 +4759,7 @@ case SQLCOM_PREPARE: if (!strcmp(thd->security_ctx->priv_user, grant_user->user.str) || !check_access(thd, SELECT_ACL, "mysql", NULL, NULL, 1, 0)) { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); res = mysql_show_grants(thd, grant_user); } break; diff --git a/sql/sql_parse.h b/sql/sql_parse.h index 94833cde7293..966b8b9af303 100644 --- a/sql/sql_parse.h +++ b/sql/sql_parse.h @@ -228,8 +228,8 @@ inline bool is_supported_parser_charset(const CHARSET_INFO *cs) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error; #define WSREP_SYNC_WAIT(thd_, before_) \ - if (WSREP_CLIENT(thd_) && \ - wsrep_sync_wait(thd_, before_)) goto error; + { if (WSREP_CLIENT(thd_) && \ + wsrep_sync_wait(thd_, before_)) goto error; } #else From 721665b4bcf3e13bc7a50cb4fa4aaf73fd72a051 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Mon, 13 Mar 2017 08:45:42 -0700 Subject: [PATCH 152/305] Galera MTR Tests: Extend test for MW-86 with additional SHOW commands --- mysql-test/suite/galera/t/MW-86-master.opt | 1 + 1 file changed, 1 insertion(+) create mode 100644 mysql-test/suite/galera/t/MW-86-master.opt diff --git a/mysql-test/suite/galera/t/MW-86-master.opt b/mysql-test/suite/galera/t/MW-86-master.opt new file mode 100644 index 000000000000..8a755e98b005 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-master.opt @@ -0,0 +1 @@ +--log-bin --log-slave-updates From 99ac31fb9db18b4ba24d8887392c06ad110edfc1 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Mon, 13 Mar 2017 08:52:09 -0700 Subject: [PATCH 153/305] Galera MTR Tests: Extend test for MW-86 with additional SHOW commands (part #2) --- mysql-test/suite/galera/r/MW-86.result | 57 +++++++++- mysql-test/suite/galera/t/MW-86.test | 147 ++++++++++++++++++++++++- 2 files changed, 196 insertions(+), 8 deletions(-) diff --git a/mysql-test/suite/galera/r/MW-86.result b/mysql-test/suite/galera/r/MW-86.result index d0799a0a7082..b29175216a8f 100644 --- a/mysql-test/suite/galera/r/MW-86.result +++ b/mysql-test/suite/galera/r/MW-86.result @@ -1,18 +1,65 @@ SET SESSION wsrep_sync_wait = 1; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; CREATE DATABASE db1; +SHOW BINARY LOGS; +SHOW BINLOG EVENTS; +SHOW COLUMNS FROM t1; SHOW CREATE DATABASE db1; -ERROR 42000: Unknown database 'db1' +SHOW CREATE EVENT e1; +SHOW CREATE FUNCTION f1; +SHOW CREATE PROCEDURE p1; +SHOW CREATE TABLE t1; +SHOW CREATE TRIGGER tr1; +SHOW CREATE VIEW v1; +SHOW DATABASES; +SHOW ENGINE InnoDB STATUS; +SHOW FUNCTION CODE f1; +SHOW FUNCTION STATUS; +SHOW GRANTS FOR 'root'@'localhost'; +SHOW INDEX FROM t1; +SHOW OPEN TABLES; +SHOW PROCEDURE CODE p1; +SHOW PROCEDURE STATUS; +SHOW PRIVILEGES; +SHOW STATUS LIKE 'wsrep_cluster_size'; +SHOW TABLE STATUS; +SHOW TABLES; +SHOW TRIGGERS; +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; +SHOW WARNINGS; SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; SET SESSION wsrep_sync_wait = 8; DROP DATABASE db1; +SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; SET SESSION wsrep_sync_wait = 8; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; -CREATE DATABASE db1; +CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB; +SHOW BINARY LOGS; +SHOW BINLOG EVENTS; +SHOW COLUMNS FROM t1; SHOW CREATE DATABASE db1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SHOW CREATE EVENT e1; +SHOW CREATE FUNCTION f1; +SHOW CREATE PROCEDURE p1; +SHOW CREATE TABLE t1; +SHOW CREATE TRIGGER tr1; +SHOW CREATE VIEW v1; +SHOW DATABASES; +SHOW ENGINE InnoDB STATUS; +SHOW FUNCTION CODE f1; +SHOW FUNCTION STATUS; +SHOW GRANTS FOR 'root'@'localhost'; +SHOW INDEX FROM t1; +SHOW OPEN TABLES; +SHOW PROCEDURE CODE p1; +SHOW PROCEDURE STATUS; +SHOW PRIVILEGES; +SHOW STATUS LIKE 'wsrep_cluster_size'; +SHOW TABLE STATUS; +SHOW TABLES; +SHOW TRIGGERS; +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; +SHOW WARNINGS; SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; -DROP DATABASE db1; diff --git a/mysql-test/suite/galera/t/MW-86.test b/mysql-test/suite/galera/t/MW-86.test index cc92dbbd8188..c6550ecdaaac 100644 --- a/mysql-test/suite/galera/t/MW-86.test +++ b/mysql-test/suite/galera/t/MW-86.test @@ -1,4 +1,5 @@ --source include/galera_cluster.inc +--source include/have_binlog_format_row.inc # # Test 1: SHOW commands no longer obey wsrep_sync_wait = 1 @@ -7,13 +8,76 @@ --connection node_2 SET SESSION wsrep_sync_wait = 1; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +--disable_result_log --connection node_1 CREATE DATABASE db1; --connection node_2 +SHOW BINARY LOGS; + +SHOW BINLOG EVENTS; + +--error ER_NO_SUCH_TABLE +SHOW COLUMNS FROM t1; + --error ER_BAD_DB_ERROR SHOW CREATE DATABASE db1; + +--error ER_EVENT_DOES_NOT_EXIST +SHOW CREATE EVENT e1; + +--error ER_SP_DOES_NOT_EXIST +SHOW CREATE FUNCTION f1; + +--error ER_SP_DOES_NOT_EXIST +SHOW CREATE PROCEDURE p1; + +--error ER_NO_SUCH_TABLE +SHOW CREATE TABLE t1; + +--error ER_TRG_DOES_NOT_EXIST +SHOW CREATE TRIGGER tr1; + +--error ER_NO_SUCH_TABLE +SHOW CREATE VIEW v1; + +SHOW DATABASES; + +SHOW ENGINE InnoDB STATUS; + +--error ER_SP_DOES_NOT_EXIST +SHOW FUNCTION CODE f1; + +SHOW FUNCTION STATUS; + +SHOW GRANTS FOR 'root'@'localhost'; + +--error ER_NO_SUCH_TABLE +SHOW INDEX FROM t1; + +SHOW OPEN TABLES; + +--error ER_SP_DOES_NOT_EXIST +SHOW PROCEDURE CODE p1; + +SHOW PROCEDURE STATUS; + +SHOW PRIVILEGES; + +SHOW STATUS LIKE 'wsrep_cluster_size'; + +SHOW TABLE STATUS; + +SHOW TABLES; + +SHOW TRIGGERS; + +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; + +--error 0 +SHOW WARNINGS; + SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; @@ -27,20 +91,97 @@ DROP DATABASE db1; --connection node_2 --let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` +SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; SET SESSION wsrep_sync_wait = 8; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; --connection node_1 -CREATE DATABASE db1; +CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB; --connection node_2 +--error ER_LOCK_WAIT_TIMEOUT +SHOW BINARY LOGS; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW BINLOG EVENTS; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW COLUMNS FROM t1; + --error ER_LOCK_WAIT_TIMEOUT SHOW CREATE DATABASE db1; +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE EVENT e1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE FUNCTION f1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE PROCEDURE p1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE TABLE t1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE TRIGGER tr1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW CREATE VIEW v1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW DATABASES; + +--error 0 +SHOW ENGINE InnoDB STATUS; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW FUNCTION CODE f1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW FUNCTION STATUS; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW GRANTS FOR 'root'@'localhost'; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW INDEX FROM t1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW OPEN TABLES; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW PROCEDURE CODE p1; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW PROCEDURE STATUS; + +--error 0 +SHOW PRIVILEGES; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW STATUS LIKE 'wsrep_cluster_size'; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW TABLE STATUS; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW TABLES; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW TRIGGERS; + +--error ER_LOCK_WAIT_TIMEOUT +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; + +--error 0 +SHOW WARNINGS; + SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; -DROP DATABASE db1; --disable_query_log --eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig" + +SET SESSION wsrep_sync_wait = 15; +DROP TABLE q; From a98766a6fbcc776a1f48c8c7c242a4098f6741c9 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Mon, 13 Mar 2017 22:45:42 +0100 Subject: [PATCH 154/305] MW-86 Removed unnecessary wsrep_sync_wait before processing SQLCOM_REPLACE Sync waiting before processing SQLCOM_REPLACE was not necessary given that this case falls through to processing of SQLCOM_INSERT. In case of SQLCOM_REPLACE, wsrep_sync_wait would be called twice. --- sql/sql_parse.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 42322519bd24..352e1c4a5780 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3808,7 +3808,6 @@ case SQLCOM_PREPARE: break; } case SQLCOM_REPLACE: - WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); #ifndef DBUG_OFF if (mysql_bin_log.is_open()) { From fe9f6d6f37d195ad02463b33478c33855f5c6253 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 14 Mar 2017 12:41:22 -0700 Subject: [PATCH 155/305] Galera MTR Tests: Test case for GAL-501 Improved URI parsing for IPv6 addresses --- .../suite/galera_3nodes/r/GAL-501.result | 14 +++++++ mysql-test/suite/galera_3nodes/t/GAL-501.cnf | 26 +++++++++++++ mysql-test/suite/galera_3nodes/t/GAL-501.test | 38 +++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 mysql-test/suite/galera_3nodes/r/GAL-501.result create mode 100644 mysql-test/suite/galera_3nodes/t/GAL-501.cnf create mode 100644 mysql-test/suite/galera_3nodes/t/GAL-501.test diff --git a/mysql-test/suite/galera_3nodes/r/GAL-501.result b/mysql-test/suite/galera_3nodes/r/GAL-501.result new file mode 100644 index 000000000000..a2bf5f4d98c1 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/r/GAL-501.result @@ -0,0 +1,14 @@ +SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; +VARIABLE_VALUE LIKE '%[::1]%' +1 +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +VARIABLE_VALUE = 3 +1 +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; +SELECT COUNT(*) = 1 FROM t1; +COUNT(*) = 1 +1 +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes/t/GAL-501.cnf b/mysql-test/suite/galera_3nodes/t/GAL-501.cnf new file mode 100644 index 000000000000..7002cb5bdfd5 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/GAL-501.cnf @@ -0,0 +1,26 @@ +!include ../galera_3nodes.cnf + +[mysqld] +wsrep_sst_method=rsync + + +[mysqld.1] +wsrep-cluster-address=gcomm:// +wsrep_node_address=[::1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]' +wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port' +wsrep_node_incoming_address='[::1]:@mysqld.1.port' + +[mysqld.2] +wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' +wsrep_node_address=[::1] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]' +wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port' +wsrep_node_incoming_address='[::1]:@mysqld.2.port' + +[mysqld.3] +wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' +wsrep_node_address=[::1] +wsrep_provider_options='base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]' +wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port' +wsrep_node_incoming_address='[::1]:@mysqld.3.port' diff --git a/mysql-test/suite/galera_3nodes/t/GAL-501.test b/mysql-test/suite/galera_3nodes/t/GAL-501.test new file mode 100644 index 000000000000..60ed59892274 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/GAL-501.test @@ -0,0 +1,38 @@ +# +# Test GAL-501 Improved URI parsing for IPv6 addresses +# The .cnf file contains +# wsrep_node_address=[::1] +# ist.recv_addr=[::1] + +--source include/galera_cluster.inc +--source include/have_ipv6.inc + +# Confirm that initial handshake happened over ipv6 + +SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses'; +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; + +# Force IST + +--connection node_2 +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +--connection node_2 +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; + +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; +--source include/wait_condition.inc + +SELECT COUNT(*) = 1 FROM t1; + +DROP TABLE t1; From 3fe6c5517d5388d8f56371bc63c0b6e3a0a82f05 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Tue, 21 Mar 2017 22:58:18 -0700 Subject: [PATCH 156/305] Galera MTR Tests: Fortify galera_gtid.test against interference by other tests --- mysql-test/suite/galera/t/galera_gtid-master.opt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/suite/galera/t/galera_gtid-master.opt b/mysql-test/suite/galera/t/galera_gtid-master.opt index 48e46d7541d7..df23d9ab0d8a 100644 --- a/mysql-test/suite/galera/t/galera_gtid-master.opt +++ b/mysql-test/suite/galera/t/galera_gtid-master.opt @@ -1 +1 @@ ---gtid-mode=ON --log-bin --log-slave-updates --enforce-gtid-consistency +--gtid-mode=ON --log-bin --log-slave-updates --enforce-gtid-consistency --loose-new-servers-for-galera_gtid-test From a316fe41bf225b34bb6765ee1d9284b3d551a066 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Fri, 24 Mar 2017 02:15:01 -0700 Subject: [PATCH 157/305] Galera MTR Tests: Stability fixes --- mysql-test/suite/galera/r/MW-329.result | 1 + .../suite/galera/r/galera_as_slave_autoinc.result | 4 +--- .../suite/galera/r/galera_ist_restart_joiner.result | 5 ++--- mysql-test/suite/galera/r/mysql-wsrep#198.result | 3 +++ mysql-test/suite/galera/t/MW-329.test | 3 +++ .../suite/galera/t/galera_as_slave_autoinc.test | 2 +- mysql-test/suite/galera/t/galera_gcs_fc_limit.test | 3 +++ .../suite/galera/t/galera_ist_restart_joiner.test | 11 ++++++----- mysql-test/suite/galera/t/mysql-wsrep#198.test | 3 +++ 9 files changed, 23 insertions(+), 12 deletions(-) diff --git a/mysql-test/suite/galera/r/MW-329.result b/mysql-test/suite/galera/r/MW-329.result index 655d8e9e2917..a79ba598d69a 100644 --- a/mysql-test/suite/galera/r/MW-329.result +++ b/mysql-test/suite/galera/r/MW-329.result @@ -18,3 +18,4 @@ VARIABLE_VALUE > 0 1 DROP PROCEDURE proc_insert; DROP TABLE t1; +CALL mtr.add_suppression("conflict state 3 after post commit"); diff --git a/mysql-test/suite/galera/r/galera_as_slave_autoinc.result b/mysql-test/suite/galera/r/galera_as_slave_autoinc.result index a8f5ec8e37e3..f52f0d2211db 100644 --- a/mysql-test/suite/galera/r/galera_as_slave_autoinc.result +++ b/mysql-test/suite/galera/r/galera_as_slave_autoinc.result @@ -37,11 +37,9 @@ i c show variables like 'binlog_format'; Variable_name Value binlog_format STATEMENT -show variables like '%auto_increment%'; +show variables like 'auto_increment_increment'; Variable_name Value auto_increment_increment 7 -auto_increment_offset 5 -wsrep_auto_increment_control ON select * from t1; i c 1 dummy_text diff --git a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result index f7a1386e7f82..298105213ea0 100644 --- a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result +++ b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result @@ -7,9 +7,8 @@ UPDATE t1 SET f2 = 'c' WHERE f1 > 2; SET GLOBAL wsrep_provider_options = 'dbug=d,recv_IST_after_apply_trx'; SET SESSION wsrep_sync_wait = 0; Loading wsrep_provider ... -SHOW STATUS LIKE 'wsrep_debug_sync_waiters'; -Variable_name Value -wsrep_debug_sync_waiters recv_IST_after_apply_trx +SET SESSION wsrep_on=OFF; +SET SESSION wsrep_on=ON; UPDATE t1 SET f2 = 'd' WHERE f1 > 3; CREATE TABLE t2 (f1 INTEGER); UPDATE t1 SET f2 = 'e' WHERE f1 > 4; diff --git a/mysql-test/suite/galera/r/mysql-wsrep#198.result b/mysql-test/suite/galera/r/mysql-wsrep#198.result index 25ba2cb615cf..a278c492372f 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#198.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#198.result @@ -1,5 +1,8 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB; +SELECT 1 FROM DUAL; +1 +1 LOCK TABLE t2 WRITE; OPTIMIZE TABLE t1,t2;; REPAIR TABLE t1,t2;; diff --git a/mysql-test/suite/galera/t/MW-329.test b/mysql-test/suite/galera/t/MW-329.test index 445f8795dff6..73f32b9e808b 100644 --- a/mysql-test/suite/galera/t/MW-329.test +++ b/mysql-test/suite/galera/t/MW-329.test @@ -79,3 +79,6 @@ SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N --connection node_1 DROP PROCEDURE proc_insert; DROP TABLE t1; + +# Due to MW-330, Multiple "conflict state 3 after post commit" warnings if table is dropped while SP is running +CALL mtr.add_suppression("conflict state 3 after post commit"); diff --git a/mysql-test/suite/galera/t/galera_as_slave_autoinc.test b/mysql-test/suite/galera/t/galera_as_slave_autoinc.test index bf04b274ca7d..639a518ad6f6 100644 --- a/mysql-test/suite/galera/t/galera_as_slave_autoinc.test +++ b/mysql-test/suite/galera/t/galera_as_slave_autoinc.test @@ -49,7 +49,7 @@ insert into t1(i) values(null), (null), (null); select * from t1; show variables like 'binlog_format'; -show variables like '%auto_increment%'; +show variables like 'auto_increment_increment'; --connection node_2 --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; diff --git a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test index 721d84ecb053..cb788fd7e70e 100644 --- a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test +++ b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test @@ -21,8 +21,11 @@ LOCK TABLE t1 WRITE; --connection node_1 INSERT INTO t1 VALUES (2); +--sleep 2 INSERT INTO t1 VALUES (3); +--sleep 2 INSERT INTO t1 VALUES (4); +--sleep 2 # This query will hang because flow control will kick in --send diff --git a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test index eae28bdbcd76..1323f084d29c 100644 --- a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test +++ b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test @@ -43,15 +43,16 @@ SET SESSION wsrep_sync_wait = 0; # ... and restart provider to force IST --echo Loading wsrep_provider ... --disable_query_log +# base_port setting is lost for some reason when unloading provider, so we need to restore it +--eval SET GLOBAL wsrep_provider_options= 'base_port=$NODE_GALERAPORT_2'; --eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig'; --eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig'; --enable_query_log -# We can not use a wait_condition on SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS as such queries are blocked during IST -# so we perform a simple sleep and SHOW instead - ---sleep 5 -SHOW STATUS LIKE 'wsrep_debug_sync_waiters'; +SET SESSION wsrep_on=OFF; +--let $wait_condition = SELECT VARIABLE_VALUE = '' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters'; +--source include/wait_condition.inc +SET SESSION wsrep_on=ON; --connection node_1 # Perform DML and DDL while IST is in progress diff --git a/mysql-test/suite/galera/t/mysql-wsrep#198.test b/mysql-test/suite/galera/t/mysql-wsrep#198.test index 3be61c024ae4..0e4606f49549 100644 --- a/mysql-test/suite/galera/t/mysql-wsrep#198.test +++ b/mysql-test/suite/galera/t/mysql-wsrep#198.test @@ -6,6 +6,9 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB; --connection node_2 +# Ensure that the tables have been created on node #2 +SELECT 1 FROM DUAL; + LOCK TABLE t2 WRITE; --connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 From d67023f2712c7e61627d982c34bf33e852314a30 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Mon, 27 Mar 2017 02:22:18 -0700 Subject: [PATCH 158/305] Galera MTR Tests: Fortify galera_ist_restart_joiner.test - remove DDLs, fix sync point handling --- .../galera/r/galera_ist_restart_joiner.result | 12 +--------- .../galera/t/galera_ist_restart_joiner.test | 23 ++++++------------- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result index 298105213ea0..ca6848fb925a 100644 --- a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result +++ b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result @@ -4,15 +4,11 @@ Unloading wsrep provider ... SET GLOBAL wsrep_provider = 'none'; UPDATE t1 SET f2 = 'b' WHERE f1 > 1; UPDATE t1 SET f2 = 'c' WHERE f1 > 2; -SET GLOBAL wsrep_provider_options = 'dbug=d,recv_IST_after_apply_trx'; -SET SESSION wsrep_sync_wait = 0; Loading wsrep_provider ... SET SESSION wsrep_on=OFF; SET SESSION wsrep_on=ON; UPDATE t1 SET f2 = 'd' WHERE f1 > 3; -CREATE TABLE t2 (f1 INTEGER); UPDATE t1 SET f2 = 'e' WHERE f1 > 4; -CREATE TABLE t3 (f1 INTEGER); Performing --wsrep-recover ... Starting server ... Using --wsrep-start-position when starting mysqld ... @@ -33,10 +29,4 @@ f1 f2 4 d 5 e 6 f -SELECT COUNT(*) = 0 FROM t2; -COUNT(*) = 0 -1 -SELECT COUNT(*) = 0 FROM t3; -COUNT(*) = 0 -1 -DROP TABLE t1, t2, t3; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test index 1323f084d29c..297f2379e1ba 100644 --- a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test +++ b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test @@ -26,13 +26,6 @@ UPDATE t1 SET f2 = 'b' WHERE f1 > 1; UPDATE t1 SET f2 = 'c' WHERE f1 > 2; --connection node_2 -# Make sure IST will block ... ---let $galera_sync_point = recv_IST_after_apply_trx ---source include/galera_set_sync_point.inc - -SET SESSION wsrep_sync_wait = 0; - - # Write file to make mysql-test-run.pl expect the crash, but don't start it --let $_server_id= `SELECT @@server_id` --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect @@ -46,19 +39,20 @@ SET SESSION wsrep_sync_wait = 0; # base_port setting is lost for some reason when unloading provider, so we need to restore it --eval SET GLOBAL wsrep_provider_options= 'base_port=$NODE_GALERAPORT_2'; --eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig'; +# Make sure IST will block ... +--let $galera_sync_point = recv_IST_after_apply_trx +--source include/galera_set_sync_point.inc --eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig'; --enable_query_log SET SESSION wsrep_on=OFF; ---let $wait_condition = SELECT VARIABLE_VALUE = '' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters'; +--let $wait_condition = SELECT VARIABLE_VALUE = 'recv_IST_after_apply_trx' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters'; --source include/wait_condition.inc SET SESSION wsrep_on=ON; --connection node_1 -# Perform DML and DDL while IST is in progress ---connection node_1 +# Perform DML while IST is in progress UPDATE t1 SET f2 = 'd' WHERE f1 > 3; -CREATE TABLE t2 (f1 INTEGER); # Kill node #2 while IST is in progress --connection node_2 @@ -81,9 +75,8 @@ EOF --let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' --source include/wait_condition.inc -# Perform DML and DDL while node #2 is down +# Perform DML while node #2 is down UPDATE t1 SET f2 = 'e' WHERE f1 > 4; -CREATE TABLE t3 (f1 INTEGER); --connection node_2 @@ -102,8 +95,6 @@ SELECT * FROM t1; --connection node_2 SELECT * FROM t1; -SELECT COUNT(*) = 0 FROM t2; -SELECT COUNT(*) = 0 FROM t3; --connection node_1 -DROP TABLE t1, t2, t3; +DROP TABLE t1; From 581140690a4bbf84b646d2462a34351d996af6f6 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 31 Mar 2017 11:37:49 +0300 Subject: [PATCH 159/305] Refs: GCF-1050 - fix for MTR test NODE_MYPORT assignments --- mysql-test/suite/galera/galera_3nodes_as_slave.cnf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/galera/galera_3nodes_as_slave.cnf b/mysql-test/suite/galera/galera_3nodes_as_slave.cnf index a7803abd08b5..e97dc11a09f1 100644 --- a/mysql-test/suite/galera/galera_3nodes_as_slave.cnf +++ b/mysql-test/suite/galera/galera_3nodes_as_slave.cnf @@ -79,8 +79,8 @@ NODE_MYSOCK_2= @mysqld.2.socket NODE_MYPORT_3= @mysqld.3.port NODE_MYSOCK_3= @mysqld.3.socket -NODE_MYPORT_3= @mysqld.4.port -NODE_MYSOCK_3= @mysqld.4.socket +NODE_MYPORT_4= @mysqld.4.port +NODE_MYSOCK_4= @mysqld.4.socket NODE_GALERAPORT_2= @mysqld.2.#galera_port NODE_GALERAPORT_3= @mysqld.3.#galera_port From 531e4f1b3547f4324a627f15b37c6ee985617f32 Mon Sep 17 00:00:00 2001 From: Philip Stoev Date: Fri, 31 Mar 2017 05:21:12 -0700 Subject: [PATCH 160/305] Galera MTR Tests: Fix galera_as_slave_gtid_replicate_do_db_cc.result after GCF-1050 --- .../galera/r/galera_as_slave_gtid_replicate_do_db_cc.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result index c968312b1848..0fa192c219f4 100644 --- a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result +++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result @@ -167,7 +167,7 @@ USE test2; ERROR 42000: Unknown database 'test2' SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120; Log_name Pos Event_type Server_id End_log_pos Info -mysqld-bin.000001 120 Previous_gtids 4 151 +mysqld-bin.000001 120 Previous_gtids 3 151 mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= ':1' mysqld-bin.000001 199 Query 1 294 CREATE SCHEMA test1 mysqld-bin.000001 294 Gtid 1 342 SET @@SESSION.GTID_NEXT= ':2' From 14cc18f53df31cf69e05f0973695ccfd0920505f Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 5 Apr 2017 10:51:42 +0300 Subject: [PATCH 161/305] Refs: MW-369 * added MTR test, which causes a crash in slave applying, due to FK constraint violation * mtr test is not deterministic, but can surface the crash, at least in my laptop --- mysql-test/suite/galera/t/MW-369.test | 82 +++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 mysql-test/suite/galera/t/MW-369.test diff --git a/mysql-test/suite/galera/t/MW-369.test b/mysql-test/suite/galera/t/MW-369.test new file mode 100644 index 000000000000..d27df96dadb3 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-369.test @@ -0,0 +1,82 @@ +# +# This test tests the operation of transaction replay for a transaction which operates on FK parent table. +# If a potentially conflicting remote transaction arrives at just the right time during the commit of a +# local transaction, the local transaction will be aborted and replayed. +# The replaying should be possible and honor the FK constraints. +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +--connection node_1 +SET AUTOCOMMIT=ON; +START TRANSACTION; + +DELETE FROM p WHERE f1 = 1; +SELECT * FROM p WHERE f1 = 2 FOR UPDATE; + +# Block the commit +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--let $galera_sync_point = commit_monitor_enter_sync +--source include/galera_set_sync_point.inc + +# +# insert client row, which will make it impossible to replay the delete on parent +# +--connection node_2 +INSERT INTO c values (1,1); + +--connection node_1 +--send COMMIT; + +# Wait until commit is blocked +--connection node_1a +SET SESSION wsrep_sync_wait = 0; +--source include/galera_wait_sync_point.inc + +# +# send conflicting delete which will make node1 trx to abort and replay +# +--connection node_2 +DELETE FROM p WHERE f1=2; + +# Wait for both transactions to be blocked +--connection node_1a +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'System lock'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT'; +--source include/wait_condition.inc + +# Unblock the commit +--connection node_1a +--source include/galera_clear_sync_point.inc +--source include/galera_signal_sync_point.inc + +# Commit succeeds +--connection node_1 +--reap + +# wsrep_local_replays has increased by 1 +--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` +--disable_query_log +--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays; +--enable_query_log + +--connection node_2 +SELECT COUNT(*) = 2 FROM p; +SELECT COUNT(*) = 1 FROM c; + +DROP TABLE c; +DROP TABLE p; From 03fbf21ddde14d645b30df2723d293e780f864ea Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 5 Apr 2017 12:08:06 +0300 Subject: [PATCH 162/305] Refs: MW-369 * changed insert for a FK child table to take exclusive lock on FK parent table --- storage/innobase/row/row0ins.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index 12ca0a328f23..9e8a6288399d 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -1629,7 +1629,7 @@ row_ins_check_foreign_constraint( foreign, rec, check_index, - check_ref, TRUE); + check_ref, FALSE); #endif /* WITH_WSREP */ goto end_scan; } else if (foreign->type != 0) { From 243fd4a5571d7d3f0dcf4ec0f0ac4a604a80aab2 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Thu, 6 Apr 2017 09:23:30 +0300 Subject: [PATCH 163/305] MW-369 MTR tests for foreign key conflicts Tests MW-369C, MW-369D haven't been recorded yet since the outcome from the tests is not what is desired. --- mysql-test/suite/galera/r/MW-369A.result | 30 +++++++++++ mysql-test/suite/galera/r/MW-369B.result | 31 +++++++++++ mysql-test/suite/galera/t/MW-369.inc | 67 ++++++++++++++++++++++++ mysql-test/suite/galera/t/MW-369A.test | 50 ++++++++++++++++++ mysql-test/suite/galera/t/MW-369B.test | 48 +++++++++++++++++ mysql-test/suite/galera/t/MW-369C.test | 49 +++++++++++++++++ mysql-test/suite/galera/t/MW-369D.test | 48 +++++++++++++++++ 7 files changed, 323 insertions(+) create mode 100644 mysql-test/suite/galera/r/MW-369A.result create mode 100644 mysql-test/suite/galera/r/MW-369B.result create mode 100644 mysql-test/suite/galera/t/MW-369.inc create mode 100644 mysql-test/suite/galera/t/MW-369A.test create mode 100644 mysql-test/suite/galera/t/MW-369B.test create mode 100644 mysql-test/suite/galera/t/MW-369C.test create mode 100644 mysql-test/suite/galera/t/MW-369D.test diff --git a/mysql-test/suite/galera/r/MW-369A.result b/mysql-test/suite/galera/r/MW-369A.result new file mode 100644 index 000000000000..9e8ed8fc1003 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-369A.result @@ -0,0 +1,30 @@ +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +DELETE FROM p WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +INSERT INTO c VALUES (1, 1); +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +1 0 +2 0 +SELECT * FROM c; +f1 p_id +1 1 +DROP TABLE c; +DROP TABLE p; diff --git a/mysql-test/suite/galera/r/MW-369B.result b/mysql-test/suite/galera/r/MW-369B.result new file mode 100644 index 000000000000..b8916a5fc4ec --- /dev/null +++ b/mysql-test/suite/galera/r/MW-369B.result @@ -0,0 +1,31 @@ +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, +f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE c SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SELECT * FROM p; +f1 f2 +1 1 +2 0 +SELECT * FROM c; +f1 p_id f2 +1 1 1 +DROP TABLE c; +DROP TABLE p; diff --git a/mysql-test/suite/galera/t/MW-369.inc b/mysql-test/suite/galera/t/MW-369.inc new file mode 100644 index 000000000000..ed750de93e4f --- /dev/null +++ b/mysql-test/suite/galera/t/MW-369.inc @@ -0,0 +1,67 @@ +# +# This file should be included from tests for MW-369 to run concurrent +# transaction from node_1 with autocommit query from node_2. +# +# The parameters: +# * $mw_369_parent_query - the parent query to be run inside transaction +# * $mw_369_child_query - the child query +# +# The operations are the following: +# +# node_1: +# START TRANSACTION; +# $mw_369_parent_query +# node_2 +# $mw_369_child_query - will be blocked on node_1 in apply monitor +# node_1: +# COMMIT; - will be blocked on node_1 in local monitor +# +# The $mw_369_child_query is always expected to succeed. The caller is +# responsible for checking if the final COMMIT on connection node_1 +# succeeds. +# + +--connection node_1 +SET AUTOCOMMIT=ON; +START TRANSACTION; + +--eval $mw_369_parent_query + +# +# Block the $mw_369_child_query from node_2 +# +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +SET SESSION wsrep_sync_wait = 0; +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_set_sync_point.inc + +# +# insert client row, which will make it impossible to replay the +# delete on parent +# +--connection node_2 +--eval $mw_369_child_query + +# +# Wait until $mw_369_child_query from node_2 reaches the sync point and +# block the 'COMMIT' from node_1 before it certifies. +# +--connection node_1a +--source include/galera_wait_sync_point.inc +--source include/galera_clear_sync_point.inc +--let $galera_sync_point = local_monitor_enter_sync +--source include/galera_set_sync_point.inc + +--connection node_1 +--send COMMIT + +# +# Wait until both sync points have been reached +# +--connection node_1a +--let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_enter_sync +--source include/galera_wait_sync_point.inc +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_signal_sync_point.inc +--let $galera_sync_point = local_monitor_enter_sync +--source include/galera_signal_sync_point.inc diff --git a/mysql-test/suite/galera/t/MW-369A.test b/mysql-test/suite/galera/t/MW-369A.test new file mode 100644 index 000000000000..707d3df3b141 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-369A.test @@ -0,0 +1,50 @@ +# +# Test Outline: +# ============ +# +# This test tests the scenario for MW-369 where a new child table +# row referring to parent table row is inserted concurrently from +# another node while the transaction which tries to delete a +# referred row from the parent table is committing. +# +# The p table will originally have rows (1, 0), (2, 0). +# The c table will be empty. +# +# A new row (1, 1) pointing to parent row (1, 0) is inserted from +# connection node_2, the transaction which tries to remove the +# parent row (1, 0) is run from connection node_1. +# +# Expected outcome: +# ================ +# +# The transaction on node_1 will fail. The parent table will contain +# rows (1, 0), (2, 0) and the child table will contain row (1, 1). +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +--let $mw_369_parent_query = DELETE FROM p WHERE f1 = 1 +--let $mw_369_child_query = INSERT INTO c VALUES (1, 1) +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; diff --git a/mysql-test/suite/galera/t/MW-369B.test b/mysql-test/suite/galera/t/MW-369B.test new file mode 100644 index 000000000000..98de9aa9c43e --- /dev/null +++ b/mysql-test/suite/galera/t/MW-369B.test @@ -0,0 +1,48 @@ +# +# Test Outline: +# ============ +# +# This test tests the scenario for MW-369 where a existing +# child table row is updated concurrently from another node +# with a transaction which updates the parent table. +# +# The p table will originally have rows (1, 0), (2, 0). +# The c table will originally have rows (1, 1, 0) which points +# to parent table row (1, 0). +# +# Expected outcome: +# ================ +# +# Both updates should succeed since they are done to separate tables and +# rows. The parent table will contain rows (1, 1), (2, 0). The child +# table will contain row (1, 1, 1). +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, + f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); + +--let mw_369_parent_query = UPDATE p SET f2 = 1 WHERE f1 = 1 +--let $mw_369_child_query = UPDATE c SET f2 = 1 WHERE f1 = 1 +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; diff --git a/mysql-test/suite/galera/t/MW-369C.test b/mysql-test/suite/galera/t/MW-369C.test new file mode 100644 index 000000000000..903eda6bf7de --- /dev/null +++ b/mysql-test/suite/galera/t/MW-369C.test @@ -0,0 +1,49 @@ +# +# Test Outline: +# ============ +# +# This test tests the scenario for MW-369 where a child table row is +# deleted concurrently from the other node while a transaction updates +# the parent table referred by the child table row. +# +# The p table will originally have rows (1, 0), (2, 0) +# The c table will originally have row (1, 1) which points to parent +# table row (1, 0). +# +# A row (1, 1) pointing to parent row (1, 0) is deleted from +# connection node_2, the transaction which tries to update the +# parent row (1, 0) is run from connection node_1. +# +# Expected Outcome: +# ================ +# Both operations on node_1 and node_2 should succeed without conflicts. +# The parent table should contain values (1, 1), (2, 0) and the child +# table should be empty. + +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1); + +--let $mw_369_parent_query = UPDATE p SET f2 = 1 WHERE f1 = 1 +--let $mw_369_child_query = DELETE FROM c WHERE f1 = 1 +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; diff --git a/mysql-test/suite/galera/t/MW-369D.test b/mysql-test/suite/galera/t/MW-369D.test new file mode 100644 index 000000000000..6b86da1da6a4 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-369D.test @@ -0,0 +1,48 @@ +# +# Test Outline: +# ============ +# +# This test tests the scenario for MW-369 where a child table row is +# inserted concurrently from the other node while a transaction updates +# the parent table referred by the newly inserted child table row. +# +# The p table will originally have rows (1, 0), (2, 0). +# The c table will originally be empty. +# +# A row (1, 1) pointing to parent row (1, 0) is inserted from +# connection node_2, the transaction which tries to update the +# parent row (1, 0) is run from connection node_1. +# +# Expected Outcome: +# ================ +# Both operations on node_1 and node_2 should succeed without conflicts. +# The parent table should contain values (1, 1), (2, 0) and the child +# table should contain a row (1, 1) +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +--let $mw_369_parent_query = UPDATE p SET f2 = 1 WHERE f1 = 1 +--let $mw_369_child_query = INSERT INTO c VALUES (1, 1) +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; From d0aa4e5e45407ac1c52ab6e4c24a8b35555ca90e Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 7 Apr 2017 00:18:30 +0300 Subject: [PATCH 164/305] Refs: MW-369 * changed parent row key type to S(hared), when FK child table is being updated or deleted --- storage/innobase/row/row0ins.cc | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index 9e8a6288399d..c3feb967f029 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -1281,11 +1281,12 @@ row_ins_foreign_check_on_constraint( #ifdef WITH_WSREP err = wsrep_append_foreign_key( - thr_get_trx(thr), - foreign, - clust_rec, - clust_index, - FALSE, FALSE); + thr_get_trx(thr), + foreign, + clust_rec, + clust_index, + FALSE, + (node) ? TRUE : FALSE); if (err != DB_SUCCESS) { fprintf(stderr, "WSREP: foreign key append failed: %d\n", err); @@ -1446,6 +1447,9 @@ row_ins_check_foreign_constraint( ulint* offsets = offsets_; rec_offs_init(offsets_); +#ifdef WITH_WSREP + upd_node= NULL; +#endif /* WITH_WSREP */ run_again: #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_SHARED)); @@ -1627,9 +1631,10 @@ row_ins_check_foreign_constraint( err = wsrep_append_foreign_key( thr_get_trx(thr), foreign, - rec, - check_index, - check_ref, FALSE); + rec, + check_index, + check_ref, + (upd_node) ? TRUE : FALSE); #endif /* WITH_WSREP */ goto end_scan; } else if (foreign->type != 0) { From 715ec3891ff762137d6c24fbff6813ecb7627251 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 10 Apr 2017 13:09:20 +0300 Subject: [PATCH 165/305] MW-369 Fixed test MW-369D, recorded MW-369C, MW-369D --- mysql-test/suite/galera/r/MW-369A.result | 1 + mysql-test/suite/galera/r/MW-369B.result | 1 + mysql-test/suite/galera/r/MW-369C.result | 30 +++++++++++++++++++++++ mysql-test/suite/galera/r/MW-369D.result | 31 ++++++++++++++++++++++++ mysql-test/suite/galera/t/MW-369.inc | 1 + mysql-test/suite/galera/t/MW-369C.test | 2 ++ mysql-test/suite/galera/t/MW-369D.test | 8 +++--- 7 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 mysql-test/suite/galera/r/MW-369C.result create mode 100644 mysql-test/suite/galera/r/MW-369D.result diff --git a/mysql-test/suite/galera/r/MW-369A.result b/mysql-test/suite/galera/r/MW-369A.result index 9e8ed8fc1003..50215a1f2a8b 100644 --- a/mysql-test/suite/galera/r/MW-369A.result +++ b/mysql-test/suite/galera/r/MW-369A.result @@ -16,6 +16,7 @@ SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; COMMIT; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction diff --git a/mysql-test/suite/galera/r/MW-369B.result b/mysql-test/suite/galera/r/MW-369B.result index b8916a5fc4ec..c368f00ec90f 100644 --- a/mysql-test/suite/galera/r/MW-369B.result +++ b/mysql-test/suite/galera/r/MW-369B.result @@ -18,6 +18,7 @@ SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; COMMIT; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; SELECT * FROM p; diff --git a/mysql-test/suite/galera/r/MW-369C.result b/mysql-test/suite/galera/r/MW-369C.result new file mode 100644 index 000000000000..56656ad75f01 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-369C.result @@ -0,0 +1,30 @@ +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM c WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SELECT * FROM p; +f1 f2 +1 1 +2 0 +SELECT * FROM c; +f1 p_id +DROP TABLE c; +DROP TABLE p; diff --git a/mysql-test/suite/galera/r/MW-369D.result b/mysql-test/suite/galera/r/MW-369D.result new file mode 100644 index 000000000000..2ab5b5ac262f --- /dev/null +++ b/mysql-test/suite/galera/r/MW-369D.result @@ -0,0 +1,31 @@ +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +INSERT INTO c VALUES (1, 1); +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +1 0 +2 0 +SELECT * FROM c; +f1 p_id +1 1 +DROP TABLE c; +DROP TABLE p; diff --git a/mysql-test/suite/galera/t/MW-369.inc b/mysql-test/suite/galera/t/MW-369.inc index ed750de93e4f..fdc26823ccac 100644 --- a/mysql-test/suite/galera/t/MW-369.inc +++ b/mysql-test/suite/galera/t/MW-369.inc @@ -61,6 +61,7 @@ SET SESSION wsrep_sync_wait = 0; --connection node_1a --let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_enter_sync --source include/galera_wait_sync_point.inc +--source include/galera_clear_sync_point.inc --let $galera_sync_point = apply_monitor_slave_enter_sync --source include/galera_signal_sync_point.inc --let $galera_sync_point = local_monitor_enter_sync diff --git a/mysql-test/suite/galera/t/MW-369C.test b/mysql-test/suite/galera/t/MW-369C.test index 903eda6bf7de..d4b1a08df84c 100644 --- a/mysql-test/suite/galera/t/MW-369C.test +++ b/mysql-test/suite/galera/t/MW-369C.test @@ -16,9 +16,11 @@ # # Expected Outcome: # ================ +# # Both operations on node_1 and node_2 should succeed without conflicts. # The parent table should contain values (1, 1), (2, 0) and the child # table should be empty. +# --source include/galera_cluster.inc --source include/have_innodb.inc diff --git a/mysql-test/suite/galera/t/MW-369D.test b/mysql-test/suite/galera/t/MW-369D.test index 6b86da1da6a4..db2bfcd09c05 100644 --- a/mysql-test/suite/galera/t/MW-369D.test +++ b/mysql-test/suite/galera/t/MW-369D.test @@ -15,9 +15,10 @@ # # Expected Outcome: # ================ -# Both operations on node_1 and node_2 should succeed without conflicts. -# The parent table should contain values (1, 1), (2, 0) and the child -# table should contain a row (1, 1) +# +# The parent operation on connection node_1 will conflict with an insert +# to node_2. The parent table will contain rows (1, 0), (2, 0) and +# the child table will contain row (1, 1). # --source include/galera_cluster.inc @@ -38,6 +39,7 @@ INSERT INTO p VALUES (2, 0); # Commit succeeds --connection node_1 +--error ER_LOCK_DEADLOCK --reap --connection node_2 From 51857cda02807b62eaebe86f571021399cb1be19 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Sat, 15 Apr 2017 02:20:36 +0300 Subject: [PATCH 166/305] Refs: MW-369 * fixed sync point usage in MW-369.inc, which made it impossible to run this test with --repeat option * moved all MW-369*.test tests into MW-369.test file, each as one separate test phase * added two more test phases, in MW-369.test file * tests MW-369A, MW-369B and MW-369C are obsolete after this commit --- mysql-test/suite/galera/r/MW-369.result | 155 +++++++++++++++ mysql-test/suite/galera/t/MW-369.inc | 10 +- mysql-test/suite/galera/t/MW-369.test | 248 ++++++++++++++++++++---- 3 files changed, 370 insertions(+), 43 deletions(-) create mode 100644 mysql-test/suite/galera/r/MW-369.result diff --git a/mysql-test/suite/galera/r/MW-369.result b/mysql-test/suite/galera/r/MW-369.result new file mode 100644 index 000000000000..516904d1b2aa --- /dev/null +++ b/mysql-test/suite/galera/r/MW-369.result @@ -0,0 +1,155 @@ +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +DELETE FROM p WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +INSERT INTO c VALUES (1, 1); +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +1 0 +2 0 +SELECT * FROM c; +f1 p_id +1 1 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, +f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE c SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +SELECT * FROM p; +f1 f2 +1 1 +2 0 +SELECT * FROM c; +f1 p_id f2 +1 1 1 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM c WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +SELECT * FROM p; +f1 f2 +1 1 +2 0 +SELECT * FROM c; +f1 p_id +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER UNIQUE KEY) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f2)) ; +INSERT INTO p VALUES (1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +INSERT INTO c VALUES (1, 0);; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +1 0 +SELECT * FROM c; +f1 p_id +1 0 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) +ON DELETE CASCADE) ; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +DELETE FROM p WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE c SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +1 0 +2 0 +SELECT * FROM c; +f1 p_id f2 +1 1 1 +DROP TABLE c; +DROP TABLE p; diff --git a/mysql-test/suite/galera/t/MW-369.inc b/mysql-test/suite/galera/t/MW-369.inc index ed750de93e4f..5fd9ef150ae0 100644 --- a/mysql-test/suite/galera/t/MW-369.inc +++ b/mysql-test/suite/galera/t/MW-369.inc @@ -30,7 +30,8 @@ START TRANSACTION; # # Block the $mw_369_child_query from node_2 # ---connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a SET SESSION wsrep_sync_wait = 0; --let $galera_sync_point = apply_monitor_slave_enter_sync --source include/galera_set_sync_point.inc @@ -49,6 +50,7 @@ SET SESSION wsrep_sync_wait = 0; --connection node_1a --source include/galera_wait_sync_point.inc --source include/galera_clear_sync_point.inc + --let $galera_sync_point = local_monitor_enter_sync --source include/galera_set_sync_point.inc @@ -61,7 +63,13 @@ SET SESSION wsrep_sync_wait = 0; --connection node_1a --let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_enter_sync --source include/galera_wait_sync_point.inc + +# +# both threads are now parked in sync points, signal them to continue +# --let $galera_sync_point = apply_monitor_slave_enter_sync --source include/galera_signal_sync_point.inc + --let $galera_sync_point = local_monitor_enter_sync --source include/galera_signal_sync_point.inc +--source include/galera_clear_sync_point.inc diff --git a/mysql-test/suite/galera/t/MW-369.test b/mysql-test/suite/galera/t/MW-369.test index d27df96dadb3..720d6daf518c 100644 --- a/mysql-test/suite/galera/t/MW-369.test +++ b/mysql-test/suite/galera/t/MW-369.test @@ -1,8 +1,24 @@ # -# This test tests the operation of transaction replay for a transaction which operates on FK parent table. -# If a potentially conflicting remote transaction arrives at just the right time during the commit of a -# local transaction, the local transaction will be aborted and replayed. -# The replaying should be possible and honor the FK constraints. +# Test A Outline: +# =============== +# +# This test tests the scenario for MW-369 where a new child table +# row referring to parent table row is inserted concurrently from +# another node while the transaction which tries to delete a +# referred row from the parent table is committing. +# +# The p table will originally have rows (1, 0), (2, 0). +# The c table will be empty. +# +# A new row (1, 1) pointing to parent row (1, 0) is inserted from +# connection node_2, the transaction which tries to remove the +# parent row (1, 0) is run from connection node_1. +# +# Expected outcome: +# ================ +# +# The transaction on node_1 will fail. The parent table will contain +# rows (1, 0), (2, 0) and the child table will contain row (1, 1). # --source include/galera_cluster.inc @@ -10,8 +26,6 @@ --source include/have_debug_sync.inc --source suite/galera/include/galera_have_debug_sync.inc ---let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` - CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; @@ -19,64 +33,214 @@ CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, INSERT INTO p VALUES (1, 0); INSERT INTO p VALUES (2, 0); +--let $mw_369_parent_query = DELETE FROM p WHERE f1 = 1 +--let $mw_369_child_query = INSERT INTO c VALUES (1, 1) + +# +# we must open connection node_1a here, MW-369.inc will use it later +# +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--source MW-369.inc + +# Commit fails --connection node_1 -SET AUTOCOMMIT=ON; -START TRANSACTION; +--error ER_LOCK_DEADLOCK +--reap -DELETE FROM p WHERE f1 = 1; -SELECT * FROM p WHERE f1 = 2 FOR UPDATE; +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; -# Block the commit ---connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 ---let $galera_sync_point = commit_monitor_enter_sync ---source include/galera_set_sync_point.inc +DROP TABLE c; +DROP TABLE p; # -# insert client row, which will make it impossible to replay the delete on parent +# Test B Outline: +# =============== +# +# This test tests the scenario for MW-369 where a existing +# child table row is updated concurrently from another node +# with a transaction which updates the parent table. +# +# The p table will originally have rows (1, 0), (2, 0). +# The c table will originally have rows (1, 1, 0) which points +# to parent table row (1, 0). +# +# Expected outcome: +# ================ +# +# Both updates should succeed since they are done to separate tables and +# rows. The parent table will contain rows (1, 1), (2, 0). The child +# table will contain row (1, 1, 1). # ---connection node_2 -INSERT INTO c values (1,1); --connection node_1 ---send COMMIT; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, + f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); + +--let mw_369_parent_query = UPDATE p SET f2 = 1 WHERE f1 = 1 +--let $mw_369_child_query = UPDATE c SET f2 = 1 WHERE f1 = 1 +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; -# Wait until commit is blocked ---connection node_1a -SET SESSION wsrep_sync_wait = 0; ---source include/galera_wait_sync_point.inc +DROP TABLE c; +DROP TABLE p; # -# send conflicting delete which will make node1 trx to abort and replay +# Test C Outline: +# =============== # ---connection node_2 -DELETE FROM p WHERE f1=2; +# This test tests the scenario for MW-369 where a child table row is +# deleted concurrently from the other node while a transaction updates +# the parent table referred by the child table row. +# +# The p table will originally have rows (1, 0), (2, 0) +# The c table will originally have row (1, 1) which points to parent +# table row (1, 0). +# +# A row (1, 1) pointing to parent row (1, 0) is deleted from +# connection node_2, the transaction which tries to update the +# parent row (1, 0) is run from connection node_1. +# +# Expected Outcome: +# ================ +# Both operations on node_1 and node_2 should succeed without conflicts. +# The parent table should contain values (1, 1), (2, 0) and the child +# table should be empty. -# Wait for both transactions to be blocked ---connection node_1a ---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'System lock'; ---source include/wait_condition.inc +--connection node_1 +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; ---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT'; ---source include/wait_condition.inc +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1); -# Unblock the commit ---connection node_1a ---source include/galera_clear_sync_point.inc ---source include/galera_signal_sync_point.inc +--let $mw_369_parent_query = UPDATE p SET f2 = 1 WHERE f1 = 1 +--let $mw_369_child_query = DELETE FROM c WHERE f1 = 1 +--source MW-369.inc # Commit succeeds --connection node_1 --reap -# wsrep_local_replays has increased by 1 ---let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` ---disable_query_log ---eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays; ---enable_query_log +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + + +# +# Test D Outline: +# =============== +# +# This test is similar to test A, where parent row is deleted while a child row +# is inserted simultaneously on node 2. However, in this test case the FK +# constraint's target column is a unique key, and parent row is not delete, +# but this key value is changed so that insert on node 2 will cause FK +# violation +# +# The p table will originally have rows (1, 0) +# The c table will originally be empty +# +# in node_1, parent row is updated to value (1,1) +# A row (1, 0) pointing to the old version of parent row (1, 0) is inserted +# in connection node_2 +# +# Expected Outcome: +# ================ +# This is a true conflict and one transaciton must abort. In this case it is node_1 +# transaction, which was scheduled later. +# Parent table should have row (1,0) +# child table should have row (1,0) +# + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER UNIQUE KEY) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f2)) ; + +INSERT INTO p VALUES (1, 0); + +--let $mw_369_parent_query = UPDATE p SET f2 = 1 WHERE f1 = 1 +--let $mw_369_child_query = INSERT INTO c VALUES (1, 0); +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# Test E Outline: +# =============== +# +# This test is similar to test B, where parent row is deleted while a child row +# is updated simultaneously on node 2. However, in this test case the FK +# constraint has ON DELETE CASCADE option, and the delete on parent row will +# cascade a delete on child row as well. This will cause true conflict with +# connection node_2, which tries to update unrelated column on child table. +# +# The p table will originally have rows (1, 0), (2,0) +# The c table will originally have row (1,1,0) +# +# in node_1, parent row (1,0) is deleted and cascaded delete will happen on +# child table row (1,1,0). +# in connection node_2 child table row is update to value (1,1,1) +# +# Expected Outcome: +# ================ +# This is a true conflict and one transaciton must abort. In this case it is node_1 +# transaction, which was scheduled later. +# Parent table should have rows (1,0), (2,0) +# child table should have row (1,1,1) +# + + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) + ON DELETE CASCADE) ; + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = DELETE FROM p WHERE f1 = 1 +--let $mw_369_child_query = UPDATE c SET f2 = 1 WHERE f1 = 1 +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap --connection node_2 -SELECT COUNT(*) = 2 FROM p; -SELECT COUNT(*) = 1 FROM c; +SELECT * FROM p; +SELECT * FROM c; DROP TABLE c; DROP TABLE p; + From d13f36d303b02447e21a3af12a3f58d4ae5d52da Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 27 Apr 2017 19:51:18 +0300 Subject: [PATCH 167/305] MW-322 - CTAS fix merged to 5.5-v25 branch --- sql/handler.cc | 5 +++++ sql/sql_base.cc | 10 +++++++++ sql/sql_insert.cc | 29 +++++++++++++++++++++++++++ sql/wsrep_mysqld.cc | 24 +++++++--------------- sql/wsrep_mysqld.h | 11 ++++++++++ storage/innobase/handler/ha_innodb.cc | 20 ++++++++++-------- 6 files changed, 74 insertions(+), 25 deletions(-) diff --git a/sql/handler.cc b/sql/handler.cc index 9e033586bb9e..20b2a2d34ce2 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -5412,6 +5412,11 @@ void ha_wsrep_fake_trx_id(THD *thd) DBUG_VOID_RETURN; } + if (thd->wsrep_ws_handle.trx_id != WSREP_UNDEFINED_TRX_ID) + { + WSREP_DEBUG("fake trx id skipped: %lu", thd->wsrep_ws_handle.trx_id); + DBUG_VOID_RETURN; + } handlerton *hton= installed_htons[DB_TYPE_INNODB]; if (hton && hton->wsrep_fake_trx_id) { diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 813842847900..0e2a2b92736f 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -9021,9 +9021,19 @@ void tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type, I_P_List_iterator it(share->free_tables); #ifndef DBUG_OFF if (remove_type == TDC_RT_REMOVE_ALL) +#ifdef WITH_WSREP + { + /* following assert may cause false posivive fire for CTAS */ + if (thd->lex->sql_command != SQLCOM_CREATE_TABLE) + { +#endif /* WITH_WSREP */ { DBUG_ASSERT(share->used_tables.is_empty()); } +#ifdef WITH_WSREP + } + } +#endif /* WITH_WSREP */ else if (remove_type == TDC_RT_REMOVE_NOT_OWN) { I_P_List_iterator it2(share->used_tables); diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 42fd4b88f501..c9c6cb129cfa 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -4116,9 +4116,38 @@ bool select_create::send_eof() */ if (!table->s->tmp_table) { + #ifdef WITH_WSREP + /* + append table level exclusive key for CTAS + */ + wsrep_key_arr_t key_arr= {0, 0}; + wsrep_prepare_keys_for_isolation(thd, + create_table->db, + create_table->table_name, + table_list, + &key_arr); + int rcode = wsrep->append_key( + wsrep, + &thd->wsrep_ws_handle, + key_arr.keys, //&wkey, + key_arr.keys_len, + WSREP_KEY_EXCLUSIVE, + false); + wsrep_keys_free(&key_arr); + if (rcode) { + DBUG_PRINT("wsrep", ("row key failed: %d", rcode)); + WSREP_ERROR("Appending table key for CTAS failed: %s, %d", + (wsrep_thd_query(thd)) ? + wsrep_thd_query(thd) : "void", rcode); + return true; + } + /* If commit fails, we should be able to reset the OK status. */ + thd->stmt_da->can_overwrite_status= TRUE; +#endif /* WITH_WSREP */ trans_commit_stmt(thd); trans_commit_implicit(thd); #ifdef WITH_WSREP + thd->stmt_da->can_overwrite_status= FALSE; mysql_mutex_lock(&thd->LOCK_wsrep_thd); if (thd->wsrep_conflict_state != NO_CONFLICT) { diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index f04d35b912ad..3502621fe913 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -915,17 +915,7 @@ bool wsrep_sync_wait (THD* thd, uint mask) return false; } -/* - * Helpers to deal with TOI key arrays - */ -typedef struct wsrep_key_arr -{ - wsrep_key_t* keys; - size_t keys_len; -} wsrep_key_arr_t; - - -static void wsrep_keys_free(wsrep_key_arr_t* key_arr) +void wsrep_keys_free(wsrep_key_arr_t* key_arr) { for (size_t i= 0; i < key_arr->keys_len; ++i) { @@ -990,11 +980,11 @@ static bool wsrep_prepare_key_for_isolation(const char* db, } /* Prepare key list from db/table and table_list */ -static bool wsrep_prepare_keys_for_isolation(THD* thd, - const char* db, - const char* table, - const TABLE_LIST* table_list, - wsrep_key_arr_t* ka) +bool wsrep_prepare_keys_for_isolation(THD* thd, + const char* db, + const char* table, + const TABLE_LIST* table_list, + wsrep_key_arr_t* ka) { ka->keys= 0; ka->keys_len= 0; @@ -1508,7 +1498,7 @@ wsrep_grant_mdl_exception(MDL_context *requestor_ctx, } else if (request_thd->lex->sql_command == SQLCOM_DROP_TABLE) { - WSREP_DEBUG("DROP caused BF abort"); + WSREP_DEBUG("DROP caused BF abort, conf %d", granted_thd->wsrep_conflict_state); ticket->wsrep_report(wsrep_debug); mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd); wsrep_abort_thd((void*)request_thd, (void*)granted_thd, 1); diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index a979e282be7e..120bbd36c861 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -314,4 +314,15 @@ const wsrep_uuid_t* wsrep_xid_uuid(const xid_t*); wsrep_seqno_t wsrep_xid_seqno(const xid_t*); extern "C" int wsrep_is_wsrep_xid(const void* xid); +typedef struct wsrep_key_arr +{ + wsrep_key_t* keys; + size_t keys_len; +} wsrep_key_arr_t; +bool wsrep_prepare_keys_for_isolation(THD* thd, + const char* db, + const char* table, + const TABLE_LIST* table_list, + wsrep_key_arr_t* ka); +void wsrep_keys_free(wsrep_key_arr_t* key_arr); #endif /* WSREP_MYSQLD_H */ diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 4d5db3136033..9abfced79cfa 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -5860,8 +5860,9 @@ ha_innobase::write_row( user_thd); #ifdef WITH_WSREP if (!error_result && wsrep_thd_exec_mode(user_thd) == LOCAL_STATE && - wsrep_on(user_thd) && !wsrep_consistency_check(user_thd) && - (sql_command != SQLCOM_LOAD || + wsrep_on(user_thd) && !wsrep_consistency_check(user_thd) && + (sql_command != SQLCOM_CREATE_TABLE) && + (sql_command != SQLCOM_LOAD || thd_binlog_format(user_thd) == BINLOG_FORMAT_ROW)) { if (wsrep_append_keys(user_thd, false, record, NULL)) { @@ -12555,8 +12556,10 @@ wsrep_innobase_kill_one_trx(void *bf_thd_ptr, trx_t *bf_trx, trx_t *victim_trx, wsrep_thd_thread_id(thd), victim_trx->id); - WSREP_DEBUG("Aborting query: %s", - (thd && wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void"); + WSREP_DEBUG("Aborting query: %s conf %d trx: %lu", + (thd && wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void", + wsrep_thd_conflict_state(thd), + wsrep_thd_ws_handle(thd)->trx_id); wsrep_thd_LOCK(thd); @@ -12608,9 +12611,8 @@ wsrep_innobase_kill_one_trx(void *bf_thd_ptr, trx_t *bf_trx, trx_t *victim_trx, } else { rcode = wsrep->abort_pre_commit( wsrep, bf_seqno, - (wsrep_trx_id_t)victim_trx->id + (wsrep_trx_id_t)wsrep_thd_ws_handle(thd)->trx_id ); - switch (rcode) { case WSREP_WARNING: WSREP_DEBUG("cancel commit warning: %llu", @@ -12733,9 +12735,10 @@ wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd, DBUG_ENTER("wsrep_innobase_abort_thd"); trx_t* victim_trx = thd_to_trx(victim_thd); trx_t* bf_trx = (bf_thd) ? thd_to_trx(bf_thd) : NULL; - WSREP_DEBUG("abort transaction: BF: %s victim: %s", + WSREP_DEBUG("abort transaction: BF: %s victim: %s victim conf: %d", wsrep_thd_query(bf_thd), - wsrep_thd_query(victim_thd)); + wsrep_thd_query(victim_thd), + wsrep_thd_conflict_state(victim_thd)); if (victim_trx) { @@ -12787,6 +12790,7 @@ wsrep_fake_trx_id( mutex_enter(&kernel_mutex); trx_id_t trx_id = trx_sys_get_new_trx_id(); mutex_exit(&kernel_mutex); + WSREP_DEBUG("innodb fake trx id: %lu thd: %s", trx_id, wsrep_thd_query(thd)); (void *)wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd), trx_id); } From c2195315b79565ed3a86305d09f6f63fdfeec2ab Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 27 Apr 2017 20:28:22 +0300 Subject: [PATCH 168/305] MW-369 - merged fix for FK issue from 5.6-v25 branch --- storage/innobase/row/row0ins.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/storage/innobase/row/row0ins.c b/storage/innobase/row/row0ins.c index c380390d62ae..3726c517ff0f 100644 --- a/storage/innobase/row/row0ins.c +++ b/storage/innobase/row/row0ins.c @@ -1082,11 +1082,12 @@ row_ins_foreign_check_on_constraint( #ifdef WITH_WSREP err = wsrep_append_foreign_key( - thr_get_trx(thr), - foreign, - clust_rec, - clust_index, - FALSE, FALSE); + thr_get_trx(thr), + foreign, + clust_rec, + clust_index, + FALSE, + (node) ? TRUE : FALSE); if (err != DB_SUCCESS) { fprintf(stderr, "WSREP: foreign key append failed: %lu\n", err); @@ -1247,6 +1248,9 @@ row_ins_check_foreign_constraint( ulint* offsets = offsets_; rec_offs_init(offsets_); +#ifdef WITH_WSREP + upd_node= NULL; +#endif /* WITH_WSREP */ run_again: #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_SHARED)); @@ -1429,9 +1433,10 @@ row_ins_check_foreign_constraint( err = wsrep_append_foreign_key( thr_get_trx(thr), foreign, - rec, - check_index, - check_ref, TRUE); + rec, + check_index, + check_ref, + (upd_node) ? TRUE : FALSE); #endif /* WITH_WSREP */ goto end_scan; } else if (foreign->type != 0) { From 04bd6041fb0f230933846294ff1747914551c813 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Tue, 2 May 2017 10:15:39 +0300 Subject: [PATCH 169/305] MW-371 Add tests with innodb-force-recovery > 4 into galera.skip --- mysql-test/suite/innodb/t/galera.skip | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/suite/innodb/t/galera.skip b/mysql-test/suite/innodb/t/galera.skip index 45eebdb54e43..35c94eb0aed5 100644 --- a/mysql-test/suite/innodb/t/galera.skip +++ b/mysql-test/suite/innodb/t/galera.skip @@ -46,3 +46,5 @@ innodb-index-debug : Unsafe statement written to the binary log using statement flush-hang : Unsafe statement written to the binary log innodb_deadlock_with_autoinc : Test uses autoinc_lock_mode = 0 innodb_stats_del_mark : Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. +ibuf_not_empty : InnoDB: Failing assertion: !srv_read_only_mode with server restart +innodb_force_recovery : InnoDB: Failing assertion: !srv_read_only_mode with server restart \ No newline at end of file From a7e19e62d037b0974c026fb126f88843de5b8571 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Fri, 5 May 2017 10:55:45 +0300 Subject: [PATCH 170/305] MW-322 Fix compilation error with debug build --- storage/innobase/handler/ha_innodb.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 9abfced79cfa..e25816c61bc6 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -12790,7 +12790,7 @@ wsrep_fake_trx_id( mutex_enter(&kernel_mutex); trx_id_t trx_id = trx_sys_get_new_trx_id(); mutex_exit(&kernel_mutex); - WSREP_DEBUG("innodb fake trx id: %lu thd: %s", trx_id, wsrep_thd_query(thd)); + WSREP_DEBUG("innodb fake trx id: %llu thd: %s", trx_id, wsrep_thd_query(thd)); (void *)wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd), trx_id); } From 78d6c56451a7f0b782eea558b681e901c4cf1a1e Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 5 May 2017 11:09:01 +0300 Subject: [PATCH 171/305] MW-322 CTAS fix Pushed fix for a typo --- sql/sql_insert.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index c9c6cb129cfa..438894b5fb22 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -4116,7 +4116,7 @@ bool select_create::send_eof() */ if (!table->s->tmp_table) { - #ifdef WITH_WSREP +#ifdef WITH_WSREP /* append table level exclusive key for CTAS */ From f3e3685e1eda2cae159dfb942925cafe086e24e1 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 8 May 2017 16:23:25 +0300 Subject: [PATCH 172/305] MW-369 Removing obsoleted tests --- mysql-test/suite/galera/r/MW-369A.result | 31 -------------- mysql-test/suite/galera/r/MW-369B.result | 32 --------------- mysql-test/suite/galera/r/MW-369C.result | 30 -------------- mysql-test/suite/galera/r/MW-369D.result | 31 -------------- mysql-test/suite/galera/t/MW-369A.test | 50 ----------------------- mysql-test/suite/galera/t/MW-369B.test | 48 ---------------------- mysql-test/suite/galera/t/MW-369C.test | 51 ------------------------ mysql-test/suite/galera/t/MW-369D.test | 50 ----------------------- 8 files changed, 323 deletions(-) delete mode 100644 mysql-test/suite/galera/r/MW-369A.result delete mode 100644 mysql-test/suite/galera/r/MW-369B.result delete mode 100644 mysql-test/suite/galera/r/MW-369C.result delete mode 100644 mysql-test/suite/galera/r/MW-369D.result delete mode 100644 mysql-test/suite/galera/t/MW-369A.test delete mode 100644 mysql-test/suite/galera/t/MW-369B.test delete mode 100644 mysql-test/suite/galera/t/MW-369C.test delete mode 100644 mysql-test/suite/galera/t/MW-369D.test diff --git a/mysql-test/suite/galera/r/MW-369A.result b/mysql-test/suite/galera/r/MW-369A.result deleted file mode 100644 index 50215a1f2a8b..000000000000 --- a/mysql-test/suite/galera/r/MW-369A.result +++ /dev/null @@ -1,31 +0,0 @@ -CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; -CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, -CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; -INSERT INTO p VALUES (1, 0); -INSERT INTO p VALUES (2, 0); -SET AUTOCOMMIT=ON; -START TRANSACTION; -DELETE FROM p WHERE f1 = 1; -SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; -INSERT INTO c VALUES (1, 1); -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; -COMMIT; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction -SELECT * FROM p; -f1 f2 -1 0 -2 0 -SELECT * FROM c; -f1 p_id -1 1 -DROP TABLE c; -DROP TABLE p; diff --git a/mysql-test/suite/galera/r/MW-369B.result b/mysql-test/suite/galera/r/MW-369B.result deleted file mode 100644 index c368f00ec90f..000000000000 --- a/mysql-test/suite/galera/r/MW-369B.result +++ /dev/null @@ -1,32 +0,0 @@ -CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; -CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, -f2 INTEGER, -CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; -INSERT INTO p VALUES (1, 0); -INSERT INTO p VALUES (2, 0); -INSERT INTO c VALUES (1, 1, 0); -SET AUTOCOMMIT=ON; -START TRANSACTION; -UPDATE p SET f2 = 1 WHERE f1 = 1; -SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; -UPDATE c SET f2 = 1 WHERE f1 = 1; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; -COMMIT; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; -SELECT * FROM p; -f1 f2 -1 1 -2 0 -SELECT * FROM c; -f1 p_id f2 -1 1 1 -DROP TABLE c; -DROP TABLE p; diff --git a/mysql-test/suite/galera/r/MW-369C.result b/mysql-test/suite/galera/r/MW-369C.result deleted file mode 100644 index 56656ad75f01..000000000000 --- a/mysql-test/suite/galera/r/MW-369C.result +++ /dev/null @@ -1,30 +0,0 @@ -CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; -CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, -CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; -INSERT INTO p VALUES (1, 0); -INSERT INTO p VALUES (2, 0); -INSERT INTO c VALUES (1, 1); -SET AUTOCOMMIT=ON; -START TRANSACTION; -UPDATE p SET f2 = 1 WHERE f1 = 1; -SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; -DELETE FROM c WHERE f1 = 1; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; -COMMIT; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; -SELECT * FROM p; -f1 f2 -1 1 -2 0 -SELECT * FROM c; -f1 p_id -DROP TABLE c; -DROP TABLE p; diff --git a/mysql-test/suite/galera/r/MW-369D.result b/mysql-test/suite/galera/r/MW-369D.result deleted file mode 100644 index 2ab5b5ac262f..000000000000 --- a/mysql-test/suite/galera/r/MW-369D.result +++ /dev/null @@ -1,31 +0,0 @@ -CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; -CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, -CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; -INSERT INTO p VALUES (1, 0); -INSERT INTO p VALUES (2, 0); -SET AUTOCOMMIT=ON; -START TRANSACTION; -UPDATE p SET f2 = 1 WHERE f1 = 1; -SET SESSION wsrep_sync_wait = 0; -SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; -INSERT INTO c VALUES (1, 1); -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; -COMMIT; -SET SESSION wsrep_on = 0; -SET SESSION wsrep_on = 1; -SET GLOBAL wsrep_provider_options = 'dbug='; -SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; -SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction -SELECT * FROM p; -f1 f2 -1 0 -2 0 -SELECT * FROM c; -f1 p_id -1 1 -DROP TABLE c; -DROP TABLE p; diff --git a/mysql-test/suite/galera/t/MW-369A.test b/mysql-test/suite/galera/t/MW-369A.test deleted file mode 100644 index 707d3df3b141..000000000000 --- a/mysql-test/suite/galera/t/MW-369A.test +++ /dev/null @@ -1,50 +0,0 @@ -# -# Test Outline: -# ============ -# -# This test tests the scenario for MW-369 where a new child table -# row referring to parent table row is inserted concurrently from -# another node while the transaction which tries to delete a -# referred row from the parent table is committing. -# -# The p table will originally have rows (1, 0), (2, 0). -# The c table will be empty. -# -# A new row (1, 1) pointing to parent row (1, 0) is inserted from -# connection node_2, the transaction which tries to remove the -# parent row (1, 0) is run from connection node_1. -# -# Expected outcome: -# ================ -# -# The transaction on node_1 will fail. The parent table will contain -# rows (1, 0), (2, 0) and the child table will contain row (1, 1). -# - ---source include/galera_cluster.inc ---source include/have_innodb.inc ---source include/have_debug_sync.inc ---source suite/galera/include/galera_have_debug_sync.inc - -CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; -CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, - CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; - -INSERT INTO p VALUES (1, 0); -INSERT INTO p VALUES (2, 0); - ---let $mw_369_parent_query = DELETE FROM p WHERE f1 = 1 ---let $mw_369_child_query = INSERT INTO c VALUES (1, 1) ---source MW-369.inc - -# Commit fails ---connection node_1 ---error ER_LOCK_DEADLOCK ---reap - ---connection node_2 -SELECT * FROM p; -SELECT * FROM c; - -DROP TABLE c; -DROP TABLE p; diff --git a/mysql-test/suite/galera/t/MW-369B.test b/mysql-test/suite/galera/t/MW-369B.test deleted file mode 100644 index 98de9aa9c43e..000000000000 --- a/mysql-test/suite/galera/t/MW-369B.test +++ /dev/null @@ -1,48 +0,0 @@ -# -# Test Outline: -# ============ -# -# This test tests the scenario for MW-369 where a existing -# child table row is updated concurrently from another node -# with a transaction which updates the parent table. -# -# The p table will originally have rows (1, 0), (2, 0). -# The c table will originally have rows (1, 1, 0) which points -# to parent table row (1, 0). -# -# Expected outcome: -# ================ -# -# Both updates should succeed since they are done to separate tables and -# rows. The parent table will contain rows (1, 1), (2, 0). The child -# table will contain row (1, 1, 1). -# - ---source include/galera_cluster.inc ---source include/have_innodb.inc ---source include/have_debug_sync.inc ---source suite/galera/include/galera_have_debug_sync.inc - -CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; -CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, - f2 INTEGER, - CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; - -INSERT INTO p VALUES (1, 0); -INSERT INTO p VALUES (2, 0); -INSERT INTO c VALUES (1, 1, 0); - ---let mw_369_parent_query = UPDATE p SET f2 = 1 WHERE f1 = 1 ---let $mw_369_child_query = UPDATE c SET f2 = 1 WHERE f1 = 1 ---source MW-369.inc - -# Commit succeeds ---connection node_1 ---reap - ---connection node_2 -SELECT * FROM p; -SELECT * FROM c; - -DROP TABLE c; -DROP TABLE p; diff --git a/mysql-test/suite/galera/t/MW-369C.test b/mysql-test/suite/galera/t/MW-369C.test deleted file mode 100644 index d4b1a08df84c..000000000000 --- a/mysql-test/suite/galera/t/MW-369C.test +++ /dev/null @@ -1,51 +0,0 @@ -# -# Test Outline: -# ============ -# -# This test tests the scenario for MW-369 where a child table row is -# deleted concurrently from the other node while a transaction updates -# the parent table referred by the child table row. -# -# The p table will originally have rows (1, 0), (2, 0) -# The c table will originally have row (1, 1) which points to parent -# table row (1, 0). -# -# A row (1, 1) pointing to parent row (1, 0) is deleted from -# connection node_2, the transaction which tries to update the -# parent row (1, 0) is run from connection node_1. -# -# Expected Outcome: -# ================ -# -# Both operations on node_1 and node_2 should succeed without conflicts. -# The parent table should contain values (1, 1), (2, 0) and the child -# table should be empty. -# - ---source include/galera_cluster.inc ---source include/have_innodb.inc ---source include/have_debug_sync.inc ---source suite/galera/include/galera_have_debug_sync.inc - -CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; -CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, - CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; - -INSERT INTO p VALUES (1, 0); -INSERT INTO p VALUES (2, 0); -INSERT INTO c VALUES (1, 1); - ---let $mw_369_parent_query = UPDATE p SET f2 = 1 WHERE f1 = 1 ---let $mw_369_child_query = DELETE FROM c WHERE f1 = 1 ---source MW-369.inc - -# Commit succeeds ---connection node_1 ---reap - ---connection node_2 -SELECT * FROM p; -SELECT * FROM c; - -DROP TABLE c; -DROP TABLE p; diff --git a/mysql-test/suite/galera/t/MW-369D.test b/mysql-test/suite/galera/t/MW-369D.test deleted file mode 100644 index db2bfcd09c05..000000000000 --- a/mysql-test/suite/galera/t/MW-369D.test +++ /dev/null @@ -1,50 +0,0 @@ -# -# Test Outline: -# ============ -# -# This test tests the scenario for MW-369 where a child table row is -# inserted concurrently from the other node while a transaction updates -# the parent table referred by the newly inserted child table row. -# -# The p table will originally have rows (1, 0), (2, 0). -# The c table will originally be empty. -# -# A row (1, 1) pointing to parent row (1, 0) is inserted from -# connection node_2, the transaction which tries to update the -# parent row (1, 0) is run from connection node_1. -# -# Expected Outcome: -# ================ -# -# The parent operation on connection node_1 will conflict with an insert -# to node_2. The parent table will contain rows (1, 0), (2, 0) and -# the child table will contain row (1, 1). -# - ---source include/galera_cluster.inc ---source include/have_innodb.inc ---source include/have_debug_sync.inc ---source suite/galera/include/galera_have_debug_sync.inc - -CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; -CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, - CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; - -INSERT INTO p VALUES (1, 0); -INSERT INTO p VALUES (2, 0); - ---let $mw_369_parent_query = UPDATE p SET f2 = 1 WHERE f1 = 1 ---let $mw_369_child_query = INSERT INTO c VALUES (1, 1) ---source MW-369.inc - -# Commit succeeds ---connection node_1 ---error ER_LOCK_DEADLOCK ---reap - ---connection node_2 -SELECT * FROM p; -SELECT * FROM c; - -DROP TABLE c; -DROP TABLE p; From 917f36ef977302fc137874028362329dfb49f5ae Mon Sep 17 00:00:00 2001 From: sjaakola Date: Mon, 8 May 2017 23:03:01 +0300 Subject: [PATCH 173/305] MW-369 FK fixes Skipping wsrep extra FK checking for applier and replayer threads --- storage/innobase/row/row0upd.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index 6a79b1ecbd1a..6e2745838bde 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -1977,7 +1977,9 @@ row_upd_sec_index_entry( index, offsets, thr, &mtr); } #ifdef WITH_WSREP - if (err == DB_SUCCESS && !referenced && + if (wsrep_on(trx->mysql_thd) && + !wsrep_thd_is_BF(trx->mysql_thd, FALSE) && + err == DB_SUCCESS && !referenced && !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE && ((upd_node_t*)parent)->cascade_node == node) && From 0381a1f026b9f36896cc776bf9ed0695475aee8d Mon Sep 17 00:00:00 2001 From: sjaakola Date: Mon, 8 May 2017 23:12:51 +0300 Subject: [PATCH 174/305] MW-369 FK fixes Skipping wsrep extra FK check for applier and replayer --- storage/innobase/row/row0upd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/innobase/row/row0upd.c b/storage/innobase/row/row0upd.c index 5563158a92c4..83899ba1e4b3 100644 --- a/storage/innobase/row/row0upd.c +++ b/storage/innobase/row/row0upd.c @@ -1826,7 +1826,9 @@ row_upd_sec_index_entry( index, offsets, thr, &mtr); } #ifdef WITH_WSREP - if (err == DB_SUCCESS && !referenced && + if (wsrep_on(trx->mysql_thd) && + !wsrep_thd_is_BF(trx->mysql_thd, FALSE) && + err == DB_SUCCESS && !referenced && !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE && ((upd_node_t*)parent)->cascade_node == node) && From e1671942b30070dca1a3575f1dfc7eea73396dd4 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 10 May 2017 15:59:52 +0300 Subject: [PATCH 175/305] MW-378 enabling build with WITH_WSREP=OFF only one fix here, enables build of mysqld however, building embedded server fails in linking phase --- sql/handler.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/handler.cc b/sql/handler.cc index fa71d33545dd..1336a0b23aa6 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1595,9 +1595,11 @@ int ha_rollback_low(THD *thd, bool all) { // cannot happen my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err); error= 1; +#ifdef WITH_WSREP WSREP_WARN("handlerton rollback failed, thd %lu %lld conf %d SQL %s", thd->thread_id, thd->query_id, thd->wsrep_conflict_state, thd->query()); +#endif /* WITH_WSREP */ } status_var_increment(thd->status_var.ha_rollback_count); ha_info_next= ha_info->next(); From 83fb2cb74899243e10778015345e794118a937fd Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 22 Feb 2017 10:57:39 +0200 Subject: [PATCH 176/305] Refs: MW-363 * enabling binlog file copying even for binlog files with basename "0" * mtr suite uses binlog files with names: 0.000001, 0.000002.. and so on --- sql/wsrep_sst.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index 345ed75407a9..1379f4476962 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -361,8 +361,7 @@ static int generate_binlog_opt_val(char** ret) if (opt_bin_log && gtid_mode > 0) { assert(opt_bin_logname); - *ret= strcmp(opt_bin_logname, "0") ? - my_strdup(opt_bin_logname, MYF(0)) : my_strdup("", MYF(0)); + *ret= my_strdup(opt_bin_logname, MYF(0)); } else { From 2331fcb1abc04682401392b20475844a10773e2d Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 24 Apr 2017 18:39:38 +0300 Subject: [PATCH 177/305] MW-373 Wait for wsrep_ready at startup when provider is loaded Conflicts: mysql-test/include/kill_and_restart_mysqld.inc --- mysql-test/include/restart_mysqld.inc | 3 +++ mysql-test/include/start_mysqld.inc | 3 +++ mysql-test/include/wait_wsrep_ready.inc | 15 +++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 mysql-test/include/wait_wsrep_ready.inc diff --git a/mysql-test/include/restart_mysqld.inc b/mysql-test/include/restart_mysqld.inc index 7cb9c7994d8f..140472b9283d 100644 --- a/mysql-test/include/restart_mysqld.inc +++ b/mysql-test/include/restart_mysqld.inc @@ -26,6 +26,9 @@ shutdown_server 10; # Call script that will poll the server waiting for it to be back online again --source include/wait_until_connected_again.inc +# Wait for wsrep +--source include/wait_wsrep_ready.inc + # Turn off reconnect again --disable_reconnect diff --git a/mysql-test/include/start_mysqld.inc b/mysql-test/include/start_mysqld.inc index 4ee3d17810cb..baa79bec1fd7 100644 --- a/mysql-test/include/start_mysqld.inc +++ b/mysql-test/include/start_mysqld.inc @@ -18,5 +18,8 @@ if ($galera_wsrep_start_position == '') { # Call script that will poll the server waiting for it to be back online again --source include/wait_until_connected_again.inc +# Wait for wsrep +--source include/wait_wsrep_ready.inc + # Turn off reconnect again --disable_reconnect diff --git a/mysql-test/include/wait_wsrep_ready.inc b/mysql-test/include/wait_wsrep_ready.inc new file mode 100644 index 000000000000..0e666afa33d2 --- /dev/null +++ b/mysql-test/include/wait_wsrep_ready.inc @@ -0,0 +1,15 @@ +# +# If the wsrep plugin is loaded, wait until the wsrep provider becomes +# ready for use. +# + +--disable_query_log +--disable_result_log + +if (`SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`) +{ + --source include/galera_wait_ready.inc +} + +--enable_query_log +--enable_result_log From dd32cac6927633524980f74045a78de5f86bdd4b Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Thu, 20 Apr 2017 16:23:40 +0300 Subject: [PATCH 178/305] MW-371: Fix debian versioning for 5.6 hyphen will not work for >= jessie and will fail with: "can't build with source format '3.0 (native)': native package version may not have a revision" Conflicts: packaging/deb-in/CMakeLists.txt --- packaging/deb-in/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 6be1bbd20179..3456cb6060cb 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -33,7 +33,7 @@ IF (DEB_PRODUCT STREQUAL "commercial") SET (DEB_NOTPRODUCTNAME "community") SET (DEB_LICENSENAME "Advanced") SET (DEB_INSTALL_LICENSEFILE "LICENSE.mysql") - SET (DEB_SERVERVERSION "${VERSION}+commercial-1") + SET (DEB_SERVERVERSION "${DEB_BASE_VERSION}+commercial.1") SET (DEB_PLUGIN_SETPERMISSION "") # List of plugins that are only in commercial packages # Plugins that are in both community and commercial should NOT be added here @@ -68,7 +68,7 @@ ELSE() SET (DEB_NOTPRODUCTNAME "commercial") SET (DEB_LICENSENAME "GPL") SET (DEB_INSTALL_LICENSEFILE "COPYING") - SET (DEB_SERVERVERSION "${VERSION}-1") + SET (DEB_SERVERVERSION "${DEB_BASE_VERSION}+1") SET (DEB_REMOVEPATTERN "com.in") SET (DEB_PLUGIN_SETPERMISSION "usr/bin/mysql_setpermission") ENDIF() @@ -185,7 +185,7 @@ ELSEIF(DEB_CODENAME STREQUAL "xenial") ELSEIF(DEB_CODENAME STREQUAL "yakkety") SET (DEB_PLATFORMRELEASE "ubuntu16.10") SET (DEB_CONTROL_BDEPS "dh-apparmor, dh-systemd (>=1.5)") - SET (DEB_INSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/") + SET (DEB_INc2a2537ed7d9ff9272571a03b67e0ef7ec0792ceSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/") SET (DEB_RULES_INSTALL_SYSTEMD "install -m 0755 debian/extra/mysql-systemd-start debian/tmp/usr/share/mysql/") SET (DEB_RULES_INSTALL_APPARMOR From 7a5141fdcebe898c2635618e9ab88096166e3dbd Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Tue, 18 Apr 2017 19:32:35 +0300 Subject: [PATCH 179/305] IN-4: Remove incorrect replace for libmysqlclient-dev Conflicts: packaging/deb-in/control.in --- packaging/deb-in/control.in | 1 - 1 file changed, 1 deletion(-) diff --git a/packaging/deb-in/control.in b/packaging/deb-in/control.in index ab8cafb2d7fb..abc96c5c304e 100644 --- a/packaging/deb-in/control.in +++ b/packaging/deb-in/control.in @@ -143,7 +143,6 @@ Section: libdevel Depends: libmysqlclient18 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Replaces: mysql-client-5.6, mysql-client-core-5.6, - mysql-client-5.7, mysql-client-core-5.7 Description: MySQL development headers The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server From 85c56c9c5feccbdedbfc16b255ddbba63cf49cdf Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Wed, 10 May 2017 19:47:19 +0300 Subject: [PATCH 180/305] [WIP] Brush up after MW-371 merge for specs A lot of work to be done Last stop: client package --- packaging/deb-in/CMakeLists.txt | 151 +- packaging/deb-in/README.Maintainer | 26 +- packaging/deb-in/changelog.in | 12 + packaging/deb-in/control.in | 154 +- .../deb-in/extra/Docs__Images__Makefile.in | 6 + packaging/deb-in/extra/Docs__Makefile.in | 6 + packaging/deb-in/extra/apparmor-profile | 1 + packaging/deb-in/extra/configure-symlinks | 15 + packaging/deb-in/extra/debian-start | 32 + packaging/deb-in/extra/debian-start.inc.sh | 72 + .../deb-in/extra/debian_create_root_user.sql | 23 + packaging/deb-in/extra/echo_stderr | 2 + .../deb-in/extra/innotop/changelog.innotop | 357 + packaging/deb-in/extra/innotop/innotop | 10946 ++++++++++++++++ packaging/deb-in/extra/innotop/innotop.1 | 2084 +++ packaging/deb-in/extra/my.cnf.fallback | 18 + packaging/deb-in/extra/mysql-helpers | 53 +- packaging/deb-in/extra/mysql-systemd-start | 37 +- packaging/deb-in/extra/mysql.cnf | 14 +- .../deb-in/extra/mysql.conf.d/mysqld.cnf | 100 + .../extra/mysql.conf.d/mysqld_safe_syslog.cnf | 2 + packaging/deb-in/extra/mysqlreport | 1298 ++ packaging/deb-in/extra/mysqlreport.1 | 180 + packaging/deb-in/extra/source_mysql-5.6.py | 54 + packaging/deb-in/gbp.conf | 8 + .../libmysqlclient-dev.README.Maintainer.in | 4 + .../deb-in/libmysqlclient-dev.examples.in | 1 + .../deb-in/libmysqlclient-dev.install.in | 6 +- ...ckagesource-client-SERIES.README.Debian.in | 4 + .../mysql-packagesource-client-SERIES.docs.in | 2 + ...sql-packagesource-client-SERIES.install.in | 20 + ...mysql-packagesource-client-SERIES.links.in | 3 + ...esource-client-SERIES.lintian-overrides.in | 21 + ...ql-packagesource-client-SERIES.manpages.in | 14 + .../mysql-packagesource-client.conffiles.in | 25 - ...mysql-packagesource-common-SERIES.dirs.in} | 1 + ...sql-packagesource-common-SERIES.install.in | 29 + ...source-common-SERIES.lintian-overrides.in} | 7 +- ...packagesource-common-SERIES.maintscript.in | 2 + ...ql-packagesource-common-SERIES.postinst.in | 56 + ...ysql-packagesource-common-SERIES.postrm.in | 27 + ...sql-packagesource-common-SERIES.preinst.in | 37 + ...mysql-packagesource-common-SERIES.prerm.in | 8 + ...ckagesource-server-SERIES.README.Debian.in | 109 + ...ysql-packagesource-server-SERIES.config.in | 97 + ...mysql-packagesource-server-SERIES.dirs.in} | 8 +- ...ql-packagesource-server-SERIES.examples.in | 3 + ...sql-packagesource-server-SERIES.install.in | 124 + ...esource-server-SERIES.lintian-overrides.in | 19 + ...-server-SERIES.logcheck.ignore.paranoid.in | 8 + ...ce-server-SERIES.logcheck.ignore.server.in | 17 + ...rver-SERIES.logcheck.ignore.workstation.in | 17 + ...ce-server-SERIES.mysql-server.logrotate.in | 27 + ...-packagesource-server-SERIES.mysql.init.in | 197 + ...ckagesource-server-SERIES.mysql.service.in | 39 + ...ql-packagesource-server-SERIES.postinst.in | 282 + ...ysql-packagesource-server-SERIES.postrm.in | 120 + ...sql-packagesource-server-SERIES.preinst.in | 220 + ...mysql-packagesource-server-SERIES.prerm.in | 25 + ...l-packagesource-server-SERIES.templates.in | 88 + ...gesource-server-SERIES.upstart.disabled.in | 63 + .../mysql-packagesource-server.postinst.in | 24 +- .../mysql-packagesource-server.preinst.in | 6 + ...sql-packagesource-source-SERIES.install.in | 21 + ...esource-source-SERIES.lintian-overrides.in | 19 + ...mysql-packagesource-test-SERIES.install.in | 95 + .../mysql-packagesource-test-SERIES.links.in | 17 + ...agesource-test-SERIES.lintian-overrides.in | 19 + packaging/deb-in/rules.in | 108 +- packaging/deb-in/source/format | 2 +- packaging/deb-in/source/include-binaries | 13 +- 71 files changed, 17517 insertions(+), 188 deletions(-) create mode 100644 packaging/deb-in/extra/Docs__Images__Makefile.in create mode 100644 packaging/deb-in/extra/Docs__Makefile.in create mode 100755 packaging/deb-in/extra/configure-symlinks create mode 100644 packaging/deb-in/extra/debian-start create mode 100644 packaging/deb-in/extra/debian-start.inc.sh create mode 100644 packaging/deb-in/extra/debian_create_root_user.sql create mode 100644 packaging/deb-in/extra/echo_stderr create mode 100644 packaging/deb-in/extra/innotop/changelog.innotop create mode 100644 packaging/deb-in/extra/innotop/innotop create mode 100644 packaging/deb-in/extra/innotop/innotop.1 create mode 100644 packaging/deb-in/extra/mysql.conf.d/mysqld.cnf create mode 100644 packaging/deb-in/extra/mysql.conf.d/mysqld_safe_syslog.cnf create mode 100644 packaging/deb-in/extra/mysqlreport create mode 100644 packaging/deb-in/extra/mysqlreport.1 create mode 100644 packaging/deb-in/extra/source_mysql-5.6.py create mode 100644 packaging/deb-in/gbp.conf create mode 100644 packaging/deb-in/libmysqlclient-dev.README.Maintainer.in create mode 100644 packaging/deb-in/libmysqlclient-dev.examples.in create mode 100644 packaging/deb-in/mysql-packagesource-client-SERIES.README.Debian.in create mode 100644 packaging/deb-in/mysql-packagesource-client-SERIES.docs.in create mode 100644 packaging/deb-in/mysql-packagesource-client-SERIES.install.in create mode 100644 packaging/deb-in/mysql-packagesource-client-SERIES.links.in create mode 100644 packaging/deb-in/mysql-packagesource-client-SERIES.lintian-overrides.in create mode 100644 packaging/deb-in/mysql-packagesource-client-SERIES.manpages.in delete mode 100644 packaging/deb-in/mysql-packagesource-client.conffiles.in rename packaging/deb-in/{patches/series => mysql-packagesource-common-SERIES.dirs.in} (97%) create mode 100644 packaging/deb-in/mysql-packagesource-common-SERIES.install.in rename packaging/deb-in/{mysql-packagesource-bench.lintian-overrides.in => mysql-packagesource-common-SERIES.lintian-overrides.in} (69%) create mode 100644 packaging/deb-in/mysql-packagesource-common-SERIES.maintscript.in create mode 100644 packaging/deb-in/mysql-packagesource-common-SERIES.postinst.in create mode 100644 packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in create mode 100644 packaging/deb-in/mysql-packagesource-common-SERIES.preinst.in create mode 100644 packaging/deb-in/mysql-packagesource-common-SERIES.prerm.in create mode 100644 packaging/deb-in/mysql-packagesource-server-SERIES.README.Debian.in create mode 100644 packaging/deb-in/mysql-packagesource-server-SERIES.config.in rename packaging/deb-in/{mysql-packagesource-bench.install.in => mysql-packagesource-server-SERIES.dirs.in} (74%) create mode 100644 packaging/deb-in/mysql-packagesource-server-SERIES.examples.in create mode 100644 packaging/deb-in/mysql-packagesource-server-SERIES.install.in create mode 100644 packaging/deb-in/mysql-packagesource-server-SERIES.lintian-overrides.in create mode 100644 packaging/deb-in/mysql-packagesource-server-SERIES.logcheck.ignore.paranoid.in create mode 100644 packaging/deb-in/mysql-packagesource-server-SERIES.logcheck.ignore.server.in create mode 100644 packaging/deb-in/mysql-packagesource-server-SERIES.logcheck.ignore.workstation.in create mode 100644 packaging/deb-in/mysql-packagesource-server-SERIES.mysql-server.logrotate.in create mode 100755 packaging/deb-in/mysql-packagesource-server-SERIES.mysql.init.in create mode 100644 packaging/deb-in/mysql-packagesource-server-SERIES.mysql.service.in create mode 100755 packaging/deb-in/mysql-packagesource-server-SERIES.postinst.in create mode 100755 packaging/deb-in/mysql-packagesource-server-SERIES.postrm.in create mode 100755 packaging/deb-in/mysql-packagesource-server-SERIES.preinst.in create mode 100755 packaging/deb-in/mysql-packagesource-server-SERIES.prerm.in create mode 100644 packaging/deb-in/mysql-packagesource-server-SERIES.templates.in create mode 100644 packaging/deb-in/mysql-packagesource-server-SERIES.upstart.disabled.in create mode 100644 packaging/deb-in/mysql-packagesource-source-SERIES.install.in create mode 100644 packaging/deb-in/mysql-packagesource-source-SERIES.lintian-overrides.in create mode 100644 packaging/deb-in/mysql-packagesource-test-SERIES.install.in create mode 100644 packaging/deb-in/mysql-packagesource-test-SERIES.links.in create mode 100644 packaging/deb-in/mysql-packagesource-test-SERIES.lintian-overrides.in diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 3456cb6060cb..f2ad67f1fc71 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -16,7 +16,6 @@ IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux") RETURN() ENDIF() - IF (NOT DEFINED DEB_CODENAME) execute_process( COMMAND lsb_release -cs @@ -25,19 +24,31 @@ IF (NOT DEFINED DEB_CODENAME) ) SET (DEB_CODENAME ${DEB_CODENAME} CACHE STRING "") ENDIF() +IF (DEFINED WITH_NDBCLUSTER_STORAGE_ENGINE) + SET (DEB_BASE_PRODUCT "cluster-") + SET (DEB_BASE_PRODUCTC "Cluster ") + SET (DEB_BASE_VERSION ${NDBVERSION}) + SET (DEB_CONTROL_SERVER_CONFLICT_NDB "mysql-community-server, mysql-commercial-server") + SET (DEB_CONTROL_CLIENT_CONFLICT_NDB "mysql-community-client, mysql-commercial-client") +ELSE() + SET (DEB_BASE_PRODUCT "") + SET (DEB_BASE_PRODUCTC "") + SET (DEB_BASE_VERSION ${VERSION}) + SET (DEB_CONTROL_SERVER_CONFLICT_NDB "mysql-cluster-community-server, mysql-cluster-commercial-server") + SET (DEB_CONTROL_CLIENT_CONFLICT_NDB "mysql-cluster-community-client, mysql-cluster-commercial-client") +ENDIF() # Commercial or community IF (DEB_PRODUCT STREQUAL "commercial") + message (FATAL_ERROR "mysql-wsrep is GPL only, no commercial builds") SET (DEB_COPYRIGHT_UPSTREAMNAME "MySQL Commercial Server ${MYSQL_BASE_VERSION}") - SET (DEB_PRODUCTNAME "commercial") - SET (DEB_PRODUCTNAMEC "Commercial") - SET (DEB_NOTPRODUCTNAME "community") + SET (DEB_PRODUCTNAME "${DEB_BASE_PRODUCT}commercial") + SET (DEB_PRODUCTNAMEC "${DEB_BASE_PRODUCTC}Commercial") + SET (DEB_NOTPRODUCTNAME "${DEB_BASE_PRODUCT}community") SET (DEB_LICENSENAME "Advanced") SET (DEB_INSTALL_LICENSEFILE "LICENSE.mysql") SET (DEB_SERVERVERSION "${DEB_BASE_VERSION}+commercial.1") - SET (DEB_PLUGIN_SETPERMISSION "") # List of plugins that are only in commercial packages # Plugins that are in both community and commercial should NOT be added here - SET (DEB_INCLUDE_BINARIES_EXTRA " debian/extra/audit_log-plugin @@ -55,28 +66,53 @@ usr/lib/mysql/plugin/thread_pool.so usr/lib/mysql/plugin/firewall.so usr/lib/mysql/plugin/debug/audit_log.so usr/lib/mysql/plugin/debug/authentication_pam.so +usr/lib/mysql/plugin/debug/keyring_okv.so usr/lib/mysql/plugin/debug/openssl_udf.so usr/lib/mysql/plugin/debug/thread_pool.so usr/lib/mysql/plugin/debug/firewall.so ") SET (DEB_REMOVEPATTERN "gpl.in") ELSE() - SET (DEB_PRODUCT "community") + SET (DEB_PRODUCT "${DEB_BASE_PRODUCT}community") SET (DEB_COPYRIGHT_UPSTREAMNAME "MySQL Server ${MYSQL_BASE_VERSION}") - SET (DEB_PRODUCTNAME "community") - SET (DEB_PRODUCTNAMEC "Community") - SET (DEB_NOTPRODUCTNAME "commercial") + SET (DEB_PRODUCTNAME "${DEB_BASE_PRODUCT}community") + SET (DEB_PRODUCTNAMEC "${DEB_BASE_PRODUCTC}Community") + SET (DEB_NOTPRODUCTNAME "${DEB_BASE_PRODUCT}commercial") SET (DEB_LICENSENAME "GPL") SET (DEB_INSTALL_LICENSEFILE "COPYING") SET (DEB_SERVERVERSION "${DEB_BASE_VERSION}+1") SET (DEB_REMOVEPATTERN "com.in") - SET (DEB_PLUGIN_SETPERMISSION "usr/bin/mysql_setpermission") ENDIF() +# mysql-wsrep ! +SET (DEB_PRODUCTNAME "wsrep") +SET (DEB_PRODUCTNAMEC "Wsrep") +SET (DEB_PRODUCTSERIES "-5.6") + +# For each startup mechanism, files are constant across distro version +SET (FILES_STARTUP_SYSTEMD +" +usr/bin/mysqld_pre_systemd +usr/bin/mysqld_bootstrap +lib/systemd/system/mysql@.service +lib/systemd/system/mysql.service +") +SET (FILES_STARTUP_SYSV +" +etc/init.d/mysql +usr/bin/mysqld_safe +") +SET (FILES_STARTUP_UPSTART +" +Not Yet Implememted: Upstart File List +") + # Platform specifics. The differences are generally only distro version -# and whether or not systemd and/or apparmor are available +# and whether or not Systemd and/or apparmor are available IF (DEB_CODENAME STREQUAL "wheezy") SET (DEB_PLATFORMRELEASE "debian7") + # Following the Oracle example, we package for Debian 7 + # using only SysV init and no Apparmor. SET (DEB_CONTROL_BDEPS "") SET (DEB_INSTALL_SOURCE_XZ "") SET (DEB_RULES_INSTALL_SYSTEMD "") @@ -87,22 +123,34 @@ IF (DEB_CODENAME STREQUAL "wheezy") SET (DEB_INSTALL_SERVER_SYSTEMD "") SET (DEB_INSTALL_SERVER_APPARMOR "") SET (DEB_SERVICE_SERVER_EXECPRE "") + SET (DEB_SERVICE_SERVER_EXECPOST "") SET (DEB_INIT_APPARMOR "") + SET (DEB_STARTUP "SYSV") ELSEIF(DEB_CODENAME STREQUAL "jessie") SET (DEB_PLATFORMRELEASE "debian8") + # Improving on Oracle, we would prefer to package for Debian 8 + # using both SysV init and Systemd, but still no Apparmor. SET (DEB_CONTROL_BDEPS "dh-systemd") SET (DEB_INSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/") SET (DEB_RULES_INSTALL_SYSTEMD "install -m 0755 debian/extra/mysql-systemd-start debian/tmp/usr/share/mysql/") SET (DEB_RULES_INSTALL_APPARMOR "") SET (DEB_RULES_APPARMOR_LOAD "") - SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --name=mysql") + SET (DEB_SYSTEMD_SERVICE_NAME "mysql") + SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --no-enable --name=mysql") SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade") SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start") SET (DEB_INSTALL_SERVER_APPARMOR "") SET (DEB_SERVICE_SERVER_EXECPRE "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre") + SET (DEB_SERVICE_SERVER_EXECPOST + "ExecStartPost=/usr/share/mysql/mysql-systemd-start post") SET (DEB_INIT_APPARMOR "") + # Debian 8 comes with both SysV init and Systemd, + # but "scripts/CMakeLists.txt" enforces an either-or. + # SET (DEB_STARTUP "SYSV SYSTEMD") + # For now, we go with Systemd only. + SET (DEB_STARTUP "SYSTEMD") ELSEIF(DEB_CODENAME STREQUAL "stretch") SET (DEB_PLATFORMRELEASE "debian9") SET (DEB_CONTROL_BDEPS "dh-systemd") @@ -132,7 +180,9 @@ ELSEIF(DEB_CODENAME STREQUAL "precise") SET (DEB_INSTALL_SERVER_SYSTEMD "") SET (DEB_INSTALL_SERVER_APPARMOR "etc/apparmor.d/usr.sbin.mysqld") SET (DEB_SERVICE_SERVER_EXECPRE "") + SET (DEB_SERVICE_SERVER_EXECPOST "") SET (DEB_INIT_APPARMOR "/lib/init/apparmor-profile-load usr.sbin.mysqld") + SET (DEB_STARTUP "SYSV") ELSEIF(DEB_CODENAME STREQUAL "trusty") SET (DEB_PLATFORMRELEASE "ubuntu14.04") SET (DEB_CONTROL_BDEPS "dh-apparmor") @@ -147,7 +197,9 @@ ELSEIF(DEB_CODENAME STREQUAL "trusty") SET (DEB_INSTALL_SERVER_SYSTEMD "") SET (DEB_INSTALL_SERVER_APPARMOR "etc/apparmor.d/usr.sbin.mysqld") SET (DEB_SERVICE_SERVER_EXECPRE "") + SET (DEB_SERVICE_SERVER_EXECPOST "") SET (DEB_INIT_APPARMOR "/lib/init/apparmor-profile-load usr.sbin.mysqld") + SET (DEB_STARTUP "SYSV") ELSEIF(DEB_CODENAME STREQUAL "wily") SET (DEB_PLATFORMRELEASE "ubuntu15.10") SET (DEB_CONTROL_BDEPS "dh-apparmor, dh-systemd (>=1.5)") @@ -158,13 +210,17 @@ ELSEIF(DEB_CODENAME STREQUAL "wily") "install -g root -o root -m 0644 -D debian/extra/apparmor-profile debian/tmp/etc/apparmor.d/usr.sbin.mysqld") SET (DEB_RULES_APPARMOR_LOAD "dh_apparmor -pmysql-community-server --profile-name=usr.sbin.mysqld") - SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --name=mysql") + SET (DEB_SYSTEMD_SERVICE_NAME "mysql") + SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --no-enable --name=mysql") SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade") SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start") SET (DEB_INSTALL_SERVER_APPARMOR "etc/apparmor.d/usr.sbin.mysqld") SET (DEB_SERVICE_SERVER_EXECPRE "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre") + SET (DEB_SERVICE_SERVER_EXECPOST + "ExecStartPost=/usr/share/mysql/mysql-systemd-start post") SET (DEB_INIT_APPARMOR "/lib/init/apparmor-profile-load usr.sbin.mysqld") + SET (DEB_STARTUP "SYSTEMD") ELSEIF(DEB_CODENAME STREQUAL "xenial") SET (DEB_PLATFORMRELEASE "ubuntu16.04") SET (DEB_CONTROL_BDEPS "dh-apparmor, dh-systemd (>=1.5)") @@ -175,30 +231,38 @@ ELSEIF(DEB_CODENAME STREQUAL "xenial") "install -g root -o root -m 0644 -D debian/extra/apparmor-profile debian/tmp/etc/apparmor.d/usr.sbin.mysqld") SET (DEB_RULES_APPARMOR_LOAD "dh_apparmor -pmysql-${DEB_PRODUCTNAME}-server --profile-name=usr.sbin.mysqld") - SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --name=mysql") + SET (DEB_SYSTEMD_SERVICE_NAME "mysql") + SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --no-enable --name=mysql") SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade") SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start") SET (DEB_INSTALL_SERVER_APPARMOR "etc/apparmor.d/usr.sbin.mysqld") SET (DEB_SERVICE_SERVER_EXECPRE "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre") + SET (DEB_SERVICE_SERVER_EXECPOST + "ExecStartPost=/usr/share/mysql/mysql-systemd-start post") SET (DEB_INIT_APPARMOR "/lib/apparmor/profile-load usr.sbin.mysqld") + SET (DEB_STARTUP "SYSTEMD") ELSEIF(DEB_CODENAME STREQUAL "yakkety") SET (DEB_PLATFORMRELEASE "ubuntu16.10") SET (DEB_CONTROL_BDEPS "dh-apparmor, dh-systemd (>=1.5)") - SET (DEB_INc2a2537ed7d9ff9272571a03b67e0ef7ec0792ceSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/") + SET (DEB_INSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/") SET (DEB_RULES_INSTALL_SYSTEMD "install -m 0755 debian/extra/mysql-systemd-start debian/tmp/usr/share/mysql/") SET (DEB_RULES_INSTALL_APPARMOR "install -g root -o root -m 0644 -D debian/extra/apparmor-profile debian/tmp/etc/apparmor.d/usr.sbin.mysqld") SET (DEB_RULES_APPARMOR_LOAD "dh_apparmor -pmysql-${DEB_PRODUCTNAME}-server --profile-name=usr.sbin.mysqld") - SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --name=mysql") + SET (DEB_SYSTEMD_SERVICE_NAME "mysql") + SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --no-enable --name=mysql") SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade") SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start") SET (DEB_INSTALL_SERVER_APPARMOR "etc/apparmor.d/usr.sbin.mysqld") SET (DEB_SERVICE_SERVER_EXECPRE "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre") + SET (DEB_SERVICE_SERVER_EXECPOST + "ExecStartPost=/usr/share/mysql/mysql-systemd-start post") SET (DEB_INIT_APPARMOR "/lib/apparmor/profile-load usr.sbin.mysqld") + SET (DEB_STARTUP "SYSTEMD") ELSEIF(DEB_CODENAME STREQUAL "zesty") SET (DEB_PLATFORMRELEASE "ubuntu17.04") SET (DEB_CONTROL_BDEPS "dh-apparmor, dh-systemd (>=1.5)") @@ -222,29 +286,80 @@ ELSE() RETURN() ENDIF() -# All files are configured and copied to the debian/ directory, which is used +# All files are configured and copied to the debian/ directory, which is used # by debuild to make the packages +# 5.7.11 builds out-of-source. Hack: have duplicate debian/ SET (DEB_ROOT ${CMAKE_SOURCE_DIR}/packaging/deb-in) FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/debian) +FILE(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/debian) FILE(GLOB_RECURSE SOURCEFILES RELATIVE "${DEB_ROOT}" "${DEB_ROOT}/*") # Skip the copyright file from the "other" product type LIST(REMOVE_ITEM SOURCEFILES "copyright.${DEB_REMOVEPATTERN}") LIST(REMOVE_ITEM SOURCEFILES "CMakeLists.txt") +# Combine the list of all startup files to be included, +# skip Debian magical init files unless needed +IF(DEB_PRODUCTNAME STREQUAL "wsrep") + LIST(REMOVE_ITEM SOURCEFILES "mysql-common.install.in") + LIST(REMOVE_ITEM SOURCEFILES "mysql-common.dirs.in") + LIST(REMOVE_ITEM SOURCEFILES "mysql-common.postinst.in") + LIST(REMOVE_ITEM SOURCEFILES "mysql-common.postrm.in") +ENDIF() +IF(DEB_STARTUP MATCHES ".*SYSV.*") + SET (DEB_FILES_STARTUP ${FILES_STARTUP_SYSV}) +ELSE() + LIST(REMOVE_ITEM SOURCEFILES + "mysql-packagesource-server-SERIES.mysql.init.in") +ENDIF() +IF(DEB_STARTUP MATCHES ".*SYSTEMD.*") + SET (DEB_FILES_STARTUP + ${DEB_FILES_STARTUP} + ${FILES_STARTUP_SYSTEMD}) +ELSE() + LIST(REMOVE_ITEM SOURCEFILES + "mysql-packagesource-server-SERIES.mysql.service.in") +ENDIF() # Don't install systemd file on systems without systemd IF(DEB_INSTALL_SERVER_SYSTEMD STREQUAL "") LIST(REMOVE_ITEM SOURCEFILES "mysql-packagesource-server.mysql.service.in") ENDIF() + FOREACH (SOURCEFILE ${SOURCEFILES}) STRING(REGEX REPLACE "-packagesource-" "-${DEB_PRODUCTNAME}-" TMPFILE ${SOURCEFILE}) + STRING(REGEX REPLACE "-SERIES" "${DEB_PRODUCTSERIES}" TMPFILE ${TMPFILE}) # Strip away the input file endings from the destination filenames STRING(REGEX REPLACE ".in$" "" TMPFILE ${TMPFILE}) STRING(REGEX REPLACE ".gpl$" "" TMPFILE ${TMPFILE}) STRING(REGEX REPLACE ".com$" "" DESTFILE ${TMPFILE}) CONFIGURE_FILE("${DEB_ROOT}/${SOURCEFILE}" "${CMAKE_BINARY_DIR}/debian/${DESTFILE}" @ONLY) + CONFIGURE_FILE("${DEB_ROOT}/${SOURCEFILE}" + "${CMAKE_SOURCE_DIR}/debian/${DESTFILE}" @ONLY) ENDFOREACH() EXECUTE_PROCESS( COMMAND chmod +x ${CMAKE_BINARY_DIR}/debian/rules ) +IF(DEB_PRODUCTNAME STREQUAL "wsrep") +FILE(APPEND "${CMAKE_BINARY_DIR}/debian/control" " +Package: mysql-common +Architecture: any +Pre-depends: debconf (>= 0.2.17), + \${misc:Pre-Depends} +Multi-Arch: foreign +Depends: \${misc:Depends}, + \${shlibs:Depends}, + mysql-wsrep-common-5.6 +Description: MySQL Common + 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 + Oracle. This package contains common files needed by MySQL client + library and the MySQL database server. + This package is a dummy replacement for the case when using mysql WSREP + implementation to satisfy dependencies of other packages + like libmysqlclient18 +") +ENDIF() + diff --git a/packaging/deb-in/README.Maintainer b/packaging/deb-in/README.Maintainer index 4b91c8e3f704..843b3f7a1dc2 100644 --- a/packaging/deb-in/README.Maintainer +++ b/packaging/deb-in/README.Maintainer @@ -15,6 +15,30 @@ TODO: Why /bin/bash for some files and /bin/sh for others (this is also the case in native packaging, so might be a reason) TODO: Related to above: Should be POSIX compliant -TODO: Build with -DWITH_SYSTEMD and related to use inbuilt systemd support (Deb8 and Ubuntu15+) TODO: Maybe refactor CMakeLists.txt to remove redundancy TODO: Clean up install exception list so --list-missing can be changed to --fail-missing + +### WSREP stuff +TODO: Find a more efficient way to configure just "packaging/deb-in/" +TODO: Can we unite systemd files (service definition, pre- and post-scriptlets, maybe more) across platforms? + In RedHat etc, we have "scripts/systemd/mysqld.service.in" which is working. + Can we use that to replace "packaging/deb-in/mysql-packagesource-server-SERIES.mysql.service.in" ? +TODO: Check whether it was safe to drop "debian/additions/debian-start*", recover from old sources if not. +TODO: Check everything, especially the pre/post-install/rm scripts, + and decide whether to follow Debian or Oracle or to create a mix. +TODO: Clean "packaging/deb-in/CMakeLists.txt" for systemd, SysV init, Upstart, and the mix (Debian!). +TODO: Introduce "WITH_SYSV" as a build option, so that we can build packages with both SysV and Systemd + startup support, as fits Debian (which delivers both). +TODO: Decide about Upstart, either implement support for it or remove the references. +TODO; Check package naming on Debian/Ubuntu: + We now have platform as part of version in the file name (separator '~') + because a dash '-' would start a revision which Debian tools don't affect in a "native" package. + +### Other stuff +Package cut: Comments in RPM spec files say "lz4_decompress" and "zlib_decompress" were added to client RPMs. + That's wrong, they are in the server RPMs. Similar for DEB. They are meant for "mysqlpump" result files + (if compressed), and that tool is in the client packages (both RPM and DEB). + Also, placement differs: RPMs have them in "/usr/bin/", DEBs in "/usr/lib/mysql/" and a patch for MTR + so that they will be found. + Proposal 1: Make comments come true, move them into client packages. + Proposal 2: Put them in "/usr/bin/", delete the patch. diff --git a/packaging/deb-in/changelog.in b/packaging/deb-in/changelog.in index ca8858916984..b4f8c6fca8c4 100644 --- a/packaging/deb-in/changelog.in +++ b/packaging/deb-in/changelog.in @@ -1,3 +1,15 @@ +mysql-@DEB_PRODUCTNAME@@DEB_PRODUCTSERIES@ (@DEB_SERVERVERSION@@DEB_PLATFORMRELEASE@) @DEB_CODENAME@; urgency=low + + * (backport from 5.7 branch for packaging) + Integrate the provisional 5.7.11 changes for Ubuntu 16.04 "Xenial Xerus" + ("packaging/deb-in/" from Oracle's 5.7.14, + adapted to Codership's "mysql-wsrep" needs, + SysV init files replaced by systemd files) + with 5.7.15, to support both 16.04 LTS "Xenial Xerus" and 14.04 LTS "Trusty Tahr". + * Update to 5.6.36 upstream release + + -- Jörg Brühe Tue, 01 Nov 2016 09:45:42 +0100 + mysql-@DEB_PRODUCTNAME@ (@DEB_SERVERVERSION@@DEB_PLATFORMRELEASE@) @DEB_CODENAME@; urgency=low [ Akhil Mohan ] diff --git a/packaging/deb-in/control.in b/packaging/deb-in/control.in index abc96c5c304e..ef1db7125e8a 100644 --- a/packaging/deb-in/control.in +++ b/packaging/deb-in/control.in @@ -1,15 +1,29 @@ -Source: mysql-@DEB_PRODUCTNAME@ -Maintainer: MySQL Release Engineering +Source: mysql-@DEB_PRODUCTNAME@@DEB_PRODUCTSERIES@ +Maintainer: Codership Oy Section: database Priority: optional Standards-Version: 3.9.6 -Homepage: http://www.mysql.com/ -Build-Depends: debhelper (>= 9.0.0), libaio-dev[linux-any], libncurses5-dev (>= 5.0-6), perl, zlib1g-dev (>= 1:1.1.3-5), po-debconf, psmisc, bison, lsb-release, cmake, fakeroot, libnuma-dev, @DEB_CONTROL_BDEPS@ +Homepage: http://galeracluster.com/ +Build-Depends: bison, + cmake, + debhelper (>= 9.0.0), + fakeroot, + libaio-dev[linux-any], + libmecab-dev, + libncurses5-dev (>= 5.0-6), + libnuma-dev, + lsb-release, + perl, + po-debconf, + psmisc, + zlib1g-dev (>= 1:1.1.3-5), + @DEB_CONTROL_BDEPS@ Package: mysql-server Architecture: any -Depends: mysql-@DEB_PRODUCTNAME@-server (= ${binary:Version}), ${misc:Depends} +Depends: mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@ (= ${binary:Version}), + ${misc:Depends} Description: MySQL Server meta package depending on latest version The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server @@ -18,19 +32,25 @@ Description: MySQL Server meta package depending on latest version Oracle. This is a meta package that depends on the latest mysql server package available in the repository. -Package: mysql-@DEB_PRODUCTNAME@-server +Package: mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@ Architecture: any Pre-depends: debconf (>= 0.2.17), adduser -Depends: mysql-common (>= ${binary:Version}), mysql-client (= ${binary:Version}), perl, psmisc, - ${shlibs:Depends}, ${misc:Depends} -Breaks: mysql-common (<< 5.6.36) +Depends: mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@ (= ${binary:Version}), + mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@ (= ${binary:Version}), + perl, + psmisc, + rsync, + socat, + ${misc:Depends}, + ${shlibs:Depends} +Breaks: mysql-common (<< 5.6.35), mysql-@DEB_PRODUCTNAME@-client (<< 5.6) Conflicts: mysql, mysql-server-5.0, mysql-server-core-5.0, mysql-server-5.1, mysql-server-core-5.1, mysql-server-5.5, mysql-server-core-5.5, mysql-server-5.6, mysql-server-core-5.6, - mysql-server-5.7, mysql-server-core-5.7, mysql-@DEB_NOTPRODUCTNAME@-server, + @DEB_CONTROL_SERVER_CONFLICT_NDB@, mariadb-server-5.5, mariadb-server-core-5.5, mariadb-server-10.0, mariadb-server-core-10.0, mariadb-server-10.1, mariadb-server-core-10.1, @@ -40,9 +60,10 @@ Replaces: mysql, mysql-server-5.1, mysql-server-core-5.1, mysql-server-5.5, mysql-server-core-5.5, mysql-server-5.6, mysql-server-core-5.6, - mysql-server-5.7, mysql-server-core-5.7, + mysql-@DEB_PRODUCTNAME@-client (<< 5.6), mysql-@DEB_NOTPRODUCTNAME@-server, - mysql-common (<< 5.6.36) + @DEB_CONTROL_SERVER_CONFLICT_NDB@, + mysql-common (<< 5.6.35) Provides: virtual-mysql-server, virtual-mysql-server-core Description: MySQL Server The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, @@ -54,7 +75,8 @@ Description: MySQL Server Package: mysql-client Architecture: any -Depends: mysql-@DEB_PRODUCTNAME@-client (= ${binary:Version}), ${misc:Depends} +Depends: mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@ (= ${binary:Version}), + ${misc:Depends} Description: MySQL Client meta package depending on latest version The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server @@ -63,18 +85,20 @@ Description: MySQL Client meta package depending on latest version Oracle. This is a meta package that depends on the latest mysql client package available in the repository. -Package: mysql-@DEB_PRODUCTNAME@-client +Package: mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@ Architecture: any -Depends: mysql-common (>= ${binary:Version}), - ${shlibs:Depends}, ${misc:Depends} -Breaks: mysql-common (<< 5.6.36), libmysqlclient-dev (<< 5.6.36) +Depends: mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@ (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Breaks: libmysqlclient-dev (<< 5.6.35), + mysql-common (<< 5.6.35) Conflicts: mysql, mysql-client-5.0, mysql-client-core-5.0, mysql-client-5.1, mysql-client-core-5.1, mysql-client-5.5, mysql-client-core-5.5, mysql-client-5.6, mysql-client-core-5.6, - mysql-client-5.7, mysql-client-core-5.7, mysql-@DEB_NOTPRODUCTNAME@-client, + @DEB_CONTROL_CLIENT_CONFLICT_NDB@, mariadb-client-5.5, mariadb-client-core-5.5, mariadb-client-10.0, mariadb-client-core-10.0, mariadb-client-10.1, mariadb-client-core-10.1, @@ -84,11 +108,12 @@ Replaces: mysql, mysql-client-5.1, mysql-client-core-5.1, mysql-client-5.5, mysql-client-core-5.5, mysql-client-5.6, mysql-client-core-5.6, - mysql-client-5.7, mysql-client-core-5.7, mysql-@DEB_NOTPRODUCTNAME@-client, - mysql-common (<< 5.6.36), - libmysqlclient-dev (<< 5.6.36) -Provides: virtual-mysql-client, virtual-mysql-client-core + @DEB_CONTROL_CLIENT_CONFLICT_NDB@, + mysql-common (<< 5.6.35), + libmysqlclient-dev (<< 5.6.35) +Provides: virtual-mysql-client, + virtual-mysql-client-core Description: MySQL Client The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server @@ -102,8 +127,9 @@ Architecture: any Section: libs Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same -Depends: mysql-common (>= ${binary:Version}), - ${shlibs:Depends}, ${misc:Depends} +Depends: mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@ (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} Description: MySQL shared client libraries The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server @@ -112,22 +138,26 @@ Description: MySQL shared client libraries Oracle. This package contains the shared libraries for MySQL client applications. -Package: mysql-common +Package: mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@ Architecture: any -Pre-depends: debconf (>= 0.2.17), ${misc:Pre-Depends} +Pre-depends: debconf (>= 0.2.17), + ${misc:Pre-Depends} Multi-Arch: foreign -Depends: ${shlibs:Depends}, ${misc:Depends} -Conflicts: mysql, mysql-server-5.6, mysql-server-core-5.6, +Depends: ${misc:Depends}, + ${shlibs:Depends} +Conflicts: mysql, + mysql-server-5.6, mysql-server-core-5.6, mysql-client-5.6, mysql-client-core-5.6, mysql-server-5.7, mysql-server-core-5.7, mysql-client-5.7, mysql-client-core-5.7, mariadb-server-5.5, percona-xtradb-cluster-common-5.5, - mysql-common (<< 5.6.36) -Replaces: mysql, mysql-server-5.5, mysql-server-core-5.5, libmysqlclient-dev, + mysql-common (<< 5.6.35), mysql-@DEB_PRODUCTNAME@-common (<< 5.6.35), + mysql-@DEB_PRODUCTNAME@-common-5.6, mysql-@DEB_PRODUCTNAME@-common-5.5 +Replaces: mysql, + mysql-server-5.5, mysql-server-core-5.5, libmysqlclient-dev, mysql-server-5.6, mysql-server-core-5.6, - mysql-server-5.7, mysql-server-core-5.7, mariadb-server-5.5, percona-xtradb-cluster-common-5.5, - mysql-common (<< 5.6.36) + mysql-common (<< 5.6.35) Provides: mysql-common Description: MySQL Common The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, @@ -135,14 +165,14 @@ Description: MySQL Common is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. MySQL is a trademark of Oracle. This package contains common files needed by MySQL client - library, MySQL database server, and MySQL embedded server. + library and the MySQL database server. Package: libmysqlclient-dev Architecture: any Section: libdevel Depends: libmysqlclient18 (= ${binary:Version}), - ${shlibs:Depends}, ${misc:Depends} -Replaces: mysql-client-5.6, mysql-client-core-5.6, + ${misc:Depends}, + ${shlibs:Depends} Description: MySQL development headers The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server @@ -151,21 +181,17 @@ Description: MySQL development headers Oracle. This package contains the development header files necessary to develop MySQL client applications. -Package: libmysqld-dev +Package: mysql-@DEB_PRODUCTNAME@@DEB_PRODUCTSERIES@ Architecture: any -Section: libdevel -Depends: libmysqlclient-dev (= ${binary:Version}), - ${shlibs:Depends}, ${misc:Depends} -Description: MySQL embedded server library - 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 - Oracle. This package contains the MySQL server as an embedded library. +Depends: mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@ (= ${binary:Version}), + mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@ (= ${binary:Version}), + ${misc:Depends} +Description: Metapackage that installs mysql-wsrep client and server packages. Package: mysql-testsuite Architecture: any -Depends: mysql-@DEB_PRODUCTNAME@-test (= ${binary:Version}), ${misc:Depends} +Depends: mysql-@DEB_PRODUCTNAME@-test@DEB_PRODUCTSERIES@ (= ${binary:Version}), + ${misc:Depends} Description: MySQL Testsuite meta package depending on latest version The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server @@ -174,16 +200,19 @@ Description: MySQL Testsuite meta package depending on latest version Oracle. This is a meta package that depends on the latest mysql test package available in the repository. -Package: mysql-@DEB_PRODUCTNAME@-test +Package: mysql-@DEB_PRODUCTNAME@-test@DEB_PRODUCTSERIES@ Architecture: any -Depends: mysql-@DEB_PRODUCTNAME@-server (= ${binary:Version}), - mysql-@DEB_PRODUCTNAME@-client (= ${binary:Version}), python, - libmysqlclient-dev, ${shlibs:Depends}, ${misc:Depends} -Breaks: mysql-@DEB_PRODUCTNAME@-server (<< 5.6.36), - mysql-@DEB_PRODUCTNAME@-client (<< 5.6.36) +Depends: mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@ (= ${binary:Version}), + mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@ (= ${binary:Version}), + libmysqlclient-dev, + python, + ${misc:Depends}, + ${shlibs:Depends} +Breaks: mysql-@DEB_PRODUCTNAME@-server (<< 5.6.35), + mysql-@DEB_PRODUCTNAME@-client (<< 5.6.35) Conflicts: mysql, mysql-testsuite-5.0, mysql-testsuite-5.1, mysql-testsuite-5.5, - mysql-testsuite-5.6, mysql-testsuite-5.7, mysql-@DEB_NOTPRODUCTNAME@-test, + mysql-testsuite-5.6, mysql-@DEB_NOTPRODUCTNAME@-test, mariadb-test, mariadb-test-data Description: MySQL Test Run MTR - The MySQL testsuite The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, @@ -193,24 +222,15 @@ Description: MySQL Test Run MTR - The MySQL testsuite Oracle. This package contains the MySQL regression test suite for MySQL database server. -Package: mysql-@DEB_PRODUCTNAME@-bench -Architecture: any -Depends: mysql-@DEB_PRODUCTNAME@-server (= ${binary:Version}), - ${shlibs:Depends}, ${misc:Depends} -Conflicts: mysql, mysql-@DEB_NOTPRODUCTNAME@-bench -Description: MySQL Bench - 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 - Oracle. - -Package: mysql-@DEB_PRODUCTNAME@-source +Package: mysql-@DEB_PRODUCTNAME@-source@DEB_PRODUCTSERIES@ Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends} Description: MySQL source 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 Oracle. + +@DEB_NDB_CONTROL_EXTRAS@ diff --git a/packaging/deb-in/extra/Docs__Images__Makefile.in b/packaging/deb-in/extra/Docs__Images__Makefile.in new file mode 100644 index 000000000000..f7316d4e3452 --- /dev/null +++ b/packaging/deb-in/extra/Docs__Images__Makefile.in @@ -0,0 +1,6 @@ +all: + +distclean: + -rm -f Makefile + +.PHONY: all distclean clean install check diff --git a/packaging/deb-in/extra/Docs__Makefile.in b/packaging/deb-in/extra/Docs__Makefile.in new file mode 100644 index 000000000000..f7316d4e3452 --- /dev/null +++ b/packaging/deb-in/extra/Docs__Makefile.in @@ -0,0 +1,6 @@ +all: + +distclean: + -rm -f Makefile + +.PHONY: all distclean clean install check diff --git a/packaging/deb-in/extra/apparmor-profile b/packaging/deb-in/extra/apparmor-profile index 8004069fc1dc..f95003d49113 100644 --- a/packaging/deb-in/extra/apparmor-profile +++ b/packaging/deb-in/extra/apparmor-profile @@ -65,3 +65,4 @@ # Site-specific additions and overrides. See local/README for details. #include } +# The above is taken from Oracle's 5.7.14, parts may be premature. diff --git a/packaging/deb-in/extra/configure-symlinks b/packaging/deb-in/extra/configure-symlinks new file mode 100755 index 000000000000..6c1a6a544f7a --- /dev/null +++ b/packaging/deb-in/extra/configure-symlinks @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +case "$1" in + install) + variant="$2" + my_cnf_path="$3" + update-alternatives --install /etc/mysql/my.cnf my.cnf "$my_cnf_path" 200 + ;; + remove) + variant="$2" + my_cnf_path="$3" + update-alternatives --remove my.cnf "$my_cnf_path" + ;; +esac diff --git a/packaging/deb-in/extra/debian-start b/packaging/deb-in/extra/debian-start new file mode 100644 index 000000000000..1ea1207a2cd1 --- /dev/null +++ b/packaging/deb-in/extra/debian-start @@ -0,0 +1,32 @@ +#!/bin/bash +# +# This script is executed by "/etc/init.d/mysql" on every (re)start. +# +# Changes to this file will be preserved when updating the Debian package. +# + +source /usr/share/mysql/debian-start.inc.sh + +MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf" +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" +MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf" +MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf" +MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables" +MYCHECK_PARAMS="--all-databases --fast --silent" +MYCHECK_RCPT="root" + +# The following commands should be run when the server is up but in background +# where they do not block the server start and in one shell instance so that +# they run sequentially. They are supposed not to echo anything to stdout. +# If you want to disable the check for crashed tables comment +# "check_for_crashed_tables" out. +# (There may be no output to stdout inside the background process!) +echo "Checking for tables which need an upgrade, are corrupt or were " +echo "not closed cleanly." +( + upgrade_system_tables_if_necessary; + check_root_accounts; + check_for_crashed_tables; +) >&2 & + +exit 0 diff --git a/packaging/deb-in/extra/debian-start.inc.sh b/packaging/deb-in/extra/debian-start.inc.sh new file mode 100644 index 000000000000..f50712882c12 --- /dev/null +++ b/packaging/deb-in/extra/debian-start.inc.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# +# This file is included by /etc/mysql/debian-start +# + +## Check all unclosed tables. +# - Requires the server to be up. +# - Is supposed to run silently in background. +function check_for_crashed_tables() { + set -e + set -u + + # But do it in the background to not stall the boot process. + logger -p daemon.info -i -t$0 "Triggering myisam-recover for all MyISAM tables" + + # Checking for $? is unreliable so the size of the output is checked. + # Some table handlers like HEAP do not support CHECK TABLE. + tempfile=`tempfile` + # We have to use xargs in this case, because a for loop barfs on the + # spaces in the thing to be looped over. + LC_ALL=C $MYSQL --skip-column-names --batch -e ' + select concat('\''select count(*) into @discard from `'\'', + TABLE_SCHEMA, '\''`.`'\'', TABLE_NAME, '\''`'\'') + from information_schema.TABLES where ENGINE='\''MyISAM'\' | \ + xargs -i $MYSQL --skip-column-names --silent --batch \ + --force -e "{}" >$tempfile + if [ -s $tempfile ]; then + ( + /bin/echo -e "\n" \ + "Improperly closed tables are also reported if clients are accessing\n" \ + "the tables *now*. A list of current connections is below.\n"; + $MYADMIN processlist status + ) >> $tempfile + # Check for presence as a dependency on mailx would require an MTA. + if [ -x /usr/bin/mailx ]; then + mailx -e -s"$MYCHECK_SUBJECT" $MYCHECK_RCPT < $tempfile + fi + (echo "$MYCHECK_SUBJECT"; cat $tempfile) | logger -p daemon.warn -i -t$0 + fi + rm $tempfile +} + +## Check for tables needing an upgrade. +# - Requires the server to be up. +# - Is supposed to run silently in background. +function upgrade_system_tables_if_necessary() { + set -e + set -u + + logger -p daemon.info -i -t$0 "Upgrading MySQL tables if necessary." + + # Filter all "duplicate column", "duplicate key" and "unknown column" + # errors as the script is designed to be idempotent. + LC_ALL=C $MYUPGRADE \ + 2>&1 \ + | egrep -v '^(1|@had|ERROR (1054|1060|1061))' \ + | logger -p daemon.warn -i -t$0 +} + +## Check for the presence of both, root accounts with and without password. +# This might have been caused by a bug related to mysql_install_db (#418672). +function check_root_accounts() { + set -e + set -u + + logger -p daemon.info -i -t$0 "Checking for insecure root accounts." + + ret=$( echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='';" | $MYSQL --skip-column-names ) + if [ "$ret" -ne "0" ]; then + logger -p daemon.warn -i -t$0 "WARNING: mysql.user contains $ret root accounts without password!" + fi +} diff --git a/packaging/deb-in/extra/debian_create_root_user.sql b/packaging/deb-in/extra/debian_create_root_user.sql new file mode 100644 index 000000000000..fd45cec4ca2b --- /dev/null +++ b/packaging/deb-in/extra/debian_create_root_user.sql @@ -0,0 +1,23 @@ +-- Get the hostname, if the hostname has any wildcard character like "_" or "%" +-- add escape character in front of wildcard character to convert "_" or "%" to +-- a plain character +SET @get_hostname= @@hostname; +SELECT REPLACE((SELECT REPLACE(@get_hostname,'_','\_')),'%','\%') INTO @current_hostname; + +-- Fill "user" table with default users allowing root access +-- from local machine if "user" table didn't exist before +CREATE TEMPORARY TABLE tmp_user LIKE user; +INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N'); +REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N' FROM dual WHERE LOWER( @current_hostname) != 'localhost'; +REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N'); +REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N'); +INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; +DROP TABLE tmp_user; + +CREATE TEMPORARY TABLE tmp_proxies_priv LIKE proxies_priv; +INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now()); +REPLACE INTO tmp_proxies_priv SELECT @current_hostname, 'root', '', '', TRUE, '', now() FROM DUAL WHERE LOWER (@current_hostname) != 'localhost'; +INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0; +DROP TABLE tmp_proxies_priv; +FLUSH PRIVILEGES; + diff --git a/packaging/deb-in/extra/echo_stderr b/packaging/deb-in/extra/echo_stderr new file mode 100644 index 000000000000..67b3ed7cfb34 --- /dev/null +++ b/packaging/deb-in/extra/echo_stderr @@ -0,0 +1,2 @@ +#!/bin/bash +echo "$*" 1>&2 diff --git a/packaging/deb-in/extra/innotop/changelog.innotop b/packaging/deb-in/extra/innotop/changelog.innotop new file mode 100644 index 000000000000..ab4c154d6e6e --- /dev/null +++ b/packaging/deb-in/extra/innotop/changelog.innotop @@ -0,0 +1,357 @@ +Changelog for innotop: + +2009-03-09: version 1.7.1 + + Changes: + * Don't display the CXN column if only one connection is active in + the current view + + Bugs fixed: + * fixed bug where trying to aggregate the time column would result + in a crash if the time column had an undef value in it, which is + the case when a thread is in the 'Connect' state + * updated innotop.spec file to reflect current version + +2009-02-23: version 1.7.0 + + Changes: + * supports a central config (/etc/innotop/innotop.conf) + * changed the default home directory config to ~/.innotop/innotop.conf + (away from .ini) + * embedded InnoDBParser.pm into innotop so it can be run with no + installation + * no longer writes a new config file by default + * added --skipcentral (skip reading central config) and --write (write + a config if none were loaded at start-up) + * if no config file is loaded, connect to a MySQL database on + localhost using mysql_read_default_group=client + * embedded maatkit's DSNParser.pm and added support for --user, + --password, --host, --port + * changed default mode from T (InnoDB Transactions) to Q (Query List) + * in addition to connected threads, now displays running and cached + threads in statusbar + * don't load connections from a config file if any DSN information or + a username or password is specified on the command-line + + Bugs fixed: + * fixed bug preventing utilization of command-line options that + override default config settings if no config file was loaded + * fixed a bug where migrating from an old version of the config will + delete ~/innotop.ini, if it exists. Now uses File::Temp::tempfile(). + +2007-11-09: version 1.6.0 + + * S mode crashed on non-numeric values. + * New user-defined columns crashed upon restart. + * Added --color option to control terminal coloring. + +2007-09-18: version 1.5.2 + + * Added the ability to monitor InnoDB status from a file. + * Changed W mode to L mode; it monitors all locks, not just lock waits. + +2007-09-16: version 1.5.1 + + * Added C (Command Summary) mode. + * Fixed a bug in the 'avg' aggregate function. + +2007-09-10: version 1.5.0 + + Changes: + * Added plugin functionality. + * Added group-by functionality. + * Moved the configuration file to a directory. + * Enhanced filtering and sorting on pivoted tables. + * Many small bug fixes. + +2007-07-16: version 1.4.3 + + Changes: + * Added standard --version command-line option + * Changed colors to cyan instead of blue; more visible on dark terminals. + * Added information to the filter-choosing dialog. + * Added column auto-completion when entering a filter expression. + * Changed Term::ReadKey from optional to mandatory. + * Clarified username in password prompting. + * Ten thousand words of documentation! + + Bugs fixed: + * innotop crashed in W mode when InnoDB status data was truncated. + * innotop didn't display errors in tables if debug was enabled. + * The colored() subroutine wasn't being created in non-interactive mode. + * Don't prompt to save password except the first time. + +2007-05-03: version 1.4.2 + + This version contains all changes to the trunk until revision 239; some + changes in revisions 240:250 are included. + + MAJOR CHANGES: + + * Quick-filters to easily filter any column in any display + * Compatibility with MySQL 3.23 through 6.0 + * Improved error handling when a server is down, permissions denied, etc + * Use additional SHOW INNODB STATUS information in 5.1.x + * Make all modes use tables consistently, so they can all be edited, + filtered, colored and sorted consistently + * Combine V, G and S modes into S mode, with v, g, and s hot-keys + * Let DBD driver read MySQL option files; permit connections without + user/pass/etc + * Compile SQL-like expressions into Perl subroutines; eliminate need to + know Perl + * Do not save all config data to config file, only save user's customizations + * Rewritten and improved command-line option handling + * Added --count, --delay, and other command-line options to support + run-and-exit operation + * Improve built-in variable sets + * Improve help screen with three-part balanced-column layout + * Simplify table-editor and improve hotkey support + * Require Perl to have high-resolution time support (Time::HiRes) + * Help the user choose a query to analyze or kill + * Enable EXPLAIN, show-full-query in T mode just like Q mode + * Let data-extraction access current, previous and incremental data sets + all at once + + MINOR CHANGES: + + * Column stabilizing for Q mode + * New color rules for T, Q, W modes + * Apply slave I/O filter to Q mode + * Improve detection of server version and other meta-data + * Make connection timeout a config variable + * Improve cross-version-compatible SQL syntax + * Get some information from the DBD driver instead of asking MySQL for it + * Improved error messages + * Improve server group creation/editing + * Improve connection/thread killing + * Fix broken key bindings and restore previously mapped hot-keys for + choosing columns + * Some documentation updates (but not nearly enough) + * Allow the user to specify graphing char in S mode (formerly G mode) + * Allow easy switching between variable sets in S mode + * Bind 'n' key globally to choose the 'next' server connection + * Bind '%' key globally to filter displayed tables + * Allow aligning columns on the decimal place for easy readability + * Add hide_hdr config variable to hide column headers in tables + * Add a feature to smartly run PURGE MASTER LOGS in Replication mode + * Enable debug mode as a globally configurable variable + * Improve error messages when an expression or filter doesn't compile or has + a run-time error; die on error when debug is enabled + * Allow user-configurable delays after executing SQL (to let the server + settle down before taking another measurement) + * Add an expression to show how long until a transaction is finished + * Add skip_innodb as a global config variable + * Add '%' after percentages to help disambiguate (user-configurable) + * Add column to M mode to help see how fast slave is catching up to master + + BUG FIXES: + + * T and W modes had wrong value for wait_status column + * Error tracking on connections didn't reset when the connection recovered + * wait_timeout on connections couldn't be set before MySQL 4.0.3 + * There was a crash on 3.23 when wiping deadlocks + * Lettercase changes in some result sets (SHOW MASTER/SLAVE STATUS) between + MySQL versions crashed innotop + * Inactive connections crashed innotop upon access to DBD driver + * set_precision did not respect user defaults for number of digits + * --inc command-line option could not be negated + * InnoDB status parsing was not always parsing all needed information + * S mode (formerly G mode) could crash trying to divide non-numeric data + * M table didn't show Slave_open_temp_tables variable; incorrect lettercase + * DBD drivers with broken AutoCommit would crash innotop + * Some key bindings had incorrect labels + * Some config-file loading routines could load data for things that didn't + exist + * Headers printed too often in S mode + * High-resolution time was not used even when the user had it + * Non-interactive mode printed blank lines sometimes + * Q-mode header and statusbar showed different QPS numbers + * Formulas for key-cache and query-cache hit ratios were wrong + * Mac OS "Darwin" machines were mis-identified as Microsoft Windows + * Some multiplications crashed when given undefined input + * The commify transformation did not check its input and could crash + * Specifying an invalid mode on the command line or config file could crash + innotop + +2007-03-29: version 1.4.1 + + * More tweaks to display of connection errors. + * Fixed a problem with skip-innodb in MySQL 5.1. + * Fix a bug with dead connections in single-connection mode. + * Fix a regex to allow parsing more data from truncated deadlocks. + * Don't load active cxns from the config file if the cxn isn't defined. + +2007-03-03: version 1.4.0 + + * Further tweak error handling and display of connection errors + * More centralization of querying + * Fix forking so it doesn't kill all database connections + * Allow user to run innotop without permissions for GLOBAL variables and status + +2007-02-11: version 1.3.6 + + * Handle some connection failures so innotop doesn't crash because of one server. + * Enable incremental display in more modes. + * Tweaks to colorizing, color editor, and default color rules. + * Tweaks to default sorting rules. + * Use prepared statements for efficiency. + * Bug fixes and code cleanups. + * Data storage is keyed on clock ticks now. + +2007-02-03: version 1.3.5 + + * Bug fixes. + * More tools for editing configuration from within innotop. + * Filters and transformations are constrained to valid values. + * Support for colorizing rows. + * Sorting by multiple columns. + * Compress headers when display is very wide. + * Stabilize and limit column widths. + * Check config file formats when upgrading so upgrades go smoothly. + * Make D mode handle many connections at once. + * Extract simple expressions from data sets in column src property. + This makes innotop more awk-ish. + +2007-01-16: version 1.3 + + * Readline support. + * Can be used unattended, or in a pipe-and-filter mode + where it outputs tab-separated data to standard output. + * You can specify a config file on the command line. + Config files can be marked read-only. + * Monitor multiple servers simultaneously. + * Server groups to help manage many servers conveniently. + * Monitor master/slave status, and control slaves. + * Columns can have user-defined expressions as their data sources. + * Better configuration tools. + * InnoDB status information is merged into SHOW VARIABLES and + SHOW STATUS information, so you can access it all together. + * High-precision time support in more places. + * Lots of tweaks to make things display more readably and compactly. + * Column transformations and filters. + +2007-01-16: version 1.0.1 + * NOTE: innotop is now hosted at Sourceforge, in Subversion not CVS. + The new project homepage is http://sourceforge.net/projects/innotop/ + * Tweak default T/Q mode sort columns to match what people expect. + * Fix broken InnoDBParser.pm documentation (and hence man page). + +2007-01-06: version 1.0 + * NOTE: innotop is now hosted at Sourceforge, in Subversion not CVS. + The new project homepage is http://sourceforge.net/projects/innotop/ + * Prevent control characters from freaking terminal out. + * Set timeout to keep busy servers from closing connection. + * There is only one InnoDB insert buffer. + * Make licenses clear and consistent. + +2006-11-14: innotop 0.1.160, InnoDBParser version 1.69 + * Support for ANSI color on Microsoft Windows (more readable, compact + display; thanks Gisbert W. Selke). + * Better handling of $ENV{HOME} on Windows. + * Added a LICENSE file to the package as per Gentoo bug: + http://bugs.gentoo.org/show_bug.cgi?id=147600 + +2006-11-11: innotop 0.1.157, InnoDBParser version 1.69 + * Add Microsoft Windows support. + +2006-10-19: innotop 0.1.154, InnoDBParser version 1.69 + * Add O (Open Tables) mode + * Add some more checks to handle incomplete InnoDB status information + +2006-09-30: innotop 0.1.152, InnoDBParser version 1.69 + * Figured out what was wrong with package $VERSION variable: it wasn't + after the package declaration! + +2006-09-28: innotop 0.1.152, InnoDBParser version 1.67 + * Make more efforts towards crash-resistance and tolerance of completely + messed-up inputs. If innotop itself is broken, it is now much harder to + tell, because it just keeps on running without complaining. + * Fix a small bug parsing out some information and displaying it. + +2006-09-05: innotop 0.1.149, InnoDBParser version 1.64 + * Try to find and eliminate any parsing code that assumes pattern matches + will succeed. + +2006-09-05: innotop 0.1.149, InnoDBParser version 1.62 + * Make innotop crash-resistant, so I can declare it STABLE finally. + * Instead of using SQL conditional comments, detect MySQL version. + +2006-08-22: innotop 0.1.147, InnoDBParser version 1.60 + * Fix some innotop bugs with undefined values, bad formatting etc. + +2006-08-19: innotop 0.1.146, InnoDBParser version 1.60 + * Make innotop handle some unexpected NULL values in Q mode. + * Add OS wait information to W mode, so it is now "everything that waits." + * Center section captions better. + * Make R mode more readable and compact. + * Make InnoDBParser parse lock waits even when they've been waiting 0 secs. + +2006-08-12: innotop 0.1.139, InnoDBParser version 1.59 + * Add more documentation + * Tweak V mode to show more info in less space. + * Fix a bug in G mode. + +2006-08-10: innotop 0.1.132, InnoDBParser version 1.58 + * Handle yet more types of FK error... it will never end! + * Handle some special cases when DEADLOCK info truncated + * Add a bit more FK info to F mode in innotop + * More tests added to the test suite + +2006-08-07: innotop 0.1.131, InnoDBParser version 1.55 + * Fix another issue with configuration + * Handle another type of FK error + +2006-08-03: innotop 0.1.130, InnoDBParser version 1.54 + * Fix an issue loading config file + * Add heap_no to 'D' (InnoDB Deadlock) mode to ease deadlock debugging. + +2006-08-02: innotop 0.1.128, InnoDBParser version 1.54 + * Parse lock wait information from the TRANSACTION section. + * Even more OS-specific parsing... pain in the butt... + * Add 'W' (InnoDB Lock Wait) mode. + * Fix some minor display issues with statusbar. + +2006-08-02: innotop 0.1.125, InnoDBParser version 1.50 + * Don't try to get references to Perl built-in functions like time() + * Handle more OS-specific variations of InnoDB status text + * Add some more information to various places in innotop + +2006-08-01: innotop 0.1.123, InnoDBParser version 1.47 + + * Enhance S and G modes: clear screen and re-print headers + * Don't crash when deadlock data is truncated + * Make Analyze mode say how to get back to whatever you came from + * Display 'nothing to display' when there is nothing + * Add ability to read InnoDB status text from a file (mostly helps test) + * Add table of Wait Array Information in Row Op/Semaphore mode + * Add table of lock information in InnoDB deadlock mode + * Ensure new features in upgrades don't get masked by existing config files + * Tweak default column choices for T mode + * Enhance foreign key parsing + * Enhance physical record and data tuple parsing + * Enhance lock parsing (handle old-style and new-style formats) + +2006-07-24: innotop 0.1.112, InnoDBParser version 1.36 + + * InnoDBParser enhancements for FK error messages. + * A fix to innotop to prevent it from crashing while trying to display a FK + error message. + * Some minor cosmetic changes to number formatting in innotop. + +2006-07-22: innotop 0.1.106, InnoDBParser version 1.35 + + * InnoDBParser is much more complete and accurate. + * Tons of bug fixes. + * Add partitions to EXPLAIN mode. + * Enhance Q mode header, add T mode header. + * Share some configuration variables across modes. + * Add formatted time columns to Q, T modes. + * Add command-line argument parsing. + * Turn off echo when asking for password. + * Add option to specify port when connecting. + * Let display-optimized-query display multiple notes. + * Lots of small improvements, such as showing more info in statusbar. + +2006-07-02: innotop 0.1.74, InnoDBParser version 1.24 + + * Initial release for public consumption. diff --git a/packaging/deb-in/extra/innotop/innotop b/packaging/deb-in/extra/innotop/innotop new file mode 100644 index 000000000000..646f0d7f0fb8 --- /dev/null +++ b/packaging/deb-in/extra/innotop/innotop @@ -0,0 +1,10946 @@ +#!/usr/bin/perl + +# vim: tw=160:nowrap:expandtab:tabstop=3:shiftwidth=3:softtabstop=3 + +# This program is copyright (c) 2006 Baron Schwartz, baron at xaprb dot com. +# Feedback and improvements are gratefully received. +# +# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +# MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. +# +# 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; OR the Perl Artistic License. On UNIX and similar +# systems, you can issue `man perlgpl' or `man perlartistic' to read these + +# 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 + +use strict; +use warnings FATAL => 'all'; + +our $VERSION = '1.7.1'; + +# Find the home directory; it's different on different OSes. +our $homepath = $ENV{HOME} || $ENV{HOMEPATH} || $ENV{USERPROFILE} || '.'; + +# Configuration files +our $default_home_conf = "$homepath/.innotop/innotop.conf"; +our $default_central_conf = "/etc/innotop/innotop.conf"; +our $conf_file = ""; + +## Begin packages ## + +package DSNParser; + +use DBI; +use Data::Dumper; +$Data::Dumper::Indent = 0; +$Data::Dumper::Quotekeys = 0; +use English qw(-no_match_vars); + +use constant MKDEBUG => $ENV{MKDEBUG}; + +# Defaults are built-in, but you can add/replace items by passing them as +# hashrefs of {key, desc, copy, dsn}. The desc and dsn items are optional. +# You can set properties with the prop() sub. Don't set the 'opts' property. +sub new { + my ( $class, @opts ) = @_; + my $self = { + opts => { + A => { + desc => 'Default character set', + dsn => 'charset', + copy => 1, + }, + D => { + desc => 'Database to use', + dsn => 'database', + copy => 1, + }, + F => { + desc => 'Only read default options from the given file', + dsn => 'mysql_read_default_file', + copy => 1, + }, + h => { + desc => 'Connect to host', + dsn => 'host', + copy => 1, + }, + p => { + desc => 'Password to use when connecting', + dsn => 'password', + copy => 1, + }, + P => { + desc => 'Port number to use for connection', + dsn => 'port', + copy => 1, + }, + S => { + desc => 'Socket file to use for connection', + dsn => 'mysql_socket', + copy => 1, + }, + u => { + desc => 'User for login if not current user', + dsn => 'user', + copy => 1, + }, + }, + }; + foreach my $opt ( @opts ) { + MKDEBUG && _d('Adding extra property ' . $opt->{key}); + $self->{opts}->{$opt->{key}} = { desc => $opt->{desc}, copy => $opt->{copy} }; + } + return bless $self, $class; +} + +# Recognized properties: +# * autokey: which key to treat a bareword as (typically h=host). +# * dbidriver: which DBI driver to use; assumes mysql, supports Pg. +# * required: which parts are required (hashref). +# * setvars: a list of variables to set after connecting +sub prop { + my ( $self, $prop, $value ) = @_; + if ( @_ > 2 ) { + MKDEBUG && _d("Setting $prop property"); + $self->{$prop} = $value; + } + return $self->{$prop}; +} + +sub parse { + my ( $self, $dsn, $prev, $defaults ) = @_; + if ( !$dsn ) { + MKDEBUG && _d('No DSN to parse'); + return; + } + MKDEBUG && _d("Parsing $dsn"); + $prev ||= {}; + $defaults ||= {}; + my %given_props; + my %final_props; + my %opts = %{$self->{opts}}; + my $prop_autokey = $self->prop('autokey'); + + # Parse given props + foreach my $dsn_part ( split(/,/, $dsn) ) { + if ( my ($prop_key, $prop_val) = $dsn_part =~ m/^(.)=(.*)$/ ) { + # Handle the typical DSN parts like h=host, P=3306, etc. + $given_props{$prop_key} = $prop_val; + } + elsif ( $prop_autokey ) { + # Handle barewords + MKDEBUG && _d("Interpreting $dsn_part as $prop_autokey=$dsn_part"); + $given_props{$prop_autokey} = $dsn_part; + } + else { + MKDEBUG && _d("Bad DSN part: $dsn_part"); + } + } + + # Fill in final props from given, previous, and/or default props + foreach my $key ( keys %opts ) { + MKDEBUG && _d("Finding value for $key"); + $final_props{$key} = $given_props{$key}; + if ( !defined $final_props{$key} + && defined $prev->{$key} && $opts{$key}->{copy} ) + { + $final_props{$key} = $prev->{$key}; + MKDEBUG && _d("Copying value for $key from previous DSN"); + } + if ( !defined $final_props{$key} ) { + $final_props{$key} = $defaults->{$key}; + MKDEBUG && _d("Copying value for $key from defaults"); + } + } + + # Sanity check props + foreach my $key ( keys %given_props ) { + die "Unrecognized DSN part '$key' in '$dsn'\n" + unless exists $opts{$key}; + } + if ( (my $required = $self->prop('required')) ) { + foreach my $key ( keys %$required ) { + die "Missing DSN part '$key' in '$dsn'\n" unless $final_props{$key}; + } + } + + return \%final_props; +} + +sub as_string { + my ( $self, $dsn ) = @_; + return $dsn unless ref $dsn; + return join(',', + map { "$_=" . ($_ eq 'p' ? '...' : $dsn->{$_}) } + grep { defined $dsn->{$_} && $self->{opts}->{$_} } + sort keys %$dsn ); +} + +sub usage { + my ( $self ) = @_; + my $usage + = "DSN syntax is key=value[,key=value...] Allowable DSN keys:\n" + . " KEY COPY MEANING\n" + . " === ==== =============================================\n"; + my %opts = %{$self->{opts}}; + foreach my $key ( sort keys %opts ) { + $usage .= " $key " + . ($opts{$key}->{copy} ? 'yes ' : 'no ') + . ($opts{$key}->{desc} || '[No description]') + . "\n"; + } + if ( (my $key = $self->prop('autokey')) ) { + $usage .= " If the DSN is a bareword, the word is treated as the '$key' key.\n"; + } + return $usage; +} + +# Supports PostgreSQL via the dbidriver element of $info, but assumes MySQL by +# default. +sub get_cxn_params { + my ( $self, $info ) = @_; + my $dsn; + my %opts = %{$self->{opts}}; + my $driver = $self->prop('dbidriver') || ''; + if ( $driver eq 'Pg' ) { + $dsn = 'DBI:Pg:dbname=' . ( $info->{D} || '' ) . ';' + . join(';', map { "$opts{$_}->{dsn}=$info->{$_}" } + grep { defined $info->{$_} } + qw(h P)); + } + else { + $dsn = 'DBI:mysql:' . ( $info->{D} || '' ) . ';' + . join(';', map { "$opts{$_}->{dsn}=$info->{$_}" } + grep { defined $info->{$_} } + qw(F h P S A)) + . ';mysql_read_default_group=client'; + } + MKDEBUG && _d($dsn); + return ($dsn, $info->{u}, $info->{p}); +} + + +# Fills in missing info from a DSN after successfully connecting to the server. +sub fill_in_dsn { + my ( $self, $dbh, $dsn ) = @_; + my $vars = $dbh->selectall_hashref('SHOW VARIABLES', 'Variable_name'); + my ($user, $db) = $dbh->selectrow_array('SELECT USER(), DATABASE()'); + $user =~ s/@.*//; + $dsn->{h} ||= $vars->{hostname}->{Value}; + $dsn->{S} ||= $vars->{'socket'}->{Value}; + $dsn->{P} ||= $vars->{port}->{Value}; + $dsn->{u} ||= $user; + $dsn->{D} ||= $db; +} + +sub get_dbh { + my ( $self, $cxn_string, $user, $pass, $opts ) = @_; + $opts ||= {}; + my $defaults = { + AutoCommit => 0, + RaiseError => 1, + PrintError => 0, + mysql_enable_utf8 => ($cxn_string =~ m/charset=utf8/ ? 1 : 0), + }; + @{$defaults}{ keys %$opts } = values %$opts; + my $dbh; + my $tries = 2; + while ( !$dbh && $tries-- ) { + eval { + MKDEBUG && _d($cxn_string, ' ', $user, ' ', $pass, ' {', + join(', ', map { "$_=>$defaults->{$_}" } keys %$defaults ), '}'); + $dbh = DBI->connect($cxn_string, $user, $pass, $defaults); + # Immediately set character set and binmode on STDOUT. + if ( my ($charset) = $cxn_string =~ m/charset=(\w+)/ ) { + my $sql = "/*!40101 SET NAMES $charset*/"; + MKDEBUG && _d("$dbh: $sql"); + $dbh->do($sql); + MKDEBUG && _d('Enabling charset for STDOUT'); + if ( $charset eq 'utf8' ) { + binmode(STDOUT, ':utf8') + or die "Can't binmode(STDOUT, ':utf8'): $OS_ERROR"; + } + else { + binmode(STDOUT) or die "Can't binmode(STDOUT): $OS_ERROR"; + } + } + }; + if ( !$dbh && $EVAL_ERROR ) { + MKDEBUG && _d($EVAL_ERROR); + if ( $EVAL_ERROR =~ m/not a compiled character set|character set utf8/ ) { + MKDEBUG && _d("Going to try again without utf8 support"); + delete $defaults->{mysql_enable_utf8}; + } + if ( !$tries ) { + die $EVAL_ERROR; + } + } + } + # If setvars exists and it's MySQL connection, set them + my $setvars = $self->prop('setvars'); + if ( $cxn_string =~ m/mysql/i && $setvars ) { + my $sql = "SET $setvars"; + MKDEBUG && _d("$dbh: $sql"); + eval { + $dbh->do($sql); + }; + if ( $EVAL_ERROR ) { + MKDEBUG && _d($EVAL_ERROR); + } + } + MKDEBUG && _d('DBH info: ', + $dbh, + Dumper($dbh->selectrow_hashref( + 'SELECT DATABASE(), CONNECTION_ID(), VERSION()/*!50038 , @@hostname*/')), + ' Connection info: ', ($dbh->{mysql_hostinfo} || 'undef'), + ' Character set info: ', + Dumper($dbh->selectall_arrayref( + 'SHOW VARIABLES LIKE "character_set%"', { Slice => {}})), + ' $DBD::mysql::VERSION: ', $DBD::mysql::VERSION, + ' $DBI::VERSION: ', $DBI::VERSION, + ); + return $dbh; +} + +# Tries to figure out a hostname for the connection. +sub get_hostname { + my ( $self, $dbh ) = @_; + if ( my ($host) = ($dbh->{mysql_hostinfo} || '') =~ m/^(\w+) via/ ) { + return $host; + } + my ( $hostname, $one ) = $dbh->selectrow_array( + 'SELECT /*!50038 @@hostname, */ 1'); + return $hostname; +} + +# Disconnects a database handle, but complains verbosely if there are any active +# children. These are usually $sth handles that haven't been finish()ed. +sub disconnect { + my ( $self, $dbh ) = @_; + MKDEBUG && $self->print_active_handles($dbh); + $dbh->disconnect; +} + +sub print_active_handles { + my ( $self, $thing, $level ) = @_; + $level ||= 0; + printf("# Active %sh: %s %s %s\n", ($thing->{Type} || 'undef'), "\t" x $level, + $thing, (($thing->{Type} || '') eq 'st' ? $thing->{Statement} || '' : '')) + or die "Cannot print: $OS_ERROR"; + foreach my $handle ( grep {defined} @{ $thing->{ChildHandles} } ) { + $self->print_active_handles( $handle, $level + 1 ); + } +} + +sub _d { + my ($package, undef, $line) = caller 0; + @_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; } + map { defined $_ ? $_ : 'undef' } + @_; + # Use $$ instead of $PID in case the package + # does not use English. + print "# $package:$line $$ ", @_, "\n"; +} + +1; + +package InnoDBParser; + +use Data::Dumper; +$Data::Dumper::Sortkeys = 1; +use English qw(-no_match_vars); +use List::Util qw(max); + +# Some common patterns +my $d = qr/(\d+)/; # Digit +my $f = qr/(\d+\.\d+)/; # Float +my $t = qr/(\d+ \d+)/; # Transaction ID +my $i = qr/((?:\d{1,3}\.){3}\d+)/; # IP address +my $n = qr/([^`\s]+)/; # MySQL object name +my $w = qr/(\w+)/; # Words +my $fl = qr/([\w\.\/]+) line $d/; # Filename and line number +my $h = qr/((?:0x)?[0-9a-f]*)/; # Hex +my $s = qr/(\d{6} .\d:\d\d:\d\d)/; # InnoDB timestamp + +# If you update this variable, also update the SYNOPSIS in the pod. +my %innodb_section_headers = ( + "TRANSACTIONS" => "tx", + "BUFFER POOL AND MEMORY" => "bp", + "SEMAPHORES" => "sm", + "LOG" => "lg", + "ROW OPERATIONS" => "ro", + "INSERT BUFFER AND ADAPTIVE HASH INDEX" => "ib", + "FILE I/O" => "io", + "LATEST DETECTED DEADLOCK" => "dl", + "LATEST FOREIGN KEY ERROR" => "fk", +); + +my %parser_for = ( + tx => \&parse_tx_section, + bp => \&parse_bp_section, + sm => \&parse_sm_section, + lg => \&parse_lg_section, + ro => \&parse_ro_section, + ib => \&parse_ib_section, + io => \&parse_io_section, + dl => \&parse_dl_section, + fk => \&parse_fk_section, +); + +my %fk_parser_for = ( + Transaction => \&parse_fk_transaction_error, + Error => \&parse_fk_bad_constraint_error, + Cannot => \&parse_fk_cant_drop_parent_error, +); + +# A thread's proc_info can be at least 98 different things I've found in the +# source. Fortunately, most of them begin with a gerunded verb. These are +# the ones that don't. +my %is_proc_info = ( + 'After create' => 1, + 'Execution of init_command' => 1, + 'FULLTEXT initialization' => 1, + 'Reopen tables' => 1, + 'Repair done' => 1, + 'Repair with keycache' => 1, + 'System lock' => 1, + 'Table lock' => 1, + 'Thread initialized' => 1, + 'User lock' => 1, + 'copy to tmp table' => 1, + 'discard_or_import_tablespace' => 1, + 'end' => 1, + 'got handler lock' => 1, + 'got old table' => 1, + 'init' => 1, + 'key cache' => 1, + 'locks' => 1, + 'malloc' => 1, + 'query end' => 1, + 'rename result table' => 1, + 'rename' => 1, + 'setup' => 1, + 'statistics' => 1, + 'status' => 1, + 'table cache' => 1, + 'update' => 1, +); + +sub new { + bless {}, shift; +} + +# Parse the status and return it. +# See srv_printf_innodb_monitor in innobase/srv/srv0srv.c +# Pass in the text to parse, whether to be in debugging mode, which sections +# to parse (hashref; if empty, parse all), and whether to parse full info from +# locks and such (probably shouldn't unless you need to). +sub parse_status_text { + my ( $self, $fulltext, $debug, $sections, $full ) = @_; + + die "I can't parse undef" unless defined $fulltext; + $fulltext =~ s/[\r\n]+/\n/g; + + $sections ||= {}; + die '$sections must be a hashref' unless ref($sections) eq 'HASH'; + + my %innodb_data = ( + got_all => 0, # Whether I was able to get the whole thing + ts => '', # Timestamp the server put on it + last_secs => 0, # Num seconds the averages are over + sections => {}, # Parsed values from each section + ); + + if ( $debug ) { + $innodb_data{'fulltext'} = $fulltext; + } + + # Get the most basic info about the status: beginning and end, and whether + # I got the whole thing (if there has been a big deadlock and there are + # too many locks to print, the output might be truncated) + my ( $time_text ) = $fulltext =~ m/^$s INNODB MONITOR OUTPUT$/m; + $innodb_data{'ts'} = [ parse_innodb_timestamp( $time_text ) ]; + $innodb_data{'timestring'} = ts_to_string($innodb_data{'ts'}); + ( $innodb_data{'last_secs'} ) = $fulltext + =~ m/Per second averages calculated from the last $d seconds/; + + ( my $got_all ) = $fulltext =~ m/END OF INNODB MONITOR OUTPUT/; + $innodb_data{'got_all'} = $got_all || 0; + + # Split it into sections. Each section begins with + # ----- + # LABEL + # ----- + my %innodb_sections; + my @matches = $fulltext + =~ m#\n(---+)\n([A-Z /]+)\n\1\n(.*?)(?=\n(---+)\n[A-Z /]+\n\4\n|$)#gs; + while ( my ( $start, $name, $text, $end ) = splice(@matches, 0, 4) ) { + $innodb_sections{$name} = [ $text, $end ? 1 : 0 ]; + } + # The Row Operations section is a special case, because instead of ending + # with the beginning of another section, it ends with the end of the file. + # So this section is complete if the entire file is complete. + $innodb_sections{'ROW OPERATIONS'}->[1] ||= $innodb_data{'got_all'}; + + # Just for sanity's sake, make sure I understand what to do with each + # section + eval { + foreach my $section ( keys %innodb_sections ) { + my $header = $innodb_section_headers{$section}; + die "Unknown section $section in $fulltext\n" + unless $header; + $innodb_data{'sections'}->{ $header } + ->{'fulltext'} = $innodb_sections{$section}->[0]; + $innodb_data{'sections'}->{ $header } + ->{'complete'} = $innodb_sections{$section}->[1]; + } + }; + if ( $EVAL_ERROR ) { + _debug( $debug, $EVAL_ERROR); + } + + # ################################################################ + # Parse the detailed data out of the sections. + # ################################################################ + eval { + foreach my $section ( keys %parser_for ) { + if ( defined $innodb_data{'sections'}->{$section} + && (!%$sections || (defined($sections->{$section} && $sections->{$section})) )) { + $parser_for{$section}->( + $innodb_data{'sections'}->{$section}, + $innodb_data{'sections'}->{$section}->{'complete'}, + $debug, + $full ) + or delete $innodb_data{'sections'}->{$section}; + } + else { + delete $innodb_data{'sections'}->{$section}; + } + } + }; + if ( $EVAL_ERROR ) { + _debug( $debug, $EVAL_ERROR); + } + + return \%innodb_data; +} + +# Parses the status text and returns it flattened out as a single hash. +sub get_status_hash { + my ( $self, $fulltext, $debug, $sections, $full ) = @_; + + # Parse the status text... + my $innodb_status + = $self->parse_status_text($fulltext, $debug, $sections, $full ); + + # Flatten the hierarchical structure into a single list by grabbing desired + # sections from it. + return + (map { 'IB_' . $_ => $innodb_status->{$_} } qw(timestring last_secs got_all)), + (map { 'IB_bp_' . $_ => $innodb_status->{'sections'}->{'bp'}->{$_} } + qw( writes_pending buf_pool_hit_rate total_mem_alloc buf_pool_reads + awe_mem_alloc pages_modified writes_pending_lru page_creates_sec + reads_pending pages_total buf_pool_hits writes_pending_single_page + page_writes_sec pages_read pages_written page_reads_sec + writes_pending_flush_list buf_pool_size add_pool_alloc + dict_mem_alloc pages_created buf_free complete )), + (map { 'IB_tx_' . $_ => $innodb_status->{'sections'}->{'tx'}->{$_} } + qw( num_lock_structs history_list_len purge_done_for transactions + purge_undo_for is_truncated trx_id_counter complete )), + (map { 'IB_ib_' . $_ => $innodb_status->{'sections'}->{'ib'}->{$_} } + qw( hash_table_size hash_searches_s non_hash_searches_s + bufs_in_node_heap used_cells size free_list_len seg_size inserts + merged_recs merges complete )), + (map { 'IB_lg_' . $_ => $innodb_status->{'sections'}->{'lg'}->{$_} } + qw( log_ios_done pending_chkp_writes last_chkp log_ios_s + log_flushed_to log_seq_no pending_log_writes complete )), + (map { 'IB_sm_' . $_ => $innodb_status->{'sections'}->{'sm'}->{$_} } + qw( wait_array_size rw_shared_spins rw_excl_os_waits mutex_os_waits + mutex_spin_rounds mutex_spin_waits rw_excl_spins rw_shared_os_waits + waits signal_count reservation_count complete )), + (map { 'IB_ro_' . $_ => $innodb_status->{'sections'}->{'ro'}->{$_} } + qw( queries_in_queue n_reserved_extents main_thread_state + main_thread_proc_no main_thread_id read_sec del_sec upd_sec ins_sec + read_views_open num_rows_upd num_rows_ins num_rows_read + queries_inside num_rows_del complete )), + (map { 'IB_fk_' . $_ => $innodb_status->{'sections'}->{'fk'}->{$_} } + qw( trigger parent_table child_index parent_index attempted_op + child_db timestring fk_name records col_name reason txn parent_db + type child_table parent_col complete )), + (map { 'IB_io_' . $_ => $innodb_status->{'sections'}->{'io'}->{$_} } + qw( pending_buffer_pool_flushes pending_pwrites pending_preads + pending_normal_aio_reads fsyncs_s os_file_writes pending_sync_ios + reads_s flush_type avg_bytes_s pending_ibuf_aio_reads writes_s + threads os_file_reads pending_aio_writes pending_log_ios os_fsyncs + pending_log_flushes complete )), + (map { 'IB_dl_' . $_ => $innodb_status->{'sections'}->{'dl'}->{$_} } + qw( timestring rolled_back txns complete )); + +} + +sub ts_to_string { + my $parts = shift; + return sprintf('%02d-%02d-%02d %02d:%02d:%02d', @$parts); +} + +sub parse_innodb_timestamp { + my $text = shift; + my ( $y, $m, $d, $h, $i, $s ) + = $text =~ m/^(\d\d)(\d\d)(\d\d) +(\d+):(\d+):(\d+)$/; + die("Can't get timestamp from $text\n") unless $y; + $y += 2000; + return ( $y, $m, $d, $h, $i, $s ); +} + +sub parse_fk_section { + my ( $section, $complete, $debug, $full ) = @_; + my $fulltext = $section->{'fulltext'}; + + return 0 unless $fulltext; + + my ( $ts, $type ) = $fulltext =~ m/^$s\s+(\w+)/m; + $section->{'ts'} = [ parse_innodb_timestamp( $ts ) ]; + $section->{'timestring'} = ts_to_string($section->{'ts'}); + $section->{'type'} = $type; + + # Decide which type of FK error happened, and dispatch to the right parser. + if ( $type && $fk_parser_for{$type} ) { + $fk_parser_for{$type}->( $section, $complete, $debug, $fulltext, $full ); + } + + delete $section->{'fulltext'} unless $debug; + + return 1; +} + +sub parse_fk_cant_drop_parent_error { + my ( $section, $complete, $debug, $fulltext, $full ) = @_; + + # Parse the parent/child table info out + @{$section}{ qw(attempted_op parent_db parent_table) } = $fulltext + =~ m{Cannot $w table `(.*)/(.*)`}m; + @{$section}{ qw(child_db child_table) } = $fulltext + =~ m{because it is referenced by `(.*)/(.*)`}m; + + ( $section->{'reason'} ) = $fulltext =~ m/(Cannot .*)/s; + $section->{'reason'} =~ s/\n(?:InnoDB: )?/ /gm + if $section->{'reason'}; + + # Certain data may not be present. Make them '' if not present. + map { $section->{$_} ||= "" } + qw(child_index fk_name col_name parent_col); +} + +# See dict/dict0dict.c, function dict_foreign_error_report +# I don't care much about these. There are lots of different messages, and +# they come from someone trying to create a foreign key, or similar +# statements. They aren't indicative of some transaction trying to insert, +# delete or update data. Sometimes it is possible to parse out a lot of +# information about the tables and indexes involved, but often the message +# contains the DDL string the user entered, which is way too much for this +# module to try to handle. +sub parse_fk_bad_constraint_error { + my ( $section, $complete, $debug, $fulltext, $full ) = @_; + + # Parse the parent/child table and index info out + @{$section}{ qw(child_db child_table) } = $fulltext + =~ m{Error in foreign key constraint of table (.*)/(.*):$}m; + $section->{'attempted_op'} = 'DDL'; + + # FK name, parent info... if possible. + @{$section}{ qw(fk_name col_name parent_db parent_table parent_col) } + = $fulltext + =~ m/CONSTRAINT `?$n`? FOREIGN KEY \(`?$n`?\) REFERENCES (?:`?$n`?\.)?`?$n`? \(`?$n`?\)/; + + if ( !defined($section->{'fk_name'}) ) { + # Try to parse SQL a user might have typed in a CREATE statement or such + @{$section}{ qw(col_name parent_db parent_table parent_col) } + = $fulltext + =~ m/FOREIGN\s+KEY\s*\(`?$n`?\)\s+REFERENCES\s+(?:`?$n`?\.)?`?$n`?\s*\(`?$n`?\)/i; + } + $section->{'parent_db'} ||= $section->{'child_db'}; + + # Name of the child index (index in the same table where the FK is, see + # definition of dict_foreign_struct in include/dict0mem.h, where it is + # called foreign_index, as opposed to referenced_index which is in the + # parent table. This may not be possible to find. + @{$section}{ qw(child_index) } = $fulltext + =~ m/^The index in the foreign key in table is $n$/m; + + @{$section}{ qw(reason) } = $fulltext =~ m/:\s*([^:]+)(?= Constraint:|$)/ms; + $section->{'reason'} =~ s/\s+/ /g + if $section->{'reason'}; + + # Certain data may not be present. Make them '' if not present. + map { $section->{$_} ||= "" } + qw(child_index fk_name col_name parent_table parent_col); +} + +# see source file row/row0ins.c +sub parse_fk_transaction_error { + my ( $section, $complete, $debug, $fulltext, $full ) = @_; + + # Parse the txn info out + my ( $txn ) = $fulltext + =~ m/Transaction:\n(TRANSACTION.*)\nForeign key constraint fails/s; + if ( $txn ) { + $section->{'txn'} = parse_tx_text( $txn, $complete, $debug, $full ); + } + + # Parse the parent/child table and index info out. There are two types: an + # update or a delete of a parent record leaves a child orphaned + # (row_ins_foreign_report_err), and an insert or update of a child record has + # no matching parent record (row_ins_foreign_report_add_err). + + @{$section}{ qw(reason child_db child_table) } + = $fulltext =~ m{^(Foreign key constraint fails for table `(.*)/(.*)`:)$}m; + + @{$section}{ qw(fk_name col_name parent_db parent_table parent_col) } + = $fulltext + =~ m/CONSTRAINT `$n` FOREIGN KEY \(`$n`\) REFERENCES (?:`$n`\.)?`$n` \(`$n`\)/; + $section->{'parent_db'} ||= $section->{'child_db'}; + + # Special case, which I don't know how to trigger, but see + # innobase/row/row0ins.c row_ins_check_foreign_constraint + if ( $fulltext =~ m/ibd file does not currently exist!/ ) { + my ( $attempted_op, $index, $records ) + = $fulltext =~ m/^Trying to (add to index) `$n` tuple:\n(.*))?/sm; + $section->{'child_index'} = $index; + $section->{'attempted_op'} = $attempted_op || ''; + if ( $records && $full ) { + ( $section->{'records'} ) + = parse_innodb_record_dump( $records, $complete, $debug ); + } + @{$section}{qw(parent_db parent_table)} + =~ m/^But the parent table `$n`\.`$n`$/m; + } + else { + my ( $attempted_op, $which, $index ) + = $fulltext =~ m/^Trying to ([\w ]*) in (child|parent) table, in index `$n` tuple:$/m; + if ( $which ) { + $section->{$which . '_index'} = $index; + $section->{'attempted_op'} = $attempted_op || ''; + + # Parse out the related records in the other table. + my ( $search_index, $records ); + if ( $which eq 'child' ) { + ( $search_index, $records ) = $fulltext + =~ m/^But in parent table [^,]*, in index `$n`,\nthe closest match we can find is record:\n(.*)/ms; + $section->{'parent_index'} = $search_index; + } + else { + ( $search_index, $records ) = $fulltext + =~ m/^But in child table [^,]*, in index `$n`, (?:the record is not available|there is a record:\n(.*))?/ms; + $section->{'child_index'} = $search_index; + } + if ( $records && $full ) { + $section->{'records'} + = parse_innodb_record_dump( $records, $complete, $debug ); + } + else { + $section->{'records'} = ''; + } + } + } + + # Parse out the tuple trying to be updated, deleted or inserted. + my ( $trigger ) = $fulltext =~ m/^(DATA TUPLE: \d+ fields;\n.*)$/m; + if ( $trigger ) { + $section->{'trigger'} = parse_innodb_record_dump( $trigger, $complete, $debug ); + } + + # Certain data may not be present. Make them '' if not present. + map { $section->{$_} ||= "" } + qw(child_index fk_name col_name parent_table parent_col); +} + +# There are new-style and old-style record formats. See rem/rem0rec.c +# TODO: write some tests for this +sub parse_innodb_record_dump { + my ( $dump, $complete, $debug ) = @_; + return undef unless $dump; + + my $result = {}; + + if ( $dump =~ m/PHYSICAL RECORD/ ) { + my $style = $dump =~ m/compact format/ ? 'new' : 'old'; + $result->{'style'} = $style; + + # This is a new-style record. + if ( $style eq 'new' ) { + @{$result}{qw( heap_no type num_fields info_bits )} + = $dump + =~ m/^(?:Record lock, heap no $d )?([A-Z ]+): n_fields $d; compact format; info bits $d$/m; + } + + # OK, it's old-style. Unfortunately there are variations here too. + elsif ( $dump =~ m/-byte offs / ) { + # Older-old style. + @{$result}{qw( heap_no type num_fields byte_offset info_bits )} + = $dump + =~ m/^(?:Record lock, heap no $d )?([A-Z ]+): n_fields $d; $d-byte offs [A-Z]+; info bits $d$/m; + if ( $dump !~ m/-byte offs TRUE/ ) { + $result->{'byte_offset'} = 0; + } + } + else { + # Newer-old style. + @{$result}{qw( heap_no type num_fields byte_offset info_bits )} + = $dump + =~ m/^(?:Record lock, heap no $d )?([A-Z ]+): n_fields $d; $d-byte offsets; info bits $d$/m; + } + + } + else { + $result->{'style'} = 'tuple'; + @{$result}{qw( type num_fields )} + = $dump =~ m/^(DATA TUPLE): $d fields;$/m; + } + + # Fill in default values for things that couldn't be parsed. + map { $result->{$_} ||= 0 } + qw(heap_no num_fields byte_offset info_bits); + map { $result->{$_} ||= '' } + qw(style type ); + + my @fields = $dump =~ m/ (\d+:.*?;?);(?=$| \d+:)/gm; + $result->{'fields'} = [ map { parse_field($_, $complete, $debug ) } @fields ]; + + return $result; +} + +# New/old-style applies here. See rem/rem0rec.c +# $text should not include the leading space or the second trailing semicolon. +sub parse_field { + my ( $text, $complete, $debug ) = @_; + + # Sample fields: + # '4: SQL NULL, size 4 ' + # '1: len 6; hex 000000005601; asc V ;' + # '6: SQL NULL' + # '5: len 30; hex 687474703a2f2f7777772e737765657477617465722e636f6d2f73746f72; asc http://www.sweetwater.com/stor;...(truncated)' + my ( $id, $nullsize, $len, $hex, $asc, $truncated ); + ( $id, $nullsize ) = $text =~ m/^$d: SQL NULL, size $d $/; + if ( !defined($id) ) { + ( $id ) = $text =~ m/^$d: SQL NULL$/; + } + if ( !defined($id) ) { + ( $id, $len, $hex, $asc, $truncated ) + = $text =~ m/^$d: len $d; hex $h; asc (.*);(\.\.\.\(truncated\))?$/; + } + + die "Could not parse this field: '$text'" unless defined $id; + return { + id => $id, + len => defined($len) ? $len : defined($nullsize) ? $nullsize : 0, + 'hex' => defined($hex) ? $hex : '', + asc => defined($asc) ? $asc : '', + trunc => $truncated ? 1 : 0, + }; + +} + +sub parse_dl_section { + my ( $dl, $complete, $debug, $full ) = @_; + return unless $dl; + my $fulltext = $dl->{'fulltext'}; + return 0 unless $fulltext; + + my ( $ts ) = $fulltext =~ m/^$s$/m; + return 0 unless $ts; + + $dl->{'ts'} = [ parse_innodb_timestamp( $ts ) ]; + $dl->{'timestring'} = ts_to_string($dl->{'ts'}); + $dl->{'txns'} = {}; + + my @sections + = $fulltext + =~ m{ + ^\*{3}\s([^\n]*) # *** (1) WAITING FOR THIS... + (.*?) # Followed by anything, non-greedy + (?=(?:^\*{3})|\z) # Followed by another three stars or EOF + }gmsx; + + + # Loop through each section. There are no assumptions about how many + # there are, who holds and wants what locks, and who gets rolled back. + while ( my ($header, $body) = splice(@sections, 0, 2) ) { + my ( $txn_id, $what ) = $header =~ m/^\($d\) (.*):$/; + next unless $txn_id; + $dl->{'txns'}->{$txn_id} ||= {}; + my $txn = $dl->{'txns'}->{$txn_id}; + + if ( $what eq 'TRANSACTION' ) { + $txn->{'tx'} = parse_tx_text( $body, $complete, $debug, $full ); + } + else { + push @{$txn->{'locks'}}, parse_innodb_record_locks( $body, $complete, $debug, $full ); + } + } + + @{ $dl }{ qw(rolled_back) } + = $fulltext =~ m/^\*\*\* WE ROLL BACK TRANSACTION \($d\)$/m; + + # Make sure certain values aren't undef + map { $dl->{$_} ||= '' } qw(rolled_back); + + delete $dl->{'fulltext'} unless $debug; + return 1; +} + +sub parse_innodb_record_locks { + my ( $text, $complete, $debug, $full ) = @_; + my @result; + + foreach my $lock ( $text =~ m/(^(?:RECORD|TABLE) LOCKS?.*$)/gm ) { + my $hash = {}; + @{$hash}{ qw(lock_type space_id page_no n_bits index db table txn_id lock_mode) } + = $lock + =~ m{^(RECORD|TABLE) LOCKS? (?:space id $d page no $d n bits $d index `?$n`? of )?table `$n(?:/|`\.`)$n` trx id $t lock.mode (\S+)}m; + ( $hash->{'special'} ) + = $lock =~ m/^(?:RECORD|TABLE) .*? locks (rec but not gap|gap before rec)/m; + $hash->{'insert_intention'} + = $lock =~ m/^(?:RECORD|TABLE) .*? insert intention/m ? 1 : 0; + $hash->{'waiting'} + = $lock =~ m/^(?:RECORD|TABLE) .*? waiting/m ? 1 : 0; + + # Some things may not be in the text, so make sure they are not + # undef. + map { $hash->{$_} ||= 0 } qw(n_bits page_no space_id); + map { $hash->{$_} ||= "" } qw(index special); + push @result, $hash; + } + + return @result; +} + +sub parse_tx_text { + my ( $txn, $complete, $debug, $full ) = @_; + + my ( $txn_id, $txn_status, $active_secs, $proc_no, $os_thread_id ) + = $txn + =~ m/^(?:---)?TRANSACTION $t, (\D*?)(?: $d sec)?, (?:process no $d, )?OS thread id $d/m; + my ( $thread_status, $thread_decl_inside ) + = $txn + =~ m/OS thread id \d+(?: ([^,]+?))?(?:, thread declared inside InnoDB $d)?$/m; + + # Parsing the line that begins 'MySQL thread id' is complicated. The only + # thing always in the line is the thread and query id. See function + # innobase_mysql_print_thd in InnoDB source file sql/ha_innodb.cc. + my ( $thread_line ) = $txn =~ m/^(MySQL thread id .*)$/m; + my ( $mysql_thread_id, $query_id, $hostname, $ip, $user, $query_status ); + + if ( $thread_line ) { + # These parts can always be gotten. + ( $mysql_thread_id, $query_id ) = $thread_line =~ m/^MySQL thread id $d, query id $d/m; + + # If it's a master/slave thread, "Has (read|sent) all" may be the thread's + # proc_info. In these cases, there won't be any host/ip/user info + ( $query_status ) = $thread_line =~ m/(Has (?:read|sent) all .*$)/m; + if ( defined($query_status) ) { + $user = 'system user'; + } + + # It may be the case that the query id is the last thing in the line. + elsif ( $thread_line =~ m/query id \d+ / ) { + # The IP address is the only non-word thing left, so it's the most + # useful marker for where I have to start guessing. + ( $hostname, $ip ) = $thread_line =~ m/query id \d+(?: ([A-Za-z]\S+))? $i/m; + if ( defined $ip ) { + ( $user, $query_status ) = $thread_line =~ m/$ip $w(?: (.*))?$/; + } + else { # OK, there wasn't an IP address. + # There might not be ANYTHING except the query status. + ( $query_status ) = $thread_line =~ m/query id \d+ (.*)$/; + if ( $query_status !~ m/^\w+ing/ && !exists($is_proc_info{$query_status}) ) { + # The remaining tokens are, in order: hostname, user, query_status. + # It's basically impossible to know which is which. + ( $hostname, $user, $query_status ) = $thread_line + =~ m/query id \d+(?: ([A-Za-z]\S+))?(?: $w(?: (.*))?)?$/m; + } + else { + $user = 'system user'; + } + } + } + } + + my ( $lock_wait_status, $lock_structs, $heap_size, $row_locks, $undo_log_entries ) + = $txn + =~ m/^(?:(\D*) )?$d lock struct\(s\), heap size $d(?:, $d row lock\(s\))?(?:, undo log entries $d)?$/m; + my ( $lock_wait_time ) + = $txn + =~ m/^------- TRX HAS BEEN WAITING $d SEC/m; + + my $locks; + # If the transaction has locks, grab the locks. + if ( $txn =~ m/^TABLE LOCK|RECORD LOCKS/ ) { + $locks = [parse_innodb_record_locks($txn, $complete, $debug, $full)]; + } + + my ( $tables_in_use, $tables_locked ) + = $txn + =~ m/^mysql tables in use $d, locked $d$/m; + my ( $txn_doesnt_see_ge, $txn_sees_lt ) + = $txn + =~ m/^Trx read view will not see trx with id >= $t, sees < $t$/m; + my $has_read_view = defined($txn_doesnt_see_ge); + # Only a certain number of bytes of the query text are included here, at least + # under some circumstances. Some versions include 300, some 600. + my ( $query_text ) + = $txn + =~ m{ + ^MySQL\sthread\sid\s[^\n]+\n # This comes before the query text + (.*?) # The query text + (?= # Followed by any of... + ^Trx\sread\sview + |^-------\sTRX\sHAS\sBEEN\sWAITING + |^TABLE\sLOCK + |^RECORD\sLOCKS\sspace\sid + |^(?:---)?TRANSACTION + |^\*\*\*\s\(\d\) + |\Z + ) + }xms; + if ( $query_text ) { + $query_text =~ s/\s+$//; + } + else { + $query_text = ''; + } + + my %stuff = ( + active_secs => $active_secs, + has_read_view => $has_read_view, + heap_size => $heap_size, + hostname => $hostname, + ip => $ip, + lock_structs => $lock_structs, + lock_wait_status => $lock_wait_status, + lock_wait_time => $lock_wait_time, + mysql_thread_id => $mysql_thread_id, + os_thread_id => $os_thread_id, + proc_no => $proc_no, + query_id => $query_id, + query_status => $query_status, + query_text => $query_text, + row_locks => $row_locks, + tables_in_use => $tables_in_use, + tables_locked => $tables_locked, + thread_decl_inside => $thread_decl_inside, + thread_status => $thread_status, + txn_doesnt_see_ge => $txn_doesnt_see_ge, + txn_id => $txn_id, + txn_sees_lt => $txn_sees_lt, + txn_status => $txn_status, + undo_log_entries => $undo_log_entries, + user => $user, + ); + $stuff{'fulltext'} = $txn if $debug; + $stuff{'locks'} = $locks if $locks; + + # Some things may not be in the txn text, so make sure they are not + # undef. + map { $stuff{$_} ||= 0 } qw(active_secs heap_size lock_structs + tables_in_use undo_log_entries tables_locked has_read_view + thread_decl_inside lock_wait_time proc_no row_locks); + map { $stuff{$_} ||= "" } qw(thread_status txn_doesnt_see_ge + txn_sees_lt query_status ip query_text lock_wait_status user); + $stuff{'hostname'} ||= $stuff{'ip'}; + + return \%stuff; +} + +sub parse_tx_section { + my ( $section, $complete, $debug, $full ) = @_; + return unless $section && $section->{'fulltext'}; + my $fulltext = $section->{'fulltext'}; + $section->{'transactions'} = []; + + # Handle the individual transactions + my @transactions = $fulltext =~ m/(---TRANSACTION \d.*?)(?=\n---TRANSACTION|$)/gs; + foreach my $txn ( @transactions ) { + my $stuff = parse_tx_text( $txn, $complete, $debug, $full ); + delete $stuff->{'fulltext'} unless $debug; + push @{$section->{'transactions'}}, $stuff; + } + + # Handle the general info + @{$section}{ 'trx_id_counter' } + = $fulltext =~ m/^Trx id counter $t$/m; + @{$section}{ 'purge_done_for', 'purge_undo_for' } + = $fulltext =~ m/^Purge done for trx's n:o < $t undo n:o < $t$/m; + @{$section}{ 'history_list_len' } # This isn't present in some 4.x versions + = $fulltext =~ m/^History list length $d$/m; + @{$section}{ 'num_lock_structs' } + = $fulltext =~ m/^Total number of lock structs in row lock hash table $d$/m; + @{$section}{ 'is_truncated' } + = $fulltext =~ m/^\.\.\. truncated\.\.\.$/m ? 1 : 0; + + # Fill in things that might not be present + foreach ( qw(history_list_len) ) { + $section->{$_} ||= 0; + } + + delete $section->{'fulltext'} unless $debug; + return 1; +} + +# I've read the source for this section. +sub parse_ro_section { + my ( $section, $complete, $debug, $full ) = @_; + return unless $section && $section->{'fulltext'}; + my $fulltext = $section->{'fulltext'}; + + # Grab the info + @{$section}{ 'queries_inside', 'queries_in_queue' } + = $fulltext =~ m/^$d queries inside InnoDB, $d queries in queue$/m; + ( $section->{ 'read_views_open' } ) + = $fulltext =~ m/^$d read views open inside InnoDB$/m; + ( $section->{ 'n_reserved_extents' } ) + = $fulltext =~ m/^$d tablespace extents now reserved for B-tree/m; + @{$section}{ 'main_thread_proc_no', 'main_thread_id', 'main_thread_state' } + = $fulltext =~ m/^Main thread (?:process no. $d, )?id $d, state: (.*)$/m; + @{$section}{ 'num_rows_ins', 'num_rows_upd', 'num_rows_del', 'num_rows_read' } + = $fulltext =~ m/^Number of rows inserted $d, updated $d, deleted $d, read $d$/m; + @{$section}{ 'ins_sec', 'upd_sec', 'del_sec', 'read_sec' } + = $fulltext =~ m#^$f inserts/s, $f updates/s, $f deletes/s, $f reads/s$#m; + $section->{'main_thread_proc_no'} ||= 0; + + map { $section->{$_} ||= 0 } qw(read_views_open n_reserved_extents); + delete $section->{'fulltext'} unless $debug; + return 1; +} + +sub parse_lg_section { + my ( $section, $complete, $debug, $full ) = @_; + return unless $section; + my $fulltext = $section->{'fulltext'}; + + # Grab the info + ( $section->{ 'log_seq_no' } ) + = $fulltext =~ m/Log sequence number \s*(\d.*)$/m; + ( $section->{ 'log_flushed_to' } ) + = $fulltext =~ m/Log flushed up to \s*(\d.*)$/m; + ( $section->{ 'last_chkp' } ) + = $fulltext =~ m/Last checkpoint at \s*(\d.*)$/m; + @{$section}{ 'pending_log_writes', 'pending_chkp_writes' } + = $fulltext =~ m/$d pending log writes, $d pending chkp writes/; + @{$section}{ 'log_ios_done', 'log_ios_s' } + = $fulltext =~ m#$d log i/o's done, $f log i/o's/second#; + + delete $section->{'fulltext'} unless $debug; + return 1; +} + +sub parse_ib_section { + my ( $section, $complete, $debug, $full ) = @_; + return unless $section && $section->{'fulltext'}; + my $fulltext = $section->{'fulltext'}; + + # Some servers will output ibuf information for tablespace 0, as though there + # might be many tablespaces with insert buffers. (In practice I believe + # the source code shows there will only ever be one). I have to parse both + # cases here, but I assume there will only be one. + @{$section}{ 'size', 'free_list_len', 'seg_size' } + = $fulltext =~ m/^Ibuf(?: for space 0)?: size $d, free list len $d, seg size $d,$/m; + @{$section}{ 'inserts', 'merged_recs', 'merges' } + = $fulltext =~ m/^$d inserts, $d merged recs, $d merges$/m; + + @{$section}{ 'hash_table_size', 'used_cells', 'bufs_in_node_heap' } + = $fulltext =~ m/^Hash table size $d, used cells $d, node heap has $d buffer\(s\)$/m; + @{$section}{ 'hash_searches_s', 'non_hash_searches_s' } + = $fulltext =~ m{^$f hash searches/s, $f non-hash searches/s$}m; + + delete $section->{'fulltext'} unless $debug; + return 1; +} + +sub parse_wait_array { + my ( $text, $complete, $debug, $full ) = @_; + my %result; + + @result{ qw(thread waited_at_filename waited_at_line waited_secs) } + = $text =~ m/^--Thread $d has waited at $fl for $f seconds/m; + + # Depending on whether it's a SYNC_MUTEX,RW_LOCK_EX,RW_LOCK_SHARED, + # there will be different text output + if ( $text =~ m/^Mutex at/m ) { + $result{'request_type'} = 'M'; + @result{ qw( lock_mem_addr lock_cfile_name lock_cline lock_var) } + = $text =~ m/^Mutex at $h created file $fl, lock var $d$/m; + @result{ qw( waiters_flag )} + = $text =~ m/^waiters flag $d$/m; + } + else { + @result{ qw( request_type lock_mem_addr lock_cfile_name lock_cline) } + = $text =~ m/^(.)-lock on RW-latch at $h created in file $fl$/m; + @result{ qw( writer_thread writer_lock_mode ) } + = $text =~ m/^a writer \(thread id $d\) has reserved it in mode (.*)$/m; + @result{ qw( num_readers waiters_flag )} + = $text =~ m/^number of readers $d, waiters flag $d$/m; + @result{ qw(last_s_file_name last_s_line ) } + = $text =~ m/Last time read locked in file $fl$/m; + @result{ qw(last_x_file_name last_x_line ) } + = $text =~ m/Last time write locked in file $fl$/m; + } + + $result{'cell_waiting'} = $text =~ m/^wait has ended$/m ? 0 : 1; + $result{'cell_event_set'} = $text =~ m/^wait is ending$/m ? 1 : 0; + + # Because there are two code paths, some things won't get set. + map { $result{$_} ||= '' } + qw(last_s_file_name last_x_file_name writer_lock_mode); + map { $result{$_} ||= 0 } + qw(num_readers lock_var last_s_line last_x_line writer_thread); + + return \%result; +} + +sub parse_sm_section { + my ( $section, $complete, $debug, $full ) = @_; + return 0 unless $section && $section->{'fulltext'}; + my $fulltext = $section->{'fulltext'}; + + # Grab the info + @{$section}{ 'reservation_count', 'signal_count' } + = $fulltext =~ m/^OS WAIT ARRAY INFO: reservation count $d, signal count $d$/m; + @{$section}{ 'mutex_spin_waits', 'mutex_spin_rounds', 'mutex_os_waits' } + = $fulltext =~ m/^Mutex spin waits $d, rounds $d, OS waits $d$/m; + @{$section}{ 'rw_shared_spins', 'rw_shared_os_waits', 'rw_excl_spins', 'rw_excl_os_waits' } + = $fulltext =~ m/^RW-shared spins $d, OS waits $d; RW-excl spins $d, OS waits $d$/m; + + # Look for info on waits. + my @waits = $fulltext =~ m/^(--Thread.*?)^(?=Mutex spin|--Thread)/gms; + $section->{'waits'} = [ map { parse_wait_array($_, $complete, $debug) } @waits ]; + $section->{'wait_array_size'} = scalar(@waits); + + delete $section->{'fulltext'} unless $debug; + return 1; +} + +# I've read the source for this section. +sub parse_bp_section { + my ( $section, $complete, $debug, $full ) = @_; + return unless $section && $section->{'fulltext'}; + my $fulltext = $section->{'fulltext'}; + + # Grab the info + @{$section}{ 'total_mem_alloc', 'add_pool_alloc' } + = $fulltext =~ m/^Total memory allocated $d; in additional pool allocated $d$/m; + @{$section}{'dict_mem_alloc'} = $fulltext =~ m/Dictionary memory allocated $d/; + @{$section}{'awe_mem_alloc'} = $fulltext =~ m/$d MB of AWE memory/; + @{$section}{'buf_pool_size'} = $fulltext =~ m/^Buffer pool size\s*$d$/m; + @{$section}{'buf_free'} = $fulltext =~ m/^Free buffers\s*$d$/m; + @{$section}{'pages_total'} = $fulltext =~ m/^Database pages\s*$d$/m; + @{$section}{'pages_modified'} = $fulltext =~ m/^Modified db pages\s*$d$/m; + @{$section}{'pages_read', 'pages_created', 'pages_written'} + = $fulltext =~ m/^Pages read $d, created $d, written $d$/m; + @{$section}{'page_reads_sec', 'page_creates_sec', 'page_writes_sec'} + = $fulltext =~ m{^$f reads/s, $f creates/s, $f writes/s$}m; + @{$section}{'buf_pool_hits', 'buf_pool_reads'} + = $fulltext =~ m{Buffer pool hit rate $d / $d$}m; + if ($fulltext =~ m/^No buffer pool page gets since the last printout$/m) { + @{$section}{'buf_pool_hits', 'buf_pool_reads'} = (0, 0); + @{$section}{'buf_pool_hit_rate'} = '--'; + } + else { + @{$section}{'buf_pool_hit_rate'} + = $fulltext =~ m{Buffer pool hit rate (\d+ / \d+)$}m; + } + @{$section}{'reads_pending'} = $fulltext =~ m/^Pending reads $d/m; + @{$section}{'writes_pending_lru', 'writes_pending_flush_list', 'writes_pending_single_page' } + = $fulltext =~ m/^Pending writes: LRU $d, flush list $d, single page $d$/m; + + map { $section->{$_} ||= 0 } + qw(writes_pending_lru writes_pending_flush_list writes_pending_single_page + awe_mem_alloc dict_mem_alloc); + @{$section}{'writes_pending'} = List::Util::sum( + @{$section}{ qw(writes_pending_lru writes_pending_flush_list writes_pending_single_page) }); + + delete $section->{'fulltext'} unless $debug; + return 1; +} + +# I've read the source for this. +sub parse_io_section { + my ( $section, $complete, $debug, $full ) = @_; + return unless $section && $section->{'fulltext'}; + my $fulltext = $section->{'fulltext'}; + $section->{'threads'} = {}; + + # Grab the I/O thread info + my @threads = $fulltext =~ m<^(I/O thread \d+ .*)$>gm; + foreach my $thread (@threads) { + my ( $tid, $state, $purpose, $event_set ) + = $thread =~ m{I/O thread $d state: (.+?) \((.*)\)(?: ev set)?$}m; + if ( defined $tid ) { + $section->{'threads'}->{$tid} = { + thread => $tid, + state => $state, + purpose => $purpose, + event_set => $event_set ? 1 : 0, + }; + } + } + + # Grab the reads/writes/flushes info + @{$section}{ 'pending_normal_aio_reads', 'pending_aio_writes' } + = $fulltext =~ m/^Pending normal aio reads: $d, aio writes: $d,$/m; + @{$section}{ 'pending_ibuf_aio_reads', 'pending_log_ios', 'pending_sync_ios' } + = $fulltext =~ m{^ ibuf aio reads: $d, log i/o's: $d, sync i/o's: $d$}m; + @{$section}{ 'flush_type', 'pending_log_flushes', 'pending_buffer_pool_flushes' } + = $fulltext =~ m/^Pending flushes \($w\) log: $d; buffer pool: $d$/m; + @{$section}{ 'os_file_reads', 'os_file_writes', 'os_fsyncs' } + = $fulltext =~ m/^$d OS file reads, $d OS file writes, $d OS fsyncs$/m; + @{$section}{ 'reads_s', 'avg_bytes_s', 'writes_s', 'fsyncs_s' } + = $fulltext =~ m{^$f reads/s, $d avg bytes/read, $f writes/s, $f fsyncs/s$}m; + @{$section}{ 'pending_preads', 'pending_pwrites' } + = $fulltext =~ m/$d pending preads, $d pending pwrites$/m; + @{$section}{ 'pending_preads', 'pending_pwrites' } = (0, 0) + unless defined($section->{'pending_preads'}); + + delete $section->{'fulltext'} unless $debug; + return 1; +} + +sub _debug { + my ( $debug, $msg ) = @_; + if ( $debug ) { + die $msg; + } + else { + warn $msg; + } + return 1; +} + +1; + +# end_of_package InnoDBParser + +package main; + +use sigtrap qw(handler finish untrapped normal-signals); + +use Data::Dumper; +use DBI; +use English qw(-no_match_vars); +use File::Basename qw(dirname); +use File::Temp; +use Getopt::Long; +use List::Util qw(max min maxstr sum); +use POSIX qw(ceil); +use Time::HiRes qw(time sleep); +use Term::ReadKey qw(ReadMode ReadKey); + +# License and warranty information. {{{1 +# ########################################################################### + +my $innotop_license = <<"LICENSE"; + +This is innotop version $VERSION, a MySQL and InnoDB monitor. + +This program is copyright (c) 2006 Baron Schwartz. +Feedback and improvements are welcome. + +THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +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; OR the Perl Artistic License. On UNIX and similar +systems, you can issue `man perlgpl' or `man perlartistic' to read these +licenses. + +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. +LICENSE + +# Configuration information and global setup {{{1 +# ########################################################################### + +# Really, really, super-global variables. +my @config_versions = ( + "000-000-000", "001-003-000", # config file was one big name-value hash. + "001-003-000", "001-004-002", # config file contained non-user-defined stuff. +); + +my $clear_screen_sub; +my $dsn_parser = new DSNParser(); + +# This defines expected properties and defaults for the column definitions that +# eventually end up in tbl_meta. +my %col_props = ( + hdr => '', + just => '-', + dec => 0, # Whether to align the column on the decimal point + num => 0, + label => '', + user => 0, + src => '', + tbl => '', # Helps when writing/reading custom columns in config files + minw => 0, + maxw => 0, + trans => [], + agg => 'first', # Aggregate function + aggonly => 0, # Whether to show only when tbl_meta->{aggregate} is true +); + +# Actual DBI connections to MySQL servers. +my %dbhs; + +# Command-line parameters {{{2 +# ########################################################################### + +my @opt_spec = ( + { s => 'help', d => 'Show this help message' }, + { s => 'color|C!', d => 'Use terminal coloring (default)', c => 'color' }, + { s => 'config|c=s', d => 'Config file to read' }, + { s => 'nonint|n', d => 'Non-interactive, output tab-separated fields' }, + { s => 'count=i', d => 'Number of updates before exiting' }, + { s => 'delay|d=f', d => 'Delay between updates in seconds', c => 'interval' }, + { s => 'mode|m=s', d => 'Operating mode to start in', c => 'mode' }, + { s => 'inc|i!', d => 'Measure incremental differences', c => 'status_inc' }, + { s => 'write|w', d => 'Write running configuration into home directory if no config files were loaded' }, + { s => 'skipcentral|s', d => 'Skip reading the central configuration file' }, + { s => 'version', d => 'Output version information and exit' }, + { s => 'user|u=s', d => 'User for login if not current user' }, + { s => 'password|p=s', d => 'Password to use for connection' }, + { s => 'host|h=s', d => 'Connect to host' }, + { s => 'port|P=i', d => 'Port number to use for connection' }, +); + +# This is the container for the command-line options' values to be stored in +# after processing. Initial values are defaults. +my %opts = ( + n => !( -t STDIN && -t STDOUT ), # If in/out aren't to terminals, we're interactive +); +# Post-process... +my %opt_seen; +foreach my $spec ( @opt_spec ) { + my ( $long, $short ) = $spec->{s} =~ m/^(\w+)(?:\|([^!+=]*))?/; + $spec->{k} = $short || $long; + $spec->{l} = $long; + $spec->{t} = $short; + $spec->{n} = $spec->{s} =~ m/!/; + $opts{$spec->{k}} = undef unless defined $opts{$spec->{k}}; + die "Duplicate option $spec->{k}" if $opt_seen{$spec->{k}}++; +} + +Getopt::Long::Configure('no_ignore_case', 'bundling'); +GetOptions( map { $_->{s} => \$opts{$_->{k}} } @opt_spec) or $opts{help} = 1; + +if ( $opts{version} ) { + print "innotop Ver $VERSION\n"; + exit(0); +} + +if ( $opts{c} and ! -f $opts{c} ) { + print $opts{c} . " doesn't exist. Exiting.\n"; + exit(1); +} +if ( $opts{'help'} ) { + print "Usage: innotop \n\n"; + my $maxw = max(map { length($_->{l}) + ($_->{n} ? 4 : 0)} @opt_spec); + foreach my $spec ( sort { $a->{l} cmp $b->{l} } @opt_spec ) { + my $long = $spec->{n} ? "[no]$spec->{l}" : $spec->{l}; + my $short = $spec->{t} ? "-$spec->{t}" : ''; + printf(" --%-${maxw}s %-4s %s\n", $long, $short, $spec->{d}); + } + print < q{my $host = host || hostname || ''; ($host) = $host =~ m/^((?:[\d.]+(?=:))|(?:[a-zA-Z]\w+))/; return $host || ''}, + Port => q{my ($p) = host =~ m/:(.*)$/; return $p || 0}, + OldVersions => q{dulint_to_int(IB_tx_trx_id_counter) - dulint_to_int(IB_tx_purge_done_for)}, + MaxTxnTime => q/max(map{ $_->{active_secs} } @{ IB_tx_transactions }) || 0/, + NumTxns => q{scalar @{ IB_tx_transactions } }, + DirtyBufs => q{ $cur->{IB_bp_pages_modified} / ($cur->{IB_bp_buf_pool_size} || 1) }, + BufPoolFill => q{ $cur->{IB_bp_pages_total} / ($cur->{IB_bp_buf_pool_size} || 1) }, + ServerLoad => q{ $cur->{Threads_connected}/(Questions||1)/Uptime_hires }, + TxnTimeRemain => q{ defined undo_log_entries && defined $pre->{undo_log_entries} && undo_log_entries < $pre->{undo_log_entries} ? undo_log_entries / (($pre->{undo_log_entries} - undo_log_entries)/((active_secs-$pre->{active_secs})||1))||1 : 0}, + SlaveCatchupRate => ' defined $cur->{seconds_behind_master} && defined $pre->{seconds_behind_master} && $cur->{seconds_behind_master} < $pre->{seconds_behind_master} ? ($pre->{seconds_behind_master}-$cur->{seconds_behind_master})/($cur->{Uptime_hires}-$pre->{Uptime_hires}) : 0', + QcacheHitRatio => q{(Qcache_hits||0)/(((Com_select||0)+(Qcache_hits||0))||1)}, +); + +# ########################################################################### +# Column definitions {{{3 +# Defines every column in every table. A named column has the following +# properties: +# * hdr Column header/title +# * label Documentation for humans. +# * num Whether it's numeric (for sorting). +# * just Alignment; generated from num, user-overridable in tbl_meta +# * minw, maxw Auto-generated, user-overridable. +# Values from this hash are just copied to tbl_meta, which is where everything +# else in the program should read from. +# ########################################################################### + +my %columns = ( + active_secs => { hdr => 'SecsActive', num => 1, label => 'Seconds transaction has been active', }, + add_pool_alloc => { hdr => 'Add\'l Pool', num => 1, label => 'Additonal pool allocated' }, + attempted_op => { hdr => 'Action', num => 0, label => 'The action that caused the error' }, + awe_mem_alloc => { hdr => 'AWE Memory', num => 1, label => '[Windows] AWE memory allocated' }, + binlog_cache_overflow => { hdr => 'Binlog Cache', num => 1, label => 'Transactions too big for binlog cache that went to disk' }, + binlog_do_db => { hdr => 'Binlog Do DB', num => 0, label => 'binlog-do-db setting' }, + binlog_ignore_db => { hdr => 'Binlog Ignore DB', num => 0, label => 'binlog-ignore-db setting' }, + bps_in => { hdr => 'BpsIn', num => 1, label => 'Bytes per second received by the server', }, + bps_out => { hdr => 'BpsOut', num => 1, label => 'Bytes per second sent by the server', }, + buf_free => { hdr => 'Free Bufs', num => 1, label => 'Buffers free in the buffer pool' }, + buf_pool_hit_rate => { hdr => 'Hit Rate', num => 0, label => 'Buffer pool hit rate' }, + buf_pool_hits => { hdr => 'Hits', num => 1, label => 'Buffer pool hits' }, + buf_pool_reads => { hdr => 'Reads', num => 1, label => 'Buffer pool reads' }, + buf_pool_size => { hdr => 'Size', num => 1, label => 'Buffer pool size' }, + bufs_in_node_heap => { hdr => 'Node Heap Bufs', num => 1, label => 'Buffers in buffer pool node heap' }, + bytes_behind_master => { hdr => 'ByteLag', num => 1, label => 'Bytes the slave lags the master in binlog' }, + cell_event_set => { hdr => 'Ending?', num => 1, label => 'Whether the cell event is set' }, + cell_waiting => { hdr => 'Waiting?', num => 1, label => 'Whether the cell is waiting' }, + child_db => { hdr => 'Child DB', num => 0, label => 'The database of the child table' }, + child_index => { hdr => 'Child Index', num => 0, label => 'The index in the child table' }, + child_table => { hdr => 'Child Table', num => 0, label => 'The child table' }, + cmd => { hdr => 'Cmd', num => 0, label => 'Type of command being executed', }, + cnt => { hdr => 'Cnt', num => 0, label => 'Count', agg => 'count', aggonly => 1 }, + connect_retry => { hdr => 'Connect Retry', num => 1, label => 'Slave connect-retry timeout' }, + cxn => { hdr => 'CXN', num => 0, label => 'Connection from which the data came', }, + db => { hdr => 'DB', num => 0, label => 'Current database', }, + dict_mem_alloc => { hdr => 'Dict Mem', num => 1, label => 'Dictionary memory allocated' }, + dirty_bufs => { hdr => 'Dirty Buf', num => 1, label => 'Dirty buffer pool pages' }, + dl_txn_num => { hdr => 'Num', num => 0, label => 'Deadlocked transaction number', }, + event_set => { hdr => 'Evt Set?', num => 1, label => '[Win32] if a wait event is set', }, + exec_master_log_pos => { hdr => 'Exec Master Log Pos', num => 1, label => 'Exec Master Log Position' }, + fk_name => { hdr => 'Constraint', num => 0, label => 'The name of the FK constraint' }, + free_list_len => { hdr => 'Free List Len', num => 1, label => 'Length of the free list' }, + has_read_view => { hdr => 'Rd View', num => 1, label => 'Whether the transaction has a read view' }, + hash_searches_s => { hdr => 'Hash/Sec', num => 1, label => 'Number of hash searches/sec' }, + hash_table_size => { hdr => 'Size', num => 1, label => 'Number of non-hash searches/sec' }, + heap_no => { hdr => 'Heap', num => 1, label => 'Heap number' }, + heap_size => { hdr => 'Heap', num => 1, label => 'Heap size' }, + history_list_len => { hdr => 'History', num => 1, label => 'History list length' }, + host_and_domain => { hdr => 'Host', num => 0, label => 'Hostname/IP and domain' }, + host_and_port => { hdr => 'Host/IP', num => 0, label => 'Hostname or IP address, and port number', }, + hostname => { hdr => 'Host', num => 0, label => 'Hostname' }, + index => { hdr => 'Index', num => 0, label => 'The index involved' }, + index_ref => { hdr => 'Index Ref', num => 0, label => 'Index referenced' }, + info => { hdr => 'Query', num => 0, label => 'Info or the current query', }, + insert_intention => { hdr => 'Ins Intent', num => 1, label => 'Whether the thread was trying to insert' }, + inserts => { hdr => 'Inserts', num => 1, label => 'Inserts' }, + io_bytes_s => { hdr => 'Bytes/Sec', num => 1, label => 'Average I/O bytes/sec' }, + io_flush_type => { hdr => 'Flush Type', num => 0, label => 'I/O Flush Type' }, + io_fsyncs_s => { hdr => 'fsyncs/sec', num => 1, label => 'I/O fsyncs/sec' }, + io_reads_s => { hdr => 'Reads/Sec', num => 1, label => 'Average I/O reads/sec' }, + io_writes_s => { hdr => 'Writes/Sec', num => 1, label => 'Average I/O writes/sec' }, + ip => { hdr => 'IP', num => 0, label => 'IP address' }, + is_name_locked => { hdr => 'Locked', num => 1, label => 'Whether table is name locked', }, + key_buffer_hit => { hdr => 'KCacheHit', num => 1, label => 'Key cache hit ratio', }, + key_len => { hdr => 'Key Length', num => 1, label => 'Number of bytes used in the key' }, + last_chkp => { hdr => 'Last Checkpoint', num => 0, label => 'Last log checkpoint' }, + last_errno => { hdr => 'Last Errno', num => 1, label => 'Last error number' }, + last_error => { hdr => 'Last Error', num => 0, label => 'Last error' }, + last_s_file_name => { hdr => 'S-File', num => 0, label => 'Filename where last read locked' }, + last_s_line => { hdr => 'S-Line', num => 1, label => 'Line where last read locked' }, + last_x_file_name => { hdr => 'X-File', num => 0, label => 'Filename where last write locked' }, + last_x_line => { hdr => 'X-Line', num => 1, label => 'Line where last write locked' }, + last_pct => { hdr => 'Pct', num => 1, label => 'Last Percentage' }, + last_total => { hdr => 'Last Total', num => 1, label => 'Last Total' }, + last_value => { hdr => 'Last Incr', num => 1, label => 'Last Value' }, + load => { hdr => 'Load', num => 1, label => 'Server load' }, + lock_cfile_name => { hdr => 'Crtd File', num => 0, label => 'Filename where lock created' }, + lock_cline => { hdr => 'Crtd Line', num => 1, label => 'Line where lock created' }, + lock_mem_addr => { hdr => 'Addr', num => 0, label => 'The lock memory address' }, + lock_mode => { hdr => 'Mode', num => 0, label => 'The lock mode' }, + lock_structs => { hdr => 'LStrcts', num => 1, label => 'Number of lock structs' }, + lock_type => { hdr => 'Type', num => 0, label => 'The lock type' }, + lock_var => { hdr => 'Lck Var', num => 1, label => 'The lock variable' }, + lock_wait_time => { hdr => 'Wait', num => 1, label => 'How long txn has waited for a lock' }, + log_flushed_to => { hdr => 'Flushed To', num => 0, label => 'Log position flushed to' }, + log_ios_done => { hdr => 'IO Done', num => 1, label => 'Log I/Os done' }, + log_ios_s => { hdr => 'IO/Sec', num => 1, label => 'Average log I/Os per sec' }, + log_seq_no => { hdr => 'Sequence No.', num => 0, label => 'Log sequence number' }, + main_thread_id => { hdr => 'Main Thread ID', num => 1, label => 'Main thread ID' }, + main_thread_proc_no => { hdr => 'Main Thread Proc', num => 1, label => 'Main thread process number' }, + main_thread_state => { hdr => 'Main Thread State', num => 0, label => 'Main thread state' }, + master_file => { hdr => 'File', num => 0, label => 'Master file' }, + master_host => { hdr => 'Master', num => 0, label => 'Master server hostname' }, + master_log_file => { hdr => 'Master Log File', num => 0, label => 'Master log file' }, + master_port => { hdr => 'Master Port', num => 1, label => 'Master port' }, + master_pos => { hdr => 'Position', num => 1, label => 'Master position' }, + master_ssl_allowed => { hdr => 'Master SSL Allowed', num => 0, label => 'Master SSL Allowed' }, + master_ssl_ca_file => { hdr => 'Master SSL CA File', num => 0, label => 'Master SSL Cert Auth File' }, + master_ssl_ca_path => { hdr => 'Master SSL CA Path', num => 0, label => 'Master SSL Cert Auth Path' }, + master_ssl_cert => { hdr => 'Master SSL Cert', num => 0, label => 'Master SSL Cert' }, + master_ssl_cipher => { hdr => 'Master SSL Cipher', num => 0, label => 'Master SSL Cipher' }, + master_ssl_key => { hdr => 'Master SSL Key', num => 0, label => 'Master SSL Key' }, + master_user => { hdr => 'Master User', num => 0, label => 'Master username' }, + max_txn => { hdr => 'MaxTxnTime', num => 1, label => 'MaxTxn' }, + merged_recs => { hdr => 'Merged Recs', num => 1, label => 'Merged records' }, + merges => { hdr => 'Merges', num => 1, label => 'Merges' }, + mutex_os_waits => { hdr => 'Waits', num => 1, label => 'Mutex OS Waits' }, + mutex_spin_rounds => { hdr => 'Rounds', num => 1, label => 'Mutex Spin Rounds' }, + mutex_spin_waits => { hdr => 'Spins', num => 1, label => 'Mutex Spin Waits' }, + mysql_thread_id => { hdr => 'ID', num => 1, label => 'MySQL connection (thread) ID', }, + name => { hdr => 'Name', num => 0, label => 'Variable Name' }, + n_bits => { hdr => '# Bits', num => 1, label => 'Number of bits' }, + non_hash_searches_s => { hdr => 'Non-Hash/Sec', num => 1, label => 'Non-hash searches/sec' }, + num_deletes => { hdr => 'Del', num => 1, label => 'Number of deletes' }, + num_deletes_sec => { hdr => 'Del/Sec', num => 1, label => 'Number of deletes' }, + num_inserts => { hdr => 'Ins', num => 1, label => 'Number of inserts' }, + num_inserts_sec => { hdr => 'Ins/Sec', num => 1, label => 'Number of inserts' }, + num_readers => { hdr => 'Readers', num => 1, label => 'Number of readers' }, + num_reads => { hdr => 'Read', num => 1, label => 'Number of reads' }, + num_reads_sec => { hdr => 'Read/Sec', num => 1, label => 'Number of reads' }, + num_res_ext => { hdr => 'BTree Extents', num => 1, label => 'Number of extents reserved for B-Tree' }, + num_rows => { hdr => 'Row Count', num => 1, label => 'Number of rows estimated to examine' }, + num_times_open => { hdr => 'In Use', num => 1, label => '# times table is opened', }, + num_txns => { hdr => 'Txns', num => 1, label => 'Number of transactions' }, + num_updates => { hdr => 'Upd', num => 1, label => 'Number of updates' }, + num_updates_sec => { hdr => 'Upd/Sec', num => 1, label => 'Number of updates' }, + os_file_reads => { hdr => 'OS Reads', num => 1, label => 'OS file reads' }, + os_file_writes => { hdr => 'OS Writes', num => 1, label => 'OS file writes' }, + os_fsyncs => { hdr => 'OS fsyncs', num => 1, label => 'OS fsyncs' }, + os_thread_id => { hdr => 'OS Thread', num => 1, label => 'The operating system thread ID' }, + p_aio_writes => { hdr => 'Async Wrt', num => 1, label => 'Pending asynchronous I/O writes' }, + p_buf_pool_flushes => { hdr => 'Buffer Pool Flushes', num => 1, label => 'Pending buffer pool flushes' }, + p_ibuf_aio_reads => { hdr => 'IBuf Async Rds', num => 1, label => 'Pending insert buffer asynch I/O reads' }, + p_log_flushes => { hdr => 'Log Flushes', num => 1, label => 'Pending log flushes' }, + p_log_ios => { hdr => 'Log I/Os', num => 1, label => 'Pending log I/O operations' }, + p_normal_aio_reads => { hdr => 'Async Rds', num => 1, label => 'Pending asynchronous I/O reads' }, + p_preads => { hdr => 'preads', num => 1, label => 'Pending p-reads' }, + p_pwrites => { hdr => 'pwrites', num => 1, label => 'Pending p-writes' }, + p_sync_ios => { hdr => 'Sync I/Os', num => 1, label => 'Pending synchronous I/O operations' }, + page_creates_sec => { hdr => 'Creates/Sec', num => 1, label => 'Page creates/sec' }, + page_no => { hdr => 'Page', num => 1, label => 'Page number' }, + page_reads_sec => { hdr => 'Reads/Sec', num => 1, label => 'Page reads per second' }, + page_writes_sec => { hdr => 'Writes/Sec', num => 1, label => 'Page writes per second' }, + pages_created => { hdr => 'Created', num => 1, label => 'Pages created' }, + pages_modified => { hdr => 'Dirty Pages', num => 1, label => 'Pages modified (dirty)' }, + pages_read => { hdr => 'Reads', num => 1, label => 'Pages read' }, + pages_total => { hdr => 'Pages', num => 1, label => 'Pages total' }, + pages_written => { hdr => 'Writes', num => 1, label => 'Pages written' }, + parent_col => { hdr => 'Parent Column', num => 0, label => 'The referred column in the parent table', }, + parent_db => { hdr => 'Parent DB', num => 0, label => 'The database of the parent table' }, + parent_index => { hdr => 'Parent Index', num => 0, label => 'The referred index in the parent table' }, + parent_table => { hdr => 'Parent Table', num => 0, label => 'The parent table' }, + part_id => { hdr => 'Part ID', num => 1, label => 'Sub-part ID of the query' }, + partitions => { hdr => 'Partitions', num => 0, label => 'Query partitions used' }, + pct => { hdr => 'Pct', num => 1, label => 'Percentage' }, + pending_chkp_writes => { hdr => 'Chkpt Writes', num => 1, label => 'Pending log checkpoint writes' }, + pending_log_writes => { hdr => 'Log Writes', num => 1, label => 'Pending log writes' }, + port => { hdr => 'Port', num => 1, label => 'Client port number', }, + possible_keys => { hdr => 'Poss. Keys', num => 0, label => 'Possible keys' }, + proc_no => { hdr => 'Proc', num => 1, label => 'Process number' }, + q_cache_hit => { hdr => 'QCacheHit', num => 1, label => 'Query cache hit ratio', }, + qps => { hdr => 'QPS', num => 1, label => 'How many queries/sec', }, + queries_in_queue => { hdr => 'Queries Queued', num => 1, label => 'Queries in queue' }, + queries_inside => { hdr => 'Queries Inside', num => 1, label => 'Queries inside InnoDB' }, + query_id => { hdr => 'Query ID', num => 1, label => 'Query ID' }, + query_status => { hdr => 'Query Status', num => 0, label => 'The query status' }, + query_text => { hdr => 'Query Text', num => 0, label => 'The query text' }, + questions => { hdr => 'Questions', num => 1, label => 'How many queries the server has gotten', }, + read_master_log_pos => { hdr => 'Read Master Pos', num => 1, label => 'Read master log position' }, + read_views_open => { hdr => 'Rd Views', num => 1, label => 'Number of read views open' }, + reads_pending => { hdr => 'Pending Reads', num => 1, label => 'Reads pending' }, + relay_log_file => { hdr => 'Relay File', num => 0, label => 'Relay log file' }, + relay_log_pos => { hdr => 'Relay Pos', num => 1, label => 'Relay log position' }, + relay_log_size => { hdr => 'Relay Size', num => 1, label => 'Relay log size' }, + relay_master_log_file => { hdr => 'Relay Master File', num => 0, label => 'Relay master log file' }, + replicate_do_db => { hdr => 'Do DB', num => 0, label => 'Replicate-do-db setting' }, + replicate_do_table => { hdr => 'Do Table', num => 0, label => 'Replicate-do-table setting' }, + replicate_ignore_db => { hdr => 'Ignore DB', num => 0, label => 'Replicate-ignore-db setting' }, + replicate_ignore_table => { hdr => 'Ignore Table', num => 0, label => 'Replicate-do-table setting' }, + replicate_wild_do_table => { hdr => 'Wild Do Table', num => 0, label => 'Replicate-wild-do-table setting' }, + replicate_wild_ignore_table => { hdr => 'Wild Ignore Table', num => 0, label => 'Replicate-wild-ignore-table setting' }, + request_type => { hdr => 'Type', num => 0, label => 'Type of lock the thread waits for' }, + reservation_count => { hdr => 'ResCnt', num => 1, label => 'Reservation Count' }, + row_locks => { hdr => 'RLocks', num => 1, label => 'Number of row locks' }, + rw_excl_os_waits => { hdr => 'RW Waits', num => 1, label => 'R/W Excl. OS Waits' }, + rw_excl_spins => { hdr => 'RW Spins', num => 1, label => 'R/W Excl. Spins' }, + rw_shared_os_waits => { hdr => 'Sh Waits', num => 1, label => 'R/W Shared OS Waits' }, + rw_shared_spins => { hdr => 'Sh Spins', num => 1, label => 'R/W Shared Spins' }, + scan_type => { hdr => 'Type', num => 0, label => 'Scan type in chosen' }, + seg_size => { hdr => 'Seg. Size', num => 1, label => 'Segment size' }, + select_type => { hdr => 'Select Type', num => 0, label => 'Type of select used' }, + signal_count => { hdr => 'Signals', num => 1, label => 'Signal Count' }, + size => { hdr => 'Size', num => 1, label => 'Size of the tablespace' }, + skip_counter => { hdr => 'Skip Counter', num => 1, label => 'Skip counter' }, + slave_catchup_rate => { hdr => 'Catchup', num => 1, label => 'How fast the slave is catching up in the binlog' }, + slave_io_running => { hdr => 'Slave-IO', num => 0, label => 'Whether the slave I/O thread is running' }, + slave_io_state => { hdr => 'Slave IO State', num => 0, label => 'Slave I/O thread state' }, + slave_open_temp_tables => { hdr => 'Temp', num => 1, label => 'Slave open temp tables' }, + slave_sql_running => { hdr => 'Slave-SQL', num => 0, label => 'Whether the slave SQL thread is running' }, + slow => { hdr => 'Slow', num => 1, label => 'How many slow queries', }, + space_id => { hdr => 'Space', num => 1, label => 'Tablespace ID' }, + special => { hdr => 'Special', num => 0, label => 'Special/Other info' }, + state => { hdr => 'State', num => 0, label => 'Connection state', maxw => 18, }, + tables_in_use => { hdr => 'Tbl Used', num => 1, label => 'Number of tables in use' }, + tables_locked => { hdr => 'Tbl Lck', num => 1, label => 'Number of tables locked' }, + tbl => { hdr => 'Table', num => 0, label => 'Table', }, + thread => { hdr => 'Thread', num => 1, label => 'Thread number' }, + thread_decl_inside => { hdr => 'Thread Inside', num => 0, label => 'What the thread is declared inside' }, + thread_purpose => { hdr => 'Purpose', num => 0, label => "The thread's purpose" }, + thread_status => { hdr => 'Thread Status', num => 0, label => 'The thread status' }, + time => { hdr => 'Time', num => 1, label => 'Time since the last event', }, + time_behind_master => { hdr => 'TimeLag', num => 1, label => 'Time slave lags master' }, + timestring => { hdr => 'Timestring', num => 0, label => 'Time the event occurred' }, + total => { hdr => 'Total', num => 1, label => 'Total' }, + total_mem_alloc => { hdr => 'Memory', num => 1, label => 'Total memory allocated' }, + truncates => { hdr => 'Trunc', num => 0, label => 'Whether the deadlock is truncating InnoDB status' }, + txn_doesnt_see_ge => { hdr => "Txn Won't See", num => 0, label => 'Where txn read view is limited' }, + txn_id => { hdr => 'ID', num => 0, label => 'Transaction ID' }, + txn_sees_lt => { hdr => 'Txn Sees', num => 1, label => 'Where txn read view is limited' }, + txn_status => { hdr => 'Txn Status', num => 0, label => 'Transaction status' }, + txn_time_remain => { hdr => 'Remaining', num => 1, label => 'Time until txn rollback/commit completes' }, + undo_log_entries => { hdr => 'Undo', num => 1, label => 'Number of undo log entries' }, + undo_for => { hdr => 'Undo', num => 0, label => 'Undo for' }, + until_condition => { hdr => 'Until Condition', num => 0, label => 'Slave until condition' }, + until_log_file => { hdr => 'Until Log File', num => 0, label => 'Slave until log file' }, + until_log_pos => { hdr => 'Until Log Pos', num => 1, label => 'Slave until log position' }, + used_cells => { hdr => 'Cells Used', num => 1, label => 'Number of cells used' }, + used_bufs => { hdr => 'Used Bufs', num => 1, label => 'Number of buffer pool pages used' }, + user => { hdr => 'User', num => 0, label => 'Database username', }, + value => { hdr => 'Value', num => 1, label => 'Value' }, + versions => { hdr => 'Versions', num => 1, label => 'Number of InnoDB MVCC versions unpurged' }, + victim => { hdr => 'Victim', num => 0, label => 'Whether this txn was the deadlock victim' }, + wait_array_size => { hdr => 'Wait Array Size', num => 1, label => 'Wait Array Size' }, + wait_status => { hdr => 'Lock Status', num => 0, label => 'Status of txn locks' }, + waited_at_filename => { hdr => 'File', num => 0, label => 'Filename at which thread waits' }, + waited_at_line => { hdr => 'Line', num => 1, label => 'Line at which thread waits' }, + waiters_flag => { hdr => 'Waiters', num => 1, label => 'Waiters Flag' }, + waiting => { hdr => 'Waiting', num => 1, label => 'Whether lock is being waited for' }, + when => { hdr => 'When', num => 0, label => 'Time scale' }, + writer_lock_mode => { hdr => 'Wrtr Lck Mode', num => 0, label => 'Writer lock mode' }, + writer_thread => { hdr => 'Wrtr Thread', num => 1, label => 'Writer thread ID' }, + writes_pending => { hdr => 'Writes', num => 1, label => 'Number of writes pending' }, + writes_pending_flush_list => { hdr => 'Flush List Writes', num => 1, label => 'Number of flush list writes pending' }, + writes_pending_lru => { hdr => 'LRU Writes', num => 1, label => 'Number of LRU writes pending' }, + writes_pending_single_page => { hdr => '1-Page Writes', num => 1, label => 'Number of 1-page writes pending' }, +); + +# Apply a default property or three. By default, columns are not width-constrained, +# aligned left, and sorted alphabetically, not numerically. +foreach my $col ( values %columns ) { + map { $col->{$_} ||= 0 } qw(num minw maxw); + $col->{just} = $col->{num} ? '' : '-'; +} + +# Filters {{{3 +# This hash defines every filter that can be applied to a table. These +# become part of tbl_meta as well. Each filter is just an expression that +# returns true or false. +# Properties of each entry: +# * func: the subroutine +# * name: the name, repeated +# * user: whether it's a user-defined filter (saved in config) +# * text: text of the subroutine +# * note: explanation +my %filters = (); + +# These are pre-processed to live in %filters above, by compiling them. +my %builtin_filters = ( + hide_self => { + text => <<' END', + return ( !$set->{info} || $set->{info} ne 'SHOW FULL PROCESSLIST' ) + && ( !$set->{query_text} || $set->{query_text} !~ m/INNODB STATUS$/ ); + END + note => 'Removes the innotop processes from the list', + tbls => [qw(innodb_transactions processlist)], + }, + hide_inactive => { + text => <<' END', + return ( !defined($set->{txn_status}) || $set->{txn_status} ne 'not started' ) + && ( !defined($set->{cmd}) || $set->{cmd} !~ m/Sleep|Binlog Dump/ ) + && ( !defined($set->{info}) || $set->{info} =~ m/\S/ ); + END + note => 'Removes processes which are not doing anything', + tbls => [qw(innodb_transactions processlist)], + }, + hide_slave_io => { + text => <<' END', + return !$set->{state} || $set->{state} !~ m/^(?:Waiting for master|Has read all relay)/; + END + note => 'Removes slave I/O threads from the list', + tbls => [qw(processlist slave_io_status)], + }, + table_is_open => { + text => <<' END', + return $set->{num_times_open} + $set->{is_name_locked}; + END + note => 'Removes tables that are not in use or locked', + tbls => [qw(open_tables)], + }, + cxn_is_master => { + text => <<' END', + return $set->{master_file} ? 1 : 0; + END + note => 'Removes servers that are not masters', + tbls => [qw(master_status)], + }, + cxn_is_slave => { + text => <<' END', + return $set->{master_host} ? 1 : 0; + END + note => 'Removes servers that are not slaves', + tbls => [qw(slave_io_status slave_sql_status)], + }, + thd_is_not_waiting => { + text => <<' END', + return $set->{thread_status} !~ m#waiting for i/o request#; + END + note => 'Removes idle I/O threads', + tbls => [qw(io_threads)], + }, +); +foreach my $key ( keys %builtin_filters ) { + my ( $sub, $err ) = compile_filter($builtin_filters{$key}->{text}); + $filters{$key} = { + func => $sub, + text => $builtin_filters{$key}->{text}, + user => 0, + name => $key, # useful for later + note => $builtin_filters{$key}->{note}, + tbls => $builtin_filters{$key}->{tbls}, + } +} + +# Variable sets {{{3 +# Sets (arrayrefs) of variables that are used in S mode. They are read/written to +# the config file. +my %var_sets = ( + general => { + text => join( + ', ', + 'set_precision(Questions/Uptime_hires) as QPS', + 'set_precision(Com_commit/Uptime_hires) as Commit_PS', + 'set_precision((Com_rollback||0)/(Com_commit||1)) as Rollback_Commit', + 'set_precision((' + . join('+', map { "($_||0)" } + qw(Com_delete Com_delete_multi Com_insert Com_insert_select Com_replace + Com_replace_select Com_select Com_update Com_update_multi)) + . ')/(Com_commit||1)) as Write_Commit', + 'set_precision((Com_select+(Qcache_hits||0))/((' + . join('+', map { "($_||0)" } + qw(Com_delete Com_delete_multi Com_insert Com_insert_select Com_replace + Com_replace_select Com_select Com_update Com_update_multi)) + . ')||1)) as R_W_Ratio', + 'set_precision(Opened_tables/Uptime_hires) as Opens_PS', + 'percent($cur->{Open_tables}/($cur->{table_cache})) as Table_Cache_Used', + 'set_precision(Threads_created/Uptime_hires) as Threads_PS', + 'percent($cur->{Threads_cached}/($cur->{thread_cache_size}||1)) as Thread_Cache_Used', + 'percent($cur->{Max_used_connections}/($cur->{max_connections}||1)) as CXN_Used_Ever', + 'percent($cur->{Threads_connected}/($cur->{max_connections}||1)) as CXN_Used_Now', + ), + }, + commands => { + text => join( + ', ', + qw(Uptime Questions Com_delete Com_delete_multi Com_insert + Com_insert_select Com_replace Com_replace_select Com_select Com_update + Com_update_multi) + ), + }, + query_status => { + text => join( + ',', + qw( Uptime Select_full_join Select_full_range_join Select_range + Select_range_check Select_scan Slow_queries Sort_merge_passes + Sort_range Sort_rows Sort_scan) + ), + }, + innodb => { + text => join( + ',', + qw( Uptime Innodb_row_lock_current_waits Innodb_row_lock_time + Innodb_row_lock_time_avg Innodb_row_lock_time_max Innodb_row_lock_waits + Innodb_rows_deleted Innodb_rows_inserted Innodb_rows_read + Innodb_rows_updated) + ), + }, + txn => { + text => join( + ',', + qw( Uptime Com_begin Com_commit Com_rollback Com_savepoint + Com_xa_commit Com_xa_end Com_xa_prepare Com_xa_recover Com_xa_rollback + Com_xa_start) + ), + }, + key_cache => { + text => join( + ',', + qw( Uptime Key_blocks_not_flushed Key_blocks_unused Key_blocks_used + Key_read_requests Key_reads Key_write_requests Key_writes ) + ), + }, + query_cache => { + text => join( + ',', + "percent($exprs{QcacheHitRatio}) as Hit_Pct", + 'set_precision((Qcache_hits||0)/(Qcache_inserts||1)) as Hit_Ins', + 'set_precision((Qcache_lowmem_prunes||0)/Uptime_hires) as Lowmem_Prunes_sec', + 'percent(1-((Qcache_free_blocks||0)/(Qcache_total_blocks||1))) as Blocks_used', + qw( Qcache_free_blocks Qcache_free_memory Qcache_not_cached Qcache_queries_in_cache) + ), + }, + handler => { + text => join( + ',', + qw( Uptime Handler_read_key Handler_read_first Handler_read_next + Handler_read_prev Handler_read_rnd Handler_read_rnd_next Handler_delete + Handler_update Handler_write) + ), + }, + cxns_files_threads => { + text => join( + ',', + qw( Uptime Aborted_clients Aborted_connects Bytes_received Bytes_sent + Compression Connections Created_tmp_disk_tables Created_tmp_files + Created_tmp_tables Max_used_connections Open_files Open_streams + Open_tables Opened_tables Table_locks_immediate Table_locks_waited + Threads_cached Threads_connected Threads_created Threads_running) + ), + }, + prep_stmt => { + text => join( + ',', + qw( Uptime Com_dealloc_sql Com_execute_sql Com_prepare_sql Com_reset + Com_stmt_close Com_stmt_execute Com_stmt_fetch Com_stmt_prepare + Com_stmt_reset Com_stmt_send_long_data ) + ), + }, + innodb_health => { + text => join( + ',', + "$exprs{OldVersions} as OldVersions", + qw(IB_sm_mutex_spin_waits IB_sm_mutex_spin_rounds IB_sm_mutex_os_waits), + "$exprs{NumTxns} as NumTxns", + "$exprs{MaxTxnTime} as MaxTxnTime", + qw(IB_ro_queries_inside IB_ro_queries_in_queue), + "set_precision($exprs{DirtyBufs} * 100) as dirty_bufs", + "set_precision($exprs{BufPoolFill} * 100) as buf_fill", + qw(IB_bp_pages_total IB_bp_pages_read IB_bp_pages_written IB_bp_pages_created) + ), + }, + innodb_health2 => { + text => join( + ', ', + 'percent(1-((Innodb_buffer_pool_pages_free||0)/($cur->{Innodb_buffer_pool_pages_total}||1))) as BP_page_cache_usage', + 'percent(1-((Innodb_buffer_pool_reads||0)/(Innodb_buffer_pool_read_requests||1))) as BP_cache_hit_ratio', + 'Innodb_buffer_pool_wait_free', + 'Innodb_log_waits', + ), + }, + slow_queries => { + text => join( + ', ', + 'set_precision(Slow_queries/Uptime_hires) as Slow_PS', + 'set_precision(Select_full_join/Uptime_hires) as Full_Join_PS', + 'percent(Select_full_join/(Com_select||1)) as Full_Join_Ratio', + ), + }, +); + +# Server sets {{{3 +# Defines sets of servers between which the user can quickly switch. +my %server_groups; + +# Connections {{{3 +# This hash defines server connections. Each connection is a string that can be passed to +# the DBI connection. These are saved in the connections section in the config file. +my %connections; +# Defines the parts of connections. +my @conn_parts = qw(user have_user pass have_pass dsn savepass dl_table); + +# Graph widths {{{3 +# This hash defines the max values seen for various status/variable values, for graphing. +# These are stored in their own section in the config file. These are just initial values: +my %mvs = ( + Com_select => 50, + Com_insert => 50, + Com_update => 50, + Com_delete => 50, + Questions => 100, +); + +# ########################################################################### +# Valid Term::ANSIColor color strings. +# ########################################################################### +my %ansicolors = map { $_ => 1 } + qw( black blink blue bold clear concealed cyan dark green magenta on_black + on_blue on_cyan on_green on_magenta on_red on_white on_yellow red reset + reverse underline underscore white yellow); + +# ########################################################################### +# Valid comparison operators for color rules +# ########################################################################### +my %comp_ops = ( + '==' => 'Numeric equality', + '>' => 'Numeric greater-than', + '<' => 'Numeric less-than', + '>=' => 'Numeric greater-than/equal', + '<=' => 'Numeric less-than/equal', + '!=' => 'Numeric not-equal', + 'eq' => 'String equality', + 'gt' => 'String greater-than', + 'lt' => 'String less-than', + 'ge' => 'String greater-than/equal', + 'le' => 'String less-than/equal', + 'ne' => 'String not-equal', + '=~' => 'Pattern match', + '!~' => 'Negated pattern match', +); + +# ########################################################################### +# Valid aggregate functions. +# ########################################################################### +my %agg_funcs = ( + first => sub { + return $_[0] + }, + count => sub { + return 0 + @_; + }, + avg => sub { + my @args = grep { defined $_ } @_; + return (sum(map { m/([\d\.-]+)/g } @args) || 0) / (scalar(@args) || 1); + }, + sum => sub { + my @args = grep { defined $_ } @_; + return sum(@args); + } +); + +# ########################################################################### +# Valid functions for transformations. +# ########################################################################### +my %trans_funcs = ( + shorten => \&shorten, + secs_to_time => \&secs_to_time, + no_ctrl_char => \&no_ctrl_char, + percent => \&percent, + commify => \&commify, + dulint_to_int => \&dulint_to_int, + set_precision => \&set_precision, +); + +# Table definitions {{{3 +# This hash defines every table that can get displayed in every mode. Each +# table specifies columns and column data sources. The column is +# defined by the %columns hash. +# +# Example: foo => { src => 'bar' } means the foo column (look at +# $columns{foo} for its definition) gets its data from the 'bar' element of +# the current data set, whatever that is. +# +# These columns are post-processed after being defined, because they get stuff +# from %columns. After all the config is loaded for columns, there's more +# post-processing too; the subroutines compiled from src get added to +# the hash elements for extract_values to use. +# ########################################################################### + +my %tbl_meta = ( + adaptive_hash_index => { + capt => 'Adaptive Hash Index', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + hash_table_size => { src => 'IB_ib_hash_table_size', trans => [qw(shorten)], }, + used_cells => { src => 'IB_ib_used_cells' }, + bufs_in_node_heap => { src => 'IB_ib_bufs_in_node_heap' }, + hash_searches_s => { src => 'IB_ib_hash_searches_s' }, + non_hash_searches_s => { src => 'IB_ib_non_hash_searches_s' }, + }, + visible => [ qw(cxn hash_table_size used_cells bufs_in_node_heap hash_searches_s non_hash_searches_s) ], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'ib', + group_by => [], + aggregate => 0, + }, + buffer_pool => { + capt => 'Buffer Pool', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + total_mem_alloc => { src => 'IB_bp_total_mem_alloc', trans => [qw(shorten)], }, + awe_mem_alloc => { src => 'IB_bp_awe_mem_alloc', trans => [qw(shorten)], }, + add_pool_alloc => { src => 'IB_bp_add_pool_alloc', trans => [qw(shorten)], }, + buf_pool_size => { src => 'IB_bp_buf_pool_size', trans => [qw(shorten)], }, + buf_free => { src => 'IB_bp_buf_free' }, + buf_pool_hit_rate => { src => 'IB_bp_buf_pool_hit_rate' }, + buf_pool_reads => { src => 'IB_bp_buf_pool_reads' }, + buf_pool_hits => { src => 'IB_bp_buf_pool_hits' }, + dict_mem_alloc => { src => 'IB_bp_dict_mem_alloc' }, + pages_total => { src => 'IB_bp_pages_total' }, + pages_modified => { src => 'IB_bp_pages_modified' }, + reads_pending => { src => 'IB_bp_reads_pending' }, + writes_pending => { src => 'IB_bp_writes_pending' }, + writes_pending_lru => { src => 'IB_bp_writes_pending_lru' }, + writes_pending_flush_list => { src => 'IB_bp_writes_pending_flush_list' }, + writes_pending_single_page => { src => 'IB_bp_writes_pending_single_page' }, + page_creates_sec => { src => 'IB_bp_page_creates_sec' }, + page_reads_sec => { src => 'IB_bp_page_reads_sec' }, + page_writes_sec => { src => 'IB_bp_page_writes_sec' }, + pages_created => { src => 'IB_bp_pages_created' }, + pages_read => { src => 'IB_bp_pages_read' }, + pages_written => { src => 'IB_bp_pages_written' }, + }, + visible => [ qw(cxn buf_pool_size buf_free pages_total pages_modified buf_pool_hit_rate total_mem_alloc add_pool_alloc)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'bp', + group_by => [], + aggregate => 0, + }, + # TODO: a new step in set_to_tbl: join result to itself, grouped? + # TODO: this would also enable pulling Q and T data together. + # TODO: using a SQL-ish language would also allow pivots to be easier -- treat the pivoted data as a view and SELECT from it. + cmd_summary => { + capt => 'Command Summary', + cust => {}, + cols => { + name => { src => 'name' }, + total => { src => 'total' }, + value => { src => 'value', agg => 'sum'}, + pct => { src => 'value/total', trans => [qw(percent)] }, + last_total => { src => 'last_total' }, + last_value => { src => 'last_value', agg => 'sum'}, + last_pct => { src => 'last_value/last_total', trans => [qw(percent)] }, + }, + visible => [qw(name value pct last_value last_pct)], + filters => [qw()], + sort_cols => '-value', + sort_dir => '1', + innodb => '', + group_by => [qw(name)], + aggregate => 1, + }, + deadlock_locks => { + capt => 'Deadlock Locks', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + mysql_thread_id => { src => 'mysql_thread_id' }, + dl_txn_num => { src => 'dl_txn_num' }, + lock_type => { src => 'lock_type' }, + space_id => { src => 'space_id' }, + page_no => { src => 'page_no' }, + heap_no => { src => 'heap_no' }, + n_bits => { src => 'n_bits' }, + index => { src => 'index' }, + db => { src => 'db' }, + tbl => { src => 'table' }, + lock_mode => { src => 'lock_mode' }, + special => { src => 'special' }, + insert_intention => { src => 'insert_intention' }, + waiting => { src => 'waiting' }, + }, + visible => [ qw(cxn mysql_thread_id waiting lock_mode db tbl index special insert_intention)], + filters => [], + sort_cols => 'cxn mysql_thread_id', + sort_dir => '1', + innodb => 'dl', + group_by => [], + aggregate => 0, + }, + deadlock_transactions => { + capt => 'Deadlock Transactions', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + active_secs => { src => 'active_secs' }, + dl_txn_num => { src => 'dl_txn_num' }, + has_read_view => { src => 'has_read_view' }, + heap_size => { src => 'heap_size' }, + host_and_domain => { src => 'hostname' }, + hostname => { src => $exprs{Host} }, + ip => { src => 'ip' }, + lock_structs => { src => 'lock_structs' }, + lock_wait_time => { src => 'lock_wait_time', trans => [ qw(secs_to_time) ] }, + mysql_thread_id => { src => 'mysql_thread_id' }, + os_thread_id => { src => 'os_thread_id' }, + proc_no => { src => 'proc_no' }, + query_id => { src => 'query_id' }, + query_status => { src => 'query_status' }, + query_text => { src => 'query_text', trans => [ qw(no_ctrl_char) ] }, + row_locks => { src => 'row_locks' }, + tables_in_use => { src => 'tables_in_use' }, + tables_locked => { src => 'tables_locked' }, + thread_decl_inside => { src => 'thread_decl_inside' }, + thread_status => { src => 'thread_status' }, + 'time' => { src => 'active_secs', trans => [ qw(secs_to_time) ] }, + timestring => { src => 'timestring' }, + txn_doesnt_see_ge => { src => 'txn_doesnt_see_ge' }, + txn_id => { src => 'txn_id' }, + txn_sees_lt => { src => 'txn_sees_lt' }, + txn_status => { src => 'txn_status' }, + truncates => { src => 'truncates' }, + undo_log_entries => { src => 'undo_log_entries' }, + user => { src => 'user' }, + victim => { src => 'victim' }, + wait_status => { src => 'lock_wait_status' }, + }, + visible => [ qw(cxn mysql_thread_id timestring user hostname victim time undo_log_entries lock_structs query_text)], + filters => [], + sort_cols => 'cxn mysql_thread_id', + sort_dir => '1', + innodb => 'dl', + group_by => [], + aggregate => 0, + }, + explain => { + capt => 'EXPLAIN Results', + cust => {}, + cols => { + part_id => { src => 'id' }, + select_type => { src => 'select_type' }, + tbl => { src => 'table' }, + partitions => { src => 'partitions' }, + scan_type => { src => 'type' }, + possible_keys => { src => 'possible_keys' }, + index => { src => 'key' }, + key_len => { src => 'key_len' }, + index_ref => { src => 'ref' }, + num_rows => { src => 'rows' }, + special => { src => 'extra' }, + }, + visible => [ qw(select_type tbl partitions scan_type possible_keys index key_len index_ref num_rows special)], + filters => [], + sort_cols => '', + sort_dir => '1', + innodb => '', + group_by => [], + aggregate => 0, + }, + file_io_misc => { + capt => 'File I/O Misc', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + io_bytes_s => { src => 'IB_io_avg_bytes_s' }, + io_flush_type => { src => 'IB_io_flush_type' }, + io_fsyncs_s => { src => 'IB_io_fsyncs_s' }, + io_reads_s => { src => 'IB_io_reads_s' }, + io_writes_s => { src => 'IB_io_writes_s' }, + os_file_reads => { src => 'IB_io_os_file_reads' }, + os_file_writes => { src => 'IB_io_os_file_writes' }, + os_fsyncs => { src => 'IB_io_os_fsyncs' }, + }, + visible => [ qw(cxn os_file_reads os_file_writes os_fsyncs io_reads_s io_writes_s io_bytes_s)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'io', + group_by => [], + aggregate => 0, + }, + fk_error => { + capt => 'Foreign Key Error Info', + cust => {}, + cols => { + timestring => { src => 'IB_fk_timestring' }, + child_db => { src => 'IB_fk_child_db' }, + child_table => { src => 'IB_fk_child_table' }, + child_index => { src => 'IB_fk_child_index' }, + fk_name => { src => 'IB_fk_fk_name' }, + parent_db => { src => 'IB_fk_parent_db' }, + parent_table => { src => 'IB_fk_parent_table' }, + parent_col => { src => 'IB_fk_parent_col' }, + parent_index => { src => 'IB_fk_parent_index' }, + attempted_op => { src => 'IB_fk_attempted_op' }, + }, + visible => [ qw(timestring child_db child_table child_index parent_db parent_table parent_col parent_index fk_name attempted_op)], + filters => [], + sort_cols => '', + sort_dir => '1', + innodb => 'fk', + group_by => [], + aggregate => 0, + }, + insert_buffers => { + capt => 'Insert Buffers', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + inserts => { src => 'IB_ib_inserts' }, + merged_recs => { src => 'IB_ib_merged_recs' }, + merges => { src => 'IB_ib_merges' }, + size => { src => 'IB_ib_size' }, + free_list_len => { src => 'IB_ib_free_list_len' }, + seg_size => { src => 'IB_ib_seg_size' }, + }, + visible => [ qw(cxn inserts merged_recs merges size free_list_len seg_size)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'ib', + group_by => [], + aggregate => 0, + }, + innodb_locks => { + capt => 'InnoDB Locks', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + db => { src => 'db' }, + index => { src => 'index' }, + insert_intention => { src => 'insert_intention' }, + lock_mode => { src => 'lock_mode' }, + lock_type => { src => 'lock_type' }, + lock_wait_time => { src => 'lock_wait_time', trans => [ qw(secs_to_time) ] }, + mysql_thread_id => { src => 'mysql_thread_id' }, + n_bits => { src => 'n_bits' }, + page_no => { src => 'page_no' }, + space_id => { src => 'space_id' }, + special => { src => 'special' }, + tbl => { src => 'table' }, + 'time' => { src => 'active_secs', hdr => 'Active', trans => [ qw(secs_to_time) ] }, + txn_id => { src => 'txn_id' }, + waiting => { src => 'waiting' }, + }, + visible => [ qw(cxn mysql_thread_id lock_type waiting lock_wait_time time lock_mode db tbl index insert_intention special)], + filters => [], + sort_cols => 'cxn -lock_wait_time', + sort_dir => '1', + innodb => 'tx', + colors => [ + { col => 'lock_wait_time', op => '>', arg => 60, color => 'red' }, + { col => 'lock_wait_time', op => '>', arg => 30, color => 'yellow' }, + { col => 'lock_wait_time', op => '>', arg => 10, color => 'green' }, + ], + group_by => [], + aggregate => 0, + }, + innodb_transactions => { + capt => 'InnoDB Transactions', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + active_secs => { src => 'active_secs' }, + has_read_view => { src => 'has_read_view' }, + heap_size => { src => 'heap_size' }, + hostname => { src => $exprs{Host} }, + ip => { src => 'ip' }, + wait_status => { src => 'lock_wait_status' }, + lock_wait_time => { src => 'lock_wait_time', trans => [ qw(secs_to_time) ] }, + lock_structs => { src => 'lock_structs' }, + mysql_thread_id => { src => 'mysql_thread_id' }, + os_thread_id => { src => 'os_thread_id' }, + proc_no => { src => 'proc_no' }, + query_id => { src => 'query_id' }, + query_status => { src => 'query_status' }, + query_text => { src => 'query_text', trans => [ qw(no_ctrl_char) ] }, + txn_time_remain => { src => $exprs{TxnTimeRemain}, trans => [ qw(secs_to_time) ] }, + row_locks => { src => 'row_locks' }, + tables_in_use => { src => 'tables_in_use' }, + tables_locked => { src => 'tables_locked' }, + thread_decl_inside => { src => 'thread_decl_inside' }, + thread_status => { src => 'thread_status' }, + 'time' => { src => 'active_secs', trans => [ qw(secs_to_time) ], agg => 'sum' }, + txn_doesnt_see_ge => { src => 'txn_doesnt_see_ge' }, + txn_id => { src => 'txn_id' }, + txn_sees_lt => { src => 'txn_sees_lt' }, + txn_status => { src => 'txn_status', minw => 10, maxw => 10 }, + undo_log_entries => { src => 'undo_log_entries' }, + user => { src => 'user', maxw => 10 }, + cnt => { src => 'mysql_thread_id', minw => 0 }, + }, + visible => [ qw(cxn cnt mysql_thread_id user hostname txn_status time undo_log_entries query_text)], + filters => [ qw( hide_self hide_inactive ) ], + sort_cols => '-active_secs txn_status cxn mysql_thread_id', + sort_dir => '1', + innodb => 'tx', + hide_caption => 1, + colors => [ + { col => 'wait_status', op => 'eq', arg => 'LOCK WAIT', color => 'black on_red' }, + { col => 'time', op => '>', arg => 600, color => 'red' }, + { col => 'time', op => '>', arg => 300, color => 'yellow' }, + { col => 'time', op => '>', arg => 60, color => 'green' }, + { col => 'time', op => '>', arg => 30, color => 'cyan' }, + { col => 'txn_status', op => 'eq', arg => 'not started', color => 'white' }, + ], + group_by => [ qw(cxn txn_status) ], + aggregate => 0, + }, + io_threads => { + capt => 'I/O Threads', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + thread => { src => 'thread' }, + thread_purpose => { src => 'purpose' }, + event_set => { src => 'event_set' }, + thread_status => { src => 'state' }, + }, + visible => [ qw(cxn thread thread_purpose thread_status)], + filters => [ qw() ], + sort_cols => 'cxn thread', + sort_dir => '1', + innodb => 'io', + group_by => [], + aggregate => 0, + }, + log_statistics => { + capt => 'Log Statistics', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + last_chkp => { src => 'IB_lg_last_chkp' }, + log_flushed_to => { src => 'IB_lg_log_flushed_to' }, + log_ios_done => { src => 'IB_lg_log_ios_done' }, + log_ios_s => { src => 'IB_lg_log_ios_s' }, + log_seq_no => { src => 'IB_lg_log_seq_no' }, + pending_chkp_writes => { src => 'IB_lg_pending_chkp_writes' }, + pending_log_writes => { src => 'IB_lg_pending_log_writes' }, + }, + visible => [ qw(cxn log_seq_no log_flushed_to last_chkp log_ios_done log_ios_s)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'lg', + group_by => [], + aggregate => 0, + }, + master_status => { + capt => 'Master Status', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + binlog_do_db => { src => 'binlog_do_db' }, + binlog_ignore_db => { src => 'binlog_ignore_db' }, + master_file => { src => 'file' }, + master_pos => { src => 'position' }, + binlog_cache_overflow => { src => '(Binlog_cache_disk_use||0)/(Binlog_cache_use||1)', trans => [ qw(percent) ] }, + }, + visible => [ qw(cxn master_file master_pos binlog_cache_overflow)], + filters => [ qw(cxn_is_master) ], + sort_cols => 'cxn', + sort_dir => '1', + innodb => '', + group_by => [], + aggregate => 0, + }, + pending_io => { + capt => 'Pending I/O', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + p_normal_aio_reads => { src => 'IB_io_pending_normal_aio_reads' }, + p_aio_writes => { src => 'IB_io_pending_aio_writes' }, + p_ibuf_aio_reads => { src => 'IB_io_pending_ibuf_aio_reads' }, + p_sync_ios => { src => 'IB_io_pending_sync_ios' }, + p_buf_pool_flushes => { src => 'IB_io_pending_buffer_pool_flushes' }, + p_log_flushes => { src => 'IB_io_pending_log_flushes' }, + p_log_ios => { src => 'IB_io_pending_log_ios' }, + p_preads => { src => 'IB_io_pending_preads' }, + p_pwrites => { src => 'IB_io_pending_pwrites' }, + }, + visible => [ qw(cxn p_normal_aio_reads p_aio_writes p_ibuf_aio_reads p_sync_ios p_log_flushes p_log_ios)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'io', + group_by => [], + aggregate => 0, + }, + open_tables => { + capt => 'Open Tables', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + db => { src => 'database' }, + tbl => { src => 'table' }, + num_times_open => { src => 'in_use' }, + is_name_locked => { src => 'name_locked' }, + }, + visible => [ qw(cxn db tbl num_times_open is_name_locked)], + filters => [ qw(table_is_open) ], + sort_cols => '-num_times_open cxn db tbl', + sort_dir => '1', + innodb => '', + group_by => [], + aggregate => 0, + }, + page_statistics => { + capt => 'Page Statistics', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + pages_read => { src => 'IB_bp_pages_read' }, + pages_written => { src => 'IB_bp_pages_written' }, + pages_created => { src => 'IB_bp_pages_created' }, + page_reads_sec => { src => 'IB_bp_page_reads_sec' }, + page_writes_sec => { src => 'IB_bp_page_writes_sec' }, + page_creates_sec => { src => 'IB_bp_page_creates_sec' }, + }, + visible => [ qw(cxn pages_read pages_written pages_created page_reads_sec page_writes_sec page_creates_sec)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'bp', + group_by => [], + aggregate => 0, + }, + processlist => { + capt => 'MySQL Process List', + cust => {}, + cols => { + cxn => { src => 'cxn', minw => 6, maxw => 10 }, + mysql_thread_id => { src => 'id', minw => 6, maxw => 0 }, + user => { src => 'user', minw => 5, maxw => 8 }, + hostname => { src => $exprs{Host}, minw => 13, maxw => 8, }, + port => { src => $exprs{Port}, minw => 0, maxw => 0, }, + host_and_port => { src => 'host', minw => 0, maxw => 0 }, + db => { src => 'db', minw => 6, maxw => 12 }, + cmd => { src => 'command', minw => 5, maxw => 0 }, + time => { src => 'time', minw => 5, maxw => 0, trans => [ qw(secs_to_time) ], agg => 'sum' }, + state => { src => 'state', minw => 0, maxw => 0 }, + info => { src => 'info', minw => 0, maxw => 0, trans => [ qw(no_ctrl_char) ] }, + cnt => { src => 'id', minw => 0, maxw => 0 }, + }, + visible => [ qw(cxn cmd cnt mysql_thread_id state user hostname db time info)], + filters => [ qw(hide_self hide_inactive hide_slave_io) ], + sort_cols => '-time cxn hostname mysql_thread_id', + sort_dir => '1', + innodb => '', + hide_caption => 1, + colors => [ + { col => 'state', op => 'eq', arg => 'Locked', color => 'black on_red' }, + { col => 'cmd', op => 'eq', arg => 'Sleep', color => 'white' }, + { col => 'user', op => 'eq', arg => 'system user', color => 'white' }, + { col => 'cmd', op => 'eq', arg => 'Connect', color => 'white' }, + { col => 'cmd', op => 'eq', arg => 'Binlog Dump', color => 'white' }, + { col => 'time', op => '>', arg => 600, color => 'red' }, + { col => 'time', op => '>', arg => 120, color => 'yellow' }, + { col => 'time', op => '>', arg => 60, color => 'green' }, + { col => 'time', op => '>', arg => 30, color => 'cyan' }, + ], + group_by => [qw(cxn cmd)], + aggregate => 0, + }, + + # TODO: some more columns: + # kb_used=hdr='BufUsed' minw='0' num='0' src='percent(1 - ((Key_blocks_unused * key_cache_block_size) / (key_buffer_size||1)))' dec='0' trans='' tbl='q_header' just='-' user='1' maxw='0' label='User-defined' + # retries=hdr='Retries' minw='0' num='0' src='Slave_retried_transactions' dec='0' trans='' tbl='slave_sql_status' just='-' user='1' maxw='0' label='User-defined' + # thd=hdr='Thd' minw='0' num='0' src='Threads_connected' dec='0' trans='' tbl='slave_sql_status' just='-' user='1' maxw='0' label='User-defined' + + q_header => { + capt => 'Q-mode Header', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + questions => { src => 'Questions' }, + qps => { src => 'Questions/Uptime_hires', dec => 1, trans => [qw(shorten)] }, + load => { src => $exprs{ServerLoad}, dec => 1, trans => [qw(shorten)] }, + slow => { src => 'Slow_queries', dec => 1, trans => [qw(shorten)] }, + q_cache_hit => { src => $exprs{QcacheHitRatio}, dec => 1, trans => [qw(percent)] }, + key_buffer_hit => { src => '1-(Key_reads/(Key_read_requests||1))', dec => 1, trans => [qw(percent)] }, + bps_in => { src => 'Bytes_received/Uptime_hires', dec => 1, trans => [qw(shorten)] }, + bps_out => { src => 'Bytes_sent/Uptime_hires', dec => 1, trans => [qw(shorten)] }, + when => { src => 'when' }, + }, + visible => [ qw(cxn when load qps slow q_cache_hit key_buffer_hit bps_in bps_out)], + filters => [], + sort_cols => 'when cxn', + sort_dir => '1', + innodb => '', + hide_caption => 1, + group_by => [], + aggregate => 0, + }, + row_operations => { + capt => 'InnoDB Row Operations', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + num_inserts => { src => 'IB_ro_num_rows_ins' }, + num_updates => { src => 'IB_ro_num_rows_upd' }, + num_reads => { src => 'IB_ro_num_rows_read' }, + num_deletes => { src => 'IB_ro_num_rows_del' }, + num_inserts_sec => { src => 'IB_ro_ins_sec' }, + num_updates_sec => { src => 'IB_ro_upd_sec' }, + num_reads_sec => { src => 'IB_ro_read_sec' }, + num_deletes_sec => { src => 'IB_ro_del_sec' }, + }, + visible => [ qw(cxn num_inserts num_updates num_reads num_deletes num_inserts_sec + num_updates_sec num_reads_sec num_deletes_sec)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'ro', + group_by => [], + aggregate => 0, + }, + row_operation_misc => { + capt => 'Row Operation Misc', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + queries_in_queue => { src => 'IB_ro_queries_in_queue' }, + queries_inside => { src => 'IB_ro_queries_inside' }, + read_views_open => { src => 'IB_ro_read_views_open' }, + main_thread_id => { src => 'IB_ro_main_thread_id' }, + main_thread_proc_no => { src => 'IB_ro_main_thread_proc_no' }, + main_thread_state => { src => 'IB_ro_main_thread_state' }, + num_res_ext => { src => 'IB_ro_n_reserved_extents' }, + }, + visible => [ qw(cxn queries_in_queue queries_inside read_views_open main_thread_state)], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'ro', + group_by => [], + aggregate => 0, + }, + semaphores => { + capt => 'InnoDB Semaphores', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + mutex_os_waits => { src => 'IB_sm_mutex_os_waits' }, + mutex_spin_rounds => { src => 'IB_sm_mutex_spin_rounds' }, + mutex_spin_waits => { src => 'IB_sm_mutex_spin_waits' }, + reservation_count => { src => 'IB_sm_reservation_count' }, + rw_excl_os_waits => { src => 'IB_sm_rw_excl_os_waits' }, + rw_excl_spins => { src => 'IB_sm_rw_excl_spins' }, + rw_shared_os_waits => { src => 'IB_sm_rw_shared_os_waits' }, + rw_shared_spins => { src => 'IB_sm_rw_shared_spins' }, + signal_count => { src => 'IB_sm_signal_count' }, + wait_array_size => { src => 'IB_sm_wait_array_size' }, + }, + visible => [ qw(cxn mutex_os_waits mutex_spin_waits mutex_spin_rounds + rw_excl_os_waits rw_excl_spins rw_shared_os_waits rw_shared_spins + signal_count reservation_count )], + filters => [], + sort_cols => 'cxn', + sort_dir => '1', + innodb => 'sm', + group_by => [], + aggregate => 0, + }, + slave_io_status => { + capt => 'Slave I/O Status', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + connect_retry => { src => 'connect_retry' }, + master_host => { src => 'master_host', hdr => 'Master'}, + master_log_file => { src => 'master_log_file', hdr => 'File' }, + master_port => { src => 'master_port' }, + master_ssl_allowed => { src => 'master_ssl_allowed' }, + master_ssl_ca_file => { src => 'master_ssl_ca_file' }, + master_ssl_ca_path => { src => 'master_ssl_ca_path' }, + master_ssl_cert => { src => 'master_ssl_cert' }, + master_ssl_cipher => { src => 'master_ssl_cipher' }, + master_ssl_key => { src => 'master_ssl_key' }, + master_user => { src => 'master_user' }, + read_master_log_pos => { src => 'read_master_log_pos', hdr => 'Pos' }, + relay_log_size => { src => 'relay_log_space', trans => [qw(shorten)] }, + slave_io_running => { src => 'slave_io_running', hdr => 'On?' }, + slave_io_state => { src => 'slave_io_state', hdr => 'State' }, + }, + visible => [ qw(cxn master_host slave_io_running master_log_file relay_log_size read_master_log_pos slave_io_state)], + filters => [ qw( cxn_is_slave ) ], + sort_cols => 'slave_io_running cxn', + colors => [ + { col => 'slave_io_running', op => 'ne', arg => 'Yes', color => 'black on_red' }, + ], + sort_dir => '1', + innodb => '', + group_by => [], + aggregate => 0, + }, + slave_sql_status => { + capt => 'Slave SQL Status', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + exec_master_log_pos => { src => 'exec_master_log_pos', hdr => 'Master Pos' }, + last_errno => { src => 'last_errno' }, + last_error => { src => 'last_error' }, + master_host => { src => 'master_host', hdr => 'Master' }, + relay_log_file => { src => 'relay_log_file' }, + relay_log_pos => { src => 'relay_log_pos' }, + relay_log_size => { src => 'relay_log_space', trans => [qw(shorten)] }, + relay_master_log_file => { src => 'relay_master_log_file', hdr => 'Master File' }, + replicate_do_db => { src => 'replicate_do_db' }, + replicate_do_table => { src => 'replicate_do_table' }, + replicate_ignore_db => { src => 'replicate_ignore_db' }, + replicate_ignore_table => { src => 'replicate_ignore_table' }, + replicate_wild_do_table => { src => 'replicate_wild_do_table' }, + replicate_wild_ignore_table => { src => 'replicate_wild_ignore_table' }, + skip_counter => { src => 'skip_counter' }, + slave_sql_running => { src => 'slave_sql_running', hdr => 'On?' }, + until_condition => { src => 'until_condition' }, + until_log_file => { src => 'until_log_file' }, + until_log_pos => { src => 'until_log_pos' }, + time_behind_master => { src => 'seconds_behind_master', trans => [ qw(secs_to_time) ] }, + bytes_behind_master => { src => 'master_log_file && master_log_file eq relay_master_log_file ? read_master_log_pos - exec_master_log_pos : 0', trans => [qw(shorten)] }, + slave_catchup_rate => { src => $exprs{SlaveCatchupRate}, trans => [ qw(set_precision) ] }, + slave_open_temp_tables => { src => 'Slave_open_temp_tables' }, + }, + visible => [ qw(cxn master_host slave_sql_running time_behind_master slave_catchup_rate slave_open_temp_tables relay_log_pos last_error)], + filters => [ qw( cxn_is_slave ) ], + sort_cols => 'slave_sql_running cxn', + sort_dir => '1', + innodb => '', + colors => [ + { col => 'slave_sql_running', op => 'ne', arg => 'Yes', color => 'black on_red' }, + { col => 'time_behind_master', op => '>', arg => 600, color => 'red' }, + { col => 'time_behind_master', op => '>', arg => 60, color => 'yellow' }, + { col => 'time_behind_master', op => '==', arg => 0, color => 'white' }, + ], + group_by => [], + aggregate => 0, + }, + t_header => { + capt => 'T-Mode Header', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + dirty_bufs => { src => $exprs{DirtyBufs}, trans => [qw(percent)] }, + history_list_len => { src => 'IB_tx_history_list_len' }, + lock_structs => { src => 'IB_tx_num_lock_structs' }, + num_txns => { src => $exprs{NumTxns} }, + max_txn => { src => $exprs{MaxTxnTime}, trans => [qw(secs_to_time)] }, + undo_for => { src => 'IB_tx_purge_undo_for' }, + used_bufs => { src => $exprs{BufPoolFill}, trans => [qw(percent)]}, + versions => { src => $exprs{OldVersions} }, + }, + visible => [ qw(cxn history_list_len versions undo_for dirty_bufs used_bufs num_txns max_txn lock_structs)], + filters => [ ], + sort_cols => 'cxn', + sort_dir => '1', + innodb => '', + colors => [], + hide_caption => 1, + group_by => [], + aggregate => 0, + }, + var_status => { + capt => 'Variables & Status', + cust => {}, + cols => {}, # Generated from current varset + visible => [], # Generated from current varset + filters => [], + sort_cols => '', + sort_dir => 1, + innodb => '', + temp => 1, # Do not persist to config file. + hide_caption => 1, + pivot => 0, + group_by => [], + aggregate => 0, + }, + wait_array => { + capt => 'InnoDB Wait Array', + cust => {}, + cols => { + cxn => { src => 'cxn' }, + thread => { src => 'thread' }, + waited_at_filename => { src => 'waited_at_filename' }, + waited_at_line => { src => 'waited_at_line' }, + 'time' => { src => 'waited_secs', trans => [ qw(secs_to_time) ] }, + request_type => { src => 'request_type' }, + lock_mem_addr => { src => 'lock_mem_addr' }, + lock_cfile_name => { src => 'lock_cfile_name' }, + lock_cline => { src => 'lock_cline' }, + writer_thread => { src => 'writer_thread' }, + writer_lock_mode => { src => 'writer_lock_mode' }, + num_readers => { src => 'num_readers' }, + lock_var => { src => 'lock_var' }, + waiters_flag => { src => 'waiters_flag' }, + last_s_file_name => { src => 'last_s_file_name' }, + last_s_line => { src => 'last_s_line' }, + last_x_file_name => { src => 'last_x_file_name' }, + last_x_line => { src => 'last_x_line' }, + cell_waiting => { src => 'cell_waiting' }, + cell_event_set => { src => 'cell_event_set' }, + }, + visible => [ qw(cxn thread time waited_at_filename waited_at_line request_type num_readers lock_var waiters_flag cell_waiting cell_event_set)], + filters => [], + sort_cols => 'cxn -time', + sort_dir => '1', + innodb => 'sm', + group_by => [], + aggregate => 0, + }, +); + +# Initialize %tbl_meta from %columns and do some checks. +foreach my $table_name ( keys %tbl_meta ) { + my $table = $tbl_meta{$table_name}; + my $cols = $table->{cols}; + + foreach my $col_name ( keys %$cols ) { + my $col_def = $table->{cols}->{$col_name}; + die "I can't find a column named '$col_name' for '$table_name'" unless $columns{$col_name}; + $columns{$col_name}->{referenced} = 1; + + foreach my $prop ( keys %col_props ) { + # Each column gets non-existing values set from %columns or defaults from %col_props. + if ( !$col_def->{$prop} ) { + $col_def->{$prop} + = defined($columns{$col_name}->{$prop}) + ? $columns{$col_name}->{$prop} + : $col_props{$prop}; + } + } + + # Ensure transformations and aggregate functions are valid + die "Unknown aggregate function '$col_def->{agg}' " + . "for column '$col_name' in table '$table_name'" + unless exists $agg_funcs{$col_def->{agg}}; + foreach my $trans ( @{$col_def->{trans}} ) { + die "Unknown transformation '$trans' " + . "for column '$col_name' in table '$table_name'" + unless exists $trans_funcs{$trans}; + } + } + + # Ensure each column in visible and group_by exists in cols + foreach my $place ( qw(visible group_by) ) { + foreach my $col_name ( @{$table->{$place}} ) { + if ( !exists $cols->{$col_name} ) { + die "Column '$col_name' is listed in '$place' for '$table_name', but doesn't exist"; + } + } + } + + # Compile sort and color subroutines + $table->{sort_func} = make_sort_func($table); + $table->{color_func} = make_color_func($table); +} + +# This is for code cleanup: +{ + my @unused_cols = grep { !$columns{$_}->{referenced} } sort keys %columns; + if ( @unused_cols ) { + die "The following columns are not used: " + . join(' ', @unused_cols); + } +} + +# ########################################################################### +# Operating modes {{{3 +# ########################################################################### +my %modes = ( + B => { + hdr => 'InnoDB Buffers', + cust => {}, + note => 'Shows buffer info from InnoDB', + action_for => { + i => { + action => sub { toggle_config('status_inc') }, + label => 'Toggle incremental status display', + }, + }, + display_sub => \&display_B, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(buffer_pool page_statistics insert_buffers adaptive_hash_index)], + visible_tables => [qw(buffer_pool page_statistics insert_buffers adaptive_hash_index)], + }, + C => { + hdr => 'Command Summary', + cust => {}, + note => 'Shows relative magnitude of variables', + action_for => { + s => { + action => sub { get_config_interactive('cmd_filter') }, + label => 'Choose variable prefix', + }, + }, + display_sub => \&display_C, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(cmd_summary)], + visible_tables => [qw(cmd_summary)], + }, + D => { + hdr => 'InnoDB Deadlocks', + cust => {}, + note => 'View InnoDB deadlock information', + action_for => { + c => { + action => sub { edit_table('deadlock_transactions') }, + label => 'Choose visible columns', + }, + w => { + action => \&create_deadlock, + label => 'Wipe deadlock status info by creating a deadlock', + }, + }, + display_sub => \&display_D, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(deadlock_transactions deadlock_locks)], + visible_tables => [qw(deadlock_transactions deadlock_locks)], + }, + F => { + hdr => 'InnoDB FK Err', + cust => {}, + note => 'View the latest InnoDB foreign key error', + action_for => {}, + display_sub => \&display_F, + connections => [], + server_group => '', + one_connection => 1, + tables => [qw(fk_error)], + visible_tables => [qw(fk_error)], + }, + I => { + hdr => 'InnoDB I/O Info', + cust => {}, + note => 'Shows I/O info (i/o, log...) from InnoDB', + action_for => { + i => { + action => sub { toggle_config('status_inc') }, + label => 'Toggle incremental status display', + }, + }, + display_sub => \&display_I, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(io_threads pending_io file_io_misc log_statistics)], + visible_tables => [qw(io_threads pending_io file_io_misc log_statistics)], + }, + L => { + hdr => 'Locks', + cust => {}, + note => 'Shows transaction locks', + action_for => { + a => { + action => sub { send_cmd_to_servers('CREATE TABLE IF NOT EXISTS test.innodb_lock_monitor(a int) ENGINE=InnoDB', 0, '', []); }, + label => 'Start the InnoDB Lock Monitor', + }, + o => { + action => sub { send_cmd_to_servers('DROP TABLE IF EXISTS test.innodb_lock_monitor', 0, '', []); }, + label => 'Stop the InnoDB Lock Monitor', + }, + }, + display_sub => \&display_L, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(innodb_locks)], + visible_tables => [qw(innodb_locks)], + }, + M => { + hdr => 'Replication Status', + cust => {}, + note => 'Shows replication (master and slave) status', + action_for => { + a => { + action => sub { send_cmd_to_servers('START SLAVE', 0, 'START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE = ?, MASTER_LOG_POS = ?', []); }, + label => 'Start slave(s)', + }, + i => { + action => sub { toggle_config('status_inc') }, + label => 'Toggle incremental status display', + }, + o => { + action => sub { send_cmd_to_servers('STOP SLAVE', 0, '', []); }, + label => 'Stop slave(s)', + }, + b => { + action => sub { purge_master_logs() }, + label => 'Purge unused master logs', + }, + }, + display_sub => \&display_M, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(slave_sql_status slave_io_status master_status)], + visible_tables => [qw(slave_sql_status slave_io_status master_status)], + }, + O => { + hdr => 'Open Tables', + cust => {}, + note => 'Shows open tables in MySQL', + action_for => { + r => { + action => sub { reverse_sort('open_tables'); }, + label => 'Reverse sort order', + }, + s => { + action => sub { choose_sort_cols('open_tables'); }, + label => "Choose sort column", + }, + }, + display_sub => \&display_O, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(open_tables)], + visible_tables => [qw(open_tables)], + }, + Q => { + hdr => 'Query List', + cust => {}, + note => 'Shows queries from SHOW FULL PROCESSLIST', + action_for => { + a => { + action => sub { toggle_filter('processlist', 'hide_self') }, + label => 'Toggle the innotop process', + }, + c => { + action => sub { edit_table('processlist') }, + label => 'Choose visible columns', + }, + e => { + action => sub { analyze_query('e'); }, + label => "Explain a thread's query", + }, + f => { + action => sub { analyze_query('f'); }, + label => "Show a thread's full query", + }, + h => { + action => sub { toggle_visible_table('Q', 'q_header') }, + label => 'Toggle the header on and off', + }, + i => { + action => sub { toggle_filter('processlist', 'hide_inactive') }, + label => 'Toggle idle processes', + }, + k => { + action => sub { kill_query('CONNECTION') }, + label => "Kill a query's connection", + }, + r => { + action => sub { reverse_sort('processlist'); }, + label => 'Reverse sort order', + }, + s => { + action => sub { choose_sort_cols('processlist'); }, + label => "Change the display's sort column", + }, + x => { + action => sub { kill_query('QUERY') }, + label => "Kill a query", + }, + }, + display_sub => \&display_Q, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(q_header processlist)], + visible_tables => [qw(q_header processlist)], + }, + R => { + hdr => 'InnoDB Row Ops', + cust => {}, + note => 'Shows InnoDB row operation and semaphore info', + action_for => { + i => { + action => sub { toggle_config('status_inc') }, + label => 'Toggle incremental status display', + }, + }, + display_sub => \&display_R, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(row_operations row_operation_misc semaphores wait_array)], + visible_tables => [qw(row_operations row_operation_misc semaphores wait_array)], + }, + S => { + hdr => 'Variables & Status', + cust => {}, + note => 'Shows query load statistics a la vmstat', + action_for => { + '>' => { + action => sub { switch_var_set('S_set', 1) }, + label => 'Switch to next variable set', + }, + '<' => { + action => sub { switch_var_set('S_set', -1) }, + label => 'Switch to prev variable set', + }, + c => { + action => sub { + choose_var_set('S_set'); + start_S_mode(); + }, + label => "Choose which set to display", + }, + e => { + action => \&edit_current_var_set, + label => 'Edit the current set of variables', + }, + i => { + action => sub { $clear_screen_sub->(); toggle_config('status_inc') }, + label => 'Toggle incremental status display', + }, + '-' => { + action => sub { set_display_precision(-1) }, + label => 'Decrease fractional display precision', + }, + '+' => { + action => sub { set_display_precision(1) }, + label => 'Increase fractional display precision', + }, + g => { + action => sub { set_s_mode('g') }, + label => 'Switch to graph (tload) view', + }, + s => { + action => sub { set_s_mode('s') }, + label => 'Switch to standard (vmstat) view', + }, + v => { + action => sub { set_s_mode('v') }, + label => 'Switch to pivoted view', + }, + }, + display_sub => \&display_S, + no_clear_screen => 1, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(var_status)], + visible_tables => [qw(var_status)], + }, + T => { + hdr => 'InnoDB Txns', + cust => {}, + note => 'Shows InnoDB transactions in top-like format', + action_for => { + a => { + action => sub { toggle_filter('innodb_transactions', 'hide_self') }, + label => 'Toggle the innotop process', + }, + c => { + action => sub { edit_table('innodb_transactions') }, + label => 'Choose visible columns', + }, + e => { + action => sub { analyze_query('e'); }, + label => "Explain a thread's query", + }, + f => { + action => sub { analyze_query('f'); }, + label => "Show a thread's full query", + }, + h => { + action => sub { toggle_visible_table('T', 't_header') }, + label => 'Toggle the header on and off', + }, + i => { + action => sub { toggle_filter('innodb_transactions', 'hide_inactive') }, + label => 'Toggle inactive transactions', + }, + k => { + action => sub { kill_query('CONNECTION') }, + label => "Kill a transaction's connection", + }, + r => { + action => sub { reverse_sort('innodb_transactions'); }, + label => 'Reverse sort order', + }, + s => { + action => sub { choose_sort_cols('innodb_transactions'); }, + label => "Change the display's sort column", + }, + x => { + action => sub { kill_query('QUERY') }, + label => "Kill a query", + }, + }, + display_sub => \&display_T, + connections => [], + server_group => '', + one_connection => 0, + tables => [qw(t_header innodb_transactions)], + visible_tables => [qw(t_header innodb_transactions)], + }, +); + +# ########################################################################### +# Global key mappings {{{3 +# Keyed on a single character, which is read from the keyboard. Uppercase +# letters switch modes. Lowercase letters access commands when in a mode. +# These can be overridden by action_for in %modes. +# ########################################################################### +my %action_for = ( + '$' => { + action => \&edit_configuration, + label => 'Edit configuration settings', + }, + '?' => { + action => \&display_help, + label => 'Show help', + }, + '!' => { + action => \&display_license, + label => 'Show license and warranty', + }, + '^' => { + action => \&edit_table, + label => "Edit the displayed table(s)", + }, + '#' => { + action => \&choose_server_groups, + label => 'Select/create server groups', + }, + '@' => { + action => \&choose_servers, + label => 'Select/create server connections', + }, + '/' => { + action => \&add_quick_filter, + label => 'Quickly filter what you see', + }, + '\\' => { + action => \&clear_quick_filters, + label => 'Clear quick-filters', + }, + '%' => { + action => \&choose_filters, + label => 'Choose and edit table filters', + }, + "\t" => { + action => \&next_server_group, + label => 'Switch to the next server group', + key => 'TAB', + }, + '=' => { + action => \&toggle_aggregate, + label => 'Toggle aggregation', + }, + # TODO: can these be auto-generated from %modes? + B => { + action => sub { switch_mode('B') }, + label => '', + }, + C => { + action => sub { switch_mode('C') }, + label => '', + }, + D => { + action => sub { switch_mode('D') }, + label => '', + }, + F => { + action => sub { switch_mode('F') }, + label => '', + }, + I => { + action => sub { switch_mode('I') }, + label => '', + }, + L => { + action => sub { switch_mode('L') }, + label => '', + }, + M => { + action => sub { switch_mode('M') }, + label => '', + }, + O => { + action => sub { switch_mode('O') }, + label => '', + }, + Q => { + action => sub { switch_mode('Q') }, + label => '', + }, + R => { + action => sub { switch_mode('R') }, + label => '', + }, + S => { + action => \&start_S_mode, + label => '', + }, + T => { + action => sub { switch_mode('T') }, + label => '', + }, + d => { + action => sub { get_config_interactive('interval') }, + label => 'Change refresh interval', + }, + n => { action => \&next_server, label => 'Switch to the next connection' }, + p => { action => \&pause, label => 'Pause innotop', }, + q => { action => \&finish, label => 'Quit innotop', }, +); + +# ########################################################################### +# Sleep times after certain statements {{{3 +# ########################################################################### +my %stmt_sleep_time_for = (); + +# ########################################################################### +# Config editor key mappings {{{3 +# ########################################################################### +my %cfg_editor_action = ( + c => { + note => 'Edit columns, etc in the displayed table(s)', + func => \&edit_table, + }, + g => { + note => 'Edit general configuration', + func => \&edit_configuration_variables, + }, + k => { + note => 'Edit row-coloring rules', + func => \&edit_color_rules, + }, + p => { + note => 'Manage plugins', + func => \&edit_plugins, + }, + s => { + note => 'Edit server groups', + func => \&edit_server_groups, + }, + S => { + note => 'Edit SQL statement sleep delays', + func => \&edit_stmt_sleep_times, + }, + t => { + note => 'Choose which table(s) to display in this mode', + func => \&choose_mode_tables, + }, +); + +# ########################################################################### +# Color editor key mappings {{{3 +# ########################################################################### +my %color_editor_action = ( + n => { + note => 'Create a new color rule', + func => sub { + my ( $tbl, $idx ) = @_; + my $meta = $tbl_meta{$tbl}; + + $clear_screen_sub->(); + my $col; + do { + $col = prompt_list( + 'Choose the target column for the rule', + '', + sub { return keys %{$meta->{cols}} }, + { map { $_ => $meta->{cols}->{$_}->{label} } keys %{$meta->{cols}} }); + } while ( !$col ); + ( $col ) = grep { $_ } split(/\W+/, $col); + return $idx unless $col && exists $meta->{cols}->{$col}; + + $clear_screen_sub->(); + my $op; + do { + $op = prompt_list( + 'Choose the comparison operator for the rule', + '', + sub { return keys %comp_ops }, + { map { $_ => $comp_ops{$_} } keys %comp_ops } ); + } until ( $op ); + $op =~ s/\s+//g; + return $idx unless $op && exists $comp_ops{$op}; + + my $arg; + do { + $arg = prompt('Specify an argument for the comparison'); + } until defined $arg; + + my $color; + do { + $color = prompt_list( + 'Choose the color(s) the row should be when the rule matches', + '', + sub { return keys %ansicolors }, + { map { $_ => $_ } keys %ansicolors } ); + } until defined $color; + $color = join(' ', unique(grep { exists $ansicolors{$_} } split(/\W+/, $color))); + return $idx unless $color; + + push @{$tbl_meta{$tbl}->{colors}}, { + col => $col, + op => $op, + arg => $arg, + color => $color + }; + $tbl_meta{$tbl}->{cust}->{colors} = 1; + + return $idx; + }, + }, + d => { + note => 'Remove the selected rule', + func => sub { + my ( $tbl, $idx ) = @_; + my @rules = @{ $tbl_meta{$tbl}->{colors} }; + return 0 unless @rules > 0 && $idx < @rules && $idx >= 0; + splice(@{$tbl_meta{$tbl}->{colors}}, $idx, 1); + $tbl_meta{$tbl}->{cust}->{colors} = 1; + return $idx == @rules ? $#rules : $idx; + }, + }, + j => { + note => 'Move highlight down one', + func => sub { + my ( $tbl, $idx ) = @_; + my $num_rules = scalar @{$tbl_meta{$tbl}->{colors}}; + return ($idx + 1) % $num_rules; + }, + }, + k => { + note => 'Move highlight up one', + func => sub { + my ( $tbl, $idx ) = @_; + my $num_rules = scalar @{$tbl_meta{$tbl}->{colors}}; + return ($idx - 1) % $num_rules; + }, + }, + '+' => { + note => 'Move selected rule up one', + func => sub { + my ( $tbl, $idx ) = @_; + my $meta = $tbl_meta{$tbl}; + my $dest = $idx == 0 ? scalar(@{$meta->{colors}} - 1) : $idx - 1; + my $temp = $meta->{colors}->[$idx]; + $meta->{colors}->[$idx] = $meta->{colors}->[$dest]; + $meta->{colors}->[$dest] = $temp; + $meta->{cust}->{colors} = 1; + return $dest; + }, + }, + '-' => { + note => 'Move selected rule down one', + func => sub { + my ( $tbl, $idx ) = @_; + my $meta = $tbl_meta{$tbl}; + my $dest = $idx == scalar(@{$meta->{colors}} - 1) ? 0 : $idx + 1; + my $temp = $meta->{colors}->[$idx]; + $meta->{colors}->[$idx] = $meta->{colors}->[$dest]; + $meta->{colors}->[$dest] = $temp; + $meta->{cust}->{colors} = 1; + return $dest; + }, + }, +); + +# ########################################################################### +# Plugin editor key mappings {{{3 +# ########################################################################### +my %plugin_editor_action = ( + '*' => { + note => 'Toggle selected plugin active/inactive', + func => sub { + my ( $plugins, $idx ) = @_; + my $plugin = $plugins->[$idx]; + $plugin->{active} = $plugin->{active} ? 0 : 1; + return $idx; + }, + }, + j => { + note => 'Move highlight down one', + func => sub { + my ( $plugins, $idx ) = @_; + return ($idx + 1) % scalar(@$plugins); + }, + }, + k => { + note => 'Move highlight up one', + func => sub { + my ( $plugins, $idx ) = @_; + return $idx == 0 ? @$plugins - 1 : $idx - 1; + }, + }, +); + +# ########################################################################### +# Table editor key mappings {{{3 +# ########################################################################### +my %tbl_editor_action = ( + a => { + note => 'Add a column to the table', + func => sub { + my ( $tbl, $col ) = @_; + my @visible_cols = @{ $tbl_meta{$tbl}->{visible} }; + my %all_cols = %{ $tbl_meta{$tbl}->{cols} }; + delete @all_cols{@visible_cols}; + my $choice = prompt_list( + 'Choose a column', + '', + sub { return keys %all_cols; }, + { map { $_ => $all_cols{$_}->{label} || $all_cols{$_}->{hdr} } keys %all_cols }); + if ( $all_cols{$choice} ) { + push @{$tbl_meta{$tbl}->{visible}}, $choice; + $tbl_meta{$tbl}->{cust}->{visible} = 1; + return $choice; + } + return $col; + }, + }, + n => { + note => 'Create a new column and add it to the table', + func => sub { + my ( $tbl, $col ) = @_; + + $clear_screen_sub->(); + print word_wrap("Choose a name for the column. This name is not displayed, and is used only " + . "for internal reference. It can contain only lowercase letters, numbers, " + . "and underscores."); + print "\n\n"; + do { + $col = prompt("Enter column name"); + $col = '' if $col =~ m/[^a-z0-9_]/; + } while ( !$col ); + + $clear_screen_sub->(); + my $hdr; + do { + $hdr = prompt("Enter column header"); + } while ( !$hdr ); + + $clear_screen_sub->(); + print "Choose a source for the column's data\n\n"; + my ( $src, $sub, $err ); + do { + if ( $err ) { + print "Error: $err\n\n"; + } + $src = prompt("Enter column source"); + if ( $src ) { + ( $sub, $err ) = compile_expr($src); + } + } until ( !$err); + + # TODO: this duplicates %col_props. + $tbl_meta{$tbl}->{cols}->{$col} = { + hdr => $hdr, + src => $src, + just => '-', + num => 0, + label => 'User-defined', + user => 1, + tbl => $tbl, + minw => 0, + maxw => 0, + trans => [], + func => $sub, + dec => 0, + agg => 0, + aggonly => 0, + }; + + $tbl_meta{$tbl}->{visible} = [ unique(@{$tbl_meta{$tbl}->{visible}}, $col) ]; + $tbl_meta{$tbl}->{cust}->{visible} = 1; + return $col; + }, + }, + d => { + note => 'Remove selected column', + func => sub { + my ( $tbl, $col ) = @_; + my @visible_cols = @{ $tbl_meta{$tbl}->{visible} }; + my $idx = 0; + return $col unless @visible_cols > 1; + while ( $visible_cols[$idx] ne $col ) { + $idx++; + } + $tbl_meta{$tbl}->{visible} = [ grep { $_ ne $col } @visible_cols ]; + $tbl_meta{$tbl}->{cust}->{visible} = 1; + return $idx == $#visible_cols ? $visible_cols[$idx - 1] : $visible_cols[$idx + 1]; + }, + }, + e => { + note => 'Edit selected column', + func => sub { + # TODO: make this editor hotkey-driven and give readline support. + my ( $tbl, $col ) = @_; + $clear_screen_sub->(); + my $meta = $tbl_meta{$tbl}->{cols}->{$col}; + my @prop = qw(hdr label src just num minw maxw trans agg); # TODO redundant + + my $answer; + do { + # Do what the user asked... + if ( $answer && grep { $_ eq $answer } @prop ) { + # Some properties are arrays, others scalars. + my $ini = ref $col_props{$answer} ? join(' ', @{$meta->{$answer}}) : $meta->{$answer}; + my $val = prompt("New value for $answer", undef, $ini); + $val = [ split(' ', $val) ] if ref($col_props{$answer}); + if ( $answer eq 'trans' ) { + $val = [ unique(grep{ exists $trans_funcs{$_} } @$val) ]; + } + @{$meta}{$answer, 'user', 'tbl' } = ( $val, 1, $tbl ); + } + + my @display_lines = ( + '', + "You are editing column $tbl.$col.\n", + ); + + push @display_lines, create_table2( + \@prop, + { map { $_ => $_ } @prop }, + { map { $_ => ref $meta->{$_} eq 'ARRAY' ? join(' ', @{$meta->{$_}}) + : ref $meta->{$_} ? '[expression code]' + : $meta->{$_} + } @prop + }, + { sep => ' ' }); + draw_screen(\@display_lines, { raw => 1 }); + print "\n\n"; # One to add space, one to clear readline artifacts + $answer = prompt('Edit what? (q to quit)'); + } while ( $answer ne 'q' ); + + return $col; + }, + }, + j => { + note => 'Move highlight down one', + func => sub { + my ( $tbl, $col ) = @_; + my @visible_cols = @{ $tbl_meta{$tbl}->{visible} }; + my $idx = 0; + while ( $visible_cols[$idx] ne $col ) { + $idx++; + } + return $visible_cols[ ($idx + 1) % @visible_cols ]; + }, + }, + k => { + note => 'Move highlight up one', + func => sub { + my ( $tbl, $col ) = @_; + my @visible_cols = @{ $tbl_meta{$tbl}->{visible} }; + my $idx = 0; + while ( $visible_cols[$idx] ne $col ) { + $idx++; + } + return $visible_cols[ $idx - 1 ]; + }, + }, + '+' => { + note => 'Move selected column up one', + func => sub { + my ( $tbl, $col ) = @_; + my $meta = $tbl_meta{$tbl}; + my @visible_cols = @{$meta->{visible}}; + my $idx = 0; + while ( $visible_cols[$idx] ne $col ) { + $idx++; + } + if ( $idx ) { + $visible_cols[$idx] = $visible_cols[$idx - 1]; + $visible_cols[$idx - 1] = $col; + $meta->{visible} = \@visible_cols; + } + else { + shift @{$meta->{visible}}; + push @{$meta->{visible}}, $col; + } + $meta->{cust}->{visible} = 1; + return $col; + }, + }, + '-' => { + note => 'Move selected column down one', + func => sub { + my ( $tbl, $col ) = @_; + my $meta = $tbl_meta{$tbl}; + my @visible_cols = @{$meta->{visible}}; + my $idx = 0; + while ( $visible_cols[$idx] ne $col ) { + $idx++; + } + if ( $idx == $#visible_cols ) { + unshift @{$meta->{visible}}, $col; + pop @{$meta->{visible}}; + } + else { + $visible_cols[$idx] = $visible_cols[$idx + 1]; + $visible_cols[$idx + 1] = $col; + $meta->{visible} = \@visible_cols; + } + $meta->{cust}->{visible} = 1; + return $col; + }, + }, + f => { + note => 'Choose filters', + func => sub { + my ( $tbl, $col ) = @_; + choose_filters($tbl); + return $col; + }, + }, + o => { + note => 'Edit color rules', + func => sub { + my ( $tbl, $col ) = @_; + edit_color_rules($tbl); + return $col; + }, + }, + s => { + note => 'Choose sort columns', + func => sub { + my ( $tbl, $col ) = @_; + choose_sort_cols($tbl); + return $col; + }, + }, + g => { + note => 'Choose group-by (aggregate) columns', + func => sub { + my ( $tbl, $col ) = @_; + choose_group_cols($tbl); + return $col; + }, + }, +); + +# ########################################################################### +# Global variables and environment {{{2 +# ########################################################################### + +my @this_term_size; # w_chars, h_chars, w_pix, h_pix +my @last_term_size; # w_chars, h_chars, w_pix, h_pix +my $char; +my $windows = $OSNAME =~ m/MSWin/; +my $have_color = 0; +my $MAX_ULONG = 4294967295; # 2^32-1 +my $num_regex = qr/^[+-]?(?=\d|\.)\d*(?:\.\d+)?(?:E[+-]?\d+|)$/i; +my $int_regex = qr/^\d+$/; +my $bool_regex = qr/^[01]$/; +my $term = undef; +my $file = undef; # File to watch for InnoDB monitor output +my $file_mtime = undef; # Status of watched file +my $file_data = undef; # Last chunk of text read from file +my $innodb_parser = InnoDBParser->new; + +my $nonfatal_errs = join('|', + 'Access denied for user', + 'Unknown MySQL server host', + 'Unknown database', + 'Can\'t connect to local MySQL server through socket', + 'Can\'t connect to MySQL server on', + 'MySQL server has gone away', + 'Cannot call SHOW INNODB STATUS', + 'Access denied', + 'AutoCommit', +); + +if ( !$opts{n} ) { + require Term::ReadLine; + $term = Term::ReadLine->new('innotop'); +} + +# Stores status, variables, innodb status, master/slave status etc. +# Keyed on connection name. Each entry is a hashref of current and past data sets, +# keyed on clock tick. +my %vars; +my %info_gotten = (); # Which things have been retrieved for the current clock tick. + +# Stores info on currently displayed queries: cxn, connection ID, query text. +my @current_queries; + +my $lines_printed = 0; +my $clock = 0; # Incremented with every wake-sleep cycle +my $clearing_deadlocks = 0; + +# If terminal coloring is available, use it. The only function I want from +# the module is the colored() function. +eval { + if ( !$opts{n} ) { + if ( $windows ) { + require Win32::Console::ANSI; + } + require Term::ANSIColor; + import Term::ANSIColor qw(colored); + $have_color = 1; + } +}; +if ( $EVAL_ERROR || $opts{n} ) { + # If there was an error, manufacture my own colored() function that does no + # coloring. + *colored = sub { pop @_; @_; }; +} + +if ( $opts{n} ) { + $clear_screen_sub = sub {}; +} +elsif ( $windows ) { + $clear_screen_sub = sub { $lines_printed = 0; system("cls") }; +} +else { + my $clear = `clear`; + $clear_screen_sub = sub { $lines_printed = 0; print $clear }; +} + +# ########################################################################### +# Config storage. {{{2 +# ########################################################################### +my %config = ( + color => { + val => $have_color, + note => 'Whether to use terminal coloring', + conf => 'ALL', + pat => $bool_regex, + }, + cmd_filter => { + val => 'Com_', + note => 'Prefix for values in C mode', + conf => [qw(C)], + }, + plugin_dir => { + val => "$homepath/.innotop/plugins", + note => 'Directory where plugins can be found', + conf => 'ALL', + }, + show_percent => { + val => 1, + note => 'Show the % symbol after percentages', + conf => 'ALL', + pat => $bool_regex, + }, + skip_innodb => { + val => 0, + note => 'Disable SHOW INNODB STATUS', + conf => 'ALL', + pat => $bool_regex, + }, + S_func => { + val => 's', + note => 'What to display in S mode: graph, status, pivoted status', + conf => [qw(S)], + pat => qr/^[gsv]$/, + }, + cxn_timeout => { + val => 28800, + note => 'Connection timeout for keeping unused connections alive', + conf => 'ALL', + pat => $int_regex, + }, + graph_char => { + val => '*', + note => 'Character for drawing graphs', + conf => [ qw(S) ], + pat => qr/^.$/, + }, + show_cxn_errors_in_tbl => { + val => 1, + note => 'Whether to display connection errors as rows in the table', + conf => 'ALL', + pat => $bool_regex, + }, + hide_hdr => { + val => 0, + note => 'Whether to show column headers', + conf => 'ALL', + pat => $bool_regex, + }, + show_cxn_errors => { + val => 1, + note => 'Whether to print connection errors to STDOUT', + conf => 'ALL', + pat => $bool_regex, + }, + readonly => { + val => 1, + note => 'Whether the config file is read-only', + conf => [ qw() ], + pat => $bool_regex, + }, + global => { + val => 1, + note => 'Whether to show GLOBAL variables and status', + conf => 'ALL', + pat => $bool_regex, + }, + header_highlight => { + val => 'bold', + note => 'How to highlight table column headers', + conf => 'ALL', + pat => qr/^(?:bold|underline)$/, + }, + display_table_captions => { + val => 1, + note => 'Whether to put captions on tables', + conf => 'ALL', + pat => $bool_regex, + }, + charset => { + val => 'ascii', + note => 'What type of characters should be displayed in queries (ascii, unicode, none)', + conf => 'ALL', + pat => qr/^(?:ascii|unicode|none)$/, + }, + auto_wipe_dl => { + val => 0, + note => 'Whether to auto-wipe InnoDB deadlocks', + conf => 'ALL', + pat => $bool_regex, + }, + max_height => { + val => 30, + note => '[Win32] Max window height', + conf => 'ALL', + }, + debug => { + val => 0, + pat => $bool_regex, + note => 'Debug mode (more verbose errors, uses more memory)', + conf => 'ALL', + }, + num_digits => { + val => 2, + pat => $int_regex, + note => 'How many digits to show in fractional numbers and percents', + conf => 'ALL', + }, + debugfile => { + val => "$homepath/.innotop/core_dump", + note => 'A debug file in case you are interested in error output', + }, + show_statusbar => { + val => 1, + pat => $bool_regex, + note => 'Whether to show the status bar in the display', + conf => 'ALL', + }, + mode => { + val => "Q", + note => "Which mode to start in", + cmdline => 1, + }, + status_inc => { + val => 0, + note => 'Whether to show raw or incremental values for status variables', + pat => $bool_regex, + }, + interval => { + val => 10, + pat => qr/^(?:(?:\d*?[1-9]\d*(?:\.\d*)?)|(?:\d*\.\d*?[1-9]\d*))$/, + note => "The interval at which the display will be refreshed. Fractional values allowed.", + }, + num_status_sets => { + val => 9, + pat => $int_regex, + note => 'How many sets of STATUS and VARIABLES values to show', + conf => [ qw(S) ], + }, + S_set => { + val => 'general', + pat => qr/^\w+$/, + note => 'Which set of variables to display in S (Variables & Status) mode', + conf => [ qw(S) ], + }, +); + +# ########################################################################### +# Config file sections {{{2 +# The configuration file is broken up into sections like a .ini file. This +# variable defines those sections and the subroutines responsible for reading +# and writing them. +# ########################################################################### +my %config_file_sections = ( + plugins => { + reader => \&load_config_plugins, + writer => \&save_config_plugins, + }, + group_by => { + reader => \&load_config_group_by, + writer => \&save_config_group_by, + }, + filters => { + reader => \&load_config_filters, + writer => \&save_config_filters, + }, + active_filters => { + reader => \&load_config_active_filters, + writer => \&save_config_active_filters, + }, + visible_tables => { + reader => \&load_config_visible_tables, + writer => \&save_config_visible_tables, + }, + sort_cols => { + reader => \&load_config_sort_cols, + writer => \&save_config_sort_cols, + }, + active_columns => { + reader => \&load_config_active_columns, + writer => \&save_config_active_columns, + }, + tbl_meta => { + reader => \&load_config_tbl_meta, + writer => \&save_config_tbl_meta, + }, + general => { + reader => \&load_config_config, + writer => \&save_config_config, + }, + connections => { + reader => \&load_config_connections, + writer => \&save_config_connections, + }, + active_connections => { + reader => \&load_config_active_connections, + writer => \&save_config_active_connections, + }, + server_groups => { + reader => \&load_config_server_groups, + writer => \&save_config_server_groups, + }, + active_server_groups => { + reader => \&load_config_active_server_groups, + writer => \&save_config_active_server_groups, + }, + max_values_seen => { + reader => \&load_config_mvs, + writer => \&save_config_mvs, + }, + varsets => { + reader => \&load_config_varsets, + writer => \&save_config_varsets, + }, + colors => { + reader => \&load_config_colors, + writer => \&save_config_colors, + }, + stmt_sleep_times => { + reader => \&load_config_stmt_sleep_times, + writer => \&save_config_stmt_sleep_times, + }, +); + +# Config file sections have some dependencies, so they have to be read/written in order. +my @ordered_config_file_sections = qw(general plugins filters active_filters tbl_meta + connections active_connections server_groups active_server_groups max_values_seen + active_columns sort_cols visible_tables varsets colors stmt_sleep_times + group_by); + +# All events for which plugins may register themselves. Entries are arrayrefs. +my %event_listener_for = map { $_ => [] } + qw( + extract_values + set_to_tbl_pre_filter set_to_tbl_pre_sort set_to_tbl_pre_group + set_to_tbl_pre_colorize set_to_tbl_pre_transform set_to_tbl_pre_pivot + set_to_tbl_pre_create set_to_tbl_post_create + draw_screen + ); + +# All variables to which plugins have access. +my %pluggable_vars = ( + action_for => \%action_for, + agg_funcs => \%agg_funcs, + config => \%config, + connections => \%connections, + dbhs => \%dbhs, + filters => \%filters, + modes => \%modes, + server_groups => \%server_groups, + tbl_meta => \%tbl_meta, + trans_funcs => \%trans_funcs, + var_sets => \%var_sets, +); + +# ########################################################################### +# Contains logic to generate prepared statements for a given function for a +# given DB connection. Returns a $sth. +# ########################################################################### +my %stmt_maker_for = ( + INNODB_STATUS => sub { + my ( $dbh ) = @_; + return $dbh->prepare(version_ge( $dbh, '5.0.0' ) + ? 'SHOW ENGINE INNODB STATUS' + : 'SHOW INNODB STATUS'); + }, + SHOW_VARIABLES => sub { + my ( $dbh ) = @_; + return $dbh->prepare($config{global}->{val} && version_ge( $dbh, '4.0.3' ) + ? 'SHOW GLOBAL VARIABLES' + : 'SHOW VARIABLES'); + }, + SHOW_STATUS => sub { + my ( $dbh ) = @_; + return $dbh->prepare($config{global}->{val} && version_ge( $dbh, '5.0.2' ) + ? 'SHOW GLOBAL STATUS' + : 'SHOW STATUS'); + }, + KILL_QUERY => sub { + my ( $dbh ) = @_; + return $dbh->prepare(version_ge( $dbh, '5.0.0' ) + ? 'KILL QUERY ?' + : 'KILL ?'); + }, + SHOW_MASTER_LOGS => sub { + my ( $dbh ) = @_; + return $dbh->prepare('SHOW MASTER LOGS'); + }, + SHOW_MASTER_STATUS => sub { + my ( $dbh ) = @_; + return $dbh->prepare('SHOW MASTER STATUS'); + }, + SHOW_SLAVE_STATUS => sub { + my ( $dbh ) = @_; + return $dbh->prepare('SHOW SLAVE STATUS'); + }, + KILL_CONNECTION => sub { + my ( $dbh ) = @_; + return $dbh->prepare(version_ge( $dbh, '5.0.0' ) + ? 'KILL CONNECTION ?' + : 'KILL ?'); + }, + OPEN_TABLES => sub { + my ( $dbh ) = @_; + return version_ge($dbh, '4.0.0') + ? $dbh->prepare('SHOW OPEN TABLES') + : undef; + }, + PROCESSLIST => sub { + my ( $dbh ) = @_; + return $dbh->prepare('SHOW FULL PROCESSLIST'); + }, +); + +# Plugins! +my %plugins = ( +); + +# ########################################################################### +# Run the program {{{1 +# ########################################################################### + +# This config variable is only useful for MS Windows because its terminal +# can't tell how tall it is. +if ( !$windows ) { + delete $config{max_height}; +} + +# Try to lower my priority. +eval { setpriority(0, 0, getpriority(0, 0) + 10); }; + +# Print stuff to the screen immediately, don't wait for a newline. +$OUTPUT_AUTOFLUSH = 1; + +# Clear the screen and load the configuration. +$clear_screen_sub->(); +load_config(); + +# Override config variables with command-line options +my %cmdline = + map { $_->{c} => $opts{$_->{k}} } + grep { exists $_->{c} && exists $opts{$_->{k}} } + @opt_spec; + +foreach my $name (keys %cmdline) { + next if not defined $cmdline{$name}; + my $val = $cmdline{$name}; + if ( exists($config{$name}) and (!$config{$name}->{pat} or $val =~ m/$config{$name}->{pat}/ )) { + $config{$name}->{val} = $val; + } +} + +post_process_tbl_meta(); + +# Make sure no changes are written to config file in non-interactive mode. +if ( $opts{n} ) { + $config{readonly}->{val} = 1; +} + +eval { + + # Open the file for InnoDB status + if ( @ARGV ) { + my $filename = shift @ARGV; + open $file, "<", $filename + or die "Cannot open '$filename': $OS_ERROR"; + } + + # In certain modes we might have to collect data for two cycles + # before printing anything out, so we need to bump up the count one. + if ( $opts{n} && $opts{count} && $config{status_inc}->{val} + && $config{mode}->{val} =~ m/[S]/ ) + { + $opts{count}++; + } + + while (++$clock) { + + my $mode = $config{mode}->{val} || 'Q'; + if ( !$modes{$mode} ) { + die "Mode '$mode' doesn't exist; try one of these:\n" + . join("\n", map { " $_ $modes{$_}->{hdr}" } sort keys %modes) + . "\n"; + } + + if ( !$opts{n} ) { + @last_term_size = @this_term_size; + @this_term_size = Term::ReadKey::GetTerminalSize(\*STDOUT); + if ( $windows ) { + $this_term_size[0]--; + $this_term_size[1] + = min($this_term_size[1], $config{max_height}->{val}); + } + die("Can't read terminal size") unless @this_term_size; + } + + # If there's no connection to a database server, we need to fix that... + if ( !%connections ) { + print "You have not defined any database connections.\n\n"; + add_new_dsn(); + } + + # See whether there are any connections defined for this mode. If there's only one + # connection total, assume the user wants to just use innotop for a single server + # and don't ask which server to connect to. Also, if we're monitoring from a file, + # we just use the first connection. + if ( !get_connections() ) { + if ( $file || 1 == scalar keys %connections ) { + $modes{$config{mode}->{val}}->{connections} = [ keys %connections ]; + } + else { + choose_connections(); + } + } + + # Term::ReadLine might have re-set $OUTPUT_AUTOFLUSH. + $OUTPUT_AUTOFLUSH = 1; + + # Prune old data + my $sets = $config{num_status_sets}->{val}; + foreach my $store ( values %vars ) { + delete @{$store}{ grep { $_ < $clock - $sets } keys %$store }; + } + %info_gotten = (); + + # Call the subroutine to display this mode. + $modes{$mode}->{display_sub}->(); + + # It may be time to quit now. + if ( $opts{count} && $clock >= $opts{count} ) { + finish(); + } + + # Wait for a bit. + if ( $opts{n} ) { + sleep($config{interval}->{val}); + } + else { + ReadMode('cbreak'); + $char = ReadKey($config{interval}->{val}); + ReadMode('normal'); + } + + # Handle whatever action the key indicates. + do_key_action(); + + } +}; +if ( $EVAL_ERROR ) { + core_dump( $EVAL_ERROR ); +} +finish(); + +# Subroutines {{{1 +# Mode functions{{{2 +# switch_mode {{{3 +sub switch_mode { + my $mode = shift; + $config{mode}->{val} = $mode; +} + +# Prompting functions {{{2 +# prompt_list {{{3 +# Prompts the user for a value, given a question, initial value, +# a completion function and a hashref of hints. +sub prompt_list { + die "Can't call in non-interactive mode" if $opts{n}; + my ( $question, $init, $completion, $hints ) = @_; + if ( $hints ) { + # Figure out how wide the table will be + my $max_name = max(map { length($_) } keys %$hints ); + $max_name ||= 0; + $max_name += 3; + my @meta_rows = create_table2( + [ sort keys %$hints ], + { map { $_ => $_ } keys %$hints }, + { map { $_ => trunc($hints->{$_}, $this_term_size[0] - $max_name) } keys %$hints }, + { sep => ' ' }); + if (@meta_rows > 10) { + # Try to split and stack the meta rows next to each other + my $split = int(@meta_rows / 2); + @meta_rows = stack_next( + [@meta_rows[0..$split - 1]], + [@meta_rows[$split..$#meta_rows]], + { pad => ' | '}, + ); + } + print join( "\n", + '', + map { ref $_ ? colored(@$_) : $_ } create_caption('Choose from', @meta_rows), ''), + "\n"; + } + $term->Attribs->{completion_function} = $completion; + my $answer = $term->readline("$question: ", $init); + $OUTPUT_AUTOFLUSH = 1; + $answer = '' if !defined($answer); + $answer =~ s/\s+$//; + return $answer; +} + +# prompt {{{3 +# Prints out a prompt and reads from the keyboard, then validates with the +# validation regex until the input is correct. +sub prompt { + die "Can't call in non-interactive mode" if $opts{n}; + my ( $prompt, $regex, $init, $completion ) = @_; + my $response; + my $success = 0; + do { + if ( $completion ) { + $term->Attribs->{completion_function} = $completion; + } + $response = $term->readline("$prompt: ", $init); + if ( $regex && $response !~ m/$regex/ ) { + print "Invalid response.\n\n"; + } + else { + $success = 1; + } + } while ( !$success ); + $OUTPUT_AUTOFLUSH = 1; + $response =~ s/\s+$//; + return $response; +} + +# prompt_noecho {{{3 +# Unfortunately, suppressing echo with Term::ReadLine isn't reliable; the user might not +# have that library, or it might not support that feature. +sub prompt_noecho { + my ( $prompt ) = @_; + print colored("$prompt: ", 'underline'); + my $response; + ReadMode('noecho'); + $response = ; + chomp($response); + ReadMode('normal'); + return $response; +} + +# do_key_action {{{3 +# Depending on whether a key was read, do something. Keys have certain +# actions defined in lookup tables. Each mode may have its own lookup table, +# which trumps the global table -- so keys can be context-sensitive. The key +# may be read and written in a subroutine, so it's a global. +sub do_key_action { + if ( defined $char ) { + my $mode = $config{mode}->{val}; + my $action + = defined($modes{$mode}->{action_for}->{$char}) + ? $modes{$mode}->{action_for}->{$char}->{action} + : defined($action_for{$char}) + ? $action_for{$char}->{action} + : sub{}; + $action->(); + } +} + +# pause {{{3 +sub pause { + die "Can't call in non-interactive mode" if $opts{n}; + my $msg = shift; + print defined($msg) ? "\n$msg" : "\nPress any key to continue"; + ReadMode('cbreak'); + my $char = ReadKey(0); + ReadMode('normal'); + return $char; +} + +# reverse_sort {{{3 +sub reverse_sort { + my $tbl = shift; + $tbl_meta{$tbl}->{sort_dir} *= -1; +} + +# select_cxn {{{3 +# Selects connection(s). If the mode (or argument list) has only one, returns +# it without prompt. +sub select_cxn { + my ( $prompt, @cxns ) = @_; + if ( !@cxns ) { + @cxns = get_connections(); + } + if ( @cxns == 1 ) { + return $cxns[0]; + } + my $choices = prompt_list( + $prompt, + $cxns[0], + sub{ return @cxns }, + { map { $_ => $connections{$_}->{dsn} } @cxns }); + my @result = unique(grep { my $a = $_; grep { $_ eq $a } @cxns } split(/\s+/, $choices)); + return @result; +} + +# kill_query {{{3 +# Kills a connection, or on new versions, optionally a query but not connection. +sub kill_query { + my ( $q_or_c ) = @_; + + my $info = choose_thread( + sub { 1 }, + 'Select a thread to kill the ' . $q_or_c, + ); + return unless $info; + return unless pause("Kill $info->{id}?") =~ m/y/i; + + eval { + do_stmt($info->{cxn}, $q_or_c eq 'QUERY' ? 'KILL_QUERY' : 'KILL_CONNECTION', $info->{id} ); + }; + + if ( $EVAL_ERROR ) { + print "\nError: $EVAL_ERROR"; + pause(); + } +} + +# set_display_precision {{{3 +sub set_display_precision { + my $dir = shift; + $config{num_digits}->{val} = min(9, max(0, $config{num_digits}->{val} + $dir)); +} + +sub toggle_visible_table { + my ( $mode, $table ) = @_; + my $visible = $modes{$mode}->{visible_tables}; + if ( grep { $_ eq $table } @$visible ) { + $modes{$mode}->{visible_tables} = [ grep { $_ ne $table } @$visible ]; + } + else { + unshift @$visible, $table; + } + $modes{$mode}->{cust}->{visible_tables} = 1; +} + +# toggle_filter{{{3 +sub toggle_filter { + my ( $tbl, $filter ) = @_; + my $filters = $tbl_meta{$tbl}->{filters}; + if ( grep { $_ eq $filter } @$filters ) { + $tbl_meta{$tbl}->{filters} = [ grep { $_ ne $filter } @$filters ]; + } + else { + push @$filters, $filter; + } + $tbl_meta{$tbl}->{cust}->{filters} = 1; +} + +# toggle_config {{{3 +sub toggle_config { + my ( $key ) = @_; + $config{$key}->{val} ^= 1; +} + +# create_deadlock {{{3 +sub create_deadlock { + $clear_screen_sub->(); + + print "This function will deliberately cause a small deadlock, " + . "clearing deadlock information from the InnoDB monitor.\n\n"; + + my $answer = prompt("Are you sure you want to proceed? Say 'y' if you do"); + return 0 unless $answer eq 'y'; + + my ( $cxn ) = select_cxn('Clear on which server? '); + return unless $cxn && exists($connections{$cxn}); + + clear_deadlock($cxn); +} + +# deadlock_thread {{{3 +sub deadlock_thread { + my ( $id, $tbl, $cxn ) = @_; + + eval { + my $dbh = get_new_db_connection($cxn, 1); + my @stmts = ( + "set transaction isolation level serializable", + (version_ge($dbh, '4.0.11') ? "start transaction" : 'begin'), + "select * from $tbl where a = $id", + "update $tbl set a = $id where a <> $id", + ); + + foreach my $stmt (@stmts[0..2]) { + $dbh->do($stmt); + } + sleep(1 + $id); + $dbh->do($stmts[-1]); + }; + if ( $EVAL_ERROR ) { + if ( $EVAL_ERROR !~ m/Deadlock found/ ) { + die $EVAL_ERROR; + } + } + exit(0); +} + +# Purges unused binlogs on the master, up to but not including the latest log. +# TODO: guess which connections are slaves of a given master. +sub purge_master_logs { + my @cxns = get_connections(); + + get_master_slave_status(@cxns); + + # Toss out the rows that don't have master/slave status... + my @vars = + grep { $_ && ($_->{file} || $_->{master_host}) } + map { $vars{$_}->{$clock} } @cxns; + @cxns = map { $_->{cxn} } @vars; + + # Figure out which master to purge ons. + my @masters = map { $_->{cxn} } grep { $_->{file} } @vars; + my ( $master ) = select_cxn('Which master?', @masters ); + return unless $master; + my ($master_status) = grep { $_->{cxn} eq $master } @vars; + + # Figure out the result order (not lexical order) of master logs. + my @master_logs = get_master_logs($master); + my $i = 0; + my %master_logs = map { $_->{log_name} => $i++ } @master_logs; + + # Ask which slave(s) are reading from this master. + my @slave_status = grep { $_->{master_host} } @vars; + my @slaves = map { $_->{cxn} } @slave_status; + @slaves = select_cxn("Which slaves are reading from $master?", @slaves); + @slave_status = grep { my $item = $_; grep { $item->{cxn} eq $_ } @slaves } @slave_status; + return unless @slave_status; + + # Find the minimum binary log in use. + my $min_log = min(map { $master_logs{$_->{master_log_file}} } @slave_status); + my $log_name = $master_logs[$min_log]->{log_name}; + + my $stmt = "PURGE MASTER LOGS TO '$log_name'"; + send_cmd_to_servers($stmt, 0, 'PURGE {MASTER | BINARY} LOGS {TO "log_name" | BEFORE "date"}', [$master]); +} + +sub send_cmd_to_servers { + my ( $cmd, $all, $hint, $cxns ) = @_; + if ( $all ) { + @$cxns = get_connections(); + } + elsif ( !@$cxns ) { + @$cxns = select_cxn('Which servers?', @$cxns); + } + if ( $hint ) { + print "\nHint: $hint\n"; + } + $cmd = prompt('Command to send', undef, $cmd); + foreach my $cxn ( @$cxns ) { + eval { + my $sth = do_query($cxn, $cmd); + }; + if ( $EVAL_ERROR ) { + print "Error from $cxn: $EVAL_ERROR\n"; + } + else { + print "Success on $cxn\n"; + } + } + pause(); +} + +# Display functions {{{2 + +sub set_s_mode { + my ( $func ) = @_; + $clear_screen_sub->(); + $config{S_func}->{val} = $func; +} + +# start_S_mode {{{3 +sub start_S_mode { + $clear_screen_sub->(); + switch_mode('S'); +} + +# display_B {{{3 +sub display_B { + my @display_lines; + my @cxns = get_connections(); + get_innodb_status(\@cxns); + + my @buffer_pool; + my @page_statistics; + my @insert_buffers; + my @adaptive_hash_index; + my %rows_for = ( + buffer_pool => \@buffer_pool, + page_statistics => \@page_statistics, + insert_buffers => \@insert_buffers, + adaptive_hash_index => \@adaptive_hash_index, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + foreach my $cxn ( @cxns ) { + my $set = $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock-1} || $set; + + if ( $set->{IB_bp_complete} ) { + if ( $wanted{buffer_pool} ) { + push @buffer_pool, extract_values($set, $set, $pre, 'buffer_pool'); + } + if ( $wanted{page_statistics} ) { + push @page_statistics, extract_values($set, $set, $pre, 'page_statistics'); + } + } + if ( $set->{IB_ib_complete} ) { + if ( $wanted{insert_buffers} ) { + push @insert_buffers, extract_values( + $config{status_inc}->{val} ? inc(0, $cxn) : $set, $set, $pre, + 'insert_buffers'); + } + if ( $wanted{adaptive_hash_index} ) { + push @adaptive_hash_index, extract_values($set, $set, $pre, 'adaptive_hash_index'); + } + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_C {{{3 +sub display_C { + my @display_lines; + my @cxns = get_connections(); + get_status_info(@cxns); + + my @cmd_summary; + my %rows_for = ( + cmd_summary => \@cmd_summary, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + # For now, I'm manually pulling these variables out and pivoting. Eventually a SQL-ish + # dialect should let me join a table to a grouped and pivoted table and do this more easily. + # TODO: make it so. + my $prefix = qr/^$config{cmd_filter}->{val}/; # TODO: this is a total hack + my @values; + my ($total, $last_total) = (0, 0); + foreach my $cxn ( @cxns ) { + my $set = $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock-1} || $set; + foreach my $key ( keys %$set ) { + next unless $key =~ m/$prefix/i; + my $val = $set->{$key}; + next unless defined $val && $val =~ m/^\d+$/; + my $last_val = $val - ($pre->{$key} || 0); + $total += $val; + $last_total += $last_val; + push @values, { + name => $key, + value => $val, + last_value => $last_val, + }; + } + } + + # Add aggregation and turn into a real set TODO: total hack + if ( $wanted{cmd_summary} ) { + foreach my $value ( @values ) { + @{$value}{qw(total last_total)} = ($total, $last_total); + push @cmd_summary, extract_values($value, $value, $value, 'cmd_summary'); + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_D {{{3 +sub display_D { + my @display_lines; + my @cxns = get_connections(); + get_innodb_status(\@cxns); + + my @deadlock_transactions; + my @deadlock_locks; + my %rows_for = ( + deadlock_transactions => \@deadlock_transactions, + deadlock_locks => \@deadlock_locks, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + foreach my $cxn ( @cxns ) { + my $innodb_status = $vars{$cxn}->{$clock}; + my $prev_status = $vars{$cxn}->{$clock-1} || $innodb_status; + + if ( $innodb_status->{IB_dl_timestring} ) { + + my $victim = $innodb_status->{IB_dl_rolled_back} || 0; + + if ( %wanted ) { + foreach my $txn_id ( keys %{$innodb_status->{IB_dl_txns}} ) { + my $txn = $innodb_status->{IB_dl_txns}->{$txn_id}; + my $pre = $prev_status->{IB_dl_txns}->{$txn_id} || $txn; + + if ( $wanted{deadlock_transactions} ) { + my $hash = extract_values($txn->{tx}, $txn->{tx}, $pre->{tx}, 'deadlock_transactions'); + $hash->{cxn} = $cxn; + $hash->{dl_txn_num} = $txn_id; + $hash->{victim} = $txn_id == $victim ? 'Yes' : 'No'; + $hash->{timestring} = $innodb_status->{IB_dl_timestring}; + $hash->{truncates} = $innodb_status->{IB_dl_complete} ? 'No' : 'Yes'; + push @deadlock_transactions, $hash; + } + + if ( $wanted{deadlock_locks} ) { + foreach my $lock ( @{$txn->{locks}} ) { + my $hash = extract_values($lock, $lock, $lock, 'deadlock_locks'); + $hash->{dl_txn_num} = $txn_id; + $hash->{cxn} = $cxn; + $hash->{mysql_thread_id} = $txn->{tx}->{mysql_thread_id}; + push @deadlock_locks, $hash; + } + } + + } + } + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_F {{{3 +sub display_F { + my @display_lines; + my ( $cxn ) = get_connections(); + get_innodb_status([$cxn]); + my $innodb_status = $vars{$cxn}->{$clock}; + + if ( $innodb_status->{IB_fk_timestring} ) { + + push @display_lines, 'Reason: ' . $innodb_status->{IB_fk_reason}; + + # Display FK errors caused by invalid DML. + if ( $innodb_status->{IB_fk_txn} ) { + my $txn = $innodb_status->{IB_fk_txn}; + push @display_lines, + '', + "User $txn->{user} from $txn->{hostname}, thread $txn->{mysql_thread_id} was executing:", + '', no_ctrl_char($txn->{query_text}); + } + + my @fk_table = create_table2( + $tbl_meta{fk_error}->{visible}, + meta_to_hdr('fk_error'), + extract_values($innodb_status, $innodb_status, $innodb_status, 'fk_error'), + { just => '-', sep => ' '}); + push @display_lines, '', @fk_table; + + } + else { + push @display_lines, '', 'No foreign key error data.'; + } + draw_screen(\@display_lines, { raw => 1 } ); +} + +# display_I {{{3 +sub display_I { + my @display_lines; + my @cxns = get_connections(); + get_innodb_status(\@cxns); + + my @io_threads; + my @pending_io; + my @file_io_misc; + my @log_statistics; + my %rows_for = ( + io_threads => \@io_threads, + pending_io => \@pending_io, + file_io_misc => \@file_io_misc, + log_statistics => \@log_statistics, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + foreach my $cxn ( @cxns ) { + my $set = $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock-1} || $set; + + if ( $set->{IB_io_complete} ) { + if ( $wanted{io_threads} ) { + my $cur_threads = $set->{IB_io_threads}; + my $pre_threads = $pre->{IB_io_threads} || $cur_threads; + foreach my $key ( sort keys %$cur_threads ) { + my $cur_thd = $cur_threads->{$key}; + my $pre_thd = $pre_threads->{$key} || $cur_thd; + my $hash = extract_values($cur_thd, $cur_thd, $pre_thd, 'io_threads'); + $hash->{cxn} = $cxn; + push @io_threads, $hash; + } + } + if ( $wanted{pending_io} ) { + push @pending_io, extract_values($set, $set, $pre, 'pending_io'); + } + if ( $wanted{file_io_misc} ) { + push @file_io_misc, extract_values( + $config{status_inc}->{val} ? inc(0, $cxn) : $set, + $set, $pre, 'file_io_misc'); + } + } + if ( $set->{IB_lg_complete} && $wanted{log_statistics} ) { + push @log_statistics, extract_values($set, $set, $pre, 'log_statistics'); + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_L {{{3 +sub display_L { + my @display_lines; + my @cxns = get_connections(); + get_innodb_status(\@cxns); + + my @innodb_locks; + my %rows_for = ( + innodb_locks => \@innodb_locks, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + # Get info on locks + foreach my $cxn ( @cxns ) { + my $set = $vars{$cxn}->{$clock} or next; + my $pre = $vars{$cxn}->{$clock-1} || $set; + + if ( $wanted{innodb_locks} && defined $set->{IB_tx_transactions} && @{$set->{IB_tx_transactions}} ) { + + my $cur_txns = $set->{IB_tx_transactions}; + my $pre_txns = $pre->{IB_tx_transactions} || $cur_txns; + my %cur_txns = map { $_->{mysql_thread_id} => $_ } @$cur_txns; + my %pre_txns = map { $_->{mysql_thread_id} => $_ } @$pre_txns; + foreach my $txn ( @$cur_txns ) { + foreach my $lock ( @{$txn->{locks}} ) { + my %hash = map { $_ => $txn->{$_} } qw(txn_id mysql_thread_id lock_wait_time active_secs); + map { $hash{$_} = $lock->{$_} } qw(lock_type space_id page_no n_bits index db table txn_id lock_mode special insert_intention waiting); + $hash{cxn} = $cxn; + push @innodb_locks, extract_values(\%hash, \%hash, \%hash, 'innodb_locks'); + } + } + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_M {{{3 +sub display_M { + my @display_lines; + my @cxns = get_connections(); + get_master_slave_status(@cxns); + get_status_info(@cxns); + + my @slave_sql_status; + my @slave_io_status; + my @master_status; + my %rows_for = ( + slave_sql_status => \@slave_sql_status, + slave_io_status => \@slave_io_status, + master_status => \@master_status, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + foreach my $cxn ( @cxns ) { + my $set = $config{status_inc}->{val} ? inc(0, $cxn) : $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock - 1} || $set; + if ( $wanted{slave_sql_status} ) { + push @slave_sql_status, extract_values($set, $set, $pre, 'slave_sql_status'); + } + if ( $wanted{slave_io_status} ) { + push @slave_io_status, extract_values($set, $set, $pre, 'slave_io_status'); + } + if ( $wanted{master_status} ) { + push @master_status, extract_values($set, $set, $pre, 'master_status'); + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_O {{{3 +sub display_O { + my @display_lines = (''); + my @cxns = get_connections(); + my @open_tables = get_open_tables(@cxns); + my @tables = map { extract_values($_, $_, $_, 'open_tables') } @open_tables; + push @display_lines, set_to_tbl(\@tables, 'open_tables'), get_cxn_errors(@cxns); + draw_screen(\@display_lines); +} + +# display_Q {{{3 +sub display_Q { + my @display_lines; + + my @q_header; + my @processlist; + my %rows_for = ( + q_header => \@q_header, + processlist => \@processlist, + ); + + my @visible = $opts{n} ? 'processlist' : get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + # Get the data + my @cxns = get_connections(); + my @full_processlist = get_full_processlist(@cxns); + + # Create header + if ( $wanted{q_header} ) { + get_status_info(@cxns); + foreach my $cxn ( @cxns ) { + my $set = $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock-1} || $set; + my $hash = extract_values($set, $set, $pre, 'q_header'); + $hash->{cxn} = $cxn; + $hash->{when} = 'Total'; + push @q_header, $hash; + + if ( exists $vars{$cxn}->{$clock - 1} ) { + my $inc = inc(0, $cxn); + my $hash = extract_values($inc, $set, $pre, 'q_header'); + $hash->{cxn} = $cxn; + $hash->{when} = 'Now'; + push @q_header, $hash; + } + } + } + + if ( $wanted{processlist} ) { + # TODO: save prev values + push @processlist, map { extract_values($_, $_, $_, 'processlist') } @full_processlist; + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + next unless $wanted{$tbl}; + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + # Save queries in global variable for analysis. The rows in %rows_for have been + # filtered, etc as a side effect of set_to_tbl(), so they are the same as the rows + # that get pushed to the screen. + @current_queries = map { + my %hash; + @hash{ qw(cxn id db query secs) } = @{$_}{ qw(cxn mysql_thread_id db info secs) }; + \%hash; + } @{$rows_for{processlist}}; + + draw_screen(\@display_lines); +} + +# display_R {{{3 +sub display_R { + my @display_lines; + my @cxns = get_connections(); + get_innodb_status(\@cxns); + + my @row_operations; + my @row_operation_misc; + my @semaphores; + my @wait_array; + my %rows_for = ( + row_operations => \@row_operations, + row_operation_misc => \@row_operation_misc, + semaphores => \@semaphores, + wait_array => \@wait_array, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + my $incvar = $config{status_inc}->{val}; + + foreach my $cxn ( @cxns ) { + my $set = $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock-1} || $set; + my $inc; # Only assigned to if wanted + + if ( $set->{IB_ro_complete} ) { + if ( $wanted{row_operations} ) { + $inc ||= $incvar ? inc(0, $cxn) : $set; + push @row_operations, extract_values($inc, $set, $pre, 'row_operations'); + } + if ( $wanted{row_operation_misc} ) { + push @row_operation_misc, extract_values($set, $set, $pre, 'row_operation_misc'), + } + } + + if ( $set->{IB_sm_complete} && $wanted{semaphores} ) { + $inc ||= $incvar ? inc(0, $cxn) : $set; + push @semaphores, extract_values($inc, $set, $pre, 'semaphores'); + } + + if ( $set->{IB_sm_wait_array_size} && $wanted{wait_array} ) { + foreach my $wait ( @{$set->{IB_sm_waits}} ) { + my $hash = extract_values($wait, $wait, $wait, 'wait_array'); + $hash->{cxn} = $cxn; + push @wait_array, $hash; + } + } + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + draw_screen(\@display_lines); +} + +# display_T {{{3 +sub display_T { + my @display_lines; + + my @t_header; + my @innodb_transactions; + my %rows_for = ( + t_header => \@t_header, + innodb_transactions => \@innodb_transactions, + ); + + my @visible = $opts{n} ? 'innodb_transactions' : get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + + my @cxns = get_connections(); + + # If the header is to be shown, buffer pool data is required. + get_innodb_status( \@cxns, [ $wanted{t_header} ? qw(bp) : () ] ); + + foreach my $cxn ( get_connections() ) { + my $set = $vars{$cxn}->{$clock}; + my $pre = $vars{$cxn}->{$clock-1} || $set; + + next unless $set->{IB_tx_transactions}; + + if ( $wanted{t_header} ) { + my $hash = extract_values($set, $set, $pre, 't_header'); + push @t_header, $hash; + } + + if ( $wanted{innodb_transactions} ) { + my $cur_txns = $set->{IB_tx_transactions}; + my $pre_txns = $pre->{IB_tx_transactions} || $cur_txns; + my %cur_txns = map { $_->{mysql_thread_id} => $_ } @$cur_txns; + my %pre_txns = map { $_->{mysql_thread_id} => $_ } @$pre_txns; + foreach my $thd_id ( sort keys %cur_txns ) { + my $cur_txn = $cur_txns{$thd_id}; + my $pre_txn = $pre_txns{$thd_id} || $cur_txn; + my $hash = extract_values($cur_txn, $cur_txn, $pre_txn, 'innodb_transactions'); + $hash->{cxn} = $cxn; + push @innodb_transactions, $hash; + } + } + + } + + my $first_table = 0; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + + # Save queries in global variable for analysis. The rows in %rows_for have been + # filtered, etc as a side effect of set_to_tbl(), so they are the same as the rows + # that get pushed to the screen. + @current_queries = map { + my %hash; + @hash{ qw(cxn id db query secs) } = @{$_}{ qw(cxn mysql_thread_id db query_text active_secs) }; + \%hash; + } @{$rows_for{innodb_transactions}}; + + draw_screen(\@display_lines); +} + +# display_S {{{3 +sub display_S { + my $fmt = get_var_set('S_set'); + my $func = $config{S_func}->{val}; + my $inc = $func eq 'g' || $config{status_inc}->{val}; + + # The table's meta-data is generated from the compiled var_set. + my ( $cols, $visible ); + if ( $tbl_meta{var_status}->{fmt} && $fmt eq $tbl_meta{var_status}->{fmt} ) { + ( $cols, $visible ) = @{$tbl_meta{var_status}}{qw(cols visible)}; + } + else { + ( $cols, $visible ) = compile_select_stmt($fmt); + + # Apply missing values to columns. Always apply averages across all connections. + map { + $_->{agg} = 'avg'; + $_->{label} = $_->{hdr}; + } values %$cols; + + $tbl_meta{var_status}->{cols} = $cols; + $tbl_meta{var_status}->{visible} = $visible; + $tbl_meta{var_status}->{fmt} = $fmt; + map { $tbl_meta{var_status}->{cols}->{$_}->{just} = ''} @$visible; + } + + my @var_status; + my %rows_for = ( + var_status => \@var_status, + ); + + my @visible = get_visible_tables(); + my %wanted = map { $_ => 1 } @visible; + my @cxns = get_connections(); + + get_status_info(@cxns); + get_innodb_status(\@cxns); + + # Set up whether to pivot and how many sets to extract. + $tbl_meta{var_status}->{pivot} = $func eq 'v'; + + my $num_sets + = $func eq 'v' + ? $config{num_status_sets}->{val} + : 0; + foreach my $set ( 0 .. $num_sets ) { + my @rows; + foreach my $cxn ( @cxns ) { + my $vars = $inc ? inc($set, $cxn) : $vars{$cxn}->{$clock - $set}; + my $cur = $vars{$cxn}->{$clock-$set}; + my $pre = $vars{$cxn}->{$clock-$set-1} || $cur; + next unless $vars && %$vars; + my $hash = extract_values($vars, $cur, $pre, 'var_status'); + push @rows, $hash; + } + @rows = apply_group_by('var_status', [], @rows); + push @var_status, @rows; + } + + # Recompile the sort func. TODO: avoid recompiling at every refresh. + # Figure out whether the data is all numeric and decide on a sort type. + # my $cmp + # = scalar( + # grep { !defined $_ || $_ !~ m/^\d+$/ } + # map { my $col = $_; map { $_->{$col} } @var_status } + # $tbl_meta{var_status}->{sort_cols} =~ m/(\w+)/g) + # ? 'cmp' + # : '<=>'; + $tbl_meta{var_status}->{sort_func} = make_sort_func($tbl_meta{var_status}); + + # ################################################################ + # Now there is specific display code based on $config{S_func} + # ################################################################ + if ( $func =~ m/s|g/ ) { + my $min_width = 4; + + # Clear the screen if the display width changed. + if ( @last_term_size && $this_term_size[0] != $last_term_size[0] ) { + $lines_printed = 0; + $clear_screen_sub->(); + } + + if ( $func eq 's' ) { + # Decide how wide columns should be. + my $num_cols = scalar(@$visible); + my $width = $opts{n} ? 0 : max($min_width, int(($this_term_size[0] - $num_cols + 1) / $num_cols)); + my $g_format = $opts{n} ? ( "%s\t" x $num_cols ) : ( "%-${width}s " x $num_cols ); + + # Print headers every now and then. Headers can get really long, so compact them. + my @hdr = @$visible; + if ( $opts{n} ) { + if ( $lines_printed == 0 ) { + print join("\t", @hdr), "\n"; + $lines_printed++; + } + } + elsif ( $lines_printed == 0 || $lines_printed > $this_term_size[1] - 2 ) { + @hdr = map { donut(crunch($_, $width), $width) } @hdr; + print join(' ', map { sprintf( "%${width}s", donut($_, $width)) } @hdr) . "\n"; + $lines_printed = 1; + } + + # Design a column format for the values. + my $format + = $opts{n} + ? join("\t", map { '%s' } @$visible) . "\n" + : join(' ', map { "%${width}s" } @hdr) . "\n"; + + foreach my $row ( @var_status ) { + printf($format, map { defined $_ ? $_ : '' } @{$row}{ @$visible }); + $lines_printed++; + } + } + else { # 'g' mode + # Design a column format for the values. + my $num_cols = scalar(@$visible); + my $width = $opts{n} ? 0 : int(($this_term_size[0] - $num_cols + 1) / $num_cols); + my $format = $opts{n} ? ( "%s\t" x $num_cols ) : ( "%-${width}s " x $num_cols ); + $format =~ s/\s$/\n/; + + # Print headers every now and then. + if ( $opts{n} ) { + if ( $lines_printed == 0 ) { + print join("\t", @$visible), "\n"; + print join("\t", map { shorten($mvs{$_}) } @$visible), "\n"; + } + } + elsif ( $lines_printed == 0 || $lines_printed > $this_term_size[1] - 2 ) { + printf($format, map { donut(crunch($_, $width), $width) } @$visible); + printf($format, map { shorten($mvs{$_} || 0) } @$visible); + $lines_printed = 2; + } + + # Update the max ever seen, and scale by the max ever seen. + my $set = $var_status[0]; + foreach my $col ( @$visible ) { + $set->{$col} = 1 unless defined $set->{$col} && $set->{$col} =~ m/$num_regex/; + $set->{$col} = ($set->{$col} || 1) / ($set->{Uptime_hires} || 1); + $mvs{$col} = max($mvs{$col} || 1, $set->{$col}); + $set->{$col} /= $mvs{$col}; + } + printf($format, map { ( $config{graph_char}->{val} x int( $width * $set->{$_} )) || '.' } @$visible ); + $lines_printed++; + + } + } + else { # 'v' + my $first_table = 0; + my @display_lines; + foreach my $tbl ( @visible ) { + push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); + push @display_lines, get_cxn_errors(@cxns) + if ( $config{debug}->{val} || !$first_table++ ); + } + $clear_screen_sub->(); + draw_screen( \@display_lines ); + } +} + +# display_explain {{{3 +sub display_explain { + my $info = shift; + my $cxn = $info->{cxn}; + my $db = $info->{db}; + + my ( $mods, $query ) = rewrite_for_explain($info->{query}); + + my @display_lines; + + if ( $query ) { + + my $part = version_ge($dbhs{$cxn}->{dbh}, '5.1.5') ? 'PARTITIONS' : ''; + $query = "EXPLAIN $part\n" . $query; + + eval { + if ( $db ) { + do_query($cxn, "use $db"); + } + my $sth = do_query($cxn, $query); + + my $res; + while ( $res = $sth->fetchrow_hashref() ) { + map { $res->{$_} ||= '' } ( 'partitions', keys %$res); + my @this_table = create_caption("Sub-Part $res->{id}", + create_table2( + $tbl_meta{explain}->{visible}, + meta_to_hdr('explain'), + extract_values($res, $res, $res, 'explain'))); + @display_lines = stack_next(\@display_lines, \@this_table, { pad => ' ', vsep => 2 }); + } + }; + + if ( $EVAL_ERROR ) { + push @display_lines, + '', + "The query could not be explained. Only SELECT queries can be " + . "explained; innotop tries to rewrite certain REPLACE and INSERT queries " + . "into SELECT, but this doesn't always succeed."; + } + + } + else { + push @display_lines, '', 'The query could not be explained.'; + } + + if ( $mods ) { + push @display_lines, '', '[This query has been re-written to be explainable]'; + } + + unshift @display_lines, no_ctrl_char($query); + draw_screen(\@display_lines, { raw => 1 } ); +} + +# rewrite_for_explain {{{3 +sub rewrite_for_explain { + my $query = shift; + + my $mods = 0; + my $orig = $query; + $mods += $query =~ s/^\s*(?:replace|insert).*?select/select/is; + $mods += $query =~ s/^ + \s*create\s+(?:temporary\s+)?table + \s+(?:\S+\s+)as\s+select/select/xis; + $mods += $query =~ s/\s+on\s+duplicate\s+key\s+update.*$//is; + return ( $mods, $query ); +} + +# show_optimized_query {{{3 +sub show_optimized_query { + my $info = shift; + my $cxn = $info->{cxn}; + my $db = $info->{db}; + my $meta = $dbhs{$cxn}; + + my @display_lines; + + my ( $mods, $query ) = rewrite_for_explain($info->{query}); + + if ( $mods ) { + push @display_lines, '[This query has been re-written to be explainable]'; + } + + if ( $query ) { + push @display_lines, no_ctrl_char($info->{query}); + + eval { + if ( $db ) { + do_query($cxn, "use $db"); + } + do_query( $cxn, 'EXPLAIN EXTENDED ' . $query ) or die "Can't explain query"; + my $sth = do_query($cxn, 'SHOW WARNINGS'); + my $res = $sth->fetchall_arrayref({}); + + if ( $res ) { + foreach my $result ( @$res ) { + push @display_lines, 'Note:', no_ctrl_char($result->{message}); + } + } + else { + push @display_lines, '', 'The query optimization could not be generated.'; + } + }; + + if ( $EVAL_ERROR ) { + push @display_lines, '', "The optimization could not be generated: $EVAL_ERROR"; + } + + } + else { + push @display_lines, '', 'The query optimization could not be generated.'; + } + + draw_screen(\@display_lines, { raw => 1 } ); +} + +# display_help {{{3 +sub display_help { + my $mode = $config{mode}->{val}; + + # Get globally mapped keys, then overwrite them with mode-specific ones. + my %keys = map { + $_ => $action_for{$_}->{label} + } keys %action_for; + foreach my $key ( keys %{$modes{$mode}->{action_for}} ) { + $keys{$key} = $modes{$mode}->{action_for}->{$key}->{label}; + } + delete $keys{'?'}; + + # Split them into three kinds of keys: MODE keys, action keys, and + # magic (special character) keys. + my @modes = sort grep { m/[A-Z]/ } keys %keys; + my @actions = sort grep { m/[a-z]/ } keys %keys; + my @magic = sort grep { m/[^A-Z]/i } keys %keys; + + my @display_lines = ( '', 'Switch to a different mode:' ); + + # Mode keys + my @all_modes = map { "$_ $modes{$_}->{hdr}" } @modes; + my @col1 = splice(@all_modes, 0, ceil(@all_modes/3)); + my @col2 = splice(@all_modes, 0, ceil(@all_modes/2)); + my $max1 = max(map {length($_)} @col1); + my $max2 = max(map {length($_)} @col2); + while ( @col1 ) { + push @display_lines, sprintf(" %-${max1}s %-${max2}s %s", + (shift @col1 || ''), + (shift @col2 || ''), + (shift @all_modes || '')); + } + + # Action keys + my @all_actions = map { "$_ $keys{$_}" } @actions; + @col1 = splice(@all_actions, 0, ceil(@all_actions/2)); + $max1 = max(map {length($_)} @col1); + push @display_lines, '', 'Actions:'; + while ( @col1 ) { + push @display_lines, sprintf(" %-${max1}s %s", + (shift @col1 || ''), + (shift @all_actions || '')); + } + + # Magic keys + my @all_magic = map { sprintf('%4s', $action_for{$_}->{key} || $_) . " $keys{$_}" } @magic; + @col1 = splice(@all_magic, 0, ceil(@all_magic/2)); + $max1 = max(map {length($_)} @col1); + push @display_lines, '', 'Other:'; + while ( @col1 ) { + push @display_lines, sprintf("%-${max1}s%s", + (shift @col1 || ''), + (shift @all_magic || '')); + } + + $clear_screen_sub->(); + draw_screen(\@display_lines, { show_all => 1 } ); + pause(); + $clear_screen_sub->(); +} + +# show_full_query {{{3 +sub show_full_query { + my $info = shift; + my @display_lines = no_ctrl_char($info->{query}); + draw_screen(\@display_lines, { raw => 1 }); +} + +# Formatting functions {{{2 + +# create_table2 {{{3 +# Makes a two-column table, labels on left, data on right. +# Takes refs of @cols, %labels and %data, %user_prefs +sub create_table2 { + my ( $cols, $labels, $data, $user_prefs ) = @_; + my @rows; + + if ( @$cols && %$data ) { + + # Override defaults + my $p = { + just => '', + sep => ':', + just1 => '-', + }; + if ( $user_prefs ) { + map { $p->{$_} = $user_prefs->{$_} } keys %$user_prefs; + } + + # Fix undef values + map { $data->{$_} = '' unless defined $data->{$_} } @$cols; + + # Format the table + my $max_l = max(map{ length($labels->{$_}) } @$cols); + my $max_v = max(map{ length($data->{$_}) } @$cols); + my $format = "%$p->{just}${max_l}s$p->{sep} %$p->{just1}${max_v}s"; + foreach my $col ( @$cols ) { + push @rows, sprintf($format, $labels->{$col}, $data->{$col}); + } + } + return @rows; +} + +# stack_next {{{3 +# Stacks one display section next to the other. Accepts left-hand arrayref, +# right-hand arrayref, and options hashref. Tries to stack as high as +# possible, so +# aaaaaa +# bbb +# can stack ccc next to the bbb. +# NOTE: this DOES modify its arguments, even though it returns a new array. +sub stack_next { + my ( $left, $right, $user_prefs ) = @_; + my @result; + + my $p = { + pad => ' ', + vsep => 0, + }; + if ( $user_prefs ) { + map { $p->{$_} = $user_prefs->{$_} } keys %$user_prefs; + } + + # Find out how wide the LHS can be and still let the RHS fit next to it. + my $pad = $p->{pad}; + my $max_r = max( map { length($_) } @$right) || 0; + my $max_l = $this_term_size[0] - $max_r - length($pad); + + # Find the minimum row on the LHS that the RHS will fit next to. + my $i = scalar(@$left) - 1; + while ( $i >= 0 && length($left->[$i]) <= $max_l ) { + $i--; + } + $i++; + my $offset = $i; + + if ( $i < scalar(@$left) ) { + # Find the max width of the section of the LHS against which the RHS + # will sit. + my $max_i_in_common = min($i + scalar(@$right) - 1, scalar(@$left) - 1); + my $max_width = max( map { length($_) } @{$left}[$i..$max_i_in_common]); + + # Append the RHS onto the LHS until one runs out. + while ( $i < @$left && $i - $offset < @$right ) { + my $format = "%-${max_width}s$pad%${max_r}s"; + $left->[$i] = sprintf($format, $left->[$i], $right->[$i - $offset]); + $i++; + } + while ( $i - $offset < @$right ) { + # There is more RHS to push on the end of the array + push @$left, + sprintf("%${max_width}s$pad%${max_r}s", ' ', $right->[$i - $offset]); + $i++; + } + push @result, @$left; + } + else { + # There is no room to put them side by side. Add them below, with + # a blank line above them if specified. + push @result, @$left; + push @result, (' ' x $this_term_size[0]) if $p->{vsep} && @$left; + push @result, @$right; + } + return @result; +} + +# create_caption {{{3 +sub create_caption { + my ( $caption, @rows ) = @_; + if ( @rows ) { + + # Calculate the width of what will be displayed, so it can be centered + # in that space. When the thing is wider than the display, center the + # caption in the display. + my $width = min($this_term_size[0], max(map { length(ref($_) ? $_->[0] : $_) } @rows)); + + my $cap_len = length($caption); + + # It may be narrow enough to pad the sides with underscores and save a + # line on the screen. + if ( $cap_len <= $width - 6 ) { + my $left = int(($width - 2 - $cap_len) / 2); + unshift @rows, + ("_" x $left) . " $caption " . ("_" x ($width - $left - $cap_len - 2)); + } + + # The caption is too wide to add underscores on each side. + else { + + # Color is supported, so we can use terminal underlining. + if ( $config{color}->{val} ) { + my $left = int(($width - $cap_len) / 2); + unshift @rows, [ + (" " x $left) . $caption . (" " x ($width - $left - $cap_len)), + 'underline', + ]; + } + + # Color is not supported, so we have to add a line underneath to separate the + # caption from whatever it's captioning. + else { + my $left = int(($width - $cap_len) / 2); + unshift @rows, ('-' x $width); + unshift @rows, (" " x $left) . $caption . (" " x ($width - $left - $cap_len)); + } + + # The caption is wider than the thing it labels, so we have to pad the + # thing it labels to a consistent width. + if ( $cap_len > $width ) { + @rows = map { + ref($_) + ? [ sprintf('%-' . $cap_len . 's', $_->[0]), $_->[1] ] + : sprintf('%-' . $cap_len . 's', $_); + } @rows; + } + + } + } + return @rows; +} + +# create_table {{{3 +# Input: an arrayref of columns, hashref of col info, and an arrayref of hashes +# Example: [ 'a', 'b' ] +# { a => spec, b => spec } +# [ { a => 1, b => 2}, { a => 3, b => 4 } ] +# The 'spec' is a hashref of hdr => label, just => ('-' or ''). It also supports min and max-widths +# vi the minw and maxw params. +# Output: an array of strings, one per row. +# Example: +# Column One Column Two +# ---------- ---------- +# 1 2 +# 3 4 +sub create_table { + my ( $cols, $info, $data, $prefs ) = @_; + $prefs ||= {}; + $prefs->{no_hdr} ||= ($opts{n} && $clock != 1); + + # Truncate rows that will surely be off screen even if this is the only table. + if ( !$opts{n} && !$prefs->{raw} && !$prefs->{show_all} && $this_term_size[1] < @$data-1 ) { + $data = [ @$data[0..$this_term_size[1] - 1] ]; + } + + my @rows = (); + + if ( @$cols && %$info ) { + + # Fix undef values, collapse whitespace. + foreach my $row ( @$data ) { + map { $row->{$_} = collapse_ws($row->{$_}) } @$cols; + } + + my $col_sep = $opts{n} ? "\t" : ' '; + + # Find each column's max width. + my %width_for; + if ( !$opts{n} ) { + %width_for = map { + my $col_name = $_; + if ( $info->{$_}->{dec} ) { + # Align along the decimal point + my $max_rodp = max(0, map { $_->{$col_name} =~ m/([^\s\d-].*)$/ ? length($1) : 0 } @$data); + foreach my $row ( @$data ) { + my $col = $row->{$col_name}; + my ( $l, $r ) = $col =~ m/^([\s\d]*)(.*)$/; + $row->{$col_name} = sprintf("%s%-${max_rodp}s", $l, $r); + } + } + my $max_width = max( length($info->{$_}->{hdr}), map { length($_->{$col_name}) } @$data); + if ( $info->{$col_name}->{maxw} ) { + $max_width = min( $max_width, $info->{$col_name}->{maxw} ); + } + if ( $info->{$col_name}->{minw} ) { + $max_width = max( $max_width, $info->{$col_name}->{minw} ); + } + $col_name => $max_width; + } @$cols; + } + + # The table header. + if ( !$config{hide_hdr}->{val} && !$prefs->{no_hdr} ) { + push @rows, $opts{n} + ? join( $col_sep, @$cols ) + : join( $col_sep, map { sprintf( "%-$width_for{$_}s", trunc($info->{$_}->{hdr}, $width_for{$_}) ) } @$cols ); + if ( $config{color}->{val} && $config{header_highlight}->{val} ) { + push @rows, [ pop @rows, $config{header_highlight}->{val} ]; + } + elsif ( !$opts{n} ) { + push @rows, join( $col_sep, map { "-" x $width_for{$_} } @$cols ); + } + } + + # The table data. + if ( $opts{n} ) { + foreach my $item ( @$data ) { + push @rows, join($col_sep, map { $item->{$_} } @$cols ); + } + } + else { + my $format = join( $col_sep, + map { "%$info->{$_}->{just}$width_for{$_}s" } @$cols ); + foreach my $item ( @$data ) { + my $row = sprintf($format, map { trunc($item->{$_}, $width_for{$_}) } @$cols ); + if ( $config{color}->{val} && $item->{_color} ) { + push @rows, [ $row, $item->{_color} ]; + } + else { + push @rows, $row; + } + } + } + } + + return @rows; +} + +# Aggregates a table. If $group_by is an arrayref of columns, the grouping key +# is the specified columns; otherwise it's just the empty string (e.g. +# everything is grouped as one group). +sub apply_group_by { + my ( $tbl, $group_by, @rows ) = @_; + my $meta = $tbl_meta{$tbl}; + my %is_group = map { $_ => 1 } @$group_by; + my @non_grp = grep { !$is_group{$_} } keys %{$meta->{cols}}; + + my %temp_table; + foreach my $row ( @rows ) { + my $group_key + = @$group_by + ? '{' . join('}{', map { defined $_ ? $_ : '' } @{$row}{@$group_by}) . '}' + : ''; + $temp_table{$group_key} ||= []; + push @{$temp_table{$group_key}}, $row; + } + + # Crush the rows together... + my @new_rows; + foreach my $key ( sort keys %temp_table ) { + my $group = $temp_table{$key}; + my %new_row; + @new_row{@$group_by} = @{$group->[0]}{@$group_by}; + foreach my $col ( @non_grp ) { + my $agg = $meta->{cols}->{$col}->{agg} || 'first'; + $new_row{$col} = $agg_funcs{$agg}->( map { $_->{$col} } @$group ); + } + push @new_rows, \%new_row; + } + return @new_rows; +} + +# set_to_tbl {{{3 +# Unifies all the work of filtering, sorting etc. Alters the input. +# TODO: pull all the little pieces out into subroutines and stick events in each of them. +sub set_to_tbl { + my ( $rows, $tbl ) = @_; + my $meta = $tbl_meta{$tbl} or die "No such table $tbl in tbl_meta"; + + # don't show cxn if there's only one connection being displayed + my @visible; + if (scalar @{$modes{$config{mode}->{val}}->{connections}} == 1) { + map { push @visible, $_ if $_ !~ /^cxn$/ } @{$meta->{visible}}; + delete $$rows[0]{cxn} if defined $$rows[0]{cxn}; + } + else { + @visible = @{$meta->{visible}}; + } + + if ( !$meta->{pivot} ) { + + # Hook in event listeners + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_filter}} ) { + $listener->set_to_tbl_pre_filter($rows, $tbl); + } + + # Apply filters. Note that if the table is pivoted, filtering and sorting + # are applied later. + foreach my $filter ( @{$meta->{filters}} ) { + eval { + @$rows = grep { $filters{$filter}->{func}->($_) } @$rows; + }; + if ( $EVAL_ERROR && $config{debug}->{val} ) { + die $EVAL_ERROR; + } + } + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_sort}} ) { + $listener->set_to_tbl_pre_sort($rows, $tbl); + } + + # Sort. Note that if the table is pivoted, sorting might have the wrong + # columns and it could crash. This will only be an issue if it's possible + # to toggle pivoting on and off, which it's not at the moment. + if ( @$rows && $meta->{sort_func} && !$meta->{aggregate} ) { + if ( $meta->{sort_dir} > 0 ) { + @$rows = $meta->{sort_func}->( @$rows ); + } + else { + @$rows = reverse $meta->{sort_func}->( @$rows ); + } + } + + } + + # Stop altering arguments now. + my @rows = @$rows; + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_group}} ) { + $listener->set_to_tbl_pre_group(\@rows, $tbl); + } + + # Apply group-by. + if ( $meta->{aggregate} ) { + @rows = apply_group_by($tbl, $meta->{group_by}, @rows); + + # Sort. Note that if the table is pivoted, sorting might have the wrong + # columns and it could crash. This will only be an issue if it's possible + # to toggle pivoting on and off, which it's not at the moment. + if ( @rows && $meta->{sort_func} ) { + if ( $meta->{sort_dir} > 0 ) { + @rows = $meta->{sort_func}->( @rows ); + } + else { + @rows = reverse $meta->{sort_func}->( @rows ); + } + } + + } + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_colorize}} ) { + $listener->set_to_tbl_pre_colorize(\@rows, $tbl); + } + + if ( !$meta->{pivot} ) { + # Colorize. Adds a _color column to rows. + if ( @rows && $meta->{color_func} ) { + eval { + foreach my $row ( @rows ) { + $row->{_color} = $meta->{color_func}->($row); + } + }; + if ( $EVAL_ERROR ) { + pause($EVAL_ERROR); + } + } + } + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_transform}} ) { + $listener->set_to_tbl_pre_transform(\@rows, $tbl); + } + + # Apply_transformations. + if ( @rows ) { + my $cols = $meta->{cols}; + foreach my $col ( keys %{$rows->[0]} ) { + # Don't auto-vivify $tbl_meta{tbl}-{cols}->{_color}->{trans} + next if $col eq '_color'; + foreach my $trans ( @{$cols->{$col}->{trans}} ) { + map { $_->{$col} = $trans_funcs{$trans}->($_->{$col}) } @rows; + } + } + } + + my ($fmt_cols, $fmt_meta); + + # Pivot. + if ( $meta->{pivot} ) { + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_pivot}} ) { + $listener->set_to_tbl_pre_pivot(\@rows, $tbl); + } + + my @vars = @{$meta->{visible}}; + my @tmp = map { { name => $_ } } @vars; + my @cols = 'name'; + foreach my $i ( 0..@$rows-1 ) { + my $col = "set_$i"; + push @cols, $col; + foreach my $j ( 0..@vars-1 ) { + $tmp[$j]->{$col} = $rows[$i]->{$vars[$j]}; + } + } + $fmt_meta = { map { $_ => { hdr => $_, just => '-' } } @cols }; + $fmt_cols = \@cols; + @rows = @tmp; + + # Hook in event listeners + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_filter}} ) { + $listener->set_to_tbl_pre_filter($rows, $tbl); + } + + # Apply filters. + foreach my $filter ( @{$meta->{filters}} ) { + eval { + @rows = grep { $filters{$filter}->{func}->($_) } @rows; + }; + if ( $EVAL_ERROR && $config{debug}->{val} ) { + die $EVAL_ERROR; + } + } + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_sort}} ) { + $listener->set_to_tbl_pre_sort($rows, $tbl); + } + + # Sort. + if ( @rows && $meta->{sort_func} ) { + if ( $meta->{sort_dir} > 0 ) { + @rows = $meta->{sort_func}->( @rows ); + } + else { + @rows = reverse $meta->{sort_func}->( @rows ); + } + } + + } + else { + # If the table isn't pivoted, just show all columns that are supposed to + # be shown; but eliminate aggonly columns if the table isn't aggregated. + my $aggregated = $meta->{aggregate}; + $fmt_cols = [ grep { $aggregated || !$meta->{cols}->{$_}->{aggonly} } @visible ]; + $fmt_meta = { map { $_ => $meta->{cols}->{$_} } @$fmt_cols }; + + # If the table is aggregated, re-order the group_by columns to the left of + # the display. + if ( $aggregated ) { + my %is_group = map { $_ => 1 } @{$meta->{group_by}}; + $fmt_cols = [ @{$meta->{group_by}}, grep { !$is_group{$_} } @$fmt_cols ]; + } + } + + foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_create}} ) { + $listener->set_to_tbl_pre_create(\@rows, $tbl); + } + + @rows = create_table( $fmt_cols, $fmt_meta, \@rows); + if ( !$meta->{hide_caption} && !$opts{n} && $config{display_table_captions}->{val} ) { + @rows = create_caption($meta->{capt}, @rows) + } + + foreach my $listener ( @{$event_listener_for{set_to_tbl_post_create}} ) { + $listener->set_to_tbl_post_create(\@rows, $tbl); + } + + return @rows; +} + +# meta_to_hdr {{{3 +sub meta_to_hdr { + my $tbl = shift; + my $meta = $tbl_meta{$tbl}; + my %labels = map { $_ => $meta->{cols}->{$_}->{hdr} } @{$meta->{visible}}; + return \%labels; +} + +# commify {{{3 +# From perlfaq5: add commas. +sub commify { + my ( $num ) = @_; + $num = 0 unless defined $num; + $num =~ s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g; + return $num; +} + +# set_precision {{{3 +# Trim to desired precision. +sub set_precision { + my ( $num, $precision ) = @_; + $precision = $config{num_digits}->{val} if !defined $precision; + sprintf("%.${precision}f", $num); +} + +# percent {{{3 +# Convert to percent +sub percent { + my ( $num ) = @_; + $num = 0 unless defined $num; + my $digits = $config{num_digits}->{val}; + return sprintf("%.${digits}f", $num * 100) + . ($config{show_percent}->{val} ? '%' : ''); +} + +# shorten {{{3 +sub shorten { + my ( $num, $opts ) = @_; + + return $num if !defined($num) || $opts{n} || $num !~ m/$num_regex/; + + $opts ||= {}; + my $pad = defined $opts->{pad} ? $opts->{pad} : ''; + my $num_digits = defined $opts->{num_digits} + ? $opts->{num_digits} + : $config{num_digits}->{val}; + my $force = defined $opts->{force}; + + my $n = 0; + while ( $num >= 1_024 ) { + $num /= 1_024; + ++$n; + } + return sprintf( + $num =~ m/\./ || $n || $force + ? "%.${num_digits}f%s" + : '%d', + $num, ($pad,'k','M','G', 'T')[$n]); + +} + +# Utility functions {{{2 +# unique {{{3 +sub unique { + my %seen; + return grep { !$seen{$_}++ } @_; +} + +# make_color_func {{{3 +sub make_color_func { + my ( $tbl ) = @_; + my @criteria; + foreach my $spec ( @{$tbl->{colors}} ) { + next unless exists $comp_ops{$spec->{op}}; + my $val = $spec->{op} =~ m/^(?:eq|ne|le|ge|lt|gt)$/ ? "'$spec->{arg}'" + : $spec->{op} =~ m/^(?:=~|!~)$/ ? "m/" . quotemeta($spec->{arg}) . "/" + : $spec->{arg}; + push @criteria, + "( defined \$set->{$spec->{col}} && \$set->{$spec->{col}} $spec->{op} $val ) { return '$spec->{color}'; }"; + } + return undef unless @criteria; + my $sub = eval 'sub { my ( $set ) = @_; if ' . join(" elsif ", @criteria) . '}'; + die if $EVAL_ERROR; + return $sub; +} + +# make_sort_func {{{3 +# Gets a list of sort columns from the table, like "+cxn -time" and returns a +# subroutine that will sort that way. +sub make_sort_func { + my ( $tbl ) = @_; + my @criteria; + + # Pivoted tables can be sorted by 'name' and set_x columns; others must be + # sorted by existing columns. TODO: this will crash if you toggle between + # pivoted and nonpivoted. I have several other 'crash' notes about this if + # this ever becomes possible. + + if ( $tbl->{pivot} ) { + # Sort type is not really possible on pivoted columns, because a 'column' + # contains data from an entire non-pivoted row, so there could be a mix of + # numeric and non-numeric data. Thus everything has to be 'cmp' type. + foreach my $col ( split(/\s+/, $tbl->{sort_cols} ) ) { + next unless $col; + my ( $dir, $name ) = $col =~ m/([+-])?(\w+)$/; + next unless $name && $name =~ m/^(?:name|set_\d+)$/; + $dir ||= '+'; + my $op = 'cmp'; + my $df = "''"; + push @criteria, + $dir eq '+' + ? "(\$a->{$name} || $df) $op (\$b->{$name} || $df)" + : "(\$b->{$name} || $df) $op (\$a->{$name} || $df)"; + } + } + else { + foreach my $col ( split(/\s+/, $tbl->{sort_cols} ) ) { + next unless $col; + my ( $dir, $name ) = $col =~ m/([+-])?(\w+)$/; + next unless $name && $tbl->{cols}->{$name}; + $dir ||= '+'; + my $op = $tbl->{cols}->{$name}->{num} ? "<=>" : "cmp"; + my $df = $tbl->{cols}->{$name}->{num} ? "0" : "''"; + push @criteria, + $dir eq '+' + ? "(\$a->{$name} || $df) $op (\$b->{$name} || $df)" + : "(\$b->{$name} || $df) $op (\$a->{$name} || $df)"; + } + } + return sub { return @_ } unless @criteria; + my $sub = eval 'sub { sort {' . join("||", @criteria) . '} @_; }'; + die if $EVAL_ERROR; + return $sub; +} + +# trunc {{{3 +# Shortens text to specified length. +sub trunc { + my ( $text, $len ) = @_; + if ( length($text) <= $len ) { + return $text; + } + return substr($text, 0, $len); +} + +# donut {{{3 +# Takes out the middle of text to shorten it. +sub donut { + my ( $text, $len ) = @_; + return $text if length($text) <= $len; + my $max = length($text) - $len; + my $min = $max - 1; + + # Try to remove a single "word" from somewhere in the center + if ( $text =~ s/_[^_]{$min,$max}_/_/ ) { + return $text; + } + + # Prefer removing the end of a "word" + if ( $text =~ s/([^_]+)[^_]{$max}_/$1_/ ) { + return $text; + } + + $text = substr($text, 0, int($len/2)) + . "_" + . substr($text, int($len/2) + $max + 1); + return $text; +} + +# crunch {{{3 +# Removes vowels and compacts repeated letters to shorten text. +sub crunch { + my ( $text, $len ) = @_; + return $text if $len && length($text) <= $len; + $text =~ s/^IB_\w\w_//; + $text =~ s/(?{val}; + if ( $charset && $charset eq 'unicode' ) { + $text =~ s/ + ("(?:(?!(?{val} ) { + unshift @$display_lines, create_statusbar(); + } + + foreach my $listener ( @{$event_listener_for{draw_screen}} ) { + $listener->draw_screen($display_lines); + } + + $clear_screen_sub->() + if $prefs->{clear} || !$modes{$config{mode}->{val}}->{no_clear_screen}; + if ( $opts{n} || $prefs->{raw} ) { + my $num_lines = 0; + print join("\n", + map { + $num_lines++; + ref $_ + ? colored($_->[0], $_->[1]) + : $_; + } + grep { !$opts{n} || $_ } # Suppress empty lines + @$display_lines); + if ( $opts{n} && $num_lines ) { + print "\n"; + } + } + else { + my $max_lines = $prefs->{show_all} + ? scalar(@$display_lines)- 1 + : min(scalar(@$display_lines), $this_term_size[1]); + print join("\n", + map { + ref $_ + ? colored(substr($_->[0], 0, $this_term_size[0]), $_->[1]) + : substr($_, 0, $this_term_size[0]); + } @$display_lines[0..$max_lines - 1]); + } +} + +# secs_to_time {{{3 +sub secs_to_time { + my ( $secs, $fmt ) = @_; + $secs ||= 0; + return '00:00' unless $secs; + + # Decide what format to use, if not given + $fmt ||= $secs >= 86_400 ? 'd' + : $secs >= 3_600 ? 'h' + : 'm'; + + return + $fmt eq 'd' ? sprintf( + "%d+%02d:%02d:%02d", + int($secs / 86_400), + int(($secs % 86_400) / 3_600), + int(($secs % 3_600) / 60), + $secs % 60) + : $fmt eq 'h' ? sprintf( + "%02d:%02d:%02d", + int(($secs % 86_400) / 3_600), + int(($secs % 3_600) / 60), + $secs % 60) + : sprintf( + "%02d:%02d", + int(($secs % 3_600) / 60), + $secs % 60); +} + +# dulint_to_int {{{3 +# Takes a number that InnoDB formats as two ulint integers, like transaction IDs +# and such, and turns it into a single integer +sub dulint_to_int { + my $num = shift; + return 0 unless $num; + my ( $high, $low ) = $num =~ m/^(\d+) (\d+)$/; + return $low unless $high; + return $low + ( $high * $MAX_ULONG ); +} + +# create_statusbar {{{3 +sub create_statusbar { + my $mode = $config{mode}->{val}; + my @cxns = sort { $a cmp $b } get_connections(); + + my $modeline = ( $config{readonly}->{val} ? '[RO] ' : '' ) + . $modes{$mode}->{hdr} . " (? for help)"; + my $mode_width = length($modeline); + my $remaining_width = $this_term_size[0] - $mode_width - 1; + my $result; + + # The thingie in top-right that says what we're monitoring. + my $cxn = ''; + + if ( 1 == @cxns && $dbhs{$cxns[0]} && $dbhs{$cxns[0]}->{dbh} ) { + $cxn = $dbhs{$cxns[0]}->{dbh}->{mysql_serverinfo} || ''; + } + else { + if ( $modes{$mode}->{server_group} ) { + $cxn = "Servers: " . $modes{$mode}->{server_group}; + my $err_count = grep { $dbhs{$_} && $dbhs{$_}->{err_count} } @cxns; + if ( $err_count ) { + $cxn .= "(" . ( scalar(@cxns) - $err_count ) . "/" . scalar(@cxns) . ")"; + } + } + else { + $cxn = join(' ', map { ($dbhs{$_}->{err_count} ? '!' : '') . $_ } + grep { $dbhs{$_} } @cxns); + } + } + + if ( 1 == @cxns ) { + get_driver_status(@cxns); + my $vars = $vars{$cxns[0]}->{$clock}; + my $inc = inc(0, $cxns[0]); + + # Format server uptime human-readably, calculate QPS... + my $uptime = secs_to_time( $vars->{Uptime_hires} ); + my $qps = ($inc->{Questions}||0) / ($inc->{Uptime_hires}||1); + my $ibinfo = ''; + + if ( exists $vars->{IB_last_secs} ) { + $ibinfo .= "InnoDB $vars->{IB_last_secs}s "; + if ( $vars->{IB_got_all} ) { + if ( ($mode eq 'T' || $mode eq 'W') + && $vars->{IB_tx_is_truncated} ) { + $ibinfo .= ':^|'; + } + else { + $ibinfo .= ':-)'; + } + } + else { + $ibinfo .= ':-('; + } + } + $result = sprintf( + "%-${mode_width}s %${remaining_width}s", + $modeline, + join(', ', grep { $_ } ( + $cxns[0], + $uptime, + $ibinfo, + shorten($qps) . " QPS", + ($vars->{Threads} || 0) . "/" . ($vars->{Threads_running} || 0) . "/" . ($vars->{Threads_cached} || 0) . " con/run/cac thds", + $cxn))); + } + else { + $result = sprintf( + "%-${mode_width}s %${remaining_width}s", + $modeline, + $cxn); + } + + return $config{color}->{val} ? [ $result, 'bold reverse' ] : $result; +} + +# Database connections {{{3 +sub add_new_dsn { + my ( $name, $dsn, $dl_table, $have_user, $user, $have_pass, $pass, $savepass ) = @_; + + if ( defined $name ) { + $name =~ s/[\s:;]//g; + } + + if ( !$name ) { + print word_wrap("Choose a name for the connection. It cannot contain " + . "whitespace, colons or semicolons."), "\n\n"; + do { + $name = prompt("Enter a name"); + $name =~ s/[\s:;]//g; + } until ( $name ); + } + + if ( !$dsn ) { + do { + $clear_screen_sub->(); + print "Typical DSN strings look like\n DBI:mysql:;host=hostname;port=port\n" + . "The db and port are optional and can usually be omitted.\n" + . "If you specify 'mysql_read_default_group=mysql' many options can be read\n" + . "from your mysql options files (~/.my.cnf, /etc/my.cnf).\n\n"; + $dsn = prompt("Enter a DSN string", undef, "DBI:mysql:;mysql_read_default_group=mysql;host=$name"); + } until ( $dsn ); + } + if ( !$dl_table ) { + $clear_screen_sub->(); + my $dl_table = prompt("Optional: enter a table (must not exist) to use when resetting InnoDB deadlock information", + undef, 'test.innotop_dl'); + } + + $connections{$name} = { + dsn => $dsn, + dl_table => $dl_table, + have_user => $have_user, + user => $user, + have_pass => $have_pass, + pass => $pass, + savepass => $savepass + }; +} + +sub add_new_server_group { + my ( $name ) = @_; + + if ( defined $name ) { + $name =~ s/[\s:;]//g; + } + + if ( !$name ) { + print word_wrap("Choose a name for the group. It cannot contain " + . "whitespace, colons or semicolons."), "\n\n"; + do { + $name = prompt("Enter a name"); + $name =~ s/[\s:;]//g; + } until ( $name ); + } + + my @cxns; + do { + $clear_screen_sub->(); + @cxns = select_cxn("Choose servers for $name", keys %connections); + } until ( @cxns ); + + $server_groups{$name} = \@cxns; + return $name; +} + +sub get_var_set { + my ( $name ) = @_; + while ( !$name || !exists($var_sets{$config{$name}->{val}}) ) { + $name = choose_var_set($name); + } + return $var_sets{$config{$name}->{val}}->{text}; +} + +sub add_new_var_set { + my ( $name ) = @_; + + if ( defined $name ) { + $name =~ s/\W//g; + } + + if ( !$name ) { + do { + $name = prompt("Enter a name"); + $name =~ s/\W//g; + } until ( $name ); + } + + my $variables; + do { + $clear_screen_sub->(); + $variables = prompt("Enter variables for $name", undef ); + } until ( $variables ); + + $var_sets{$name} = { text => $variables, user => 1 }; +} + +sub next_server { + my $mode = $config{mode}->{val}; + my @cxns = sort keys %connections; + my ($cur) = get_connections($mode); + $cur ||= $cxns[0]; + my $pos = grep { $_ lt $cur } @cxns; + my $newpos = ($pos + 1) % @cxns; + $modes{$mode}->{server_group} = ''; + $modes{$mode}->{connections} = [ $cxns[$newpos] ]; + $clear_screen_sub->(); +} + +sub next_server_group { + my $mode = shift || $config{mode}->{val}; + my @grps = sort keys %server_groups; + my $curr = $modes{$mode}->{server_group}; + + return unless @grps; + + if ( $curr ) { + # Find the current group's position. + my $pos = 0; + while ( $curr ne $grps[$pos] ) { + $pos++; + } + $modes{$mode}->{server_group} = $grps[ ($pos + 1) % @grps ]; + } + else { + $modes{$mode}->{server_group} = $grps[0]; + } +} + +# Get a list of connection names used in this mode. +sub get_connections { + if ( $file ) { + return qw(file); + } + my $mode = shift || $config{mode}->{val}; + my @connections = $modes{$mode}->{server_group} + ? @{$server_groups{$modes{$mode}->{server_group}}} + : @{$modes{$mode}->{connections}}; + if ( $modes{$mode}->{one_connection} ) { + @connections = @connections ? $connections[0] : (); + } + return unique(@connections); +} + +# Get a list of tables used in this mode. If innotop is running non-interactively, just use the first. +sub get_visible_tables { + my $mode = shift || $config{mode}->{val}; + my @tbls = @{$modes{$mode}->{visible_tables}}; + if ( $opts{n} ) { + return $tbls[0]; + } + else { + return @tbls; + } +} + +# Choose from among available connections or server groups. +# If the mode has a server set in use, prefers that instead. +sub choose_connections { + $clear_screen_sub->(); + my $mode = $config{mode}->{val}; + my $meta = { map { $_ => $connections{$_}->{dsn} } keys %connections }; + foreach my $group ( keys %server_groups ) { + $meta->{"#$group"} = join(' ', @{$server_groups{$group}}); + } + + my $choices = prompt_list("Choose connections or a group for $mode mode", + undef, sub { return keys %$meta }, $meta); + + my @choices = unique(grep { $_ } split(/\s+/, $choices)); + if ( @choices ) { + if ( $choices[0] =~ s/^#// && exists $server_groups{$choices[0]} ) { + $modes{$mode}->{server_group} = $choices[0]; + } + else { + $modes{$mode}->{connections} = [ grep { exists $connections{$_} } @choices ]; + } + } +} + +# Accepts a DB connection name and the name of a prepared query (e.g. status, kill). +# Also a list of params for the prepared query. This allows not storing prepared +# statements globally. Returns a $sth that's been executed. +# ERROR-HANDLING SEMANTICS: if the statement throws an error, propagate, but if the +# connection has gone away or can't connect, DO NOT. Just return undef. +sub do_stmt { + my ( $cxn, $stmt_name, @args ) = @_; + + return undef if $file; + + # Test if the cxn should not even be tried + return undef if $dbhs{$cxn} + && $dbhs{$cxn}->{err_count} + && ( !$dbhs{$cxn}->{dbh} || !$dbhs{$cxn}->{dbh}->{Active} || $dbhs{$cxn}->{mode} eq $config{mode}->{val} ) + && $dbhs{$cxn}->{wake_up} > $clock; + + my $sth; + my $retries = 1; + my $success = 0; + TRY: + while ( $retries-- >= 0 && !$success ) { + + eval { + my $dbh = connect_to_db($cxn); + + # If the prepared query doesn't exist, make it. + if ( !exists $dbhs{$cxn}->{stmts}->{$stmt_name} ) { + $dbhs{$cxn}->{stmts}->{$stmt_name} = $stmt_maker_for{$stmt_name}->($dbh); + } + + $sth = $dbhs{$cxn}->{stmts}->{$stmt_name}; + if ( $sth ) { + $sth->execute(@args); + } + $success = 1; + }; + if ( $EVAL_ERROR ) { + if ( $EVAL_ERROR =~ m/$nonfatal_errs/ ) { + handle_cxn_error($cxn, $EVAL_ERROR); + } + else { + die "$cxn $stmt_name: $EVAL_ERROR"; + } + if ( $retries < 0 ) { + $sth = undef; + } + } + } + + if ( $sth && $sth->{NUM_OF_FIELDS} ) { + sleep($stmt_sleep_time_for{$stmt_name}) if $stmt_sleep_time_for{$stmt_name}; + return $sth; + } +} + +# Keeps track of error count, sleep times till retries, etc etc. +# When there's an error we retry the connection every so often, increasing in +# Fibonacci series to prevent too much banging on the server. +sub handle_cxn_error { + my ( $cxn, $err ) = @_; + my $meta = $dbhs{$cxn}; + $meta->{err_count}++; + + # This is used so errors that have to do with permissions needed by the current + # mode will get displayed as long as we're in this mode, but get ignored if the + # mode changes. + $meta->{mode} = $config{mode}->{val}; + + # Strip garbage from the error text if possible. + $err =~ s/\s+/ /g; + if ( $err =~ m/failed: (.*?) at \S*innotop line/ ) { + $err = $1; + } + + $meta->{last_err} = $err; + my $sleep_time = $meta->{this_sleep} + $meta->{prev_sleep}; + $meta->{prev_sleep} = $meta->{this_sleep}; + $meta->{this_sleep} = $sleep_time; + $meta->{wake_up} = $clock + $sleep_time; + if ( $config{show_cxn_errors}->{val} ) { + print STDERR "Error at tick $clock $cxn $err" if $config{debug}->{val}; + } +} + +# Accepts a DB connection name and a (string) query. Returns a $sth that's been +# executed. +sub do_query { + my ( $cxn, $query ) = @_; + + return undef if $file; + + # Test if the cxn should not even be tried + return undef if $dbhs{$cxn} + && $dbhs{$cxn}->{err_count} + && ( !$dbhs{$cxn}->{dbh} || !$dbhs{$cxn}->{dbh}->{Active} || $dbhs{$cxn}->{mode} eq $config{mode}->{val} ) + && $dbhs{$cxn}->{wake_up} > $clock; + + my $sth; + my $retries = 1; + my $success = 0; + TRY: + while ( $retries-- >= 0 && !$success ) { + + eval { + my $dbh = connect_to_db($cxn); + + $sth = $dbh->prepare($query); + $sth->execute(); + $success = 1; + }; + if ( $EVAL_ERROR ) { + if ( $EVAL_ERROR =~ m/$nonfatal_errs/ ) { + handle_cxn_error($cxn, $EVAL_ERROR); + } + else { + die $EVAL_ERROR; + } + if ( $retries < 0 ) { + $sth = undef; + } + } + } + + return $sth; +} + +sub get_uptime { + my ( $cxn ) = @_; + $dbhs{$cxn}->{start_time} ||= time(); + # Avoid dividing by zero + return (time() - $dbhs{$cxn}->{start_time}) || .001; +} + +sub connect_to_db { + my ( $cxn ) = @_; + + $dbhs{$cxn} ||= { + stmts => {}, # bucket for prepared statements. + prev_sleep => 0, + this_sleep => 1, + wake_up => 0, + start_time => 0, + dbh => undef, + }; + my $href = $dbhs{$cxn}; + + if ( !$href->{dbh} || ref($href->{dbh}) !~ m/DBI/ || !$href->{dbh}->ping ) { + my $dbh = get_new_db_connection($cxn); + @{$href}{qw(dbh err_count wake_up this_sleep start_time prev_sleep)} + = ($dbh, 0, 0, 1, 0, 0); + + # Derive and store the server's start time in hi-res + my $uptime = $dbh->selectrow_hashref("show status like 'Uptime'")->{value}; + $href->{start_time} = time() - $uptime; + + # Set timeouts so an unused connection stays alive. + # For example, a connection might be used in Q mode but idle in T mode. + if ( version_ge($dbh, '4.0.3')) { + my $timeout = $config{cxn_timeout}->{val}; + $dbh->do("set session wait_timeout=$timeout, interactive_timeout=$timeout"); + } + } + return $href->{dbh}; +} + +# Compares versions like 5.0.27 and 4.1.15-standard-log +sub version_ge { + my ( $dbh, $target ) = @_; + my $version = sprintf('%03d%03d%03d', $dbh->{mysql_serverinfo} =~ m/(\d+)/g); + return $version ge sprintf('%03d%03d%03d', $target =~ m/(\d+)/g); +} + +# Extracts status values that can be gleaned from the DBD driver without doing a whole query. +sub get_driver_status { + my @cxns = @_; + if ( !$info_gotten{driver_status}++ ) { + foreach my $cxn ( @cxns ) { + next unless $dbhs{$cxn} && $dbhs{$cxn}->{dbh} && $dbhs{$cxn}->{dbh}->{Active}; + $vars{$cxn}->{$clock} ||= {}; + my $vars = $vars{$cxn}->{$clock}; + my %res = map { $_ =~ s/ +/_/g; $_ } $dbhs{$cxn}->{dbh}->{mysql_stat} =~ m/(\w[^:]+): ([\d\.]+)/g; + map { $vars->{$_} ||= $res{$_} } keys %res; + $vars->{Uptime_hires} ||= get_uptime($cxn); + $vars->{cxn} = $cxn; + } + } +} + +sub get_new_db_connection { + my ( $connection, $destroy ) = @_; + if ( $file ) { + die "You can't connect to a MySQL server while monitoring a file. This is probably a bug."; + } + + my $dsn = $connections{$connection} + or die "No connection named '$connection' is defined in your configuration"; + + # don't ask for a username if mysql_read_default_group=client is in the DSN + if ( !defined $dsn->{have_user} and $dsn->{dsn} !~ /mysql_read_default_group=client/ ) { + my $answer = prompt("Do you want to specify a username for $connection?", undef, 'n'); + $dsn->{have_user} = $answer && $answer =~ m/1|y/i; + } + + # don't ask for a password if mysql_read_default_group=client is in the DSN + if ( !defined $dsn->{have_pass} and $dsn->{dsn} !~ /mysql_read_default_group=client/ ) { + my $answer = prompt("Do you want to specify a password for $connection?", undef, 'n'); + $dsn->{have_pass} = $answer && $answer =~ m/1|y/i; + } + + if ( !$dsn->{user} && $dsn->{have_user} ) { + my $user = $ENV{USERNAME} || $ENV{USER} || getlogin() || getpwuid($REAL_USER_ID) || undef; + $dsn->{user} = prompt("Enter username for $connection", undef, $user); + } + + if ( !defined $dsn->{user} ) { + $dsn->{user} = ''; + } + + if ( !$dsn->{pass} && !$dsn->{savepass} && $dsn->{have_pass} ) { + $dsn->{pass} = prompt_noecho("Enter password for '$dsn->{user}' on $connection"); + print "\n"; + if ( !defined($dsn->{savepass}) ) { + my $answer = prompt("Save password in plain text in the config file?", undef, 'y'); + $dsn->{savepass} = $answer && $answer =~ m/1|y/i; + } + } + + my $dbh = DBI->connect( + $dsn->{dsn}, $dsn->{user}, $dsn->{pass}, + { RaiseError => 1, PrintError => 0, AutoCommit => 1 }); + $dbh->{InactiveDestroy} = 1 unless $destroy; # Can't be set in $db_options + $dbh->{FetchHashKeyName} = 'NAME_lc'; # Lowercases all column names for fetchrow_hashref + return $dbh; +} + +sub get_cxn_errors { + my @cxns = @_; + return () unless $config{show_cxn_errors_in_tbl}->{val}; + return + map { [ $_ . ': ' . $dbhs{$_}->{last_err}, 'red' ] } + grep { $dbhs{$_} && $dbhs{$_}->{err_count} && $dbhs{$_}->{mode} eq $config{mode}->{val} } + @cxns; +} + +# Setup and tear-down functions {{{2 + +# Takes a string and turns it into a hashref you can apply to %tbl_meta tables. The string +# can be in the form 'foo, bar, foo/bar, foo as bar' much like a SQL SELECT statement. +sub compile_select_stmt { + my ($str) = @_; + my @exps = $str =~ m/\s*([^,]+(?i:\s+as\s+[^,\s]+)?)\s*(?=,|$)/g; + my %cols; + my @visible; + foreach my $exp ( @exps ) { + my ( $text, $colname ); + if ( $exp =~ m/as\s+(\w+)\s*/ ) { + $colname = $1; + $exp =~ s/as\s+(\w+)\s*//; + $text = $exp; + } + else { + $text = $colname = $exp; + } + my ($func, $err) = compile_expr($text); + $cols{$colname} = { + src => $text, + hdr => $colname, + num => 0, + func => $func, + }; + push @visible, $colname; + } + return (\%cols, \@visible); +} + +# compile_filter {{{3 +sub compile_filter { + my ( $text ) = @_; + my ( $sub, $err ); + eval "\$sub = sub { my \$set = shift; $text }"; + if ( $EVAL_ERROR ) { + $EVAL_ERROR =~ s/at \(eval.*$//; + $sub = sub { return $EVAL_ERROR }; + $err = $EVAL_ERROR; + } + return ( $sub, $err ); +} + +# compile_expr {{{3 +sub compile_expr { + my ( $expr ) = @_; + # Leave built-in functions alone so they get called as Perl functions, unless + # they are the only word in $expr, in which case treat them as hash keys. + if ( $expr =~ m/\W/ ) { + $expr =~ s/(?{$1}"/eg; + } + else { + $expr = "\$set->{$expr}"; + } + my ( $sub, $err ); + my $quoted = quotemeta($expr); + eval qq{ + \$sub = sub { + my (\$set, \$cur, \$pre) = \@_; + my \$val = eval { $expr }; + if ( \$EVAL_ERROR && \$config{debug}->{val} ) { + \$EVAL_ERROR =~ s/ at \\(eval.*//s; + die "\$EVAL_ERROR in expression $quoted"; + } + return \$val; + } + }; + if ( $EVAL_ERROR ) { + if ( $config{debug}->{val} ) { + die $EVAL_ERROR; + } + $EVAL_ERROR =~ s/ at \(eval.*$//; + $sub = sub { return $EVAL_ERROR }; + $err = $EVAL_ERROR; + } + return ( $sub, $err ); +} + +# finish {{{3 +# This is a subroutine because it's called from a key to quit the program. +sub finish { + save_config(); + ReadMode('normal') unless $opts{n}; + print "\n"; + exit(0); +} + +# core_dump {{{3 +sub core_dump { + my $msg = shift; + if ($config{debugfile}->{val} && $config{debug}->{val}) { + eval { + open my $file, '>>', $config{debugfile}->{val}; + if ( %vars ) { + print $file "Current variables:\n" . Dumper(\%vars); + } + close $file; + }; + } + print $msg; +} + +# migrate_config {{{3 +sub migrate_config { + + my ($old_filename, $new_filename) = @_; + + # don't proceed if old file doesn't exist + if ( ! -f $old_filename ) { + die "Error migrating '$old_filename': file doesn't exist.\n"; + } + # don't migrate files if new file exists + elsif ( -f $new_filename ) { + die "Error migrating '$old_filename' to '$new_filename': new file already exists.\n"; + } + # if migrating from one file to another in the same directory, just rename them + if (dirname($old_filename) eq dirname($new_filename)) { + rename($old_filename, $new_filename) + or die "Can't rename '$old_filename' to '$new_filename': $OS_ERROR"; + } + # otherwise, move the existing conf file to a temp file, make the necessary directory structure, + # and move the temp conf file to its new home + else { + my $tmp = File::Temp->new( TEMPLATE => 'innotopXXXXX', DIR => $homepath, SUFFIX => '.conf'); + my $tmp_filename = $tmp->filename; + my $dirname = dirname($new_filename); + rename($old_filename, $tmp_filename) + or die "Can't rename '$old_filename' to '$tmp_filename': $OS_ERROR"; + mkdir($dirname) or die "Can't create directory '$dirname': $OS_ERROR"; + mkdir("$dirname/plugins") or die "Can't create directory '$dirname/plugins': $OS_ERROR"; + rename($tmp_filename, $new_filename) + or die "Can't rename '$tmp_filename' to '$new_filename': $OS_ERROR"; + } +} + +# load_config {{{3 +sub load_config { + + my ($old_filename, $answer); + + if ( $opts{u} or $opts{p} or $opts{h} or $opts{P} ) { + my @params = $dsn_parser->get_cxn_params(\%opts); # dsn=$params[0] + add_new_dsn($opts{h} || 'localhost', $params[0], 'test.innotop_dl', + $opts{u} ? 1 : 0, $opts{u}, $opts{p} ? 1 : 0, $opts{p}); + } + if ($opts{c}) { + $conf_file = $opts{c}; + } + # innotop got upgraded and this is an old config file. + elsif ( -f "$homepath/.innotop" or -f "$homepath/.innotop/innotop.ini" ) { + $conf_file = $default_home_conf; + if ( -f "$homepath/.innotop") { + $old_filename = "$homepath/.innotop"; + } + elsif ( -f "$homepath/.innotop/innotop.ini" ) { + $old_filename = "$homepath/.innotop/innotop.ini"; + } + $answer = pause("Innotop's default config location has moved to '$conf_file'. Move old config file '$old_filename' there now? y/n"); + if ( lc $answer eq 'y' ) { + migrate_config($old_filename, $conf_file); + } + else { + print "\nInnotop will now exit so you can fix the config file.\n"; + exit(0); + } + } + elsif ( -f $default_home_conf ) { + $conf_file = $default_home_conf; + } + elsif ( -f $default_central_conf and not $opts{s} ) { + $conf_file = $default_central_conf; + } + else { + # If no config file was loaded, set readonly to 0 if the user wants to + # write a config + $config{readonly}->{val} = 0 if $opts{w}; + # If no connections have been defined, connect to a MySQL database + # on localhost using mysql_read_default_group=client + if (!%connections) { + add_new_dsn('localhost', + 'DBI:mysql:;host=localhost;mysql_read_default_group=client', + 'test.innotop_dl'); + } + } + + if ( -f "$conf_file" ) { + open my $file, "<", $conf_file or die("Can't open '$conf_file': $OS_ERROR"); + + # Check config file version. Just ignore if either innotop or the file has + # garbage in the version number. + if ( defined(my $line = <$file>) && $VERSION =~ m/\d/ ) { + chomp $line; + if ( my ($maj, $min, $rev) = $line =~ m/^version=(\d+)\.(\d+)(?:\.(\d+))?$/ ) { + $rev ||= 0; + my $cfg_ver = sprintf('%03d-%03d-%03d', $maj, $min, $rev); + ( $maj, $min, $rev ) = $VERSION =~ m/^(\d+)\.(\d+)(?:\.(\d+))?$/; + $rev ||= 0; + my $innotop_ver = sprintf('%03d-%03d-%03d', $maj, $min, $rev); + + if ( $cfg_ver gt $innotop_ver ) { + pause("The config file is for a newer version of innotop and may not be read correctly."); + } + else { + my @ver_history = @config_versions; + while ( my ($start, $end) = splice(@ver_history, 0, 2) ) { + # If the config file is between the endpoints and innotop is greater than + # the endpoint, innotop has a newer config file format than the file. + if ( $cfg_ver ge $start && $cfg_ver lt $end && $innotop_ver ge $end ) { + my $msg = "innotop's config file format has changed. Overwrite $conf_file? y or n"; + if ( pause($msg) eq 'n' ) { + $config{readonly}->{val} = 1; + print "\ninnotop will not save any configuration changes you make."; + pause(); + print "\n"; + } + close $file; + return; + } + } + } + } + } + + while ( my $line = <$file> ) { + chomp $line; + next unless $line =~ m/^\[([a-z_]+)\]$/; + if ( exists $config_file_sections{$1} ) { + $config_file_sections{$1}->{reader}->($file); + } + else { + warn "Unknown config file section '$1'"; + } + } + close $file or die("Can't close $conf_file: $OS_ERROR"); + } + +} + +# Do some post-processing on %tbl_meta: compile src properties into func etc. +sub post_process_tbl_meta { + foreach my $table ( values %tbl_meta ) { + foreach my $col_name ( keys %{$table->{cols}} ) { + my $col_def = $table->{cols}->{$col_name}; + my ( $sub, $err ) = compile_expr($col_def->{src}); + $col_def->{func} = $sub; + } + } +} + +# load_config_plugins {{{3 +sub load_config_plugins { + my ( $file ) = @_; + + # First, find a list of all plugins that exist on disk, and get information about them. + my $dir = $config{plugin_dir}->{val}; + foreach my $p_file ( <$dir/*.pm> ) { + my ($package, $desc); + eval { + open my $p_in, "<", $p_file or die $OS_ERROR; + while ( my $line = <$p_in> ) { + chomp $line; + if ( $line =~ m/^package\s+(.*?);/ ) { + $package = $1; + } + elsif ( $line =~ m/^# description: (.*)/ ) { + $desc = $1; + } + last if $package && $desc; + } + close $p_in; + }; + if ( $package ) { + $plugins{$package} = { + file => $p_file, + desc => $desc, + class => $package, + active => 0, + }; + if ( $config{debug}->{val} && $EVAL_ERROR ) { + die $EVAL_ERROR; + } + } + } + + # Now read which ones the user has activated. Each line simply represents an active plugin. + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + next unless $line && $plugins{$line}; + + my $obj; + eval { + require $plugins{$line}->{file}; + $obj = $line->new(%pluggable_vars); + foreach my $event ( $obj->register_for_events() ) { + my $queue = $event_listener_for{$event}; + if ( $queue ) { + push @$queue, $obj; + } + } + }; + if ( $config{debug}->{val} && $EVAL_ERROR ) { + die $EVAL_ERROR; + } + if ( $obj ) { + $plugins{$line}->{active} = 1; + $plugins{$line}->{object} = $obj; + } + } +} + +# save_config_plugins {{{3 +sub save_config_plugins { + my $file = shift; + foreach my $class ( sort keys %plugins ) { + next unless $plugins{$class}->{active}; + print $file "$class\n"; + } +} + +# load_config_active_server_groups {{{3 +sub load_config_active_server_groups { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $mode, $group ) = $line =~ m/^(.*?)=(.*)$/; + next unless $mode && $group + && exists $modes{$mode} && exists $server_groups{$group}; + $modes{$mode}->{server_group} = $group; + } +} + +# save_config_active_server_groups {{{3 +sub save_config_active_server_groups { + my $file = shift; + foreach my $mode ( sort keys %modes ) { + print $file "$mode=$modes{$mode}->{server_group}\n"; + } +} + +# load_config_server_groups {{{3 +sub load_config_server_groups { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $name, $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $name && $rest; + my @vars = unique(grep { $_ && exists $connections{$_} } split(/\s+/, $rest)); + next unless @vars; + $server_groups{$name} = \@vars; + } +} + +# save_config_server_groups {{{3 +sub save_config_server_groups { + my $file = shift; + foreach my $set ( sort keys %server_groups ) { + print $file "$set=", join(' ', @{$server_groups{$set}}), "\n"; + } +} + +# load_config_varsets {{{3 +sub load_config_varsets { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $name, $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $name && $rest; + $var_sets{$name} = { + text => $rest, + user => 1, + }; + } +} + +# save_config_varsets {{{3 +sub save_config_varsets { + my $file = shift; + foreach my $varset ( sort keys %var_sets ) { + next unless $var_sets{$varset}->{user}; + print $file "$varset=$var_sets{$varset}->{text}\n"; + } +} + +# load_config_group_by {{{3 +sub load_config_group_by { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $tbl , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $tbl && exists $tbl_meta{$tbl}; + my @parts = unique(grep { exists($tbl_meta{$tbl}->{cols}->{$_}) } split(/\s+/, $rest)); + $tbl_meta{$tbl}->{group_by} = [ @parts ]; + $tbl_meta{$tbl}->{cust}->{group_by} = 1; + } +} + +# save_config_group_by {{{3 +sub save_config_group_by { + my $file = shift; + foreach my $tbl ( sort keys %tbl_meta ) { + next if $tbl_meta{$tbl}->{temp}; + next unless $tbl_meta{$tbl}->{cust}->{group_by}; + my $aref = $tbl_meta{$tbl}->{group_by}; + print $file "$tbl=", join(' ', @$aref), "\n"; + } +} + +# load_config_filters {{{3 +sub load_config_filters { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key, $rest ) = $line =~ m/^(.+?)=(.*)$/; + next unless $key && $rest; + + my %parts = $rest =~ m/(\w+)='((?:(?!(? $sub, + text => $parts{text}, + user => 1, + name => $key, + note => 'User-defined filter', + tbls => \@tbls, + } + } +} + +# save_config_filters {{{3 +sub save_config_filters { + my $file = shift; + foreach my $key ( sort keys %filters ) { + next if !$filters{$key}->{user} || $filters{$key}->{quick}; + my $text = $filters{$key}->{text}; + $text =~ s/([\\'])/\\$1/g; + my $tbls = join(" ", @{$filters{$key}->{tbls}}); + print $file "$key=text='$text' tbls='$tbls'\n"; + } +} + +# load_config_visible_tables {{{3 +sub load_config_visible_tables { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $mode, $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $mode && exists $modes{$mode}; + $modes{$mode}->{visible_tables} = + [ unique(grep { $_ && exists $tbl_meta{$_} } split(/\s+/, $rest)) ]; + $modes{$mode}->{cust}->{visible_tables} = 1; + } +} + +# save_config_visible_tables {{{3 +sub save_config_visible_tables { + my $file = shift; + foreach my $mode ( sort keys %modes ) { + next unless $modes{$mode}->{cust}->{visible_tables}; + my $tables = $modes{$mode}->{visible_tables}; + print $file "$mode=", join(' ', @$tables), "\n"; + } +} + +# load_config_sort_cols {{{3 +sub load_config_sort_cols { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $key && exists $tbl_meta{$key}; + $tbl_meta{$key}->{sort_cols} = $rest; + $tbl_meta{$key}->{cust}->{sort_cols} = 1; + $tbl_meta{$key}->{sort_func} = make_sort_func($tbl_meta{$key}); + } +} + +# save_config_sort_cols {{{3 +sub save_config_sort_cols { + my $file = shift; + foreach my $tbl ( sort keys %tbl_meta ) { + next unless $tbl_meta{$tbl}->{cust}->{sort_cols}; + my $col = $tbl_meta{$tbl}->{sort_cols}; + print $file "$tbl=$col\n"; + } +} + +# load_config_active_filters {{{3 +sub load_config_active_filters { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $tbl , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $tbl && exists $tbl_meta{$tbl}; + my @parts = unique(grep { exists($filters{$_}) } split(/\s+/, $rest)); + @parts = grep { grep { $tbl eq $_ } @{$filters{$_}->{tbls}} } @parts; + $tbl_meta{$tbl}->{filters} = [ @parts ]; + $tbl_meta{$tbl}->{cust}->{filters} = 1; + } +} + +# save_config_active_filters {{{3 +sub save_config_active_filters { + my $file = shift; + foreach my $tbl ( sort keys %tbl_meta ) { + next if $tbl_meta{$tbl}->{temp}; + next unless $tbl_meta{$tbl}->{cust}->{filters}; + my $aref = $tbl_meta{$tbl}->{filters}; + print $file "$tbl=", join(' ', @$aref), "\n"; + } +} + +# load_config_active_columns {{{3 +sub load_config_active_columns { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $key && exists $tbl_meta{$key}; + my @parts = grep { exists($tbl_meta{$key}->{cols}->{$_}) } unique split(/ /, $rest); + $tbl_meta{$key}->{visible} = [ @parts ]; + $tbl_meta{$key}->{cust}->{visible} = 1; + } +} + +# save_config_active_columns {{{3 +sub save_config_active_columns { + my $file = shift; + foreach my $tbl ( sort keys %tbl_meta ) { + next unless $tbl_meta{$tbl}->{cust}->{visible}; + my $aref = $tbl_meta{$tbl}->{visible}; + print $file "$tbl=", join(' ', @$aref), "\n"; + } +} + +# save_config_tbl_meta {{{3 +sub save_config_tbl_meta { + my $file = shift; + foreach my $tbl ( sort keys %tbl_meta ) { + foreach my $col ( keys %{$tbl_meta{$tbl}->{cols}} ) { + my $meta = $tbl_meta{$tbl}->{cols}->{$col}; + next unless $meta->{user}; + print $file "$col=", join( + " ", + map { + # Some properties (trans) are arrays, others scalars + my $val = ref($meta->{$_}) ? join(',', @{$meta->{$_}}) : $meta->{$_}; + $val =~ s/([\\'])/\\$1/g; # Escape backslashes and single quotes + "$_='$val'"; # Enclose in single quotes + } + grep { $_ ne 'func' } + keys %$meta + ), "\n"; + } + } +} + +# save_config_config {{{3 +sub save_config_config { + my $file = shift; + foreach my $key ( sort keys %config ) { + eval { + if ( $key ne 'password' || $config{savepass}->{val} ) { + print $file "# $config{$key}->{note}\n" + or die "Cannot print to file: $OS_ERROR"; + my $val = $config{$key}->{val}; + $val = '' unless defined($val); + if ( ref( $val ) eq 'ARRAY' ) { + print $file "$key=" + . join( " ", @$val ) . "\n" + or die "Cannot print to file: $OS_ERROR"; + } + elsif ( ref( $val ) eq 'HASH' ) { + print $file "$key=" + . join( " ", + map { "$_:$val->{$_}" } keys %$val + ) . "\n"; + } + else { + print $file "$key=$val\n"; + } + } + }; + if ( $EVAL_ERROR ) { print "$EVAL_ERROR in $key"; }; + } + +} + +# load_config_config {{{3 +sub load_config_config { + my ( $file ) = @_; + + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $name, $val ) = $line =~ m/^(.+?)=(.*)$/; + next unless defined $name && defined $val; + + # Validate the incoming values... + if ( $name && exists( $config{$name} ) ) { + if ( !$config{$name}->{pat} || $val =~ m/$config{$name}->{pat}/ ) { + $config{$name}->{val} = $val; + $config{$name}->{read} = 1; + } + } + } +} + +# load_config_tbl_meta {{{3 +sub load_config_tbl_meta { + my ( $file ) = @_; + + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + # Each tbl_meta section has all the properties defined in %col_props. + my ( $col , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $col; + my %parts = $rest =~ m/(\w+)='((?:(?!(?{cols}->{$col} ||= {}; + + foreach my $prop ( keys %col_props ) { + if ( !defined($parts{$prop}) ) { + die "Undefined property $prop for column $col in table $tbl"; + } + + # Un-escape escaping + $parts{$prop} =~ s/\\\\/\\/g; + $parts{$prop} =~ s/\\'/'/g; + + if ( ref $col_props{$prop} ) { + if ( $prop eq 'trans' ) { + $meta->{cols}->{$col}->{trans} + = [ unique(grep { exists $trans_funcs{$_} } split(',', $parts{$prop})) ]; + } + else { + $meta->{cols}->{$col}->{$prop} = [ split(',', $parts{$prop}) ]; + } + } + else { + $meta->{cols}->{$col}->{$prop} = $parts{$prop}; + } + } + + } +} + +# save_config {{{3 +sub save_config { + print "\n"; + return if $config{readonly}->{val}; + # return if no config file was loaded and -w wasn't specified + if (not $conf_file) { + if (not $opts{w}) { + return; + } + else { + # if no config was loaded but -w was specified, + # write to $default_home_conf + $conf_file = $default_home_conf; + } + } + elsif ($conf_file and $opts{w}) { + print "Loaded config file on start-up, so ignoring -w (see --help)\n" + } + + my $dirname = dirname($conf_file); + + # if directories don't exist, create them. This could cause errors + # or warnings if a central config doesn't have readonly=1, but being + # flexible requires giving the user enough rope to hang themselves with. + if ( ! -d $dirname ) { + mkdir $dirname + or die "Can't create directory '$dirname': $OS_ERROR"; + } + if ( ! -d "$dirname/plugins" ) { + mkdir "$dirname/plugins" + or warn "Can't create directory '$dirname/plugins': $OS_ERROR\n"; + } + + # Save to a temp file first, so a crash doesn't destroy the main config file + my $tmpfile = File::Temp->new( TEMPLATE => 'innotopXXXXX', DIR => $dirname, SUFFIX => '.conf.tmp'); + open my $file, "+>", $tmpfile + or die("Can't write to $tmpfile: $OS_ERROR"); + print $file "version=$VERSION\n"; + + foreach my $section ( @ordered_config_file_sections ) { + die "No such config file section $section" unless $config_file_sections{$section}; + print $file "\n[$section]\n\n"; + $config_file_sections{$section}->{writer}->($file); + print $file "\n[/$section]\n"; + } + + # Now clobber the main config file with the temp. + close $file or die("Can't close $tmpfile: $OS_ERROR"); + rename($tmpfile, $conf_file) or die("Can't rename $tmpfile to $conf_file: $OS_ERROR"); +} + +# load_config_connections {{{3 +sub load_config_connections { + return if $opts{u} or $opts{p} or $opts{h} or $opts{P}; # don't load connections if DSN or user/pass options used + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $key; + my %parts = $rest =~ m/(\S+?)=(\S*)/g; + my %conn = map { $_ => $parts{$_} || '' } @conn_parts; + $connections{$key} = \%conn; + } +} + +# save_config_connections {{{3 +sub save_config_connections { + my $file = shift; + foreach my $conn ( sort keys %connections ) { + my $href = $connections{$conn}; + my @keys = $href->{savepass} ? @conn_parts : grep { $_ ne 'pass' } @conn_parts; + print $file "$conn=", join(' ', map { "$_=$href->{$_}" } grep { defined $href->{$_} } @keys), "\n"; + } +} + +sub load_config_colors { + my ( $file ) = @_; + my %rule_set_for; + + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $tbl, $rule ) = $line =~ m/^(.*?)=(.*)$/; + next unless $tbl && $rule; + next unless exists $tbl_meta{$tbl}; + my %parts = $rule =~ m/(\w+)='((?:(?!(?{cols}->{$parts{col}}; + next unless $parts{op} && exists $comp_ops{$parts{op}}; + next unless defined $parts{arg}; + next unless defined $parts{color}; + my @colors = unique(grep { exists $ansicolors{$_} } split(/\W+/, $parts{color})); + next unless @colors; + + # Finally! Enough validation... + $rule_set_for{$tbl} ||= []; + push @{$rule_set_for{$tbl}}, \%parts; + } + + foreach my $tbl ( keys %rule_set_for ) { + $tbl_meta{$tbl}->{colors} = $rule_set_for{$tbl}; + $tbl_meta{$tbl}->{color_func} = make_color_func($tbl_meta{$tbl}); + $tbl_meta{$tbl}->{cust}->{colors} = 1; + } +} + +# save_config_colors {{{3 +sub save_config_colors { + my $file = shift; + foreach my $tbl ( sort keys %tbl_meta ) { + my $meta = $tbl_meta{$tbl}; + next unless $meta->{cust}->{colors}; + foreach my $rule ( @{$meta->{colors}} ) { + print $file "$tbl=", join( + ' ', + map { + my $val = $rule->{$_}; + $val =~ s/([\\'])/\\$1/g; # Escape backslashes and single quotes + "$_='$val'"; # Enclose in single quotes + } + qw(col op arg color) + ), "\n"; + } + } +} + +# load_config_active_connections {{{3 +sub load_config_active_connections { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/; + next unless $key && exists $modes{$key}; + my @parts = grep { exists $connections{$_} } split(/ /, $rest); + $modes{$key}->{connections} = [ @parts ] if exists $modes{$key}; + } +} + +# save_config_active_connections {{{3 +sub save_config_active_connections { + my $file = shift; + foreach my $mode ( sort keys %modes ) { + my @connections = get_connections($mode); + print $file "$mode=", join(' ', @connections), "\n"; + } +} + +# load_config_stmt_sleep_times {{{3 +sub load_config_stmt_sleep_times { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key , $val ) = split('=', $line); + next unless $key && defined $val && $val =~ m/$num_regex/; + $stmt_sleep_time_for{$key} = $val; + } +} + +# save_config_stmt_sleep_times {{{3 +sub save_config_stmt_sleep_times { + my $file = shift; + foreach my $key ( sort keys %stmt_sleep_time_for ) { + print $file "$key=$stmt_sleep_time_for{$key}\n"; + } +} + +# load_config_mvs {{{3 +sub load_config_mvs { + my ( $file ) = @_; + while ( my $line = <$file> ) { + chomp $line; + next if $line =~ m/^#/; + last if $line =~ m/^\[/; + + my ( $key , $val ) = split('=', $line); + next unless $key && defined $val && $val =~ m/$num_regex/; + $mvs{$key} = $val; + } +} + +# save_config_mvs {{{3 +sub save_config_mvs { + my $file = shift; + foreach my $key ( sort keys %mvs ) { + print $file "$key=$mvs{$key}\n"; + } +} + +# edit_configuration {{{3 +sub edit_configuration { + my $key = ''; + while ( $key ne 'q' ) { + $clear_screen_sub->(); + my @display_lines = ''; + + if ( $key && $cfg_editor_action{$key} ) { + $cfg_editor_action{$key}->{func}->(); + } + + # Show help + push @display_lines, create_caption('What configuration do you want to edit?', + create_table2( + [ sort keys %cfg_editor_action ], + { map { $_ => $_ } keys %cfg_editor_action }, + { map { $_ => $cfg_editor_action{$_}->{note} } keys %cfg_editor_action }, + { sep => ' ' })); + + draw_screen(\@display_lines); + $key = pause(''); + } +} + +# edit_configuration_variables {{{3 +sub edit_configuration_variables { + $clear_screen_sub->(); + my $mode = $config{mode}->{val}; + + my %config_choices + = map { $_ => $config{$_}->{note} || '' } + # Only config values that are marked as applying to this mode. + grep { + my $key = $_; + $config{$key}->{conf} && + ( $config{$key}->{conf} eq 'ALL' + || grep { $mode eq $_ } @{$config{$key}->{conf}} ) + } keys %config; + + my $key = prompt_list( + "Enter the name of the variable you wish to configure", + '', + sub{ return keys %config_choices }, + \%config_choices); + + if ( exists($config_choices{$key}) ) { + get_config_interactive($key); + } +} + +# edit_color_rules {{{3 +sub edit_color_rules { + my ( $tbl ) = @_; + $clear_screen_sub->(); + $tbl ||= choose_visible_table(); + if ( $tbl && exists($tbl_meta{$tbl}) ) { + my $meta = $tbl_meta{$tbl}; + my @cols = ('', qw(col op arg color)); + my $info = { map { $_ => { hdr => $_, just => '-', } } @cols }; + $info->{label}->{maxw} = 30; + my $key; + my $selected_rule; + + # This loop builds a tabular view of the rules. + do { + + # Show help + if ( $key && $key eq '?' ) { + my @display_lines = ''; + push @display_lines, create_caption('Editor key mappings', + create_table2( + [ sort keys %color_editor_action ], + { map { $_ => $_ } keys %color_editor_action }, + { map { $_ => $color_editor_action{$_}->{note} } keys %color_editor_action }, + { sep => ' ' })); + draw_screen(\@display_lines); + pause(); + $key = ''; + } + else { + + # Do the action specified + $selected_rule ||= 0; + if ( $key && $color_editor_action{$key} ) { + $selected_rule = $color_editor_action{$key}->{func}->($tbl, $selected_rule); + $selected_rule ||= 0; + } + + # Build the table of rules. If the terminal has color, the selected rule + # will be highlighted; otherwise a > at the left will indicate. + my $data = $meta->{colors} || []; + foreach my $i ( 0..@$data - 1 ) { + $data->[$i]->{''} = $i == $selected_rule ? '>' : ''; + } + my @display_lines = create_table(\@cols, $info, $data); + + # Highlight selected entry + for my $i ( 0 .. $#display_lines ) { + if ( $display_lines[$i] =~ m/^>/ ) { + $display_lines[$i] = [ $display_lines[$i], 'reverse' ]; + } + } + + # Draw the screen and wait for a command. + unshift @display_lines, '', + "Editing color rules for $meta->{capt}. Press ? for help, q to " + . "quit.", ''; + draw_screen(\@display_lines); + print "\n\n", word_wrap('Rules are applied in order from top to ' + . 'bottom. The first matching rule wins and prevents the ' + . 'rest of the rules from being applied.'); + $key = pause(''); + } + } while ( $key ne 'q' ); + $meta->{color_func} = make_color_func($meta); + } +} + +# add_quick_filter {{{3 +sub add_quick_filter { + my $tbl = choose_visible_table(); + if ( $tbl && exists($tbl_meta{$tbl}) ) { + print "\n"; + my $response = prompt_list( + "Enter column name and filter text", + '', + sub { return keys %{$tbl_meta{$tbl}->{cols}} }, + () + ); + my ( $col, $text ) = split(/\s+/, $response, 2); + + # You can't filter on a nonexistent column. But if you filter on a pivoted + # table, the columns are different, so on a pivoted table, allow filtering + # on the 'name' column. + # NOTE: if a table is pivoted and un-pivoted, this will likely cause crashes. + # Currently not an issue since there's no way to toggle pivot/nopivot. + return unless $col && $text && + (exists($tbl_meta{$tbl}->{cols}->{$col}) + || ($tbl_meta{$tbl}->{pivot} && $col eq 'name')); + + my ( $sub, $err ) = compile_filter( "defined \$set->{$col} && \$set->{$col} =~ m/$text/" ); + return if !$sub || $err; + my $name = "quick_$tbl.$col"; + $filters{$name} = { + func => $sub, + text => $text, + user => 1, + quick => 1, + name => $name, + note => 'Quick-filter', + tbls => [$tbl], + }; + push @{$tbl_meta{$tbl}->{filters}}, $name; + } +} + +# clear_quick_filters {{{3 +sub clear_quick_filters { + my $tbl = choose_visible_table( + # Only tables that have quick-filters + sub { + my ( $tbl ) = @_; + return scalar grep { $filters{$_}->{quick} } @{ $tbl_meta{$tbl}->{filters} }; + } + ); + if ( $tbl && exists($tbl_meta{$tbl}) ) { + my @current = @{$tbl_meta{$tbl}->{filters}}; + @current = grep { !$filters{$_}->{quick} } @current; + $tbl_meta{$tbl}->{filters} = \@current; + } +} + +sub edit_plugins { + $clear_screen_sub->(); + + my @cols = ('', qw(class desc active)); + my $info = { map { $_ => { hdr => $_, just => '-', } } @cols }; + my @rows = map { $plugins{$_} } sort keys %plugins; + my $key; + my $selected; + + # This loop builds a tabular view of the plugins. + do { + + # Show help + if ( $key && $key eq '?' ) { + my @display_lines = ''; + push @display_lines, create_caption('Editor key mappings', + create_table2( + [ sort keys %plugin_editor_action ], + { map { $_ => $_ } keys %plugin_editor_action }, + { map { $_ => $plugin_editor_action{$_}->{note} } keys %plugin_editor_action }, + { sep => ' ' })); + draw_screen(\@display_lines); + pause(); + $key = ''; + } + + # Do the action specified + else { + $selected ||= 0; + if ( $key && $plugin_editor_action{$key} ) { + $selected = $plugin_editor_action{$key}->{func}->(\@rows, $selected); + $selected ||= 0; + } + + # Build the table of plugins. + foreach my $row ( 0.. $#rows ) { + $rows[$row]->{''} = $row eq $selected ? '>' : ' '; + } + my @display_lines = create_table(\@cols, $info, \@rows); + + # Highlight selected entry + for my $i ( 0 .. $#display_lines ) { + if ( $display_lines[$i] =~ m/^>/ ) { + $display_lines[$i] = [ $display_lines[$i], 'reverse' ]; + } + } + + # Draw the screen and wait for a command. + unshift @display_lines, '', + "Plugin Management. Press ? for help, q to quit.", ''; + draw_screen(\@display_lines); + $key = pause(''); + } + } while ( $key ne 'q' ); +} + +# edit_table {{{3 +sub edit_table { + $clear_screen_sub->(); + my ( $tbl ) = @_; + $tbl ||= choose_visible_table(); + if ( $tbl && exists($tbl_meta{$tbl}) ) { + my $meta = $tbl_meta{$tbl}; + my @cols = ('', qw(name hdr label src)); + my $info = { map { $_ => { hdr => $_, just => '-', } } @cols }; + $info->{label}->{maxw} = 30; + my $key; + my $selected_column; + + # This loop builds a tabular view of the tbl_meta's structure, showing each column + # in the entry as a row. + do { + + # Show help + if ( $key && $key eq '?' ) { + my @display_lines = ''; + push @display_lines, create_caption('Editor key mappings', + create_table2( + [ sort keys %tbl_editor_action ], + { map { $_ => $_ } keys %tbl_editor_action }, + { map { $_ => $tbl_editor_action{$_}->{note} } keys %tbl_editor_action }, + { sep => ' ' })); + draw_screen(\@display_lines); + pause(); + $key = ''; + } + else { + + # Do the action specified + $selected_column ||= $meta->{visible}->[0]; + if ( $key && $tbl_editor_action{$key} ) { + $selected_column = $tbl_editor_action{$key}->{func}->($tbl, $selected_column); + $selected_column ||= $meta->{visible}->[0]; + } + + # Build the pivoted view of the table's meta-data. If the terminal has color, + # The selected row will be highlighted; otherwise a > at the left will indicate. + my $data = []; + foreach my $row ( @{$meta->{visible}} ) { + my %hash; + @hash{ @cols } = @{$meta->{cols}->{$row}}{@cols}; + $hash{src} = '' if ref $hash{src}; + $hash{name} = $row; + $hash{''} = $row eq $selected_column ? '>' : ' '; + push @$data, \%hash; + } + my @display_lines = create_table(\@cols, $info, $data); + + # Highlight selected entry + for my $i ( 0 .. $#display_lines ) { + if ( $display_lines[$i] =~ m/^>/ ) { + $display_lines[$i] = [ $display_lines[$i], 'reverse' ]; + } + } + + # Draw the screen and wait for a command. + unshift @display_lines, '', + "Editing table definition for $meta->{capt}. Press ? for help, q to quit.", ''; + draw_screen(\@display_lines, { clear => 1 }); + $key = pause(''); + } + } while ( $key ne 'q' ); + } +} + +# choose_mode_tables {{{3 +# Choose which table(s), and in what order, to display in a given mode. +sub choose_mode_tables { + my $mode = $config{mode}->{val}; + my @tbls = @{$modes{$mode}->{visible_tables}}; + my $new = prompt_list( + "Choose tables to display", + join(' ', @tbls), + sub { return @{$modes{$mode}->{tables}} }, + { map { $_ => $tbl_meta{$_}->{capt} } @{$modes{$mode}->{tables}} } + ); + $modes{$mode}->{visible_tables} = + [ unique(grep { $_ && exists $tbl_meta{$_} } split(/\s+/, $new)) ]; + $modes{$mode}->{cust}->{visible_tables} = 1; +} + +# choose_visible_table {{{3 +sub choose_visible_table { + my ( $grep_cond ) = @_; + my $mode = $config{mode}->{val}; + my @tbls + = grep { $grep_cond ? $grep_cond->($_) : 1 } + @{$modes{$mode}->{visible_tables}}; + my $tbl = $tbls[0]; + if ( @tbls > 1 ) { + $tbl = prompt_list( + "Choose a table", + '', + sub { return @tbls }, + { map { $_ => $tbl_meta{$_}->{capt} } @tbls } + ); + } + return $tbl; +} + +sub toggle_aggregate { + my ( $tbl ) = @_; + $tbl ||= choose_visible_table(); + return unless $tbl && exists $tbl_meta{$tbl}; + my $meta = $tbl_meta{$tbl}; + $meta->{aggregate} ^= 1; +} + +sub choose_filters { + my ( $tbl ) = @_; + $tbl ||= choose_visible_table(); + return unless $tbl && exists $tbl_meta{$tbl}; + my $meta = $tbl_meta{$tbl}; + $clear_screen_sub->(); + + print "Choose filters for $meta->{capt}:\n"; + + my $ini = join(' ', @{$meta->{filters}}); + my $val = prompt_list( + 'Choose filters', + $ini, + sub { return keys %filters }, + { + map { $_ => $filters{$_}->{note} } + grep { grep { $tbl eq $_ } @{$filters{$_}->{tbls}} } + keys %filters + } + ); + + my @choices = unique(split(/\s+/, $val)); + foreach my $new ( grep { !exists($filters{$_}) } @choices ) { + my $answer = prompt("There is no filter called '$new'. Create it?", undef, 'y'); + if ( $answer eq 'y' ) { + create_new_filter($new, $tbl); + } + } + @choices = grep { exists $filters{$_} } @choices; + @choices = grep { grep { $tbl eq $_ } @{$filters{$_}->{tbls}} } @choices; + $meta->{filters} = [ @choices ]; + $meta->{cust}->{filters} = 1; +} + +sub choose_group_cols { + my ( $tbl ) = @_; + $tbl ||= choose_visible_table(); + return unless $tbl && exists $tbl_meta{$tbl}; + $clear_screen_sub->(); + my $meta = $tbl_meta{$tbl}; + my $curr = join(', ', @{$meta->{group_by}}); + my $val = prompt_list( + 'Group-by columns', + $curr, + sub { return keys %{$meta->{cols}} }, + { map { $_ => $meta->{cols}->{$_}->{label} } keys %{$meta->{cols}} }); + if ( $curr ne $val ) { + $meta->{group_by} = [ grep { exists $meta->{cols}->{$_} } $val =~ m/(\w+)/g ]; + $meta->{cust}->{group_by} = 1; + } +} + +sub choose_sort_cols { + my ( $tbl ) = @_; + $tbl ||= choose_visible_table(); + return unless $tbl && exists $tbl_meta{$tbl}; + $clear_screen_sub->(); + my $meta = $tbl_meta{$tbl}; + + my ( $cols, $hints ); + if ( $meta->{pivot} ) { + $cols = sub { qw(name set_0) }; + $hints = { name => 'name', set_0 => 'set_0' }; + } + else { + $cols = sub { return keys %{$meta->{cols}} }; + $hints = { map { $_ => $meta->{cols}->{$_}->{label} } keys %{$meta->{cols}} }; + } + + my $val = prompt_list( + 'Sort columns (reverse sort with -col)', + $meta->{sort_cols}, + $cols, + $hints ); + if ( $meta->{sort_cols} ne $val ) { + $meta->{sort_cols} = $val; + $meta->{cust}->{sort_cols} = 1; + $tbl_meta{$tbl}->{sort_func} = make_sort_func($tbl_meta{$tbl}); + } +} + +# create_new_filter {{{3 +sub create_new_filter { + my ( $filter, $tbl ) = @_; + $clear_screen_sub->(); + + if ( !$filter || $filter =~ m/\W/ ) { + print word_wrap("Choose a name for the filter. This name is not displayed, and is only used " + . "for internal reference. It can only contain lowercase letters, numbers, and underscores."); + print "\n\n"; + do { + $filter = prompt("Enter filter name"); + } while ( !$filter || $filter =~ m/\W/ ); + } + + my $completion = sub { keys %{$tbl_meta{$tbl}->{cols}} }; + my ( $err, $sub, $body ); + do { + $clear_screen_sub->(); + print word_wrap("A filter is a Perl subroutine that accepts a hashref of columns " + . "called \$set, and returns a true value if the filter accepts the row. Example:\n" + . " \$set->{active_secs} > 5\n" + . "will only allow rows if their active_secs column is greater than 5."); + print "\n\n"; + if ( $err ) { + print "There's an error in your filter expression: $err\n\n"; + } + $body = prompt("Enter subroutine body", undef, undef, $completion); + ( $sub, $err ) = compile_filter($body); + } while ( $err ); + + $filters{$filter} = { + func => $sub, + text => $body, + user => 1, + name => $filter, + note => 'User-defined filter', + tbls => [$tbl], + }; +} + +# get_config_interactive {{{3 +sub get_config_interactive { + my $key = shift; + $clear_screen_sub->(); + + # Print help first. + print "Enter a new value for '$key' ($config{$key}->{note}).\n"; + + my $current = ref($config{$key}->{val}) ? join(" ", @{$config{$key}->{val}}) : $config{$key}->{val}; + + my $new_value = prompt('Enter a value', $config{$key}->{pat}, $current); + $config{$key}->{val} = $new_value; +} + +sub edit_current_var_set { + my $mode = $config{mode}->{val}; + my $name = $config{"${mode}_set"}->{val}; + my $variables = $var_sets{$name}->{text}; + + my $new = $variables; + do { + $clear_screen_sub->(); + $new = prompt("Enter variables for $name", undef, $variables); + } until ( $new ); + + if ( $new ne $variables ) { + @{$var_sets{$name}}{qw(text user)} = ( $new, 1); + } +} + + +sub choose_var_set { + my ( $key ) = @_; + $clear_screen_sub->(); + + my $new_value = prompt_list( + 'Choose a set of values to display, or enter the name of a new one', + $config{$key}->{val}, + sub { return keys %var_sets }, + { map { $_ => $var_sets{$_}->{text} } keys %var_sets }); + + if ( !exists $var_sets{$new_value} ) { + add_new_var_set($new_value); + } + + $config{$key}->{val} = $new_value if exists $var_sets{$new_value}; +} + +sub switch_var_set { + my ( $cfg_var, $dir ) = @_; + my @var_sets = sort keys %var_sets; + my $cur = $config{$cfg_var}->{val}; + my $pos = grep { $_ lt $cur } @var_sets; + my $newpos = ($pos + $dir) % @var_sets; + $config{$cfg_var}->{val} = $var_sets[$newpos]; + $clear_screen_sub->(); +} + +# Online configuration and prompting functions {{{2 + +# edit_stmt_sleep_times {{{3 +sub edit_stmt_sleep_times { + $clear_screen_sub->(); + my $stmt = prompt_list('Specify a statement', '', sub { return sort keys %stmt_maker_for }); + return unless $stmt && exists $stmt_maker_for{$stmt}; + $clear_screen_sub->(); + my $curr_val = $stmt_sleep_time_for{$stmt} || 0; + my $new_val = prompt('Specify a sleep delay after calling this SQL', $num_regex, $curr_val); + if ( $new_val ) { + $stmt_sleep_time_for{$stmt} = $new_val; + } + else { + delete $stmt_sleep_time_for{$stmt}; + } +} + +# edit_server_groups {{{3 +# Choose which server connections are in a server group. First choose a group, +# then choose which connections are in it. +sub edit_server_groups { + $clear_screen_sub->(); + my $mode = $config{mode}->{val}; + my $group = $modes{$mode}->{server_group}; + my %curr = %server_groups; + my $new = choose_or_create_server_group($group, 'to edit'); + $clear_screen_sub->(); + if ( exists $curr{$new} ) { + # Don't do this step if the user just created a new server group, + # because part of that process was to choose connections. + my $cxns = join(' ', @{$server_groups{$new}}); + my @conns = choose_or_create_connection($cxns, 'for this group'); + $server_groups{$new} = \@conns; + } +} + +# choose_server_groups {{{3 +sub choose_server_groups { + $clear_screen_sub->(); + my $mode = $config{mode}->{val}; + my $group = $modes{$mode}->{server_group}; + my $new = choose_or_create_server_group($group, 'for this mode'); + $modes{$mode}->{server_group} = $new if exists $server_groups{$new}; +} + +sub choose_or_create_server_group { + my ( $group, $prompt ) = @_; + my $new = ''; + + my @available = sort keys %server_groups; + + if ( @available ) { + print "You can enter the name of a new group to create it.\n"; + + $new = prompt_list( + "Choose a server group $prompt", + $group, + sub { return @available }, + { map { $_ => join(' ', @{$server_groups{$_}}) } @available }); + + $new =~ s/\s.*//; + + if ( !exists $server_groups{$new} ) { + my $answer = prompt("There is no server group called '$new'. Create it?", undef, "y"); + if ( $answer eq 'y' ) { + add_new_server_group($new); + } + } + } + else { + $new = add_new_server_group(); + } + return $new; +} + +sub choose_or_create_connection { + my ( $cxns, $prompt ) = @_; + print "You can enter the name of a new connection to create it.\n"; + + my @available = sort keys %connections; + my $new_cxns = prompt_list( + "Choose connections $prompt", + $cxns, + sub { return @available }, + { map { $_ => $connections{$_}->{dsn} } @available }); + + my @new = unique(grep { !exists $connections{$_} } split(/\s+/, $new_cxns)); + foreach my $new ( @new ) { + my $answer = prompt("There is no connection called '$new'. Create it?", undef, "y"); + if ( $answer eq 'y' ) { + add_new_dsn($new); + } + } + + return unique(grep { exists $connections{$_} } split(/\s+/, $new_cxns)); +} + +# choose_servers {{{3 +sub choose_servers { + $clear_screen_sub->(); + my $mode = $config{mode}->{val}; + my $cxns = join(' ', get_connections()); + my @chosen = choose_or_create_connection($cxns, 'for this mode'); + $modes{$mode}->{connections} = \@chosen; + $modes{$mode}->{server_group} = ''; # Clear this because it overrides {connections} +} + +# display_license {{{3 +sub display_license { + $clear_screen_sub->(); + + print $innotop_license; + + pause(); +} + +# Data-retrieval functions {{{2 +# get_status_info {{{3 +# Get SHOW STATUS and SHOW VARIABLES together. +sub get_status_info { + my @cxns = @_; + if ( !$info_gotten{status}++ ) { + foreach my $cxn ( @cxns ) { + $vars{$cxn}->{$clock} ||= {}; + my $vars = $vars{$cxn}->{$clock}; + + my $sth = do_stmt($cxn, 'SHOW_STATUS') or next; + my $res = $sth->fetchall_arrayref(); + map { $vars->{$_->[0]} = $_->[1] || 0 } @$res; + + # Calculate hi-res uptime and add cxn to the hash. This duplicates get_driver_status, + # but it's most important to have consistency. + $vars->{Uptime_hires} ||= get_uptime($cxn); + $vars->{cxn} = $cxn; + + # Add SHOW VARIABLES to the hash + $sth = do_stmt($cxn, 'SHOW_VARIABLES') or next; + $res = $sth->fetchall_arrayref(); + map { $vars->{$_->[0]} = $_->[1] || 0 } @$res; + } + } +} + +# Chooses a thread for explaining, killing, etc... +# First arg is a func that can be called in grep. +sub choose_thread { + my ( $grep_cond, $prompt ) = @_; + + # Narrow the list to queries that can be explained. + my %thread_for = map { + # Eliminate innotop's own threads. + $_ => $dbhs{$_}->{dbh} ? $dbhs{$_}->{dbh}->{mysql_thread_id} : 0 + } keys %connections; + + my @candidates = grep { + $_->{id} != $thread_for{$_->{cxn}} && $grep_cond->($_) + } @current_queries; + return unless @candidates; + + # Find out which server. + my @cxns = unique map { $_->{cxn} } @candidates; + my ( $cxn ) = select_cxn('On which server', @cxns); + return unless $cxn && exists($connections{$cxn}); + + # Re-filter the list of candidates to only those on this server + @candidates = grep { $_->{cxn} eq $cxn } @candidates; + + # Find out which thread to do. + my $info; + if ( @candidates > 1 ) { + + # Sort longest-active first, then longest-idle. + my $sort_func = sub { + my ( $a, $b ) = @_; + return $a->{query} && !$b->{query} ? 1 + : $b->{query} && !$a->{query} ? -1 + : ($a->{time} || 0) <=> ($b->{time} || 0); + }; + my @threads = map { $_->{id} } reverse sort { $sort_func->($a, $b) } @candidates; + + print "\n"; + my $thread = prompt_list($prompt, + $threads[0], + sub { return @threads }); + return unless $thread && $thread =~ m/$int_regex/; + + # Find the info hash of that query on that server. + ( $info ) = grep { $thread == $_->{id} } @candidates; + } + else { + $info = $candidates[0]; + } + return $info; +} + +# analyze_query {{{3 +# Allows the user to show fulltext, explain, show optimized... +sub analyze_query { + my ( $action ) = @_; + + my $info = choose_thread( + sub { $_[0]->{query} }, + 'Select a thread to analyze', + ); + return unless $info; + + my %actions = ( + e => \&display_explain, + f => \&show_full_query, + o => \&show_optimized_query, + ); + do { + $actions{$action}->($info); + print "\n"; + $action = pause('Press e to explain, f for full query, o for optimized query'); + } while ( exists($actions{$action}) ); +} + +# inc {{{3 +# Returns the difference between two sets of variables/status/innodb stuff. +sub inc { + my ( $offset, $cxn ) = @_; + my $vars = $vars{$cxn}; + if ( $offset < 0 ) { + return $vars->{$clock}; + } + elsif ( exists $vars{$clock - $offset} && !exists $vars->{$clock - $offset - 1} ) { + return $vars->{$clock - $offset}; + } + my $cur = $vars->{$clock - $offset}; + my $pre = $vars->{$clock - $offset - 1}; + return { + # Numeric variables get subtracted, non-numeric get passed straight through. + map { + $_ => + ( (defined $cur->{$_} && $cur->{$_} =~ m/$num_regex/) + ? $cur->{$_} - ($pre->{$_} || 0) + : $cur->{$_} ) + } keys %{$cur} + }; +} + +# extract_values {{{3 +# Arguments are a set of values (which may be incremental, derived from +# current and previous), current, and previous values. +# TODO: there are a few places that don't remember prev set so can't pass it. +sub extract_values { + my ( $set, $cur, $pre, $tbl ) = @_; + + # Hook in event listeners + foreach my $listener ( @{$event_listener_for{extract_values}} ) { + $listener->extract_values($set, $cur, $pre, $tbl); + } + + my $result = {}; + my $meta = $tbl_meta{$tbl}; + my $cols = $meta->{cols}; + foreach my $key ( keys %$cols ) { + my $info = $cols->{$key} + or die "Column '$key' doesn't exist in $tbl"; + die "No func defined for '$key' in $tbl" + unless $info->{func}; + eval { + $result->{$key} = $info->{func}->($set, $cur, $pre) + }; + if ( $EVAL_ERROR ) { + if ( $config{debug}->{val} ) { + die $EVAL_ERROR; + } + $result->{$key} = $info->{num} ? 0 : ''; + } + } + return $result; +} + +# get_full_processlist {{{3 +sub get_full_processlist { + my @cxns = @_; + my @result; + foreach my $cxn ( @cxns ) { + my $stmt = do_stmt($cxn, 'PROCESSLIST') or next; + my $arr = $stmt->fetchall_arrayref({}); + push @result, map { $_->{cxn} = $cxn; $_ } @$arr; + } + return @result; +} + +# get_open_tables {{{3 +sub get_open_tables { + my @cxns = @_; + my @result; + foreach my $cxn ( @cxns ) { + my $stmt = do_stmt($cxn, 'OPEN_TABLES') or next; + my $arr = $stmt->fetchall_arrayref({}); + push @result, map { $_->{cxn} = $cxn; $_ } @$arr; + } + return @result; +} + +# get_innodb_status {{{3 +sub get_innodb_status { + my ( $cxns, $addl_sections ) = @_; + if ( !$config{skip_innodb}->{val} && !$info_gotten{innodb_status}++ ) { + + # Determine which sections need to be parsed + my %sections_required = + map { $tbl_meta{$_}->{innodb} => 1 } + grep { $_ && $tbl_meta{$_}->{innodb} } + get_visible_tables(); + + # Add in any other sections the caller requested. + foreach my $sec ( @$addl_sections ) { + $sections_required{$sec} = 1; + } + + foreach my $cxn ( @$cxns ) { + my $innodb_status_text; + + if ( $file ) { # Try to fetch status text from the file. + my @stat = stat($file); + + # Initialize the file. + if ( !$file_mtime ) { + # Initialize to 130k from the end of the file (because the limit + # on the size of innodb status is 128k even with Google's patches) + # and try to grab the last status from the file. + sysseek($file, (-128 * 1_024), 2); + } + + # Read from the file. + my $buffer; + if ( !$file_mtime || $file_mtime != $stat[9] ) { + $file_data = ''; + while ( sysread($file, $buffer, 4096) ) { + $file_data .= $buffer; + } + $file_mtime = $stat[9]; + } + + # Delete everything but the last InnoDB status text from the file. + $file_data =~ s/\A.*(?=^=====================================\n...... ........ INNODB MONITOR OUTPUT)//ms; + $innodb_status_text = $file_data; + } + + else { + my $stmt = do_stmt($cxn, 'INNODB_STATUS') or next; + $innodb_status_text = $stmt->fetchrow_hashref()->{status}; + } + + next unless $innodb_status_text + && substr($innodb_status_text, 0, 100) =~ m/INNODB MONITOR OUTPUT/; + + # Parse and merge into %vars storage + my %innodb_status = ( + $innodb_parser->get_status_hash( + $innodb_status_text, + $config{debug}->{val}, + \%sections_required, + 0, # don't parse full lock information + ) + ); + if ( !$innodb_status{IB_got_all} && $config{auto_wipe_dl}->{val} ) { + clear_deadlock($cxn); + } + + # Merge using a hash slice, which is the fastest way + $vars{$cxn}->{$clock} ||= {}; + my $hash = $vars{$cxn}->{$clock}; + @{$hash}{ keys %innodb_status } = values %innodb_status; + $hash->{cxn} = $cxn; + $hash->{Uptime_hires} ||= get_uptime($cxn); + } + } +} + +# clear_deadlock {{{3 +sub clear_deadlock { + my ( $cxn ) = @_; + return if $clearing_deadlocks++; + my $tbl = $connections{$cxn}->{dl_table}; + return unless $tbl; + + eval { + # Set up the table for creating a deadlock. + my $engine = version_ge($dbhs{$cxn}->{dbh}, '4.1.2') ? 'engine' : 'type'; + return unless do_query($cxn, "drop table if exists $tbl"); + return unless do_query($cxn, "create table $tbl(a int) $engine=innodb"); + return unless do_query($cxn, "delete from $tbl"); + return unless do_query($cxn, "insert into $tbl(a) values(0), (1)"); + return unless do_query($cxn, "commit"); # Or the children will block against the parent + + # Fork off two children to deadlock against each other. + my %children; + foreach my $child ( 0..1 ) { + my $pid = fork(); + if ( defined($pid) && $pid == 0 ) { # I am a child + deadlock_thread( $child, $tbl, $cxn ); + } + elsif ( !defined($pid) ) { + die("Unable to fork for clearing deadlocks!\n"); + } + # I already exited if I'm a child, so I'm the parent. + $children{$child} = $pid; + } + + # Wait for the children to exit. + foreach my $child ( keys %children ) { + my $pid = waitpid($children{$child}, 0); + } + + # Clean up. + do_query($cxn, "drop table $tbl"); + }; + if ( $EVAL_ERROR ) { + print $EVAL_ERROR; + pause(); + } + + $clearing_deadlocks = 0; +} + +sub get_master_logs { + my @cxns = @_; + my @result; + if ( !$info_gotten{master_logs}++ ) { + foreach my $cxn ( @cxns ) { + my $stmt = do_stmt($cxn, 'SHOW_MASTER_LOGS') or next; + push @result, @{$stmt->fetchall_arrayref({})}; + } + } + return @result; +} + +# get_master_slave_status {{{3 +sub get_master_slave_status { + my @cxns = @_; + if ( !$info_gotten{replication_status}++ ) { + foreach my $cxn ( @cxns ) { + $vars{$cxn}->{$clock} ||= {}; + my $vars = $vars{$cxn}->{$clock}; + $vars->{cxn} = $cxn; + + my $stmt = do_stmt($cxn, 'SHOW_MASTER_STATUS') or next; + my $res = $stmt->fetchall_arrayref({})->[0]; + @{$vars}{ keys %$res } = values %$res; + $stmt = do_stmt($cxn, 'SHOW_SLAVE_STATUS') or next; + $res = $stmt->fetchall_arrayref({})->[0]; + @{$vars}{ keys %$res } = values %$res; + $vars->{Uptime_hires} ||= get_uptime($cxn); + } + } +} + +sub is_func { + my ( $word ) = @_; + return defined(&$word) + || eval "my \$x= sub { $word }; 1" + || $EVAL_ERROR !~ m/^Bareword/; +} + +# Documentation {{{1 +# ############################################################################ +# I put this last as per the Dog book. +# ############################################################################ +=pod + +=head1 NAME + +innotop - MySQL and InnoDB transaction/status monitor. + +=head1 SYNOPSIS + +To monitor servers normally: + + innotop + +To monitor InnoDB status information from a file: + + innotop /var/log/mysql/mysqld.err + +To run innotop non-interactively in a pipe-and-filter configuration: + + innotop --count 5 -d 1 -n + +To monitor a database on another system using a particular username and password: + + innotop -u -p -h + +=head1 DESCRIPTION + +innotop monitors MySQL servers. Each of its modes shows you a different aspect +of what's happening in the server. For example, there's a mode for monitoring +replication, one for queries, and one for transactions. innotop refreshes its +data periodically, so you see an updating view. + +innotop has lots of features for power users, but you can start and run it with +virtually no configuration. If you're just getting started, see +L<"QUICK-START">. Press '?' at any time while running innotop for +context-sensitive help. + +=head1 QUICK-START + +To start innotop, open a terminal or command prompt. If you have installed +innotop on your system, you should be able to just type "innotop" and press +Enter; otherwise, you will need to change to innotop's directory and type "perl +innotop". + +With no options specified, innotop will attempt to connect to a MySQL server on +localhost using mysql_read_default_group=client for other connection +parameters. If you need to specify a different username and password, use the +-u and -p options, respectively. To monitor a MySQL database on another +host, use the -h option. + +After you've connected, innotop should show you something like the following: + + [RO] Query List (? for help) localhost, 01:11:19, 449.44 QPS, 14/7/163 con/run + + CXN When Load QPS Slow QCacheHit KCacheHit BpsIn BpsOut + localhost Total 0.00 1.07k 697 0.00% 98.17% 476.83k 242.83k + + CXN Cmd ID User Host DB Time Query + localhost Query 766446598 test 10.0.0.1 foo 00:02 INSERT INTO table ( + + +(This sample is truncated at the right so it will fit on a terminal when running +'man innotop') + +If your server is busy, you'll see more output. Notice the first line on the +screen, which tells you that readonly is set to true ([RO]), what mode you're +in and what server you're connected to. You can change to other modes with +keystrokes; press 'T' to switch to a list of InnoDB transactions, for example. + +Press the '?' key to see what keys are active in the current mode. You can +press any of these keys and innotop will either take the requested action or +prompt you for more input. If your system has Term::ReadLine support, you can +use TAB and other keys to auto-complete and edit input. + +To quit innotop, press the 'q' key. + +=head1 OPTIONS + +innotop is mostly configured via its configuration file, but some of the +configuration options can come from the command line. You can also specify a +file to monitor for InnoDB status output; see L<"MONITORING A FILE"> for more +details. + +You can negate some options by prefixing the option name with --no. For +example, --noinc (or --no-inc) negates L<"--inc">. + +=over + +=item --color + +Enable or disable terminal coloring. Corresponds to the L<"color"> config file +setting. + +=item --config + +Specifies a configuration file to read. This option is non-sticky, that is to +say it does not persist to the configuration file itself. + +=item --count + +Refresh only the specified number of times (ticks) before exiting. Each refresh +is a pause for L<"interval"> seconds, followed by requesting data from MySQL +connections and printing it to the terminal. + +=item --delay + +Specifies the amount of time to pause between ticks (refreshes). Corresponds to +the configuration option L<"interval">. + +=item --help + +Print a summary of command-line usage and exit. + +=item --host + +Host to connect to. + +=item --inc + +Specifies whether innotop should display absolute numbers or relative numbers +(offsets from their previous values). Corresponds to the configuration option +L<"status_inc">. + +=item --mode + +Specifies the mode in which innotop should start. Corresponds to the +configuration option L<"mode">. + +=item --nonint + +Enable non-interactive operation. See L<"NON-INTERACTIVE OPERATION"> for more. + +=item --password + +Password to use for connection. + +=item --port + +Port to use for connection. + +=item --skipcentral + +Don't read the central configuration file. + +=item --user + +User to use for connection. + +=item --version + +Output version information and exit. + +=item --write + +Sets the configuration option L<"readonly"> to 0, making innotop write the +running configuration to ~/.innotop/innotop.conf on exit, if no configuration +file was loaded at start-up. + +=back + +=head1 HOTKEYS + +innotop is interactive, and you control it with key-presses. + +=over + +=item * + +Uppercase keys switch between modes. + +=item * + +Lowercase keys initiate some action within the current mode. + +=item * + +Other keys do something special like change configuration or show the +innotop license. + +=back + +Press '?' at any time to see the currently active keys and what they do. + +=head1 MODES + +Each of innotop's modes retrieves and displays a particular type of data from +the servers you're monitoring. You switch between modes with uppercase keys. +The following is a brief description of each mode, in alphabetical order. To +switch to the mode, press the key listed in front of its heading in the +following list: + +=over + +=item B: InnoDB Buffers + +This mode displays information about the InnoDB buffer pool, page statistics, +insert buffer, and adaptive hash index. The data comes from SHOW INNODB STATUS. + +This mode contains the L<"buffer_pool">, L<"page_statistics">, +L<"insert_buffers">, and L<"adaptive_hash_index"> tables by default. + +=item C: Command Summary + +This mode is similar to mytop's Command Summary mode. It shows the +L<"cmd_summary"> table, which looks something like the following: + + Command Summary (? for help) localhost, 25+07:16:43, 2.45 QPS, 3 thd, 5.0.40 + _____________________ Command Summary _____________________ + Name Value Pct Last Incr Pct + Select_scan 3244858 69.89% 2 100.00% + Select_range 1354177 29.17% 0 0.00% + Select_full_join 39479 0.85% 0 0.00% + Select_full_range_join 4097 0.09% 0 0.00% + Select_range_check 0 0.00% 0 0.00% + +The command summary table is built by extracting variables from +L<"STATUS_VARIABLES">. The variables must be numeric and must match the prefix +given by the L<"cmd_filter"> configuration variable. The variables are then +sorted by value descending and compared to the last variable, as shown above. +The percentage columns are percentage of the total of all variables in the +table, so you can see the relative weight of the variables. + +The example shows what you see if the prefix is "Select_". The default +prefix is "Com_". You can choose a prefix with the 's' key. + +It's rather like running SHOW VARIABLES LIKE "prefix%" with memory and +nice formatting. + +Values are aggregated across all servers. The Pct columns are not correctly +aggregated across multiple servers. This is a known limitation of the grouping +algorithm that may be fixed in the future. + +=item D: InnoDB Deadlocks + +This mode shows the transactions involved in the last InnoDB deadlock. A second +table shows the locks each transaction held and waited for. A deadlock is +caused by a cycle in the waits-for graph, so there should be two locks held and +one waited for unless the deadlock information is truncated. + +InnoDB puts deadlock information before some other information in the SHOW +INNODB STATUS output. If there are a lot of locks, the deadlock information can +grow very large, and there is a limit on the size of the SHOW INNODB +STATUS output. A large deadlock can fill the entire output, or even be +truncated, and prevent you from seeing other information at all. If you are +running innotop in another mode, for example T mode, and suddenly you don't see +anything, you might want to check and see if a deadlock has wiped out the data +you need. + +If it has, you can create a small deadlock to replace the large one. Use the +'w' key to 'wipe' the large deadlock with a small one. This will not work +unless you have defined a deadlock table for the connection (see L<"SERVER +CONNECTIONS">). + +You can also configure innotop to automatically detect when a large deadlock +needs to be replaced with a small one (see L<"auto_wipe_dl">). + +This mode displays the L<"deadlock_transactions"> and L<"deadlock_locks"> tables +by default. + +=item F: InnoDB Foreign Key Errors + +This mode shows the last InnoDB foreign key error information, such as the +table where it happened, when and who and what query caused it, and so on. + +InnoDB has a huge variety of foreign key error messages, and many of them are +just hard to parse. innotop doesn't always do the best job here, but there's +so much code devoted to parsing this messy, unparseable output that innotop is +likely never to be perfect in this regard. If innotop doesn't show you what +you need to see, just look at the status text directly. + +This mode displays the L<"fk_error"> table by default. + +=item I: InnoDB I/O Info + +This mode shows InnoDB's I/O statistics, including the I/O threads, pending I/O, +file I/O miscellaneous, and log statistics. It displays the L<"io_threads">, +L<"pending_io">, L<"file_io_misc">, and L<"log_statistics"> tables by default. + +=item L: Locks + +This mode shows information about current locks. At the moment only InnoDB +locks are supported, and by default you'll only see locks for which transactions +are waiting. This information comes from the TRANSACTIONS section of the InnoDB +status text. If you have a very busy server, you may have frequent lock waits; +it helps to be able to see which tables and indexes are the "hot spot" for +locks. If your server is running pretty well, this mode should show nothing. + +You can configure MySQL and innotop to monitor not only locks for which a +transaction is waiting, but those currently held, too. You can do this with the +InnoDB Lock Monitor (L). It's +not documented in the MySQL manual, but creating the lock monitor with the +following statement also affects the output of SHOW INNODB STATUS, which innotop +uses: + + CREATE TABLE innodb_lock_monitor(a int) ENGINE=INNODB; + +This causes InnoDB to print its output to the MySQL file every 16 seconds or so, +as stated in the manual, but it also makes the normal SHOW INNODB STATUS output +include lock information, which innotop can parse and display (that's the +undocumented feature). + +This means you can do what may have seemed impossible: to a limited extent +(InnoDB truncates some information in the output), you can see which transaction +holds the locks something else is waiting for. You can also enable and disable +the InnoDB Lock Monitor with the key mappings in this mode. + +This mode displays the L<"innodb_locks"> table by default. Here's a sample of +the screen when one connection is waiting for locks another connection holds: + + _________________________________ InnoDB Locks __________________________ + CXN ID Type Waiting Wait Active Mode DB Table Index + localhost 12 RECORD 1 00:10 00:10 X test t1 PRIMARY + localhost 12 TABLE 0 00:10 00:10 IX test t1 + localhost 12 RECORD 1 00:10 00:10 X test t1 PRIMARY + localhost 11 TABLE 0 00:00 00:25 IX test t1 + localhost 11 RECORD 0 00:00 00:25 X test t1 PRIMARY + +You can see the first connection, ID 12, is waiting for a lock on the PRIMARY +key on test.t1, and has been waiting for 10 seconds. The second connection +isn't waiting, because the Waiting column is 0, but it holds locks on the same +index. That tells you connection 11 is blocking connection 12. + +=item M: Master/Slave Replication Status + +This mode shows the output of SHOW SLAVE STATUS and SHOW MASTER STATUS in three +tables. The first two divide the slave's status into SQL and I/O thread status, +and the last shows master status. Filters are applied to eliminate non-slave +servers from the slave tables, and non-master servers from the master table. + +This mode displays the L<"slave_sql_status">, L<"slave_io_status">, and +L<"master_status"> tables by default. + +=item O: Open Tables + +This section comes from MySQL's SHOW OPEN TABLES command. By default it is +filtered to show tables which are in use by one or more queries, so you can +get a quick look at which tables are 'hot'. You can use this to guess which +tables might be locked implicitly. + +This mode displays the L<"open_tables"> mode by default. + +=item Q: Query List + +This mode displays the output from SHOW FULL PROCESSLIST, much like B's +query list mode. This mode does B show InnoDB-related information. This +is probably one of the most useful modes for general usage. + +There is an informative header that shows general status information about +your server. You can toggle it on and off with the 'h' key. By default, +innotop hides inactive processes and its own process. You can toggle these on +and off with the 'i' and 'a' keys. + +You can EXPLAIN a query from this mode with the 'e' key. This displays the +query's full text, the results of EXPLAIN, and in newer MySQL versions, even +the optimized query resulting from EXPLAIN EXTENDED. innotop also tries to +rewrite certain queries to make them EXPLAIN-able. For example, INSERT/SELECT +statements are rewritable. + +This mode displays the L<"q_header"> and L<"processlist"> tables by default. + +=item R: InnoDB Row Operations and Semaphores + +This mode shows InnoDB row operations, row operation miscellaneous, semaphores, +and information from the wait array. It displays the L<"row_operations">, +L<"row_operation_misc">, L<"semaphores">, and L<"wait_array"> tables by default. + +=item S: Variables & Status + +This mode calculates statistics, such as queries per second, and prints them out +in several different styles. You can show absolute values, or incremental values +between ticks. + +You can switch between the views by pressing a key. The 's' key prints a +single line each time the screen updates, in the style of B. The 'g' +key changes the view to a graph of the same numbers, sort of like B. +The 'v' key changes the view to a pivoted table of variable names on the left, +with successive updates scrolling across the screen from left to right. You can +choose how many updates to put on the screen with the L<"num_status_sets"> +configuration variable. + +Headers may be abbreviated to fit on the screen in interactive operation. You +choose which variables to display with the 'c' key, which selects from +predefined sets, or lets you create your own sets. You can edit the current set +with the 'e' key. + +This mode doesn't really display any tables like other modes. Instead, it uses +a table definition to extract and format the data, but it then transforms the +result in special ways before outputting it. It uses the L<"var_status"> table +definition for this. + +=item T: InnoDB Transactions + +This mode shows transactions from the InnoDB monitor's output, in B-like +format. This mode is the reason I wrote innotop. + +You can kill queries or processes with the 'k' and 'x' keys, and EXPLAIN a query +with the 'e' or 'f' keys. InnoDB doesn't print the full query in transactions, +so explaining may not work right if the query is truncated. + +The informational header can be toggled on and off with the 'h' key. By +default, innotop hides inactive transactions and its own transaction. You can +toggle this on and off with the 'i' and 'a' keys. + +This mode displays the L<"t_header"> and L<"innodb_transactions"> tables by +default. + +=back + +=head1 INNOTOP STATUS + +The first line innotop displays is a "status bar" of sorts. What it contains +depends on the mode you're in, and what servers you're monitoring. The first +few words are always [RO] (if readonly is set to 1), the innotop mode, such as +"InnoDB Txns" for T mode, followed by a reminder to press '?' for help at any +time. + +=head2 ONE SERVER + +The simplest case is when you're monitoring a single server. In this case, the +name of the connection is next on the status line. This is the name you gave +when you created the connection -- most likely the MySQL server's hostname. +This is followed by the server's uptime. + +If you're in an InnoDB mode, such as T or B, the next word is "InnoDB" followed +by some information about the SHOW INNODB STATUS output used to render the +screen. The first word is the number of seconds since the last SHOW INNODB +STATUS, which InnoDB uses to calculate some per-second statistics. The next is +a smiley face indicating whether the InnoDB output is truncated. If the smiley +face is a :-), all is well; there is no truncation. A :^| means the transaction +list is so long, InnoDB has only printed out some of the transactions. Finally, +a frown :-( means the output is incomplete, which is probably due to a deadlock +printing too much lock information (see L<"D: InnoDB Deadlocks">). + +The next two words indicate the server's queries per second (QPS) and how many +threads (connections) exist. Finally, the server's version number is the last +thing on the line. + +=head2 MULTIPLE SERVERS + +If you are monitoring multiple servers (see L<"SERVER CONNECTIONS">), the status +line does not show any details about individual servers. Instead, it shows the +names of the connections that are active. Again, these are connection names you +specified, which are likely to be the server's hostname. A connection that has +an error is prefixed with an exclamation point. + +If you are monitoring a group of servers (see L<"SERVER GROUPS">), the status +line shows the name of the group. If any connection in the group has an +error, the group's name is followed by the fraction of the connections that +don't have errors. + +See L<"ERROR HANDLING"> for more details about innotop's error handling. + +=head2 MONITORING A FILE + +If you give a filename on the command line, innotop will not connect to ANY +servers at all. It will watch the specified file for InnoDB status output and +use that as its data source. It will always show a single connection called +'file'. And since it can't connect to a server, it can't determine how long the +server it's monitoring has been up; so it calculates the server's uptime as time +since innotop started running. + +=head1 SERVER ADMINISTRATION + +While innotop is primarily a monitor that lets you watch and analyze your +servers, it can also send commands to servers. The most frequently useful +commands are killing queries and stopping or starting slaves. + +You can kill a connection, or in newer versions of MySQL kill a query but not a +connection, from L<"Q: Query List"> and L<"T: InnoDB Transactions"> modes. +Press 'k' to issue a KILL command, or 'x' to issue a KILL QUERY command. +innotop will prompt you for the server and/or connection ID to kill (innotop +does not prompt you if there is only one possible choice for any input). +innotop pre-selects the longest-running query, or the oldest connection. +Confirm the command with 'y'. + +In L<"M: Master/Slave Replication Status"> mode, you can start and stop slaves +with the 'a' and 'o' keys, respectively. You can send these commands to many +slaves at once. innotop fills in a default command of START SLAVE or STOP SLAVE +for you, but you can actually edit the command and send anything you wish, such +as SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1 to make the slave skip one binlog event +when it starts. + +You can also ask innotop to calculate the earliest binlog in use by any slave +and issue a PURGE MASTER LOGS on the master. Use the 'b' key for this. innotop +will prompt you for a master to run the command on, then prompt you for the +connection names of that master's slaves (there is no way for innotop to +determine this reliably itself). innotop will find the minimum binlog in use by +these slave connections and suggest it as the argument to PURGE MASTER LOGS. + +=head1 SERVER CONNECTIONS + +When you create a server connection using '@', innotop asks you for a series of +inputs, as follows: + +=over + +=item DSN + +A DSN is a Data Source Name, which is the initial argument passed to the DBI +module for connecting to a server. It is usually of the form + + DBI:mysql:;mysql_read_default_group=mysql;host=HOSTNAME + +Since this DSN is passed to the DBD::mysql driver, you should read the driver's +documentation at L<"http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm"> for +the exact details on all the options you can pass the driver in the DSN. You +can read more about DBI at L, and especially at +L. + +The mysql_read_default_group=mysql option lets the DBD driver read your MySQL +options files, such as ~/.my.cnf on UNIX-ish systems. You can use this to avoid +specifying a username or password for the connection. + +=item InnoDB Deadlock Table + +This optional item tells innotop a table name it can use to deliberately create +a small deadlock (see L<"D: InnoDB Deadlocks">). If you specify this option, +you just need to be sure the table doesn't exist, and that innotop can create +and drop the table with the InnoDB storage engine. You can safely omit or just +accept the default if you don't intend to use this. + +=item Username + +innotop will ask you if you want to specify a username. If you say 'y', it will +then prompt you for a user name. If you have a MySQL option file that specifies +your username, you don't have to specify a username. + +The username defaults to your login name on the system you're running innotop on. + +=item Password + +innotop will ask you if you want to specify a password. Like the username, the +password is optional, but there's an additional prompt that asks if you want to +save the password in the innotop configuration file. If you don't save it in +the configuration file, innotop will prompt you for a password each time it +starts. Passwords in the innotop configuration file are saved in plain text, +not encrypted in any way. + +=back + +Once you finish answering these questions, you should be connected to a server. +But innotop isn't limited to monitoring a single server; you can define many +server connections and switch between them by pressing the '@' key. See +L<"SWITCHING BETWEEN CONNECTIONS">. + +=head1 SERVER GROUPS + +If you have multiple MySQL instances, you can put them into named groups, such +as 'all', 'masters', and 'slaves', which innotop can monitor all together. + +You can choose which group to monitor with the '#' key, and you can press the +TAB key to switch to the next group. If you're not currently monitoring a +group, pressing TAB selects the first group. + +To create a group, press the '#' key and type the name of your new group, then +type the names of the connections you want the group to contain. + +=head1 SWITCHING BETWEEN CONNECTIONS + +innotop lets you quickly switch which servers you're monitoring. The most basic +way is by pressing the '@' key and typing the name(s) of the connection(s) you +want to use. This setting is per-mode, so you can monitor different connections +in each mode, and innotop remembers which connections you choose. + +You can quickly switch to the 'next' connection in alphabetical order with the +'n' key. If you're monitoring a server group (see L<"SERVER GROUPS">) this will +switch to the first connection. + +You can also type many connection names, and innotop will fetch and display data +from them all. Just separate the connection names with spaces, for example +"server1 server2." Again, if you type the name of a connection that doesn't +exist, innotop will prompt you for connection information and create the +connection. + +Another way to monitor multiple connections at once is with server groups. You +can use the TAB key to switch to the 'next' group in alphabetical order, or if +you're not monitoring any groups, TAB will switch to the first group. + +innotop does not fetch data in parallel from connections, so if you are +monitoring a large group or many connections, you may notice increased delay +between ticks. + +When you monitor more than one connection, innotop's status bar changes. See +L<"INNOTOP STATUS">. + +=head1 ERROR HANDLING + +Error handling is not that important when monitoring a single connection, but is +crucial when you have many active connections. A crashed server or lost +connection should not crash innotop. As a result, innotop will continue to run +even when there is an error; it just won't display any information from the +connection that had an error. Because of this, innotop's behavior might confuse +you. It's a feature, not a bug! + +innotop does not continue to query connections that have errors, because they +may slow innotop and make it hard to use, especially if the error is a problem +connecting and causes a long time-out. Instead, innotop retries the connection +occasionally to see if the error still exists. If so, it will wait until some +point in the future. The wait time increases in ticks as the Fibonacci series, +so it tries less frequently as time passes. + +Since errors might only happen in certain modes because of the SQL commands +issued in those modes, innotop keeps track of which mode caused the error. If +you switch to a different mode, innotop will retry the connection instead of +waiting. + +By default innotop will display the problem in red text at the bottom of the +first table on the screen. You can disable this behavior with the +L<"show_cxn_errors_in_tbl"> configuration option, which is enabled by default. +If the L<"debug"> option is enabled, innotop will display the error at the +bottom of every table, not just the first. And if L<"show_cxn_errors"> is +enabled, innotop will print the error text to STDOUT as well. Error messages +might only display in the mode that caused the error, depending on the mode and +whether innotop is avoiding querying that connection. + +=head1 NON-INTERACTIVE OPERATION + +You can run innotop in non-interactive mode, in which case it is entirely +controlled from the configuration file and command-line options. To start +innotop in non-interactive mode, give the L"<--nonint"> command-line option. +This changes innotop's behavior in the following ways: + +=over + +=item * + +Certain Perl modules are not loaded. Term::Readline is not loaded, since +innotop doesn't prompt interactively. Term::ANSIColor and Win32::Console::ANSI +modules are not loaded. Term::ReadKey is still used, since innotop may have to +prompt for connection passwords when starting up. + +=item * + +innotop does not clear the screen after each tick. + +=item * + +innotop does not persist any changes to the configuration file. + +=item * + +If L<"--count"> is given and innotop is in incremental mode (see L<"status_inc"> +and L<"--inc">), innotop actually refreshes one more time than specified so it +can print incremental statistics. This suppresses output during the first +tick, so innotop may appear to hang. + +=item * + +innotop only displays the first table in each mode. This is so the output can +be easily processed with other command-line utilities such as awk and sed. To +change which tables display in each mode, see L<"TABLES">. Since L<"Q: Query +List"> mode is so important, innotop automatically disables the L<"q_header"> +table. This ensures you'll see the L<"processlist"> table, even if you have +innotop configured to show the q_header table during interactive operation. +Similarly, in L<"T: InnoDB Transactions"> mode, the L<"t_header"> table is +suppressed so you see only the L<"innodb_transactions"> table. + +=item * + +All output is tab-separated instead of being column-aligned with whitespace, and +innotop prints the full contents of each table instead of only printing one +screenful at a time. + +=item * + +innotop only prints column headers once instead of every tick (see +L<"hide_hdr">). innotop does not print table captions (see +L<"display_table_captions">). innotop ensures there are no empty lines in the +output. + +=item * + +innotop does not honor the L<"shorten"> transformation, which normally shortens +some numbers to human-readable formats. + +=item * + +innotop does not print a status line (see L<"INNOTOP STATUS">). + +=back + +=head1 CONFIGURING + +Nearly everything about innotop is configurable. Most things are possible to +change with built-in commands, but you can also edit the configuration file. + +While running innotop, press the '$' key to bring up the configuration editing +dialog. Press another key to select the type of data you want to edit: + +=over + +=item S: Statement Sleep Times + +Edits SQL statement sleep delays, which make innotop pause for the specified +amount of time after executing a statement. See L<"SQL STATEMENTS"> for a +definition of each statement and what it does. By default innotop does not +delay after any statements. + +This feature is included so you can customize the side-effects caused by +monitoring your server. You may not see any effects, but some innotop users +have noticed that certain MySQL versions under very high load with InnoDB +enabled take longer than usual to execute SHOW GLOBAL STATUS. If innotop calls +SHOW FULL PROCESSLIST immediately afterward, the processlist contains more +queries than the machine actually averages at any given moment. Configuring +innotop to pause briefly after calling SHOW GLOBAL STATUS alleviates this +effect. + +Sleep times are stored in the L<"stmt_sleep_times"> section of the configuration +file. Fractional-second sleeps are supported, subject to your hardware's +limitations. + +=item c: Edit Columns + +Starts the table editor on one of the displayed tables. See L<"TABLE EDITOR">. +An alternative way to start the table editor without entering the configuration +dialog is with the '^' key. + +=item g: General Configuration + +Starts the configuration editor to edit global and mode-specific configuration +variables (see L<"MODES">). innotop prompts you to choose a variable from among +the global and mode-specific ones depending on the current mode. + +=item k: Row-Coloring Rules + +Starts the row-coloring rules editor on one of the displayed table(s). See +L<"COLORS"> for details. + +=item p: Manage Plugins + +Starts the plugin configuration editor. See L<"PLUGINS"> for details. + +=item s: Server Groups + +Lets you create and edit server groups. See L<"SERVER GROUPS">. + +=item t: Choose Displayed Tables + +Lets you choose which tables to display in this mode. See L<"MODES"> and +L<"TABLES">. + +=back + +=head1 CONFIGURATION FILE + +innotop's default configuration file locations are $HOME/.innotop and +/etc/innotop/innotop.conf, and they are looked for in that order. If the first +configuration file exists, the second will not be processed. Those can be +overridden with the L<"--config"> command-line option. You can edit it by hand +safely, however innotop reads the configuration file when it starts, and, if +readonly is set to 0, writes it out again when it exits. Thus, if readonly is +set to 0, any changes you make by hand while innotop is running will be lost. + +innotop doesn't store its entire configuration in the configuration file. It +has a huge set of default configuration values that it holds only in memory, +and the configuration file only overrides these defaults. When you customize a +default setting, innotop notices, and then stores the customizations into the +file. This keeps the file size down, makes it easier to edit, and makes +upgrades easier. + +A configuration file is read-only be default. You can override that with +L<"--write">. See L<"readonly">. + +The configuration file is arranged into sections like an INI file. Each +section begins with [section-name] and ends with [/section-name]. Each +section's entries have a different syntax depending on the data they need to +store. You can put comments in the file; any line that begins with a # +character is a comment. innotop will not read the comments, so it won't write +them back out to the file when it exits. Comments in read-only configuration +files are still useful, though. + +The first line in the file is innotop's version number. This lets innotop +notice when the file format is not backwards-compatible, and upgrade smoothly +without destroying your customized configuration. + +The following list describes each section of the configuration file and the data +it contains: + +=over + +=item general + +The 'general' section contains global configuration variables and variables that +may be mode-specific, but don't belong in any other section. The syntax is a +simple key=value list. innotop writes a comment above each value to help you +edit the file by hand. + +=over + +=item S_func + +Controls S mode presentation (see L<"S: Variables & Status">). If g, values are +graphed; if s, values are like vmstat; if p, values are in a pivoted table. + +=item S_set + +Specifies which set of variables to display in L<"S: Variables & Status"> mode. +See L<"VARIABLE SETS">. + +=item auto_wipe_dl + +Instructs innotop to automatically wipe large deadlocks when it notices them. +When this happens you may notice a slight delay. At the next tick, you will +usually see the information that was being truncated by the large deadlock. + +=item charset + +Specifies what kind of characters to allow through the L<"no_ctrl_char"> +transformation. This keeps non-printable characters from confusing a +terminal when you monitor queries that contain binary data, such as images. + +The default is 'ascii', which considers anything outside normal ASCII to be a +control character. The other allowable values are 'unicode' and 'none'. 'none' +considers every character a control character, which can be useful for +collapsing ALL text fields in queries. + +=item cmd_filter + +This is the prefix that filters variables in L<"C: Command Summary"> mode. + +=item color + +Whether terminal coloring is permitted. + +=item cxn_timeout + +On MySQL versions 4.0.3 and newer, this variable is used to set the connection's +timeout, so MySQL doesn't close the connection if it is not used for a while. +This might happen because a connection isn't monitored in a particular mode, for +example. + +=item debug + +This option enables more verbose errors and makes innotop more strict in some +places. It can help in debugging filters and other user-defined code. It also +makes innotop write a lot of information to L<"debugfile"> when there is a +crash. + +=item debugfile + +A file to which innotop will write information when there is a crash. See +L<"FILES">. + +=item display_table_captions + +innotop displays a table caption above most tables. This variable suppresses or +shows captions on all tables globally. Some tables are configured with the +hide_caption property, which overrides this. + +=item global + +Whether to show GLOBAL variables and status. innotop only tries to do this on +servers which support the GLOBAL option to SHOW VARIABLES and SHOW STATUS. In +some MySQL versions, you need certain privileges to do this; if you don't have +them, innotop will not be able to fetch any variable and status data. This +configuration variable lets you run innotop and fetch what data you can even +without the elevated privileges. + +I can no longer find or reproduce the situation where GLOBAL wasn't allowed, but +I know there was one. + +=item graph_char + +Defines the character to use when drawing graphs in L<"S: Variables & Status"> +mode. + +=item header_highlight + +Defines how to highlight column headers. This only works if Term::ANSIColor is +available. Valid values are 'bold' and 'underline'. + +=item hide_hdr + +Hides column headers globally. + +=item interval + +The interval at which innotop will refresh its data (ticks). The interval is +implemented as a sleep time between ticks, so the true interval will vary +depending on how long it takes innotop to fetch and render data. + +This variable accepts fractions of a second. + +=item mode + +The mode in which innotop should start. Allowable arguments are the same as the +key presses that select a mode interactively. See L<"MODES">. + +=item num_digits + +How many digits to show in fractional numbers and percents. This variable's +range is between 0 and 9 and can be set directly from L<"S: Variables & Status"> +mode with the '+' and '-' keys. It is used in the L<"set_precision">, +L<"shorten">, and L<"percent"> transformations. + +=item num_status_sets + +Controls how many sets of status variables to display in pivoted L<"S: Variables +& Status"> mode. It also controls the number of old sets of variables innotop +keeps in its memory, so the larger this variable is, the more memory innotop +uses. + +=item plugin_dir + +Specifies where plugins can be found. By default, innotop stores plugins in the +'plugins' subdirectory of your innotop configuration directory. + +=item readonly + +Whether the configuration file is readonly. This cannot be set interactively. + +=item show_cxn_errors + +Makes innotop print connection errors to STDOUT. See L<"ERROR HANDLING">. + +=item show_cxn_errors_in_tbl + +Makes innotop display connection errors as rows in the first table on screen. +See L<"ERROR HANDLING">. + +=item show_percent + +Adds a '%' character after the value returned by the L<"percent"> +transformation. + +=item show_statusbar + +Controls whether to show the status bar in the display. See L<"INNOTOP +STATUS">. + +=item skip_innodb + +Disables fetching SHOW INNODB STATUS, in case your server(s) do not have InnoDB +enabled and you don't want innotop to try to fetch it. This can also be useful +when you don't have the SUPER privilege, required to run SHOW INNODB STATUS. + +=item status_inc + +Whether to show absolute or incremental values for status variables. +Incremental values are calculated as an offset from the last value innotop saw +for that variable. This is a global setting, but will probably become +mode-specific at some point. Right now it is honored a bit inconsistently; some +modes don't pay attention to it. + +=back + +=item plugins + +This section holds a list of package names of active plugins. If the plugin +exists, innotop will activate it. See L<"PLUGINS"> for more information. + +=item filters + +This section holds user-defined filters (see L<"FILTERS">). Each line is in the +format filter_name=text='filter text' tbls='table list'. + +The filter text is the text of the subroutine's code. The table list is a list +of tables to which the filter can apply. By default, user-defined filters apply +to the table for which they were created, but you can manually override that by +editing the definition in the configuration file. + +=item active_filters + +This section stores which filters are active on each table. Each line is in the +format table_name=filter_list. + +=item tbl_meta + +This section stores user-defined or user-customized columns (see L<"COLUMNS">). +Each line is in the format col_name=properties, where the properties are a +name=quoted-value list. + +=item connections + +This section holds the server connections you have defined. Each line is in +the format name=properties, where the properties are a name=value list. The +properties are self-explanatory, and the only one that is treated specially is +'pass' which is only present if 'savepass' is set. This section of the +configuration file will be skipped if any DSN, username, or password +command-line options are used. See L<"SERVER CONNECTIONS">. + +=item active_connections + +This section holds a list of which connections are active in each mode. Each +line is in the format mode_name=connection_list. + +=item server_groups + +This section holds server groups. Each line is in the format +name=connection_list. See L<"SERVER GROUPS">. + +=item active_server_groups + +This section holds a list of which server group is active in each mode. Each +line is in the format mode_name=server_group. + +=item max_values_seen + +This section holds the maximum values seen for variables. This is used to scale +the graphs in L<"S: Variables & Status"> mode. Each line is in the format +name=value. + +=item active_columns + +This section holds table column lists. Each line is in the format +tbl_name=column_list. See L<"COLUMNS">. + +=item sort_cols + +This section holds the sort definition. Each line is in the format +tbl_name=column_list. If a column is prefixed with '-', that column sorts +descending. See L<"SORTING">. + +=item visible_tables + +This section defines which tables are visible in each mode. Each line is in the +format mode_name=table_list. See L<"TABLES">. + +=item varsets + +This section defines variable sets for use in L<"S: Status & Variables"> mode. +Each line is in the format name=variable_list. See L<"VARIABLE SETS">. + +=item colors + +This section defines colorization rules. Each line is in the format +tbl_name=property_list. See L<"COLORS">. + +=item stmt_sleep_times + +This section contains statement sleep times. Each line is in the format +statement_name=sleep_time. See L<"S: Statement Sleep Times">. + +=item group_by + +This section contains column lists for table group_by expressions. Each line is +in the format tbl_name=column_list. See L<"GROUPING">. + +=back + +=head1 CUSTOMIZING + +You can customize innotop a great deal. For example, you can: + +=over + +=item * + +Choose which tables to display, and in what order. + +=item * + +Choose which columns are in those tables, and create new columns. + +=item * + +Filter which rows display with built-in filters, user-defined filters, and +quick-filters. + +=item * + +Sort the rows to put important data first or group together related rows. + +=item * + +Highlight rows with color. + +=item * + +Customize the alignment, width, and formatting of columns, and apply +transformations to columns to extract parts of their values or format the values +as you wish (for example, shortening large numbers to familiar units). + +=item * + +Design your own expressions to extract and combine data as you need. This gives +you unlimited flexibility. + +=back + +All these and more are explained in the following sections. + +=head2 TABLES + +A table is what you'd expect: a collection of columns. It also has some other +properties, such as a caption. Filters, sorting rules, and colorization rules +belong to tables and are covered in later sections. + +Internally, table meta-data is defined in a data structure called %tbl_meta. +This hash holds all built-in table definitions, which contain a lot of default +instructions to innotop. The meta-data includes the caption, a list of columns +the user has customized, a list of columns, a list of visible columns, a list of +filters, color rules, a sort-column list, sort direction, and some information +about the table's data sources. Most of this is customizable via the table +editor (see L<"TABLE EDITOR">). + +You can choose which tables to show by pressing the '$' key. See L<"MODES"> and +L<"TABLES">. + +The table life-cycle is as follows: + +=over + +=item * + +Each table begins with a data source, which is an array of hashes. See below +for details on data sources. + +=item * + +Each element of the data source becomes a row in the final table. + +=item * + +For each element in the data source, innotop extracts values from the source and +creates a row. This row is another hash, which later steps will refer to as +$set. The values innotop extracts are determined by the table's columns. Each +column has an extraction subroutine, compiled from an expression (see +L<"EXPRESSIONS">). The resulting row is a hash whose keys are named the same as +the column name. + +=item * + +innotop filters the rows, removing those that don't need to be displayed. See +L<"FILTERS">. + +=item * + +innotop sorts the rows. See L<"SORTING">. + +=item * + +innotop groups the rows together, if specified. See L<"GROUPING">. + +=item * + +innotop colorizes the rows. See L<"COLORS">. + +=item * + +innotop transforms the column values in each row. See L<"TRANSFORMATIONS">. + +=item * + +innotop optionally pivots the rows (see L<"PIVOTING">), then filters and sorts +them. + +=item * + +innotop formats and justifies the rows as a table. During this step, innotop +applies further formatting to the column values, including alignment, maximum +and minimum widths. innotop also does final error checking to ensure there are +no crashes due to undefined values. innotop then adds a caption if specified, +and the table is ready to print. + +=back + +The lifecycle is slightly different if the table is pivoted, as noted above. To +clarify, if the table is pivoted, the process is extract, group, transform, +pivot, filter, sort, create. If it's not pivoted, the process is extract, +filter, sort, group, color, transform, create. This slightly convoluted process +doesn't map all that well to SQL, but pivoting complicates things pretty +thoroughly. Roughly speaking, filtering and sorting happen as late as needed to +effect the final result as you might expect, but as early as possible for +efficiency. + +Each built-in table is described below: + +=over + +=item adaptive_hash_index + +Displays data about InnoDB's adaptive hash index. Data source: +L<"STATUS_VARIABLES">. + +=item buffer_pool + +Displays data about InnoDB's buffer pool. Data source: L<"STATUS_VARIABLES">. + +=item cmd_summary + +Displays weighted status variables. Data source: L<"STATUS_VARIABLES">. + +=item deadlock_locks + +Shows which locks were held and waited for by the last detected deadlock. Data +source: L<"DEADLOCK_LOCKS">. + +=item deadlock_transactions + +Shows transactions involved in the last detected deadlock. Data source: +L<"DEADLOCK_TRANSACTIONS">. + +=item explain + +Shows the output of EXPLAIN. Data source: L<"EXPLAIN">. + +=item file_io_misc + +Displays data about InnoDB's file and I/O operations. Data source: +L<"STATUS_VARIABLES">. + +=item fk_error + +Displays various data about InnoDB's last foreign key error. Data source: +L<"STATUS_VARIABLES">. + +=item innodb_locks + +Displays InnoDB locks. Data source: L<"INNODB_LOCKS">. + +=item innodb_transactions + +Displays data about InnoDB's current transactions. Data source: +L<"INNODB_TRANSACTIONS">. + +=item insert_buffers + +Displays data about InnoDB's insert buffer. Data source: L<"STATUS_VARIABLES">. + +=item io_threads + +Displays data about InnoDB's I/O threads. Data source: L<"IO_THREADS">. + +=item log_statistics + +Displays data about InnoDB's logging system. Data source: L<"STATUS_VARIABLES">. + +=item master_status + +Displays replication master status. Data source: L<"STATUS_VARIABLES">. + +=item open_tables + +Displays open tables. Data source: L<"OPEN_TABLES">. + +=item page_statistics + +Displays InnoDB page statistics. Data source: L<"STATUS_VARIABLES">. + +=item pending_io + +Displays InnoDB pending I/O operations. Data source: L<"STATUS_VARIABLES">. + +=item processlist + +Displays current MySQL processes (threads/connections). Data source: +L<"PROCESSLIST">. + +=item q_header + +Displays various status values. Data source: L<"STATUS_VARIABLES">. + +=item row_operation_misc + +Displays data about InnoDB's row operations. Data source: +L<"STATUS_VARIABLES">. + +=item row_operations + +Displays data about InnoDB's row operations. Data source: +L<"STATUS_VARIABLES">. + +=item semaphores + +Displays data about InnoDB's semaphores and mutexes. Data source: +L<"STATUS_VARIABLES">. + +=item slave_io_status + +Displays data about the slave I/O thread. Data source: +L<"STATUS_VARIABLES">. + +=item slave_sql_status + +Displays data about the slave SQL thread. Data source: L<"STATUS_VARIABLES">. + +=item t_header + +Displays various InnoDB status values. Data source: L<"STATUS_VARIABLES">. + +=item var_status + +Displays user-configurable data. Data source: L<"STATUS_VARIABLES">. + +=item wait_array + +Displays data about InnoDB's OS wait array. Data source: L<"OS_WAIT_ARRAY">. + +=back + +=head2 COLUMNS + +Columns belong to tables. You can choose a table's columns by pressing the '^' +key, which starts the L<"TABLE EDITOR"> and lets you choose and edit columns. +Pressing 'e' from within the table editor lets you edit the column's properties: + +=over + +=item * + +hdr: a column header. This appears in the first row of the table. + +=item * + +just: justification. '-' means left-justified and '' means right-justified, +just as with printf formatting codes (not a coincidence). + +=item * + +dec: whether to further align the column on the decimal point. + +=item * + +num: whether the column is numeric. This affects how values are sorted +(lexically or numerically). + +=item * + +label: a small note about the column, which appears in dialogs that help the +user choose columns. + +=item * + +src: an expression that innotop uses to extract the column's data from its +source (see L<"DATA SOURCES">). See L<"EXPRESSIONS"> for more on expressions. + +=item * + +minw: specifies a minimum display width. This helps stabilize the display, +which makes it easier to read if the data is changing frequently. + +=item * + +maxw: similar to minw. + +=item * + +trans: a list of column transformations. See L<"TRANSFORMATIONS">. + +=item * + +agg: an aggregate function. See L<"GROUPING">. The default is L<"first">. + +=item * + +aggonly: controls whether the column only shows when grouping is enabled on the +table (see L<"GROUPING">). By default, this is disabled. This means columns +will always be shown by default, whether grouping is enabled or not. If a +column's aggonly is set true, the column will appear when you toggle grouping on +the table. Several columns are set this way, such as the count column on +L<"processlist"> and L<"innodb_transactions">, so you don't see a count when the +grouping isn't enabled, but you do when it is. + +=back + +=head2 FILTERS + +Filters remove rows from the display. They behave much like a WHERE clause in +SQL. innotop has several built-in filters, which remove irrelevant information +like inactive queries, but you can define your own as well. innotop also lets +you create quick-filters, which do not get saved to the configuration file, and +are just an easy way to quickly view only some rows. + +You can enable or disable a filter on any table. Press the '%' key (mnemonic: % +looks kind of like a line being filtered between two circles) and choose which +table you want to filter, if asked. You'll then see a list of possible filters +and a list of filters currently enabled for that table. Type the names of +filters you want to apply and press Enter. + +=head3 USER-DEFINED FILTERS + +If you type a name that doesn't exist, innotop will prompt you to create the +filter. Filters are easy to create if you know Perl, and not hard if you don't. +What you're doing is creating a subroutine that returns true if the row should +be displayed. The row is a hash reference passed to your subroutine as $set. + +For example, imagine you want to filter the processlist table so you only see +queries that have been running more than five minutes. Type a new name for your +filter, and when prompted for the subroutine body, press TAB to initiate your +terminal's auto-completion. You'll see the names of the columns in the +L<"processlist"> table (innotop generally tries to help you with auto-completion +lists). You want to filter on the 'time' column. Type the text "$set->{time} > +300" to return true when the query is more than five minutes old. That's all +you need to do. + +In other words, the code you're typing is surrounded by an implicit context, +which looks like this: + + sub filter { + my ( $set ) = @_; + # YOUR CODE HERE + } + +If your filter doesn't work, or if something else suddenly behaves differently, +you might have made an error in your filter, and innotop is silently catching +the error. Try enabling L<"debug"> to make innotop throw an error instead. + +=head3 QUICK-FILTERS + +innotop's quick-filters are a shortcut to create a temporary filter that doesn't +persist when you restart innotop. To create a quick-filter, press the '/' key. +innotop will prompt you for the column name and filter text. Again, you can use +auto-completion on column names. The filter text can be just the text you want +to "search for." For example, to filter the L<"processlist"> table on queries +that refer to the products table, type '/' and then 'info product'. + +The filter text can actually be any Perl regular expression, but of course a +literal string like 'product' works fine as a regular expression. + +Behind the scenes innotop compiles the quick-filter into a specially tagged +filter that is otherwise like any other filter. It just isn't saved to the +configuration file. + +To clear quick-filters, press the '\' key and innotop will clear them all at +once. + +=head2 SORTING + +innotop has sensible built-in defaults to sort the most important rows to the +top of the table. Like anything else in innotop, you can customize how any +table is sorted. + +To start the sort dialog, start the L<"TABLE EDITOR"> with the '^' key, choose a +table if necessary, and press the 's' key. You'll see a list of columns you can +use in the sort expression and the current sort expression, if any. Enter a +list of columns by which you want to sort and press Enter. If you want to +reverse sort, prefix the column name with a minus sign. For example, if you +want to sort by column a ascending, then column b descending, type 'a -b'. You +can also explicitly add a + in front of columns you want to sort ascending, but +it's not required. + +Some modes have keys mapped to open this dialog directly, and to quickly reverse +sort direction. Press '?' as usual to see which keys are mapped in any mode. + +=head2 GROUPING + +innotop can group, or aggregate, rows together (the terms are used +interchangeably). This is quite similar to an SQL GROUP BY clause. You can +specify to group on certain columns, or if you don't specify any, the entire set +of rows is treated as one group. This is quite like SQL so far, but unlike SQL, +you can also select un-grouped columns. innotop actually aggregates every +column. If you don't explicitly specify a grouping function, the default is +'first'. This is basically a convenience so you don't have to specify an +aggregate function for every column you want in the result. + +You can quickly toggle grouping on a table with the '=' key, which toggles its +aggregate property. This property doesn't persist to the config file. + +The columns by which the table is grouped are specified in its group_by +property. When you turn grouping on, innotop places the group_by columns at the +far left of the table, even if they're not supposed to be visible. The rest of +the visible columns appear in order after them. + +Two tables have default group_by lists and a count column built in: +L<"processlist"> and L<"innodb_transactions">. The grouping is by connection +and status, so you can quickly see how many queries or transactions are in a +given status on each server you're monitoring. The time columns are aggregated +as a sum; other columns are left at the default 'first' aggregation. + +By default, the table shown in L<"S: Variables & Status"> mode also uses +grouping so you can monitor variables and status across many servers. The +default aggregation function in this mode is 'avg'. + +Valid grouping functions are defined in the %agg_funcs hash. They include + +=over + +=item first + +Returns the first element in the group. + +=item count + +Returns the number of elements in the group, including undefined elements, much +like SQL's COUNT(*). + +=item avg + +Returns the average of defined elements in the group. + +=item sum + +Returns the sum of elements in the group. + +=back + +Here's an example of grouping at work. Suppose you have a very busy server with +hundreds of open connections, and you want to see how many connections are in +what status. Using the built-in grouping rules, you can press 'Q' to enter +L<"Q: Query List"> mode. Press '=' to toggle grouping (if necessary, select the +L<"processlist"> table when prompted). + +Your display might now look like the following: + + Query List (? for help) localhost, 32:33, 0.11 QPS, 1 thd, 5.0.38-log + + CXN Cmd Cnt ID User Host Time Query + localhost Query 49 12933 webusr localhost 19:38 SELECT * FROM + localhost Sending Da 23 2383 webusr localhost 12:43 SELECT col1, + localhost Sleep 120 140 webusr localhost 5:18:12 + localhost Statistics 12 19213 webusr localhost 01:19 SELECT * FROM + +That's actually quite a worrisome picture. You've got a lot of idle connections +(Sleep), and some connections executing queries (Query and Sending Data). +That's okay, but you also have a lot in Statistics status, collectively spending +over a minute. That means the query optimizer is having a really hard time +optimizing your statements. Something is wrong; it should normally take +milliseconds to optimize queries. You might not have seen this pattern if you +didn't look at your connections in aggregate. (This is a made-up example, but +it can happen in real life). + +=head2 PIVOTING + +innotop can pivot a table for more compact display, similar to a Pivot Table in +a spreadsheet (also known as a crosstab). Pivoting a table makes columns into +rows. Assume you start with this table: + + foo bar + === === + 1 3 + 2 4 + +After pivoting, the table will look like this: + + name set0 set1 + ==== ==== ==== + foo 1 2 + bar 3 4 + +To get reasonable results, you might need to group as well as pivoting. +innotop currently does this for L<"S: Variables & Status"> mode. + +=head2 COLORS + +By default, innotop highlights rows with color so you can see at a glance which +rows are more important. You can customize the colorization rules and add your +own to any table. Open the table editor with the '^' key, choose a table if +needed, and press 'o' to open the color editor dialog. + +The color editor dialog displays the rules applied to the table, in the order +they are evaluated. Each row is evaluated against each rule to see if the rule +matches the row; if it does, the row gets the specified color, and no further +rules are evaluated. The rules look like the following: + + state eq Locked black on_red + cmd eq Sleep white + user eq system user white + cmd eq Connect white + cmd eq Binlog Dump white + time > 600 red + time > 120 yellow + time > 60 green + time > 30 cyan + +This is the default rule set for the L<"processlist"> table. In order of +priority, these rules make locked queries black on a red background, "gray out" +connections from replication and sleeping queries, and make queries turn from +cyan to red as they run longer. + +(For some reason, the ANSI color code "white" is actually a light gray. Your +terminal's display may vary; experiment to find colors you like). + +You can use keystrokes to move the rules up and down, which re-orders their +priority. You can also delete rules and add new ones. If you add a new rule, +innotop prompts you for the column, an operator for the comparison, a value +against which to compare the column, and a color to assign if the rule matches. +There is auto-completion and prompting at each step. + +The value in the third step needs to be correctly quoted. innotop does not try +to quote the value because it doesn't know whether it should treat the value as +a string or a number. If you want to compare the column against a string, as +for example in the first rule above, you should enter 'Locked' surrounded by +quotes. If you get an error message about a bareword, you probably should have +quoted something. + +=head2 EXPRESSIONS + +Expressions are at the core of how innotop works, and are what enables you to +extend innotop as you wish. Recall the table lifecycle explained in +L<"TABLES">. Expressions are used in the earliest step, where it extracts +values from a data source to form rows. + +It does this by calling a subroutine for each column, passing it the source data +set, a set of current values, and a set of previous values. These are all +needed so the subroutine can calculate things like the difference between this +tick and the previous tick. + +The subroutines that extract the data from the set are compiled from +expressions. This gives significantly more power than just naming the values to +fill the columns, because it allows the column's value to be calculated from +whatever data is necessary, but avoids the need to write complicated and lengthy +Perl code. + +innotop begins with a string of text that can look as simple as a value's name +or as complicated as a full-fledged Perl expression. It looks at each +'bareword' token in the string and decides whether it's supposed to be a key +into the $set hash. A bareword is an unquoted value that isn't already +surrounded by code-ish things like dollar signs or curly brackets. If innotop +decides that the bareword isn't a function or other valid Perl code, it converts +it into a hash access. After the whole string is processed, innotop compiles a +subroutine, like this: + + sub compute_column_value { + my ( $set, $cur, $pre ) = @_; + my $val = # EXPANDED STRING GOES HERE + return $val; + } + +Here's a concrete example, taken from the header table L<"q_header"> in L<"Q: +Query List"> mode. This expression calculates the qps, or Queries Per Second, +column's values, from the values returned by SHOW STATUS: + + Questions/Uptime_hires + +innotop decides both words are barewords, and transforms this expression into +the following Perl code: + + $set->{Questions}/$set->{Uptime_hires} + +When surrounded by the rest of the subroutine's code, this is executable Perl +that calculates a high-resolution queries-per-second value. + +The arguments to the subroutine are named $set, $cur, and $pre. In most cases, +$set and $cur will be the same values. However, if L<"status_inc"> is set, $cur +will not be the same as $set, because $set will already contain values that are +the incremental difference between $cur and $pre. + +Every column in innotop is computed by subroutines compiled in the same fashion. +There is no difference between innotop's built-in columns and user-defined +columns. This keeps things consistent and predictable. + +=head2 TRANSFORMATIONS + +Transformations change how a value is rendered. For example, they can take a +number of seconds and display it in H:M:S format. The following transformations +are defined: + +=over + +=item commify + +Adds commas to large numbers every three decimal places. + +=item dulint_to_int + +Accepts two unsigned integers and converts them into a single longlong. This is +useful for certain operations with InnoDB, which uses two integers as +transaction identifiers, for example. + +=item no_ctrl_char + +Removes quoted control characters from the value. This is affected by the +L<"charset"> configuration variable. + +This transformation only operates within quoted strings, for example, values to +a SET clause in an UPDATE statement. It will not alter the UPDATE statement, +but will collapse the quoted string to [BINARY] or [TEXT], depending on the +charset. + +=item percent + +Converts a number to a percentage by multiplying it by two, formatting it with +L<"num_digits"> digits after the decimal point, and optionally adding a percent +sign (see L<"show_percent">). + +=item secs_to_time + +Formats a number of seconds as time in days+hours:minutes:seconds format. + +=item set_precision + +Formats numbers with L<"num_digits"> number of digits after the decimal point. + +=item shorten + +Formats a number as a unit of 1024 (k/M/G/T) and with L<"num_digits"> number of +digits after the decimal point. + +=back + +=head2 TABLE EDITOR + +The innotop table editor lets you customize tables with keystrokes. You start +the table editor with the '^' key. If there's more than one table on the +screen, it will prompt you to choose one of them. Once you do, innotop will +show you something like this: + + Editing table definition for Buffer Pool. Press ? for help, q to quit. + + name hdr label src + cxn CXN Connection from which cxn + buf_pool_size Size Buffer pool size IB_bp_buf_poo + buf_free Free Bufs Buffers free in the b IB_bp_buf_fre + pages_total Pages Pages total IB_bp_pages_t + pages_modified Dirty Pages Pages modified (dirty IB_bp_pages_m + buf_pool_hit_rate Hit Rate Buffer pool hit rate IB_bp_buf_poo + total_mem_alloc Memory Total memory allocate IB_bp_total_m + add_pool_alloc Add'l Pool Additonal pool alloca IB_bp_add_poo + +The first line shows which table you're editing, and reminds you again to press +'?' for a list of key mappings. The rest is a tabular representation of the +table's columns, because that's likely what you're trying to edit. However, you +can edit more than just the table's columns; this screen can start the filter +editor, color rule editor, and more. + +Each row in the display shows a single column in the table you're editing, along +with a couple of its properties such as its header and source expression (see +L<"EXPRESSIONS">). + +The key mappings are Vim-style, as in many other places. Pressing 'j' and 'k' +moves the highlight up or down. You can then (d)elete or (e)dit the highlighted +column. You can also (a)dd a column to the table. This actually just activates +one of the columns already defined for the table; it prompts you to choose from +among the columns available but not currently displayed. Finally, you can +re-order the columns with the '+' and '-' keys. + +You can do more than just edit the columns with the table editor, you can also +edit other properties, such as the table's sort expression and group-by +expression. Press '?' to see the full list, of course. + +If you want to really customize and create your own column, as opposed to just +activating a built-in one that's not currently displayed, press the (n)ew key, +and innotop will prompt you for the information it needs: + +=over + +=item * + +The column name: this needs to be a word without any funny characters, e.g. just +letters, numbers and underscores. + +=item * + +The column header: this is the label that appears at the top of the column, in +the table header. This can have spaces and funny characters, but be careful not +to make it too wide and waste space on-screen. + +=item * + +The column's data source: this is an expression that determines what data from +the source (see L<"TABLES">) innotop will put into the column. This can just be +the name of an item in the source, or it can be a more complex expression, as +described in L<"EXPRESSIONS">. + +=back + +Once you've entered the required data, your table has a new column. There is no +difference between this column and the built-in ones; it can have all the same +properties and behaviors. innotop will write the column's definition to the +configuration file, so it will persist across sessions. + +Here's an example: suppose you want to track how many times your slaves have +retried transactions. According to the MySQL manual, the +Slave_retried_transactions status variable gives you that data: "The total +number of times since startup that the replication slave SQL thread has retried +transactions. This variable was added in version 5.0.4." This is appropriate to +add to the L<"slave_sql_status"> table. + +To add the column, switch to the replication-monitoring mode with the 'M' key, +and press the '^' key to start the table editor. When prompted, choose +slave_sql_status as the table, then press 'n' to create the column. Type +'retries' as the column name, 'Retries' as the column header, and +'Slave_retried_transactions' as the source. Now the column is created, and you +see the table editor screen again. Press 'q' to exit the table editor, and +you'll see your column at the end of the table. + +=head1 VARIABLE SETS + +Variable sets are used in L<"S: Variables & Status"> mode to define more easily +what variables you want to monitor. Behind the scenes they are compiled to a +list of expressions, and then into a column list so they can be treated just +like columns in any other table, in terms of data extraction and +transformations. However, you're protected from the tedious details by a syntax +that ought to feel very natural to you: a SQL SELECT list. + +The data source for variable sets, and indeed the entire S mode, is the +combination of SHOW STATUS, SHOW VARIABLES, and SHOW INNODB STATUS. Imagine +that you had a huge table with one column per variable returned from those +statements. That's the data source for variable sets. You can now query this +data source just like you'd expect. For example: + + Questions, Uptime, Questions/Uptime as QPS + +Behind the scenes innotop will split that variable set into three expressions, +compile them and turn them into a table definition, then extract as usual. This +becomes a "variable set," or a "list of variables you want to monitor." + +innotop lets you name and save your variable sets, and writes them to the +configuration file. You can choose which variable set you want to see with the +'c' key, or activate the next and previous sets with the '>' and '<' keys. +There are many built-in variable sets as well, which should give you a good +start for creating your own. Press 'e' to edit the current variable set, or +just to see how it's defined. To create a new one, just press 'c' and type its +name. + +You may want to use some of the functions listed in L<"TRANSFORMATIONS"> to help +format the results. In particular, L<"set_precision"> is often useful to limit +the number of digits you see. Extending the above example, here's how: + + Questions, Uptime, set_precision(Questions/Uptime) as QPS + +Actually, this still needs a little more work. If your L<"interval"> is less +than one second, you might be dividing by zero because Uptime is incremental in +this mode by default. Instead, use Uptime_hires: + + Questions, Uptime, set_precision(Questions/Uptime_hires) as QPS + +This example is simple, but it shows how easy it is to choose which variables +you want to monitor. + +=head1 PLUGINS + +innotop has a simple but powerful plugin mechanism by which you can extend +or modify its existing functionality, and add new functionality. innotop's +plugin functionality is event-based: plugins register themselves to be called +when events happen. They then have a chance to influence the event. + +An innotop plugin is a Perl module placed in innotop's L<"plugin_dir"> +directory. On UNIX systems, you can place a symbolic link to the module instead +of putting the actual file there. innotop automatically discovers the file. If +there is a corresponding entry in the L<"plugins"> configuration file section, +innotop loads and activates the plugin. + +The module must conform to innotop's plugin interface. Additionally, the source +code of the module must be written in such a way that innotop can inspect the +file and determine the package name and description. + +=head2 Package Source Convention + +innotop inspects the plugin module's source to determine the Perl package name. +It looks for a line of the form "package Foo;" and if found, considers the +plugin's package name to be Foo. Of course the package name can be a valid Perl +package name, with double semicolons and so on. + +It also looks for a description in the source code, to make the plugin editor +more human-friendly. The description is a comment line of the form "# +description: Foo", where "Foo" is the text innotop will consider to be the +plugin's description. + +=head2 Plugin Interface + +The innotop plugin interface is quite simple: innotop expects the plugin to be +an object-oriented module it can call certain methods on. The methods are + +=over + +=item new(%variables) + +This is the plugin's constructor. It is passed a hash of innotop's variables, +which it can manipulate (see L<"Plugin Variables">). It must return a reference +to the newly created plugin object. + +At construction time, innotop has only loaded the general configuration and +created the default built-in variables with their default contents (which is +quite a lot). Therefore, the state of the program is exactly as in the innotop +source code, plus the configuration variables from the L<"general"> section in +the config file. + +If your plugin manipulates the variables, it is changing global data, which is +shared by innotop and all plugins. Plugins are loaded in the order they're +listed in the config file. Your plugin may load before or after another plugin, +so there is a potential for conflict or interaction between plugins if they +modify data other plugins use or modify. + +=item register_for_events() + +This method must return a list of events in which the plugin is interested, if +any. See L<"Plugin Events"> for the defined events. If the plugin returns an +event that's not defined, the event is ignored. + +=item event handlers + +The plugin must implement a method named the same as each event for which it has +registered. In other words, if the plugin returns qw(foo bar) from +register_for_events(), it must have foo() and bar() methods. These methods are +callbacks for the events. See L<"Plugin Events"> for more details about each +event. + +=back + +=head2 Plugin Variables + +The plugin's constructor is passed a hash of innotop's variables, which it can +manipulate. It is probably a good idea if the plugin object saves a copy of it +for later use. The variables are defined in the innotop variable +%pluggable_vars, and are as follows: + +=over + +=item action_for + +A hashref of key mappings. These are innotop's global hot-keys. + +=item agg_funcs + +A hashref of functions that can be used for grouping. See L<"GROUPING">. + +=item config + +The global configuration hash. + +=item connections + +A hashref of connection specifications. These are just specifications of how to +connect to a server. + +=item dbhs + +A hashref of innotop's database connections. These are actual DBI connection +objects. + +=item filters + +A hashref of filters applied to table rows. See L<"FILTERS"> for more. + +=item modes + +A hashref of modes. See L<"MODES"> for more. + +=item server_groups + +A hashref of server groups. See L<"SERVER GROUPS">. + +=item tbl_meta + +A hashref of innotop's table meta-data, with one entry per table (see +L<"TABLES"> for more information). + +=item trans_funcs + +A hashref of transformation functions. See L<"TRANSFORMATIONS">. + +=item var_sets + +A hashref of variable sets. See L<"VARIABLE SETS">. + +=back + +=head2 Plugin Events + +Each event is defined somewhere in the innotop source code. When innotop runs +that code, it executes the callback function for each plugin that expressed its +interest in the event. innotop passes some data for each event. The events are +defined in the %event_listener_for variable, and are as follows: + +=over + +=item extract_values($set, $cur, $pre, $tbl) + +This event occurs inside the function that extracts values from a data source. +The arguments are the set of values, the current values, the previous values, +and the table name. + +=item set_to_tbl + +Events are defined at many places in this subroutine, which is responsible for +turning an arrayref of hashrefs into an arrayref of lines that can be printed to +the screen. The events all pass the same data: an arrayref of rows and the name +of the table being created. The events are set_to_tbl_pre_filter, +set_to_tbl_pre_sort,set_to_tbl_pre_group, set_to_tbl_pre_colorize, +set_to_tbl_pre_transform, set_to_tbl_pre_pivot, set_to_tbl_pre_create, +set_to_tbl_post_create. + +=item draw_screen($lines) + +This event occurs inside the subroutine that prints the lines to the screen. +$lines is an arrayref of strings. + +=back + +=head2 Simple Plugin Example + +The easiest way to explain the plugin functionality is probably with a simple +example. The following module adds a column to the beginning of every table and +sets its value to 1. + + use strict; + use warnings FATAL => 'all'; + + package Innotop::Plugin::Example; + # description: Adds an 'example' column to every table + + sub new { + my ( $class, %vars ) = @_; + # Store reference to innotop's variables in $self + my $self = bless { %vars }, $class; + + # Design the example column + my $col = { + hdr => 'Example', + just => '', + dec => 0, + num => 1, + label => 'Example', + src => 'example', # Get data from this column in the data source + tbl => '', + trans => [], + }; + + # Add the column to every table. + my $tbl_meta = $vars{tbl_meta}; + foreach my $tbl ( values %$tbl_meta ) { + # Add the column to the list of defined columns + $tbl->{cols}->{example} = $col; + # Add the column to the list of visible columns + unshift @{$tbl->{visible}}, 'example'; + } + + # Be sure to return a reference to the object. + return $self; + } + + # I'd like to be called when a data set is being rendered into a table, please. + sub register_for_events { + my ( $self ) = @_; + return qw(set_to_tbl_pre_filter); + } + + # This method will be called when the event fires. + sub set_to_tbl_pre_filter { + my ( $self, $rows, $tbl ) = @_; + # Set the example column's data source to the value 1. + foreach my $row ( @$rows ) { + $row->{example} = 1; + } + } + + 1; + +=head2 Plugin Editor + +The plugin editor lets you view the plugins innotop discovered and activate or +deactivate them. Start the editor by pressing $ to start the configuration +editor from any mode. Press the 'p' key to start the plugin editor. You'll see +a list of plugins innotop discovered. You can use the 'j' and 'k' keys to move +the highlight to the desired one, then press the * key to toggle it active or +inactive. Exit the editor and restart innotop for the changes to take effect. + +=head1 SQL STATEMENTS + +innotop uses a limited set of SQL statements to retrieve data from MySQL for +display. The statements are customized depending on the server version against +which they are executed; for example, on MySQL 5 and newer, INNODB_STATUS +executes "SHOW ENGINE INNODB STATUS", while on earlier versions it executes +"SHOW INNODB STATUS". The statements are as follows: + + Statement SQL executed + =================== =============================== + INNODB_STATUS SHOW [ENGINE] INNODB STATUS + KILL_CONNECTION KILL + KILL_QUERY KILL QUERY + OPEN_TABLES SHOW OPEN TABLES + PROCESSLIST SHOW FULL PROCESSLIST + SHOW_MASTER_LOGS SHOW MASTER LOGS + SHOW_MASTER_STATUS SHOW MASTER STATUS + SHOW_SLAVE_STATUS SHOW SLAVE STATUS + SHOW_STATUS SHOW [GLOBAL] STATUS + SHOW_VARIABLES SHOW [GLOBAL] VARIABLES + +=head1 DATA SOURCES + +Each time innotop extracts values to create a table (see L<"EXPRESSIONS"> and +L<"TABLES">), it does so from a particular data source. Largely because of the +complex data extracted from SHOW INNODB STATUS, this is slightly messy. SHOW +INNODB STATUS contains a mixture of single values and repeated values that form +nested data sets. + +Whenever innotop fetches data from MySQL, it adds two extra bits to each set: +cxn and Uptime_hires. cxn is the name of the connection from which the data +came. Uptime_hires is a high-resolution version of the server's Uptime status +variable, which is important if your L<"interval"> setting is sub-second. + +Here are the kinds of data sources from which data is extracted: + +=over + +=item STATUS_VARIABLES + +This is the broadest category, into which the most kinds of data fall. It +begins with the combination of SHOW STATUS and SHOW VARIABLES, but other sources +may be included as needed, for example, SHOW MASTER STATUS and SHOW SLAVE +STATUS, as well as many of the non-repeated values from SHOW INNODB STATUS. + +=item DEADLOCK_LOCKS + +This data is extracted from the transaction list in the LATEST DETECTED DEADLOCK +section of SHOW INNODB STATUS. It is nested two levels deep: transactions, then +locks. + +=item DEADLOCK_TRANSACTIONS + +This data is from the transaction list in the LATEST DETECTED DEADLOCK +section of SHOW INNODB STATUS. It is nested one level deep. + +=item EXPLAIN + +This data is from the result set returned by EXPLAIN. + +=item INNODB_TRANSACTIONS + +This data is from the TRANSACTIONS section of SHOW INNODB STATUS. + +=item IO_THREADS + +This data is from the list of threads in the the FILE I/O section of SHOW INNODB +STATUS. + +=item INNODB_LOCKS + +This data is from the TRANSACTIONS section of SHOW INNODB STATUS and is nested +two levels deep. + +=item OPEN_TABLES + +This data is from SHOW OPEN TABLES. + +=item PROCESSLIST + +This data is from SHOW FULL PROCESSLIST. + +=item OS_WAIT_ARRAY + +This data is from the SEMAPHORES section of SHOW INNODB STATUS and is nested one +level deep. It comes from the lines that look like this: + + --Thread 1568861104 has waited at btr0cur.c line 424 .... + +=back + +=head1 MYSQL PRIVILEGES + +=over + +=item * + +You must connect to MySQL as a user who has the SUPER privilege for many of the +functions. + +=item * + +If you don't have the SUPER privilege, you can still run some functions, but you +won't necessarily see all the same data. + +=item * + +You need the PROCESS privilege to see the list of currently running queries in Q +mode. + +=item * + +You need special privileges to start and stop slave servers. + +=item * + +You need appropriate privileges to create and drop the deadlock tables if needed +(see L<"SERVER CONNECTIONS">). + +=back + +=head1 SYSTEM REQUIREMENTS + +You need Perl to run innotop, of course. You also need a few Perl modules: DBI, +DBD::mysql, Term::ReadKey, and Time::HiRes. These should be included with most +Perl distributions, but in case they are not, I recommend using versions +distributed with your operating system or Perl distribution, not from CPAN. +Term::ReadKey in particular has been known to cause problems if installed from +CPAN. + +If you have Term::ANSIColor, innotop will use it to format headers more readably +and compactly. (Under Microsoft Windows, you also need Win32::Console::ANSI for +terminal formatting codes to be honored). If you install Term::ReadLine, +preferably Term::ReadLine::Gnu, you'll get nice auto-completion support. + +I run innotop on Gentoo GNU/Linux, Debian and Ubuntu, and I've had feedback from +people successfully running it on Red Hat, CentOS, Solaris, and Mac OSX. I +don't see any reason why it won't work on other UNIX-ish operating systems, but +I don't know for sure. It also runs on Windows under ActivePerl without +problem. + +innotop has been used on MySQL versions 3.23.58, 4.0.27, 4.1.0, 4.1.22, 5.0.26, +5.1.15, and 5.2.3. If it doesn't run correctly for you, that is a bug that +should be reported. + +=head1 FILES + +$HOMEDIR/.innotop and/or /etc/innotop are used to store +configuration information. Files include the configuration file innotop.conf, +the core_dump file which contains verbose error messages if L<"debug"> is +enabled, and the plugins/ subdirectory. + +=head1 GLOSSARY OF TERMS + +=over + +=item tick + +A tick is a refresh event, when innotop re-fetches data from connections and +displays it. + +=back + +=head1 ACKNOWLEDGEMENTS + +The following people and organizations are acknowledged for various reasons. +Hopefully no one has been forgotten. + +Allen K. Smith, +Aurimas Mikalauskas, +Bartosz Fenski, +Brian Miezejewski, +Christian Hammers, +Cyril Scetbon, +Dane Miller, +David Multer, +Dr. Frank Ullrich, +Giuseppe Maxia, +Google.com Site Reliability Engineers, +Google Code, +Jan Pieter Kunst, +Jari Aalto, +Jay Pipes, +Jeremy Zawodny, +Johan Idren, +Kristian Kohntopp, +Lenz Grimmer, +Maciej Dobrzanski, +Michiel Betel, +MySQL AB, +Paul McCullagh, +Sebastien Estienne, +Sourceforge.net, +Steven Kreuzer, +The Gentoo MySQL Team, +Trevor Price, +Yaar Schnitman, +and probably more people that have not been included. + +(If your name has been misspelled, it's probably out of fear of putting +international characters into this documentation; earlier versions of Perl might +not be able to compile it then). + +=head1 COPYRIGHT, LICENSE AND WARRANTY + +This program is copyright (c) 2006 Baron Schwartz. +Feedback and improvements are welcome. + +THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +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; OR the Perl Artistic License. On UNIX and similar +systems, you can issue `man perlgpl' or `man perlartistic' to read these +licenses. + +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. + +Execute innotop and press '!' to see this information at any time. + +=head1 AUTHOR + +Originally written by Baron Schwartz; currently maintained by Aaron Racine. + +=head1 BUGS + +You can report bugs, ask for improvements, and get other help and support at +L. There are mailing lists, a source code +browser, a bug tracker, etc. Please use these instead of contacting the +maintainer or author directly, as it makes our job easier and benefits others if the +discussions are permanent and public. Of course, if you need to contact us in +private, please do. + +=cut diff --git a/packaging/deb-in/extra/innotop/innotop.1 b/packaging/deb-in/extra/innotop/innotop.1 new file mode 100644 index 000000000000..b2e7fce084eb --- /dev/null +++ b/packaging/deb-in/extra/innotop/innotop.1 @@ -0,0 +1,2084 @@ +.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.07) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "INNOTOP 1" +.TH INNOTOP 1 "2009-03-09" "perl v5.10.0" "User Contributed Perl Documentation" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +innotop \- MySQL and InnoDB transaction/status monitor. +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +To monitor servers normally: +.PP +.Vb 1 +\& innotop +.Ve +.PP +To monitor InnoDB status information from a file: +.PP +.Vb 1 +\& innotop /var/log/mysql/mysqld.err +.Ve +.PP +To run innotop non-interactively in a pipe-and-filter configuration: +.PP +.Vb 1 +\& innotop \-\-count 5 \-d 1 \-n +.Ve +.PP +To monitor a database on another system using a particular username and password: +.PP +.Vb 1 +\& innotop \-u \-p \-h +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +innotop monitors MySQL servers. Each of its modes shows you a different aspect +of what's happening in the server. For example, there's a mode for monitoring +replication, one for queries, and one for transactions. innotop refreshes its +data periodically, so you see an updating view. +.PP +innotop has lots of features for power users, but you can start and run it with +virtually no configuration. If you're just getting started, see +\&\*(L"QUICK-START\*(R". Press '?' at any time while running innotop for +context-sensitive help. +.SH "QUICK-START" +.IX Header "QUICK-START" +To start innotop, open a terminal or command prompt. If you have installed +innotop on your system, you should be able to just type \*(L"innotop\*(R" and press +Enter; otherwise, you will need to change to innotop's directory and type \*(L"perl +innotop\*(R". +.PP +With no options specified, innotop will attempt to connect to a MySQL server on +localhost using mysql_read_default_group=client for other connection +parameters. If you need to specify a different username and password, use the +\&\-u and \-p options, respectively. To monitor a MySQL database on another +host, use the \-h option. +.PP +After you've connected, innotop should show you something like the following: +.PP +.Vb 1 +\& [RO] Query List (? for help) localhost, 01:11:19, 449.44 QPS, 14/7/163 con/run +\& +\& CXN When Load QPS Slow QCacheHit KCacheHit BpsIn BpsOut +\& localhost Total 0.00 1.07k 697 0.00% 98.17% 476.83k 242.83k +\& +\& CXN Cmd ID User Host DB Time Query +\& localhost Query 766446598 test 10.0.0.1 foo 00:02 INSERT INTO table ( +.Ve +.PP +(This sample is truncated at the right so it will fit on a terminal when running +\&'man innotop') +.PP +If your server is busy, you'll see more output. Notice the first line on the +screen, which tells you that readonly is set to true ([\s-1RO\s0]), what mode you're +in and what server you're connected to. You can change to other modes with +keystrokes; press 'T' to switch to a list of InnoDB transactions, for example. +.PP +Press the '?' key to see what keys are active in the current mode. You can +press any of these keys and innotop will either take the requested action or +prompt you for more input. If your system has Term::ReadLine support, you can +use \s-1TAB\s0 and other keys to auto-complete and edit input. +.PP +To quit innotop, press the 'q' key. +.SH "OPTIONS" +.IX Header "OPTIONS" +innotop is mostly configured via its configuration file, but some of the +configuration options can come from the command line. You can also specify a +file to monitor for InnoDB status output; see \*(L"\s-1MONITORING\s0 A \s-1FILE\s0\*(R" for more +details. +.PP +You can negate some options by prefixing the option name with \-\-no. For +example, \-\-noinc (or \-\-no\-inc) negates \*(L"\-\-inc\*(R". +.IP "\-\-color" 4 +.IX Item "--color" +Enable or disable terminal coloring. Corresponds to the \*(L"color\*(R" config file +setting. +.IP "\-\-config" 4 +.IX Item "--config" +Specifies a configuration file to read. This option is non-sticky, that is to +say it does not persist to the configuration file itself. +.IP "\-\-count" 4 +.IX Item "--count" +Refresh only the specified number of times (ticks) before exiting. Each refresh +is a pause for \*(L"interval\*(R" seconds, followed by requesting data from MySQL +connections and printing it to the terminal. +.IP "\-\-delay" 4 +.IX Item "--delay" +Specifies the amount of time to pause between ticks (refreshes). Corresponds to +the configuration option \*(L"interval\*(R". +.IP "\-\-help" 4 +.IX Item "--help" +Print a summary of command-line usage and exit. +.IP "\-\-host" 4 +.IX Item "--host" +Host to connect to. +.IP "\-\-inc" 4 +.IX Item "--inc" +Specifies whether innotop should display absolute numbers or relative numbers +(offsets from their previous values). Corresponds to the configuration option +\&\*(L"status_inc\*(R". +.IP "\-\-mode" 4 +.IX Item "--mode" +Specifies the mode in which innotop should start. Corresponds to the +configuration option \*(L"mode\*(R". +.IP "\-\-nonint" 4 +.IX Item "--nonint" +Enable non-interactive operation. See \*(L"NON-INTERACTIVE \s-1OPERATION\s0\*(R" for more. +.IP "\-\-password" 4 +.IX Item "--password" +Password to use for connection. +.IP "\-\-port" 4 +.IX Item "--port" +Port to use for connection. +.IP "\-\-skipcentral" 4 +.IX Item "--skipcentral" +Don't read the central configuration file. +.IP "\-\-user" 4 +.IX Item "--user" +User to use for connection. +.IP "\-\-version" 4 +.IX Item "--version" +Output version information and exit. +.IP "\-\-write" 4 +.IX Item "--write" +Sets the configuration option \*(L"readonly\*(R" to 0, making innotop write the +running configuration to ~/.innotop/innotop.conf on exit, if no configuration +file was loaded at start-up. +.SH "HOTKEYS" +.IX Header "HOTKEYS" +innotop is interactive, and you control it with key-presses. +.IP "\(bu" 4 +Uppercase keys switch between modes. +.IP "\(bu" 4 +Lowercase keys initiate some action within the current mode. +.IP "\(bu" 4 +Other keys do something special like change configuration or show the +innotop license. +.PP +Press '?' at any time to see the currently active keys and what they do. +.SH "MODES" +.IX Header "MODES" +Each of innotop's modes retrieves and displays a particular type of data from +the servers you're monitoring. You switch between modes with uppercase keys. +The following is a brief description of each mode, in alphabetical order. To +switch to the mode, press the key listed in front of its heading in the +following list: +.IP "B: InnoDB Buffers" 4 +.IX Item "B: InnoDB Buffers" +This mode displays information about the InnoDB buffer pool, page statistics, +insert buffer, and adaptive hash index. The data comes from \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. +.Sp +This mode contains the \*(L"buffer_pool\*(R", \*(L"page_statistics\*(R", +\&\*(L"insert_buffers\*(R", and \*(L"adaptive_hash_index\*(R" tables by default. +.IP "C: Command Summary" 4 +.IX Item "C: Command Summary" +This mode is similar to mytop's Command Summary mode. It shows the +\&\*(L"cmd_summary\*(R" table, which looks something like the following: +.Sp +.Vb 8 +\& Command Summary (? for help) localhost, 25+07:16:43, 2.45 QPS, 3 thd, 5.0.40 +\& _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ Command Summary _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ +\& Name Value Pct Last Incr Pct +\& Select_scan 3244858 69.89% 2 100.00% +\& Select_range 1354177 29.17% 0 0.00% +\& Select_full_join 39479 0.85% 0 0.00% +\& Select_full_range_join 4097 0.09% 0 0.00% +\& Select_range_check 0 0.00% 0 0.00% +.Ve +.Sp +The command summary table is built by extracting variables from +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". The variables must be numeric and must match the prefix +given by the \*(L"cmd_filter\*(R" configuration variable. The variables are then +sorted by value descending and compared to the last variable, as shown above. +The percentage columns are percentage of the total of all variables in the +table, so you can see the relative weight of the variables. +.Sp +The example shows what you see if the prefix is \*(L"Select_\*(R". The default +prefix is \*(L"Com_\*(R". You can choose a prefix with the 's' key. +.Sp +It's rather like running \s-1SHOW\s0 \s-1VARIABLES\s0 \s-1LIKE\s0 \*(L"prefix%\*(R" with memory and +nice formatting. +.Sp +Values are aggregated across all servers. The Pct columns are not correctly +aggregated across multiple servers. This is a known limitation of the grouping +algorithm that may be fixed in the future. +.IP "D: InnoDB Deadlocks" 4 +.IX Item "D: InnoDB Deadlocks" +This mode shows the transactions involved in the last InnoDB deadlock. A second +table shows the locks each transaction held and waited for. A deadlock is +caused by a cycle in the waits-for graph, so there should be two locks held and +one waited for unless the deadlock information is truncated. +.Sp +InnoDB puts deadlock information before some other information in the \s-1SHOW\s0 +\&\s-1INNODB\s0 \s-1STATUS\s0 output. If there are a lot of locks, the deadlock information can +grow very large, and there is a limit on the size of the \s-1SHOW\s0 \s-1INNODB\s0 +\&\s-1STATUS\s0 output. A large deadlock can fill the entire output, or even be +truncated, and prevent you from seeing other information at all. If you are +running innotop in another mode, for example T mode, and suddenly you don't see +anything, you might want to check and see if a deadlock has wiped out the data +you need. +.Sp +If it has, you can create a small deadlock to replace the large one. Use the +\&'w' key to 'wipe' the large deadlock with a small one. This will not work +unless you have defined a deadlock table for the connection (see \*(L"\s-1SERVER\s0 +\&\s-1CONNECTIONS\s0\*(R"). +.Sp +You can also configure innotop to automatically detect when a large deadlock +needs to be replaced with a small one (see \*(L"auto_wipe_dl\*(R"). +.Sp +This mode displays the \*(L"deadlock_transactions\*(R" and \*(L"deadlock_locks\*(R" tables +by default. +.IP "F: InnoDB Foreign Key Errors" 4 +.IX Item "F: InnoDB Foreign Key Errors" +This mode shows the last InnoDB foreign key error information, such as the +table where it happened, when and who and what query caused it, and so on. +.Sp +InnoDB has a huge variety of foreign key error messages, and many of them are +just hard to parse. innotop doesn't always do the best job here, but there's +so much code devoted to parsing this messy, unparseable output that innotop is +likely never to be perfect in this regard. If innotop doesn't show you what +you need to see, just look at the status text directly. +.Sp +This mode displays the \*(L"fk_error\*(R" table by default. +.IP "I: InnoDB I/O Info" 4 +.IX Item "I: InnoDB I/O Info" +This mode shows InnoDB's I/O statistics, including the I/O threads, pending I/O, +file I/O miscellaneous, and log statistics. It displays the \*(L"io_threads\*(R", +\&\*(L"pending_io\*(R", \*(L"file_io_misc\*(R", and \*(L"log_statistics\*(R" tables by default. +.IP "L: Locks" 4 +.IX Item "L: Locks" +This mode shows information about current locks. At the moment only InnoDB +locks are supported, and by default you'll only see locks for which transactions +are waiting. This information comes from the \s-1TRANSACTIONS\s0 section of the InnoDB +status text. If you have a very busy server, you may have frequent lock waits; +it helps to be able to see which tables and indexes are the \*(L"hot spot\*(R" for +locks. If your server is running pretty well, this mode should show nothing. +.Sp +You can configure MySQL and innotop to monitor not only locks for which a +transaction is waiting, but those currently held, too. You can do this with the +InnoDB Lock Monitor (). It's +not documented in the MySQL manual, but creating the lock monitor with the +following statement also affects the output of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0, which innotop +uses: +.Sp +.Vb 1 +\& CREATE TABLE innodb_lock_monitor(a int) ENGINE=INNODB; +.Ve +.Sp +This causes InnoDB to print its output to the MySQL file every 16 seconds or so, +as stated in the manual, but it also makes the normal \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 output +include lock information, which innotop can parse and display (that's the +undocumented feature). +.Sp +This means you can do what may have seemed impossible: to a limited extent +(InnoDB truncates some information in the output), you can see which transaction +holds the locks something else is waiting for. You can also enable and disable +the InnoDB Lock Monitor with the key mappings in this mode. +.Sp +This mode displays the \*(L"innodb_locks\*(R" table by default. Here's a sample of +the screen when one connection is waiting for locks another connection holds: +.Sp +.Vb 7 +\& _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ InnoDB Locks _\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_\|_ +\& CXN ID Type Waiting Wait Active Mode DB Table Index +\& localhost 12 RECORD 1 00:10 00:10 X test t1 PRIMARY +\& localhost 12 TABLE 0 00:10 00:10 IX test t1 +\& localhost 12 RECORD 1 00:10 00:10 X test t1 PRIMARY +\& localhost 11 TABLE 0 00:00 00:25 IX test t1 +\& localhost 11 RECORD 0 00:00 00:25 X test t1 PRIMARY +.Ve +.Sp +You can see the first connection, \s-1ID\s0 12, is waiting for a lock on the \s-1PRIMARY\s0 +key on test.t1, and has been waiting for 10 seconds. The second connection +isn't waiting, because the Waiting column is 0, but it holds locks on the same +index. That tells you connection 11 is blocking connection 12. +.IP "M: Master/Slave Replication Status" 4 +.IX Item "M: Master/Slave Replication Status" +This mode shows the output of \s-1SHOW\s0 \s-1SLAVE\s0 \s-1STATUS\s0 and \s-1SHOW\s0 \s-1MASTER\s0 \s-1STATUS\s0 in three +tables. The first two divide the slave's status into \s-1SQL\s0 and I/O thread status, +and the last shows master status. Filters are applied to eliminate non-slave +servers from the slave tables, and non-master servers from the master table. +.Sp +This mode displays the \*(L"slave_sql_status\*(R", \*(L"slave_io_status\*(R", and +\&\*(L"master_status\*(R" tables by default. +.IP "O: Open Tables" 4 +.IX Item "O: Open Tables" +This section comes from MySQL's \s-1SHOW\s0 \s-1OPEN\s0 \s-1TABLES\s0 command. By default it is +filtered to show tables which are in use by one or more queries, so you can +get a quick look at which tables are 'hot'. You can use this to guess which +tables might be locked implicitly. +.Sp +This mode displays the \*(L"open_tables\*(R" mode by default. +.IP "Q: Query List" 4 +.IX Item "Q: Query List" +This mode displays the output from \s-1SHOW\s0 \s-1FULL\s0 \s-1PROCESSLIST\s0, much like \fBmytop\fR's +query list mode. This mode does \fBnot\fR show InnoDB-related information. This +is probably one of the most useful modes for general usage. +.Sp +There is an informative header that shows general status information about +your server. You can toggle it on and off with the 'h' key. By default, +innotop hides inactive processes and its own process. You can toggle these on +and off with the 'i' and 'a' keys. +.Sp +You can \s-1EXPLAIN\s0 a query from this mode with the 'e' key. This displays the +query's full text, the results of \s-1EXPLAIN\s0, and in newer MySQL versions, even +the optimized query resulting from \s-1EXPLAIN\s0 \s-1EXTENDED\s0. innotop also tries to +rewrite certain queries to make them EXPLAIN-able. For example, \s-1INSERT/SELECT\s0 +statements are rewritable. +.Sp +This mode displays the \*(L"q_header\*(R" and \*(L"processlist\*(R" tables by default. +.IP "R: InnoDB Row Operations and Semaphores" 4 +.IX Item "R: InnoDB Row Operations and Semaphores" +This mode shows InnoDB row operations, row operation miscellaneous, semaphores, +and information from the wait array. It displays the \*(L"row_operations\*(R", +\&\*(L"row_operation_misc\*(R", \*(L"semaphores\*(R", and \*(L"wait_array\*(R" tables by default. +.IP "S: Variables & Status" 4 +.IX Item "S: Variables & Status" +This mode calculates statistics, such as queries per second, and prints them out +in several different styles. You can show absolute values, or incremental values +between ticks. +.Sp +You can switch between the views by pressing a key. The 's' key prints a +single line each time the screen updates, in the style of \fBvmstat\fR. The 'g' +key changes the view to a graph of the same numbers, sort of like \fBtload\fR. +The 'v' key changes the view to a pivoted table of variable names on the left, +with successive updates scrolling across the screen from left to right. You can +choose how many updates to put on the screen with the \*(L"num_status_sets\*(R" +configuration variable. +.Sp +Headers may be abbreviated to fit on the screen in interactive operation. You +choose which variables to display with the 'c' key, which selects from +predefined sets, or lets you create your own sets. You can edit the current set +with the 'e' key. +.Sp +This mode doesn't really display any tables like other modes. Instead, it uses +a table definition to extract and format the data, but it then transforms the +result in special ways before outputting it. It uses the \*(L"var_status\*(R" table +definition for this. +.IP "T: InnoDB Transactions" 4 +.IX Item "T: InnoDB Transactions" +This mode shows transactions from the InnoDB monitor's output, in \fBtop\fR\-like +format. This mode is the reason I wrote innotop. +.Sp +You can kill queries or processes with the 'k' and 'x' keys, and \s-1EXPLAIN\s0 a query +with the 'e' or 'f' keys. InnoDB doesn't print the full query in transactions, +so explaining may not work right if the query is truncated. +.Sp +The informational header can be toggled on and off with the 'h' key. By +default, innotop hides inactive transactions and its own transaction. You can +toggle this on and off with the 'i' and 'a' keys. +.Sp +This mode displays the \*(L"t_header\*(R" and \*(L"innodb_transactions\*(R" tables by +default. +.SH "INNOTOP STATUS" +.IX Header "INNOTOP STATUS" +The first line innotop displays is a \*(L"status bar\*(R" of sorts. What it contains +depends on the mode you're in, and what servers you're monitoring. The first +few words are always [\s-1RO\s0] (if readonly is set to 1), the innotop mode, such as +\&\*(L"InnoDB Txns\*(R" for T mode, followed by a reminder to press '?' for help at any +time. +.SS "\s-1ONE\s0 \s-1SERVER\s0" +.IX Subsection "ONE SERVER" +The simplest case is when you're monitoring a single server. In this case, the +name of the connection is next on the status line. This is the name you gave +when you created the connection \*(-- most likely the MySQL server's hostname. +This is followed by the server's uptime. +.PP +If you're in an InnoDB mode, such as T or B, the next word is \*(L"InnoDB\*(R" followed +by some information about the \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 output used to render the +screen. The first word is the number of seconds since the last \s-1SHOW\s0 \s-1INNODB\s0 +\&\s-1STATUS\s0, which InnoDB uses to calculate some per-second statistics. The next is +a smiley face indicating whether the InnoDB output is truncated. If the smiley +face is a :\-), all is well; there is no truncation. A :^| means the transaction +list is so long, InnoDB has only printed out some of the transactions. Finally, +a frown :\-( means the output is incomplete, which is probably due to a deadlock +printing too much lock information (see \*(L"D: InnoDB Deadlocks\*(R"). +.PP +The next two words indicate the server's queries per second (\s-1QPS\s0) and how many +threads (connections) exist. Finally, the server's version number is the last +thing on the line. +.SS "\s-1MULTIPLE\s0 \s-1SERVERS\s0" +.IX Subsection "MULTIPLE SERVERS" +If you are monitoring multiple servers (see \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R"), the status +line does not show any details about individual servers. Instead, it shows the +names of the connections that are active. Again, these are connection names you +specified, which are likely to be the server's hostname. A connection that has +an error is prefixed with an exclamation point. +.PP +If you are monitoring a group of servers (see \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R"), the status +line shows the name of the group. If any connection in the group has an +error, the group's name is followed by the fraction of the connections that +don't have errors. +.PP +See \*(L"\s-1ERROR\s0 \s-1HANDLING\s0\*(R" for more details about innotop's error handling. +.SS "\s-1MONITORING\s0 A \s-1FILE\s0" +.IX Subsection "MONITORING A FILE" +If you give a filename on the command line, innotop will not connect to \s-1ANY\s0 +servers at all. It will watch the specified file for InnoDB status output and +use that as its data source. It will always show a single connection called +\&'file'. And since it can't connect to a server, it can't determine how long the +server it's monitoring has been up; so it calculates the server's uptime as time +since innotop started running. +.SH "SERVER ADMINISTRATION" +.IX Header "SERVER ADMINISTRATION" +While innotop is primarily a monitor that lets you watch and analyze your +servers, it can also send commands to servers. The most frequently useful +commands are killing queries and stopping or starting slaves. +.PP +You can kill a connection, or in newer versions of MySQL kill a query but not a +connection, from \*(L"Q: Query List\*(R" and \*(L"T: InnoDB Transactions\*(R" modes. +Press 'k' to issue a \s-1KILL\s0 command, or 'x' to issue a \s-1KILL\s0 \s-1QUERY\s0 command. +innotop will prompt you for the server and/or connection \s-1ID\s0 to kill (innotop +does not prompt you if there is only one possible choice for any input). +innotop pre-selects the longest-running query, or the oldest connection. +Confirm the command with 'y'. +.PP +In \*(L"Slave Replication Status\*(R"\*(L" in \*(R"M: Master mode, you can start and stop slaves +with the 'a' and 'o' keys, respectively. You can send these commands to many +slaves at once. innotop fills in a default command of \s-1START\s0 \s-1SLAVE\s0 or \s-1STOP\s0 \s-1SLAVE\s0 +for you, but you can actually edit the command and send anything you wish, such +as \s-1SET\s0 \s-1GLOBAL\s0 SQL_SLAVE_SKIP_COUNTER=1 to make the slave skip one binlog event +when it starts. +.PP +You can also ask innotop to calculate the earliest binlog in use by any slave +and issue a \s-1PURGE\s0 \s-1MASTER\s0 \s-1LOGS\s0 on the master. Use the 'b' key for this. innotop +will prompt you for a master to run the command on, then prompt you for the +connection names of that master's slaves (there is no way for innotop to +determine this reliably itself). innotop will find the minimum binlog in use by +these slave connections and suggest it as the argument to \s-1PURGE\s0 \s-1MASTER\s0 \s-1LOGS\s0. +.SH "SERVER CONNECTIONS" +.IX Header "SERVER CONNECTIONS" +When you create a server connection using '@', innotop asks you for a series of +inputs, as follows: +.IP "\s-1DSN\s0" 4 +.IX Item "DSN" +A \s-1DSN\s0 is a Data Source Name, which is the initial argument passed to the \s-1DBI\s0 +module for connecting to a server. It is usually of the form +.Sp +.Vb 1 +\& DBI:mysql:;mysql_read_default_group=mysql;host=HOSTNAME +.Ve +.Sp +Since this \s-1DSN\s0 is passed to the DBD::mysql driver, you should read the driver's +documentation at \*(L"/search.cpan.org/dist/DBD\-mysql/lib/DBD/mysql.pm\*(R"\*(L" in \*(R"http: for +the exact details on all the options you can pass the driver in the \s-1DSN\s0. You +can read more about \s-1DBI\s0 at , and especially at +. +.Sp +The mysql_read_default_group=mysql option lets the \s-1DBD\s0 driver read your MySQL +options files, such as ~/.my.cnf on UNIX-ish systems. You can use this to avoid +specifying a username or password for the connection. +.IP "InnoDB Deadlock Table" 4 +.IX Item "InnoDB Deadlock Table" +This optional item tells innotop a table name it can use to deliberately create +a small deadlock (see \*(L"D: InnoDB Deadlocks\*(R"). If you specify this option, +you just need to be sure the table doesn't exist, and that innotop can create +and drop the table with the InnoDB storage engine. You can safely omit or just +accept the default if you don't intend to use this. +.IP "Username" 4 +.IX Item "Username" +innotop will ask you if you want to specify a username. If you say 'y', it will +then prompt you for a user name. If you have a MySQL option file that specifies +your username, you don't have to specify a username. +.Sp +The username defaults to your login name on the system you're running innotop on. +.IP "Password" 4 +.IX Item "Password" +innotop will ask you if you want to specify a password. Like the username, the +password is optional, but there's an additional prompt that asks if you want to +save the password in the innotop configuration file. If you don't save it in +the configuration file, innotop will prompt you for a password each time it +starts. Passwords in the innotop configuration file are saved in plain text, +not encrypted in any way. +.PP +Once you finish answering these questions, you should be connected to a server. +But innotop isn't limited to monitoring a single server; you can define many +server connections and switch between them by pressing the '@' key. See +\&\*(L"\s-1SWITCHING\s0 \s-1BETWEEN\s0 \s-1CONNECTIONS\s0\*(R". +.SH "SERVER GROUPS" +.IX Header "SERVER GROUPS" +If you have multiple MySQL instances, you can put them into named groups, such +as 'all', 'masters', and 'slaves', which innotop can monitor all together. +.PP +You can choose which group to monitor with the '#' key, and you can press the +\&\s-1TAB\s0 key to switch to the next group. If you're not currently monitoring a +group, pressing \s-1TAB\s0 selects the first group. +.PP +To create a group, press the '#' key and type the name of your new group, then +type the names of the connections you want the group to contain. +.SH "SWITCHING BETWEEN CONNECTIONS" +.IX Header "SWITCHING BETWEEN CONNECTIONS" +innotop lets you quickly switch which servers you're monitoring. The most basic +way is by pressing the '@' key and typing the name(s) of the connection(s) you +want to use. This setting is per-mode, so you can monitor different connections +in each mode, and innotop remembers which connections you choose. +.PP +You can quickly switch to the 'next' connection in alphabetical order with the +\&'n' key. If you're monitoring a server group (see \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R") this will +switch to the first connection. +.PP +You can also type many connection names, and innotop will fetch and display data +from them all. Just separate the connection names with spaces, for example +\&\*(L"server1 server2.\*(R" Again, if you type the name of a connection that doesn't +exist, innotop will prompt you for connection information and create the +connection. +.PP +Another way to monitor multiple connections at once is with server groups. You +can use the \s-1TAB\s0 key to switch to the 'next' group in alphabetical order, or if +you're not monitoring any groups, \s-1TAB\s0 will switch to the first group. +.PP +innotop does not fetch data in parallel from connections, so if you are +monitoring a large group or many connections, you may notice increased delay +between ticks. +.PP +When you monitor more than one connection, innotop's status bar changes. See +\&\*(L"\s-1INNOTOP\s0 \s-1STATUS\s0\*(R". +.SH "ERROR HANDLING" +.IX Header "ERROR HANDLING" +Error handling is not that important when monitoring a single connection, but is +crucial when you have many active connections. A crashed server or lost +connection should not crash innotop. As a result, innotop will continue to run +even when there is an error; it just won't display any information from the +connection that had an error. Because of this, innotop's behavior might confuse +you. It's a feature, not a bug! +.PP +innotop does not continue to query connections that have errors, because they +may slow innotop and make it hard to use, especially if the error is a problem +connecting and causes a long time-out. Instead, innotop retries the connection +occasionally to see if the error still exists. If so, it will wait until some +point in the future. The wait time increases in ticks as the Fibonacci series, +so it tries less frequently as time passes. +.PP +Since errors might only happen in certain modes because of the \s-1SQL\s0 commands +issued in those modes, innotop keeps track of which mode caused the error. If +you switch to a different mode, innotop will retry the connection instead of +waiting. +.PP +By default innotop will display the problem in red text at the bottom of the +first table on the screen. You can disable this behavior with the +\&\*(L"show_cxn_errors_in_tbl\*(R" configuration option, which is enabled by default. +If the \*(L"debug\*(R" option is enabled, innotop will display the error at the +bottom of every table, not just the first. And if \*(L"show_cxn_errors\*(R" is +enabled, innotop will print the error text to \s-1STDOUT\s0 as well. Error messages +might only display in the mode that caused the error, depending on the mode and +whether innotop is avoiding querying that connection. +.SH "NON-INTERACTIVE OPERATION" +.IX Header "NON-INTERACTIVE OPERATION" +You can run innotop in non-interactive mode, in which case it is entirely +controlled from the configuration file and command-line options. To start +innotop in non-interactive mode, give the L\*(L"<\-\-nonint\*(R"> command-line option. +This changes innotop's behavior in the following ways: +.IP "\(bu" 4 +Certain Perl modules are not loaded. Term::Readline is not loaded, since +innotop doesn't prompt interactively. Term::ANSIColor and Win32::Console::ANSI +modules are not loaded. Term::ReadKey is still used, since innotop may have to +prompt for connection passwords when starting up. +.IP "\(bu" 4 +innotop does not clear the screen after each tick. +.IP "\(bu" 4 +innotop does not persist any changes to the configuration file. +.IP "\(bu" 4 +If \*(L"\-\-count\*(R" is given and innotop is in incremental mode (see \*(L"status_inc\*(R" +and \*(L"\-\-inc\*(R"), innotop actually refreshes one more time than specified so it +can print incremental statistics. This suppresses output during the first +tick, so innotop may appear to hang. +.IP "\(bu" 4 +innotop only displays the first table in each mode. This is so the output can +be easily processed with other command-line utilities such as awk and sed. To +change which tables display in each mode, see \*(L"\s-1TABLES\s0\*(R". Since \*(L"Q: Query +List\*(R" mode is so important, innotop automatically disables the \*(L"q_header\*(R" +table. This ensures you'll see the \*(L"processlist\*(R" table, even if you have +innotop configured to show the q_header table during interactive operation. +Similarly, in \*(L"T: InnoDB Transactions\*(R" mode, the \*(L"t_header\*(R" table is +suppressed so you see only the \*(L"innodb_transactions\*(R" table. +.IP "\(bu" 4 +All output is tab-separated instead of being column-aligned with whitespace, and +innotop prints the full contents of each table instead of only printing one +screenful at a time. +.IP "\(bu" 4 +innotop only prints column headers once instead of every tick (see +\&\*(L"hide_hdr\*(R"). innotop does not print table captions (see +\&\*(L"display_table_captions\*(R"). innotop ensures there are no empty lines in the +output. +.IP "\(bu" 4 +innotop does not honor the \*(L"shorten\*(R" transformation, which normally shortens +some numbers to human-readable formats. +.IP "\(bu" 4 +innotop does not print a status line (see \*(L"\s-1INNOTOP\s0 \s-1STATUS\s0\*(R"). +.SH "CONFIGURING" +.IX Header "CONFIGURING" +Nearly everything about innotop is configurable. Most things are possible to +change with built-in commands, but you can also edit the configuration file. +.PP +While running innotop, press the '$' key to bring up the configuration editing +dialog. Press another key to select the type of data you want to edit: +.IP "S: Statement Sleep Times" 4 +.IX Item "S: Statement Sleep Times" +Edits \s-1SQL\s0 statement sleep delays, which make innotop pause for the specified +amount of time after executing a statement. See \*(L"\s-1SQL\s0 \s-1STATEMENTS\s0\*(R" for a +definition of each statement and what it does. By default innotop does not +delay after any statements. +.Sp +This feature is included so you can customize the side-effects caused by +monitoring your server. You may not see any effects, but some innotop users +have noticed that certain MySQL versions under very high load with InnoDB +enabled take longer than usual to execute \s-1SHOW\s0 \s-1GLOBAL\s0 \s-1STATUS\s0. If innotop calls +\&\s-1SHOW\s0 \s-1FULL\s0 \s-1PROCESSLIST\s0 immediately afterward, the processlist contains more +queries than the machine actually averages at any given moment. Configuring +innotop to pause briefly after calling \s-1SHOW\s0 \s-1GLOBAL\s0 \s-1STATUS\s0 alleviates this +effect. +.Sp +Sleep times are stored in the \*(L"stmt_sleep_times\*(R" section of the configuration +file. Fractional-second sleeps are supported, subject to your hardware's +limitations. +.IP "c: Edit Columns" 4 +.IX Item "c: Edit Columns" +Starts the table editor on one of the displayed tables. See \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R". +An alternative way to start the table editor without entering the configuration +dialog is with the '^' key. +.IP "g: General Configuration" 4 +.IX Item "g: General Configuration" +Starts the configuration editor to edit global and mode-specific configuration +variables (see \*(L"\s-1MODES\s0\*(R"). innotop prompts you to choose a variable from among +the global and mode-specific ones depending on the current mode. +.IP "k: Row-Coloring Rules" 4 +.IX Item "k: Row-Coloring Rules" +Starts the row-coloring rules editor on one of the displayed table(s). See +\&\*(L"\s-1COLORS\s0\*(R" for details. +.IP "p: Manage Plugins" 4 +.IX Item "p: Manage Plugins" +Starts the plugin configuration editor. See \*(L"\s-1PLUGINS\s0\*(R" for details. +.IP "s: Server Groups" 4 +.IX Item "s: Server Groups" +Lets you create and edit server groups. See \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R". +.IP "t: Choose Displayed Tables" 4 +.IX Item "t: Choose Displayed Tables" +Lets you choose which tables to display in this mode. See \*(L"\s-1MODES\s0\*(R" and +\&\*(L"\s-1TABLES\s0\*(R". +.SH "CONFIGURATION FILE" +.IX Header "CONFIGURATION FILE" +innotop's default configuration file locations are \f(CW$HOME\fR/.innotop and +/etc/innotop/innotop.conf, and they are looked for in that order. If the first +configuration file exists, the second will not be processed. Those can be +overridden with the \*(L"\-\-config\*(R" command-line option. You can edit it by hand +safely, however innotop reads the configuration file when it starts, and, if +readonly is set to 0, writes it out again when it exits. Thus, if readonly is +set to 0, any changes you make by hand while innotop is running will be lost. +.PP +innotop doesn't store its entire configuration in the configuration file. It +has a huge set of default configuration values that it holds only in memory, +and the configuration file only overrides these defaults. When you customize a +default setting, innotop notices, and then stores the customizations into the +file. This keeps the file size down, makes it easier to edit, and makes +upgrades easier. +.PP +A configuration file is read-only be default. You can override that with +\&\*(L"\-\-write\*(R". See \*(L"readonly\*(R". +.PP +The configuration file is arranged into sections like an \s-1INI\s0 file. Each +section begins with [section\-name] and ends with [/section\-name]. Each +section's entries have a different syntax depending on the data they need to +store. You can put comments in the file; any line that begins with a # +character is a comment. innotop will not read the comments, so it won't write +them back out to the file when it exits. Comments in read-only configuration +files are still useful, though. +.PP +The first line in the file is innotop's version number. This lets innotop +notice when the file format is not backwards-compatible, and upgrade smoothly +without destroying your customized configuration. +.PP +The following list describes each section of the configuration file and the data +it contains: +.IP "general" 4 +.IX Item "general" +The 'general' section contains global configuration variables and variables that +may be mode-specific, but don't belong in any other section. The syntax is a +simple key=value list. innotop writes a comment above each value to help you +edit the file by hand. +.RS 4 +.IP "S_func" 4 +.IX Item "S_func" +Controls S mode presentation (see \*(L"S: Variables & Status\*(R"). If g, values are +graphed; if s, values are like vmstat; if p, values are in a pivoted table. +.IP "S_set" 4 +.IX Item "S_set" +Specifies which set of variables to display in \*(L"S: Variables & Status\*(R" mode. +See \*(L"\s-1VARIABLE\s0 \s-1SETS\s0\*(R". +.IP "auto_wipe_dl" 4 +.IX Item "auto_wipe_dl" +Instructs innotop to automatically wipe large deadlocks when it notices them. +When this happens you may notice a slight delay. At the next tick, you will +usually see the information that was being truncated by the large deadlock. +.IP "charset" 4 +.IX Item "charset" +Specifies what kind of characters to allow through the \*(L"no_ctrl_char\*(R" +transformation. This keeps non-printable characters from confusing a +terminal when you monitor queries that contain binary data, such as images. +.Sp +The default is 'ascii', which considers anything outside normal \s-1ASCII\s0 to be a +control character. The other allowable values are 'unicode' and 'none'. 'none' +considers every character a control character, which can be useful for +collapsing \s-1ALL\s0 text fields in queries. +.IP "cmd_filter" 4 +.IX Item "cmd_filter" +This is the prefix that filters variables in \*(L"C: Command Summary\*(R" mode. +.IP "color" 4 +.IX Item "color" +Whether terminal coloring is permitted. +.IP "cxn_timeout" 4 +.IX Item "cxn_timeout" +On MySQL versions 4.0.3 and newer, this variable is used to set the connection's +timeout, so MySQL doesn't close the connection if it is not used for a while. +This might happen because a connection isn't monitored in a particular mode, for +example. +.IP "debug" 4 +.IX Item "debug" +This option enables more verbose errors and makes innotop more strict in some +places. It can help in debugging filters and other user-defined code. It also +makes innotop write a lot of information to \*(L"debugfile\*(R" when there is a +crash. +.IP "debugfile" 4 +.IX Item "debugfile" +A file to which innotop will write information when there is a crash. See +\&\*(L"\s-1FILES\s0\*(R". +.IP "display_table_captions" 4 +.IX Item "display_table_captions" +innotop displays a table caption above most tables. This variable suppresses or +shows captions on all tables globally. Some tables are configured with the +hide_caption property, which overrides this. +.IP "global" 4 +.IX Item "global" +Whether to show \s-1GLOBAL\s0 variables and status. innotop only tries to do this on +servers which support the \s-1GLOBAL\s0 option to \s-1SHOW\s0 \s-1VARIABLES\s0 and \s-1SHOW\s0 \s-1STATUS\s0. In +some MySQL versions, you need certain privileges to do this; if you don't have +them, innotop will not be able to fetch any variable and status data. This +configuration variable lets you run innotop and fetch what data you can even +without the elevated privileges. +.Sp +I can no longer find or reproduce the situation where \s-1GLOBAL\s0 wasn't allowed, but +I know there was one. +.IP "graph_char" 4 +.IX Item "graph_char" +Defines the character to use when drawing graphs in \*(L"S: Variables & Status\*(R" +mode. +.IP "header_highlight" 4 +.IX Item "header_highlight" +Defines how to highlight column headers. This only works if Term::ANSIColor is +available. Valid values are 'bold' and 'underline'. +.IP "hide_hdr" 4 +.IX Item "hide_hdr" +Hides column headers globally. +.IP "interval" 4 +.IX Item "interval" +The interval at which innotop will refresh its data (ticks). The interval is +implemented as a sleep time between ticks, so the true interval will vary +depending on how long it takes innotop to fetch and render data. +.Sp +This variable accepts fractions of a second. +.IP "mode" 4 +.IX Item "mode" +The mode in which innotop should start. Allowable arguments are the same as the +key presses that select a mode interactively. See \*(L"\s-1MODES\s0\*(R". +.IP "num_digits" 4 +.IX Item "num_digits" +How many digits to show in fractional numbers and percents. This variable's +range is between 0 and 9 and can be set directly from \*(L"S: Variables & Status\*(R" +mode with the '+' and '\-' keys. It is used in the \*(L"set_precision\*(R", +\&\*(L"shorten\*(R", and \*(L"percent\*(R" transformations. +.IP "num_status_sets" 4 +.IX Item "num_status_sets" +Controls how many sets of status variables to display in pivoted \*(L"S: Variables +& Status\*(R" mode. It also controls the number of old sets of variables innotop +keeps in its memory, so the larger this variable is, the more memory innotop +uses. +.IP "plugin_dir" 4 +.IX Item "plugin_dir" +Specifies where plugins can be found. By default, innotop stores plugins in the +\&'plugins' subdirectory of your innotop configuration directory. +.IP "readonly" 4 +.IX Item "readonly" +Whether the configuration file is readonly. This cannot be set interactively. +.IP "show_cxn_errors" 4 +.IX Item "show_cxn_errors" +Makes innotop print connection errors to \s-1STDOUT\s0. See \*(L"\s-1ERROR\s0 \s-1HANDLING\s0\*(R". +.IP "show_cxn_errors_in_tbl" 4 +.IX Item "show_cxn_errors_in_tbl" +Makes innotop display connection errors as rows in the first table on screen. +See \*(L"\s-1ERROR\s0 \s-1HANDLING\s0\*(R". +.IP "show_percent" 4 +.IX Item "show_percent" +Adds a '%' character after the value returned by the \*(L"percent\*(R" +transformation. +.IP "show_statusbar" 4 +.IX Item "show_statusbar" +Controls whether to show the status bar in the display. See \*(L"\s-1INNOTOP\s0 +\&\s-1STATUS\s0\*(R". +.IP "skip_innodb" 4 +.IX Item "skip_innodb" +Disables fetching \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0, in case your server(s) do not have InnoDB +enabled and you don't want innotop to try to fetch it. This can also be useful +when you don't have the \s-1SUPER\s0 privilege, required to run \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. +.IP "status_inc" 4 +.IX Item "status_inc" +Whether to show absolute or incremental values for status variables. +Incremental values are calculated as an offset from the last value innotop saw +for that variable. This is a global setting, but will probably become +mode-specific at some point. Right now it is honored a bit inconsistently; some +modes don't pay attention to it. +.RE +.RS 4 +.RE +.IP "plugins" 4 +.IX Item "plugins" +This section holds a list of package names of active plugins. If the plugin +exists, innotop will activate it. See \*(L"\s-1PLUGINS\s0\*(R" for more information. +.IP "filters" 4 +.IX Item "filters" +This section holds user-defined filters (see \*(L"\s-1FILTERS\s0\*(R"). Each line is in the +format filter_name=text='filter text' tbls='table list'. +.Sp +The filter text is the text of the subroutine's code. The table list is a list +of tables to which the filter can apply. By default, user-defined filters apply +to the table for which they were created, but you can manually override that by +editing the definition in the configuration file. +.IP "active_filters" 4 +.IX Item "active_filters" +This section stores which filters are active on each table. Each line is in the +format table_name=filter_list. +.IP "tbl_meta" 4 +.IX Item "tbl_meta" +This section stores user-defined or user-customized columns (see \*(L"\s-1COLUMNS\s0\*(R"). +Each line is in the format col_name=properties, where the properties are a +name=quoted\-value list. +.IP "connections" 4 +.IX Item "connections" +This section holds the server connections you have defined. Each line is in +the format name=properties, where the properties are a name=value list. The +properties are self-explanatory, and the only one that is treated specially is +\&'pass' which is only present if 'savepass' is set. This section of the +configuration file will be skipped if any \s-1DSN\s0, username, or password +command-line options are used. See \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R". +.IP "active_connections" 4 +.IX Item "active_connections" +This section holds a list of which connections are active in each mode. Each +line is in the format mode_name=connection_list. +.IP "server_groups" 4 +.IX Item "server_groups" +This section holds server groups. Each line is in the format +name=connection_list. See \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R". +.IP "active_server_groups" 4 +.IX Item "active_server_groups" +This section holds a list of which server group is active in each mode. Each +line is in the format mode_name=server_group. +.IP "max_values_seen" 4 +.IX Item "max_values_seen" +This section holds the maximum values seen for variables. This is used to scale +the graphs in \*(L"S: Variables & Status\*(R" mode. Each line is in the format +name=value. +.IP "active_columns" 4 +.IX Item "active_columns" +This section holds table column lists. Each line is in the format +tbl_name=column_list. See \*(L"\s-1COLUMNS\s0\*(R". +.IP "sort_cols" 4 +.IX Item "sort_cols" +This section holds the sort definition. Each line is in the format +tbl_name=column_list. If a column is prefixed with '\-', that column sorts +descending. See \*(L"\s-1SORTING\s0\*(R". +.IP "visible_tables" 4 +.IX Item "visible_tables" +This section defines which tables are visible in each mode. Each line is in the +format mode_name=table_list. See \*(L"\s-1TABLES\s0\*(R". +.IP "varsets" 4 +.IX Item "varsets" +This section defines variable sets for use in \*(L"S: Status & Variables\*(R" mode. +Each line is in the format name=variable_list. See \*(L"\s-1VARIABLE\s0 \s-1SETS\s0\*(R". +.IP "colors" 4 +.IX Item "colors" +This section defines colorization rules. Each line is in the format +tbl_name=property_list. See \*(L"\s-1COLORS\s0\*(R". +.IP "stmt_sleep_times" 4 +.IX Item "stmt_sleep_times" +This section contains statement sleep times. Each line is in the format +statement_name=sleep_time. See \*(L"S: Statement Sleep Times\*(R". +.IP "group_by" 4 +.IX Item "group_by" +This section contains column lists for table group_by expressions. Each line is +in the format tbl_name=column_list. See \*(L"\s-1GROUPING\s0\*(R". +.SH "CUSTOMIZING" +.IX Header "CUSTOMIZING" +You can customize innotop a great deal. For example, you can: +.IP "\(bu" 4 +Choose which tables to display, and in what order. +.IP "\(bu" 4 +Choose which columns are in those tables, and create new columns. +.IP "\(bu" 4 +Filter which rows display with built-in filters, user-defined filters, and +quick-filters. +.IP "\(bu" 4 +Sort the rows to put important data first or group together related rows. +.IP "\(bu" 4 +Highlight rows with color. +.IP "\(bu" 4 +Customize the alignment, width, and formatting of columns, and apply +transformations to columns to extract parts of their values or format the values +as you wish (for example, shortening large numbers to familiar units). +.IP "\(bu" 4 +Design your own expressions to extract and combine data as you need. This gives +you unlimited flexibility. +.PP +All these and more are explained in the following sections. +.SS "\s-1TABLES\s0" +.IX Subsection "TABLES" +A table is what you'd expect: a collection of columns. It also has some other +properties, such as a caption. Filters, sorting rules, and colorization rules +belong to tables and are covered in later sections. +.PP +Internally, table meta-data is defined in a data structure called \f(CW%tbl_meta\fR. +This hash holds all built-in table definitions, which contain a lot of default +instructions to innotop. The meta-data includes the caption, a list of columns +the user has customized, a list of columns, a list of visible columns, a list of +filters, color rules, a sort-column list, sort direction, and some information +about the table's data sources. Most of this is customizable via the table +editor (see \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R"). +.PP +You can choose which tables to show by pressing the '$' key. See \*(L"\s-1MODES\s0\*(R" and +\&\*(L"\s-1TABLES\s0\*(R". +.PP +The table life-cycle is as follows: +.IP "\(bu" 4 +Each table begins with a data source, which is an array of hashes. See below +for details on data sources. +.IP "\(bu" 4 +Each element of the data source becomes a row in the final table. +.IP "\(bu" 4 +For each element in the data source, innotop extracts values from the source and +creates a row. This row is another hash, which later steps will refer to as +\&\f(CW$set\fR. The values innotop extracts are determined by the table's columns. Each +column has an extraction subroutine, compiled from an expression (see +\&\*(L"\s-1EXPRESSIONS\s0\*(R"). The resulting row is a hash whose keys are named the same as +the column name. +.IP "\(bu" 4 +innotop filters the rows, removing those that don't need to be displayed. See +\&\*(L"\s-1FILTERS\s0\*(R". +.IP "\(bu" 4 +innotop sorts the rows. See \*(L"\s-1SORTING\s0\*(R". +.IP "\(bu" 4 +innotop groups the rows together, if specified. See \*(L"\s-1GROUPING\s0\*(R". +.IP "\(bu" 4 +innotop colorizes the rows. See \*(L"\s-1COLORS\s0\*(R". +.IP "\(bu" 4 +innotop transforms the column values in each row. See \*(L"\s-1TRANSFORMATIONS\s0\*(R". +.IP "\(bu" 4 +innotop optionally pivots the rows (see \*(L"\s-1PIVOTING\s0\*(R"), then filters and sorts +them. +.IP "\(bu" 4 +innotop formats and justifies the rows as a table. During this step, innotop +applies further formatting to the column values, including alignment, maximum +and minimum widths. innotop also does final error checking to ensure there are +no crashes due to undefined values. innotop then adds a caption if specified, +and the table is ready to print. +.PP +The lifecycle is slightly different if the table is pivoted, as noted above. To +clarify, if the table is pivoted, the process is extract, group, transform, +pivot, filter, sort, create. If it's not pivoted, the process is extract, +filter, sort, group, color, transform, create. This slightly convoluted process +doesn't map all that well to \s-1SQL\s0, but pivoting complicates things pretty +thoroughly. Roughly speaking, filtering and sorting happen as late as needed to +effect the final result as you might expect, but as early as possible for +efficiency. +.PP +Each built-in table is described below: +.IP "adaptive_hash_index" 4 +.IX Item "adaptive_hash_index" +Displays data about InnoDB's adaptive hash index. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "buffer_pool" 4 +.IX Item "buffer_pool" +Displays data about InnoDB's buffer pool. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "cmd_summary" 4 +.IX Item "cmd_summary" +Displays weighted status variables. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "deadlock_locks" 4 +.IX Item "deadlock_locks" +Shows which locks were held and waited for by the last detected deadlock. Data +source: \*(L"\s-1DEADLOCK_LOCKS\s0\*(R". +.IP "deadlock_transactions" 4 +.IX Item "deadlock_transactions" +Shows transactions involved in the last detected deadlock. Data source: +\&\*(L"\s-1DEADLOCK_TRANSACTIONS\s0\*(R". +.IP "explain" 4 +.IX Item "explain" +Shows the output of \s-1EXPLAIN\s0. Data source: \*(L"\s-1EXPLAIN\s0\*(R". +.IP "file_io_misc" 4 +.IX Item "file_io_misc" +Displays data about InnoDB's file and I/O operations. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "fk_error" 4 +.IX Item "fk_error" +Displays various data about InnoDB's last foreign key error. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "innodb_locks" 4 +.IX Item "innodb_locks" +Displays InnoDB locks. Data source: \*(L"\s-1INNODB_LOCKS\s0\*(R". +.IP "innodb_transactions" 4 +.IX Item "innodb_transactions" +Displays data about InnoDB's current transactions. Data source: +\&\*(L"\s-1INNODB_TRANSACTIONS\s0\*(R". +.IP "insert_buffers" 4 +.IX Item "insert_buffers" +Displays data about InnoDB's insert buffer. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "io_threads" 4 +.IX Item "io_threads" +Displays data about InnoDB's I/O threads. Data source: \*(L"\s-1IO_THREADS\s0\*(R". +.IP "log_statistics" 4 +.IX Item "log_statistics" +Displays data about InnoDB's logging system. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "master_status" 4 +.IX Item "master_status" +Displays replication master status. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "open_tables" 4 +.IX Item "open_tables" +Displays open tables. Data source: \*(L"\s-1OPEN_TABLES\s0\*(R". +.IP "page_statistics" 4 +.IX Item "page_statistics" +Displays InnoDB page statistics. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "pending_io" 4 +.IX Item "pending_io" +Displays InnoDB pending I/O operations. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "processlist" 4 +.IX Item "processlist" +Displays current MySQL processes (threads/connections). Data source: +\&\*(L"\s-1PROCESSLIST\s0\*(R". +.IP "q_header" 4 +.IX Item "q_header" +Displays various status values. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "row_operation_misc" 4 +.IX Item "row_operation_misc" +Displays data about InnoDB's row operations. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "row_operations" 4 +.IX Item "row_operations" +Displays data about InnoDB's row operations. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "semaphores" 4 +.IX Item "semaphores" +Displays data about InnoDB's semaphores and mutexes. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "slave_io_status" 4 +.IX Item "slave_io_status" +Displays data about the slave I/O thread. Data source: +\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "slave_sql_status" 4 +.IX Item "slave_sql_status" +Displays data about the slave \s-1SQL\s0 thread. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "t_header" 4 +.IX Item "t_header" +Displays various InnoDB status values. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "var_status" 4 +.IX Item "var_status" +Displays user-configurable data. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". +.IP "wait_array" 4 +.IX Item "wait_array" +Displays data about InnoDB's \s-1OS\s0 wait array. Data source: \*(L"\s-1OS_WAIT_ARRAY\s0\*(R". +.SS "\s-1COLUMNS\s0" +.IX Subsection "COLUMNS" +Columns belong to tables. You can choose a table's columns by pressing the '^' +key, which starts the \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R" and lets you choose and edit columns. +Pressing 'e' from within the table editor lets you edit the column's properties: +.IP "\(bu" 4 +hdr: a column header. This appears in the first row of the table. +.IP "\(bu" 4 +just: justification. '\-' means left-justified and '' means right-justified, +just as with printf formatting codes (not a coincidence). +.IP "\(bu" 4 +dec: whether to further align the column on the decimal point. +.IP "\(bu" 4 +num: whether the column is numeric. This affects how values are sorted +(lexically or numerically). +.IP "\(bu" 4 +label: a small note about the column, which appears in dialogs that help the +user choose columns. +.IP "\(bu" 4 +src: an expression that innotop uses to extract the column's data from its +source (see \*(L"\s-1DATA\s0 \s-1SOURCES\s0\*(R"). See \*(L"\s-1EXPRESSIONS\s0\*(R" for more on expressions. +.IP "\(bu" 4 +minw: specifies a minimum display width. This helps stabilize the display, +which makes it easier to read if the data is changing frequently. +.IP "\(bu" 4 +maxw: similar to minw. +.IP "\(bu" 4 +trans: a list of column transformations. See \*(L"\s-1TRANSFORMATIONS\s0\*(R". +.IP "\(bu" 4 +agg: an aggregate function. See \*(L"\s-1GROUPING\s0\*(R". The default is \*(L"first\*(R". +.IP "\(bu" 4 +aggonly: controls whether the column only shows when grouping is enabled on the +table (see \*(L"\s-1GROUPING\s0\*(R"). By default, this is disabled. This means columns +will always be shown by default, whether grouping is enabled or not. If a +column's aggonly is set true, the column will appear when you toggle grouping on +the table. Several columns are set this way, such as the count column on +\&\*(L"processlist\*(R" and \*(L"innodb_transactions\*(R", so you don't see a count when the +grouping isn't enabled, but you do when it is. +.SS "\s-1FILTERS\s0" +.IX Subsection "FILTERS" +Filters remove rows from the display. They behave much like a \s-1WHERE\s0 clause in +\&\s-1SQL\s0. innotop has several built-in filters, which remove irrelevant information +like inactive queries, but you can define your own as well. innotop also lets +you create quick-filters, which do not get saved to the configuration file, and +are just an easy way to quickly view only some rows. +.PP +You can enable or disable a filter on any table. Press the '%' key (mnemonic: % +looks kind of like a line being filtered between two circles) and choose which +table you want to filter, if asked. You'll then see a list of possible filters +and a list of filters currently enabled for that table. Type the names of +filters you want to apply and press Enter. +.PP +\fIUSER-DEFINED \s-1FILTERS\s0\fR +.IX Subsection "USER-DEFINED FILTERS" +.PP +If you type a name that doesn't exist, innotop will prompt you to create the +filter. Filters are easy to create if you know Perl, and not hard if you don't. +What you're doing is creating a subroutine that returns true if the row should +be displayed. The row is a hash reference passed to your subroutine as \f(CW$set\fR. +.PP +For example, imagine you want to filter the processlist table so you only see +queries that have been running more than five minutes. Type a new name for your +filter, and when prompted for the subroutine body, press \s-1TAB\s0 to initiate your +terminal's auto-completion. You'll see the names of the columns in the +\&\*(L"processlist\*(R" table (innotop generally tries to help you with auto-completion +lists). You want to filter on the 'time' column. Type the text \*(L"$set\->{time} > +300\*(R" to return true when the query is more than five minutes old. That's all +you need to do. +.PP +In other words, the code you're typing is surrounded by an implicit context, +which looks like this: +.PP +.Vb 4 +\& sub filter { +\& my ( $set ) = @_; +\& # YOUR CODE HERE +\& } +.Ve +.PP +If your filter doesn't work, or if something else suddenly behaves differently, +you might have made an error in your filter, and innotop is silently catching +the error. Try enabling \*(L"debug\*(R" to make innotop throw an error instead. +.PP +\fIQUICK-FILTERS\fR +.IX Subsection "QUICK-FILTERS" +.PP +innotop's quick-filters are a shortcut to create a temporary filter that doesn't +persist when you restart innotop. To create a quick-filter, press the '/' key. +innotop will prompt you for the column name and filter text. Again, you can use +auto-completion on column names. The filter text can be just the text you want +to \*(L"search for.\*(R" For example, to filter the \*(L"processlist\*(R" table on queries +that refer to the products table, type '/' and then 'info product'. +.PP +The filter text can actually be any Perl regular expression, but of course a +literal string like 'product' works fine as a regular expression. +.PP +Behind the scenes innotop compiles the quick-filter into a specially tagged +filter that is otherwise like any other filter. It just isn't saved to the +configuration file. +.PP +To clear quick-filters, press the '\e' key and innotop will clear them all at +once. +.SS "\s-1SORTING\s0" +.IX Subsection "SORTING" +innotop has sensible built-in defaults to sort the most important rows to the +top of the table. Like anything else in innotop, you can customize how any +table is sorted. +.PP +To start the sort dialog, start the \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R" with the '^' key, choose a +table if necessary, and press the 's' key. You'll see a list of columns you can +use in the sort expression and the current sort expression, if any. Enter a +list of columns by which you want to sort and press Enter. If you want to +reverse sort, prefix the column name with a minus sign. For example, if you +want to sort by column a ascending, then column b descending, type 'a \-b'. You +can also explicitly add a + in front of columns you want to sort ascending, but +it's not required. +.PP +Some modes have keys mapped to open this dialog directly, and to quickly reverse +sort direction. Press '?' as usual to see which keys are mapped in any mode. +.SS "\s-1GROUPING\s0" +.IX Subsection "GROUPING" +innotop can group, or aggregate, rows together (the terms are used +interchangeably). This is quite similar to an \s-1SQL\s0 \s-1GROUP\s0 \s-1BY\s0 clause. You can +specify to group on certain columns, or if you don't specify any, the entire set +of rows is treated as one group. This is quite like \s-1SQL\s0 so far, but unlike \s-1SQL\s0, +you can also select un-grouped columns. innotop actually aggregates every +column. If you don't explicitly specify a grouping function, the default is +\&'first'. This is basically a convenience so you don't have to specify an +aggregate function for every column you want in the result. +.PP +You can quickly toggle grouping on a table with the '=' key, which toggles its +aggregate property. This property doesn't persist to the config file. +.PP +The columns by which the table is grouped are specified in its group_by +property. When you turn grouping on, innotop places the group_by columns at the +far left of the table, even if they're not supposed to be visible. The rest of +the visible columns appear in order after them. +.PP +Two tables have default group_by lists and a count column built in: +\&\*(L"processlist\*(R" and \*(L"innodb_transactions\*(R". The grouping is by connection +and status, so you can quickly see how many queries or transactions are in a +given status on each server you're monitoring. The time columns are aggregated +as a sum; other columns are left at the default 'first' aggregation. +.PP +By default, the table shown in \*(L"S: Variables & Status\*(R" mode also uses +grouping so you can monitor variables and status across many servers. The +default aggregation function in this mode is 'avg'. +.PP +Valid grouping functions are defined in the \f(CW%agg_funcs\fR hash. They include +.IP "first" 4 +.IX Item "first" +Returns the first element in the group. +.IP "count" 4 +.IX Item "count" +Returns the number of elements in the group, including undefined elements, much +like \s-1SQL\s0's \s-1COUNT\s0(*). +.IP "avg" 4 +.IX Item "avg" +Returns the average of defined elements in the group. +.IP "sum" 4 +.IX Item "sum" +Returns the sum of elements in the group. +.PP +Here's an example of grouping at work. Suppose you have a very busy server with +hundreds of open connections, and you want to see how many connections are in +what status. Using the built-in grouping rules, you can press 'Q' to enter +\&\*(L"Q: Query List\*(R" mode. Press '=' to toggle grouping (if necessary, select the +\&\*(L"processlist\*(R" table when prompted). +.PP +Your display might now look like the following: +.PP +.Vb 1 +\& Query List (? for help) localhost, 32:33, 0.11 QPS, 1 thd, 5.0.38\-log +\& +\& CXN Cmd Cnt ID User Host Time Query +\& localhost Query 49 12933 webusr localhost 19:38 SELECT * FROM +\& localhost Sending Da 23 2383 webusr localhost 12:43 SELECT col1, +\& localhost Sleep 120 140 webusr localhost 5:18:12 +\& localhost Statistics 12 19213 webusr localhost 01:19 SELECT * FROM +.Ve +.PP +That's actually quite a worrisome picture. You've got a lot of idle connections +(Sleep), and some connections executing queries (Query and Sending Data). +That's okay, but you also have a lot in Statistics status, collectively spending +over a minute. That means the query optimizer is having a really hard time +optimizing your statements. Something is wrong; it should normally take +milliseconds to optimize queries. You might not have seen this pattern if you +didn't look at your connections in aggregate. (This is a made-up example, but +it can happen in real life). +.SS "\s-1PIVOTING\s0" +.IX Subsection "PIVOTING" +innotop can pivot a table for more compact display, similar to a Pivot Table in +a spreadsheet (also known as a crosstab). Pivoting a table makes columns into +rows. Assume you start with this table: +.PP +.Vb 4 +\& foo bar +\& === === +\& 1 3 +\& 2 4 +.Ve +.PP +After pivoting, the table will look like this: +.PP +.Vb 4 +\& name set0 set1 +\& ==== ==== ==== +\& foo 1 2 +\& bar 3 4 +.Ve +.PP +To get reasonable results, you might need to group as well as pivoting. +innotop currently does this for \*(L"S: Variables & Status\*(R" mode. +.SS "\s-1COLORS\s0" +.IX Subsection "COLORS" +By default, innotop highlights rows with color so you can see at a glance which +rows are more important. You can customize the colorization rules and add your +own to any table. Open the table editor with the '^' key, choose a table if +needed, and press 'o' to open the color editor dialog. +.PP +The color editor dialog displays the rules applied to the table, in the order +they are evaluated. Each row is evaluated against each rule to see if the rule +matches the row; if it does, the row gets the specified color, and no further +rules are evaluated. The rules look like the following: +.PP +.Vb 9 +\& state eq Locked black on_red +\& cmd eq Sleep white +\& user eq system user white +\& cmd eq Connect white +\& cmd eq Binlog Dump white +\& time > 600 red +\& time > 120 yellow +\& time > 60 green +\& time > 30 cyan +.Ve +.PP +This is the default rule set for the \*(L"processlist\*(R" table. In order of +priority, these rules make locked queries black on a red background, \*(L"gray out\*(R" +connections from replication and sleeping queries, and make queries turn from +cyan to red as they run longer. +.PP +(For some reason, the \s-1ANSI\s0 color code \*(L"white\*(R" is actually a light gray. Your +terminal's display may vary; experiment to find colors you like). +.PP +You can use keystrokes to move the rules up and down, which re-orders their +priority. You can also delete rules and add new ones. If you add a new rule, +innotop prompts you for the column, an operator for the comparison, a value +against which to compare the column, and a color to assign if the rule matches. +There is auto-completion and prompting at each step. +.PP +The value in the third step needs to be correctly quoted. innotop does not try +to quote the value because it doesn't know whether it should treat the value as +a string or a number. If you want to compare the column against a string, as +for example in the first rule above, you should enter 'Locked' surrounded by +quotes. If you get an error message about a bareword, you probably should have +quoted something. +.SS "\s-1EXPRESSIONS\s0" +.IX Subsection "EXPRESSIONS" +Expressions are at the core of how innotop works, and are what enables you to +extend innotop as you wish. Recall the table lifecycle explained in +\&\*(L"\s-1TABLES\s0\*(R". Expressions are used in the earliest step, where it extracts +values from a data source to form rows. +.PP +It does this by calling a subroutine for each column, passing it the source data +set, a set of current values, and a set of previous values. These are all +needed so the subroutine can calculate things like the difference between this +tick and the previous tick. +.PP +The subroutines that extract the data from the set are compiled from +expressions. This gives significantly more power than just naming the values to +fill the columns, because it allows the column's value to be calculated from +whatever data is necessary, but avoids the need to write complicated and lengthy +Perl code. +.PP +innotop begins with a string of text that can look as simple as a value's name +or as complicated as a full-fledged Perl expression. It looks at each +\&'bareword' token in the string and decides whether it's supposed to be a key +into the \f(CW$set\fR hash. A bareword is an unquoted value that isn't already +surrounded by code-ish things like dollar signs or curly brackets. If innotop +decides that the bareword isn't a function or other valid Perl code, it converts +it into a hash access. After the whole string is processed, innotop compiles a +subroutine, like this: +.PP +.Vb 5 +\& sub compute_column_value { +\& my ( $set, $cur, $pre ) = @_; +\& my $val = # EXPANDED STRING GOES HERE +\& return $val; +\& } +.Ve +.PP +Here's a concrete example, taken from the header table \*(L"q_header\*(R" in \*(L"Q: +Query List\*(R" mode. This expression calculates the qps, or Queries Per Second, +column's values, from the values returned by \s-1SHOW\s0 \s-1STATUS:\s0 +.PP +.Vb 1 +\& Questions/Uptime_hires +.Ve +.PP +innotop decides both words are barewords, and transforms this expression into +the following Perl code: +.PP +.Vb 1 +\& $set\->{Questions}/$set\->{Uptime_hires} +.Ve +.PP +When surrounded by the rest of the subroutine's code, this is executable Perl +that calculates a high-resolution queries-per-second value. +.PP +The arguments to the subroutine are named \f(CW$set\fR, \f(CW$cur\fR, and \f(CW$pre\fR. In most cases, +\&\f(CW$set\fR and \f(CW$cur\fR will be the same values. However, if \*(L"status_inc\*(R" is set, \f(CW$cur\fR +will not be the same as \f(CW$set\fR, because \f(CW$set\fR will already contain values that are +the incremental difference between \f(CW$cur\fR and \f(CW$pre\fR. +.PP +Every column in innotop is computed by subroutines compiled in the same fashion. +There is no difference between innotop's built-in columns and user-defined +columns. This keeps things consistent and predictable. +.SS "\s-1TRANSFORMATIONS\s0" +.IX Subsection "TRANSFORMATIONS" +Transformations change how a value is rendered. For example, they can take a +number of seconds and display it in H:M:S format. The following transformations +are defined: +.IP "commify" 4 +.IX Item "commify" +Adds commas to large numbers every three decimal places. +.IP "dulint_to_int" 4 +.IX Item "dulint_to_int" +Accepts two unsigned integers and converts them into a single longlong. This is +useful for certain operations with InnoDB, which uses two integers as +transaction identifiers, for example. +.IP "no_ctrl_char" 4 +.IX Item "no_ctrl_char" +Removes quoted control characters from the value. This is affected by the +\&\*(L"charset\*(R" configuration variable. +.Sp +This transformation only operates within quoted strings, for example, values to +a \s-1SET\s0 clause in an \s-1UPDATE\s0 statement. It will not alter the \s-1UPDATE\s0 statement, +but will collapse the quoted string to [\s-1BINARY\s0] or [\s-1TEXT\s0], depending on the +charset. +.IP "percent" 4 +.IX Item "percent" +Converts a number to a percentage by multiplying it by two, formatting it with +\&\*(L"num_digits\*(R" digits after the decimal point, and optionally adding a percent +sign (see \*(L"show_percent\*(R"). +.IP "secs_to_time" 4 +.IX Item "secs_to_time" +Formats a number of seconds as time in days+hours:minutes:seconds format. +.IP "set_precision" 4 +.IX Item "set_precision" +Formats numbers with \*(L"num_digits\*(R" number of digits after the decimal point. +.IP "shorten" 4 +.IX Item "shorten" +Formats a number as a unit of 1024 (k/M/G/T) and with \*(L"num_digits\*(R" number of +digits after the decimal point. +.SS "\s-1TABLE\s0 \s-1EDITOR\s0" +.IX Subsection "TABLE EDITOR" +The innotop table editor lets you customize tables with keystrokes. You start +the table editor with the '^' key. If there's more than one table on the +screen, it will prompt you to choose one of them. Once you do, innotop will +show you something like this: +.PP +.Vb 1 +\& Editing table definition for Buffer Pool. Press ? for help, q to quit. +\& +\& name hdr label src +\& cxn CXN Connection from which cxn +\& buf_pool_size Size Buffer pool size IB_bp_buf_poo +\& buf_free Free Bufs Buffers free in the b IB_bp_buf_fre +\& pages_total Pages Pages total IB_bp_pages_t +\& pages_modified Dirty Pages Pages modified (dirty IB_bp_pages_m +\& buf_pool_hit_rate Hit Rate Buffer pool hit rate IB_bp_buf_poo +\& total_mem_alloc Memory Total memory allocate IB_bp_total_m +\& add_pool_alloc Add\*(Aql Pool Additonal pool alloca IB_bp_add_poo +.Ve +.PP +The first line shows which table you're editing, and reminds you again to press +\&'?' for a list of key mappings. The rest is a tabular representation of the +table's columns, because that's likely what you're trying to edit. However, you +can edit more than just the table's columns; this screen can start the filter +editor, color rule editor, and more. +.PP +Each row in the display shows a single column in the table you're editing, along +with a couple of its properties such as its header and source expression (see +\&\*(L"\s-1EXPRESSIONS\s0\*(R"). +.PP +The key mappings are Vim-style, as in many other places. Pressing 'j' and 'k' +moves the highlight up or down. You can then (d)elete or (e)dit the highlighted +column. You can also (a)dd a column to the table. This actually just activates +one of the columns already defined for the table; it prompts you to choose from +among the columns available but not currently displayed. Finally, you can +re-order the columns with the '+' and '\-' keys. +.PP +You can do more than just edit the columns with the table editor, you can also +edit other properties, such as the table's sort expression and group-by +expression. Press '?' to see the full list, of course. +.PP +If you want to really customize and create your own column, as opposed to just +activating a built-in one that's not currently displayed, press the (n)ew key, +and innotop will prompt you for the information it needs: +.IP "\(bu" 4 +The column name: this needs to be a word without any funny characters, e.g. just +letters, numbers and underscores. +.IP "\(bu" 4 +The column header: this is the label that appears at the top of the column, in +the table header. This can have spaces and funny characters, but be careful not +to make it too wide and waste space on-screen. +.IP "\(bu" 4 +The column's data source: this is an expression that determines what data from +the source (see \*(L"\s-1TABLES\s0\*(R") innotop will put into the column. This can just be +the name of an item in the source, or it can be a more complex expression, as +described in \*(L"\s-1EXPRESSIONS\s0\*(R". +.PP +Once you've entered the required data, your table has a new column. There is no +difference between this column and the built-in ones; it can have all the same +properties and behaviors. innotop will write the column's definition to the +configuration file, so it will persist across sessions. +.PP +Here's an example: suppose you want to track how many times your slaves have +retried transactions. According to the MySQL manual, the +Slave_retried_transactions status variable gives you that data: \*(L"The total +number of times since startup that the replication slave \s-1SQL\s0 thread has retried +transactions. This variable was added in version 5.0.4.\*(R" This is appropriate to +add to the \*(L"slave_sql_status\*(R" table. +.PP +To add the column, switch to the replication-monitoring mode with the 'M' key, +and press the '^' key to start the table editor. When prompted, choose +slave_sql_status as the table, then press 'n' to create the column. Type +\&'retries' as the column name, 'Retries' as the column header, and +\&'Slave_retried_transactions' as the source. Now the column is created, and you +see the table editor screen again. Press 'q' to exit the table editor, and +you'll see your column at the end of the table. +.SH "VARIABLE SETS" +.IX Header "VARIABLE SETS" +Variable sets are used in \*(L"S: Variables & Status\*(R" mode to define more easily +what variables you want to monitor. Behind the scenes they are compiled to a +list of expressions, and then into a column list so they can be treated just +like columns in any other table, in terms of data extraction and +transformations. However, you're protected from the tedious details by a syntax +that ought to feel very natural to you: a \s-1SQL\s0 \s-1SELECT\s0 list. +.PP +The data source for variable sets, and indeed the entire S mode, is the +combination of \s-1SHOW\s0 \s-1STATUS\s0, \s-1SHOW\s0 \s-1VARIABLES\s0, and \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. Imagine +that you had a huge table with one column per variable returned from those +statements. That's the data source for variable sets. You can now query this +data source just like you'd expect. For example: +.PP +.Vb 1 +\& Questions, Uptime, Questions/Uptime as QPS +.Ve +.PP +Behind the scenes innotop will split that variable set into three expressions, +compile them and turn them into a table definition, then extract as usual. This +becomes a \*(L"variable set,\*(R" or a \*(L"list of variables you want to monitor.\*(R" +.PP +innotop lets you name and save your variable sets, and writes them to the +configuration file. You can choose which variable set you want to see with the +\&'c' key, or activate the next and previous sets with the '>' and '<' keys. +There are many built-in variable sets as well, which should give you a good +start for creating your own. Press 'e' to edit the current variable set, or +just to see how it's defined. To create a new one, just press 'c' and type its +name. +.PP +You may want to use some of the functions listed in \*(L"\s-1TRANSFORMATIONS\s0\*(R" to help +format the results. In particular, \*(L"set_precision\*(R" is often useful to limit +the number of digits you see. Extending the above example, here's how: +.PP +.Vb 1 +\& Questions, Uptime, set_precision(Questions/Uptime) as QPS +.Ve +.PP +Actually, this still needs a little more work. If your \*(L"interval\*(R" is less +than one second, you might be dividing by zero because Uptime is incremental in +this mode by default. Instead, use Uptime_hires: +.PP +.Vb 1 +\& Questions, Uptime, set_precision(Questions/Uptime_hires) as QPS +.Ve +.PP +This example is simple, but it shows how easy it is to choose which variables +you want to monitor. +.SH "PLUGINS" +.IX Header "PLUGINS" +innotop has a simple but powerful plugin mechanism by which you can extend +or modify its existing functionality, and add new functionality. innotop's +plugin functionality is event-based: plugins register themselves to be called +when events happen. They then have a chance to influence the event. +.PP +An innotop plugin is a Perl module placed in innotop's \*(L"plugin_dir\*(R" +directory. On \s-1UNIX\s0 systems, you can place a symbolic link to the module instead +of putting the actual file there. innotop automatically discovers the file. If +there is a corresponding entry in the \*(L"plugins\*(R" configuration file section, +innotop loads and activates the plugin. +.PP +The module must conform to innotop's plugin interface. Additionally, the source +code of the module must be written in such a way that innotop can inspect the +file and determine the package name and description. +.SS "Package Source Convention" +.IX Subsection "Package Source Convention" +innotop inspects the plugin module's source to determine the Perl package name. +It looks for a line of the form \*(L"package Foo;\*(R" and if found, considers the +plugin's package name to be Foo. Of course the package name can be a valid Perl +package name, with double semicolons and so on. +.PP +It also looks for a description in the source code, to make the plugin editor +more human-friendly. The description is a comment line of the form \*(L"# +description: Foo\*(R", where \*(L"Foo\*(R" is the text innotop will consider to be the +plugin's description. +.SS "Plugin Interface" +.IX Subsection "Plugin Interface" +The innotop plugin interface is quite simple: innotop expects the plugin to be +an object-oriented module it can call certain methods on. The methods are +.IP "new(%variables)" 4 +.IX Item "new(%variables)" +This is the plugin's constructor. It is passed a hash of innotop's variables, +which it can manipulate (see \*(L"Plugin Variables\*(R"). It must return a reference +to the newly created plugin object. +.Sp +At construction time, innotop has only loaded the general configuration and +created the default built-in variables with their default contents (which is +quite a lot). Therefore, the state of the program is exactly as in the innotop +source code, plus the configuration variables from the \*(L"general\*(R" section in +the config file. +.Sp +If your plugin manipulates the variables, it is changing global data, which is +shared by innotop and all plugins. Plugins are loaded in the order they're +listed in the config file. Your plugin may load before or after another plugin, +so there is a potential for conflict or interaction between plugins if they +modify data other plugins use or modify. +.IP "\fIregister_for_events()\fR" 4 +.IX Item "register_for_events()" +This method must return a list of events in which the plugin is interested, if +any. See \*(L"Plugin Events\*(R" for the defined events. If the plugin returns an +event that's not defined, the event is ignored. +.IP "event handlers" 4 +.IX Item "event handlers" +The plugin must implement a method named the same as each event for which it has +registered. In other words, if the plugin returns qw(foo bar) from +\&\fIregister_for_events()\fR, it must have \fIfoo()\fR and \fIbar()\fR methods. These methods are +callbacks for the events. See \*(L"Plugin Events\*(R" for more details about each +event. +.SS "Plugin Variables" +.IX Subsection "Plugin Variables" +The plugin's constructor is passed a hash of innotop's variables, which it can +manipulate. It is probably a good idea if the plugin object saves a copy of it +for later use. The variables are defined in the innotop variable +\&\f(CW%pluggable_vars\fR, and are as follows: +.IP "action_for" 4 +.IX Item "action_for" +A hashref of key mappings. These are innotop's global hot-keys. +.IP "agg_funcs" 4 +.IX Item "agg_funcs" +A hashref of functions that can be used for grouping. See \*(L"\s-1GROUPING\s0\*(R". +.IP "config" 4 +.IX Item "config" +The global configuration hash. +.IP "connections" 4 +.IX Item "connections" +A hashref of connection specifications. These are just specifications of how to +connect to a server. +.IP "dbhs" 4 +.IX Item "dbhs" +A hashref of innotop's database connections. These are actual \s-1DBI\s0 connection +objects. +.IP "filters" 4 +.IX Item "filters" +A hashref of filters applied to table rows. See \*(L"\s-1FILTERS\s0\*(R" for more. +.IP "modes" 4 +.IX Item "modes" +A hashref of modes. See \*(L"\s-1MODES\s0\*(R" for more. +.IP "server_groups" 4 +.IX Item "server_groups" +A hashref of server groups. See \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R". +.IP "tbl_meta" 4 +.IX Item "tbl_meta" +A hashref of innotop's table meta-data, with one entry per table (see +\&\*(L"\s-1TABLES\s0\*(R" for more information). +.IP "trans_funcs" 4 +.IX Item "trans_funcs" +A hashref of transformation functions. See \*(L"\s-1TRANSFORMATIONS\s0\*(R". +.IP "var_sets" 4 +.IX Item "var_sets" +A hashref of variable sets. See \*(L"\s-1VARIABLE\s0 \s-1SETS\s0\*(R". +.SS "Plugin Events" +.IX Subsection "Plugin Events" +Each event is defined somewhere in the innotop source code. When innotop runs +that code, it executes the callback function for each plugin that expressed its +interest in the event. innotop passes some data for each event. The events are +defined in the \f(CW%event_listener_for\fR variable, and are as follows: +.ie n .IP "extract_values($set, $cur, $pre, $tbl)" 4 +.el .IP "extract_values($set, \f(CW$cur\fR, \f(CW$pre\fR, \f(CW$tbl\fR)" 4 +.IX Item "extract_values($set, $cur, $pre, $tbl)" +This event occurs inside the function that extracts values from a data source. +The arguments are the set of values, the current values, the previous values, +and the table name. +.IP "set_to_tbl" 4 +.IX Item "set_to_tbl" +Events are defined at many places in this subroutine, which is responsible for +turning an arrayref of hashrefs into an arrayref of lines that can be printed to +the screen. The events all pass the same data: an arrayref of rows and the name +of the table being created. The events are set_to_tbl_pre_filter, +set_to_tbl_pre_sort,set_to_tbl_pre_group, set_to_tbl_pre_colorize, +set_to_tbl_pre_transform, set_to_tbl_pre_pivot, set_to_tbl_pre_create, +set_to_tbl_post_create. +.IP "draw_screen($lines)" 4 +.IX Item "draw_screen($lines)" +This event occurs inside the subroutine that prints the lines to the screen. +\&\f(CW$lines\fR is an arrayref of strings. +.SS "Simple Plugin Example" +.IX Subsection "Simple Plugin Example" +The easiest way to explain the plugin functionality is probably with a simple +example. The following module adds a column to the beginning of every table and +sets its value to 1. +.PP +.Vb 2 +\& use strict; +\& use warnings FATAL => \*(Aqall\*(Aq; +\& +\& package Innotop::Plugin::Example; +\& # description: Adds an \*(Aqexample\*(Aq column to every table +\& +\& sub new { +\& my ( $class, %vars ) = @_; +\& # Store reference to innotop\*(Aqs variables in $self +\& my $self = bless { %vars }, $class; +\& +\& # Design the example column +\& my $col = { +\& hdr => \*(AqExample\*(Aq, +\& just => \*(Aq\*(Aq, +\& dec => 0, +\& num => 1, +\& label => \*(AqExample\*(Aq, +\& src => \*(Aqexample\*(Aq, # Get data from this column in the data source +\& tbl => \*(Aq\*(Aq, +\& trans => [], +\& }; +\& +\& # Add the column to every table. +\& my $tbl_meta = $vars{tbl_meta}; +\& foreach my $tbl ( values %$tbl_meta ) { +\& # Add the column to the list of defined columns +\& $tbl\->{cols}\->{example} = $col; +\& # Add the column to the list of visible columns +\& unshift @{$tbl\->{visible}}, \*(Aqexample\*(Aq; +\& } +\& +\& # Be sure to return a reference to the object. +\& return $self; +\& } +\& +\& # I\*(Aqd like to be called when a data set is being rendered into a table, please. +\& sub register_for_events { +\& my ( $self ) = @_; +\& return qw(set_to_tbl_pre_filter); +\& } +\& +\& # This method will be called when the event fires. +\& sub set_to_tbl_pre_filter { +\& my ( $self, $rows, $tbl ) = @_; +\& # Set the example column\*(Aqs data source to the value 1. +\& foreach my $row ( @$rows ) { +\& $row\->{example} = 1; +\& } +\& } +\& +\& 1; +.Ve +.SS "Plugin Editor" +.IX Subsection "Plugin Editor" +The plugin editor lets you view the plugins innotop discovered and activate or +deactivate them. Start the editor by pressing $ to start the configuration +editor from any mode. Press the 'p' key to start the plugin editor. You'll see +a list of plugins innotop discovered. You can use the 'j' and 'k' keys to move +the highlight to the desired one, then press the * key to toggle it active or +inactive. Exit the editor and restart innotop for the changes to take effect. +.SH "SQL STATEMENTS" +.IX Header "SQL STATEMENTS" +innotop uses a limited set of \s-1SQL\s0 statements to retrieve data from MySQL for +display. The statements are customized depending on the server version against +which they are executed; for example, on MySQL 5 and newer, \s-1INNODB_STATUS\s0 +executes \*(L"\s-1SHOW\s0 \s-1ENGINE\s0 \s-1INNODB\s0 \s-1STATUS\s0\*(R", while on earlier versions it executes +\&\*(L"\s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0\*(R". The statements are as follows: +.PP +.Vb 12 +\& Statement SQL executed +\& =================== =============================== +\& INNODB_STATUS SHOW [ENGINE] INNODB STATUS +\& KILL_CONNECTION KILL +\& KILL_QUERY KILL QUERY +\& OPEN_TABLES SHOW OPEN TABLES +\& PROCESSLIST SHOW FULL PROCESSLIST +\& SHOW_MASTER_LOGS SHOW MASTER LOGS +\& SHOW_MASTER_STATUS SHOW MASTER STATUS +\& SHOW_SLAVE_STATUS SHOW SLAVE STATUS +\& SHOW_STATUS SHOW [GLOBAL] STATUS +\& SHOW_VARIABLES SHOW [GLOBAL] VARIABLES +.Ve +.SH "DATA SOURCES" +.IX Header "DATA SOURCES" +Each time innotop extracts values to create a table (see \*(L"\s-1EXPRESSIONS\s0\*(R" and +\&\*(L"\s-1TABLES\s0\*(R"), it does so from a particular data source. Largely because of the +complex data extracted from \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0, this is slightly messy. \s-1SHOW\s0 +\&\s-1INNODB\s0 \s-1STATUS\s0 contains a mixture of single values and repeated values that form +nested data sets. +.PP +Whenever innotop fetches data from MySQL, it adds two extra bits to each set: +cxn and Uptime_hires. cxn is the name of the connection from which the data +came. Uptime_hires is a high-resolution version of the server's Uptime status +variable, which is important if your \*(L"interval\*(R" setting is sub-second. +.PP +Here are the kinds of data sources from which data is extracted: +.IP "\s-1STATUS_VARIABLES\s0" 4 +.IX Item "STATUS_VARIABLES" +This is the broadest category, into which the most kinds of data fall. It +begins with the combination of \s-1SHOW\s0 \s-1STATUS\s0 and \s-1SHOW\s0 \s-1VARIABLES\s0, but other sources +may be included as needed, for example, \s-1SHOW\s0 \s-1MASTER\s0 \s-1STATUS\s0 and \s-1SHOW\s0 \s-1SLAVE\s0 +\&\s-1STATUS\s0, as well as many of the non-repeated values from \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. +.IP "\s-1DEADLOCK_LOCKS\s0" 4 +.IX Item "DEADLOCK_LOCKS" +This data is extracted from the transaction list in the \s-1LATEST\s0 \s-1DETECTED\s0 \s-1DEADLOCK\s0 +section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. It is nested two levels deep: transactions, then +locks. +.IP "\s-1DEADLOCK_TRANSACTIONS\s0" 4 +.IX Item "DEADLOCK_TRANSACTIONS" +This data is from the transaction list in the \s-1LATEST\s0 \s-1DETECTED\s0 \s-1DEADLOCK\s0 +section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. It is nested one level deep. +.IP "\s-1EXPLAIN\s0" 4 +.IX Item "EXPLAIN" +This data is from the result set returned by \s-1EXPLAIN\s0. +.IP "\s-1INNODB_TRANSACTIONS\s0" 4 +.IX Item "INNODB_TRANSACTIONS" +This data is from the \s-1TRANSACTIONS\s0 section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. +.IP "\s-1IO_THREADS\s0" 4 +.IX Item "IO_THREADS" +This data is from the list of threads in the the \s-1FILE\s0 I/O section of \s-1SHOW\s0 \s-1INNODB\s0 +\&\s-1STATUS\s0. +.IP "\s-1INNODB_LOCKS\s0" 4 +.IX Item "INNODB_LOCKS" +This data is from the \s-1TRANSACTIONS\s0 section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 and is nested +two levels deep. +.IP "\s-1OPEN_TABLES\s0" 4 +.IX Item "OPEN_TABLES" +This data is from \s-1SHOW\s0 \s-1OPEN\s0 \s-1TABLES\s0. +.IP "\s-1PROCESSLIST\s0" 4 +.IX Item "PROCESSLIST" +This data is from \s-1SHOW\s0 \s-1FULL\s0 \s-1PROCESSLIST\s0. +.IP "\s-1OS_WAIT_ARRAY\s0" 4 +.IX Item "OS_WAIT_ARRAY" +This data is from the \s-1SEMAPHORES\s0 section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 and is nested one +level deep. It comes from the lines that look like this: +.Sp +.Vb 1 +\& \-\-Thread 1568861104 has waited at btr0cur.c line 424 .... +.Ve +.SH "MYSQL PRIVILEGES" +.IX Header "MYSQL PRIVILEGES" +.IP "\(bu" 4 +You must connect to MySQL as a user who has the \s-1SUPER\s0 privilege for many of the +functions. +.IP "\(bu" 4 +If you don't have the \s-1SUPER\s0 privilege, you can still run some functions, but you +won't necessarily see all the same data. +.IP "\(bu" 4 +You need the \s-1PROCESS\s0 privilege to see the list of currently running queries in Q +mode. +.IP "\(bu" 4 +You need special privileges to start and stop slave servers. +.IP "\(bu" 4 +You need appropriate privileges to create and drop the deadlock tables if needed +(see \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R"). +.SH "SYSTEM REQUIREMENTS" +.IX Header "SYSTEM REQUIREMENTS" +You need Perl to run innotop, of course. You also need a few Perl modules: \s-1DBI\s0, +DBD::mysql, Term::ReadKey, and Time::HiRes. These should be included with most +Perl distributions, but in case they are not, I recommend using versions +distributed with your operating system or Perl distribution, not from \s-1CPAN\s0. +Term::ReadKey in particular has been known to cause problems if installed from +\&\s-1CPAN\s0. +.PP +If you have Term::ANSIColor, innotop will use it to format headers more readably +and compactly. (Under Microsoft Windows, you also need Win32::Console::ANSI for +terminal formatting codes to be honored). If you install Term::ReadLine, +preferably Term::ReadLine::Gnu, you'll get nice auto-completion support. +.PP +I run innotop on Gentoo GNU/Linux, Debian and Ubuntu, and I've had feedback from +people successfully running it on Red Hat, CentOS, Solaris, and Mac \s-1OSX\s0. I +don't see any reason why it won't work on other UNIX-ish operating systems, but +I don't know for sure. It also runs on Windows under ActivePerl without +problem. +.PP +innotop has been used on MySQL versions 3.23.58, 4.0.27, 4.1.0, 4.1.22, 5.0.26, +5.1.15, and 5.2.3. If it doesn't run correctly for you, that is a bug that +should be reported. +.SH "FILES" +.IX Header "FILES" +\&\f(CW$HOMEDIR\fR/.innotop and/or /etc/innotop are used to store +configuration information. Files include the configuration file innotop.conf, +the core_dump file which contains verbose error messages if \*(L"debug\*(R" is +enabled, and the plugins/ subdirectory. +.SH "GLOSSARY OF TERMS" +.IX Header "GLOSSARY OF TERMS" +.IP "tick" 4 +.IX Item "tick" +A tick is a refresh event, when innotop re-fetches data from connections and +displays it. +.SH "ACKNOWLEDGEMENTS" +.IX Header "ACKNOWLEDGEMENTS" +The following people and organizations are acknowledged for various reasons. +Hopefully no one has been forgotten. +.PP +Allen K. Smith, +Aurimas Mikalauskas, +Bartosz Fenski, +Brian Miezejewski, +Christian Hammers, +Cyril Scetbon, +Dane Miller, +David Multer, +Dr. Frank Ullrich, +Giuseppe Maxia, +Google.com Site Reliability Engineers, +Google Code, +Jan Pieter Kunst, +Jari Aalto, +Jay Pipes, +Jeremy Zawodny, +Johan Idren, +Kristian Kohntopp, +Lenz Grimmer, +Maciej Dobrzanski, +Michiel Betel, +MySQL \s-1AB\s0, +Paul McCullagh, +Sebastien Estienne, +Sourceforge.net, +Steven Kreuzer, +The Gentoo MySQL Team, +Trevor Price, +Yaar Schnitman, +and probably more people that have not been included. +.PP +(If your name has been misspelled, it's probably out of fear of putting +international characters into this documentation; earlier versions of Perl might +not be able to compile it then). +.SH "COPYRIGHT, LICENSE AND WARRANTY" +.IX Header "COPYRIGHT, LICENSE AND WARRANTY" +This program is copyright (c) 2006 Baron Schwartz. +Feedback and improvements are welcome. +.PP +\&\s-1THIS\s0 \s-1PROGRAM\s0 \s-1IS\s0 \s-1PROVIDED\s0 \*(L"\s-1AS\s0 \s-1IS\s0\*(R" \s-1AND\s0 \s-1WITHOUT\s0 \s-1ANY\s0 \s-1EXPRESS\s0 \s-1OR\s0 \s-1IMPLIED\s0 +\&\s-1WARRANTIES\s0, \s-1INCLUDING\s0, \s-1WITHOUT\s0 \s-1LIMITATION\s0, \s-1THE\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0 \s-1OF\s0 +\&\s-1MERCHANTIBILITY\s0 \s-1AND\s0 \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. +.PP +This program is free software; you can redistribute it and/or modify it under +the terms of the \s-1GNU\s0 General Public License as published by the Free Software +Foundation, version 2; \s-1OR\s0 the Perl Artistic License. On \s-1UNIX\s0 and similar +systems, you can issue `man perlgpl' or `man perlartistic' to read these +licenses. +.PP +You should have received a copy of the \s-1GNU\s0 General Public License along with +this program; if not, write to the Free Software Foundation, Inc., 59 Temple +Place, Suite 330, Boston, \s-1MA\s0 02111\-1307 \s-1USA\s0. +.PP +Execute innotop and press '!' to see this information at any time. +.SH "AUTHOR" +.IX Header "AUTHOR" +Originally written by Baron Schwartz; currently maintained by Aaron Racine. +.SH "BUGS" +.IX Header "BUGS" +You can report bugs, ask for improvements, and get other help and support at +. There are mailing lists, a source code +browser, a bug tracker, etc. Please use these instead of contacting the +maintainer or author directly, as it makes our job easier and benefits others if the +discussions are permanent and public. Of course, if you need to contact us in +private, please do. diff --git a/packaging/deb-in/extra/my.cnf.fallback b/packaging/deb-in/extra/my.cnf.fallback index 24940f46d238..32c317fd0757 100644 --- a/packaging/deb-in/extra/my.cnf.fallback +++ b/packaging/deb-in/extra/my.cnf.fallback @@ -22,4 +22,22 @@ # * IMPORTANT: Additional settings that can override those from this file! # The files must end with '.cnf', otherwise they'll be ignored. # + +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + !includedir /etc/mysql/conf.d/ diff --git a/packaging/deb-in/extra/mysql-helpers b/packaging/deb-in/extra/mysql-helpers index 538177d193c9..f91f92c11bfa 100644 --- a/packaging/deb-in/extra/mysql-helpers +++ b/packaging/deb-in/extra/mysql-helpers @@ -62,11 +62,48 @@ get_running () { fi } +get_path () { + my_print_defaults mysqld | grep "$1" | cut -d= -f2 | tail -n 1 +} + +get_recover_pos () { + wsrep_start_position_opt="" + + LOG=$(mktemp --tmpdir=/var/lib/mysql-files/ --suffix=.log) + chown mysql.mysql $LOG + /usr/sbin/mysqld --user=mysql --wsrep_recover --log-error=$LOG + + local rp="$(grep 'WSREP: Recovered position:' $LOG | tail -n 1)" + if [ -z "$rp" ]; then + local skipped="$(grep WSREP $LOG | grep 'skipping position recovery')" + if [ -z "$skipped" ]; then + systemd-cat -t mysql -p err echo "WSREP: Failed to recover position:" + exit 1 + else + systemd-cat -t mysql -p info echo "WSREP: Position recovery skipped" + fi + else + local start_pos="$(echo $rp | sed 's/.*WSREP\:\ Recovered\ position://' \ + | sed 's/^[ \t]*//')" + systemd-cat -t mysql -p info echo "WSREP: Recovered position $start_pos" + wsrep_start_position_opt="--wsrep_start_position=$start_pos" + fi + rm -f $LOG + + if [ -n "$start_pos" ]; then + systemctl set-environment MYSQLD_RECOVER_START="$wsrep_start_position_opt" + fi +} + +clear_recover_pos () { + systemctl unset-environment MYSQLD_RECOVER_START +} + # Runs an arbitrary init sql file supplied in $1. Does not require login access run_init_sql() { tmpdir=$(mktemp -d) chown mysql:mysql "$tmpdir" - mysqld --bootstrap --user=mysql --socket="$tmpdir/mysqld.sock" --pid-file="$tmpdir/mysqld.pid" > /dev/null 2>&1 < "$1" + /usr/sbin/mysqld --user=mysql --init-file="$1" --socket="$tmpdir/mysqld.sock" --pid-file="$tmpdir/mysqld.pid" > /dev/null 2>&1 result=$? rm -rf "$tmpdir" return $result @@ -141,7 +178,19 @@ verify_database() { MYSQLFILES=$(get_mysql_option mysqld secure-file-priv "/var/lib/mysql-files") if [ ! -d "${MYSQLDATA}/mysql" ] && [ -d "${MYSQLFILES}" ]; then - su - mysql -s /bin/bash -c "mysql_install_db --user=mysql > /dev/null" + su - mysql -s /bin/bash -c "/usr/sbin/mysqld --initialize-insecure > /dev/null" + SQL=$(mktemp -u ${MYSQLFILES}/XXXXXXXXXX) + install /dev/null -m0600 -omysql -gmysql "${SQL}" + cat << EOF > ${SQL} +USE mysql; +INSTALL PLUGIN auth_socket SONAME 'auth_socket.so'; +ALTER USER 'root'@'localhost' IDENTIFIED WITH 'auth_socket'; +SHUTDOWN; +EOF + run_init_sql "$SQL" + rm -f "$SQL" + else + get_recover_pos fi if [ -x /usr/bin/mysql_ssl_rsa_setup -a ! -e "${MYSQLDATA}/server-key.pem" ]; then diff --git a/packaging/deb-in/extra/mysql-systemd-start b/packaging/deb-in/extra/mysql-systemd-start index 4b2177691dc6..61c5ec50cfbf 100644 --- a/packaging/deb-in/extra/mysql-systemd-start +++ b/packaging/deb-in/extra/mysql-systemd-start @@ -15,31 +15,54 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Script modified to handle the specific needs of the "wsrep" plugin +# which enables a MySQL server to act as a node in Galera Cluster. +# Modifications +# Copyright (c) 2015, 2016, Codership Oy + # Scripts to run by MySQL systemd service # -# Needed argument: pre +# Needed argument: pre | post # # pre mode : try to perform sanity check for configuration, log, data # post mode : ping server until answer is received + # Include helper functions . /usr/share/mysql/mysql-helpers sanity () { + if [ ! -r /etc/mysql/my.cnf ]; then + systemd-cat -t mysql -p err \ + echo "MySQL configuration not found at /etc/mysql/my.cnf. Please install one using update-alternatives." + exit 1 + fi + # Make sure database and required directories exist verify_ready verify_database - @DEB_INIT_APPARMOR@ +} - if [ ! -r /etc/mysql/my.cnf ]; then - echo "MySQL configuration not found at /etc/mysql/my.cnf. Please install one using update-alternatives." - exit 1 - fi +pinger () { + server_up=false + for i in $(seq 1 30); do + sleep 1 + if mysqladmin ping >/dev/null 2>&1; then + server_up=true + break + fi + done + clear_recover_pos + if [ ! $server_up ]; then + systemd-cat -t mysql -p err \ + echo "MySQL server not started" + exit 1 + fi } case $1 in "pre") sanity ;; - "post") pinger ;; + "post") pinger ;; esac diff --git a/packaging/deb-in/extra/mysql.cnf b/packaging/deb-in/extra/mysql.cnf index 15369855280d..be2e27253e91 100644 --- a/packaging/deb-in/extra/mysql.cnf +++ b/packaging/deb-in/extra/mysql.cnf @@ -1,4 +1,4 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -14,13 +14,23 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# The MySQL @PRODUCTNAMEC@ Server configuration file. +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. # # For explanations see # http://dev.mysql.com/doc/mysql/en/server-system-variables.html +# # * IMPORTANT: Additional settings that can override those from this file! # The files must end with '.cnf', otherwise they'll be ignored. # + !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mysql.conf.d/ diff --git a/packaging/deb-in/extra/mysql.conf.d/mysqld.cnf b/packaging/deb-in/extra/mysql.conf.d/mysqld.cnf new file mode 100644 index 000000000000..c5ad70578399 --- /dev/null +++ b/packaging/deb-in/extra/mysql.conf.d/mysqld.cnf @@ -0,0 +1,100 @@ +# +# The MySQL database server configuration file. +# +# You can copy this to one of: +# - "/etc/mysql/my.cnf" to set global options, +# - "~/.my.cnf" to set user-specific options. +# +# One can use all long options that the program supports. +# Run program with --help to get a list of available options and with +# --print-defaults to see which it would actually understand and use. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +# This will be passed to all mysql clients +# It has been reported that passwords should be enclosed with ticks/quotes +# escpecially if they contain "#" chars... +# Remember to edit /etc/mysql/debian.cnf when changing the socket location. + +# Here is entries for some specific programs +# The following values assume you have at least 32M ram + +[mysqld] +# +# * Basic Settings +# +user = mysql +pid-file = /var/run/mysqld/mysqld.pid +socket = /var/run/mysqld/mysqld.sock +port = 3306 +basedir = /usr +datadir = /var/lib/mysql +tmpdir = /tmp +lc-messages-dir = /usr/share/mysql +skip-external-locking +# +# Instead of skip-networking the default is now to listen only on +# localhost which is more compatible and is not less secure. +bind-address = 127.0.0.1 +# +# * Fine Tuning +# +key_buffer_size = 16M +max_allowed_packet = 16M +thread_stack = 192K +thread_cache_size = 8 +# This replaces the startup script and checks MyISAM tables if needed +# the first time they are touched +myisam-recover-options = BACKUP +#max_connections = 100 +#table_cache = 64 +#thread_concurrency = 10 +# +# * Query Cache Configuration +# +query_cache_limit = 1M +query_cache_size = 16M +# +# * Logging and Replication +# +# Both location gets rotated by the cronjob. +# Be aware that this log type is a performance killer. +# As of 5.1 you can enable the log at runtime! +#general_log_file = /var/log/mysql/mysql.log +#general_log = 1 +# +# Error log - should be very few entries. +# +log_error = /var/log/mysql/error.log +# +# Here you can see queries with especially long duration +#log_slow_queries = /var/log/mysql/mysql-slow.log +#long_query_time = 2 +#log-queries-not-using-indexes +# +# The following can be used as easy to replay backup logs or for replication. +# note: if you are setting up a replication slave, see README.Debian about +# other settings you may need to change. +#server-id = 1 +#log_bin = /var/log/mysql/mysql-bin.log +expire_logs_days = 10 +max_binlog_size = 100M +#binlog_do_db = include_database_name +#binlog_ignore_db = include_database_name +# +# * InnoDB +# +# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. +# Read the manual for more InnoDB related options. There are many! +# +# * Security Features +# +# Read the manual, too, if you want chroot! +# chroot = /var/lib/mysql/ +# +# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". +# +# ssl-ca=/etc/mysql/cacert.pem +# ssl-cert=/etc/mysql/server-cert.pem +# ssl-key=/etc/mysql/server-key.pem diff --git a/packaging/deb-in/extra/mysql.conf.d/mysqld_safe_syslog.cnf b/packaging/deb-in/extra/mysql.conf.d/mysqld_safe_syslog.cnf new file mode 100644 index 000000000000..3b0445d6bd82 --- /dev/null +++ b/packaging/deb-in/extra/mysql.conf.d/mysqld_safe_syslog.cnf @@ -0,0 +1,2 @@ +[mysqld_safe] +syslog diff --git a/packaging/deb-in/extra/mysqlreport b/packaging/deb-in/extra/mysqlreport new file mode 100644 index 000000000000..402a5be835d5 --- /dev/null +++ b/packaging/deb-in/extra/mysqlreport @@ -0,0 +1,1298 @@ +#!/usr/bin/perl -w + +# mysqlreport v3.5 Apr 16 2008 +# http://hackmysql.com/mysqlreport + +# mysqlreport makes an easy-to-read report of important MySQL status values. +# Copyright 2006-2008 Daniel Nichter +# +# 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; either version 2 +# of the License, or (at your option) any later version. +# +# 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. +# +# The GNU General Public License is available at: +# http://www.gnu.org/copyleft/gpl.html + +use strict; +use File::Temp qw(tempfile); +use DBI; +use Getopt::Long; +eval { require Term::ReadKey; }; +my $RK = ($@ ? 0 : 1); + +sub have_op; + +my $WIN = ($^O eq 'MSWin32' ? 1 : 0); +my %op; +my %mycnf; # ~/.my.cnf +my ($tmpfile_fh, $tmpfile); +my ($stat_name, $stat_val, $stat_label); +my $MySQL_version; +my (%stats, %vars); # SHOW STATUS, SHOW VARIABLES +my (%DMS_vals, %Com_vals, %ib_vals); +my ($dbh, $query); +my ($questions, $key_read_ratio, $key_write_ratio, $dms, $slow_query_t); +my ($key_cache_block_size, $key_buffer_used, $key_buffer_usage); +my ($qc_mem_used, $qc_hi_r, $qc_ip_r); # Query Cache +my $have_innodb_vals; +my ($ib_bp_used, $ib_bp_total, $ib_bp_read_ratio); +my ($relative_live, $relative_infiles); +my $real_uptime; +my (%stats_present, %stats_past); # For relative reports + +GetOptions ( + \%op, + "user=s", + "password:s", + "host=s", + "port=s", + "socket=s", + "no-mycnf", + "infile|in=s", + "outfile=s", + "flush-status", + "email=s", + "r|relative:i", + "c|report-count=i", + "detach", + "help|?", + "debug" +); + +show_help_and_exit() if $op{'help'}; + +get_user_mycnf() unless $op{'no-mycnf'}; + +# Command line options override ~/.my.cnf +$mycnf{'host'} = $op{'host'} if have_op 'host'; +$mycnf{'port'} = $op{'port'} if have_op 'port'; +$mycnf{'socket'} = $op{'socket'} if have_op 'socket'; +$mycnf{'user'} = $op{'user'} if have_op 'user'; + +$mycnf{'user'} ||= $ENV{'USER'}; + +if(exists $op{'password'}) +{ + if($op{'password'} eq '') # Prompt for password + { + Term::ReadKey::ReadMode(2) if $RK; + print "Password for database user $mycnf{'user'}: "; + chomp($mycnf{'pass'} = ); + Term::ReadKey::ReadMode(0), print "\n" if $RK; + } + else { $mycnf{'pass'} = $op{'password'}; } # Use password given on command line +} + +$op{'com'} ||= 3; +$op{'c'} ||= 1; # Used in collect_reports() if --r given integer value + +$relative_live = 0; +$relative_infiles = 0; + +if(defined $op{'r'}) +{ + if($op{r}) { $relative_live = 1; } # if -r was given an integer value + else { $relative_infiles = 1; } +} + +# The report is written to a tmp file first. +# Later it will be moved to $op{'outfile'} or emailed $op{'email'} if needed. +($tmpfile_fh, $tmpfile) = tempfile() or die "Cannot open temporary file for writing: $!\n"; + +if($op{'detach'}) +{ + $SIG{'TERM'} = 'sig_handler'; + + if(fork()) + { + print "mysqlreport has forked and detached.\n"; + print "While running detached, mysqlreport writes reports to '$tmpfile'.\n"; + + exit; + } + + open(STDIN, " $tmpfile") or die "Cannot dup STDOUT: $!\n"; + open(STDERR, "> $tmpfile") or die "Cannot dup STDERR: $!\n"; +} + +select $tmpfile_fh; +$| = 1 if ($op{'detach'} || $relative_live); + +print "tmp file: $tmpfile\n" if $op{debug}; + +# Connect to MySQL +if(!$op{'infile'} && !$relative_infiles) +{ + connect_to_MySQL(); +} + +$have_innodb_vals = 1; # This might be set to 0 later in get_MySQL_version() + +if(defined $op{'r'}) +{ + if($relative_live) + { + print STDERR "mysqlreport is writing relative reports to '$tmpfile'.\n" unless $op{'detach'}; + get_MySQL_version(); + collect_reports(); + } + + if($relative_infiles) { read_relative_infiles(); } +} +else +{ + if(!$op{'infile'}) + { + get_MySQL_version(); + get_vals(); + get_vars(); + } + else + { + read_infile($op{'infile'}); + } + + get_Com_values(); + + set_myisam_vals(); + set_ib_vals() if $have_innodb_vals; + + write_report(); +} + +exit_tasks_and_cleanup(); + +exit; + +# +# Subroutines +# +sub show_help_and_exit +{ + print <<"HELP"; +mysqlreport v3.5 Apr 16 2008 +mysqlreport makes an easy-to-read report of important MySQL status values. + +Command line options (abbreviations work): + --user USER Connect to MySQL as USER + --password PASS Use PASS or prompt for MySQL user's password + --host ADDRESS Connect to MySQL at ADDRESS + --port PORT Connect to MySQL at PORT + --socket SOCKET Connect to MySQL at SOCKET + --no-mycnf Don't read ~/.my.cnf + --infile FILE Read status values from FILE instead of MySQL + --outfile FILE Write report to FILE + --email ADDRESS Email report to ADDRESS (doesn't work on Windows) + --flush-status Issue FLUSH STATUS; after getting current values + --relative X Generate relative reports. If X is an integer, + reports are live from the MySQL server X seconds apart. + If X is a list of infiles (file1 file2 etc.), + reports are generated from the infiles in the order + that they are given. + --report-count N Collect N number of live relative reports (default 1) + --detach Fork and detach from terminal (run in background) + --help Prints this + --debug Print debugging information + +Visit http://hackmysql.com/mysqlreport for more information. +HELP + + exit; +} + +sub get_user_mycnf +{ + print "get_user_mycnf\n" if $op{debug}; + + return if $WIN; + open MYCNF, "$ENV{HOME}/.my.cnf" or return; + while() + { + if(/^(.+?)\s*=\s*"?(.+?)"?\s*$/) + { + $mycnf{$1} = $2; + print "get_user_mycnf: read '$1 = $2'\n" if $op{debug}; + } + } + $mycnf{'pass'} ||= $mycnf{'password'} if exists $mycnf{'password'}; + close MYCNF; +} + +sub connect_to_MySQL +{ + print "connect_to_MySQL\n" if $op{debug}; + + my $dsn; + + if($mycnf{'socket'} && -S $mycnf{'socket'}) + { + $dsn = "DBI:mysql:mysql_socket=$mycnf{socket}"; + } + elsif($mycnf{'host'}) + { + $dsn = "DBI:mysql:host=$mycnf{host}" . ($mycnf{port} ? ";port=$mycnf{port}" : ""); + } + else + { + $dsn = "DBI:mysql:host=localhost"; + } + + print "connect_to_MySQL: DBI DSN: $dsn\n" if $op{debug}; + + $dbh = DBI->connect($dsn, $mycnf{'user'}, $mycnf{'pass'}) or die; +} + +sub collect_reports +{ + print "collect_reports\n" if $op{debug}; + + my $i; + + get_vals(); + get_vars(); + + get_Com_values(); + + %stats_past = %stats; + + set_myisam_vals(); + set_ib_vals() if $have_innodb_vals; + + print "#\n# Beginning report, 0 0:0:0\n#\n"; + + write_report(); + + for($i = 0; $i < $op{'c'}; $i++) + { + $dbh->disconnect(); + + sleep($op{'r'}); + + connect_to_MySQL(); + + print "\n#\n# Interval report " , $i + 1 , ", +", sec_to_dhms(($i + 1) * $op{'r'}), "\n#\n"; + + get_vals(); + + write_relative_report(); + } +} + +sub read_relative_infiles +{ + print "read_relative_infiles\n" if $op{debug}; + + my $slurp; # Used to check infiles for multiple sets of status values + my $n_stats; # Number of multiple sets of status values in an infile + my $infile; + my $report_n; # Report number + + $report_n = 1; + + foreach $infile (@ARGV) + { + # Read all of infile into $slurp + open INFILE, "< $infile" or warn and next; + $slurp = do { local $/; }; + close INFILE; + + $n_stats = 0; + + # Count number of status value sets + $n_stats++ while $slurp =~ /Aborted_clients/g; + + print "read_relative_infiles: found $n_stats sets of status values in file '$infile'\n" + if $op{debug}; + + if($n_stats == 1) + { + read_infile($infile); + relative_infile_report($report_n++); + } + + if($n_stats > 1) + { + my @tmpfile_fh; + my @tmpfile_name; + my $i; + my $stat_n; # Status value set number + + # Create a tmp file for each set of status values + for($i = 0; $i < $n_stats; $i++) + { + my ($fh, $name) = tempfile() + or die "read_relative_infiles: cannot open temporary file for writing: $!\n"; + + push(@tmpfile_fh, $fh); + push(@tmpfile_name, $name); + + print "read_relative_infiles: created tmp file '$name' for set $i\n" if $op{debug}; + } + + $i = 0; + $stat_n = 0; + + select $tmpfile_fh[$i]; + + # Read infile again and copy each set of status values to seperate tmp files + open INFILE, "< $infile" or warn and next; + while() + { + next if /^\+/; + next if /^$/; + + # The infile must begin with the system variable values. + # Therefore, the first occurance of Aborted_clients indicates the beginning + # of the first set of status values if no sets have occured yet ($stat_n == 0). + # In this case, the following status values are printed to the current fh, + # along with the system variable values read thus far, until Aborted_clients + # occurs again. Then begins the second and subsequent sets of status values. + + if(/Aborted_clients/) + { + print and next if $stat_n++ == 0; + select $tmpfile_fh[++$i]; + } + + print; + } + close INFILE; + + # Re-select the main tmp file into which the reports are being written. + select $tmpfile_fh; + + for($i = 0; $i < $n_stats; $i++) + { + close $tmpfile_fh[$i]; + + print "read_relative_infiles: reading set $i tmp file '$tmpfile_name[$i]'\n" + if $op{debug}; + + read_infile($tmpfile_name[$i]); + relative_infile_report($report_n++); + + if($WIN) { `del $tmpfile_name[$i]`; } + else { `rm -f $tmpfile_name[$i]`; } + + print "read_relative_infiles: deleted set $i tmp file '$tmpfile_name[$i]'\n" + if $op{debug}; + } + + } # if($n_stats > 1) + } # foreach $infile (@files) +} + +sub relative_infile_report +{ + print "relative_infile_report\n" if $op{debug}; + + my $report_n = shift; + + if($report_n == 1) + { + get_Com_values(); + + %stats_past = %stats; + + set_myisam_vals(); + set_ib_vals() if $have_innodb_vals; + + print "#\n# Beginning report, 0 0:0:0\n#\n"; + + write_report(); + } + else + { + print "\n#\n# Interval report ", $report_n - 1, ", +", + sec_to_dhms($stats{Uptime} - $stats_past{Uptime}), + "\n#\n"; + + write_relative_report(); + } +} + +sub get_vals +{ + print "get_vals\n" if $op{debug}; + + my @row; + + # Get status values + if($MySQL_version >= 50002) + { + $query = $dbh->prepare("SHOW GLOBAL STATUS;"); + } + else + { + $query = $dbh->prepare("SHOW STATUS;"); + } + $query->execute(); + while(@row = $query->fetchrow_array()) { $stats{$row[0]} = $row[1]; } + + $real_uptime = $stats{'Uptime'}; +} + +sub get_vars +{ + print "get_vars\n" if $op{debug}; + + my @row; + + # Get server system variables + $query = $dbh->prepare("SHOW VARIABLES;"); + $query->execute(); + while(@row = $query->fetchrow_array()) { $vars{$row[0]} = $row[1]; } + + # table_cache was renamed to table_open_cache in MySQL 5.1.3 + if($MySQL_version >= 50103) + { + $vars{'table_cache'} = $vars{'table_open_cache'}; + } +} + +sub read_infile +{ + print "read_infile\n" if $op{debug}; + + my $infile = shift; + + # Default required system variable values if not set in INFILE. + # As of mysqlreport v3.5 the direct output from SHOW VARIABLES; + # can be put into INFILE instead. See http://hackmysql.com/mysqlreportdoc + # for details. + $vars{'version'} = "0.0.0" if !exists $vars{'version'}; + $vars{'table_cache'} = 64 if !exists $vars{'table_cache'}; + $vars{'max_connections'} = 100 if !exists $vars{'max_connections'}; + $vars{'key_buffer_size'} = 8388600 if !exists $vars{'key_buffer_size'}; # 8M + $vars{'thread_cache_size'} = 0 if !exists $vars{'thread_cache_size'}; + $vars{'tmp_table_size'} = 0 if !exists $vars{'tmp_table_size'}; + $vars{'long_query_time'} = '?' if !exists $vars{'long_query_time'}; + $vars{'log_slow_queries'} = '?' if !exists $vars{'log_slow_queries'}; + + # One should also add: + # key_cache_block_size + # query_cache_size + # to INFILE if needed. + + open INFILE, "< $infile" or die "Cannot open INFILE '$infile': $!\n"; + + while() + { + last if !defined $_; + + next if /^\+/; # skip divider lines + next if /^$/; # skip blank lines + + next until /(Aborted_clients|back_log|=)/; + + if($1 eq 'Aborted_clients') # status values + { + print "read_infile: start stats\n" if $op{debug}; + + while($_) + { + chomp; + if(/([A-Za-z_]+)[\s\t|]+(\d+)/) + { + $stats{$1} = $2; + print "read_infile: save $1 = $2\n" if $op{debug}; + } + else { print "read_infile: ignore '$_'\n" if $op{debug}; } + + last if $1 eq 'Uptime'; # exit while() if end of status values + $_ = ; # otherwise, read next line of status values + } + } + elsif($1 eq 'back_log') # system variable values + { + print "read_infile: start vars\n" if $op{debug}; + + while($_) + { + chomp; + if(/([A-Za-z_]+)[\s\t|]+([\w\.\-]+)/) # This will exclude some vars + { # like pid_file which we don't need + $vars{$1} = $2; + print "read_infile: save $1 = $2\n" if $op{debug}; + } + else { print "read_infile: ignore '$_'\n" if $op{debug}; } + + last if $1 eq 'wait_timeout'; # exit while() if end of vars + $_ = ; # otherwise, read next line of vars + } + } + elsif($1 eq '=') # old style, manually added system variable values + { + print "read_infile: start old vars\n" if $op{debug}; + + while($_ && $_ =~ /=/) + { + chomp; + if(/^\s*(\w+)\s*=\s*([0-9.]+)(M*)\s*$/) # e.g.: key_buffer_size = 128M + { + $vars{$1} = ($3 ? $2 * 1024 * 1024 : $2); + print "read_infile: read '$_' as $1 = $vars{$1}\n" if $op{debug}; + } + else { print "read_infile: ignore '$_'\n" if $op{debug}; } + + $_ = ; # otherwise, read next line of old vars + } + + redo; + } + else + { + print "read_infile: unrecognized line: '$_'\n" if $op{debug}; + } + } + + close INFILE; + + $real_uptime = $stats{'Uptime'}; + + $vars{'table_cache'} = $vars{'table_open_cache'} if exists $vars{'table_open_cache'}; + + get_MySQL_version(); +} + +sub get_MySQL_version +{ + print "get_MySQL_version\n" if $op{debug}; + + return if $MySQL_version; + + my ($major, $minor, $patch); + + if($op{'infile'} || $relative_infiles) + { + ($major, $minor, $patch) = ($vars{'version'} =~ /(\d{1,2})\.(\d{1,2})\.(\d{1,2})/); + } + else + { + my @row; + + $query = $dbh->prepare("SHOW VARIABLES LIKE 'version';"); + $query->execute(); + @row = $query->fetchrow_array(); + ($major, $minor, $patch) = ($row[1] =~ /(\d{1,2})\.(\d{1,2})\.(\d{1,2})/); + } + + $MySQL_version = sprintf("%d%02d%02d", $major, $minor, $patch); + + # Innodb_ status values were added in 5.0.2 + if($MySQL_version < 50002) + { + $have_innodb_vals = 0; + print "get_MySQL_version: no InnoDB reports because MySQL version is older than 5.0.2\n" if $op{debug}; + } +} + +sub set_myisam_vals +{ + print "set_myisam_vals\n" if $op{debug}; + + $questions = $stats{'Questions'}; + + $key_read_ratio = sprintf "%.2f", + ($stats{'Key_read_requests'} ? + 100 - ($stats{'Key_reads'} / $stats{'Key_read_requests'}) * 100 : + 0); + + $key_write_ratio = sprintf "%.2f", + ($stats{'Key_write_requests'} ? + 100 - ($stats{'Key_writes'} / $stats{'Key_write_requests'}) * 100 : + 0); + + $key_cache_block_size = (defined $vars{'key_cache_block_size'} ? + $vars{'key_cache_block_size'} : + 1024); + + $key_buffer_used = $stats{'Key_blocks_used'} * $key_cache_block_size; + + if(defined $stats{'Key_blocks_unused'}) # MySQL 4.1.2+ + { + $key_buffer_usage = $vars{'key_buffer_size'} - + ($stats{'Key_blocks_unused'} * $key_cache_block_size); + } + else { $key_buffer_usage = -1; } + + # Data Manipulation Statements: http://dev.mysql.com/doc/refman/5.0/en/data-manipulation.html + %DMS_vals = + ( + SELECT => $stats{'Com_select'}, + INSERT => $stats{'Com_insert'} + $stats{'Com_insert_select'}, + REPLACE => $stats{'Com_replace'} + $stats{'Com_replace_select'}, + UPDATE => $stats{'Com_update'} + + (exists $stats{'Com_update_multi'} ? $stats{'Com_update_multi'} : 0), + DELETE => $stats{'Com_delete'} + + (exists $stats{'Com_delete_multi'} ? $stats{'Com_delete_multi'} : 0) + ); + + $dms = $DMS_vals{SELECT} + $DMS_vals{INSERT} + $DMS_vals{REPLACE} + $DMS_vals{UPDATE} + $DMS_vals{DELETE}; + + $slow_query_t = format_u_time($vars{long_query_time}); + +} + +sub set_ib_vals +{ + print "set_ib_vals\n" if $op{debug}; + + $ib_bp_used = ($stats{'Innodb_buffer_pool_pages_total'} - + $stats{'Innodb_buffer_pool_pages_free'}) * + $stats{'Innodb_page_size'}; + + $ib_bp_total = $stats{'Innodb_buffer_pool_pages_total'} * $stats{'Innodb_page_size'}; + + $ib_bp_read_ratio = sprintf "%.2f", + ($stats{'Innodb_buffer_pool_read_requests'} ? + 100 - ($stats{'Innodb_buffer_pool_reads'} / + $stats{'Innodb_buffer_pool_read_requests'}) * 100 : + 0); +} + +sub write_relative_report +{ + print "write_relative_report\n" if $op{debug}; + + %stats_present = %stats; + + for(keys %stats) + { + if($stats_past{$_} =~ /\d+/) + { + if($stats_present{$_} >= $stats_past{$_}) # Avoid negative values + { + $stats{$_} = $stats_present{$_} - $stats_past{$_}; + } + } + } + + # These values are either "at present" or "high water marks". + # Therefore, it is more logical to not relativize these values. + # Doing otherwise causes strange and misleading values. + $stats{'Key_blocks_used'} = $stats_present{'Key_blocks_used'}; + $stats{'Open_tables'} = $stats_present{'Open_tables'}; + $stats{'Max_used_connections'} = $stats_present{'Max_used_connections'}; + $stats{'Threads_running'} = $stats_present{'Threads_running'}; + $stats{'Threads_connected'} = $stats_present{'Threads_connected'}; + $stats{'Threads_cached'} = $stats_present{'Threads_cached'}; + $stats{'Qcache_free_blocks'} = $stats_present{'Qcache_free_blocks'}; + $stats{'Qcache_total_blocks'} = $stats_present{'Qcache_total_blocks'}; + $stats{'Qcache_free_memory'} = $stats_present{'Qcache_free_memory'}; + if($have_innodb_vals) + { + $stats{'Innodb_page_size'} = $stats_present{'Innodb_page_size'}; + $stats{'Innodb_buffer_pool_pages_data'} = $stats_present{'Innodb_buffer_pool_pages_data'}; + $stats{'Innodb_buffer_pool_pages_dirty'} = $stats_present{'Innodb_buffer_pool_pages_dirty'}; + $stats{'Innodb_buffer_pool_pages_free'} = $stats_present{'Innodb_buffer_pool_pages_free'}; + $stats{'Innodb_buffer_pool_pages_latched'} = $stats_present{'Innodb_buffer_pool_pages_latched'}; + $stats{'Innodb_buffer_pool_pages_misc'} = $stats_present{'Innodb_buffer_pool_pages_misc'}; + $stats{'Innodb_buffer_pool_pages_total'} = $stats_present{'Innodb_buffer_pool_pages_total'}; + $stats{'Innodb_data_pending_fsyncs'} = $stats_present{'Innodb_data_pending_fsyncs'}; + $stats{'Innodb_data_pending_reads'} = $stats_present{'Innodb_data_pending_reads'}; + $stats{'Innodb_data_pending_writes'} = $stats_present{'Innodb_data_pending_writes'}; + + # Innodb_row_lock_ values were added in MySQL 5.0.3 + if($MySQL_version >= 50003) + { + $stats{'Innodb_row_lock_current_waits'} = $stats_present{'Innodb_row_lock_current_waits'}; + $stats{'Innodb_row_lock_time_avg'} = $stats_present{'Innodb_row_lock_time_avg'}; + $stats{'Innodb_row_lock_time_max'} = $stats_present{'Innodb_row_lock_time_max'}; + } + } + + get_Com_values(); + + %stats_past = %stats_present; + + set_myisam_vals(); + set_ib_vals() if $have_innodb_vals; + + write_report(); +} + +sub write_report +{ + print "write_report\n" if $op{debug}; + + $~ = 'MYSQL_TIME', write; + $~ = 'KEY_BUFF_MAX', write; + if($key_buffer_usage != -1) { $~ = 'KEY_BUFF_USAGE', write } + $~ = 'KEY_RATIOS', write; + write_DTQ(); + $~ = 'SLOW_DMS', write; + write_DMS(); + write_Com(); + $~ = 'SAS', write; + write_qcache(); + $~ = 'REPORT_END', write; + $~ = 'TAB', write; + + write_InnoDB() if $have_innodb_vals; +} + +sub sec_to_dhms # Seconds to days hours:minutes:seconds +{ + my $s = shift; + my ($d, $h, $m) = (0, 0, 0); + + return '0 0:0:0' if $s <= 0; + + if($s >= 86400) + { + $d = int $s / 86400; + $s -= $d * 86400; + } + + if($s >= 3600) + { + $h = int $s / 3600; + $s -= $h * 3600; + } + + $m = int $s / 60; + $s -= $m * 60; + + return "$d $h:$m:$s"; +} + +sub make_short +{ + my ($number, $kb, $d) = @_; + my $n = 0; + my $short; + + $d ||= 2; + + if($kb) { while ($number > 1023) { $number /= 1024; $n++; }; } + else { while ($number > 999) { $number /= 1000; $n++; }; } + + $short = sprintf "%.${d}f%s", $number, ('','k','M','G','T')[$n]; + if($short =~ /^(.+)\.(00)$/) { return $1; } # 12.00 -> 12 but not 12.00k -> 12k + + return $short; +} + +# What began as a simple but great idea has become the new standard: +# long_query_time in microseconds. For MySQL 5.1.21+ and 6.0.4+ this +# is now standard. For 4.1 and 5.0 patches, the architects of this +# idea provide: http://www.mysqlperformanceblog.com/mysql-patches/ +# Relevant notes in MySQL manual: +# http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html +# http://dev.mysql.com/doc/refman/6.0/en/slow-query-log.html +# +# The format_u_time sub simply beautifies long_query_time. + +sub format_u_time # format microsecond (µ) time value +{ + # 0.000000 - 0.000999 = 0 - 999 µ + # 0.001000 - 0.999999 = 1 ms - 999.999 ms + # 1.000000 - n.nnnnnn = 1 s - n.nnnnn s + + my $t = shift; + my $f; # formatted µ time + my $u = chr(($WIN ? 230 : 181)); + + $t = 0 if $t < 0; + + if($t > 0 && $t <= 0.000999) + { + $f = ($t * 1000000) . " $u"; + } + elsif($t >= 0.001000 && $t <= 0.999999) + { + $f = ($t * 1000) . ' ms'; + } + elsif($t >= 1) + { + $f = ($t * 1) . ' s'; # * 1 to remove insignificant zeros + } + else + { + $f = 0; # $t should = 0 at this point + } + + return $f; +} + +sub perc # Percentage +{ + my($is, $of) = @_; + $is = 0 if (not defined $is); + return sprintf "%.2f", ($is * 100) / ($of ||= 1); +} + +sub t # Time average per second +{ + my $val = shift; + return 0 if !$val; + return(make_short($val / $stats{'Uptime'}, 0, 1)); +} + +sub email_report # Email given report to $op{'email'} +{ + print "email_report\n" if $op{debug}; + + return if $WIN; + + my $report = shift; + + open SENDMAIL, "|/usr/sbin/sendmail -t"; + print SENDMAIL "From: mysqlreport\n"; + print SENDMAIL "To: $op{email}\n"; + print SENDMAIL "Subject: MySQL status report on " . ($mycnf{'host'} || 'localhost') . "\n\n"; + print SENDMAIL `cat $report`; + close SENDMAIL; +} + +sub cat_report # Print given report to screen +{ + print "cat_report\n" if $op{debug}; + + my $report = shift; + my @report; + + open REPORT, "< $report"; + @report = ; + close REPORT; + print @report; +} + +sub get_Com_values +{ + print "get_Com_values\n" if $op{debug}; + + %Com_vals = (); + + # Make copy of just the Com_ values + for(keys %stats) + { + if(grep /^Com_/, $_ and $stats{$_} > 0) + { + /^Com_(.*)/; + $Com_vals{$1} = $stats{$_}; + } + } + + # Remove DMS values + delete $Com_vals{'select'}; + delete $Com_vals{'insert'}; + delete $Com_vals{'insert_select'}; + delete $Com_vals{'replace'}; + delete $Com_vals{'replace_select'}; + delete $Com_vals{'update'}; + delete $Com_vals{'update_multi'} if exists $Com_vals{'update_multi'}; + delete $Com_vals{'delete'}; + delete $Com_vals{'delete_multi'} if exists $Com_vals{'delete_multi'}; +} + +sub write_DTQ # Write DTQ report in descending order by values +{ + print "write_DTQ\n" if $op{debug}; + + $~ = 'DTQ'; + + my %DTQ; + my $first = 1; + + # Total Com values + $stat_val = 0; + for(values %Com_vals) { $stat_val += $_; } + $DTQ{'Com_'} = $stat_val; + + $DTQ{'DMS'} = $dms; + $DTQ{'QC Hits'} = $stats{'Qcache_hits'} if $stats{'Qcache_hits'} != 0; + $DTQ{'COM_QUIT'} = int (($stats{'Connections'} - 2) - ($stats{'Aborted_clients'} / 2)); + + $stat_val = 0; + for(values %DTQ) { $stat_val += $_; } + if($questions != $stat_val) + { + $DTQ{($questions > $stat_val ? '+Unknown' : '-Unknown')} = abs $questions - $stat_val; + } + + for(sort { $DTQ{$b} <=> $DTQ{$a} } keys(%DTQ)) + { + if($first) { $stat_label = '%Total:'; $first = 0; } + else { $stat_label = ''; } + + $stat_name = $_; + $stat_val = $DTQ{$_}; + write; + } +} + +sub write_DMS # Write DMS report in descending order by values +{ + print "write_DMS\n" if $op{debug}; + + $~ = 'DMS'; + + for(sort { $DMS_vals{$b} <=> $DMS_vals{$a} } keys(%DMS_vals)) + { + $stat_name = $_; + $stat_val = $DMS_vals{$_}; + write; + } +} + +sub write_Com # Write COM report in descending order by values +{ + print "write_Com\n" if $op{debug}; + + my $i = $op{'com'}; + + $~ = 'COM_1'; + + # Total Com values and write first line of COM report + $stat_label = '%Total:' unless $op{'dtq'}; + $stat_val = 0; + for(values %Com_vals) { $stat_val += $_; } + write; + + $~ = 'COM_2'; + + # Sort remaining Com values, print only the top $op{'com'} number of values + for(sort { $Com_vals{$b} <=> $Com_vals{$a} } keys(%Com_vals)) + { + $stat_name = $_; + $stat_val = $Com_vals{$_}; + write; + + last if !(--$i); + } +} + +sub write_qcache +{ + print "write_qcache\n" if $op{debug}; + + # Query cache was added in 4.0.1, but have_query_cache was added in 4.0.2, + # ergo this method is slightly more reliable + return if not exists $vars{'query_cache_size'}; + return if $vars{'query_cache_size'} == 0; + + $qc_mem_used = $vars{'query_cache_size'} - $stats{'Qcache_free_memory'}; + $qc_hi_r = sprintf "%.2f", $stats{'Qcache_hits'} / ($stats{'Qcache_inserts'} ||= 1); + $qc_ip_r = sprintf "%.2f", $stats{'Qcache_inserts'} / ($stats{'Qcache_lowmem_prunes'} ||= 1); + + $~ = 'QCACHE'; + write; +} + +sub write_InnoDB +{ + print "write_InnoDB\n" if $op{debug}; + + return if not defined $stats{'Innodb_page_size'}; + + $stats{'Innodb_buffer_pool_pages_latched'} = 0 if not defined $stats{'Innodb_buffer_pool_pages_latched'}; + + $~ = 'IB'; + write; + + # Innodb_row_lock_ values were added in MySQL 5.0.3 + if($MySQL_version >= 50003) + { + $~ = 'IB_LOCK'; + write; + } + + # Data, Pages, Rows + $~ = 'IB_DPR'; + write; +} + +sub have_op +{ + my $key = shift; + return 1 if (exists $op{$key} && $op{$key} ne ''); + return 0; +} + +sub sig_handler +{ + print "\nReceived signal at " , scalar localtime , "\n"; + exit_tasks_and_cleanup(); + exit; +} + +sub exit_tasks_and_cleanup +{ + print "exit_tasks_and_cleanup\n" if $op{debug}; + + close $tmpfile_fh; + select STDOUT unless $op{'detach'}; + + email_report($tmpfile) if $op{'email'}; + + cat_report($tmpfile) unless $op{'detach'}; + + if($op{'outfile'}) + { + if($WIN) { `move $tmpfile $op{outfile}`; } + else { `mv $tmpfile $op{outfile}`; } + } + else + { + if($WIN) { `del $tmpfile`; } + else { `rm -f $tmpfile`; } + } + + if(!$op{'infile'} && !$relative_infiles) + { + if($op{'flush-status'}) + { + $query = $dbh->prepare("FLUSH STATUS;"); + $query->execute(); + } + + $query->finish(); + $dbh->disconnect(); + } +} + +# +# Formats +# + +format MYSQL_TIME = +MySQL @<<<<<<<<<<<<<<<< uptime @<<<<<<<<<<< @>>>>>>>>>>>>>>>>>>>>>>>> +$vars{'version'}, sec_to_dhms($real_uptime), (($op{infile} || $relative_infiles) ? '' : scalar localtime) +. + +format KEY_BUFF_MAX = + +__ Key _________________________________________________________________ +Buffer used @>>>>>> of @>>>>>> %Used: @>>>>> +make_short($key_buffer_used, 1), make_short($vars{'key_buffer_size'}, 1), perc($key_buffer_used, $vars{'key_buffer_size'}) +. + +format KEY_BUFF_USAGE = + Current @>>>>>> %Usage: @>>>>> +make_short($key_buffer_usage, 1), perc($key_buffer_usage, $vars{'key_buffer_size'}) +. + +format KEY_RATIOS = +Write hit @>>>>>% +$key_write_ratio +Read hit @>>>>>% +$key_read_ratio + +__ Questions ___________________________________________________________ +Total @>>>>>>>> @>>>>>/s +make_short($questions), t($questions) +. + +format DTQ = + @<<<<<<< @>>>>>>>> @>>>>>/s @>>>>>> @>>>>> +$stat_name, make_short($stat_val), t($stat_val), $stat_label, perc($stat_val, $questions) +. + +format SLOW_DMS = +Slow @<<<<<<< @>>>>>> @>>>>>/s @>>>>> %DMS: @>>>>> Log: @>> +$slow_query_t, make_short($stats{'Slow_queries'}), t($stats{'Slow_queries'}), perc($stats{'Slow_queries'}, $questions), perc($stats{'Slow_queries'}, $dms), $vars{'log_slow_queries'} +DMS @>>>>>>>> @>>>>>/s @>>>>> +make_short($dms), t($dms), perc($dms, $questions) +. + +format DMS = + @<<<<<<< @>>>>>>>> @>>>>>/s @>>>>> @>>>>> +$stat_name, make_short($stat_val), t($stat_val), perc($stat_val, $questions), perc($stat_val, $dms) +. + +format COM_1 = +Com_ @>>>>>>>> @>>>>>/s @>>>>> +make_short($stat_val), t($stat_val), perc($stat_val, $questions) +. + +format COM_2 = + @<<<<<<<<<< @>>>>>> @>>>>>/s @>>>>> +$stat_name, make_short($stat_val), t($stat_val), perc($stat_val, $questions) +. + +format SAS = + +__ SELECT and Sort _____________________________________________________ +Scan @>>>>>> @>>>>/s %SELECT: @>>>>> +make_short($stats{'Select_scan'}), t($stats{'Select_scan'}), perc($stats{'Select_scan'}, $stats{'Com_select'}) +Range @>>>>>> @>>>>/s @>>>>> +make_short($stats{'Select_range'}), t($stats{'Select_range'}), perc($stats{'Select_range'}, $stats{'Com_select'}) +Full join @>>>>>> @>>>>/s @>>>>> +make_short($stats{'Select_full_join'}), t($stats{'Select_full_join'}), perc($stats{'Select_full_join'}, $stats{'Com_select'}) +Range check @>>>>>> @>>>>/s @>>>>> +make_short($stats{'Select_range_check'}), t($stats{'Select_range_check'}), perc($stats{'Select_range_check'}, $stats{'Com_select'}) +Full rng join @>>>>>> @>>>>/s @>>>>> +make_short($stats{'Select_full_range_join'}), t($stats{'Select_full_range_join'}), perc($stats{'Select_full_range_join'}, $stats{'Com_select'}) +Sort scan @>>>>>> @>>>>/s +make_short($stats{'Sort_scan'}), t($stats{'Sort_scan'}) +Sort range @>>>>>> @>>>>/s +make_short($stats{'Sort_range'}), t($stats{'Sort_range'}) +Sort mrg pass @>>>>>> @>>>>/s +make_short($stats{'Sort_merge_passes'}), t($stats{'Sort_merge_passes'}) +. + +format QCACHE = + +__ Query Cache _________________________________________________________ +Memory usage @>>>>>> of @>>>>>> %Used: @>>>>> +make_short($qc_mem_used, 1), make_short($vars{'query_cache_size'}, 1), perc($qc_mem_used, $vars{'query_cache_size'}) +Block Fragmnt @>>>>>% +perc($stats{'Qcache_free_blocks'}, $stats{'Qcache_total_blocks'}) +Hits @>>>>>> @>>>>/s +make_short($stats{'Qcache_hits'}), t($stats{'Qcache_hits'}) +Inserts @>>>>>> @>>>>/s +make_short($stats{'Qcache_inserts'}), t($stats{'Qcache_inserts'}) +Insrt:Prune @>>>>>>:1 @>>>>/s +make_short($qc_ip_r), t($stats{'Qcache_inserts'} - $stats{'Qcache_lowmem_prunes'}) +Hit:Insert @>>>>>>:1 +$qc_hi_r, t($qc_hi_r) +. + +# Not really the end... +format REPORT_END = + +__ Table Locks _________________________________________________________ +Waited @>>>>>>>> @>>>>>/s %Total: @>>>>> +make_short($stats{'Table_locks_waited'}), t($stats{'Table_locks_waited'}), perc($stats{'Table_locks_waited'}, $stats{'Table_locks_waited'} + $stats{'Table_locks_immediate'}); +Immediate @>>>>>>>> @>>>>>/s +make_short($stats{'Table_locks_immediate'}), t($stats{'Table_locks_immediate'}) + +__ Tables ______________________________________________________________ +Open @>>>>>>>> of @>>> %Cache: @>>>>> +$stats{'Open_tables'}, $vars{'table_cache'}, perc($stats{'Open_tables'}, $vars{'table_cache'}) +Opened @>>>>>>>> @>>>>>/s +make_short($stats{'Opened_tables'}), t($stats{'Opened_tables'}) + +__ Connections _________________________________________________________ +Max used @>>>>>>>> of @>>> %Max: @>>>>> +$stats{'Max_used_connections'}, $vars{'max_connections'}, perc($stats{'Max_used_connections'}, $vars{'max_connections'}) +Total @>>>>>>>> @>>>>>/s +make_short($stats{'Connections'}), t($stats{'Connections'}) + +__ Created Temp ________________________________________________________ +Disk table @>>>>>>>> @>>>>>/s +make_short($stats{'Created_tmp_disk_tables'}), t($stats{'Created_tmp_disk_tables'}) +Table @>>>>>>>> @>>>>>/s Size: @>>>>> +make_short($stats{'Created_tmp_tables'}), t($stats{'Created_tmp_tables'}), make_short($vars{'tmp_table_size'}, 1, 1) +File @>>>>>>>> @>>>>>/s +make_short($stats{'Created_tmp_files'}), t($stats{'Created_tmp_files'}) +. + +format TAB = + +__ Threads _____________________________________________________________ +Running @>>>>>>>> of @>>> +$stats{'Threads_running'}, $stats{'Threads_connected'} +Cached @>>>>>>>> of @>>> %Hit: @>>>>> +$stats{'Threads_cached'}, $vars{'thread_cache_size'}, make_short(100 - perc($stats{'Threads_created'}, $stats{'Connections'})) +Created @>>>>>>>> @>>>>>/s +make_short($stats{'Threads_created'}), t($stats{'Threads_created'}) +Slow @>>>>>>>> @>>>>>/s +$stats{'Slow_launch_threads'}, t($stats{'Slow_launch_threads'}) + +__ Aborted _____________________________________________________________ +Clients @>>>>>>>> @>>>>>/s +make_short($stats{'Aborted_clients'}), t($stats{'Aborted_clients'}) +Connects @>>>>>>>> @>>>>>/s +make_short($stats{'Aborted_connects'}), t($stats{'Aborted_connects'}) + +__ Bytes _______________________________________________________________ +Sent @>>>>>>>> @>>>>>/s +make_short($stats{'Bytes_sent'}), t($stats{'Bytes_sent'}) +Received @>>>>>>>> @>>>>>/s +make_short($stats{'Bytes_received'}), t($stats{'Bytes_received'}) +. + +format IB = + +__ InnoDB Buffer Pool __________________________________________________ +Usage @>>>>>> of @>>>>>> %Used: @>>>>> +make_short($ib_bp_used, 1), make_short($ib_bp_total, 1), perc($ib_bp_used, $ib_bp_total) +Read hit @>>>>>% +$ib_bp_read_ratio; +Pages + Free @>>>>>>>> %Total: @>>>>> +make_short($stats{'Innodb_buffer_pool_pages_free'}), perc($stats{'Innodb_buffer_pool_pages_free'}, $stats{'Innodb_buffer_pool_pages_total'}) + Data @>>>>>>>> @>>>>> %Drty: @>>>>> +make_short($stats{'Innodb_buffer_pool_pages_data'}), perc($stats{'Innodb_buffer_pool_pages_data'}, $stats{'Innodb_buffer_pool_pages_total'}), perc($stats{'Innodb_buffer_pool_pages_dirty'}, $stats{'Innodb_buffer_pool_pages_data'}) + Misc @>>>>>>>> @>>>>> + $stats{'Innodb_buffer_pool_pages_misc'}, perc($stats{'Innodb_buffer_pool_pages_misc'}, $stats{'Innodb_buffer_pool_pages_total'}) + Latched @>>>>>>>> @>>>>> +$stats{'Innodb_buffer_pool_pages_latched'}, perc($stats{'Innodb_buffer_pool_pages_latched'}, $stats{'Innodb_buffer_pool_pages_total'}) +Reads @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_buffer_pool_read_requests'}), t($stats{'Innodb_buffer_pool_read_requests'}) + From file @>>>>>>>> @>>>>>/s @>>>>> +make_short($stats{'Innodb_buffer_pool_reads'}), t($stats{'Innodb_buffer_pool_reads'}), perc($stats{'Innodb_buffer_pool_reads'}, $stats{'Innodb_buffer_pool_read_requests'}) + Ahead Rnd @>>>>>>>> @>>>>>/s +$stats{'Innodb_buffer_pool_read_ahead_rnd'}, t($stats{'Innodb_buffer_pool_read_ahead_rnd'}) + Ahead Sql @>>>>>>>> @>>>>>/s +$stats{'Innodb_buffer_pool_read_ahead_seq'}, t($stats{'Innodb_buffer_pool_read_ahead_seq'}) +Writes @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_buffer_pool_write_requests'}), t($stats{'Innodb_buffer_pool_write_requests'}) +Flushes @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_buffer_pool_pages_flushed'}), t($stats{'Innodb_buffer_pool_pages_flushed'}) +Wait Free @>>>>>>>> @>>>>>/s +$stats{'Innodb_buffer_pool_wait_free'}, t($stats{'Innodb_buffer_pool_wait_free'}) +. + +format IB_LOCK = + +__ InnoDB Lock _________________________________________________________ +Waits @>>>>>>>> @>>>>>/s +$stats{'Innodb_row_lock_waits'}, t($stats{'Innodb_row_lock_waits'}) +Current @>>>>>>>> +$stats{'Innodb_row_lock_current_waits'} +Time acquiring + Total @>>>>>>>> ms +$stats{'Innodb_row_lock_time'} + Average @>>>>>>>> ms +$stats{'Innodb_row_lock_time_avg'} + Max @>>>>>>>> ms +$stats{'Innodb_row_lock_time_max'} +. + +format IB_DPR = + +__ InnoDB Data, Pages, Rows ____________________________________________ +Data + Reads @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_data_reads'}), t($stats{'Innodb_data_reads'}) + Writes @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_data_writes'}), t($stats{'Innodb_data_writes'}) + fsync @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_data_fsyncs'}), t($stats{'Innodb_data_fsyncs'}) + Pending + Reads @>>>>>>>> +$stats{'Innodb_data_pending_reads'}, t($stats{'Innodb_data_pending_reads'}) + Writes @>>>>>>>> +$stats{'Innodb_data_pending_writes'}, t($stats{'Innodb_data_pending_writes'}) + fsync @>>>>>>>> +$stats{'Innodb_data_pending_fsyncs'}, t($stats{'Innodb_data_pending_fsyncs'}) + +Pages + Created @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_pages_created'}), t($stats{'Innodb_pages_created'}) + Read @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_pages_read'}), t($stats{'Innodb_pages_read'}) + Written @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_pages_written'}), t($stats{'Innodb_pages_written'}) + +Rows + Deleted @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_rows_deleted'}), t($stats{'Innodb_rows_deleted'}) + Inserted @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_rows_inserted'}), t($stats{'Innodb_rows_inserted'}) + Read @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_rows_read'}), t($stats{'Innodb_rows_read'}) + Updated @>>>>>>>> @>>>>>/s +make_short($stats{'Innodb_rows_updated'}), t($stats{'Innodb_rows_updated'}) +. diff --git a/packaging/deb-in/extra/mysqlreport.1 b/packaging/deb-in/extra/mysqlreport.1 new file mode 100644 index 000000000000..5ae6b9e3b92d --- /dev/null +++ b/packaging/deb-in/extra/mysqlreport.1 @@ -0,0 +1,180 @@ +.TH "mysqlreport" "1" "2.5 2006-09-01 (docrev 2006-05-19)" "Daniel Nichter" "MYSQL" +.SH "NAME" +.LP +mysqlreport \- Makes a friendly report of important MySQL status values +.SH "SYNTAX" +.LP +mysqlreport [\fIoptions\fP] +.SH "DESCRIPTION" +.LP +mysqlreport makes a friendly report of important MySQL status values. Actually, +it makes a friendly report of nearly every status value from SHOW STATUS. +Unlike SHOW STATUS which simply dumps over 100 values to screen in one long +list, mysqlreport interprets and formats the values and presents the basic +values and many more inferred values in a human\-readable format. Numerous +example reports are available at the mysqlreport web page at +http://hackmysql.com/mysqlreport. + +The benefit of mysqlreport is that it allows you to very quickly see a wide +array of performance indicators for your MySQL server which would otherwise +need to be calculated by hand from all the various SHOW STATUS values. For +example, the Index Read Ratio is an important value but it's not present in +SHOW STATUS; it's an inferred value (the ratio of Key_reads to +Key_read_requests). + +This documentation outlines all the command line options in mysqlreport, most +of which control which reports are printed. This document does not address +how to interpret these reports; that topic is covered in the document Guide +To Understanding mysqlreport at http://hackmysql.com/mysqlreportguide. + +.SH "OPTIONS" +Technically, command line options are in the form \-\-option, but \-option works +too. All options can be abbreviated if the abbreviation is unique. For example, +option \-\-host can be abbreviated \-\-ho but not \-\-h because \-\-h is ambiguous: it +could mean \-\-host or \-\-help. + +.LP + +.TP +\fB\-\-help\fR +Output help information and exit. + +.TP +\fB\-\-user USER\fR + +.TP +\fB\-\-password\fR +As of version 2.3 \-\-password can take the password on the +command line like "\-\-password FOO". Using \-\-password +alone without giving a password on the command line +causes mysqlreport to prompt for a password. + +.TP +\fB\-\-host ADDRESS\fR + +.TP +\fB\-\-port PORT\fR + +.TP +\fB\-\-socket SOCKET\fR + +.TP +\fB\-\-no\-mycnf\fR +\-\-no\-mycnf makes mysqlreport not read ~/.my.cnf which it does by default +otherwise. \-\-user and \-\-password always override values from ~/.my.cnf. + +.TP +\fB\-\-dtq\fR +Print Distribution of Total Queries (DTQ) report (under +Total in Questions report). Queries (or Questions) can +be divided into four main areas: DMS (see \-\-dms below), +Com_ (see \-\-com below), COM_QUIT (see COM_QUIT and +Questions at http://hackmysql.com/com_quit), and +Unknown. \-\-dtq lists the number of queries in each of +these areas in descending order. + +.TP +\fB\-\-dms\fR +Print Data Manipulation Statements (DMS) report (under +DMS in Questions report). DMS are those from the MySQL +manual section 13.2. Data Manipulation Statements. +(Currently, mysqlreport considers only SELECT, INSERT, +REPLACE, UPDATE, and DELETE.) Each DMS is listed in +descending order by count. + +.TP +\fB\-\-com N\fR +Print top N number of non\-DMS Com_ status values in +descending order (after DMS in Questions report). If N +is not given, default is 3. Such non\-DMS Com_ values +include Com_change_db, Com_show_tables, Com_rollback, +etc. + +.TP +\fB\-\-sas\fR +Print report for Select_ and Sort_ status values (after +Questions report). See MySQL Select and Sort Status +Variables at http://hackmysql.com/selectandsort. + +.TP +\fB\-\-tab\fR +Print Threads, Aborted, and Bytes status reports (after +Created temp report). As of mysqlreport v2.3 the +Threads report reports on all Threads_ status values. + +.TP +\fB\-\-qcache\fR +Print Query Cache report. +.TP +\fB\-\-all\fR +Equivalent to "\-\-dtq \-\-dms \-\-com 3 \-\-sas \-\-qcache". +(Notice \-\-tab is not invoked by \-\-all.) + +.TP +\fB\-\-infile FILE\fR +Instead of getting SHOW STATUS values from MySQL, read +values from FILE. FILE is often a copy of the output of +SHOW STATUS including formatting characters (|, +, \-). +mysqlreport expects FILE to have the format +" value number " where value is only alpha and +underscore characters (A\-Z and _) and number is a +positive integer. Anything before, between, or after +value and number is ignored. mysqlreport also needs +the following MySQL server variables: version, +table_cache, max_connections, key_buffer_size, +query_cache_size. These values can be specified in +INFILE in the format "name = value" where name is one +of the aforementioned server variables and value is a +positive integer with or without a trailing M and +possible periods (for version). For example, to specify +an 18M key_buffer_size: key_buffer_size = 18M. Or, a +256 table_cache: table_cache = 256. The M implies +Megabytes not million, so 18M means 18,874,368 not +18,000,000. If these server variables are not specified +the following defaults are used (respectively) which +may cause strange values to be reported: 0.0.0, 64, +100, 8M, 0. + +.TP +\fB\-\-outfile FILE\fR +After printing the report to screen, print the report +to FILE too. Internally, mysqlreport always writes the +report to a temp file first: /tmp/mysqlreport.PID on +*nix, c:\mysqlreport.PID on Windows (PID is the +script's process ID). Then it prints the temp file to +screen. Then if \-\-outfile is specified, the temp file +is copied to OUTFILE. After \-\-email (below), the temp +file is deleted. + +.TP +\fB\-\-email ADDRESS\fR +After printing the report to screen, email the report +to ADDRESS. This option requires sendmail in +/usr/sbin/, therefore it does not work on Windows. +/usr/sbin/sendmail can be a sym link to qmail, for +example, or any MTA that emulates sendmail's \-t +command line option and operation. The FROM: field is +"mysqlreport", SUBJECT: is "MySQL status report". + +.TP +\fB\-\-flush\-status\fR +Execute a "FLUSH STATUS;" after generating the reports. +If you do not have permissions in MySQL to do this an +error from DBD::mysql::st will be printed after the +reports. + +.SH "AUTHORS" +.LP +Daniel Nichter + +If mysqlreport breaks, send me a message from +http://hackmysql.com/feedback +with the error. + +.SH "SEE ALSO" +.LP +mytop(1) +.LP +The comprehensive Guide To Understanding mysqlreport at +http://hackmysql.com/mysqlreportguide. + diff --git a/packaging/deb-in/extra/source_mysql-5.6.py b/packaging/deb-in/extra/source_mysql-5.6.py new file mode 100644 index 000000000000..41f7bbe9f5b0 --- /dev/null +++ b/packaging/deb-in/extra/source_mysql-5.6.py @@ -0,0 +1,54 @@ +'''apport package hook for mysql-5.6 + +(c) 2009 Canonical Ltd. +Author: Mathias Gug +''' + +from __future__ import print_function, unicode_literals +import os, os.path + +from apport.hookutils import * + +def _add_my_conf_files(report, filename): + key = 'MySQLConf' + path_to_key(filename) + report[key] = "" + for line in read_file(filename).split('\n'): + try: + if 'password' in line.split('=')[0]: + line = "%s = @@APPORTREPLACED@@" % (line.split('=')[0]) + report[key] += line + '\n' + except IndexError: + continue + +def add_info(report): + attach_conffiles(report, 'mysql-server-5.6', conffiles=None) + key = 'Logs' + path_to_key('/var/log/daemon.log') + report[key] = "" + for line in read_file('/var/log/daemon.log').split('\n'): + try: + if 'mysqld' in line.split()[4]: + report[key] += line + '\n' + except IndexError: + continue + if os.path.exists('/var/log/mysql/error.log'): + key = 'Logs' + path_to_key('/var/log/mysql/error.log') + report[key] = "" + for line in read_file('/var/log/mysql/error.log').split('\n'): + report[key] += line + '\n' + attach_mac_events(report, '/usr/sbin/mysqld') + attach_file(report,'/etc/apparmor.d/usr.sbin.mysqld') + _add_my_conf_files(report, '/etc/mysql/my.cnf') + _add_my_conf_files(report, '/etc/mysql/mysql.cnf') + for d in ['/etc/mysql/conf.d', '/etc/mysql/mysql.conf.d']: + for f in os.listdir(d): + _add_my_conf_files(report, os.path.join(d, f)) + try: + report['MySQLVarLibDirListing'] = str(os.listdir('/var/lib/mysql')) + except OSError: + report['MySQLVarLibDirListing'] = str(False) + +if __name__ == '__main__': + report = {} + add_info(report) + for key in report: + print('%s: %s' % (key, report[key].split('\n', 1)[0])) diff --git a/packaging/deb-in/gbp.conf b/packaging/deb-in/gbp.conf new file mode 100644 index 000000000000..054c4e0eaaaf --- /dev/null +++ b/packaging/deb-in/gbp.conf @@ -0,0 +1,8 @@ +[DEFAULT] +# Ignore requirement to use branch name 'master' to make it easier +# for contributors to work with feature and bugfix branches +ignore-branch = True + +upstream-branch = 5.6-v25 +upstream-tree = branch +pristine-tar = False diff --git a/packaging/deb-in/libmysqlclient-dev.README.Maintainer.in b/packaging/deb-in/libmysqlclient-dev.README.Maintainer.in new file mode 100644 index 000000000000..f24cdcd519d6 --- /dev/null +++ b/packaging/deb-in/libmysqlclient-dev.README.Maintainer.in @@ -0,0 +1,4 @@ +The examples directory includes files that might be needed by some +developers: +- header files not installed by default +- the example file udf_example.c diff --git a/packaging/deb-in/libmysqlclient-dev.examples.in b/packaging/deb-in/libmysqlclient-dev.examples.in new file mode 100644 index 000000000000..80a749f46a85 --- /dev/null +++ b/packaging/deb-in/libmysqlclient-dev.examples.in @@ -0,0 +1 @@ +sql/udf_example.cc diff --git a/packaging/deb-in/libmysqlclient-dev.install.in b/packaging/deb-in/libmysqlclient-dev.install.in index 29d904671e19..62256274f8a6 100644 --- a/packaging/deb-in/libmysqlclient-dev.install.in +++ b/packaging/deb-in/libmysqlclient-dev.install.in @@ -13,15 +13,17 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +usr/bin/mysql_config usr/include/mysql/*.h usr/include/mysql/mysql/*.h +usr/include/mysql/mysql/*.h.pp usr/include/mysql/mysql/psi/*.h usr/lib/*/libmysqlclient.a usr/lib/*/libmysqlclient.so usr/lib/*/libmysqlservices.a -usr/bin/mysql_config -usr/share/man/man1/mysql_config.1 +usr/lib/*/pkgconfig/mysqlclient.pc usr/share/aclocal/mysql.m4 +usr/share/man/man1/mysql_config.1 # legal usr/share/doc/libmysqlclient-dev/@DEB_INSTALL_LICENSEFILE@ usr/share/doc/libmysqlclient-dev/README diff --git a/packaging/deb-in/mysql-packagesource-client-SERIES.README.Debian.in b/packaging/deb-in/mysql-packagesource-client-SERIES.README.Debian.in new file mode 100644 index 000000000000..b245638f9c95 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-client-SERIES.README.Debian.in @@ -0,0 +1,4 @@ +FAQ: + +Q: My completition is gone, why? +A: You have "no-auto-rehash" in the "[mysql]" section of /etc/mysql/my.cnf! diff --git a/packaging/deb-in/mysql-packagesource-client-SERIES.docs.in b/packaging/deb-in/mysql-packagesource-client-SERIES.docs.in new file mode 100644 index 000000000000..53942135aa5f --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-client-SERIES.docs.in @@ -0,0 +1,2 @@ +README +debian/extra/innotop/changelog.innotop diff --git a/packaging/deb-in/mysql-packagesource-client-SERIES.install.in b/packaging/deb-in/mysql-packagesource-client-SERIES.install.in new file mode 100644 index 000000000000..cfe33ee54074 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-client-SERIES.install.in @@ -0,0 +1,20 @@ +# this executable reprsent the embedded mysql server client +debian/additions/innotop/innotop usr/bin/ +debian/additions/mysqlreport usr/bin/ +usr/bin/innochecksum +usr/bin/myisam_ftdump +usr/bin/mysql +usr/bin/mysql_config_editor +usr/bin/mysql_find_rows +usr/bin/mysql_fix_extensions +usr/bin/mysql_plugin +usr/bin/mysql_waitpid +usr/bin/mysqlaccess +usr/bin/mysqladmin +usr/bin/mysqlbug +usr/bin/mysqlcheck +usr/bin/mysqldump +usr/bin/mysqldumpslow +usr/bin/mysqlimport +usr/bin/mysqlshow +usr/bin/mysqlslap diff --git a/packaging/deb-in/mysql-packagesource-client-SERIES.links.in b/packaging/deb-in/mysql-packagesource-client-SERIES.links.in new file mode 100644 index 000000000000..195316887849 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-client-SERIES.links.in @@ -0,0 +1,3 @@ +usr/bin/mysqlcheck usr/bin/mysqlanalyze +usr/bin/mysqlcheck usr/bin/mysqloptimize +usr/bin/mysqlcheck usr/bin/mysqlrepair diff --git a/packaging/deb-in/mysql-packagesource-client-SERIES.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-client-SERIES.lintian-overrides.in new file mode 100644 index 000000000000..316d861d1bfc --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-client-SERIES.lintian-overrides.in @@ -0,0 +1,21 @@ +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-@DEB_PRODUCTNAME@-client: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-client/LICENSE.mysql +mysql-@DEB_PRODUCTNAME@-client: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-clienti/@DEB_INSTALL_LICENSEFILE@.gz +mysql-@DEB_PRODUCTNAME@-client: copyright-should-refer-to-common-license-file-for-lgpl +# Due to static linking this cannot be avoided and hence being overridden +mysql-@DEB_PRODUCTNAME@-client: embedded-library diff --git a/packaging/deb-in/mysql-packagesource-client-SERIES.manpages.in b/packaging/deb-in/mysql-packagesource-client-SERIES.manpages.in new file mode 100644 index 000000000000..b2cd1c985905 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-client-SERIES.manpages.in @@ -0,0 +1,14 @@ +debian/extra/innotop/innotop.1 +debian/extra/mysqlreport.1 +debian/tmp/usr/share/man/man1/mysqlman.1 +debian/tmp/usr/share/man/man1/myisam_ftdump.1 +debian/tmp/usr/share/man/man1/mysql.1 +debian/tmp/usr/share/man/man1/mysql_config_editor.1 +debian/tmp/usr/share/man/man1/mysqladmin.1 +debian/tmp/usr/share/man/man1/mysqlcheck.1 +debian/tmp/usr/share/man/man1/mysqldump.1 +debian/tmp/usr/share/man/man1/mysqldumpslow.1 +debian/tmp/usr/share/man/man1/mysqlimport.1 +debian/tmp/usr/share/man/man1/mysqlman.1 +debian/tmp/usr/share/man/man1/mysqlshow.1 +debian/tmp/usr/share/man/man1/mysqlslap.1 diff --git a/packaging/deb-in/mysql-packagesource-client.conffiles.in b/packaging/deb-in/mysql-packagesource-client.conffiles.in deleted file mode 100644 index 84c59f2b415a..000000000000 --- a/packaging/deb-in/mysql-packagesource-client.conffiles.in +++ /dev/null @@ -1,25 +0,0 @@ -/usr/share/mysql/charsets/armscii8.xml -/usr/share/mysql/charsets/ascii.xml -/usr/share/mysql/charsets/cp1250.xml -/usr/share/mysql/charsets/cp1251.xml -/usr/share/mysql/charsets/cp1256.xml -/usr/share/mysql/charsets/cp1257.xml -/usr/share/mysql/charsets/cp850.xml -/usr/share/mysql/charsets/cp852.xml -/usr/share/mysql/charsets/cp866.xml -/usr/share/mysql/charsets/dec8.xml -/usr/share/mysql/charsets/geostd8.xml -/usr/share/mysql/charsets/greek.xml -/usr/share/mysql/charsets/hebrew.xml -/usr/share/mysql/charsets/hp8.xml -/usr/share/mysql/charsets/Index.xml -/usr/share/mysql/charsets/keybcs2.xml -/usr/share/mysql/charsets/koi8r.xml -/usr/share/mysql/charsets/koi8u.xml -/usr/share/mysql/charsets/latin1.xml -/usr/share/mysql/charsets/latin2.xml -/usr/share/mysql/charsets/latin5.xml -/usr/share/mysql/charsets/latin7.xml -/usr/share/mysql/charsets/macce.xml -/usr/share/mysql/charsets/macroman.xml -/usr/share/mysql/charsets/swe7.xml diff --git a/packaging/deb-in/patches/series b/packaging/deb-in/mysql-packagesource-common-SERIES.dirs.in similarity index 97% rename from packaging/deb-in/patches/series rename to packaging/deb-in/mysql-packagesource-common-SERIES.dirs.in index e8dd7285ace7..b5b8280db1f3 100644 --- a/packaging/deb-in/patches/series +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.dirs.in @@ -13,3 +13,4 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +etc/mysql/conf.d diff --git a/packaging/deb-in/mysql-packagesource-common-SERIES.install.in b/packaging/deb-in/mysql-packagesource-common-SERIES.install.in new file mode 100644 index 000000000000..c5a54d68788c --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.install.in @@ -0,0 +1,29 @@ +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# configuration file and script +debian/extra/conf.d etc/mysql/ +debian/extra/configure-symlinks usr/share/mysql-common/ +debian/extra/my.cnf.fallback etc/mysql/ + +usr/share/mysql/docs/ChangeLog +usr/share/mysql/docs/INFO_SRC +usr/share/mysql/docs/INFO_BIN +# charsets +usr/share/mysql/charsets/*.xml +usr/share/mysql/charsets/README +# legal +usr/share/doc/mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ +usr/share/doc/mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@/README diff --git a/packaging/deb-in/mysql-packagesource-bench.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-common-SERIES.lintian-overrides.in similarity index 69% rename from packaging/deb-in/mysql-packagesource-bench.lintian-overrides.in rename to packaging/deb-in/mysql-packagesource-common-SERIES.lintian-overrides.in index f4c16877b5d7..f0bee937f2bd 100644 --- a/packaging/deb-in/mysql-packagesource-bench.lintian-overrides.in +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.lintian-overrides.in @@ -1,4 +1,4 @@ -# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -14,5 +14,6 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Additional license file is needed so overriding this warning -mysql-@DEB_PRODUCTNAME@-bench: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-bench/@DEB_INSTALL_LICENSEFILE@.gz -mysql-community-bench: copyright-should-refer-to-common-license-file-for-lgpl +mysql-common: extra-license-file usr/share/doc/mysql-common/LICENSE.mysql +mysql-common: extra-license-file usr/share/doc/mysql-common/@DEB_INSTALL_LICENSEFILE@.gz +mysql-common: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/packaging/deb-in/mysql-packagesource-common-SERIES.maintscript.in b/packaging/deb-in/mysql-packagesource-common-SERIES.maintscript.in new file mode 100644 index 000000000000..39652e21434a --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.maintscript.in @@ -0,0 +1,2 @@ +rm_conffile /etc/mysql/conf.d/.keepme 5.6.22-1~ mysql-common +rm_conffile /etc/mysql/my.cnf 5.6.22-1~ mysql-common diff --git a/packaging/deb-in/mysql-packagesource-common-SERIES.postinst.in b/packaging/deb-in/mysql-packagesource-common-SERIES.postinst.in new file mode 100644 index 000000000000..da7055c32fde --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.postinst.in @@ -0,0 +1,56 @@ +#!/bin/sh + +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +set -e + +#DEBHELPER# + +# This code needs to go after the debhelper snippets so that it runs after +# dpkg-maintscript-helper rm_conffile on /etc/mysql/my.cnf. As a one off, if +# my.cnf.dpkg-bak exists after this stage then we rename it to +# /etc/mysql/my.cnf.migrated, add an explanatory note to the top and add it is +# a high priority alternative so it gets used in favour of any other my.cnf +# shipped by variants. The /etc/mysql/my.cnf.migrated file will not be owned by +# any package (just like /etc/mysql/my.cnf.dpkg-bak would have been) but we +# rename it since it will be in active use, the user may not expect a .dpkg-bak +# file to be in use and we do not want to surprise the user. + +if [ "$1" = "configure" ]; then + # Low priority fallback for client use when no server is installed. + update-alternatives --install /etc/mysql/my.cnf my.cnf /etc/mysql/my.cnf.fallback 100 +fi + +if [ "$1" = "configure" -a -f /etc/mysql/my.cnf.dpkg-bak ] && dpkg --compare-versions "$2" le "5.6.19-1~exp1ubuntu2~"; then + echo "Moving /etc/mysql/my.cnf.dpkg-bak to /etc/mysql/my.cnf.migrated" + cat - /etc/mysql/my.cnf.dpkg-bak < /etc/mysql/my.cnf.migrated +# This file has been automatically moved from your previous +# /etc/mysql/my.cnf, with just this comment added at the top, to maintain MySQL +# operation using your previously customised configuration. + +# To switch to the new packaging configuration for automated management of +# /etc/mysql/my.cnf across multiple variants: +# +# 1. Move your customisations from this file to /etc/mysql/conf.d/ and +# to /etc/mysql/.conf.d/ as appropriate. +# 2. Run "update-alternatives --remove my.cnf /etc/mysql/my.cnf.migrated" +# 3. Remove the file /etc/mysql/my.cnf.migrated + +EOT + rm /etc/mysql/my.cnf.dpkg-bak + echo "Using your previous configuration through /etc/mysql/my.cnf.migrated" + update-alternatives --install /etc/mysql/my.cnf my.cnf /etc/mysql/my.cnf.migrated 300 +fi diff --git a/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in b/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in new file mode 100644 index 000000000000..24222fbd0a09 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in @@ -0,0 +1,27 @@ +#!/bin/sh + +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +set -e + +if [ "$1" = "purge" ]; then + update-alternatives --remove my.cnf /etc/mysql/my.cnf.migrated + rm -f /etc/mysql/my.cnf.migrated # created by mysql-common from our obsolete conffile my.cnf + rm -f /etc/mysql/my.cnf.old # created by mariadb-common from our obsolete conffile my.cnf + rmdir /etc/mysql 2>/dev/null || true +fi + +#DEBHELPER# diff --git a/packaging/deb-in/mysql-packagesource-common-SERIES.preinst.in b/packaging/deb-in/mysql-packagesource-common-SERIES.preinst.in new file mode 100644 index 000000000000..905e4545298c --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.preinst.in @@ -0,0 +1,37 @@ +#!/bin/sh +set -e + +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then + if dpkg --compare-versions "$2" lt-nl "5.6.25-3~" ; then + + # revert fallback my.cnf symlink setup performed by mariadb-common + # from 10.0.17-1~exp2 upto 10.0.20-2 + if [ -L /etc/mysql/my.cnf ] && [ -f /etc/mysql/my.cnf.old ]; then + if [ "$(readlink /etc/mysql/my.cnf)" = "mariadb.cnf" ]; then + echo "Reverting my.cnf -> mariadb.cnf symlink setup by mariadb-common" + rm /etc/mysql/my.cnf + mv /etc/mysql/my.cnf.old /etc/mysql/my.cnf + fi + fi + + # recover from mysql-common 5.6.25-2 turning this symlinked + # mariadb.cnf into my.cnf.migrated + if [ -f /etc/mysql/my.cnf.migrated ]; then + if [ "$(md5sum /etc/mysql/my.cnf.migrated | awk '{ print $1 }')" = "4720bbc1a03252fbb9eb83b55f0b6e10" ]; then + # unmodified mariadb.cnf with the migration header prepended + # by mysql-common.postinst + echo "Removing incorrect /etc/mysql/my.cnf.migrated that was actually mariadb.cnf" + rm /etc/mysql/my.cnf.migrated + if [ -f /etc/mysql/my.cnf.old ]; then + echo "Renaming (possibly unmodified) /etc/mysql/my.cnf.old to /etc/mysql/my.cnf.migrated" + mv /etc/mysql/my.cnf.old /etc/mysql/my.cnf.migrated + else + update-alternatives --remove my.cnf /etc/mysql/my.cnf.migrated + fi + fi + fi + + fi +fi + +#DEBHELPER# diff --git a/packaging/deb-in/mysql-packagesource-common-SERIES.prerm.in b/packaging/deb-in/mysql-packagesource-common-SERIES.prerm.in new file mode 100644 index 000000000000..5716ecfcb92c --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.prerm.in @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "$1" = "remove" ]; then + update-alternatives --remove my.cnf /etc/mysql/my.cnf.fallback +fi + +#DEBHELPER# diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.README.Debian.in b/packaging/deb-in/mysql-packagesource-server-SERIES.README.Debian.in new file mode 100644 index 000000000000..741243f1ec3f --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.README.Debian.in @@ -0,0 +1,109 @@ +* MYSQL WON'T START OR STOP?: +============================= +You may never ever delete the special mysql user "debian-sys-maint". This +user together with the credentials in /etc/mysql/debian.cnf are used by the +init scripts to stop the server as they would require knowledge of the mysql +root users password else. +So in most of the times you can fix the situation by making sure that the +debian.cnf file contains the right password, e.g. by setting a new one +(remember to do a "flush privileges" then). + +* WHAT TO DO AFTER UPGRADES: +============================ +The privilege tables are automatically updated so all there is left is read +the changelogs on dev.mysql.com to see if any changes affect custom apps. + +* WHAT TO DO AFTER INSTALLATION: +================================ +The MySQL manual describes certain steps to do at this stage in a separate +chapter. They are not necessary as the Debian packages does them +automatically. + +The only thing that is left over for the admin is + - setting the passwords + - creating new users and databases + - read the rest of this text + +* DOWNGRADING TO 4.0 or 4.1: +============================ +Unsupported. Period. +But if you do and get problems or make interesting experiences, mail me, it +might help others. +Ok, if you really want, I would recommend to "mysqldump --opt" all tables, +then purge 4.1, delete /var/lib/mysql, install 4.0 and insert the dumps. Be +carefully, though, with the "mysql" table, you might not simply overwrite that +one as the password for the mysql "debian-sys-maint" user is stored in +/etc/mysql/debian.cnf and needed by /etc/init.d/ to start mysql and check if +it's alive. + +* SOME APPLICATION CAN NO LONGER CONNECT: +========================================= +This application is probably linked against libmysqlclient12 or below and +somebody has created a mysql user with new-style passwords. +The old_passwords=1 option in /etc/mysql/my.cnf might help. If not the +application that inserted the user has to be changed or the application that +tries to connect updated to libmysqlclient14 or -15. + +* NETWORKING: +============= +For security reasons, the Debian package has enabled networking only on the +loop-back device using "bind-address" in /etc/mysql/my.cnf. Check with +"netstat -tlnp" where it is listening. If your connection is aborted +immediately see if "mysqld: all" or similar is in /etc/hosts.allow and read +hosts_access(5). + +* WHERE IS THE DOCUMENTATION?: +============================== +Unfortunately due to licensing restrictions, debian currently not able +to provide the mysql-doc package in any format. For the most up to date +documentation, please go to http://dev.mysql.com/doc. + +* PASSWORDS: +============ +It is strongly recommended to set a password for the mysql root user (which + /usr/bin/mysql -u root -D mysql -e "update user set password=password('new-password') where user='root'" + /usr/bin/mysql -u root -e "flush privileges" +If you already had a password set add "-p" before "-u" to the lines above. + + +If you are tired to type the password in every time or want to automate your +scripts you can store it in the file $HOME/.my.cnf. It should be chmod 0600 +(-rw------- username username .my.cnf) to ensure that nobody else can read +it. Every other configuration parameter can be stored there, too. You will +find an example below and more information in the MySQL manual in +/usr/share/doc/mysql-doc or www.mysql.com. + +ATTENTION: It is necessary, that a .my.cnf from root always contains a "user" +line wherever there is a "password" line, else, the Debian maintenance +scripts, that use /etc/mysql/debian.cnf, will use the username +"debian-sys-maint" but the password that is in root's .my.cnf. Also note, +that every change you make in the /root/.my.cnf will affect the mysql cron +script, too. + + # an example of $HOME/.my.cnf + [client] + user = your-mysql-username + password = enter-your-good-new-password-here + +* BIG_ROWS FOR EVEN MORE ROWS IN A TABLE: +========================================= +If you ever run out of rows in a table there is the possibility of building +the package with "-DBIG_ROWS" which, according to a MySQL employee on +packagers@lists.mysql.com should lead to a 64bit row index (I guess > 2^32 +rows) but also to an approx. 5% performance loss. + +* BerkeleyDB Storage Engine +=========================== +Support for BerkeleyDB has been removed in 5.1, and consequently both the +have-bdb and skip-bdb configuration options will cause the server to fail. +Removing the options from /etc/mysql/my.cnf will fix this problem. + +* FURTHER NOTES ON REPLICATION +=============================== +If the MySQL server is acting as a replication slave, you should not +set --tmpdir to point to a directory on a memory-based filesystem or to +a directory that is cleared when the server host restarts. A replication +slave needs some of its temporary files to survive a machine restart so +that it can replicate temporary tables or LOAD DATA INFILE operations. If +files in the temporary file directory are lost when the server restarts, +replication fails. diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.config.in b/packaging/deb-in/mysql-packagesource-server-SERIES.config.in new file mode 100644 index 000000000000..4e801c93be45 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.config.in @@ -0,0 +1,97 @@ +#!/bin/bash + +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +. /usr/share/debconf/confmodule + +get_root_pass(){ + while :; do + PASSWD="" + db_input high mysql-@DEB_PRODUCTNAME@-server/root-pass || true + db_go + + db_get mysql-@DEB_PRODUCTNAME@-server/root-pass + if [ -z "${RET}" ]; + then + db_fset mysql-@DEB_PRODUCTNAME@-server/root-pass seen true + db_fset mysql-@DEB_PRODUCTNAME@-server/re-root-pass seen true + break + fi + PASSWD="${RET}" + + db_input high mysql-@DEB_PRODUCTNAME@-server/re-root-pass || true + db_go + + db_get mysql-@DEB_PRODUCTNAME@-server/re-root-pass + if [ "${RET}" == "${PASSWD}" ]; + then + PASSWD="" + break + fi + + db_fset mysql-@DEB_PRODUCTNAME@-server/root-pass-mismatch seen false + db_input critical mysql-@DEB_PRODUCTNAME@-server/root-pass-mismatch + db_set mysql-@DEB_PRODUCTNAME@-server/root-pass "" + db_set mysql-@DEB_PRODUCTNAME@-server/re-root-pass "" + done +} +if [ "$1" = "configure" ] && [ -z "$2" ]; +then + + set -e + + PKG_LIST=mysql-server-5.5:mysql-server-5.6:mysql-server-5.7:mysql-community-server:mysql-commercial-server + INSTALLED_PKG=none + MYSQLDATA=/var/lib/mysql + + IFS_BACKUP=${IFS} + IFS=":" + for PKG in ${PKG_LIST}; + do + STATUS=$(dpkg -s ${PKG} 2> /dev/null | grep Status: | cut -d' ' -f4) + if [ "${STATUS}" = "installed" ]; + then + INSTALLED_PKG=${PKG} + break + fi + done + IFS=${IFS_BACKUP} + + if [ "${INSTALLED_PKG}" = "none" ]; + then + if [ -d ${MYSQLDATA} -o -L ${MYSQLDATA} ]; + then + db_input high mysql-@DEB_PRODUCTNAME@-server/data-dir || true + else + db_fset mysql-@DEB_PRODUCTNAME@-server/data-dir seen true + fi + + get_root_pass + + else + db_fset mysql-@DEB_PRODUCTNAME@-server/data-dir seen true + # If datadir is missing, ask for root password even with existing packages + if [ ! -d ${MYSQLDATA} -a ! -L ${MYSQLDATA} ]; + then + get_root_pass + else + db_fset mysql-@DEB_PRODUCTNAME@-server/root-pass seen true + db_fset mysql-@DEB_PRODUCTNAME@-server/re-root-pass seen true + fi + fi + + set +e +fi diff --git a/packaging/deb-in/mysql-packagesource-bench.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.dirs.in similarity index 74% rename from packaging/deb-in/mysql-packagesource-bench.install.in rename to packaging/deb-in/mysql-packagesource-server-SERIES.dirs.in index cefabaa23bd3..761dcd01d36b 100644 --- a/packaging/deb-in/mysql-packagesource-bench.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.dirs.in @@ -1,4 +1,4 @@ -# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -13,7 +13,5 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -usr/lib/mysql/sql-bench/* -# legal -usr/share/doc/mysql-@DEB_PRODUCTNAME@-bench/@DEB_INSTALL_LICENSEFILE@ -usr/share/doc/mysql-@DEB_PRODUCTNAME@-bench/README +etc/mysql/mysql.conf.d +var/lib/mysql-upgrade diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.examples.in b/packaging/deb-in/mysql-packagesource-server-SERIES.examples.in new file mode 100644 index 000000000000..3fe7d4bae970 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.examples.in @@ -0,0 +1,3 @@ +debian/tmp/usr/lib/mysql/plugin/daemon_example.ini +debian/tmp/usr/share/mysql/wsrep.cnf +debian/tmp/usr/share/mysql/magic diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in new file mode 100644 index 000000000000..1358ed83a022 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -0,0 +1,124 @@ +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# debian/extra/mysql-systemd-start usr/share/mysql/ +debian/extra/mysql.cnf etc/mysql/ +# debian/extra/mysql.conf.d etc/mysql/ +# debian/extra/source_mysql-5.7.py usr/share/apport/package-hooks/ +@DEB_INSTALL_SERVER_APPARMOR@ +etc/mysql/debian-start +# binaries +usr/bin/innochecksum +usr/bin/lz4_decompress usr/lib/mysql/ +usr/bin/myisamchk +usr/bin/myisamlog +usr/bin/myisampack +usr/bin/my_print_defaults +usr/bin/mysql_install_db +usr/bin/mysql_plugin +usr/bin/mysql_secure_installation +usr/bin/mysql_ssl_rsa_setup +usr/bin/mysql_tzinfo_to_sql +usr/bin/mysql_upgrade +usr/bin/mysqlbinlog +usr/bin/perror +usr/bin/replace +usr/bin/resolveip +usr/bin/resolve_stack_dump usr/lib/mysql/ +usr/bin/wsrep_sst_common +usr/bin/wsrep_sst_mysqldump +usr/bin/wsrep_sst_rsync +usr/bin/wsrep_sst_xtrabackup +usr/bin/wsrep_sst_xtrabackup-v2 +usr/bin/zlib_decompress usr/lib/mysql/ +# plugins +usr/lib/mysql/plugin/adt_null.so +usr/lib/mysql/plugin/auth_socket.so +usr/lib/mysql/plugin/innodb_engine.so +usr/lib/mysql/plugin/keyring_file.so +usr/lib/mysql/plugin/keyring_udf.so +usr/lib/mysql/plugin/libmemcached.so +usr/lib/mysql/plugin/libpluginmecab.so +usr/lib/mysql/plugin/locking_service.so +usr/lib/mysql/plugin/mypluglib.so +usr/lib/mysql/plugin/mysql_no_login.so +usr/lib/mysql/plugin/mysqlx.so +usr/lib/mysql/plugin/rewriter.so +usr/lib/mysql/plugin/semisync_master.so +usr/lib/mysql/plugin/semisync_slave.so +usr/lib/mysql/plugin/validate_password.so +usr/lib/mysql/plugin/version_token.so +@DEB_INSTALL_SERVER_PLUGINS@ +# server +usr/sbin/mysqld +# man pages +usr/share/man/man1/innochecksum.1 +usr/share/man/man1/comp_err.1 +usr/share/man/man1/lz4_decompress.1 +usr/share/man/man1/myisamchk.1 +usr/share/man/man1/myisamlog.1 +usr/share/man/man1/myisampack.1 +usr/share/man/man1/my_print_defaults.1 +usr/share/man/man1/mysql.server.1 +usr/share/man/man1/mysql-stress-test.pl.1 +usr/share/man/man1/mysql_install_db.1 +usr/share/man/man1/mysql_plugin.1 +usr/share/man/man1/mysql_secure_installation.1 +usr/share/man/man1/mysql_ssl_rsa_setup.1 +usr/share/man/man1/mysql_tzinfo_to_sql.1 +usr/share/man/man1/mysql_upgrade.1 +usr/share/man/man1/mysqlbinlog.1 +usr/share/man/man1/perror.1 +usr/share/man/man1/replace.1 +usr/share/man/man1/resolveip.1 +usr/share/man/man1/resolve_stack_dump.1 +usr/share/man/man1/zlib_decompress.1 +usr/share/man/man8/mysqld.8 +# confguration files +debian/extra/mysql.cnf etc/mysql/ +debian/extra/mysqld.cnf /etc/mysql/mysql.conf.d/ +# app armor profile +@DEB_INSTALL_SERVER_APPARMOR@ +# startup files, depending on mechanism used by distro +@DEB_FILES_STARTUP@ +# SQL files +usr/share/mysql/*.sql +# support files +usr/share/mysql/debian-start.inc.sh +# usr/share/mysql/debian_create_root_user.sql +usr/share/mysql/dictionary.txt +# usr/share/mysql/echo_stderr +usr/share/mysql/fill_help_tables.sql +usr/share/mysql/innodb_memcached_config.sql +usr/share/mysql/install_rewriter.sql +usr/share/mysql/magic +usr/share/mysql/mysql-log-rotate +usr/share/mysql/mysql_security_commands.sql +usr/share/mysql/mysql_sys_schema.sql +usr/share/mysql/mysql_system_tables.sql +usr/share/mysql/mysql_system_tables_data.sql +usr/share/mysql/mysql_test_data_timezone.sql +usr/share/mysql/uninstall_rewriter.sql +usr/share/mysql/wsrep.cnf +usr/share/mysql/wsrep_notify +usr/share/mysql/mysql-helpers +# localized error msgs +usr/share/mysql/*/errmsg.sys +usr/share/mysql/errmsg-utf8.txt +@DEB_INSTALL_SERVER_SYSTEMD@ +# legal +usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/ +usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ +usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/README diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-server-SERIES.lintian-overrides.in new file mode 100644 index 000000000000..45485facc455 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.lintian-overrides.in @@ -0,0 +1,19 @@ +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-@DEB_PRODUCTNAME@-server: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-server/LICENSE.mysql +mysql-@DEB_PRODUCTNAME@-server: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-server/@DEB_INSTALL_LICENSEFILE@.gz +mysql-@DEB_PRODUCTNAME@-server: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.logcheck.ignore.paranoid.in b/packaging/deb-in/mysql-packagesource-server-SERIES.logcheck.ignore.paranoid.in new file mode 100644 index 000000000000..aaeb8b0f1e36 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.logcheck.ignore.paranoid.in @@ -0,0 +1,8 @@ +/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$ +/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$ +mysqld\[[0-9]+\]: $ +mysqld\[[0-9]+\]: Version: .* socket: '/var/run/mysqld/mysqld.sock' port: 3306$ +mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$ +usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$ +usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$ diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.logcheck.ignore.server.in b/packaging/deb-in/mysql-packagesource-server-SERIES.logcheck.ignore.server.in new file mode 100644 index 000000000000..8c4c38c4b994 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.logcheck.ignore.server.in @@ -0,0 +1,17 @@ +/etc/init.d/mysql\[[0-9]+\]: [0-9]+ processes alive and '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$ +/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$ +mysqld\[[0-9]+\]: ?$ +mysqld\[[0-9]+\]: .*InnoDB: Shutdown completed +mysqld\[[0-9]+\]: .*InnoDB: Started; +mysqld\[[0-9]+\]: .*InnoDB: Starting shutdown\.\.\.$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Normal shutdown$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: ready for connections\.$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Shutdown complete$ +mysqld\[[0-9]+\]: /usr/sbin/mysqld: ready for connections\.$ +mysqld\[[0-9]+\]: .*/usr/sbin/mysqld: Shutdown Complete$ +mysqld\[[0-9]+\]: Version: .* socket +mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$ +usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$ +usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$ diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.logcheck.ignore.workstation.in b/packaging/deb-in/mysql-packagesource-server-SERIES.logcheck.ignore.workstation.in new file mode 100644 index 000000000000..8c4c38c4b994 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.logcheck.ignore.workstation.in @@ -0,0 +1,17 @@ +/etc/init.d/mysql\[[0-9]+\]: [0-9]+ processes alive and '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$ +/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$ +/etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$ +mysqld\[[0-9]+\]: ?$ +mysqld\[[0-9]+\]: .*InnoDB: Shutdown completed +mysqld\[[0-9]+\]: .*InnoDB: Started; +mysqld\[[0-9]+\]: .*InnoDB: Starting shutdown\.\.\.$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Normal shutdown$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: ready for connections\.$ +mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Shutdown complete$ +mysqld\[[0-9]+\]: /usr/sbin/mysqld: ready for connections\.$ +mysqld\[[0-9]+\]: .*/usr/sbin/mysqld: Shutdown Complete$ +mysqld\[[0-9]+\]: Version: .* socket +mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$ +usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$ +usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$ diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.mysql-server.logrotate.in b/packaging/deb-in/mysql-packagesource-server-SERIES.mysql-server.logrotate.in new file mode 100644 index 000000000000..2d9c71a75a1b --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.mysql-server.logrotate.in @@ -0,0 +1,27 @@ +# - I put everything in one block and added sharedscripts, so that mysql gets +# flush-logs'd only once. +# Else the binary logs would automatically increase by n times every day. +# - The error log is obsolete, messages go to syslog now. +/var/log/mysql.log /var/log/mysql/*log { + daily + rotate 7 + missingok + create 640 mysql adm + compress + sharedscripts + postrotate + test -x /usr/bin/mysqladmin || exit 0 + # If this fails, check debian.conf! + MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" + if [ -z "`$MYADMIN ping 2>/dev/null`" ]; then + # Really no mysqld or rather a missing debian-sys-maint user? + # If this occurs and is not a error please report a bug. + #if ps cax | grep -q mysqld; then + if killall -q -s0 -umysql mysqld; then + exit 1 + fi + else + $MYADMIN flush-logs + fi + endscript +} diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.mysql.init.in b/packaging/deb-in/mysql-packagesource-server-SERIES.mysql.init.in new file mode 100755 index 000000000000..4954928fb5f1 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.mysql.init.in @@ -0,0 +1,197 @@ +#!/bin/bash +# +### BEGIN INIT INFO +# Provides: mysql +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Should-Start: $network $time +# Should-Stop: $network $time +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start and stop the mysql database server daemon +# Description: Controls the main MySQL database server daemon "mysqld" +# and its wrapper script "mysqld_safe". +### END INIT INFO +# +set -e +set -u +${DEBIAN_SCRIPT_DEBUG:+ set -v -x} + +test -x /usr/bin/mysqld_safe || exit 0 + +. /lib/lsb/init-functions + +SELF=$(cd $(dirname $0); pwd -P)/$(basename $0) +CONF=/etc/mysql/my.cnf +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" + +# priority can be overriden and "-s" adds output to stderr +ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mysql -i" + +# Safeguard (relative paths, core dumps..) +cd / +umask 077 + +# mysqladmin likes to read /root/.my.cnf. This is usually not what I want +# as many admins e.g. only store a password without a username there and +# so break my scripts. +export HOME=/etc/mysql/ + +## Fetch a particular option from mysql's invocation. +# +# Usage: void mysqld_get_param option +mysqld_get_param() { + /usr/sbin/mysqld --print-defaults \ + | tr " " "\n" \ + | grep -- "--$1" \ + | tail -n 1 \ + | cut -d= -f2 +} + +## Do some sanity checks before even trying to start mysqld. +sanity_checks() { + # check for config file + if [ ! -r /etc/mysql/my.cnf ]; then + log_warning_msg "$0: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" + echo "WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" | $ERR_LOGGER + fi + + # check for diskspace shortage + datadir=`mysqld_get_param datadir` + if LC_ALL=C BLOCKSIZE= df --portability $datadir/. | tail -n 1 | awk '{ exit ($4>4096) }'; then + log_failure_msg "$0: ERROR: The partition with $datadir is too full!" + echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER + exit 1 + fi +} + +## Checks if there is a server running and if so if it is accessible. +# +# check_alive insists on a pingable server +# check_dead also fails if there is a lost mysqld in the process list +# +# Usage: boolean mysqld_status [check_alive|check_dead] [warn|nowarn] +mysqld_status () { + ping_output=`$MYADMIN ping 2>&1`; ping_alive=$(( ! $? )) + + ps_alive=0 + pidfile=`mysqld_get_param pid-file` + if [ -f "$pidfile" ] && ps `cat $pidfile` >/dev/null 2>&1; then ps_alive=1; fi + + if [ "$1" = "check_alive" -a $ping_alive = 1 ] || + [ "$1" = "check_dead" -a $ping_alive = 0 -a $ps_alive = 0 ]; then + return 0 # EXIT_SUCCESS + else + if [ "$2" = "warn" ]; then + echo -e "$ps_alive processes alive and '$MYADMIN ping' resulted in\n$ping_output\n" | $ERR_LOGGER -p daemon.debug + fi + return 1 # EXIT_FAILURE + fi +} + +# +# main() +# + +case "${1:-''}" in + 'start'|'bootstrap') + sanity_checks; + # Start daemon + if [ "$1" = "bootstrap" ]; then + log_daemon_msg "Starting first Galera Cluster node" "mysqld" + BOOTSTRAP='--wsrep-new-cluster' + else + log_daemon_msg "Starting MySQL database server" "mysqld" + BOOTSTRAP='' + fi + if mysqld_status check_alive nowarn; then + log_progress_msg "already running" + log_end_msg 0 + else + # Could be removed during boot + test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld + + # Start MySQL! + su - mysql -s /bin/sh -c "/usr/bin/mysqld_safe $BOOTSTRAP > /dev/null 2>&1 &" + + # 6s was reported in #352070 to be too few when using ndbcluster + # 14s was reported in #736452 to be too few with large installs + for i in $(seq 1 30); do + sleep 1 + if mysqld_status check_alive nowarn ; then break; fi + log_progress_msg "." + done + if mysqld_status check_alive warn; then + log_end_msg 0 + # Now start mysqlcheck or whatever the admin wants. + output=$(/etc/mysql/debian-start) + [ -n "$output" ] && log_action_msg "$output" + else + log_end_msg 1 + log_failure_msg "Please take a look at the syslog" + fi + fi + ;; + + 'stop') + # * As a passwordless mysqladmin (e.g. via ~/.my.cnf) must be possible + # at least for cron, we can rely on it here, too. (although we have + # to specify it explicit as e.g. sudo environments points to the normal + # users home and not /root) + log_daemon_msg "Stopping MySQL database server" "mysqld" + if ! mysqld_status check_dead nowarn; then + set +e + shutdown_out=`$MYADMIN shutdown 2>&1`; r=$? + set -e + if [ "$r" -ne 0 ]; then + log_end_msg 1 + [ "$VERBOSE" != "no" ] && log_failure_msg "Error: $shutdown_out" + log_daemon_msg "Killing MySQL database server by signal" "mysqld" + killall -15 mysqld + server_down= + for i in 1 2 3 4 5 6 7 8 9 10; do + sleep 1 + if mysqld_status check_dead nowarn; then server_down=1; break; fi + done + if test -z "$server_down"; then killall -9 mysqld; fi + fi + fi + + if ! mysqld_status check_dead warn; then + log_end_msg 1 + log_failure_msg "Please stop MySQL manually and read /usr/share/doc/mysql-server-5.7/README.Debian.gz!" + exit -1 + else + log_end_msg 0 + fi + ;; + + 'restart') + set +e; $SELF stop; set -e + $SELF start + ;; + + 'reload'|'force-reload') + log_daemon_msg "Reloading MySQL database server" "mysqld" + $MYADMIN reload + log_end_msg 0 + ;; + + 'status') + if mysqld_status check_alive nowarn; then + log_action_msg "$($MYADMIN version)" + else + log_action_msg "MySQL is stopped." + exit 3 + fi + ;; + + *) + echo "Usage: $SELF start|stop|restart|reload|force-reload|status|bootstrap" + exit 1 + ;; +esac + +# Some success paths end up returning non-zero so exit 0 explicitly. See +# bug #739846. +exit 0 diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.mysql.service.in b/packaging/deb-in/mysql-packagesource-server-SERIES.mysql.service.in new file mode 100644 index 000000000000..c117a3f57400 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.mysql.service.in @@ -0,0 +1,39 @@ +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# MySQL systemd service file + +[Unit] +Description=MySQL @DEB_PRODUCTNAMEC@ Server +After=network.target + +[Install] +WantedBy=multi-user.target + +[Service] +User=mysql +Group=mysql +Type=forking +PermissionsStartOnly=true +PIDFile=/var/run/mysqld/mysqld.pid +@DEB_SERVICE_SERVER_EXECPRE@ +ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS $MYSQLD_RECOVER_START +@DEB_SERVICE_SERVER_EXECPOST@ +TimeoutSec=600 +LimitNOFILE = 5000 +Restart=on-failure +RestartPreventExitStatus=1 +RuntimeDirectory=mysqld +RuntimeDirectoryMode=755 diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.postinst.in b/packaging/deb-in/mysql-packagesource-server-SERIES.postinst.in new file mode 100755 index 000000000000..de6b8881e87f --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.postinst.in @@ -0,0 +1,282 @@ +#!/bin/bash + +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +set -e + +. /usr/share/debconf/confmodule + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin + +# Runs an arbitrary init sql file supplied in $1. Does not require login access +run_init_sql() { + tmpdir=$(mktemp -d) + chown mysql:mysql "$tmpdir" + mysqld --user=mysql --init-file="$1" --socket="$tmpdir/mysqld.sock" --pid-file="$tmpdir/mysqld.pid" > /dev/null 2>&1 + result=$? + rm -rf "$tmpdir" + return $result +} + +# To avoid having hardcoded paths in the script, we do a search on the path, as suggested at: +# https://www.debian.org/doc/manuals/developers-reference/ch06.en.html#bpp-debian-maint-scripts +pathfind() { + OLDIFS="$IFS" + IFS=: + for p in $PATH; do + if [ -x "$p/$*" ]; then + IFS="$OLDIFS" + return 0 + fi + done + IFS="$OLDIFS" + return 1 +} + +# Choose the proper mechanism. Ubuntu 16.04 uses systemd but still provides invoke-rc.d, +# so the existence of systemd must be checked first. +invoke() { + if pathfind systemctl; then + systemctl $1 "@DEB_SYSTEMD_SERVICE_NAME@" + elif pathfind invoke-rc.d; then + invoke-rc.d mysql $1 + else + /etc/init.d/mysql $1 + fi +} + +# Check if there is passwordless root login +test_mysql_access() { + mysql --no-defaults -u root -h localhost /dev/null 2>&1 +} + +# Check if the debian-sys-maint user can log in +test_sysmaint_access() { + mysql --defaults-file=/etc/mysql/debian.cnf /dev/null 2>&1 +} + +# $1 is username, e.g. 'root' $2 is password +set_mysql_pw() { + # These variables are global (POSIX doesn't define local) so prefix them + # to avoid any potential collisions. + set_mysql_pw_user="$1" + set_mysql_pw_pass="$2" + set_mysql_pw_passfile=`mktemp --tmpdir=/var/lib/mysql-files/` + chown mysql:mysql "$set_mysql_pw_passfile" + echo "USE mysql;" >> "$set_mysql_pw_passfile" + echo "UPDATE user SET authentication_string=PASSWORD('$set_mysql_pw_pass') WHERE user='$set_mysql_pw_user';" >> "$set_mysql_pw_passfile" + echo "FLUSH PRIVILEGES;" >> "$set_mysql_pw_passfile" + echo "SHUTDOWN;" >> "$set_mysql_pw_passfile" + run_init_sql "$set_mysql_pw_passfile" + rm "$set_mysql_pw_passfile" +} + +# This is necessary because mysql_install_db removes the pid file in /var/run +# and because changed configuration options should take effect immediately. +# In case the server wasn't running at all it should be ok if the stop +# script fails. I can't tell at this point because of the cleaned /var/run. +set +e; invoke stop; set -e + +case "$1" in + configure) + mysql_datadir=/usr/share/mysql + mysql_statedir=/var/lib/mysql + mysql_rundir=/var/run/mysqld + mysql_logdir=/var/log/mysql + mysql_cfgdir=/etc/mysql + mysql_upgradedir=/var/lib/mysql-upgrade + mysql_filesdir=/var/lib/mysql-files + mysql_keyringdir=/var/lib/mysql-keyring + + # mysqld gets called during postinst configure, so any + # updates to the AppArmor profile must be loaded first (before the + # dh_apparmor snippet added by debhelper does it properly at the end of + # this script). Otherwise, mysqld cannot for example load + # /etc/mysql/mysqld.conf.d/ on upgrade from 5.5 to 5.6, which was added in + # 5.6 packaging but not present in the AppArmor profile shipped with 5.5 + # packaging. + # + # This a workaround. Status is tracked at https://launchpad.net/bugs/1435368 + if aa-status --enabled 2>/dev/null; then + # It is common for this to fail because + # /etc/apparmor.d/local/usr.sbin.mysqld doesn't exist (eg. on first + # install). But if this happens, then the workaround is not required, + # so it doesn't matter. If instead it causes a security issue, then + # that doesn't really matter here as dh_apparmor should handle that + # correctly later on. + apparmor_parser -r -T -W /etc/apparmor.d/usr.sbin.mysqld 2>/dev/null || true + fi + + # New packaging paradigm for my.cnf as of Dec-2014 for sharing mysql + # variants in Ubuntu. + /usr/share/mysql-common/configure-symlinks install mysql "$mysql_cfgdir/mysql.cnf" + + # Ensure the existence and right permissions for the database and + # log files. + for d in $mysql_statedir $mysql_filesdir $mysql_keyringdir $mysql_logdir + do + if [ ! -d "$d" -a ! -L "$d" ]; then mkdir "$d"; fi + chown -R mysql:mysql $d + chmod 0700 $d + done + + # When creating an ext3 jounal on an already mounted filesystem like e.g. + # /var/lib/mysql, you get a .journal file that is not modifyable by chown. + # The mysql_datadir must not be writable by the mysql user under any + # circumstances as it contains scripts that are executed by root. + set +e + chown -R 0:0 $mysql_datadir + touch $mysql_logdir/error.log + chown -R mysql:adm $mysql_logdir + chmod 0750 $mysql_logdir + chmod 0640 $mysql_logdir/error.log + set -e + + # This is important to avoid dataloss when there is a removed + # mysql-server version from Woody lying around which used the same + # data directory and then somewhen gets purged by the admin. + db_set mysql-@DEB_PRODUCTNAME@-server/postrm_remove_database false || true + + + ## On every reconfiguration the maintenance user is recreated. + # + # - It is easier to regenerate the password every time but as people + # use fancy rsync scripts and file alteration monitors, the existing + # password is used and existing files not touched. + # - The echo is just for readability. ash's buildin has no "-e" so use /bin/echo. + + # recreate the credentials file if not present or without mysql_upgrade stanza + dc=$mysql_cfgdir/debian.cnf; + if [ -e "$dc" -a -n "`fgrep mysql_upgrade $dc 2>/dev/null`" ]; then + pass="`sed -n 's/^[ ]*password *= *// p' $dc | head -n 1`" + # Basedir is deprecated. Remove the option if it's in an existing debian.cnf + sed -i '/basedir/d' "$dc" + else + pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`; + if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi + umask 066 + cat /dev/null > $dc + umask 022 + echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc + echo "[client]" >>$dc + echo "host = localhost" >>$dc + echo "user = debian-sys-maint" >>$dc + echo "password = $pass" >>$dc + echo "socket = $mysql_rundir/mysqld.sock" >>$dc + echo "[mysql_upgrade]" >>$dc + echo "host = localhost" >>$dc + echo "user = debian-sys-maint" >>$dc + echo "password = $pass" >>$dc + echo "socket = $mysql_rundir/mysqld.sock" >>$dc + fi + # If this dir chmod go+w then the admin did it. But this file should not. + chown 0:0 $dc + chmod 0600 $dc + + # Initiate database. Output is not allowed by debconf :-( + # If database doesn't exist we create it. + if [ ! "$(ls -A "${mysql_statedir}")" ] && [ -d "${mysql_filesdir}" ]; then + existingdatabase=0 + initfile=`mktemp --tmpdir=/var/lib/mysql-files/` + touch "$initfile" + chmod 600 "$initfile" + chown mysql:mysql "$initfile" + echo "USE mysql; " >> "$initfile" + db_get mysql-@DEB_PRODUCTNAME@-server/root-pass && rootpw="$RET" + if [ ! -z $rootpw ]; then + echo "ALTER USER 'root'@'localhost' IDENTIFIED BY '$rootpw';" >> "$initfile" + fi + echo "CREATE USER IF NOT EXISTS 'debian-sys-maint'@'localhost' IDENTIFIED BY '$pass';" >> "$initfile" + echo "GRANT ALL ON *.* TO 'debian-sys-maint'@'localhost';" >> "$initfile" + echo "SHUTDOWN;" >> "$initfile" + # mysqld returns an error instead of a warning if CREATE USER IF NOT + # EXISTS fails, so ignore errors as a workaround. See: + # http://bugs.mysql.com/bug.php?id=80636 + mysqld --initialize-insecure --user=mysql --init-file="$initfile"> /dev/null 2>&1 || true + rm "$initfile" + else + existingdatabase=1 + fi + + # To avoid downgrades. This has to happen after the database is created, or --initialize will fail + touch $mysql_statedir/debian-5.7.flag + + ;; + + abort-upgrade|abort-remove|abort-configure) + ;; + + *) + echo "postinst called with unknown argument '$1'" 1>&2 + exit 1 + ;; +esac + +# The debhelper section is needed to unmask and enable the service +# in some cases like when upgrading from 5.5 +#DEBHELPER# + +if [ "$1" = "configure" ]; then + # We want to run mysql_upgrade to cover users upgrading. First we check if + # the debian-sys-maint user can log in. If not, we reset its password first. + if [ $existingdatabase = 1 ]; then + if ! test_sysmaint_access; then + invoke stop + set_mysql_pw "debian-sys-maint" "$pass" + invoke start + fi + mysql_upgrade --defaults-file=/etc/mysql/debian.cnf + fi + # Here we check to see if we can connect as root without a password + # this should catch upgrades from previous versions where the root + # password wasn't set. If the connection succeeds we install the + # auth_socket plugin and enable it for the root user to improve + # security. + if test_mysql_access; then + # Try to install auth_socket plugin. This throws an error if the plugin is + # already installed, which would end execution of the init sql to stop if + # --init-file was used. Bug: http://bugs.mysql.com/bug.php?id=80642 + pluginfile=`mktemp --tmpdir=/var/lib/mysql-files/` + echo "INSTALL PLUGIN auth_socket SONAME 'auth_socket.so';" >> "$pluginfile" + mysql -uroot < "$pluginfile" > /dev/null 2>&1 || true + rm "$pluginfile" + invoke stop + initfile=`mktemp --tmpdir=/var/lib/mysql-files/` + chown mysql:mysql "$initfile" + # If there is no root password set we enable the auth_socket plugin for the root user + echo "USE mysql;" >> "$initfile" + echo "ALTER USER 'root'@'localhost' IDENTIFIED WITH 'auth_socket';" >> "$initfile" + # Bug: http://bugs.mysql.com/bug.php?id=80632 + echo "UPDATE user SET password_expired='N', account_locked='N' WHERE user='root';" >> "$initfile" + echo "FLUSH PRIVILEGES;" >> "$initfile" + echo "SHUTDOWN;" >> "$initfile" + # The INSTALL PLUGIN line will throw an error if the plugin is already installed + run_init_sql "$initfile" + rm "$initfile" + invoke start + fi +fi + +# forget we ever saw the password. don't use reset to keep the seen status +db_set mysql-@DEB_PRODUCTNAME@-server/root-pass "" +db_set mysql-@DEB_PRODUCTNAME@-server/re-root-pass "" +db_stop # in case invoke failes + + +exit 0 diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.postrm.in b/packaging/deb-in/mysql-packagesource-server-SERIES.postrm.in new file mode 100755 index 000000000000..a0e44dfce68f --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.postrm.in @@ -0,0 +1,120 @@ +#!/bin/bash + +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +set -e + +# It is possible that Debconf has already been removed, too. +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +mysql_cfgdir=/etc/mysql +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" + +# To avoid having hardcoded paths in the script, we do a search on the path, as suggested at: +# https://www.debian.org/doc/manuals/developers-reference/ch06.en.html#bpp-debian-maint-scripts +pathfind() { + OLDIFS="$IFS" + IFS=: + for p in $PATH; do + if [ -x "$p/$*" ]; then + IFS="$OLDIFS" + return 0 + fi + done + IFS="$OLDIFS" + return 1 +} + +# Choose the proper mechanism. Ubuntu 16.04 uses systemd but still provides invoke-rc.d, +# so the existence of systemd must be checked first. +invoke() { + if pathfind systemctl; then + systemctl $1 "@DEB_SYSTEMD_SERVICE_NAME@" + elif pathfind invoke-rc.d; then + invoke-rc.d mysql $1 + else + /etc/init.d/mysql $1 + fi +} + +# Try to stop the server in a sane way. If it does not success let the admin +# do it himself. No database directories should be removed while the server +# is running! +stop_server() { + set +e + invoke stop + errno=$? + set -e + + if [ "$?" != 0 ]; then + echo "Trying to stop the MySQL server resulted in exitcode $?." 1>&2 + echo "Stop it yourself and try again!" 1>&2 + exit 1 + fi +} + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then + stop_server + sleep 2 + fi + ;; + *) + echo "postrm called with unknown argument '$1'" 1>&2 + exit 1 + ;; +esac + +# New packaging paradigm for my.cnf as of Dec-2014 for sharing mysql +# variants in Ubuntu. +case "$1" in + remove|disappear) + [ -x /usr/share/mysql-common/configure-symlinks ] && /usr/share/mysql-common/configure-symlinks remove mysql "$mysql_cfgdir/mysql.cnf" + ;; +esac + +# +# - Do NOT purge logs or data if another mysql-sever* package is installed (#307473) +# - Remove the mysql user only after all his owned files are purged. +# +if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; then + # we remove the mysql user only after all his owned files are purged + rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz} + rm -rf /var/log/mysql + + db_input high mysql-@DEB_PRODUCTNAME@-server/postrm_remove_databases || true + db_go || true + db_get mysql-@DEB_PRODUCTNAME@-server/postrm_remove_databases || true + if [ "$RET" = "true" ]; then + # never remove the debian.cnf when the databases are still existing + # else we ran into big trouble on the next install! + rm -f /etc/mysql/debian.cnf + rm -rf /var/lib/mysql + rm -rf /var/lib/mysql-files + rm -rf /var/lib/mysql-keyring + userdel mysql || true + fi +fi + +#DEBHELPER# + +exit 0 diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.preinst.in b/packaging/deb-in/mysql-packagesource-server-SERIES.preinst.in new file mode 100755 index 000000000000..2fe047ede76e --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.preinst.in @@ -0,0 +1,220 @@ +#!/bin/bash + +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# +# summary of how this script can be called: +# * install +# * install +# * upgrade +# * abort-upgrade +# + +set -e + +. /usr/share/debconf/confmodule + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" +DATADIR=/var/lib/mysql +LOGDIR=/var/log/mysql +UPGRADEDIR=/var/lib/mysql-upgrade + +# To avoid having hardcoded paths in the script, we do a search on the path, as suggested at: +# https://www.debian.org/doc/manuals/developers-reference/ch06.en.html#bpp-debian-maint-scripts +pathfind() { + OLDIFS="$IFS" + IFS=: + for p in $PATH; do + if [ -x "$p/$*" ]; then + IFS="$OLDIFS" + return 0 + fi + done + IFS="$OLDIFS" + return 1 +} + +# Choose the proper mechanism. Ubuntu 16.04 uses systemd but still provides invoke-rc.d, +# so the existence of systemd must be checked first. +invoke() { + if pathfind systemctl; then + systemctl $1 "@DEB_SYSTEMD_SERVICE_NAME@" + elif pathfind invoke-rc.d; then + invoke-rc.d mysql $1 + else + /etc/init.d/mysql $1 + fi +} + +# Try to stop the server in a sane way. If it does not success let the admin +# do it himself. No database directories should be removed while the server +# is running! Another mysqld in e.g. a different chroot is fine for us. +stop_server() { + if pathfind systemctl; then + if systemctl list-unit-files -t service | fgrep -q "@DEB_SYSTEMD_SERVICE_NAME@" ; then + : # service is known, so stopping it makes sense + else + return 0 # we cannot stop what we do not know + fi + else + : # no systemd? let's try anyways + fi + + set +e + invoke stop + errno=$? + set -e + + # 0=ok, 100=no init script (fresh install) + if [ "$errno" != 0 -a "$errno" != 100 ]; then + echo "${cmd/ */} returned $errno" 1>&2 + echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2 + echo "Stop it yourself and try again!" 1>&2 + db_stop + exit 1 + fi +} + +################################ main() ########################## + +this_version=5.7 + +# Abort if an NDB cluster is in use. +if egrep -qi -r '^[^#]*ndb.connectstring|^[[:space:]]*\[[[:space:]]*ndb_mgmd' /etc/mysql/; then + db_fset mysql-@DEB_PRODUCTNAME@-server/no_upgrade_when_using_ndb seen false || true + db_input high mysql-@DEB_PRODUCTNAME@-server/no_upgrade_when_using_ndb || true + db_go + db_stop + exit 1 +fi + +# Abort if skip-bdb option is enabled, required for 5.0 -> 5.1 upgrades. +#TODO + +# Safe the user from stupidities. +show_downgrade_warning=0 +for i in `ls $DATADIR/debian-*.flag 2>/dev/null`; do + found_version=`echo $i | sed 's/.*debian-\([0-9\.]\+\).flag/\1/'` + if dpkg --compare-versions "$this_version" '<<' "$found_version"; then + show_downgrade_warning=1 + break; + fi +done +if [ "$show_downgrade_warning" = 1 ]; then + db_fset mysql-@DEB_PRODUCTNAME@-server/really_downgrade seen false || true + db_input medium mysql-@DEB_PRODUCTNAME@-server/really_downgrade || true + db_go + db_get mysql-@DEB_PRODUCTNAME@-server/really_downgrade || true + if [ "$RET" = "true" ]; then + rm -f $DATADIR/debian-*.flag + touch $DATADIR/debian-$this_version.flag + else + echo "Aborting downgrade from (at least) $found_version to $this_version." 1>&2 + echo "If are sure you want to downgrade to $this_version, remove the file" 1>&2 + echo "$DATADIR/debian-*.flag and try installing again." 1>&2 + db_stop + exit 1 + fi +fi + +# to be sure +stop_server + +# If we use NIS then errors should be tolerated. It's up to the +# user to ensure that the mysql user is correctly setup. +# Beware that there are two ypwhich one of them needs the 2>/dev/null! +if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then + set +e +fi + +# +# Now we have to ensure the following state: +# /etc/passwd: mysql:x:100:101:MySQL Server:/nonexistent:/bin/false +# /etc/group: mysql:x:101: +# +# Sadly there could any state be present on the system so we have to +# modify everything carefully i.e. not doing a chown before creating +# the user etc... +# + +# creating mysql group if he isn't already there +if ! getent group mysql >/dev/null; then + # Adding system group: mysql. + addgroup --system mysql >/dev/null +fi + +# creating mysql user if he isn't already there +if ! getent passwd mysql >/dev/null; then + # Adding system user: mysql. + adduser \ + --system \ + --disabled-login \ + --ingroup mysql \ + --no-create-home \ + --home /nonexistent \ + --gecos "MySQL Server" \ + --shell /bin/false \ + mysql >/dev/null +fi + +# end of NIS tolerance zone +set -e + +# if there's a symlink, let's store where it's pointing, because otherwise +# it's going to be lost in some situations +for dir in DATADIR LOGDIR; do + checkdir=`eval echo "$"$dir` + if [ -L "$checkdir" ]; then + mkdir -p "$UPGRADEDIR" + cp -d "$checkdir" "$UPGRADEDIR/$dir.link" + fi +done + +# creating mysql home directory +if [ ! -d $DATADIR -a ! -L $DATADIR ]; then + mkdir $DATADIR +fi + +# checking disc space +if LC_ALL=C BLOCKSIZE= df --portability $DATADIR/. | tail -n 1 | awk '{ exit ($4>1000) }'; then + echo "ERROR: There's not enough space in $DATADIR/" 1>&2 + db_stop + exit 1 +fi + +# Since the home directory was created before putting the user into +# the mysql group and moreover we cannot guarantee that the +# permissions were correctly *before* calling this script, we fix them now. +# In case we use NIS and no mysql user is present then this script should +# better fail now than later.. +# The "set +e" is necessary as e.g. a ".journal" of a ext3 partition is +# not chgrp'able (#318435). +set +e +chown mysql:mysql $DATADIR +find $DATADIR -follow -not -group mysql -print0 2>/dev/null \ + | xargs -0 --no-run-if-empty chgrp mysql +set -e + + +db_stop + +#DEBHELPER# + +exit 0 diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.prerm.in b/packaging/deb-in/mysql-packagesource-server-SERIES.prerm.in new file mode 100755 index 000000000000..cfe13a965ef0 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.prerm.in @@ -0,0 +1,25 @@ +#!/bin/bash + +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +set -e + +. /usr/share/debconf/confmodule + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } + +#DEBHELPER# diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.templates.in b/packaging/deb-in/mysql-packagesource-server-SERIES.templates.in new file mode 100644 index 000000000000..8a8793bcd35d --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.templates.in @@ -0,0 +1,88 @@ +Template: mysql-@DEB_PRODUCTNAME@-server/root-pass +Type: password +Description: Enter root password: + Please provide a strong password that will be set for the root account of your MySQL database. + Leave it blank to enable password less login using UNIX socket based authentication. + +Template: mysql-@DEB_PRODUCTNAME@-server/re-root-pass +Type: password +Description: Re-enter root password: + Now that you have selected a password for the root account, please confirm by typing it again. Do not share the password with anyone. + +Template: mysql-@DEB_PRODUCTNAME@-server/root-pass-mismatch +Type: error +Description: The two passwords did not match + Please try again. Make sure you type the exact same password twice. + +Template: mysql-@DEB_PRODUCTNAME@-server/remove-data-dir +Type: boolean +Default: false +Description: Remove data directories ? + This operation will remove the data directory at '/var/lib/mysql' that stores all the databases, tables and related meta-data. + Additionally, any import or export files stored at '/var/lib/mysql-files' will be removed along with directory, as well as the contents of + /var/lib/mysql-keyring. + It is highly recommended to take data backup before removing the data directories. + +Template: mysql-@DEB_PRODUCTNAME@-server/data-dir +Type: note +Description: Data directory found when no MySQL server package is installed + A data directory '/var/lib/mysql' is present on this system when no MySQL server + package is currently installed on the system. The directory may be under control of + server package received from third-party vendors. It may also be an unclaimed data + directory from previous removal of mysql packages. + . + It is highly recommended to take data backup. If you have not done so, now would be + the time to take backup in another shell. Once completed, press 'Ok' to continue. + +Template: mysql-@DEB_PRODUCTNAME@-server/really_downgrade +Type: boolean +Default: false +_Description: Really proceed with downgrade? + A file named /var/lib/mysql/debian-*.flag exists on this system. + . + Such a file is an indication that a mysql-server package with a higher + version has been installed previously. + . + There is no guarantee that the version you're currently installing + will be able to use the current databases. + +Template: mysql-@DEB_PRODUCTNAME@-server/nis_warning +Type: note +_Description: Important note for NIS/YP users + Using MySQL under NIS/YP requires a mysql user account to be added on + the local system with: + . + adduser --system --group --home /var/lib/mysql mysql + . + You should also check the permissions and ownership of the + /var/lib/mysql directory: + . + /var/lib/mysql: drwxr-xr-x mysql mysql + +Template: mysql-@DEB_PRODUCTNAME@-server/postrm_remove_databases +Type: boolean +Default: false +_Description: Remove all MySQL databases? + The /var/lib/mysql directory which contains the MySQL databases is about + to be removed. + . + This will also erase all data in /var/lib/mysql-files as well as + /var/lib/mysql-keyring. + . + If you're removing the MySQL package in order to later install a more + recent version or if a different mysql-server package is already + using it, the data should be kept. + +Template: mysql-@DEB_PRODUCTNAME@-server/start_on_boot +Type: boolean +Default: true +_Description: Start the MySQL server on boot? + The MySQL server can be launched automatically at boot time or manually + with the '/etc/init.d/mysql start' command. + +Template: mysql-@DEB_PRODUCTNAME@-server/no_upgrade_when_using_ndb +Type: error +_Description: NDB Cluster seems to be in use + MySQL-5.7 no longer provides NDB Cluster support. Please migrate to the new + mysql-cluster-server package and remove all lines starting with "ndb" from + all config files below /etc/mysql/. diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.upstart.disabled.in b/packaging/deb-in/mysql-packagesource-server-SERIES.upstart.disabled.in new file mode 100644 index 000000000000..fa7f208e7dda --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.upstart.disabled.in @@ -0,0 +1,63 @@ +description "MySQL 5.7 Server" +author "Mario Limonciello " + +start on runlevel [2345] +stop on starting rc RUNLEVEL=[016] + +respawn +respawn limit 2 5 + +env HOME=/etc/mysql +umask 007 + +# The default of 5 seconds is too low for mysql which needs to flush buffers +kill timeout 300 + +pre-start script + ## Fetch a particular option from mysql's invocation. + # Usage: void mysqld_get_param option + mysqld_get_param() { + /usr/sbin/mysqld --print-defaults \ + | tr " " "\n" \ + | grep -- "--$1" \ + | tail -n 1 \ + | cut -d= -f2 + } + + # priority can be overriden and "-s" adds output to stderr + ERR_LOGGER="logger -p daemon.err -t /etc/init/mysql.conf -i" + + #Sanity checks + [ -r $HOME/my.cnf ] + [ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld + /lib/init/apparmor-profile-load usr.sbin.mysqld + + # check for diskspace shortage + datadir=`mysqld_get_param datadir` + BLOCKSIZE=`LC_ALL=C df --portability $datadir/. | tail -n 1 | awk '{print $4}'` + if [ $BLOCKSIZE -le 4096 ] ; then + echo "$0: ERROR: The partition with $datadir is too full!" >&2 + echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER + exit 1 + fi +end script + +exec /usr/sbin/mysqld + +post-start script + for i in `seq 1 30` ; do + /usr/bin/mysqladmin --defaults-file="${HOME}"/debian.cnf ping && { + exec "${HOME}"/debian-start + # should not reach this line + exit 2 + } + statusnow=`status` + if echo $statusnow | grep -q 'stop/' ; then + exit 0 + elif echo $statusnow | grep -q 'respawn/' ; then + exit 1 + fi + sleep 1 + done + exit 1 +end script diff --git a/packaging/deb-in/mysql-packagesource-server.postinst.in b/packaging/deb-in/mysql-packagesource-server.postinst.in index ae861e7e815a..cd1379a01256 100644 --- a/packaging/deb-in/mysql-packagesource-server.postinst.in +++ b/packaging/deb-in/mysql-packagesource-server.postinst.in @@ -20,18 +20,22 @@ take_upstart_job_backup () { if [ -e "/etc/init/mysql.conf" ] && [ -d "/var/lib/mysql" ]; then - mysql_install_db --user=mysql > /dev/null mv /etc/init/mysql.conf /var/lib/mysql/.mysql.conf.backup fi } +# Choose the proper mechanism. Ubuntu 16.04 uses systemd but still provides invoke-rc.d, +# so the existence of systemd must be checked first. invoke() { - if pathfind invoke-rc.d; then - invoke-rc.d mysql + if pathfind systemctl; then + systemctl $1 "@DEB_SYSTEMD_SERVICE_NAME@" + elif pathfind invoke-rc.d; then + invoke-rc.d mysql $1 else /etc/init.d/mysql $1 fi } + case "$1" in configure) @@ -63,13 +67,19 @@ case "$1" in PASSWD=$(printf %q "${PASSWD}") cat << EOF > ${SQL} USE mysql; -UPDATE user SET password=PASSWORD('${PASSWD}') WHERE user='root'; -DELETE FROM user WHERE user=''; -FLUSH PRIVILEGES; +ALTER user 'root'@'localhost' IDENTIFIED BY '${PASSWD}'; +SHUTDOWN; EOF PASSWD="" + else + cat << EOF > ${SQL} +USE mysql; +INSTALL PLUGIN auth_socket SONAME 'auth_socket.so'; +ALTER USER 'root'@'localhost' IDENTIFIED WITH 'auth_socket'; +SHUTDOWN; +EOF fi - mysql_install_db --user=mysql > /dev/null + mysqld --initialize-insecure --user=mysql > /dev/null run_init_sql "$SQL" rm -f "$SQL" fi diff --git a/packaging/deb-in/mysql-packagesource-server.preinst.in b/packaging/deb-in/mysql-packagesource-server.preinst.in index d4c1e6a9934b..fa5244c2f930 100644 --- a/packaging/deb-in/mysql-packagesource-server.preinst.in +++ b/packaging/deb-in/mysql-packagesource-server.preinst.in @@ -55,6 +55,12 @@ case "$1" in invoke-rc.d mysql stop || exit $? server_stop fi + # Native 5.5 packages create a /var/run/mysqld owned by root. This can cause + # errors in the systemd service, so we reset ownership if it exists. + MYSQLRUN=/var/run/mysqld + if [ -d ${MYSQLRUN} ]; then + install -d -m0755 -omysql -gmysql ${MYSQLRUN} + fi set +e diff --git a/packaging/deb-in/mysql-packagesource-source-SERIES.install.in b/packaging/deb-in/mysql-packagesource-source-SERIES.install.in new file mode 100644 index 000000000000..3469197e45fe --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-source-SERIES.install.in @@ -0,0 +1,21 @@ +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +../*.dsc usr/src/mysql/ +../*.tar.gz usr/src/mysql/ +@DEB_INSTALL_SOURCE_XZ@ +# legal +usr/share/doc/mysql-@DEB_PRODUCTNAME@-source@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ +usr/share/doc/mysql-@DEB_PRODUCTNAME@-source@DEB_PRODUCTSERIES@/README diff --git a/packaging/deb-in/mysql-packagesource-source-SERIES.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-source-SERIES.lintian-overrides.in new file mode 100644 index 000000000000..d5c9ec3811f2 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-source-SERIES.lintian-overrides.in @@ -0,0 +1,19 @@ +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-@DEB_PRODUCTNAME@-source: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-source/LICENSE.mysql +mysql-@DEB_PRODUCTNAME@-source: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-source/@DEB_INSTALL_LICENSEFILE@.gz +mysql-@DEB_PRODUCTNAME@-source: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/packaging/deb-in/mysql-packagesource-test-SERIES.install.in b/packaging/deb-in/mysql-packagesource-test-SERIES.install.in new file mode 100644 index 000000000000..27aec21842f5 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-test-SERIES.install.in @@ -0,0 +1,95 @@ +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# binaries +usr/bin/mysql_client_test +usr/bin/mysqltest +usr/bin/mysqlxtest +# manpages +usr/share/man/man1/mysql_client_test.1 +usr/share/man/man1/mysql-test-run.pl.1 +usr/share/man/man1/mysqltest.1 +# plugins +usr/lib/mysql/plugin/auth.so +usr/lib/mysql/plugin/auth_test_plugin.so +usr/lib/mysql/plugin/daemon_example.ini +usr/lib/mysql/plugin/ha_example.so +usr/lib/mysql/plugin/libdaemon_example.so +usr/lib/mysql/plugin/libtest_framework.so +usr/lib/mysql/plugin/libtest_services.so +usr/lib/mysql/plugin/libtest_services_threaded.so +usr/lib/mysql/plugin/libtest_session_detach.so +usr/lib/mysql/plugin/libtest_session_info.so +usr/lib/mysql/plugin/libtest_session_in_thd.so +usr/lib/mysql/plugin/libtest_sql_2_sessions.so +usr/lib/mysql/plugin/libtest_sql_all_col_types.so +usr/lib/mysql/plugin/libtest_sql_cmds_1.so +usr/lib/mysql/plugin/libtest_sql_commit.so +usr/lib/mysql/plugin/libtest_sql_complex.so +usr/lib/mysql/plugin/libtest_sql_errors.so +usr/lib/mysql/plugin/libtest_sql_lock.so +usr/lib/mysql/plugin/libtest_sql_processlist.so +usr/lib/mysql/plugin/libtest_sql_replication.so +usr/lib/mysql/plugin/libtest_sql_shutdown.so +usr/lib/mysql/plugin/libtest_sql_sqlmode.so +usr/lib/mysql/plugin/libtest_sql_stored_procedures_functions.so +usr/lib/mysql/plugin/libtest_sql_views_triggers.so +usr/lib/mysql/plugin/libtest_x_sessions_deinit.so +usr/lib/mysql/plugin/libtest_x_sessions_init.so +usr/lib/mysql/plugin/qa_auth_client.so +usr/lib/mysql/plugin/qa_auth_interface.so +usr/lib/mysql/plugin/qa_auth_server.so +usr/lib/mysql/plugin/replication_observers_example_plugin.so +usr/lib/mysql/plugin/rewrite_example.so +usr/lib/mysql/plugin/test_security_context.so +usr/lib/mysql/plugin/test_udf_services.so +# usr/lib/mysql/plugin/debug/auth.so +# usr/lib/mysql/plugin/debug/auth_test_plugin.so +# usr/lib/mysql/plugin/debug/daemon_example.ini +# usr/lib/mysql/plugin/debug/ha_example.so +# usr/lib/mysql/plugin/debug/libdaemon_example.so +# usr/lib/mysql/plugin/debug/libtest_framework.so +# usr/lib/mysql/plugin/debug/libtest_services.so +# usr/lib/mysql/plugin/debug/libtest_services_threaded.so +# usr/lib/mysql/plugin/debug/libtest_session_detach.so +# usr/lib/mysql/plugin/debug/libtest_session_info.so +# usr/lib/mysql/plugin/debug/libtest_session_in_thd.so +# usr/lib/mysql/plugin/debug/libtest_sql_2_sessions.so +# usr/lib/mysql/plugin/debug/libtest_sql_all_col_types.so +# usr/lib/mysql/plugin/debug/libtest_sql_cmds_1.so +# usr/lib/mysql/plugin/debug/libtest_sql_commit.so +# usr/lib/mysql/plugin/debug/libtest_sql_complex.so +# usr/lib/mysql/plugin/debug/libtest_sql_errors.so +# usr/lib/mysql/plugin/debug/libtest_sql_lock.so +# usr/lib/mysql/plugin/debug/libtest_sql_processlist.so +# usr/lib/mysql/plugin/debug/libtest_sql_replication.so +# usr/lib/mysql/plugin/debug/libtest_sql_shutdown.so +# usr/lib/mysql/plugin/debug/libtest_sql_sqlmode.so +# usr/lib/mysql/plugin/debug/libtest_sql_stored_procedures_functions.so +# usr/lib/mysql/plugin/debug/libtest_sql_views_triggers.so +# usr/lib/mysql/plugin/debug/libtest_x_sessions_deinit.so +# usr/lib/mysql/plugin/debug/libtest_x_sessions_init.so +# usr/lib/mysql/plugin/debug/qa_auth_client.so +# usr/lib/mysql/plugin/debug/qa_auth_interface.so +# usr/lib/mysql/plugin/debug/qa_auth_server.so +# usr/lib/mysql/plugin/debug/replication_observers_example_plugin.so +# usr/lib/mysql/plugin/debug/rewrite_example.so +# usr/lib/mysql/plugin/debug/test_security_context.so +# usr/lib/mysql/plugin/debug/test_udf_services.so +# test suite +usr/lib/mysql-test/* +# legal +usr/share/doc/mysql-@DEB_PRODUCTNAME@-test@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ +usr/share/doc/mysql-@DEB_PRODUCTNAME@-test@DEB_PRODUCTSERIES@/README diff --git a/packaging/deb-in/mysql-packagesource-test-SERIES.links.in b/packaging/deb-in/mysql-packagesource-test-SERIES.links.in new file mode 100644 index 000000000000..51a5d94f8810 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-test-SERIES.links.in @@ -0,0 +1,17 @@ +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +usr/lib/mysql-test/mysql-test-run.pl usr/lib/mysql-test/mysql-test-run +usr/lib/mysql-test/mysql-test-run.pl usr/lib/mysql-test/mtr diff --git a/packaging/deb-in/mysql-packagesource-test-SERIES.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-test-SERIES.lintian-overrides.in new file mode 100644 index 000000000000..7680f39f7db7 --- /dev/null +++ b/packaging/deb-in/mysql-packagesource-test-SERIES.lintian-overrides.in @@ -0,0 +1,19 @@ +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Additional license file is needed so overriding this warning +mysql-@DEB_PRODUCTNAME@-test: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-test/LICENSE.mysql +mysql-@DEB_PRODUCTNAME@-test: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-test/@DEB_INSTALL_LICENSEFILE@.gz +mysql-@DEB_PRODUCTNAME@-test: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/packaging/deb-in/rules.in b/packaging/deb-in/rules.in index 227c28f46d6b..ad5e8af226b9 100644 --- a/packaging/deb-in/rules.in +++ b/packaging/deb-in/rules.in @@ -15,6 +15,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +ifneq (,$(findstring SYSTEMD,@DEB_STARTUP@)) +CMAKE_SYSTEMD_OPTIONS := -DWITH_SYSTEMD=1 -DSYSTEMD_SERVICE_NAME="@DEB_SYSTEMD_SERVICE_NAME@" +endif + %: dh $@ @@ -26,6 +30,9 @@ override_dh_auto_configure: @echo "RULES.$@" cmake . \ -DBUILD_CONFIG=mysql_release \ + $(CMAKE_SYSTEMD_OPTIONS) \ + -DWITH_WSREP=1 \ + -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp \ -DCMAKE_INSTALL_PREFIX=/usr \ -DINSTALL_DOCDIR=share/mysql/docs \ -DINSTALL_DOCREADMEDIR=share/mysql \ @@ -37,14 +44,13 @@ override_dh_auto_configure: -DINSTALL_MYSQLTESTDIR=lib/mysql-test \ -DINSTALL_PLUGINDIR=lib/mysql/plugin \ -DINSTALL_SBINDIR=sbin \ - -DINSTALL_SCRIPTDIR=bin \ - -DINSTALL_SQLBENCHDIR=lib/mysql \ -DINSTALL_SUPPORTFILESDIR=share/mysql \ -DSYSCONFDIR=/etc/mysql \ -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ -DWITH_SSL=bundled \ -DWITH_INNODB_MEMCACHED=1 \ -DWITH_MECAB=system \ + -DWITH_NUMA=ON \ -DCOMPILATION_COMMENT="MySQL @DEB_PRODUCTNAMEC@ Server (@DEB_LICENSENAME@)" \ -DINSTALL_LAYOUT=DEB \ -DDEB_PRODUCT=@DEB_PRODUCT@ \ @@ -66,20 +72,32 @@ override_dh_auto_install: # complete install first $(MAKE) install DESTDIR=debian/tmp # remove all redundant files - rm debian/tmp/usr/lib/*/*_r* rm debian/tmp/usr/lib/mysql-test/cmake_install.cmake rm debian/tmp/usr/lib/mysql-test/CTestTestfile.cmake rm debian/tmp/usr/lib/mysql-test/Makefile # add missing man pages - install -g root -o root -m 0644 debian/extra/mysql_embedded.1 debian/tmp/usr/share/man/man1 + # install -g root -o root -m 0644 debian/extra/mysql_embedded.1 debian/tmp/usr/share/man/man1 # add MySQL Server debug binary and library to package - install -g root -o root -m 0755 debian/extra/server-binary debian/tmp/usr/sbin/mysqld-debug - install -g root -o root -m 0755 debian/extra/embedded-server debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqld-debug.a + # install -g root -o root -m 0755 debian/extra/server-binary debian/tmp/usr/sbin/mysqld-debug + # install -g root -o root -m 0755 debian/extra/embedded-server debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqld-debug.a # add debug plugin libraries to package + install -m 0644 support-files/wsrep.cnf debian/tmp/usr/share/mysql + # SysV init stuff, or Systemd files ? On Debian 8, we need both! +ifneq (,$(findstring SYSV,@DEB_STARTUP@)) + install -D -m 0755 support-files/mysql.server debian/tmp/etc/init.d/mysql +endif +ifneq (,$(findstring SYSTEMD,@DEB_STARTUP@)) + install -m 0755 scripts/mysqld_bootstrap debian/tmp/usr/bin/ +endif + # This seems to be the only safe place to fix permissions issues + # not handled by dh_fixperms. + # install -m 0755 debian/additions/echo_stderr debian/tmp/usr/share/mysql/ + mkdir -p debian/tmp/etc/mysql + install -m 0755 debian/extra/debian-start debian/tmp/etc/mysql/ + install -m 0755 debian/extra/debian-start.inc.sh debian/tmp/usr/share/mysql/ install -g root -o root -m 0755 -d debian/tmp/usr/lib/mysql/plugin/debug - for file in debian/extra/*-plugin; do NEW=`echo $$file | cut -d- -f1`; mv $$file $$NEW.so; done - install -g root -o root -m 0755 debian/extra/*.so debian/tmp/usr/lib/mysql/plugin/debug - install -g root -o root -m 0755 debian/extra/daemon_example.ini debian/tmp/usr/lib/mysql/plugin/debug + #install -g root -o root -m 0755 debian/extra/*.so debian/tmp/usr/lib/mysql/plugin/debug + #install -g root -o root -m 0755 debian/extra/daemon_example.ini debian/tmp/usr/lib/mysql/plugin/debug # Add helper functions for maintainer scripts install -m 0644 debian/extra/mysql-helpers debian/tmp/usr/share/mysql/ # add apparmor profile @@ -88,58 +106,68 @@ override_dh_auto_install: @DEB_RULES_INSTALL_SYSTEMD@ # add directory for legal docs install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-server - install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-server + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@ install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-client - install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-client - install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-common - install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/libmysqlclient18 + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@ + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@ + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/libmysqlclient20 install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/libmysqlclient-dev - install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/libmysqld-dev - install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-bench + # install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/libmysqld-dev install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-testsuite - install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-test - install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-source + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-test@DEB_PRODUCTSERIES@ + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-source@DEB_PRODUCTSERIES@ + @DEB_NDB_RULES_DOCDIRS@ # add @DEB_INSTALL_LICENSEFILE@ file to each package install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-server/@DEB_INSTALL_LICENSEFILE@ - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-server/@DEB_INSTALL_LICENSEFILE@ + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-client/@DEB_INSTALL_LICENSEFILE@ - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-client/@DEB_INSTALL_LICENSEFILE@ - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-common/@DEB_INSTALL_LICENSEFILE@ - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/libmysqlclient18/@DEB_INSTALL_LICENSEFILE@ + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/libmysqlclient20/@DEB_INSTALL_LICENSEFILE@ install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/libmysqlclient-dev/@DEB_INSTALL_LICENSEFILE@ - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/libmysqld-dev/@DEB_INSTALL_LICENSEFILE@ - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-bench/@DEB_INSTALL_LICENSEFILE@ + # install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/libmysqld-dev/@DEB_INSTALL_LICENSEFILE@ install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-testsuite/@DEB_INSTALL_LICENSEFILE@ - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-test/@DEB_INSTALL_LICENSEFILE@ - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-source/@DEB_INSTALL_LICENSEFILE@ + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-test@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-source@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ + @DEB_NDB_RULES_LICENSE@ # add README file to each package install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-server/README - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-server/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README-wsrep debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@ install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-client/README - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-client/README - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-common/README - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/libmysqlclient18/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/libmysqlclient20/README install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/libmysqlclient-dev/README - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/libmysqld-dev/README - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-bench/README + # install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/libmysqld-dev/README install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-testsuite/README - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-test/README - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-source/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-test@DEB_PRODUCTSERIES@/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-source@DEB_PRODUCTSERIES@/README + @DEB_NDB_RULES_README@ touch $@ + +override_dh_installlogrotate-arch: + dh_installlogrotate --name mysql-server + override_dh_installinit: @echo "RULES.$@" @DEB_RULES_APPARMOR_LOAD@ @DEB_RULES_SYSTEMD_ENABLE@ - dh_installinit --name=mysql -- defaults 19 21 + dh_installinit --no-start --name=mysql -- defaults 19 21 @DEB_RULES_SYSTEMD_START@ touch $@ override_dh_install: - dh_install --list-missing - -Xusr/bin/i_mysql_client_test - -Xusr/share/mysql/mysql.server - -Xusr/share/mysql/COPYING - -Xusr/share/mysql/README - -Xusr/share/mysql/docs/mysql.info + dh_install --list-missing \ + -Xusr/bin/i_mysql_client_test \ + -Xusr/share/mysql/mysql.server \ + -Xusr/share/mysql/@DEB_INSTALL_LICENSEFILE@ \ + -Xusr/share/mysql/README \ + -Xusr/share/mysql/docs/mysql.info \ + -Xusr/share/mysql/docs/INSTALL-BINARY \ -Xusr/share/man/man1/mysqlman.1 +ifneq (,@DEB_RULES_APPARMOR_LOAD@) + # non-empty command = apparmor is handled + dh_apparmor -pmysql-server@DEB_PRODUCTSERIES@ --profile-name=usr.sbin.mysqld +endif diff --git a/packaging/deb-in/source/format b/packaging/deb-in/source/format index 163aaf8d82b6..89ae9db8f88b 100644 --- a/packaging/deb-in/source/format +++ b/packaging/deb-in/source/format @@ -1 +1 @@ -3.0 (quilt) +3.0 (native) diff --git a/packaging/deb-in/source/include-binaries b/packaging/deb-in/source/include-binaries index ca1410153aa5..351ff82a0b3c 100644 --- a/packaging/deb-in/source/include-binaries +++ b/packaging/deb-in/source/include-binaries @@ -14,17 +14,14 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # obscured filename for mysqld-debug, libmysqld-debug.a -debian/extra/server-binary -debian/extra/embedded-server +# debian/extra/server-binary +# debian/extra/embedded-server # obscured filenames for debug plugins debian/extra/adt_null-plugin debian/extra/auth-plugin debian/extra/auth_socket-plugin debian/extra/auth_test_plugin-plugin -debian/extra/component_example_component1-plugin -debian/extra/component_example_component2-plugin -debian/extra/component_example_component3-plugin -debian/extra/connection_control-plugin +debian/extra/group_replication-plugin debian/extra/ha_example-plugin debian/extra/innodb_engine-plugin debian/extra/keyring_file-plugin @@ -65,9 +62,9 @@ debian/extra/rewriter-plugin debian/extra/rewrite_example-plugin debian/extra/semisync_master-plugin debian/extra/semisync_slave-plugin -debian/extra/test_udf_services-plugin debian/extra/test_security_context-plugin -debian/extra/test_services_plugin_registry-plugin +debian/extra/test_udf_services-plugin debian/extra/validate_password-plugin debian/extra/version_token-plugin +debian/extra/connection_control-plugin @DEB_INCLUDE_BINARIES_EXTRA@ From 226527b34a21e923c57d119c2adc174c8a693fc4 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Thu, 11 May 2017 20:33:36 +0300 Subject: [PATCH 181/305] MW-371: packaging Still working on the packaging Remove 5.7-specific files * misc * usr/share/mysql/mysql_sys_schema.sql * mysqlxtest * tests for absent plugins Remove systemd for 5.6 Remove non-5.7 plugins (keyring, mecab, locking service, x proto, rewriter, version token) Status: Builds, but does not pass lintian --- packaging/deb-in/CMakeLists.txt | 57 ++---- packaging/deb-in/changelog.in | 3 +- packaging/deb-in/control.in | 1 + .../deb-in/libmysqlclient-dev.install.in | 1 - packaging/deb-in/libmysqld-dev.install.in | 20 -- .../deb-in/libmysqld-dev.lintian-overrides.in | 19 -- packaging/deb-in/mysql-client.install.in | 18 -- .../deb-in/mysql-client.lintian-overrides.in | 19 -- packaging/deb-in/mysql-common.dirs.in | 16 -- packaging/deb-in/mysql-common.install.in | 25 --- .../deb-in/mysql-common.lintian-overrides.in | 19 -- packaging/deb-in/mysql-common.postinst.in | 25 --- packaging/deb-in/mysql-common.postrm.in | 25 --- ...sql-packagesource-client-SERIES.install.in | 2 - ...esource-client-SERIES.lintian-overrides.in | 8 +- .../mysql-packagesource-client.install.in | 55 ------ ...-packagesource-client.lintian-overrides.in | 21 --- ...esource-common-SERIES.lintian-overrides.in | 6 +- ...ysql-packagesource-common-SERIES.postrm.in | 1 - ...mysql-packagesource-common-SERIES.prerm.in | 1 + ...sql-packagesource-server-SERIES.install.in | 17 +- ...esource-server-SERIES.lintian-overrides.in | 8 +- ...l-packagesource-server-SERIES.templates.in | 10 +- .../mysql-packagesource-server.config.in | 97 ---------- .../deb-in/mysql-packagesource-server.dirs.in | 16 -- .../mysql-packagesource-server.install.in | 103 ----------- ...-packagesource-server.lintian-overrides.in | 23 --- .../mysql-packagesource-server.mysql.init.in | 115 ------------ ...ysql-packagesource-server.mysql.service.in | 34 ---- .../mysql-packagesource-server.postinst.in | 108 ----------- .../mysql-packagesource-server.postrm.in | 172 ------------------ .../mysql-packagesource-server.preinst.in | 91 --------- .../mysql-packagesource-server.prerm.in | 24 --- .../mysql-packagesource-server.templates.in | 35 ---- ...esource-source-SERIES.lintian-overrides.in | 6 +- .../mysql-packagesource-source.install.in | 21 --- ...-packagesource-source.lintian-overrides.in | 19 -- ...mysql-packagesource-test-SERIES.install.in | 42 +---- ...agesource-test-SERIES.lintian-overrides.in | 6 +- packaging/deb-in/rules.in | 20 +- 40 files changed, 66 insertions(+), 1243 deletions(-) delete mode 100644 packaging/deb-in/libmysqld-dev.install.in delete mode 100644 packaging/deb-in/libmysqld-dev.lintian-overrides.in delete mode 100644 packaging/deb-in/mysql-client.install.in delete mode 100644 packaging/deb-in/mysql-client.lintian-overrides.in delete mode 100644 packaging/deb-in/mysql-common.dirs.in delete mode 100644 packaging/deb-in/mysql-common.install.in delete mode 100644 packaging/deb-in/mysql-common.lintian-overrides.in delete mode 100644 packaging/deb-in/mysql-common.postinst.in delete mode 100644 packaging/deb-in/mysql-common.postrm.in delete mode 100644 packaging/deb-in/mysql-packagesource-client.install.in delete mode 100644 packaging/deb-in/mysql-packagesource-client.lintian-overrides.in delete mode 100644 packaging/deb-in/mysql-packagesource-server.config.in delete mode 100644 packaging/deb-in/mysql-packagesource-server.dirs.in delete mode 100644 packaging/deb-in/mysql-packagesource-server.install.in delete mode 100644 packaging/deb-in/mysql-packagesource-server.lintian-overrides.in delete mode 100644 packaging/deb-in/mysql-packagesource-server.mysql.init.in delete mode 100644 packaging/deb-in/mysql-packagesource-server.mysql.service.in delete mode 100644 packaging/deb-in/mysql-packagesource-server.postinst.in delete mode 100644 packaging/deb-in/mysql-packagesource-server.postrm.in delete mode 100644 packaging/deb-in/mysql-packagesource-server.preinst.in delete mode 100644 packaging/deb-in/mysql-packagesource-server.prerm.in delete mode 100644 packaging/deb-in/mysql-packagesource-server.templates.in delete mode 100644 packaging/deb-in/mysql-packagesource-source.install.in delete mode 100644 packaging/deb-in/mysql-packagesource-source.lintian-overrides.in diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index f2ad67f1fc71..7626394eec34 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -89,14 +89,6 @@ SET (DEB_PRODUCTNAME "wsrep") SET (DEB_PRODUCTNAMEC "Wsrep") SET (DEB_PRODUCTSERIES "-5.6") -# For each startup mechanism, files are constant across distro version -SET (FILES_STARTUP_SYSTEMD -" -usr/bin/mysqld_pre_systemd -usr/bin/mysqld_bootstrap -lib/systemd/system/mysql@.service -lib/systemd/system/mysql.service -") SET (FILES_STARTUP_SYSV " etc/init.d/mysql @@ -132,39 +124,33 @@ ELSEIF(DEB_CODENAME STREQUAL "jessie") # using both SysV init and Systemd, but still no Apparmor. SET (DEB_CONTROL_BDEPS "dh-systemd") SET (DEB_INSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/") - SET (DEB_RULES_INSTALL_SYSTEMD - "install -m 0755 debian/extra/mysql-systemd-start debian/tmp/usr/share/mysql/") + SET (DEB_RULES_INSTALL_SYSTEMD "") SET (DEB_RULES_INSTALL_APPARMOR "") SET (DEB_RULES_APPARMOR_LOAD "") - SET (DEB_SYSTEMD_SERVICE_NAME "mysql") - SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --no-enable --name=mysql") - SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade") - SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start") + SET (DEB_SYSTEMD_SERVICE_NAME "") + SET (DEB_RULES_SYSTEMD_ENABLE "") + SET (DEB_RULES_SYSTEMD_START "") + SET (DEB_INSTALL_SERVER_SYSTEMD "") SET (DEB_INSTALL_SERVER_APPARMOR "") - SET (DEB_SERVICE_SERVER_EXECPRE - "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre") - SET (DEB_SERVICE_SERVER_EXECPOST - "ExecStartPost=/usr/share/mysql/mysql-systemd-start post") + SET (DEB_SERVICE_SERVER_EXECPRE "") + SET (DEB_SERVICE_SERVER_EXECPOST "") SET (DEB_INIT_APPARMOR "") # Debian 8 comes with both SysV init and Systemd, # but "scripts/CMakeLists.txt" enforces an either-or. - # SET (DEB_STARTUP "SYSV SYSTEMD") + SET (DEB_STARTUP "SYSV SYSTEMD") # For now, we go with Systemd only. - SET (DEB_STARTUP "SYSTEMD") ELSEIF(DEB_CODENAME STREQUAL "stretch") SET (DEB_PLATFORMRELEASE "debian9") SET (DEB_CONTROL_BDEPS "dh-systemd") SET (DEB_INSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/") - SET (DEB_RULES_INSTALL_SYSTEMD - "install -m 0755 debian/extra/mysql-systemd-start debian/tmp/usr/share/mysql/") + SET (DEB_RULES_INSTALL_SYSTEMD "") SET (DEB_RULES_INSTALL_APPARMOR "") SET (DEB_RULES_APPARMOR_LOAD "") - SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --name=mysql") - SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade") - SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start") + SET (DEB_RULES_SYSTEMD_ENABLE "") + SET (DEB_RULES_SYSTEMD_START "") + SET (DEB_INSTALL_SERVER_SYSTEMD "") SET (DEB_INSTALL_SERVER_APPARMOR "") - SET (DEB_SERVICE_SERVER_EXECPRE - "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre") + SET (DEB_SERVICE_SERVER_EXECPRE "") SET (DEB_INIT_APPARMOR "") ELSEIF(DEB_CODENAME STREQUAL "precise") SET (DEB_PLATFORMRELEASE "ubuntu12.04") @@ -225,21 +211,18 @@ ELSEIF(DEB_CODENAME STREQUAL "xenial") SET (DEB_PLATFORMRELEASE "ubuntu16.04") SET (DEB_CONTROL_BDEPS "dh-apparmor, dh-systemd (>=1.5)") SET (DEB_INSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/") - SET (DEB_RULES_INSTALL_SYSTEMD - "install -m 0755 debian/extra/mysql-systemd-start debian/tmp/usr/share/mysql/") + SET (DEB_RULES_INSTALL_SYSTEMD "") SET (DEB_RULES_INSTALL_APPARMOR "install -g root -o root -m 0644 -D debian/extra/apparmor-profile debian/tmp/etc/apparmor.d/usr.sbin.mysqld") SET (DEB_RULES_APPARMOR_LOAD "dh_apparmor -pmysql-${DEB_PRODUCTNAME}-server --profile-name=usr.sbin.mysqld") - SET (DEB_SYSTEMD_SERVICE_NAME "mysql") - SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --no-enable --name=mysql") - SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade") - SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start") + SET (DEB_SYSTEMD_SERVICE_NAME "") + SET (DEB_RULES_SYSTEMD_ENABLE "") + SET (DEB_RULES_SYSTEMD_START "") + SET (DEB_INSTALL_SERVER_SYSTEMD "") SET (DEB_INSTALL_SERVER_APPARMOR "etc/apparmor.d/usr.sbin.mysqld") - SET (DEB_SERVICE_SERVER_EXECPRE - "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre") - SET (DEB_SERVICE_SERVER_EXECPOST - "ExecStartPost=/usr/share/mysql/mysql-systemd-start post") + SET (DEB_SERVICE_SERVER_EXECPRE "") + SET (DEB_SERVICE_SERVER_EXECPOST "") SET (DEB_INIT_APPARMOR "/lib/apparmor/profile-load usr.sbin.mysqld") SET (DEB_STARTUP "SYSTEMD") ELSEIF(DEB_CODENAME STREQUAL "yakkety") diff --git a/packaging/deb-in/changelog.in b/packaging/deb-in/changelog.in index b4f8c6fca8c4..a22d9da5657b 100644 --- a/packaging/deb-in/changelog.in +++ b/packaging/deb-in/changelog.in @@ -5,7 +5,8 @@ mysql-@DEB_PRODUCTNAME@@DEB_PRODUCTSERIES@ (@DEB_SERVERVERSION@@DEB_PLATFORMRELE ("packaging/deb-in/" from Oracle's 5.7.14, adapted to Codership's "mysql-wsrep" needs, SysV init files replaced by systemd files) - with 5.7.15, to support both 16.04 LTS "Xenial Xerus" and 14.04 LTS "Trusty Tahr". + with 5.7.15, to support both 16.04 LTS "Xenial Xerus" and 14.04 LTS + "Trusty Tahr". * Update to 5.6.36 upstream release -- Jörg Brühe Tue, 01 Nov 2016 09:45:42 +0100 diff --git a/packaging/deb-in/control.in b/packaging/deb-in/control.in index ef1db7125e8a..1ca99bb7a649 100644 --- a/packaging/deb-in/control.in +++ b/packaging/deb-in/control.in @@ -16,6 +16,7 @@ Build-Depends: bison, perl, po-debconf, psmisc, + quilt, zlib1g-dev (>= 1:1.1.3-5), @DEB_CONTROL_BDEPS@ diff --git a/packaging/deb-in/libmysqlclient-dev.install.in b/packaging/deb-in/libmysqlclient-dev.install.in index 62256274f8a6..bee63636f363 100644 --- a/packaging/deb-in/libmysqlclient-dev.install.in +++ b/packaging/deb-in/libmysqlclient-dev.install.in @@ -21,7 +21,6 @@ usr/include/mysql/mysql/psi/*.h usr/lib/*/libmysqlclient.a usr/lib/*/libmysqlclient.so usr/lib/*/libmysqlservices.a -usr/lib/*/pkgconfig/mysqlclient.pc usr/share/aclocal/mysql.m4 usr/share/man/man1/mysql_config.1 # legal diff --git a/packaging/deb-in/libmysqld-dev.install.in b/packaging/deb-in/libmysqld-dev.install.in deleted file mode 100644 index 2e5065fbe4e2..000000000000 --- a/packaging/deb-in/libmysqld-dev.install.in +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -usr/lib/*/libmysqld.a -usr/lib/*/libmysqld-debug.a -# legal -usr/share/doc/libmysqld-dev/@DEB_INSTALL_LICENSEFILE@ -usr/share/doc/libmysqld-dev/README diff --git a/packaging/deb-in/libmysqld-dev.lintian-overrides.in b/packaging/deb-in/libmysqld-dev.lintian-overrides.in deleted file mode 100644 index 557a62ec69af..000000000000 --- a/packaging/deb-in/libmysqld-dev.lintian-overrides.in +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# Additional license file is needed so overriding this warning -libmysqld-dev: extra-license-file usr/share/doc/libmysqld-dev/LICENSE.mysql -libmysqld-dev: extra-license-file usr/share/doc/libmysqld-dev/@DEB_INSTALL_LICENSEFILE@.gz -libmysqld-dev: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/packaging/deb-in/mysql-client.install.in b/packaging/deb-in/mysql-client.install.in deleted file mode 100644 index 26ae1bf1c9b9..000000000000 --- a/packaging/deb-in/mysql-client.install.in +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# legal -usr/share/doc/mysql-client/@DEB_INSTALL_LICENSEFILE@ -usr/share/doc/mysql-client/README diff --git a/packaging/deb-in/mysql-client.lintian-overrides.in b/packaging/deb-in/mysql-client.lintian-overrides.in deleted file mode 100644 index 2e2b13e56a42..000000000000 --- a/packaging/deb-in/mysql-client.lintian-overrides.in +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# Additional license file is needed so overriding this warning -mysql-client: extra-license-file usr/share/doc/mysql-client/LICENSE.mysql -mysql-client: extra-license-file usr/share/doc/mysql-client/@DEB_INSTALL_LICENSEFILE@.gz -mysql-client: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/packaging/deb-in/mysql-common.dirs.in b/packaging/deb-in/mysql-common.dirs.in deleted file mode 100644 index b5b8280db1f3..000000000000 --- a/packaging/deb-in/mysql-common.dirs.in +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -etc/mysql/conf.d diff --git a/packaging/deb-in/mysql-common.install.in b/packaging/deb-in/mysql-common.install.in deleted file mode 100644 index c8d8e9e3cff2..000000000000 --- a/packaging/deb-in/mysql-common.install.in +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# configuration file and script -debian/extra/conf.d etc/mysql/ -debian/extra/my.cnf.fallback etc/mysql/ - -usr/share/mysql/docs/ChangeLog -usr/share/mysql/docs/INFO_SRC -usr/share/mysql/docs/INFO_BIN -# legal -usr/share/doc/mysql-common/@DEB_INSTALL_LICENSEFILE@ -usr/share/doc/mysql-common/README diff --git a/packaging/deb-in/mysql-common.lintian-overrides.in b/packaging/deb-in/mysql-common.lintian-overrides.in deleted file mode 100644 index f0bee937f2bd..000000000000 --- a/packaging/deb-in/mysql-common.lintian-overrides.in +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# Additional license file is needed so overriding this warning -mysql-common: extra-license-file usr/share/doc/mysql-common/LICENSE.mysql -mysql-common: extra-license-file usr/share/doc/mysql-common/@DEB_INSTALL_LICENSEFILE@.gz -mysql-common: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/packaging/deb-in/mysql-common.postinst.in b/packaging/deb-in/mysql-common.postinst.in deleted file mode 100644 index 3bf56a5d3c1c..000000000000 --- a/packaging/deb-in/mysql-common.postinst.in +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -set -e - -if [ "$1" = "configure" ]; then - # Low priority fallback for client use when no server is installed. - update-alternatives --install /etc/mysql/my.cnf my.cnf /etc/mysql/my.cnf.fallback 100 -fi - -#DEBHELPER# diff --git a/packaging/deb-in/mysql-common.postrm.in b/packaging/deb-in/mysql-common.postrm.in deleted file mode 100644 index f79a243935de..000000000000 --- a/packaging/deb-in/mysql-common.postrm.in +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -set -e - -if [ "$1" = "purge" ]; then - rmdir /etc/mysql 2>/dev/null || true - update-alternatives --remove-all my.cnf -fi - -#DEBHELPER# diff --git a/packaging/deb-in/mysql-packagesource-client-SERIES.install.in b/packaging/deb-in/mysql-packagesource-client-SERIES.install.in index cfe33ee54074..45d673029ace 100644 --- a/packaging/deb-in/mysql-packagesource-client-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-client-SERIES.install.in @@ -1,13 +1,11 @@ # this executable reprsent the embedded mysql server client debian/additions/innotop/innotop usr/bin/ debian/additions/mysqlreport usr/bin/ -usr/bin/innochecksum usr/bin/myisam_ftdump usr/bin/mysql usr/bin/mysql_config_editor usr/bin/mysql_find_rows usr/bin/mysql_fix_extensions -usr/bin/mysql_plugin usr/bin/mysql_waitpid usr/bin/mysqlaccess usr/bin/mysqladmin diff --git a/packaging/deb-in/mysql-packagesource-client-SERIES.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-client-SERIES.lintian-overrides.in index 316d861d1bfc..1b36d50d7717 100644 --- a/packaging/deb-in/mysql-packagesource-client-SERIES.lintian-overrides.in +++ b/packaging/deb-in/mysql-packagesource-client-SERIES.lintian-overrides.in @@ -14,8 +14,8 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Additional license file is needed so overriding this warning -mysql-@DEB_PRODUCTNAME@-client: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-client/LICENSE.mysql -mysql-@DEB_PRODUCTNAME@-client: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-clienti/@DEB_INSTALL_LICENSEFILE@.gz -mysql-@DEB_PRODUCTNAME@-client: copyright-should-refer-to-common-license-file-for-lgpl +mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@/LICENSE.mysql +mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@.gz +mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@: copyright-should-refer-to-common-license-file-for-lgpl # Due to static linking this cannot be avoided and hence being overridden -mysql-@DEB_PRODUCTNAME@-client: embedded-library +mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@: embedded-library diff --git a/packaging/deb-in/mysql-packagesource-client.install.in b/packaging/deb-in/mysql-packagesource-client.install.in deleted file mode 100644 index 5c42fd7d42de..000000000000 --- a/packaging/deb-in/mysql-packagesource-client.install.in +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# binaries -usr/bin/myisam_ftdump -usr/bin/mysql -usr/bin/mysql_config_editor -usr/bin/mysql_embedded -usr/bin/mysql_find_rows -usr/bin/mysql_fix_extensions -usr/bin/mysql_plugin -usr/bin/mysql_waitpid -usr/bin/mysqlaccess -usr/bin/mysqlaccess.conf -usr/bin/mysqladmin -usr/bin/mysqlbug -usr/bin/mysqlcheck -usr/bin/mysqldump -usr/bin/mysqldumpslow -usr/bin/mysqlimport -usr/bin/mysqlshow -usr/bin/mysqlslap -# charsets -usr/share/mysql/charsets/*.xml -usr/share/mysql/charsets/README -# man pages -usr/share/man/man1/myisam_ftdump.1 -usr/share/man/man1/mysql.1 -usr/share/man/man1/mysql_config_editor.1 -usr/share/man/man1/mysql_embedded.1 -usr/share/man/man1/mysql_plugin.1 -usr/share/man/man1/mysqlaccess.1 -usr/share/man/man1/mysqladmin.1 -usr/share/man/man1/mysqlcheck.1 -usr/share/man/man1/mysqldump.1 -usr/share/man/man1/mysqldumpslow.1 -usr/share/man/man1/mysqlimport.1 -usr/share/man/man1/mysqlman.1 -usr/share/man/man1/mysqlshow.1 -usr/share/man/man1/mysqlslap.1 -# legal -usr/share/doc/mysql-@DEB_PRODUCTNAME@-client/@DEB_INSTALL_LICENSEFILE@ -usr/share/doc/mysql-@DEB_PRODUCTNAME@-client/README diff --git a/packaging/deb-in/mysql-packagesource-client.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-client.lintian-overrides.in deleted file mode 100644 index cbdada715d59..000000000000 --- a/packaging/deb-in/mysql-packagesource-client.lintian-overrides.in +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# Additional license file is needed so overriding this warning -mysql-@DEB_PRODUCTNAME@-client: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-client/LICENSE.mysql -mysql-@DEB_PRODUCTNAME@-client: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-client/@DEB_INSTALL_LICENSEFILE@.gz -mysql-@DEB_PRODUCTNAME@-client: copyright-should-refer-to-common-license-file-for-lgpl -# Due to static linking this cannot be avoided and hence being overridden -mysql-@DEB_PRODUCTNAME@-client: embedded-library diff --git a/packaging/deb-in/mysql-packagesource-common-SERIES.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-common-SERIES.lintian-overrides.in index f0bee937f2bd..85bf33a0c491 100644 --- a/packaging/deb-in/mysql-packagesource-common-SERIES.lintian-overrides.in +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.lintian-overrides.in @@ -14,6 +14,6 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Additional license file is needed so overriding this warning -mysql-common: extra-license-file usr/share/doc/mysql-common/LICENSE.mysql -mysql-common: extra-license-file usr/share/doc/mysql-common/@DEB_INSTALL_LICENSEFILE@.gz -mysql-common: copyright-should-refer-to-common-license-file-for-lgpl +mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@/LICENSE.mysql +mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@.gz +mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in b/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in index 24222fbd0a09..9a5bc27903cf 100644 --- a/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in @@ -18,7 +18,6 @@ set -e if [ "$1" = "purge" ]; then - update-alternatives --remove my.cnf /etc/mysql/my.cnf.migrated rm -f /etc/mysql/my.cnf.migrated # created by mysql-common from our obsolete conffile my.cnf rm -f /etc/mysql/my.cnf.old # created by mariadb-common from our obsolete conffile my.cnf rmdir /etc/mysql 2>/dev/null || true diff --git a/packaging/deb-in/mysql-packagesource-common-SERIES.prerm.in b/packaging/deb-in/mysql-packagesource-common-SERIES.prerm.in index 5716ecfcb92c..c7f9af431f7c 100644 --- a/packaging/deb-in/mysql-packagesource-common-SERIES.prerm.in +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.prerm.in @@ -3,6 +3,7 @@ set -e if [ "$1" = "remove" ]; then update-alternatives --remove my.cnf /etc/mysql/my.cnf.fallback + update-alternatives --remove my.cnf /etc/mysql/my.cnf.migrated fi #DEBHELPER# diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in index 1358ed83a022..a651464a47ea 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -21,15 +21,13 @@ debian/extra/mysql.cnf etc/mysql/ etc/mysql/debian-start # binaries usr/bin/innochecksum -usr/bin/lz4_decompress usr/lib/mysql/ usr/bin/myisamchk usr/bin/myisamlog usr/bin/myisampack usr/bin/my_print_defaults -usr/bin/mysql_install_db +usr/scripts/mysql_install_db usr/bin/ usr/bin/mysql_plugin usr/bin/mysql_secure_installation -usr/bin/mysql_ssl_rsa_setup usr/bin/mysql_tzinfo_to_sql usr/bin/mysql_upgrade usr/bin/mysqlbinlog @@ -42,31 +40,23 @@ usr/bin/wsrep_sst_mysqldump usr/bin/wsrep_sst_rsync usr/bin/wsrep_sst_xtrabackup usr/bin/wsrep_sst_xtrabackup-v2 -usr/bin/zlib_decompress usr/lib/mysql/ # plugins usr/lib/mysql/plugin/adt_null.so usr/lib/mysql/plugin/auth_socket.so usr/lib/mysql/plugin/innodb_engine.so -usr/lib/mysql/plugin/keyring_file.so -usr/lib/mysql/plugin/keyring_udf.so usr/lib/mysql/plugin/libmemcached.so -usr/lib/mysql/plugin/libpluginmecab.so -usr/lib/mysql/plugin/locking_service.so usr/lib/mysql/plugin/mypluglib.so usr/lib/mysql/plugin/mysql_no_login.so usr/lib/mysql/plugin/mysqlx.so -usr/lib/mysql/plugin/rewriter.so usr/lib/mysql/plugin/semisync_master.so usr/lib/mysql/plugin/semisync_slave.so usr/lib/mysql/plugin/validate_password.so -usr/lib/mysql/plugin/version_token.so @DEB_INSTALL_SERVER_PLUGINS@ # server usr/sbin/mysqld # man pages usr/share/man/man1/innochecksum.1 usr/share/man/man1/comp_err.1 -usr/share/man/man1/lz4_decompress.1 usr/share/man/man1/myisamchk.1 usr/share/man/man1/myisamlog.1 usr/share/man/man1/myisampack.1 @@ -76,7 +66,6 @@ usr/share/man/man1/mysql-stress-test.pl.1 usr/share/man/man1/mysql_install_db.1 usr/share/man/man1/mysql_plugin.1 usr/share/man/man1/mysql_secure_installation.1 -usr/share/man/man1/mysql_ssl_rsa_setup.1 usr/share/man/man1/mysql_tzinfo_to_sql.1 usr/share/man/man1/mysql_upgrade.1 usr/share/man/man1/mysqlbinlog.1 @@ -84,7 +73,6 @@ usr/share/man/man1/perror.1 usr/share/man/man1/replace.1 usr/share/man/man1/resolveip.1 usr/share/man/man1/resolve_stack_dump.1 -usr/share/man/man1/zlib_decompress.1 usr/share/man/man8/mysqld.8 # confguration files debian/extra/mysql.cnf etc/mysql/ @@ -102,15 +90,12 @@ usr/share/mysql/dictionary.txt # usr/share/mysql/echo_stderr usr/share/mysql/fill_help_tables.sql usr/share/mysql/innodb_memcached_config.sql -usr/share/mysql/install_rewriter.sql usr/share/mysql/magic usr/share/mysql/mysql-log-rotate usr/share/mysql/mysql_security_commands.sql -usr/share/mysql/mysql_sys_schema.sql usr/share/mysql/mysql_system_tables.sql usr/share/mysql/mysql_system_tables_data.sql usr/share/mysql/mysql_test_data_timezone.sql -usr/share/mysql/uninstall_rewriter.sql usr/share/mysql/wsrep.cnf usr/share/mysql/wsrep_notify usr/share/mysql/mysql-helpers diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-server-SERIES.lintian-overrides.in index 45485facc455..193e4692fe41 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.lintian-overrides.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.lintian-overrides.in @@ -14,6 +14,8 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Additional license file is needed so overriding this warning -mysql-@DEB_PRODUCTNAME@-server: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-server/LICENSE.mysql -mysql-@DEB_PRODUCTNAME@-server: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-server/@DEB_INSTALL_LICENSEFILE@.gz -mysql-@DEB_PRODUCTNAME@-server: copyright-should-refer-to-common-license-file-for-lgpl +mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/LICENSE.mysql +mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@.gz +mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@: copyright-should-refer-to-common-license-file-for-lgpl +mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@: embedded-library + diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.templates.in b/packaging/deb-in/mysql-packagesource-server-SERIES.templates.in index 8a8793bcd35d..bdf6b0b4975b 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.templates.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.templates.in @@ -1,23 +1,23 @@ Template: mysql-@DEB_PRODUCTNAME@-server/root-pass Type: password -Description: Enter root password: +_Description: Enter root password: Please provide a strong password that will be set for the root account of your MySQL database. Leave it blank to enable password less login using UNIX socket based authentication. Template: mysql-@DEB_PRODUCTNAME@-server/re-root-pass Type: password -Description: Re-enter root password: +_Description: Re-enter root password: Now that you have selected a password for the root account, please confirm by typing it again. Do not share the password with anyone. Template: mysql-@DEB_PRODUCTNAME@-server/root-pass-mismatch Type: error -Description: The two passwords did not match +_Description: The two passwords did not match Please try again. Make sure you type the exact same password twice. Template: mysql-@DEB_PRODUCTNAME@-server/remove-data-dir Type: boolean Default: false -Description: Remove data directories ? +_Description: Remove data directories ? This operation will remove the data directory at '/var/lib/mysql' that stores all the databases, tables and related meta-data. Additionally, any import or export files stored at '/var/lib/mysql-files' will be removed along with directory, as well as the contents of /var/lib/mysql-keyring. @@ -25,7 +25,7 @@ Description: Remove data directories ? Template: mysql-@DEB_PRODUCTNAME@-server/data-dir Type: note -Description: Data directory found when no MySQL server package is installed +_Description: Data directory found when no MySQL server package is installed A data directory '/var/lib/mysql' is present on this system when no MySQL server package is currently installed on the system. The directory may be under control of server package received from third-party vendors. It may also be an unclaimed data diff --git a/packaging/deb-in/mysql-packagesource-server.config.in b/packaging/deb-in/mysql-packagesource-server.config.in deleted file mode 100644 index 4e801c93be45..000000000000 --- a/packaging/deb-in/mysql-packagesource-server.config.in +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -. /usr/share/debconf/confmodule - -get_root_pass(){ - while :; do - PASSWD="" - db_input high mysql-@DEB_PRODUCTNAME@-server/root-pass || true - db_go - - db_get mysql-@DEB_PRODUCTNAME@-server/root-pass - if [ -z "${RET}" ]; - then - db_fset mysql-@DEB_PRODUCTNAME@-server/root-pass seen true - db_fset mysql-@DEB_PRODUCTNAME@-server/re-root-pass seen true - break - fi - PASSWD="${RET}" - - db_input high mysql-@DEB_PRODUCTNAME@-server/re-root-pass || true - db_go - - db_get mysql-@DEB_PRODUCTNAME@-server/re-root-pass - if [ "${RET}" == "${PASSWD}" ]; - then - PASSWD="" - break - fi - - db_fset mysql-@DEB_PRODUCTNAME@-server/root-pass-mismatch seen false - db_input critical mysql-@DEB_PRODUCTNAME@-server/root-pass-mismatch - db_set mysql-@DEB_PRODUCTNAME@-server/root-pass "" - db_set mysql-@DEB_PRODUCTNAME@-server/re-root-pass "" - done -} -if [ "$1" = "configure" ] && [ -z "$2" ]; -then - - set -e - - PKG_LIST=mysql-server-5.5:mysql-server-5.6:mysql-server-5.7:mysql-community-server:mysql-commercial-server - INSTALLED_PKG=none - MYSQLDATA=/var/lib/mysql - - IFS_BACKUP=${IFS} - IFS=":" - for PKG in ${PKG_LIST}; - do - STATUS=$(dpkg -s ${PKG} 2> /dev/null | grep Status: | cut -d' ' -f4) - if [ "${STATUS}" = "installed" ]; - then - INSTALLED_PKG=${PKG} - break - fi - done - IFS=${IFS_BACKUP} - - if [ "${INSTALLED_PKG}" = "none" ]; - then - if [ -d ${MYSQLDATA} -o -L ${MYSQLDATA} ]; - then - db_input high mysql-@DEB_PRODUCTNAME@-server/data-dir || true - else - db_fset mysql-@DEB_PRODUCTNAME@-server/data-dir seen true - fi - - get_root_pass - - else - db_fset mysql-@DEB_PRODUCTNAME@-server/data-dir seen true - # If datadir is missing, ask for root password even with existing packages - if [ ! -d ${MYSQLDATA} -a ! -L ${MYSQLDATA} ]; - then - get_root_pass - else - db_fset mysql-@DEB_PRODUCTNAME@-server/root-pass seen true - db_fset mysql-@DEB_PRODUCTNAME@-server/re-root-pass seen true - fi - fi - - set +e -fi diff --git a/packaging/deb-in/mysql-packagesource-server.dirs.in b/packaging/deb-in/mysql-packagesource-server.dirs.in deleted file mode 100644 index de6a09f8bc52..000000000000 --- a/packaging/deb-in/mysql-packagesource-server.dirs.in +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -etc/mysql/mysql.conf.d diff --git a/packaging/deb-in/mysql-packagesource-server.install.in b/packaging/deb-in/mysql-packagesource-server.install.in deleted file mode 100644 index a3ffa63d258c..000000000000 --- a/packaging/deb-in/mysql-packagesource-server.install.in +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# binaries -usr/bin/innochecksum -usr/bin/msql2mysql -usr/bin/myisamchk -usr/bin/myisamlog -usr/bin/myisampack -usr/bin/my_print_defaults -usr/bin/mysql_convert_table_format -usr/bin/mysql_install_db -usr/bin/mysql_secure_installation -@DEB_PLUGIN_SETPERMISSION@ -usr/bin/mysql_tzinfo_to_sql -usr/bin/mysql_upgrade -usr/bin/mysql_zap -usr/bin/mysqld_multi -usr/bin/mysqld_safe -usr/bin/mysqlbinlog -usr/bin/mysqlhotcopy -usr/bin/perror -usr/bin/replace -usr/bin/resolveip -usr/bin/resolve_stack_dump -usr/sbin/mysqld -# debug binary -usr/sbin/mysqld-debug -# man pages -usr/share/man/man1/innochecksum.1 -usr/share/man/man1/comp_err.1 -usr/share/man/man1/myisamchk.1 -usr/share/man/man1/myisamlog.1 -usr/share/man/man1/myisampack.1 -usr/share/man/man1/my_print_defaults.1 -usr/share/man/man1/mysql.server.1 -usr/share/man/man1/mysql-stress-test.pl.1 -usr/share/man/man1/mysql_secure_installation.1 -usr/share/man/man1/mysql_tzinfo_to_sql.1 -usr/share/man/man1/mysql_upgrade.1 -usr/share/man/man1/mysqlbinlog.1 -usr/share/man/man1/mysqld_multi.1 -usr/share/man/man1/mysqld_safe.1 -usr/share/man/man1/perror.1 -usr/share/man/man1/replace.1 -usr/share/man/man1/resolveip.1 -usr/share/man/man1/resolve_stack_dump.1 -usr/share/man/man8/mysqld.8 -# confguration files -usr/share/mysql/my-default.cnf -debian/extra/mysql.cnf etc/mysql/ -debian/extra/mysqld.cnf /etc/mysql/mysql.conf.d/ -# app armor profile -@DEB_INSTALL_SERVER_APPARMOR@ -# SQL files -usr/share/mysql/*.sql -# plugins -usr/lib/mysql/plugin/adt_null.so -usr/lib/mysql/plugin/auth_socket.so -usr/lib/mysql/plugin/connection_control.so -usr/lib/mysql/plugin/innodb_engine.so -usr/lib/mysql/plugin/libmemcached.so -usr/lib/mysql/plugin/mypluglib.so -usr/lib/mysql/plugin/mysql_no_login.so -usr/lib/mysql/plugin/semisync_master.so -usr/lib/mysql/plugin/semisync_slave.so -usr/lib/mysql/plugin/validate_password.so -usr/lib/mysql/plugin/debug/adt_null.so -usr/lib/mysql/plugin/debug/auth_socket.so -usr/lib/mysql/plugin/debug/connection_control.so -usr/lib/mysql/plugin/debug/innodb_engine.so -usr/lib/mysql/plugin/debug/libmemcached.so -usr/lib/mysql/plugin/debug/mypluglib.so -usr/lib/mysql/plugin/debug/mysql_no_login.so -usr/lib/mysql/plugin/debug/semisync_master.so -usr/lib/mysql/plugin/debug/semisync_slave.so -usr/lib/mysql/plugin/debug/validate_password.so -@DEB_INSTALL_SERVER_PLUGINS@ -# support files -usr/share/mysql/dictionary.txt -usr/share/mysql/magic -usr/share/mysql/mysql-log-rotate -usr/share/mysql/mysql-helpers -# localized error msgs -usr/share/mysql/*/errmsg.sys -usr/share/mysql/errmsg-utf8.txt -@DEB_INSTALL_SERVER_SYSTEMD@ -usr/share/mysql/mysqld_multi.server -# legal -usr/share/doc/mysql-@DEB_PRODUCTNAME@-server/@DEB_INSTALL_LICENSEFILE@ -usr/share/doc/mysql-@DEB_PRODUCTNAME@-server/README diff --git a/packaging/deb-in/mysql-packagesource-server.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-server.lintian-overrides.in deleted file mode 100644 index 0b321156e99f..000000000000 --- a/packaging/deb-in/mysql-packagesource-server.lintian-overrides.in +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# Additional license file is needed so overriding this warning -mysql-@DEB_PRODUCTNAME@-server: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-server/LICENSE.mysql -mysql-@DEB_PRODUCTNAME@-server: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-server/@DEB_INSTALL_LICENSEFILE@.gz -mysql-@DEB_PRODUCTNAME@-server: copyright-should-refer-to-common-license-file-for-lgpl -# Due to static linking this cannot be avoided and hence being overridden -mysql-@DEB_PRODUCTNAME@-server: embedded-library -# Since we ship debug plugins so this error is overridden -mysql-@DEB_PRODUCTNAME@-server: unstripped-binary-or-object usr/lib/mysql/plugin/debug/* diff --git a/packaging/deb-in/mysql-packagesource-server.mysql.init.in b/packaging/deb-in/mysql-packagesource-server.mysql.init.in deleted file mode 100644 index 0ebb7aead662..000000000000 --- a/packaging/deb-in/mysql-packagesource-server.mysql.init.in +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/bash -# -### BEGIN INIT INFO -# Provides: mysql -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Should-Start: $network $time -# Should-Stop: $network $time -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start/ Stop MySQL @DEB_PRODUCTNAMEC@ Server daemon -# Description: This service script facilitates startup and shutdown of -# mysqld daemon throught its wrapper script mysqld_safe -### END INIT INFO -# - -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -. /lib/lsb/init-functions -. /usr/share/mysql/mysql-helpers -cd / -umask 077 - -# In case server is taking more to start or stop increase the timeout here -STARTTIMEOUT=180 -STOPTIMEOUT=60 - -# We need to check that the binaries exist; When upgrading from community to commercial this -# script will be run after community is removed but before commercial is installed -VERSION="unknown" -if pathfind mysqld; then - VERSION=$(mysqld --version | grep mysqld | cut -d' ' -f4) -fi - -MYSQLRUN=/var/run/mysqld -MYSQLDATA=$(get_mysql_option mysqld datadir "/var/lib/mysql") -MYSQLFILES=/var/lib/mysql-files -MYSQLKEYRING=/var/lib/mysql-keyring -MYSQLLOG=/var/log/mysql - -case "$1" in - 'start') - if [ "$(get_running)" -eq 1 ]; - then - log_action_msg "A MySQL Server is already started" - else - verify_ready - verify_database - - @DEB_INIT_APPARMOR@ - - su - mysql -s /bin/bash -c "mysqld_safe > /dev/null &" - verify_server start - if [ "$?" -eq 0 ]; - then - log_action_msg "MySQL @DEB_PRODUCTNAMEC@ Server ${VERSION} is started" - else - log_action_msg "MySQL @DEB_PRODUCTNAMEC@ Server ${VERSION} did not start. Please check logs for more details." - fi - fi - ;; - - 'stop') - if [ "$(get_running)" -eq 1 ]; - then - killall -u mysql - verify_server stop - if [ "$?" -eq 0 ]; - then - log_action_msg "MySQL @DEB_PRODUCTNAMEC@ Server ${VERSION} is stopped" - else - log_action_msg "Attempt to shutdown MySQL @DEB_PRODUCTNAMEC@ Server ${VERSION} timed out" - fi - else - log_action_msg "MySQL @DEB_PRODUCTNAMEC@ Server ${VERSION} is already stopped" - fi - ;; - - 'restart'|'reload'|'force-reload') - log_action_msg "Stopping MySQL @DEB_PRODUCTNAMEC@ Server ${VERSION}" - $0 stop - log_action_msg "Re-starting MySQL @DEB_PRODUCTNAMEC@ Server ${VERSION}" - $0 start - ;; - - 'status') - if [ "$(get_running)" -eq 1 ]; - then - log_action_msg "MySQL @DEB_PRODUCTNAMEC@ Server ${VERSION} is running" - else - log_action_msg "MySQL @DEB_PRODUCTNAMEC@ Server ${VERSION} is not running" - exit 3 - fi - ;; - - *) - echo "Usage: $SELF start|stop|restart|reload|force-reload|status" - exit 1 - ;; -esac - -exit 0 diff --git a/packaging/deb-in/mysql-packagesource-server.mysql.service.in b/packaging/deb-in/mysql-packagesource-server.mysql.service.in deleted file mode 100644 index 241e458cfe07..000000000000 --- a/packaging/deb-in/mysql-packagesource-server.mysql.service.in +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# MySQL systemd service file - -[Unit] -Description=MySQL @DEB_PRODUCTNAMEC@ Server -After=network.target - -[Install] -WantedBy=multi-user.target - -[Service] -User=mysql -Group=mysql -PermissionsStartOnly=true -@DEB_SERVICE_SERVER_EXECPRE@ -ExecStart=/usr/bin/mysqld_safe -ExecStartPost=/usr/share/mysql/mysql-systemd-start post -TimeoutSec=600 -LimitNOFILE = 5000 -Restart=on-failure diff --git a/packaging/deb-in/mysql-packagesource-server.postinst.in b/packaging/deb-in/mysql-packagesource-server.postinst.in deleted file mode 100644 index cd1379a01256..000000000000 --- a/packaging/deb-in/mysql-packagesource-server.postinst.in +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -. /usr/share/debconf/confmodule -. /usr/share/mysql/mysql-helpers -take_upstart_job_backup () { - if [ -e "/etc/init/mysql.conf" ] && [ -d "/var/lib/mysql" ]; - then - mv /etc/init/mysql.conf /var/lib/mysql/.mysql.conf.backup - fi -} - -# Choose the proper mechanism. Ubuntu 16.04 uses systemd but still provides invoke-rc.d, -# so the existence of systemd must be checked first. -invoke() { - if pathfind systemctl; then - systemctl $1 "@DEB_SYSTEMD_SERVICE_NAME@" - elif pathfind invoke-rc.d; then - invoke-rc.d mysql $1 - else - /etc/init.d/mysql $1 - fi -} - -case "$1" in - configure) - - if [ -z "$2" ]; - then - - set -e - # If the existing config file is a proper file, we back it up - if [ -f "/etc/mysql/my.cnf" ] && [ ! -L "/etc/mysql/my.cnf" ]; then - cp /etc/mysql/my.cnf /etc/mysql/my.cnf.bak - fi - update-alternatives --force --install /etc/mysql/my.cnf my.cnf "/etc/mysql/mysql.cnf" 200 - - verify_ready - MYSQLDATA=/var/lib/mysql - MYSQLFILES=/var/lib/mysql-files - if aa-status --enabled 2>/dev/null; then - apparmor_parser -r -T -W /etc/apparmor.d/usr.sbin.mysqld 2>/dev/null || true - fi - if [ ! "$(ls -A ${MYSQLDATA})" ] && [ -d ${MYSQLFILES} ]; - then - db_get mysql-@DEB_PRODUCTNAME@-server/root-pass && PASSWD=${RET} - db_set mysql-@DEB_PRODUCTNAME@-server/root-pass "" - db_set mysql-@DEB_PRODUCTNAME@-server/re-root-pass "" - SQL=$(mktemp -u ${MYSQLFILES}/XXXXXXXXXX) - install /dev/null -m0600 -omysql -gmysql "${SQL}" - if [ ! -z "${PASSWD}" ]; - then - PASSWD=$(printf %q "${PASSWD}") - cat << EOF > ${SQL} -USE mysql; -ALTER user 'root'@'localhost' IDENTIFIED BY '${PASSWD}'; -SHUTDOWN; -EOF - PASSWD="" - else - cat << EOF > ${SQL} -USE mysql; -INSTALL PLUGIN auth_socket SONAME 'auth_socket.so'; -ALTER USER 'root'@'localhost' IDENTIFIED WITH 'auth_socket'; -SHUTDOWN; -EOF - fi - mysqld --initialize-insecure --user=mysql > /dev/null - run_init_sql "$SQL" - rm -f "$SQL" - fi - - set +e - - fi - - ;; - - abort-upgrade|abort-remove|abort-configure) - - ;; - - *) - exit 1 - ;; -esac - -db_stop - -take_upstart_job_backup - -#DEBHELPER# - -exit 0 diff --git a/packaging/deb-in/mysql-packagesource-server.postrm.in b/packaging/deb-in/mysql-packagesource-server.postrm.in deleted file mode 100644 index 77a2dfbb2e90..000000000000 --- a/packaging/deb-in/mysql-packagesource-server.postrm.in +++ /dev/null @@ -1,172 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; -then -. /usr/share/debconf/confmodule -fi - -place_upstart_job_back () { - if [ -e "/var/lib/mysql/.mysql.conf.backup" ]; - then - mv /var/lib/mysql/.mysql.conf.backup /etc/init/mysql.conf - fi -} - -get_pcount () { - PSCOUNT=$(ps -ef | grep "/usr/sbin/mysqld" | wc -l) - echo "${PSCOUNT}" -} - -server_stop () { - PSCOUNT=$(get_pcount) - COUNT=0 - while :; do - COUNT=$(( COUNT+1 )) - echo -n . - if [ "${PSCOUNT}" -eq 1 ]; - then - echo - break - fi - if [ "${COUNT}" -gt 15 ]; - then - echo - return 1 - fi - PSCOUNT=$(get_pcount) - sleep 1 - done - return 0 -} - -case "$1" in - remove) - - set -e - - place_upstart_job_back - update-alternatives --remove my.cnf "/etc/mysql/mysql.cnf" - - set +e - - ;; - - purge) - - set -e - - place_upstart_job_back - - MYSQLDATA=/var/lib/mysql - MYSQLFILES=/var/lib/mysql-files - MYSQLKEYRING=/var/lib/mysql-keyring - MYSQLLOG=/var/log/mysql - MYSQLRUN=/var/run/mysqld - - server_stop - - db_input high mysql-@DEB_PRODUCTNAME@-server/remove-data-dir || true - db_go - db_get mysql-@DEB_PRODUCTNAME@-server/remove-data-dir && RMDATADIR=${RET} - if [ "${RMDATADIR}" = "true" ]; - then - if [ -d ${MYSQLRUN} ] || [ -L ${MYSQLRUN} ]; - then - rm -rf ${MYSQLRUN} - fi - - if [ -d ${MYSQLLOG} ] || [ -L ${MYSQLLOG} ]; - then - rm -rf ${MYSQLLOG} - fi - - if [ -d ${MYSQLDATA} ] || [ -L ${MYSQLDATA} ]; - then - rm -rf ${MYSQLDATA} - fi - - if [ -d ${MYSQLFILES} ] || [ -L ${MYSQLFILES} ]; - then - rm -rf ${MYSQLFILES} - fi - - if [ -d ${MYSQLKEYRING} ] || [ -L ${MYSQLKEYRING} ]; - then - rm -rf ${MYSQLKEYRING} - fi - - if getent passwd mysql >/dev/null; - then - userdel mysql - fi - fi - - set +e - ;; - - abort-install) - - set -e - - place_upstart_job_back - - if [ -x "/etc/init.d/mysql" ]; - then - invoke-rc.d mysql start || exit $? - else - if [ -d ${MYSQLRUN} ] || [ -L ${MYSQLRUN} ]; - then - rm -rf ${MYSQLRUN} - fi - - if [ -d ${MYSQLLOG} ] || [ -L ${MYSQLLOG} ]; - then - rm -rf ${MYSQLLOG} - fi - - if [ -d ${MYSQLDATA} ] || [ -L ${MYSQLDATA} ]; - then - rm -rf ${MYSQLDATA} - fi - - if [ -d ${MYSQLFILES} ] || [ -L ${MYSQLFILES} ]; - then - rm -rf ${MYSQLFILES} - fi - - if getent passwd mysql >/dev/null; - then - userdel mysql - fi - fi - - set +e - ;; - - upgrade|abort-upgrade) - - ;; - - *) - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/packaging/deb-in/mysql-packagesource-server.preinst.in b/packaging/deb-in/mysql-packagesource-server.preinst.in deleted file mode 100644 index fa5244c2f930..000000000000 --- a/packaging/deb-in/mysql-packagesource-server.preinst.in +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -get_pcount () { - PSCOUNT=$(ps -ef | grep "/usr/sbin/mysqld" | wc -l) - echo "${PSCOUNT}" -} - -server_stop () { - PSCOUNT=$(get_pcount) - COUNT=0 - while :; do - COUNT=$(( COUNT+1 )) - echo -n . - if [ "${PSCOUNT}" -eq 1 ]; - then - echo - break - fi - if [ "${COUNT}" -gt 15 ]; - then - echo - return 1 - fi - PSCOUNT=$(get_pcount) - sleep 1 - done - return 0 -} - -case "$1" in - install) - - if [ -z "$2" ]; - then - - set -e - - if [ -x "/etc/init.d/mysql" ]; - then - invoke-rc.d mysql stop || exit $? - server_stop - fi - # Native 5.5 packages create a /var/run/mysqld owned by root. This can cause - # errors in the systemd service, so we reset ownership if it exists. - MYSQLRUN=/var/run/mysqld - if [ -d ${MYSQLRUN} ]; then - install -d -m0755 -omysql -gmysql ${MYSQLRUN} - fi - - set +e - - fi - - ;; - - upgrade) - - set -e - - #DEBHELPER# - server_stop - - set +e - - ;; - - abort-upgrade) - - ;; - - *) - exit 1 - ;; -esac - -exit 0 diff --git a/packaging/deb-in/mysql-packagesource-server.prerm.in b/packaging/deb-in/mysql-packagesource-server.prerm.in deleted file mode 100644 index f38c8e3b9895..000000000000 --- a/packaging/deb-in/mysql-packagesource-server.prerm.in +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -set -e - -#DEBHELPER# - -set +e - -exit 0 diff --git a/packaging/deb-in/mysql-packagesource-server.templates.in b/packaging/deb-in/mysql-packagesource-server.templates.in deleted file mode 100644 index 85366ad75e5b..000000000000 --- a/packaging/deb-in/mysql-packagesource-server.templates.in +++ /dev/null @@ -1,35 +0,0 @@ -Template: mysql-@DEB_PRODUCTNAME@-server/root-pass -Type: password -Description: Enter root password: - Please provide a strong password that will be set for the root account of your MySQL database. - Leave it blank to enable password less login using UNIX socket based authentication. - -Template: mysql-@DEB_PRODUCTNAME@-server/re-root-pass -Type: password -Description: Re-enter root password: - Now that you have selected a password for the root account, please confirm by typing it again. Do not share the password with anyone. - -Template: mysql-@DEB_PRODUCTNAME@-server/root-pass-mismatch -Type: error -Description: The two passwords did not match - Please try again. Make sure you type the exact same password twice. - -Template: mysql-@DEB_PRODUCTNAME@-server/remove-data-dir -Type: boolean -Default: false -Description: Remove data directories ? - This operation will remove the data directory at '/var/lib/mysql' that stores all the databases, tables and related meta-data. - Additionally, any import or export files stored at '/var/lib/mysql-files' will be removed along with directory. - Finally, any files in '/var/lib/mysql-keyring' will be deleted. - It is highly recommended to take data backup before removing the data directories. - -Template: mysql-@DEB_PRODUCTNAME@-server/data-dir -Type: note -Description: Data directory found when no MySQL server package is installed - A data directory '/var/lib/mysql' is present on this system when no MySQL server - package is currently installed on the system. The directory may be under control of - server package received from third-party vendors. It may also be an unclaimed data - directory from previous removal of mysql packages. - . - It is highly recommended to take data backup. If you have not done so, now would be - the time to take backup in another shell. Once completed, press 'Ok' to continue. diff --git a/packaging/deb-in/mysql-packagesource-source-SERIES.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-source-SERIES.lintian-overrides.in index d5c9ec3811f2..c3a10b2f203f 100644 --- a/packaging/deb-in/mysql-packagesource-source-SERIES.lintian-overrides.in +++ b/packaging/deb-in/mysql-packagesource-source-SERIES.lintian-overrides.in @@ -14,6 +14,6 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Additional license file is needed so overriding this warning -mysql-@DEB_PRODUCTNAME@-source: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-source/LICENSE.mysql -mysql-@DEB_PRODUCTNAME@-source: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-source/@DEB_INSTALL_LICENSEFILE@.gz -mysql-@DEB_PRODUCTNAME@-source: copyright-should-refer-to-common-license-file-for-lgpl +mysql-@DEB_PRODUCTNAME@-source@DEB_PRODUCTSERIES@: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-source@DEB_PRODUCTSERIES@/LICENSE.mysql +mysql-@DEB_PRODUCTNAME@-source@DEB_PRODUCTSERIES@: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-source@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@.gz +mysql-@DEB_PRODUCTNAME@-source@DEB_PRODUCTSERIES@: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/packaging/deb-in/mysql-packagesource-source.install.in b/packaging/deb-in/mysql-packagesource-source.install.in deleted file mode 100644 index 8fb945667399..000000000000 --- a/packaging/deb-in/mysql-packagesource-source.install.in +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -../*.dsc usr/src/mysql/ -../*.tar.gz usr/src/mysql/ -@DEB_INSTALL_SOURCE_XZ@ -# legal -usr/share/doc/mysql-@DEB_PRODUCTNAME@-source/@DEB_INSTALL_LICENSEFILE@ -usr/share/doc/mysql-@DEB_PRODUCTNAME@-source/README diff --git a/packaging/deb-in/mysql-packagesource-source.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-source.lintian-overrides.in deleted file mode 100644 index d5c9ec3811f2..000000000000 --- a/packaging/deb-in/mysql-packagesource-source.lintian-overrides.in +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# Additional license file is needed so overriding this warning -mysql-@DEB_PRODUCTNAME@-source: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-source/LICENSE.mysql -mysql-@DEB_PRODUCTNAME@-source: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-source/@DEB_INSTALL_LICENSEFILE@.gz -mysql-@DEB_PRODUCTNAME@-source: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/packaging/deb-in/mysql-packagesource-test-SERIES.install.in b/packaging/deb-in/mysql-packagesource-test-SERIES.install.in index 27aec21842f5..b78b9ac181fa 100644 --- a/packaging/deb-in/mysql-packagesource-test-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-test-SERIES.install.in @@ -16,7 +16,6 @@ # binaries usr/bin/mysql_client_test usr/bin/mysqltest -usr/bin/mysqlxtest # manpages usr/share/man/man1/mysql_client_test.1 usr/share/man/man1/mysql-test-run.pl.1 @@ -25,41 +24,16 @@ usr/share/man/man1/mysqltest.1 usr/lib/mysql/plugin/auth.so usr/lib/mysql/plugin/auth_test_plugin.so usr/lib/mysql/plugin/daemon_example.ini -usr/lib/mysql/plugin/ha_example.so usr/lib/mysql/plugin/libdaemon_example.so -usr/lib/mysql/plugin/libtest_framework.so -usr/lib/mysql/plugin/libtest_services.so -usr/lib/mysql/plugin/libtest_services_threaded.so -usr/lib/mysql/plugin/libtest_session_detach.so -usr/lib/mysql/plugin/libtest_session_info.so -usr/lib/mysql/plugin/libtest_session_in_thd.so -usr/lib/mysql/plugin/libtest_sql_2_sessions.so -usr/lib/mysql/plugin/libtest_sql_all_col_types.so -usr/lib/mysql/plugin/libtest_sql_cmds_1.so -usr/lib/mysql/plugin/libtest_sql_commit.so -usr/lib/mysql/plugin/libtest_sql_complex.so -usr/lib/mysql/plugin/libtest_sql_errors.so -usr/lib/mysql/plugin/libtest_sql_lock.so -usr/lib/mysql/plugin/libtest_sql_processlist.so -usr/lib/mysql/plugin/libtest_sql_replication.so -usr/lib/mysql/plugin/libtest_sql_shutdown.so -usr/lib/mysql/plugin/libtest_sql_sqlmode.so -usr/lib/mysql/plugin/libtest_sql_stored_procedures_functions.so -usr/lib/mysql/plugin/libtest_sql_views_triggers.so -usr/lib/mysql/plugin/libtest_x_sessions_deinit.so -usr/lib/mysql/plugin/libtest_x_sessions_init.so usr/lib/mysql/plugin/qa_auth_client.so usr/lib/mysql/plugin/qa_auth_interface.so usr/lib/mysql/plugin/qa_auth_server.so -usr/lib/mysql/plugin/replication_observers_example_plugin.so -usr/lib/mysql/plugin/rewrite_example.so -usr/lib/mysql/plugin/test_security_context.so usr/lib/mysql/plugin/test_udf_services.so -# usr/lib/mysql/plugin/debug/auth.so -# usr/lib/mysql/plugin/debug/auth_test_plugin.so -# usr/lib/mysql/plugin/debug/daemon_example.ini +usr/lib/mysql/plugin/debug/auth.so +usr/lib/mysql/plugin/debug/auth_test_plugin.so +usr/lib/mysql/plugin/debug/daemon_example.ini # usr/lib/mysql/plugin/debug/ha_example.so -# usr/lib/mysql/plugin/debug/libdaemon_example.so +usr/lib/mysql/plugin/debug/libdaemon_example.so # usr/lib/mysql/plugin/debug/libtest_framework.so # usr/lib/mysql/plugin/debug/libtest_services.so # usr/lib/mysql/plugin/debug/libtest_services_threaded.so @@ -81,13 +55,13 @@ usr/lib/mysql/plugin/test_udf_services.so # usr/lib/mysql/plugin/debug/libtest_sql_views_triggers.so # usr/lib/mysql/plugin/debug/libtest_x_sessions_deinit.so # usr/lib/mysql/plugin/debug/libtest_x_sessions_init.so -# usr/lib/mysql/plugin/debug/qa_auth_client.so -# usr/lib/mysql/plugin/debug/qa_auth_interface.so -# usr/lib/mysql/plugin/debug/qa_auth_server.so +usr/lib/mysql/plugin/debug/qa_auth_client.so +usr/lib/mysql/plugin/debug/qa_auth_interface.so +usr/lib/mysql/plugin/debug/qa_auth_server.so # usr/lib/mysql/plugin/debug/replication_observers_example_plugin.so # usr/lib/mysql/plugin/debug/rewrite_example.so # usr/lib/mysql/plugin/debug/test_security_context.so -# usr/lib/mysql/plugin/debug/test_udf_services.so +usr/lib/mysql/plugin/debug/test_udf_services.so # test suite usr/lib/mysql-test/* # legal diff --git a/packaging/deb-in/mysql-packagesource-test-SERIES.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-test-SERIES.lintian-overrides.in index 7680f39f7db7..c066c4eb59e0 100644 --- a/packaging/deb-in/mysql-packagesource-test-SERIES.lintian-overrides.in +++ b/packaging/deb-in/mysql-packagesource-test-SERIES.lintian-overrides.in @@ -14,6 +14,6 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Additional license file is needed so overriding this warning -mysql-@DEB_PRODUCTNAME@-test: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-test/LICENSE.mysql -mysql-@DEB_PRODUCTNAME@-test: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-test/@DEB_INSTALL_LICENSEFILE@.gz -mysql-@DEB_PRODUCTNAME@-test: copyright-should-refer-to-common-license-file-for-lgpl +mysql-@DEB_PRODUCTNAME@-test@DEB_PRODUCTSERIES@: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-test@DEB_PRODUCTSERIES@/LICENSE.mysql +mysql-@DEB_PRODUCTNAME@-test@DEB_PRODUCTSERIES@: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-test@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@.gz +mysql-@DEB_PRODUCTNAME@-test@DEB_PRODUCTSERIES@: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/packaging/deb-in/rules.in b/packaging/deb-in/rules.in index ad5e8af226b9..2b81f2dcf2fc 100644 --- a/packaging/deb-in/rules.in +++ b/packaging/deb-in/rules.in @@ -83,12 +83,12 @@ override_dh_auto_install: # add debug plugin libraries to package install -m 0644 support-files/wsrep.cnf debian/tmp/usr/share/mysql # SysV init stuff, or Systemd files ? On Debian 8, we need both! -ifneq (,$(findstring SYSV,@DEB_STARTUP@)) - install -D -m 0755 support-files/mysql.server debian/tmp/etc/init.d/mysql -endif -ifneq (,$(findstring SYSTEMD,@DEB_STARTUP@)) - install -m 0755 scripts/mysqld_bootstrap debian/tmp/usr/bin/ -endif +#ifneq (,$(findstring SYSV,@DEB_STARTUP@)) +# install -D -m 0755 support-files/mysql.server debian/tmp/etc/init.d/mysql +#endif +#ifneq (,$(findstring SYSTEMD,@DEB_STARTUP@)) +# install -m 0755 scripts/mysqld_bootstrap debian/tmp/usr/bin/ +#endif # This seems to be the only safe place to fix permissions issues # not handled by dh_fixperms. # install -m 0755 debian/additions/echo_stderr debian/tmp/usr/share/mysql/ @@ -110,7 +110,7 @@ endif install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-client install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@ install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@ - install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/libmysqlclient20 + install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/libmysqlclient18 install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/libmysqlclient-dev # install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/libmysqld-dev install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-testsuite @@ -123,7 +123,7 @@ endif install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-client/@DEB_INSTALL_LICENSEFILE@ install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/libmysqlclient20/@DEB_INSTALL_LICENSEFILE@ + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/libmysqlclient18/@DEB_INSTALL_LICENSEFILE@ install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/libmysqlclient-dev/@DEB_INSTALL_LICENSEFILE@ # install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/libmysqld-dev/@DEB_INSTALL_LICENSEFILE@ install -g root -o root -m 0644 debian/tmp/usr/share/mysql/@DEB_INSTALL_LICENSEFILE@ debian/tmp/usr/share/doc/mysql-testsuite/@DEB_INSTALL_LICENSEFILE@ @@ -137,7 +137,7 @@ endif install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-client/README install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@/README install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@/README - install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/libmysqlclient20/README + install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/libmysqlclient18/README install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/libmysqlclient-dev/README # install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/libmysqld-dev/README install -g root -o root -m 0644 debian/tmp/usr/share/mysql/README debian/tmp/usr/share/doc/mysql-testsuite/README @@ -154,7 +154,7 @@ override_dh_installinit: @echo "RULES.$@" @DEB_RULES_APPARMOR_LOAD@ @DEB_RULES_SYSTEMD_ENABLE@ - dh_installinit --no-start --name=mysql -- defaults 19 21 + dh_installinit --name=mysql -- defaults 19 21 @DEB_RULES_SYSTEMD_START@ touch $@ From 340f577790e9d656a1db8cae3b7ad8baaefecef9 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Fri, 12 May 2017 19:01:45 +0300 Subject: [PATCH 182/305] MW-371: rehash packaging stuff for 5.6 Remove systemd for debian jessie and stretch Install wsrep-specific init script --- packaging/deb-in/CMakeLists.txt | 33 +- ...sql-packagesource-client-SERIES.install.in | 4 +- ...ql-packagesource-common-SERIES.postinst.in | 41 +- ...ysql-packagesource-common-SERIES.postrm.in | 7 +- ...sql-packagesource-server-SERIES.install.in | 1 - ...ql-packagesource-server-SERIES.postinst.in | 296 +++--------- ...ysql-packagesource-server-SERIES.postrm.in | 228 +++++---- ...sql-packagesource-server-SERIES.preinst.in | 253 +++------- ...mysql-packagesource-server-SERIES.prerm.in | 7 +- ...mysql-packagesource-test-SERIES.install.in | 16 +- .../mysql-packagesource-test.install.in | 48 -- .../deb-in/mysql-packagesource-test.links.in | 17 - ...ql-packagesource-test.lintian-overrides.in | 19 - packaging/deb-in/po/POTFILES.in | 1 + packaging/deb-in/po/ar.po | 252 ++++++++++ packaging/deb-in/po/ca.po | 227 +++++++++ packaging/deb-in/po/cs.po | 346 ++++++++++++++ packaging/deb-in/po/da.po | 222 +++++++++ packaging/deb-in/po/de.po | 230 +++++++++ packaging/deb-in/po/es.po | 382 +++++++++++++++ packaging/deb-in/po/eu.po | 236 ++++++++++ packaging/deb-in/po/fr.po | 242 ++++++++++ packaging/deb-in/po/gl.po | 249 ++++++++++ packaging/deb-in/po/it.po | 223 +++++++++ packaging/deb-in/po/ja.po | 229 +++++++++ packaging/deb-in/po/nb.po | 297 ++++++++++++ packaging/deb-in/po/nl.po | 219 +++++++++ packaging/deb-in/po/pt.po | 296 ++++++++++++ packaging/deb-in/po/pt_BR.po | 443 ++++++++++++++++++ packaging/deb-in/po/ro.po | 319 +++++++++++++ packaging/deb-in/po/ru.po | 220 +++++++++ packaging/deb-in/po/sk.po | 219 +++++++++ packaging/deb-in/po/sv.po | 220 +++++++++ packaging/deb-in/po/templates.pot | 187 ++++++++ packaging/deb-in/po/tr.po | 342 ++++++++++++++ packaging/deb-in/rules.in | 4 +- 36 files changed, 5884 insertions(+), 691 deletions(-) delete mode 100644 packaging/deb-in/mysql-packagesource-test.install.in delete mode 100644 packaging/deb-in/mysql-packagesource-test.links.in delete mode 100644 packaging/deb-in/mysql-packagesource-test.lintian-overrides.in create mode 100644 packaging/deb-in/po/POTFILES.in create mode 100644 packaging/deb-in/po/ar.po create mode 100644 packaging/deb-in/po/ca.po create mode 100644 packaging/deb-in/po/cs.po create mode 100644 packaging/deb-in/po/da.po create mode 100644 packaging/deb-in/po/de.po create mode 100644 packaging/deb-in/po/es.po create mode 100644 packaging/deb-in/po/eu.po create mode 100644 packaging/deb-in/po/fr.po create mode 100644 packaging/deb-in/po/gl.po create mode 100644 packaging/deb-in/po/it.po create mode 100644 packaging/deb-in/po/ja.po create mode 100644 packaging/deb-in/po/nb.po create mode 100644 packaging/deb-in/po/nl.po create mode 100644 packaging/deb-in/po/pt.po create mode 100644 packaging/deb-in/po/pt_BR.po create mode 100644 packaging/deb-in/po/ro.po create mode 100644 packaging/deb-in/po/ru.po create mode 100644 packaging/deb-in/po/sk.po create mode 100644 packaging/deb-in/po/sv.po create mode 100644 packaging/deb-in/po/templates.pot create mode 100644 packaging/deb-in/po/tr.po diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 7626394eec34..7f6d030aa317 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -122,7 +122,7 @@ ELSEIF(DEB_CODENAME STREQUAL "jessie") SET (DEB_PLATFORMRELEASE "debian8") # Improving on Oracle, we would prefer to package for Debian 8 # using both SysV init and Systemd, but still no Apparmor. - SET (DEB_CONTROL_BDEPS "dh-systemd") + SET (DEB_CONTROL_BDEPS "") SET (DEB_INSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/") SET (DEB_RULES_INSTALL_SYSTEMD "") SET (DEB_RULES_INSTALL_APPARMOR "") @@ -137,11 +137,11 @@ ELSEIF(DEB_CODENAME STREQUAL "jessie") SET (DEB_INIT_APPARMOR "") # Debian 8 comes with both SysV init and Systemd, # but "scripts/CMakeLists.txt" enforces an either-or. - SET (DEB_STARTUP "SYSV SYSTEMD") + SET (DEB_STARTUP "SYSV") # For now, we go with Systemd only. ELSEIF(DEB_CODENAME STREQUAL "stretch") SET (DEB_PLATFORMRELEASE "debian9") - SET (DEB_CONTROL_BDEPS "dh-systemd") + SET (DEB_CONTROL_BDEPS "") SET (DEB_INSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/") SET (DEB_RULES_INSTALL_SYSTEMD "") SET (DEB_RULES_INSTALL_APPARMOR "") @@ -209,7 +209,7 @@ ELSEIF(DEB_CODENAME STREQUAL "wily") SET (DEB_STARTUP "SYSTEMD") ELSEIF(DEB_CODENAME STREQUAL "xenial") SET (DEB_PLATFORMRELEASE "ubuntu16.04") - SET (DEB_CONTROL_BDEPS "dh-apparmor, dh-systemd (>=1.5)") + SET (DEB_CONTROL_BDEPS "dh-apparmor") SET (DEB_INSTALL_SOURCE_XZ "../*.tar.xz usr/src/mysql/") SET (DEB_RULES_INSTALL_SYSTEMD "") SET (DEB_RULES_INSTALL_APPARMOR @@ -224,7 +224,7 @@ ELSEIF(DEB_CODENAME STREQUAL "xenial") SET (DEB_SERVICE_SERVER_EXECPRE "") SET (DEB_SERVICE_SERVER_EXECPOST "") SET (DEB_INIT_APPARMOR "/lib/apparmor/profile-load usr.sbin.mysqld") - SET (DEB_STARTUP "SYSTEMD") + SET (DEB_STARTUP "SYSV") ELSEIF(DEB_CODENAME STREQUAL "yakkety") SET (DEB_PLATFORMRELEASE "ubuntu16.10") SET (DEB_CONTROL_BDEPS "dh-apparmor, dh-systemd (>=1.5)") @@ -322,27 +322,4 @@ ENDFOREACH() EXECUTE_PROCESS( COMMAND chmod +x ${CMAKE_BINARY_DIR}/debian/rules ) -IF(DEB_PRODUCTNAME STREQUAL "wsrep") -FILE(APPEND "${CMAKE_BINARY_DIR}/debian/control" " -Package: mysql-common -Architecture: any -Pre-depends: debconf (>= 0.2.17), - \${misc:Pre-Depends} -Multi-Arch: foreign -Depends: \${misc:Depends}, - \${shlibs:Depends}, - mysql-wsrep-common-5.6 -Description: MySQL Common - 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 - Oracle. This package contains common files needed by MySQL client - library and the MySQL database server. - This package is a dummy replacement for the case when using mysql WSREP - implementation to satisfy dependencies of other packages - like libmysqlclient18 -") -ENDIF() - diff --git a/packaging/deb-in/mysql-packagesource-client-SERIES.install.in b/packaging/deb-in/mysql-packagesource-client-SERIES.install.in index 45d673029ace..d0cd6a336120 100644 --- a/packaging/deb-in/mysql-packagesource-client-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-client-SERIES.install.in @@ -1,6 +1,6 @@ # this executable reprsent the embedded mysql server client -debian/additions/innotop/innotop usr/bin/ -debian/additions/mysqlreport usr/bin/ +debian/extra/innotop/innotop usr/bin/ +debian/extra/mysqlreport usr/bin/ usr/bin/myisam_ftdump usr/bin/mysql usr/bin/mysql_config_editor diff --git a/packaging/deb-in/mysql-packagesource-common-SERIES.postinst.in b/packaging/deb-in/mysql-packagesource-common-SERIES.postinst.in index da7055c32fde..3bf56a5d3c1c 100644 --- a/packaging/deb-in/mysql-packagesource-common-SERIES.postinst.in +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.postinst.in @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -17,40 +17,9 @@ set -e -#DEBHELPER# - -# This code needs to go after the debhelper snippets so that it runs after -# dpkg-maintscript-helper rm_conffile on /etc/mysql/my.cnf. As a one off, if -# my.cnf.dpkg-bak exists after this stage then we rename it to -# /etc/mysql/my.cnf.migrated, add an explanatory note to the top and add it is -# a high priority alternative so it gets used in favour of any other my.cnf -# shipped by variants. The /etc/mysql/my.cnf.migrated file will not be owned by -# any package (just like /etc/mysql/my.cnf.dpkg-bak would have been) but we -# rename it since it will be in active use, the user may not expect a .dpkg-bak -# file to be in use and we do not want to surprise the user. - if [ "$1" = "configure" ]; then - # Low priority fallback for client use when no server is installed. - update-alternatives --install /etc/mysql/my.cnf my.cnf /etc/mysql/my.cnf.fallback 100 + # Low priority fallback for client use when no server is installed. + update-alternatives --install /etc/mysql/my.cnf my.cnf /etc/mysql/my.cnf.fallback 100 fi -if [ "$1" = "configure" -a -f /etc/mysql/my.cnf.dpkg-bak ] && dpkg --compare-versions "$2" le "5.6.19-1~exp1ubuntu2~"; then - echo "Moving /etc/mysql/my.cnf.dpkg-bak to /etc/mysql/my.cnf.migrated" - cat - /etc/mysql/my.cnf.dpkg-bak < /etc/mysql/my.cnf.migrated -# This file has been automatically moved from your previous -# /etc/mysql/my.cnf, with just this comment added at the top, to maintain MySQL -# operation using your previously customised configuration. - -# To switch to the new packaging configuration for automated management of -# /etc/mysql/my.cnf across multiple variants: -# -# 1. Move your customisations from this file to /etc/mysql/conf.d/ and -# to /etc/mysql/.conf.d/ as appropriate. -# 2. Run "update-alternatives --remove my.cnf /etc/mysql/my.cnf.migrated" -# 3. Remove the file /etc/mysql/my.cnf.migrated - -EOT - rm /etc/mysql/my.cnf.dpkg-bak - echo "Using your previous configuration through /etc/mysql/my.cnf.migrated" - update-alternatives --install /etc/mysql/my.cnf my.cnf /etc/mysql/my.cnf.migrated 300 -fi +#DEBHELPER# diff --git a/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in b/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in index 9a5bc27903cf..f79a243935de 100644 --- a/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. # @@ -18,9 +18,8 @@ set -e if [ "$1" = "purge" ]; then - rm -f /etc/mysql/my.cnf.migrated # created by mysql-common from our obsolete conffile my.cnf - rm -f /etc/mysql/my.cnf.old # created by mariadb-common from our obsolete conffile my.cnf - rmdir /etc/mysql 2>/dev/null || true + rmdir /etc/mysql 2>/dev/null || true + update-alternatives --remove-all my.cnf fi #DEBHELPER# diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in index a651464a47ea..071f377492a6 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -47,7 +47,6 @@ usr/lib/mysql/plugin/innodb_engine.so usr/lib/mysql/plugin/libmemcached.so usr/lib/mysql/plugin/mypluglib.so usr/lib/mysql/plugin/mysql_no_login.so -usr/lib/mysql/plugin/mysqlx.so usr/lib/mysql/plugin/semisync_master.so usr/lib/mysql/plugin/semisync_slave.so usr/lib/mysql/plugin/validate_password.so diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.postinst.in b/packaging/deb-in/mysql-packagesource-server-SERIES.postinst.in index de6b8881e87f..ae861e7e815a 100755 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.postinst.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.postinst.in @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -15,268 +15,84 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -set -e - . /usr/share/debconf/confmodule - -if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi -${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } - -export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin - -# Runs an arbitrary init sql file supplied in $1. Does not require login access -run_init_sql() { - tmpdir=$(mktemp -d) - chown mysql:mysql "$tmpdir" - mysqld --user=mysql --init-file="$1" --socket="$tmpdir/mysqld.sock" --pid-file="$tmpdir/mysqld.pid" > /dev/null 2>&1 - result=$? - rm -rf "$tmpdir" - return $result -} - -# To avoid having hardcoded paths in the script, we do a search on the path, as suggested at: -# https://www.debian.org/doc/manuals/developers-reference/ch06.en.html#bpp-debian-maint-scripts -pathfind() { - OLDIFS="$IFS" - IFS=: - for p in $PATH; do - if [ -x "$p/$*" ]; then - IFS="$OLDIFS" - return 0 - fi - done - IFS="$OLDIFS" - return 1 +. /usr/share/mysql/mysql-helpers +take_upstart_job_backup () { + if [ -e "/etc/init/mysql.conf" ] && [ -d "/var/lib/mysql" ]; + then + mysql_install_db --user=mysql > /dev/null + mv /etc/init/mysql.conf /var/lib/mysql/.mysql.conf.backup + fi } -# Choose the proper mechanism. Ubuntu 16.04 uses systemd but still provides invoke-rc.d, -# so the existence of systemd must be checked first. invoke() { - if pathfind systemctl; then - systemctl $1 "@DEB_SYSTEMD_SERVICE_NAME@" - elif pathfind invoke-rc.d; then - invoke-rc.d mysql $1 + if pathfind invoke-rc.d; then + invoke-rc.d mysql else /etc/init.d/mysql $1 fi } - -# Check if there is passwordless root login -test_mysql_access() { - mysql --no-defaults -u root -h localhost /dev/null 2>&1 -} - -# Check if the debian-sys-maint user can log in -test_sysmaint_access() { - mysql --defaults-file=/etc/mysql/debian.cnf /dev/null 2>&1 -} - -# $1 is username, e.g. 'root' $2 is password -set_mysql_pw() { - # These variables are global (POSIX doesn't define local) so prefix them - # to avoid any potential collisions. - set_mysql_pw_user="$1" - set_mysql_pw_pass="$2" - set_mysql_pw_passfile=`mktemp --tmpdir=/var/lib/mysql-files/` - chown mysql:mysql "$set_mysql_pw_passfile" - echo "USE mysql;" >> "$set_mysql_pw_passfile" - echo "UPDATE user SET authentication_string=PASSWORD('$set_mysql_pw_pass') WHERE user='$set_mysql_pw_user';" >> "$set_mysql_pw_passfile" - echo "FLUSH PRIVILEGES;" >> "$set_mysql_pw_passfile" - echo "SHUTDOWN;" >> "$set_mysql_pw_passfile" - run_init_sql "$set_mysql_pw_passfile" - rm "$set_mysql_pw_passfile" -} - -# This is necessary because mysql_install_db removes the pid file in /var/run -# and because changed configuration options should take effect immediately. -# In case the server wasn't running at all it should be ok if the stop -# script fails. I can't tell at this point because of the cleaned /var/run. -set +e; invoke stop; set -e - case "$1" in configure) - mysql_datadir=/usr/share/mysql - mysql_statedir=/var/lib/mysql - mysql_rundir=/var/run/mysqld - mysql_logdir=/var/log/mysql - mysql_cfgdir=/etc/mysql - mysql_upgradedir=/var/lib/mysql-upgrade - mysql_filesdir=/var/lib/mysql-files - mysql_keyringdir=/var/lib/mysql-keyring - - # mysqld gets called during postinst configure, so any - # updates to the AppArmor profile must be loaded first (before the - # dh_apparmor snippet added by debhelper does it properly at the end of - # this script). Otherwise, mysqld cannot for example load - # /etc/mysql/mysqld.conf.d/ on upgrade from 5.5 to 5.6, which was added in - # 5.6 packaging but not present in the AppArmor profile shipped with 5.5 - # packaging. - # - # This a workaround. Status is tracked at https://launchpad.net/bugs/1435368 - if aa-status --enabled 2>/dev/null; then - # It is common for this to fail because - # /etc/apparmor.d/local/usr.sbin.mysqld doesn't exist (eg. on first - # install). But if this happens, then the workaround is not required, - # so it doesn't matter. If instead it causes a security issue, then - # that doesn't really matter here as dh_apparmor should handle that - # correctly later on. - apparmor_parser -r -T -W /etc/apparmor.d/usr.sbin.mysqld 2>/dev/null || true - fi - # New packaging paradigm for my.cnf as of Dec-2014 for sharing mysql - # variants in Ubuntu. - /usr/share/mysql-common/configure-symlinks install mysql "$mysql_cfgdir/mysql.cnf" + if [ -z "$2" ]; + then + + set -e + # If the existing config file is a proper file, we back it up + if [ -f "/etc/mysql/my.cnf" ] && [ ! -L "/etc/mysql/my.cnf" ]; then + cp /etc/mysql/my.cnf /etc/mysql/my.cnf.bak + fi + update-alternatives --force --install /etc/mysql/my.cnf my.cnf "/etc/mysql/mysql.cnf" 200 + + verify_ready + MYSQLDATA=/var/lib/mysql + MYSQLFILES=/var/lib/mysql-files + if aa-status --enabled 2>/dev/null; then + apparmor_parser -r -T -W /etc/apparmor.d/usr.sbin.mysqld 2>/dev/null || true + fi + if [ ! "$(ls -A ${MYSQLDATA})" ] && [ -d ${MYSQLFILES} ]; + then + db_get mysql-@DEB_PRODUCTNAME@-server/root-pass && PASSWD=${RET} + db_set mysql-@DEB_PRODUCTNAME@-server/root-pass "" + db_set mysql-@DEB_PRODUCTNAME@-server/re-root-pass "" + SQL=$(mktemp -u ${MYSQLFILES}/XXXXXXXXXX) + install /dev/null -m0600 -omysql -gmysql "${SQL}" + if [ ! -z "${PASSWD}" ]; + then + PASSWD=$(printf %q "${PASSWD}") + cat << EOF > ${SQL} +USE mysql; +UPDATE user SET password=PASSWORD('${PASSWD}') WHERE user='root'; +DELETE FROM user WHERE user=''; +FLUSH PRIVILEGES; +EOF + PASSWD="" + fi + mysql_install_db --user=mysql > /dev/null + run_init_sql "$SQL" + rm -f "$SQL" + fi + + set +e - # Ensure the existence and right permissions for the database and - # log files. - for d in $mysql_statedir $mysql_filesdir $mysql_keyringdir $mysql_logdir - do - if [ ! -d "$d" -a ! -L "$d" ]; then mkdir "$d"; fi - chown -R mysql:mysql $d - chmod 0700 $d - done - - # When creating an ext3 jounal on an already mounted filesystem like e.g. - # /var/lib/mysql, you get a .journal file that is not modifyable by chown. - # The mysql_datadir must not be writable by the mysql user under any - # circumstances as it contains scripts that are executed by root. - set +e - chown -R 0:0 $mysql_datadir - touch $mysql_logdir/error.log - chown -R mysql:adm $mysql_logdir - chmod 0750 $mysql_logdir - chmod 0640 $mysql_logdir/error.log - set -e - - # This is important to avoid dataloss when there is a removed - # mysql-server version from Woody lying around which used the same - # data directory and then somewhen gets purged by the admin. - db_set mysql-@DEB_PRODUCTNAME@-server/postrm_remove_database false || true - - - ## On every reconfiguration the maintenance user is recreated. - # - # - It is easier to regenerate the password every time but as people - # use fancy rsync scripts and file alteration monitors, the existing - # password is used and existing files not touched. - # - The echo is just for readability. ash's buildin has no "-e" so use /bin/echo. - - # recreate the credentials file if not present or without mysql_upgrade stanza - dc=$mysql_cfgdir/debian.cnf; - if [ -e "$dc" -a -n "`fgrep mysql_upgrade $dc 2>/dev/null`" ]; then - pass="`sed -n 's/^[ ]*password *= *// p' $dc | head -n 1`" - # Basedir is deprecated. Remove the option if it's in an existing debian.cnf - sed -i '/basedir/d' "$dc" - else - pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`; - if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi - umask 066 - cat /dev/null > $dc - umask 022 - echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc - echo "[client]" >>$dc - echo "host = localhost" >>$dc - echo "user = debian-sys-maint" >>$dc - echo "password = $pass" >>$dc - echo "socket = $mysql_rundir/mysqld.sock" >>$dc - echo "[mysql_upgrade]" >>$dc - echo "host = localhost" >>$dc - echo "user = debian-sys-maint" >>$dc - echo "password = $pass" >>$dc - echo "socket = $mysql_rundir/mysqld.sock" >>$dc - fi - # If this dir chmod go+w then the admin did it. But this file should not. - chown 0:0 $dc - chmod 0600 $dc - - # Initiate database. Output is not allowed by debconf :-( - # If database doesn't exist we create it. - if [ ! "$(ls -A "${mysql_statedir}")" ] && [ -d "${mysql_filesdir}" ]; then - existingdatabase=0 - initfile=`mktemp --tmpdir=/var/lib/mysql-files/` - touch "$initfile" - chmod 600 "$initfile" - chown mysql:mysql "$initfile" - echo "USE mysql; " >> "$initfile" - db_get mysql-@DEB_PRODUCTNAME@-server/root-pass && rootpw="$RET" - if [ ! -z $rootpw ]; then - echo "ALTER USER 'root'@'localhost' IDENTIFIED BY '$rootpw';" >> "$initfile" - fi - echo "CREATE USER IF NOT EXISTS 'debian-sys-maint'@'localhost' IDENTIFIED BY '$pass';" >> "$initfile" - echo "GRANT ALL ON *.* TO 'debian-sys-maint'@'localhost';" >> "$initfile" - echo "SHUTDOWN;" >> "$initfile" - # mysqld returns an error instead of a warning if CREATE USER IF NOT - # EXISTS fails, so ignore errors as a workaround. See: - # http://bugs.mysql.com/bug.php?id=80636 - mysqld --initialize-insecure --user=mysql --init-file="$initfile"> /dev/null 2>&1 || true - rm "$initfile" - else - existingdatabase=1 - fi - - # To avoid downgrades. This has to happen after the database is created, or --initialize will fail - touch $mysql_statedir/debian-5.7.flag + fi ;; abort-upgrade|abort-remove|abort-configure) + ;; *) - echo "postinst called with unknown argument '$1'" 1>&2 - exit 1 + exit 1 ;; esac -# The debhelper section is needed to unmask and enable the service -# in some cases like when upgrading from 5.5 -#DEBHELPER# +db_stop -if [ "$1" = "configure" ]; then - # We want to run mysql_upgrade to cover users upgrading. First we check if - # the debian-sys-maint user can log in. If not, we reset its password first. - if [ $existingdatabase = 1 ]; then - if ! test_sysmaint_access; then - invoke stop - set_mysql_pw "debian-sys-maint" "$pass" - invoke start - fi - mysql_upgrade --defaults-file=/etc/mysql/debian.cnf - fi - # Here we check to see if we can connect as root without a password - # this should catch upgrades from previous versions where the root - # password wasn't set. If the connection succeeds we install the - # auth_socket plugin and enable it for the root user to improve - # security. - if test_mysql_access; then - # Try to install auth_socket plugin. This throws an error if the plugin is - # already installed, which would end execution of the init sql to stop if - # --init-file was used. Bug: http://bugs.mysql.com/bug.php?id=80642 - pluginfile=`mktemp --tmpdir=/var/lib/mysql-files/` - echo "INSTALL PLUGIN auth_socket SONAME 'auth_socket.so';" >> "$pluginfile" - mysql -uroot < "$pluginfile" > /dev/null 2>&1 || true - rm "$pluginfile" - invoke stop - initfile=`mktemp --tmpdir=/var/lib/mysql-files/` - chown mysql:mysql "$initfile" - # If there is no root password set we enable the auth_socket plugin for the root user - echo "USE mysql;" >> "$initfile" - echo "ALTER USER 'root'@'localhost' IDENTIFIED WITH 'auth_socket';" >> "$initfile" - # Bug: http://bugs.mysql.com/bug.php?id=80632 - echo "UPDATE user SET password_expired='N', account_locked='N' WHERE user='root';" >> "$initfile" - echo "FLUSH PRIVILEGES;" >> "$initfile" - echo "SHUTDOWN;" >> "$initfile" - # The INSTALL PLUGIN line will throw an error if the plugin is already installed - run_init_sql "$initfile" - rm "$initfile" - invoke start - fi -fi - -# forget we ever saw the password. don't use reset to keep the seen status -db_set mysql-@DEB_PRODUCTNAME@-server/root-pass "" -db_set mysql-@DEB_PRODUCTNAME@-server/re-root-pass "" -db_stop # in case invoke failes +take_upstart_job_backup +#DEBHELPER# exit 0 diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.postrm.in b/packaging/deb-in/mysql-packagesource-server-SERIES.postrm.in index a0e44dfce68f..77a2dfbb2e90 100755 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.postrm.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.postrm.in @@ -15,105 +15,157 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -set -e - -# It is possible that Debconf has already been removed, too. -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; +then +. /usr/share/debconf/confmodule fi -if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi -${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } - -mysql_cfgdir=/etc/mysql -MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" - -# To avoid having hardcoded paths in the script, we do a search on the path, as suggested at: -# https://www.debian.org/doc/manuals/developers-reference/ch06.en.html#bpp-debian-maint-scripts -pathfind() { - OLDIFS="$IFS" - IFS=: - for p in $PATH; do - if [ -x "$p/$*" ]; then - IFS="$OLDIFS" - return 0 - fi - done - IFS="$OLDIFS" - return 1 +place_upstart_job_back () { + if [ -e "/var/lib/mysql/.mysql.conf.backup" ]; + then + mv /var/lib/mysql/.mysql.conf.backup /etc/init/mysql.conf + fi } -# Choose the proper mechanism. Ubuntu 16.04 uses systemd but still provides invoke-rc.d, -# so the existence of systemd must be checked first. -invoke() { - if pathfind systemctl; then - systemctl $1 "@DEB_SYSTEMD_SERVICE_NAME@" - elif pathfind invoke-rc.d; then - invoke-rc.d mysql $1 - else - /etc/init.d/mysql $1 - fi +get_pcount () { + PSCOUNT=$(ps -ef | grep "/usr/sbin/mysqld" | wc -l) + echo "${PSCOUNT}" } -# Try to stop the server in a sane way. If it does not success let the admin -# do it himself. No database directories should be removed while the server -# is running! -stop_server() { - set +e - invoke stop - errno=$? - set -e - - if [ "$?" != 0 ]; then - echo "Trying to stop the MySQL server resulted in exitcode $?." 1>&2 - echo "Stop it yourself and try again!" 1>&2 - exit 1 - fi +server_stop () { + PSCOUNT=$(get_pcount) + COUNT=0 + while :; do + COUNT=$(( COUNT+1 )) + echo -n . + if [ "${PSCOUNT}" -eq 1 ]; + then + echo + break + fi + if [ "${COUNT}" -gt 15 ]; + then + echo + return 1 + fi + PSCOUNT=$(get_pcount) + sleep 1 + done + return 0 } case "$1" in - purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then - stop_server - sleep 2 - fi - ;; - *) - echo "postrm called with unknown argument '$1'" 1>&2 - exit 1 - ;; -esac + remove) -# New packaging paradigm for my.cnf as of Dec-2014 for sharing mysql -# variants in Ubuntu. -case "$1" in - remove|disappear) - [ -x /usr/share/mysql-common/configure-symlinks ] && /usr/share/mysql-common/configure-symlinks remove mysql "$mysql_cfgdir/mysql.cnf" - ;; -esac + set -e -# -# - Do NOT purge logs or data if another mysql-sever* package is installed (#307473) -# - Remove the mysql user only after all his owned files are purged. -# -if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; then - # we remove the mysql user only after all his owned files are purged - rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz} - rm -rf /var/log/mysql - - db_input high mysql-@DEB_PRODUCTNAME@-server/postrm_remove_databases || true - db_go || true - db_get mysql-@DEB_PRODUCTNAME@-server/postrm_remove_databases || true - if [ "$RET" = "true" ]; then - # never remove the debian.cnf when the databases are still existing - # else we ran into big trouble on the next install! - rm -f /etc/mysql/debian.cnf - rm -rf /var/lib/mysql - rm -rf /var/lib/mysql-files - rm -rf /var/lib/mysql-keyring - userdel mysql || true - fi -fi + place_upstart_job_back + update-alternatives --remove my.cnf "/etc/mysql/mysql.cnf" + + set +e + + ;; + + purge) + + set -e + + place_upstart_job_back + + MYSQLDATA=/var/lib/mysql + MYSQLFILES=/var/lib/mysql-files + MYSQLKEYRING=/var/lib/mysql-keyring + MYSQLLOG=/var/log/mysql + MYSQLRUN=/var/run/mysqld + + server_stop + + db_input high mysql-@DEB_PRODUCTNAME@-server/remove-data-dir || true + db_go + db_get mysql-@DEB_PRODUCTNAME@-server/remove-data-dir && RMDATADIR=${RET} + if [ "${RMDATADIR}" = "true" ]; + then + if [ -d ${MYSQLRUN} ] || [ -L ${MYSQLRUN} ]; + then + rm -rf ${MYSQLRUN} + fi + + if [ -d ${MYSQLLOG} ] || [ -L ${MYSQLLOG} ]; + then + rm -rf ${MYSQLLOG} + fi + + if [ -d ${MYSQLDATA} ] || [ -L ${MYSQLDATA} ]; + then + rm -rf ${MYSQLDATA} + fi + + if [ -d ${MYSQLFILES} ] || [ -L ${MYSQLFILES} ]; + then + rm -rf ${MYSQLFILES} + fi + + if [ -d ${MYSQLKEYRING} ] || [ -L ${MYSQLKEYRING} ]; + then + rm -rf ${MYSQLKEYRING} + fi + + if getent passwd mysql >/dev/null; + then + userdel mysql + fi + fi + + set +e + ;; + + abort-install) + + set -e + + place_upstart_job_back + + if [ -x "/etc/init.d/mysql" ]; + then + invoke-rc.d mysql start || exit $? + else + if [ -d ${MYSQLRUN} ] || [ -L ${MYSQLRUN} ]; + then + rm -rf ${MYSQLRUN} + fi + + if [ -d ${MYSQLLOG} ] || [ -L ${MYSQLLOG} ]; + then + rm -rf ${MYSQLLOG} + fi + + if [ -d ${MYSQLDATA} ] || [ -L ${MYSQLDATA} ]; + then + rm -rf ${MYSQLDATA} + fi + + if [ -d ${MYSQLFILES} ] || [ -L ${MYSQLFILES} ]; + then + rm -rf ${MYSQLFILES} + fi + + if getent passwd mysql >/dev/null; + then + userdel mysql + fi + fi + + set +e + ;; + + upgrade|abort-upgrade) + + ;; + + *) + exit 1 + ;; +esac #DEBHELPER# diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.preinst.in b/packaging/deb-in/mysql-packagesource-server-SERIES.preinst.in index 2fe047ede76e..d4c1e6a9934b 100755 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.preinst.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.preinst.in @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -15,206 +15,71 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# summary of how this script can be called: -# * install -# * install -# * upgrade -# * abort-upgrade -# +get_pcount () { + PSCOUNT=$(ps -ef | grep "/usr/sbin/mysqld" | wc -l) + echo "${PSCOUNT}" +} -set -e - -. /usr/share/debconf/confmodule - -if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi -${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } - -export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin -MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" -DATADIR=/var/lib/mysql -LOGDIR=/var/log/mysql -UPGRADEDIR=/var/lib/mysql-upgrade - -# To avoid having hardcoded paths in the script, we do a search on the path, as suggested at: -# https://www.debian.org/doc/manuals/developers-reference/ch06.en.html#bpp-debian-maint-scripts -pathfind() { - OLDIFS="$IFS" - IFS=: - for p in $PATH; do - if [ -x "$p/$*" ]; then - IFS="$OLDIFS" - return 0 - fi - done - IFS="$OLDIFS" - return 1 +server_stop () { + PSCOUNT=$(get_pcount) + COUNT=0 + while :; do + COUNT=$(( COUNT+1 )) + echo -n . + if [ "${PSCOUNT}" -eq 1 ]; + then + echo + break + fi + if [ "${COUNT}" -gt 15 ]; + then + echo + return 1 + fi + PSCOUNT=$(get_pcount) + sleep 1 + done + return 0 } -# Choose the proper mechanism. Ubuntu 16.04 uses systemd but still provides invoke-rc.d, -# so the existence of systemd must be checked first. -invoke() { - if pathfind systemctl; then - systemctl $1 "@DEB_SYSTEMD_SERVICE_NAME@" - elif pathfind invoke-rc.d; then - invoke-rc.d mysql $1 - else - /etc/init.d/mysql $1 +case "$1" in + install) + + if [ -z "$2" ]; + then + + set -e + + if [ -x "/etc/init.d/mysql" ]; + then + invoke-rc.d mysql stop || exit $? + server_stop + fi + + set +e + fi -} -# Try to stop the server in a sane way. If it does not success let the admin -# do it himself. No database directories should be removed while the server -# is running! Another mysqld in e.g. a different chroot is fine for us. -stop_server() { - if pathfind systemctl; then - if systemctl list-unit-files -t service | fgrep -q "@DEB_SYSTEMD_SERVICE_NAME@" ; then - : # service is known, so stopping it makes sense - else - return 0 # we cannot stop what we do not know - fi - else - : # no systemd? let's try anyways - fi - - set +e - invoke stop - errno=$? - set -e - - # 0=ok, 100=no init script (fresh install) - if [ "$errno" != 0 -a "$errno" != 100 ]; then - echo "${cmd/ */} returned $errno" 1>&2 - echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2 - echo "Stop it yourself and try again!" 1>&2 - db_stop - exit 1 - fi -} + ;; -################################ main() ########################## - -this_version=5.7 - -# Abort if an NDB cluster is in use. -if egrep -qi -r '^[^#]*ndb.connectstring|^[[:space:]]*\[[[:space:]]*ndb_mgmd' /etc/mysql/; then - db_fset mysql-@DEB_PRODUCTNAME@-server/no_upgrade_when_using_ndb seen false || true - db_input high mysql-@DEB_PRODUCTNAME@-server/no_upgrade_when_using_ndb || true - db_go - db_stop - exit 1 -fi - -# Abort if skip-bdb option is enabled, required for 5.0 -> 5.1 upgrades. -#TODO - -# Safe the user from stupidities. -show_downgrade_warning=0 -for i in `ls $DATADIR/debian-*.flag 2>/dev/null`; do - found_version=`echo $i | sed 's/.*debian-\([0-9\.]\+\).flag/\1/'` - if dpkg --compare-versions "$this_version" '<<' "$found_version"; then - show_downgrade_warning=1 - break; - fi -done -if [ "$show_downgrade_warning" = 1 ]; then - db_fset mysql-@DEB_PRODUCTNAME@-server/really_downgrade seen false || true - db_input medium mysql-@DEB_PRODUCTNAME@-server/really_downgrade || true - db_go - db_get mysql-@DEB_PRODUCTNAME@-server/really_downgrade || true - if [ "$RET" = "true" ]; then - rm -f $DATADIR/debian-*.flag - touch $DATADIR/debian-$this_version.flag - else - echo "Aborting downgrade from (at least) $found_version to $this_version." 1>&2 - echo "If are sure you want to downgrade to $this_version, remove the file" 1>&2 - echo "$DATADIR/debian-*.flag and try installing again." 1>&2 - db_stop - exit 1 - fi -fi - -# to be sure -stop_server - -# If we use NIS then errors should be tolerated. It's up to the -# user to ensure that the mysql user is correctly setup. -# Beware that there are two ypwhich one of them needs the 2>/dev/null! -if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then - set +e -fi + upgrade) -# -# Now we have to ensure the following state: -# /etc/passwd: mysql:x:100:101:MySQL Server:/nonexistent:/bin/false -# /etc/group: mysql:x:101: -# -# Sadly there could any state be present on the system so we have to -# modify everything carefully i.e. not doing a chown before creating -# the user etc... -# + set -e + + #DEBHELPER# + server_stop + + set +e + + ;; + + abort-upgrade) + + ;; -# creating mysql group if he isn't already there -if ! getent group mysql >/dev/null; then - # Adding system group: mysql. - addgroup --system mysql >/dev/null -fi - -# creating mysql user if he isn't already there -if ! getent passwd mysql >/dev/null; then - # Adding system user: mysql. - adduser \ - --system \ - --disabled-login \ - --ingroup mysql \ - --no-create-home \ - --home /nonexistent \ - --gecos "MySQL Server" \ - --shell /bin/false \ - mysql >/dev/null -fi - -# end of NIS tolerance zone -set -e - -# if there's a symlink, let's store where it's pointing, because otherwise -# it's going to be lost in some situations -for dir in DATADIR LOGDIR; do - checkdir=`eval echo "$"$dir` - if [ -L "$checkdir" ]; then - mkdir -p "$UPGRADEDIR" - cp -d "$checkdir" "$UPGRADEDIR/$dir.link" - fi -done - -# creating mysql home directory -if [ ! -d $DATADIR -a ! -L $DATADIR ]; then - mkdir $DATADIR -fi - -# checking disc space -if LC_ALL=C BLOCKSIZE= df --portability $DATADIR/. | tail -n 1 | awk '{ exit ($4>1000) }'; then - echo "ERROR: There's not enough space in $DATADIR/" 1>&2 - db_stop - exit 1 -fi - -# Since the home directory was created before putting the user into -# the mysql group and moreover we cannot guarantee that the -# permissions were correctly *before* calling this script, we fix them now. -# In case we use NIS and no mysql user is present then this script should -# better fail now than later.. -# The "set +e" is necessary as e.g. a ".journal" of a ext3 partition is -# not chgrp'able (#318435). -set +e -chown mysql:mysql $DATADIR -find $DATADIR -follow -not -group mysql -print0 2>/dev/null \ - | xargs -0 --no-run-if-empty chgrp mysql -set -e - - -db_stop - -#DEBHELPER# + *) + exit 1 + ;; +esac exit 0 diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.prerm.in b/packaging/deb-in/mysql-packagesource-server-SERIES.prerm.in index cfe13a965ef0..f38c8e3b9895 100755 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.prerm.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.prerm.in @@ -17,9 +17,8 @@ set -e -. /usr/share/debconf/confmodule +#DEBHELPER# -if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi -${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 } +set +e -#DEBHELPER# +exit 0 diff --git a/packaging/deb-in/mysql-packagesource-test-SERIES.install.in b/packaging/deb-in/mysql-packagesource-test-SERIES.install.in index b78b9ac181fa..54081237ee00 100644 --- a/packaging/deb-in/mysql-packagesource-test-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-test-SERIES.install.in @@ -29,11 +29,11 @@ usr/lib/mysql/plugin/qa_auth_client.so usr/lib/mysql/plugin/qa_auth_interface.so usr/lib/mysql/plugin/qa_auth_server.so usr/lib/mysql/plugin/test_udf_services.so -usr/lib/mysql/plugin/debug/auth.so -usr/lib/mysql/plugin/debug/auth_test_plugin.so -usr/lib/mysql/plugin/debug/daemon_example.ini +#usr/lib/mysql/plugin/debug/auth.so +#usr/lib/mysql/plugin/debug/auth_test_plugin.so +#usr/lib/mysql/plugin/debug/daemon_example.ini # usr/lib/mysql/plugin/debug/ha_example.so -usr/lib/mysql/plugin/debug/libdaemon_example.so +#usr/lib/mysql/plugin/debug/libdaemon_example.so # usr/lib/mysql/plugin/debug/libtest_framework.so # usr/lib/mysql/plugin/debug/libtest_services.so # usr/lib/mysql/plugin/debug/libtest_services_threaded.so @@ -55,13 +55,13 @@ usr/lib/mysql/plugin/debug/libdaemon_example.so # usr/lib/mysql/plugin/debug/libtest_sql_views_triggers.so # usr/lib/mysql/plugin/debug/libtest_x_sessions_deinit.so # usr/lib/mysql/plugin/debug/libtest_x_sessions_init.so -usr/lib/mysql/plugin/debug/qa_auth_client.so -usr/lib/mysql/plugin/debug/qa_auth_interface.so -usr/lib/mysql/plugin/debug/qa_auth_server.so +#usr/lib/mysql/plugin/debug/qa_auth_client.so +#usr/lib/mysql/plugin/debug/qa_auth_interface.so +#usr/lib/mysql/plugin/debug/qa_auth_server.so # usr/lib/mysql/plugin/debug/replication_observers_example_plugin.so # usr/lib/mysql/plugin/debug/rewrite_example.so # usr/lib/mysql/plugin/debug/test_security_context.so -usr/lib/mysql/plugin/debug/test_udf_services.so +#usr/lib/mysql/plugin/debug/test_udf_services.so # test suite usr/lib/mysql-test/* # legal diff --git a/packaging/deb-in/mysql-packagesource-test.install.in b/packaging/deb-in/mysql-packagesource-test.install.in deleted file mode 100644 index e05f6d298abd..000000000000 --- a/packaging/deb-in/mysql-packagesource-test.install.in +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# binaries -usr/bin/mysql_client_test -usr/bin/mysql_client_test_embedded -usr/bin/mysqltest -usr/bin/mysqltest_embedded -# manpages -usr/share/man/man1/mysql_client_test.1 -usr/share/man/man1/mysql_client_test_embedded.1 -usr/share/man/man1/mysql-test-run.pl.1 -usr/share/man/man1/mysqltest.1 -usr/share/man/man1/mysqltest_embedded.1 -# plugins -usr/lib/mysql/plugin/auth.so -usr/lib/mysql/plugin/auth_test_plugin.so -usr/lib/mysql/plugin/daemon_example.ini -usr/lib/mysql/plugin/libdaemon_example.so -usr/lib/mysql/plugin/qa_auth_client.so -usr/lib/mysql/plugin/qa_auth_interface.so -usr/lib/mysql/plugin/qa_auth_server.so -usr/lib/mysql/plugin/test_udf_services.so -usr/lib/mysql/plugin/debug/auth.so -usr/lib/mysql/plugin/debug/auth_test_plugin.so -usr/lib/mysql/plugin/debug/daemon_example.ini -usr/lib/mysql/plugin/debug/libdaemon_example.so -usr/lib/mysql/plugin/debug/qa_auth_client.so -usr/lib/mysql/plugin/debug/qa_auth_interface.so -usr/lib/mysql/plugin/debug/qa_auth_server.so -usr/lib/mysql/plugin/debug/test_udf_services.so -# test suite -usr/lib/mysql-test/* -# legal -usr/share/doc/mysql-@DEB_PRODUCTNAME@-test/@DEB_INSTALL_LICENSEFILE@ -usr/share/doc/mysql-@DEB_PRODUCTNAME@-test/README diff --git a/packaging/deb-in/mysql-packagesource-test.links.in b/packaging/deb-in/mysql-packagesource-test.links.in deleted file mode 100644 index 51a5d94f8810..000000000000 --- a/packaging/deb-in/mysql-packagesource-test.links.in +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -usr/lib/mysql-test/mysql-test-run.pl usr/lib/mysql-test/mysql-test-run -usr/lib/mysql-test/mysql-test-run.pl usr/lib/mysql-test/mtr diff --git a/packaging/deb-in/mysql-packagesource-test.lintian-overrides.in b/packaging/deb-in/mysql-packagesource-test.lintian-overrides.in deleted file mode 100644 index 7680f39f7db7..000000000000 --- a/packaging/deb-in/mysql-packagesource-test.lintian-overrides.in +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. -# -# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# Additional license file is needed so overriding this warning -mysql-@DEB_PRODUCTNAME@-test: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-test/LICENSE.mysql -mysql-@DEB_PRODUCTNAME@-test: extra-license-file usr/share/doc/mysql-@DEB_PRODUCTNAME@-test/@DEB_INSTALL_LICENSEFILE@.gz -mysql-@DEB_PRODUCTNAME@-test: copyright-should-refer-to-common-license-file-for-lgpl diff --git a/packaging/deb-in/po/POTFILES.in b/packaging/deb-in/po/POTFILES.in new file mode 100644 index 000000000000..9631ecb8a4de --- /dev/null +++ b/packaging/deb-in/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@ diff --git a/packaging/deb-in/po/ar.po b/packaging/deb-in/po/ar.po new file mode 100644 index 000000000000..4c371ff9e90c --- /dev/null +++ b/packaging/deb-in/po/ar.po @@ -0,0 +1,252 @@ +# translation of templates.po to Arabic +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Ossama M. Khayat , 2007. +msgid "" +msgstr "" +"Project-Id-Version: templates\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2007-05-01 13:04+0300\n" +"Last-Translator: Ossama M. Khayat \n" +"Language-Team: Arabic \n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=6; plural=n==1 ? 0 : n==0 ? 1 : n==2 ? 2: n%100>=3 && " +"n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" +": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" +": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" +": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" +": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" +": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" +": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "هل Ùعلاً تريد التثبيط؟" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "هناك مل٠مسمى /var/lib/mysql/debian-*.flag موجود على هذا النظام." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"هذا المل٠دلالة على أن نسخة أحدث من حزمة mysql-server تم تثبيتها مسبقاً." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"ليست هناك أية ضمانة أن النسخة التي تقوم بتثبيتها ستكون قادرة على استخدام " +"قواعد البيانات الحالية." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "ملاحظة هامة لمستخدمي NIS/YP" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "عليك أيضاً أن تقوم بالتأكد من صلاحيات مالك المل٠/var/lib/mysql: " + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "إزالة جميع قواعد بيانات MySQLØŸ" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "الدليل /var/lib/mysql الذي يحتوي قواعد بيانات MySQL ستتم إزالته." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"إن كنت تقوم بإزالة حزمة MySQL كي تقوم لاحقاً بتثبيت نسخة أحدث أو إن كانت حزمة " +"mysql-server مختلÙØ© تستخدمها، Ùيجب إبقاء البيانات." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "تشغيل خادم MySQL عند الإقلاع؟" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"يمكن تشغيل خادم MySQL آلياً وقت الإقلاع أو يدوياً باستخدام الأمر '/etc/init.d/" +"mysql start'." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "كلمة المرور الجديدة لمستخد \"root\" الخاص بـMySQL:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"مع أنه ليس إجبارياً، ولكن من المستحسن أن تقوم بتعيين كلمة مرور خاصة بمستخدم " +"MySQL الإداري \"root\"." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "إن ترك الحقل Ùارغاً، Ùلن يتم تغيير كلمة المرور." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +#, fuzzy +#| msgid "New password for the MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "كلمة المرور الجديدة لمستخد \"root\" الخاص بـMySQL:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "تعذر تعيين كلمة مرور للمستخدم \"root\" الخاص بـMySQL." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"حدث خطأ أثناء تعيين كلمة المرور لمستخدم MySQL الإداري. قد يكون هذا حدث بسبب " +"أن حساب المستخدم له كلمة مرور معيّنة مسبقاً، أو بسبب مشكلة ÙÙŠ الاتصال مع خادم " +"MySQL." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "You should check the account's password after tha package installation." +msgid "You should check the account's password after the package installation." +msgstr "يجب عليك التحقق من كلمة مرور الحساب عقب تثبيت الحزمة." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"الرجاء قراءة المل٠/usr/share/doc/mysql-server-5.6/README.Debian للمزيد من " +"المعلومات." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "كي تستخدم MySQLØŒ يجب إضاÙØ© المÙدخلات التالية الخاصة بالمستخدمين والمجموعات " +#~ "إلى النظام:" + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "هل تريد دعم اتصالات MySQL من الأجهزة التي تعمل على ديبيان \"sarge\" أو " +#~ "أقدم؟" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "ÙÙŠ إصدارات عملاء MySQL القديمة من ديبيان، لم تكن كلمات المرور تحÙظ بشكل " +#~ "آمن. ولقد حل هذه المشكلة بعدها، غير أن العملاء (مثل PHP) المتصلين من " +#~ "أجهزة تعمل على ديبيان Sarge 3.1 لن يكونوا قادرين على الاتصال باستخدام " +#~ "الحسابات الحديثة أو الحسابات التي تم تغيير كلمة مرورها." diff --git a/packaging/deb-in/po/ca.po b/packaging/deb-in/po/ca.po new file mode 100644 index 000000000000..7b0721c63dab --- /dev/null +++ b/packaging/deb-in/po/ca.po @@ -0,0 +1,227 @@ +# mysql-dfsg (debconf) translation to Catalan. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# Aleix Badia i Bosch 2004 +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-4.1\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2004-01-31 19:20GMT\n" +"Last-Translator: Aleix Badia i Bosch \n" +"Language-Team: Debian L10n Catalan \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Aquest fitxer indica que anteriorment s'ha instaÅ€lat un paquet mysql-server " +"amb una versió posterior." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"No hi ha cap garantia que la versió que esteu instaÅ€lant actualment puga " +"emprar les bases de dades actuals." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +#, fuzzy +#| msgid "Important note for NIS/YP users!" +msgid "Important note for NIS/YP users" +msgstr "Nota important pels usuaris de NIS/YP" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Si empreu MySQL sota NIS/YP, heu d'afegir un compte d'usuari mysql al " +"sistema local amb:" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"També hauríeu de comprovar els permisos i propietaris del directori /var/" +"lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"El directori /var/lib/mysql que conté les bases de dades de MySQL està a " +"punt deser suprimit." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Si esteu suprimint el paquet MySQL per a posteriorment instaÅ€lar una versió " +"més recent, o si un paquet mysql-server diferent ja l'està emprant, les " +"dades s'haurien de mantenir." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +#, fuzzy +#| msgid "Should MySQL start on boot?" +msgid "Start the MySQL server on boot?" +msgstr "Voleu que el MySQL s'iniciï a l'arrencada ?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +#, fuzzy +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"El MySQL es pot executar automàticament a l'arrencada o manualment amb " +"l'ordre «/etc/init.d/mysql start»." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Tot i que no és requerida, és molt recomanable que establiu una " +"contrasenya per a «root», l'usuari administratiu del MySQL." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"S'ha produït un error en establir la contrasenya de l'usuari administratiu " +"del MySQL. Això pot haver passat perquè el compte ja té una una " +"contrasenya, o per un problema de comunicació amb el servidor de MySQL." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Hauríeu de comprovar la contrasenya del compte després de la instaÅ€lació " +"del paquet." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Llegiu el fitxer /usr/share/doc/mysql-server-5.1/README.Debian per a obtenir " +"més informació." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" +"Les dos contrasenyes que heu introduït no són la mateixa. Proveu-ho de nou." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "MySQL-5.1 no longer provides NDB Cluster support. Please migrate to the " +#~ "new " +#~ msgstr "" +#~ "El MySQL-5.1 ja no implementa el clúster NDB. Migreu al nou paquet mysql-" +#~ "cluster i suprimiu totes les línies que comencen per «ndb» de tots els " +#~ "fitxers de configuració sota /etc/mysql/." diff --git a/packaging/deb-in/po/cs.po b/packaging/deb-in/po/cs.po new file mode 100644 index 000000000000..a6be13baaa85 --- /dev/null +++ b/packaging/deb-in/po/cs.po @@ -0,0 +1,346 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.6\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2007-05-01 13:01+0200\n" +"Last-Translator: Miroslav Kure \n" +"Language-Team: Czech \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Opravdu pokraÄovat v degradaci?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "V systému existuje soubor /var/lib/mysql/debian-*.flag." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "To znamená, že již byl nainstalován balík mysql-server s vyšší verzí." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Neexistuje žádná záruka, že momentálnÄ› instalovaná verze bude umÄ›t pracovat " +"se stávajícími databázemi." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Důležitá poznámka pro uživatele NIS/YP" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Také byste mÄ›li zkontrolovat vlastníka a oprávnÄ›ní adresáře /var/lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Odstranit vÅ¡echny MySQL databáze?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Adresář /var/lib/mysql, ve kterém se nachází MySQL databáze, bude odstranÄ›n." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Jestliže odstraňujete balík MySQL za úÄelem instalace novÄ›jší verze MySQL, " +"nebo pokud tato data souběžnÄ› využívá jiný balík mysql-server, mÄ›li byste " +"data ponechat." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Spustit MySQL server pÅ™i startu systému?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL se může spouÅ¡tÄ›t automaticky pÅ™i startu systému, nebo ruÄnÄ› příkazem '/" +"etc/init.d/mysql start'." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nové heslo MySQL uživatele \"root\":" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"PÅ™estože to není nezbytné, je silnÄ› doporuÄeno nastavit heslo u " +"správcovského MySQL úÄtu \"root\"." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "Ponecháte-li pole prázdné, heslo se nezmÄ›ní." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +#, fuzzy +#| msgid "New password for the MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Nové heslo MySQL uživatele \"root\":" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Nelze nastavit heslo MySQL uživatele \"root\"" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"BÄ›hem nastavování hesla pro správcovského uživatele MySQL se vyskytla chyba. " +"To se mohlo stát tÅ™eba proto, protože uživatel již mÄ›l heslo nastaveno, nebo " +"protože nastal problém v komunikaci s MySQL serverem." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "You should check the account's password after tha package installation." +msgid "You should check the account's password after the package installation." +msgstr "Po instalaci balíku byste mÄ›li heslo ověřit." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Více informací naleznete v /usr/share/doc/mysql-server-5.6/README.Debian." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Abyste mohli MySQL používat, musíte v systému založit následující " +#~ "uživatele a skupiny:" + +#~ msgid "Cannot upgrade if ISAM tables are present!" +#~ msgstr "Aktualizace nelze provést pokud jsou přítomny tabulky ISAM!" + +#~ msgid "" +#~ "Recent versions of MySQL can no longer use the old ISAM table format and " +#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " +#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " +#~ "The installation of mysql-server-5.6 will now abort. In case your old " +#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " +#~ "those tables." +#~ msgstr "" +#~ "Poslední verze MySQL již nemohou používat starý formát tabulek ISAM a " +#~ "pÅ™ed aktualizací je nutné pÅ™evést tyto tabulky napÅ™. do formátu MyISAM " +#~ "pomocí \"mysql_convert_table_format\" nebo \"ALTER TABLE x ENGINE=MyISAM" +#~ "\". Instalace mysql-server-5.6 se nyní pÅ™eruší. V případÄ›, že se mezitím " +#~ "odinstaloval původní mysql-server-4.1, jednoduÅ¡e jej znovu nainstalujte a " +#~ "tabulky pÅ™eveÄte." + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "Podporovat MySQL pÅ™ipojení z poÄítaÄů používajících Debian Sarge nebo " +#~ "starší?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Způsob, jakým se dříve ukládala hesla, nebyl příliÅ¡ bezpeÄný. To se nyní " +#~ "zlepÅ¡ilo, ale nevýhodou je, že se klienti z Debianu 3.1 Sarge (napÅ™. PHP) " +#~ "nebudou moci pÅ™ipojit na nové úÄty, nebo na úÄty, u nichž se heslo " +#~ "zmÄ›nilo." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Abyste mohli mysql používat, musíte do následujících souborů pÅ™idat " +#~ "ekvivalentního uživatele a skupinu a zajistit, že /var/lib/mysql má " +#~ "správná práva (uid/gid se mohou liÅ¡it)." + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "Odstranit databáze používané vÅ¡emi verzemi MySQL?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "Nezadáte-li heslo, žádné zmÄ›ny se s úÄtem neprovedou." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "Po skonÄení instalace byste mÄ›li ověřit, že je úÄet chránÄ›n heslem (více " +#~ "informací naleznete v souboru README.Debian)." + +#~ msgid "Update Hints" +#~ msgstr "Poznámky k aktualizaci" + +#~ msgid "" +#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be " +#~ "corrupted! This script also enhances the privilege tables but is not " +#~ "supposed to give any user more rights that he had before," +#~ msgstr "" +#~ "Po aktualizaci jeÅ¡tÄ› musíte spustit \"mysql_upgrade\", protože jinak by " +#~ "se tabulky mohly naruÅ¡it! Tento skript také rozÅ¡iÅ™uje tabulky privilegií, " +#~ "ovÅ¡em nemÄ›l by uživatelům pÅ™idat více práv, než mÄ›li dosud." + +#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html" +#~ msgstr "Také si pÅ™eÄtÄ›te http://www.mysql.com/doc/en/Upgrade.html" + +#~ msgid "" +#~ "MySQL will only install if you have a non-numeric hostname that is " +#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " +#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " +#~ "myhostname\"." +#~ msgstr "" +#~ "MySQL se nainstaluje pouze v případÄ›, že používáte nenumerické jméno " +#~ "poÄítaÄe, které se dá pÅ™eložit pÅ™es soubor /etc/hosts. NapÅ™. když příkaz " +#~ "\"hostname\" vrátí \"diamond\", tak v /etc/hosts musí existovat obdobný " +#~ "řádek jako \"10.0.0.1 diamond\"." + +#~ msgid "" +#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " +#~ "is used in the start/stop and cron scripts. Don't delete." +#~ msgstr "" +#~ "Bude vytvoÅ™en nový mysql uživatel \"debian-sys-maint\". Tento mysql úÄet " +#~ "se používá ve startovacích, ukonÄovacích a cronových skriptech. Nemažte " +#~ "jej." + +#~ msgid "" +#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" +#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " +#~ "there, never only the password!" +#~ msgstr "" +#~ "Nezapomeňte nastavit heslo pro úÄet administrátora MySQL! Používáte-li /" +#~ "root/.my.cnf, vždy zde zadejte jak řádek \"user\", tak řádek \"password" +#~ "\". Nikdy zde nezadávejte jenom heslo!" + +#~ msgid "" +#~ "Should I remove the complete /var/lib/mysql directory tree which is used " +#~ "by all MySQL versions, not necessarily only the one you are about to " +#~ "purge?" +#~ msgstr "" +#~ "Mám odstranit kompletní adresářový strom /var/lib/mysql, který se používá " +#~ "pro vÅ¡echny verze MySQL, tedy ne nutnÄ› pouze pro verzi, kterou se " +#~ "chystáte vyÄistit?" diff --git a/packaging/deb-in/po/da.po b/packaging/deb-in/po/da.po new file mode 100644 index 000000000000..94019aa36b73 --- /dev/null +++ b/packaging/deb-in/po/da.po @@ -0,0 +1,222 @@ +# Danish translation mysql-5.1. +# Copyright (C) 2010 mysql-5.1 & nedenstÃ¥ende oversættere. +# This file is distributed under the same license as the mysql-5.1 package. +# Claus Hindsgaul 2005, 2006, 2007. +# Joe Hansen , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-5.1\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2010-10-07 05:26+0100\n" +"Last-Translator: Joe Hansen \n" +"Language-Team: Danish \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Ønsker du virkelig at fortsætte nedgraderingen?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Der er en fil med navnet /var/lib/mysql/debian-*.flag pÃ¥ dette system." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"SÃ¥dan en fil tyder pÃ¥, at der tidligere har været installeret en højere " +"version af mysql-server-pakken." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Det kan ikke garanteres at den version, du er ved at installere, kan benytte " +"data fra de eksisterende databaser." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Vigtig oplysning til NIS/YP-brugere" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Brug af MySQL under NIS/YP kræver at en mysql-brugerkonto tilføjes pÃ¥ det " +"lokale system med:" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Du bør ogsÃ¥ tjekke rettighederne og ejerskabet af mappen /var/lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Fjern alle MySQL-databaser?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Mappen /var/lib/mysql, der indeholder MySQL-databaserne, er ved at blive " +"fjernet." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Hvis du fjerner MySQL-pakken for senere at installere en nyere version, " +"eller hvis en anden mysql-server-pakke allerede benytter den, bør dataene " +"bevares." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Start MySQL-serveren under systemopstart?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL-serveren kan enten startes op automatisk under systemopstarten, eller " +"manuelt med kommandoen '/etc/init.d/mysql start'." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Ny adgangskode for MySQL's »rootbruger«:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Selvom det ikke kræves, anbefales det kraftigt, at du sætter en adgangskode " +"for MySQL's administrationsbruger »root«." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "Hvis du lader dette felt stÃ¥ tomt, vil adgangskoden ikke blive ændret." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Gentag adgangskode for MySQL's »root-bruger«:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Kunne ikke sætte adgangskoden for MySQL's »root-bruger«" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Der opstod en fejl, da adgangskoden for MySQL's administrationsbruger blev " +"forsøgt ændret. Dette kan være sket, fordi brugeren allerede har en " +"adgangskode, eller fordi der var problemer med at kommunikere med MySQL-" +"serveren." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "Du bør tjekke kontoens adgangskode efter pakkeinstallationen." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Læs venligst filen /usr/share/doc/mysql-server-5.1/README.Debian for " +"yderligere oplysninger." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "Inddatafejl for adgangskode" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" +"De to adgangskoder du indtastede var ikke de samme. Forsøg venligst igen." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "NDB-cluster ser ud til at være i brug" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.1 no longer provides NDB Cluster support. Please migrate to the " +#| "new mysql-cluster package and remove all lines starting with \"ndb\" from " +#| "all config files below /etc/mysql/." +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.1 tilbyder ikke længere NDB-clusterunderstøttelse. Migrer venligst " +"til den nye pakke mysql-cluster og fjern alle linjer der starter med »ndb« " +"fra alle konfigurationsfiler under /etc/mysql/." diff --git a/packaging/deb-in/po/de.po b/packaging/deb-in/po/de.po new file mode 100644 index 000000000000..844f393c4b0b --- /dev/null +++ b/packaging/deb-in/po/de.po @@ -0,0 +1,230 @@ +# translation of mysql-dfsg-5.6_5.6.8-1_de.po to Deutsch +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +# Alwin Meschede , 2006, 2007. +# Thomas Mueller , 2009. +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg 5.6.23-2\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2012-06-03 10:33+0200\n" +"Last-Translator: Thomas Mueller \n" +"Language-Team: german \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Möchten Sie wirklich eine ältere Version einspielen?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" +"Auf diesem System existiert eine Datei mit dem Namen /var/lib/mysql/debian-*." +"flag" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Diese Datei ist ein Hinweis darauf, dass früher ein MySQL-Server-Paket mit " +"einer höheren Version installiert war." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Es kann nicht garantiert werden, dass die gegenwärtig zu installierende " +"Version dessen Daten benutzen kann." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Wichtige Anmerkung für NIS/YP-Benutzer!" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Falls MySQL mit NIS/YP genutzt wird, ist ein »mysql«-Benutzerkonto auf dem " +"lokalen System notwendig:" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Sie sollten außerdem Besitzer und Zugriffsrechte des Verzeichnisses /var/lib/" +"mysql überprüfen:" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Alle MySQL-Datenbanken entfernen?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Das Verzeichnis /var/lib/mysql mit den MySQL-Datenbanken soll entfernt " +"werden." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Falls geplant ist, nur eine höhere Version von MySQL zu installieren oder " +"ein anderes mysql-server-Paket dieses bereits benutzt, sollten die Daten " +"behalten werden." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Soll der MySQL-Server automatisch beim Booten starten?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"Der MySQL-Dienst kann entweder automatisch beim Systemstart oder manuell " +"durch Eingabe des Befehls »/etc/init.d/mysql start« gestartet werden." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Neues Passwort für den MySQL »root«-Benutzer:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Obwohl es nicht zwingend erforderlich ist, wird nachdrücklich empfohlen für " +"den administrativen MySQL »root«-Benutzer ein Passwort zu setzen." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "Wenn dieses Feld freigelassen wird, wird das Passwort nicht geändert." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Wiederholen Sie das Passwort für den MySQL-»root«-Benutzer:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Konnte für den MySQL-»root«-Benutzer kein Passwort setzen" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Beim setzen des Passworts für den administrativen MySQL-Benutzer ist ein " +"Fehler aufgetreten. Dies könnte daran liegen, dass der Benutzer bereits ein " +"Passwort hat oder dass es ein Problem mit der Kommunikation mit dem MySQL-" +"Server gibt." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Sie sollten das Passwort des administrativen Benutzers nach der " +"Paketinstallation prüfen." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Für weitere Informationen lesen Sie /usr/share/doc/mysql-server-5.6/README." +"Debian." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "Passwort-Eingabefehler" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" +"Die beiden von Ihnen eingegebenen Passwörter sind nicht identisch. Bitte " +"erneut versuchen." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "NDB-Cluster scheint gerade benutzt zu werden" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.6 bietet keine NDB-Clusterunterstützung mehr. Bitte migrieren Sie " +"Ihr System zum neuen »mysql-cluster-server«-Paket und entfernen Sie alle " +"Zeilen, die mit »ndb« beginnen aus allen Konfigurationsdateien im " +"Verzeichnis /etc/mysql/." diff --git a/packaging/deb-in/po/es.po b/packaging/deb-in/po/es.po new file mode 100644 index 000000000000..10f715cf815e --- /dev/null +++ b/packaging/deb-in/po/es.po @@ -0,0 +1,382 @@ +# mysql-5.6 translation to spanish +# Copyright (C) 2005-2012 Software in the Public Interest, SPI Inc. +# This file is distributed under the same license as the mysql-5.6 package. +# +# Changes: +# - Initial translation +# Jesus Aneiros, 2006 +# - Updated +# Javier Fernandez-Sanguino, 2006-2012 +# - Revision +# Nacho Barrientos Arias +# Fernando Cerezal +# David Martínez Moreno +# Ricardo Mones +# Carlos Galisteo +# Javier Fernandez-Sanguino +# Fernando C. Estrada +# +# Traductores, si no conoce el formato PO, merece la pena leer la +# documentación de gettext, especialmente las secciones dedicadas a este +# formato, por ejemplo ejecutando: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Equipo de traducción al español, por favor lean antes de traducir +# los siguientes documentos: +# +# - El proyecto de traducción de Debian al español +# http://www.debian.org/intl/spanish/ +# especialmente las notas y normas de traducción en +# http://www.debian.org/intl/spanish/notas +# +# - La guía de traducción de po's de debconf: +# /usr/share/doc/po-debconf/README-trans +# o http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Si tiene dudas o consultas sobre esta traducción consulte con el último +# traductor (campo Last-Translator) y ponga en copia a la lista de +# traducción de Debian al español () +msgid "" +msgstr "" +"Project-Id-Version: mysql-5.6\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2012-06-17 09:49-0500\n" +"Last-Translator: Javier Fernández-Sanguino \n" +"Language-Team: Debian l10 Spanish \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Virtaal 0.7.1\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "¿Desea realmente continuar con la desactualización?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" +"Existe un fichero con el nombre /var/lib/mysql/debian-*.flag en este sistema." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Este fichero indica que se instaló previamente una versión superior del " +"paquete mysql-server." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"No se puede garantizar que la versión que está instalando pueda usar la base " +"de datos actual." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Nota importante para los usuarios de NIS/YP" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Utilizar MySQL con NIS/YP requiere que una cuenta de usuario de mysql sea " +"agregada en el sistema local como:" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"También debería comprobar los permisos y el propietario del directorio: /var/" +"lib/mysql" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "¿Desea eliminar todas las bases de datos MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"El directorio /var/lib/mysql contiene bases de datos MySQL que van a " +"eliminarse." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Debería mantener los datos si tiene planificado instalar una versión de " +"MySQL más reciente o si hay un paquete «mysql-server» distinto que los está " +"utilizando." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "¿Desea que el servidor MySQL se ejecute al iniciar el sistema?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"El servidor MySQL puede iniciarse en el momento de arranque del sistema o " +"manualmente si escribe la orden «/etc/init.d/mysql start»." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nueva contraseña para el usuario «root» de MySQL:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Se recomienda que configure una contraseña para el usuario " +"«root» (administrador) de MySQL, aunque no es obligatorio." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "No se modificará la contraseña si deja el espacio en blanco." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Nueva contraseña para el usuario «root» de MySQL:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "No se pudo fijar la contraseña para el usuario «root» de MySQL" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Se produjo un error mientras intentaba fijar la contraseña para el usuario " +"administrador de MySQL. Esto puede haber sucedido porque la cuenta ya tenía " +"una contraseña o porque se produjo un error de comunicación con el servidor " +"MySQL." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Debería comprobar la contraseña de la cuenta después de la instalación del " +"paquete." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Consulte /usr/share/doc/mysql-server-5.6/README.Debian para más información." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "Se ha producido un error al introducir la contraseña" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" +"Las dos contraseñas que ha introducido son distintas. Intente de nuevo." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "NDB Cluster parece estar en uso" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.6 ya no brinda soporte para NDB Cluster. Migre al nuevo paquete " +"mysql-cluster-server y elimine todas las líneas que empiecen con \"ndb\" de " +"todos los ficheros de configuración bajo /etc/mysql/." + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Deben añadirse las siguientes entradas para usuarios y grupos en el " +#~ "sistema para poder utilizar MySQL:" + +#~ msgid "Cannot upgrade if ISAM tables are present!" +#~ msgstr "¡No se puede actualizar si ya hay tablas ISAM!" + +#~ msgid "" +#~ "Recent versions of MySQL can no longer use the old ISAM table format and " +#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " +#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " +#~ "The installation of mysql-server-5.6 will now abort. In case your old " +#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " +#~ "those tables." +#~ msgstr "" +#~ "Las versiones recientes de MySQL ya no soportan el antiguo formato de " +#~ "tabla ISAM. Antes de realizar la actualización es necesario convertir sus " +#~ "tablas a por ejemplo, MyISAM, usando «mysql_convert_table_format» o " +#~ "«ALTER TABLE x ENGINE=MyISAM». Se va a interrumpir ahora la instalación " +#~ "de mysql-server-5.6. Si aún así su mysql-server-4.1 se elimina aún así, " +#~ "puede reinstalarlo para convertir ese tipo de tablas." + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "¿Soportar las conexiones MySQL establecidadas desde sistemas que ejecutan " +#~ "Debian Sarge o versiones anteriores?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "No era muy segura la forma en la que se almacenaban las contraseñas en " +#~ "versiones anteriores del cliente de MySQL en Debian. Este problema se ha " +#~ "mejorado posteriormente con el inconveniente, sin embargo, de que " +#~ "clientes (por ejemplo, PHP) en sistemas que ejecutan Debian 3.1 «Sarge» " +#~ "no podrán conectarse a cuentas que son nuevas o a las que se le haya " +#~ "cambiado la contraseña." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Para utilizar mysql debe instalar un usuario y grupo equivalente al " +#~ "siguiente y asegurarse de que /var/lib/mysql tiene los permisos correctos " +#~ "(los valores del «uid» y del «gid» pueden ser diferentes)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group: mysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "" +#~ "¿Eliminar las bases de datos utilizadas por todas las versiones de MySQL?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "" +#~ "No se hará ningún cambio en la cuenta si no introduce una contraseña." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "Debería confirmar que la contraseña está correctamente protegida con una " +#~ "contraseña cuando termine la instalación (consulte el fichero README." +#~ "Debian si desea más información)." + +#~ msgid "Install Hints" +#~ msgstr "Sugerencias para la instalación" + +#~ msgid "" +#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in " +#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and " +#~ "have manually be restored." +#~ msgstr "" +#~ "Al actualizar a la versión de MySQL 3.23, la vrsión proporcionada en " +#~ "Debian Woody, se eliminan de manera accidental, los enlaces simbólicos a " +#~ "«/var/lib/mysql» o «/var/log/mysql» y tienen que restaurarse manualmente." + +#~ msgid "" +#~ "MySQL will only install if you have a non-numeric hostname that is " +#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " +#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " +#~ "myhostname\"." +#~ msgstr "" +#~ "Sólo se instalará MySQL si tiene un nombre de equipo que no sea una " +#~ "dirección IP y pueda resolverse a través del fichero /etc/hosts. Por " +#~ "ejemplo, si la orden «hostname» devuelve «MiNombreEquipo» entonces deberá " +#~ "existir una línea «10.0.0.1 MiNombreEquipo» en dicho fichero." + +#~ msgid "" +#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " +#~ "is used in the start/stop and cron scripts. Don't delete." +#~ msgstr "" +#~ "Se creará un nuevo usuario «debian-sys-maint». Esta cuenta de mysql se " +#~ "utilizará en los scripts de inicio y parada y en los scripts «cron». No " +#~ "la elimine." + +#~ msgid "" +#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" +#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " +#~ "there, never only the password!" +#~ msgstr "" +#~ "¡Por favor, recuerde crear una CONTRASEÑA para el usuario «root» de " +#~ "MySQL! ¡Si utiliza /root/.my.cnf debe escribir las líneas «user» y " +#~ "«password» en dicho fichero, no incluya sólo la contraseña!" + +#~ msgid "" +#~ "Should I remove the complete /var/lib/mysql directory tree which is used " +#~ "by all MySQL versions, not necessarily only the one you are about to " +#~ "purge?" +#~ msgstr "" +#~ "¿Debería eliminar el árbol de directorio /var/lib/mysql completo? Tenga " +#~ "en cuenta que lo utilizan todas las versiones de MySQL y no sólo la que " +#~ "está a punto de purgar." diff --git a/packaging/deb-in/po/eu.po b/packaging/deb-in/po/eu.po new file mode 100644 index 000000000000..e9878c0d2085 --- /dev/null +++ b/packaging/deb-in/po/eu.po @@ -0,0 +1,236 @@ +# translation of eu.po to Euskara +# Piarres BEobide , 2006. +# Piarres Beobide , 2009. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +msgid "" +msgstr "" +"Project-Id-Version: eu\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2009-07-29 11:59+0200\n" +"Last-Translator: Piarres Beobide \n" +"Language-Team: Euskara \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Benetan bertsio zaharragora itzuli nahi duzu?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Sisteman badago /var/lib/mysql/debian-*.flag izeneko fitxategi bat." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Fitxategi honek aurretik bertsio berriagoko mysql-zerbitzari pakete bat " +"instalatu dela adierazten du." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Ezin da ziurtatu instalatzen ari zaren bertsio honek dauden datubaseak " +"erabili ahal izango dituenik." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "NIS/YP erabiltzaileentzat ohar garrantzitsua" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Honetaz gain /var/lib/mysql direktorioaren jabea eta baimenak egiaztatu " +"beharko zenituzke:" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Ezabatu MySQL datubase guztiak?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "MySQL datubaseak dituen /var/lib/mysql direktorioa ezabatua izango da." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"MySQL paketea beranduago bertsio berriago bat instalatzeko kentzen ari " +"bazara, edo beste mysql-server pakete bat berau erabiltzen ari bada, datuak " +"mantendu egin beharko lirateke." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Abioan MySQL zerbitzaria abiarazi?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"Sistema abioan MySQL automatikoki abiarazi daiteke edo eskuz '/etc/init.d/" +"mysql start' eginaz." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "MySQL \"root\" erabiltzailearen pasahitz berria:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Derrigorrezkoa ez denean, oso gomendagarria da MySQL administratzaile \"root" +"\" erabiltzaileari pasahitz bat ezartzea." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "Eremua hau zurian utziaz gero ez da pasahitza aldatuko." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Errepikatu MySQL \"root\" erabiltzailearen pasahitza:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Ezin da MySQL \"root\" erabiltzailearen pasahitza ezarri" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Errore bat gertatu da MySQL administratzaile kontuaren pasahitza ezartzean. " +"Hau erabiltzaileak dagoeneko pasahitz bat duelako edo MySQL " +"zerbitzariarekiko konexioan erroreak daudelako gertatu daiteke." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Kontuaren pasahitza egiaztatu beharko zenuke paketea instalatu aurretik." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Mesedez irakurri /usr/share/doc/mysql-server-5.6/README.Debian fitxategia " +"xehetasun gehiagorako." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "Pasahitz sarrera errorea" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "Idatzi dituzun bi pasahitzak ez dira berdina. Mesedez saiatu berriz." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "Dirudienez NDB Cluster-a erabilia dago" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.6 has orphaned NDB Cluster support. Please migrate to the new " +#| "mysql-cluster package and remove all lines starting with \"ndb\" from all " +#| "config files below /etc/mysql/." +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.6-ek NDB cluster euskarri umezurtz bat behar du. Mesedez migratu " +"mysql-cluster pakete berrira eta /etc/mysql/ azpiko konfigurazio fitxategi " +"guztietan \"ndb\"-ez hasten diren lerro guztiak ezabatu." + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "MySQL erabili ahal izateko, hurrengo erabiltzaile eta taldeak gehitu " +#~ "behar dira sisteman:" diff --git a/packaging/deb-in/po/fr.po b/packaging/deb-in/po/fr.po new file mode 100644 index 000000000000..9ced0c040231 --- /dev/null +++ b/packaging/deb-in/po/fr.po @@ -0,0 +1,242 @@ +# Translation of mysql-dfsg-* debconf templates to French +# Copyright (C) 2004-2009 Debian French l10n team +# This file is distributed under the same license as the mysql-dfsg-* packages. +# +# Translators: +# Christian Perrier , 2004, 2006, 2007, 2009, 2012. +msgid "" +msgstr "" +"Project-Id-Version: fr\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2012-05-22 08:30+0200\n" +"Last-Translator: Christian Perrier \n" +"Language-Team: French \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"debian.org>\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: Plural-Forms: nplurals=2; plural=n>1;\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Faut-il vraiment revenir à la version précédente ?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Un fichier /var/lib/mysql/debian-*.flag est présent sur ce système." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Cela indique qu'une version plus récente du paquet mysql-server a été " +"précédemment installée." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "Il n'est pas garanti que cette version puisse en utiliser les données." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Note importante pour les utilisateurs NIS/YP" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"L'utilisation de MySQL avec NIS/YP impose l'ajout d'un compte local " +"« mysql » avec la commande :" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Vous devez également vérifier le propriétaire et les permissions du " +"répertoire /var/lib/mysql :" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Faut-il supprimer toutes les bases de données MySQL ?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Le répertoire /var/lib/mysql qui contient les bases de données de MySQL va " +"être supprimé." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Si vous prévoyez d'installer une version plus récente de MySQL ou si un " +"autre paquet mysql-server les utilise déjà, vous devriez les conserver." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Faut-il lancer MySQL au démarrage ?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL peut être lancé soit au démarrage, soit en entrant la commande « /etc/" +"init.d/mysql start »." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nouveau mot de passe du superutilisateur de MySQL :" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Il est très fortement recommandé d'établir un mot de passe pour le compte " +"d'administration de MySQL (« root »)." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "Si ce champ est laissé vide, le mot de passe ne sera pas changé." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Confirmation du mot de passe du superutilisateur de MySQL :" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "" +"Impossible de changer le mot de passe de l'utilisateur « root » de MySQL" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Une erreur s'est produite lors du changement de mot de passe du compte " +"d'administration. Un mot de passe existait peut-être déjà ou il n'a pas été " +"possible de communiquer avec le serveur MySQL." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Vous devriez vérifier le mot de passe de ce compte après l'installation du " +"paquet." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Veuillez consulter le fichier /usr/share/doc/mysql-server-5.6/README.Debian " +"pour plus d'informations." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "Erreur de saisie du mot de passe" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" +"Le mot de passe et sa confirmation ne sont pas identiques. Veuillez " +"recommencer." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "Abandon de la gestion de NDB" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"La version 5.6 de MySQL ne gère plus les grappes NDB. Vous devriez utiliser " +"le paquet mysql-cluster-server et supprimer toutes les lignes commençant par " +"« ndb » des fichiers de configuration situés dans /etc/mysql." + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Pour pouvoir utiliser MySQL, les utilisateurs et les groupes suivants " +#~ "doivent être ajoutés au système :" + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "Gérer les connexions d'hôtes qui utilisent les versions Debian « sarge » " +#~ "ou antérieures  ?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "La méthode de stockage des mots de passe n'était pas très sûre dans les " +#~ "version précédentes de ce paquet. Cette méthode a été améliorée mais les " +#~ "modifications empêchent la connexion avec de nouveaux comptes ou des " +#~ "comptes dont le mot de passe a été modifié, pour les clients (p. ex. PHP) " +#~ "depuis des hôtes qui utilisent Debian 3.1 « sarge »." diff --git a/packaging/deb-in/po/gl.po b/packaging/deb-in/po/gl.po new file mode 100644 index 000000000000..6bb14076e0ee --- /dev/null +++ b/packaging/deb-in/po/gl.po @@ -0,0 +1,249 @@ +# Galician translation of mysql-dfsg-5.6's debconf templates +# This file is distributed under the same license as the mysql-dfsg-5.6 package. +# Jacobo Tarrio , 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.6\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2007-04-20 09:44+0200\n" +"Last-Translator: Jacobo Tarrio \n" +"Language-Team: Galician \n" +"Language: gl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "¿Quere pasar a unha versión anterior?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Neste sistema hai un ficheiro chamado /var/lib/mysql/debian-*.flag." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Este ficheiro indica que antes se instalou un paquete mysql-server cunha " +"versión superior." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Non se pode garantir que a versión que está a instalar poida empregar as " +"bases de datos actuais." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Nota importante para os usuarios de NIS/YP" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Tamén debería comprobar os permisos e o propietario do directorio /var/lib/" +"mysql:" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "¿Eliminar tódalas bases de datos de MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Hase eliminar o directorio /var/lib/mysql, que contén as bases de datos de " +"MySQL." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Se está a eliminar o paquete MySQL para instalar despois unha versión máis " +"recente ou se xa hai un paquete mysql-server diferente a empregalo, debería " +"conservar os datos." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "¿Iniciar o servidor MySQL co ordenador?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"Pódese iniciar automaticamente o servidor MySQL ao iniciar o ordenador, ou " +"manualmente coa orde \"/etc/init.d/mysql start\"." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Novo contrasinal para o usuario \"root\" de MySQL:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Aínda que non é obrigatorio, recoméndase encarecidamente que estableza un " +"contrasinal para o usuario administrativo \"root\" de MySQL." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "Se deixa o campo en branco, non se ha cambiar o contrasinal." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +#, fuzzy +#| msgid "New password for the MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Novo contrasinal para o usuario \"root\" de MySQL:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Non se puido establecer o contrasinal do usuario \"root\" de MySQL" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Houbo un erro ao establecer o contrasinal do usuario administrativo de " +"MySQL. Puido ocorrer porque o usuario xa teña un contrasinal ou debido a un " +"problema de comunicacións co servidor MySQL." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "You should check the account's password after tha package installation." +msgid "You should check the account's password after the package installation." +msgstr "Debería comprobar o contrasinal da conta trala instalación do paquete." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Consulte o ficheiro /usr/share/doc/mysql-server-5.6/README.Debian para máis " +"información." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Para empregar MySQL deberían engadirse ao sistema as seguintes entradas " +#~ "de usuarios e grupos:" + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "¿Soportar as conexións a MySQL de máquinas que empreguen Debian \"sarge\" " +#~ "ou anterior?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Nas versións antigas dos clientes MySQL de Debian, os contrasinais non se " +#~ "armacenaban de xeito seguro. Isto mellorouse desde aquela; nembargantes, " +#~ "os clientes (tales coma PHP) das máquinas que executen Debian 3.1 Sarge " +#~ "non se han poder conectar a contas recentes ou a contas nas que se " +#~ "cambiara o contrasinal." diff --git a/packaging/deb-in/po/it.po b/packaging/deb-in/po/it.po new file mode 100644 index 000000000000..b0567e55508b --- /dev/null +++ b/packaging/deb-in/po/it.po @@ -0,0 +1,223 @@ +# Italian (it) translation of debconf templates for mysql-dfsg-5.6 +# Copyright (C) 2009 Software in the Public Interest +# This file is distributed under the same license as the mysql-dfsg-5.6 package. +# Luca Monducci , 2006 - 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.6 5.6.8 italian debconf templates\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2009-08-08 11:03+0200\n" +"Last-Translator: Luca Monducci \n" +"Language-Team: Italian \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Procedere realmente con l'abbassamento di versione?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" +"Su questo sistema esiste un file con nome /var/lib/mysql/debian-*.flag." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Quel file indica che in precedenza è stata installata una versione superiore " +"del pacchetto mysql-server." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Non è garantito che la versione che si sta installando sia in grado di usare " +"i database presenti." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Nota importante per gli utenti NIS/YP" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Per usare MySQL con NIS/YP è necessario aggiungere al sistema locale un " +"account utente per mysql con:" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Inoltre si devono verificare i permessi e la proprietà della directory /var/" +"lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Eliminare tutti i database MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"La directory /var/lib/mysql contenente i database di MySQL sta per essere " +"eliminata." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Se si rimuove il pacchetto MySQL per poi installare una versione più recente " +"oppure se sono già in uso da un altro pacchetto mysql-server, i dati non " +"devono essere eliminati." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Lanciare il server MySQL all'avvio?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"Il server MySQL può essere lanciato automaticamente all'avvio del sistema " +"oppure manualmente con il comando «/etc/init.d/mysql start»." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nuova password per l'utente «root» di MySQL:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Sebbene non sia obbligatoria, si raccomanda d'impostare una password per " +"l'utente d'amministrazione «root» di MySQL." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "Se questo campo è lasciato vuoto, la password non viene cambiata." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Ripetere la password per l'utente «root» di MySQL:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Impossibile impostare la password per l'utente «root» di MySQL" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Si è verificato un errore durante l'impostazione della password per l'utente " +"d'amministrazione di MySQL. Questo può essere accaduto perché l'utente ha " +"già una password oppure a causa di un problema di connessione con il server " +"MySQL." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Al termine dell'installazione si deve verificare la password dell'account." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Per maggiori informazioni si consulti il file /usr/share/doc/mysql-" +"server-5.6/README.Debian." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "Errore di inserimento della password" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "Le due password inserite sono diverse. Riprovare." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "È in uso un cluster NDB" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the " +#| "new mysql-cluster package and remove all lines starting with \"ndb\" from " +#| "all config files below /etc/mysql/." +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.6 non fornisce più il supporto per i cluster NDB. Si dovrebbe " +"migrare al nuovo pacchetto mysql-cluster e rimuovere tutte le righe che " +"iniziano per \"ndb\" da tutti i file di configurazione sotto /etc/mysql/." diff --git a/packaging/deb-in/po/ja.po b/packaging/deb-in/po/ja.po new file mode 100644 index 000000000000..796d5e3efc2c --- /dev/null +++ b/packaging/deb-in/po/ja.po @@ -0,0 +1,229 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.6 5.6.8-1\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2009-09-01 08:25+0900\n" +"Last-Translator: Hideki Yamane (Debian-JP) \n" +"Language-Team: Japanese \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "本当ã«ãƒ€ã‚¦ãƒ³ã‚°ãƒ¬ãƒ¼ãƒ‰ã‚’実行ã—ã¾ã™ã‹?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" +"ã“ã®ã‚·ã‚¹ãƒ†ãƒ ã«ã¯ /var/lib/mysql/debian-*.flag ã¨ã„ã†åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã—ã¦" +"ã„ã¾ã™ã€‚" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ„味ã™ã‚‹ã®ã¯ã€ä»¥å‰ã«ã‚ˆã‚Šæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® mysql-server パッ" +"ケージãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚Œã¦ã„ãŸã“ã¨ã‚’示ã—ã¾ã™ã€‚" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’ç¾åœ¨ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—よã†ã¨ã—ã¦ã„ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ä½¿ãˆã‚‹ã‹ã©ã†ã‹" +"ã¯ä¿è¨¼ã§ãã¾ã›ã‚“。" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "NIS/YP ユーザã¸ã®é‡è¦ãªæ³¨æ„" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"NIS/YP é…下㧠MySQL を使ã†ã«ã¯ãƒ­ãƒ¼ã‚«ãƒ«ã®ã‚·ã‚¹ãƒ†ãƒ ã« mysql ã®ãƒ¦ãƒ¼ã‚¶ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’" +"追加ã™ã‚‹ã®ãŒå¿…è¦ã§ã™ã€‚" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "/var/lib/mysql ã®æ‰€æœ‰è€…権é™ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹å¿…è¦ã‚‚ã‚ã‚Šã¾ã™ã€‚" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "ã™ã¹ã¦ã® MySQL データベースを削除ã—ã¾ã™ã‹?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"MySQL データベースをå«ã‚“ã§ã„るディレクトリ /var/lib/mysql を削除ã—よã†ã¨ã—ã¦" +"ã„ã¾ã™ã€‚" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"後ã§ã‚ˆã‚Šæ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚‚ã®ã‚’インストールã—よã†ã¨ã™ã‚‹ãŸã‚ã« MySQL パッケー" +"ジを削除ã—よã†ã¨ã—ã¦ã„ã‚‹ã€ã‚ã‚‹ã„ã¯åˆ¥ã® mysql-server パッケージを既ã«ä½¿ã£ã¦ã„" +"ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã¯ä¿æŒã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "MySQL をシステム起動時ã«é–‹å§‹ã—ã¾ã™ã‹?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL ã®èµ·å‹•æ–¹æ³•ã«ã¤ã„ã¦ã€ã‚·ã‚¹ãƒ†ãƒ èµ·å‹•æ™‚ã«è‡ªå‹•çš„ã«é–‹å§‹ã™ã‚‹ã‹ã€ã‚ã‚‹ã„㯠'/etc/" +"init.d/mysql start' ã¨æ‰‹ã§å…¥åŠ›ã—ã¦èµ·å‹•ã™ã‚‹ã‹ã‚’é¸ã¹ã¾ã™ã€‚" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "MySQL ã® \"root\" ユーザã«å¯¾ã™ã‚‹æ–°ã—ã„パスワード:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"強制ã§ã¯ã‚ã‚Šã¾ã›ã‚“ãŒã€MySQL を管ç†ã™ã‚‹ \"root\" ユーザã®ãƒ‘スワードを設定ã™ã‚‹" +"ã“ã¨ã‚’å¼·ããŠå‹§ã‚ã—ã¾ã™ã€‚" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "ã“ã®å€¤ã‚’空ã®ã¾ã¾ã«ã—ã¦ãŠã„ãŸå ´åˆã¯ã€ãƒ‘スワードã¯å¤‰æ›´ã•ã‚Œã¾ã›ã‚“。" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "MySQL ã® \"root\" ユーザã«å¯¾ã™ã‚‹æ–°ã—ã„パスワード:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "MySQL ã® \"root\" ユーザã®ãƒ‘スワードを設定ã§ãã¾ã›ã‚“" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"MySQL ã®ç®¡ç†è€…ユーザã«å¯¾ã—ã¦ãƒ‘スワードを設定ã—よã†ã¨ã—ãŸéš›ã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾" +"ã—ãŸã€‚ã“ã‚Œã¯æ—¢ã«ç®¡ç†è€…ユーザã«ãƒ‘スワードãŒè¨­å®šã•ã‚Œã¦ã„ãŸã‹ã€MySQL サーãƒã¨ã®" +"接続ã«å•é¡ŒãŒã‚ã£ãŸãŸã‚ã ã¨æ€ã‚ã‚Œã¾ã™ã€‚" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"パッケージã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«å¾Œã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã®ãƒ‘スワードを確èªã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"詳細㯠/usr/share/doc/mysql-server-5.6/README.Debian ã‚’å‚ç…§ã—ã¦ãã ã•ã„。" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "パスワード入力エラー" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "入力ã•ã‚ŒãŸäºŒã¤ã®ãƒ‘スワードãŒä¸€è‡´ã—ã¾ã›ã‚“。å†å…¥åŠ›ã—ã¦ãã ã•ã„。" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "NDB クラスタãŒåˆ©ç”¨ã•ã‚Œã¦ã„るよã†ã§ã™" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the " +#| "new mysql-cluster package and remove all lines starting with \"ndb\" from " +#| "all config files below /etc/mysql/." +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.6 ã§ã¯ NDB クラスタã®ã‚µãƒãƒ¼ãƒˆã‚’æä¾›ã—ãªããªã£ã¦ã„ã¾ã™ã€‚æ–°ãŸãª mysql-" +"cluster パッケージã«ç§»è¡Œã—ã¦ã€/etc/mysql 以下ã®è¨­å®šãƒ•ã‚¡ã‚¤ãƒ«ã™ã¹ã¦ã‹ã‚‰ã€Œndbã€" +"ã§å§‹ã¾ã‚‹è¡Œã‚’削除ã—ã¦ãã ã•ã„。" diff --git a/packaging/deb-in/po/nb.po b/packaging/deb-in/po/nb.po new file mode 100644 index 000000000000..d3c9d0e391c2 --- /dev/null +++ b/packaging/deb-in/po/nb.po @@ -0,0 +1,297 @@ +# translation of mysql_nb.po to Norwegian BokmÃ¥l +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Bjørn Steensrud , 2007. +msgid "" +msgstr "" +"Project-Id-Version: mysql_nb\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2007-02-18 12:13+0100\n" +"Last-Translator: Bjørn Steensrud \n" +"Language-Team: Norwegian BokmÃ¥l \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.2\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +#, fuzzy +#| msgid "Do you really want to downgrade?" +msgid "Really proceed with downgrade?" +msgstr "Er du sikker pÃ¥ at du vil nedgradere?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +#, fuzzy +#| msgid "" +#| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates " +#| "that a mysql-server package with a higher version has been installed " +#| "before. It can not be guaranteed that this version can use its data." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"ADVARSEL: Fila /var/lib/mysql/debian-*.flag finnes. Dette viser at en mysql-" +"server-pakke med et høyere versjonsnummer har vært installert før. Det kan " +"ikke garanteres at denne versjonen kan bruke data fra den høyere versjonen." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +#, fuzzy +#| msgid "Important note for NIS/YP users!" +msgid "Important note for NIS/YP users" +msgstr "Viktig merknad for NIS/YP-brukere!" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +#, fuzzy +#| msgid "" +#| "The script is about to remove the data directory /var/lib/mysql. If it is " +#| "planned to just install a higher MySQL version or if a different mysql-" +#| "server package is already using it, the data should be kept." +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Dette skriptet skal til Ã¥ fjerne data-mappa /var/lib/mysql. Denne mappa bør " +"beholdes hvis det bare skal installeres en høyere MySQL-versjon, eller hvis " +"en annen mysql-server-pakke allerede bruker den." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +#, fuzzy +#| msgid "Should MySQL start on boot?" +msgid "Start the MySQL server on boot?" +msgstr "Skal MySQL startes ved maskinoppstart?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +#, fuzzy +#| msgid "" +#| "The MySQL can start automatically on boot time or only if you manually " +#| "type '/etc/init.d/mysql start'." +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL kan startes automatisk nÃ¥r maskinen starter, eller bare hvis du " +"skriver «/etc/init.d/mysql start»." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +#, fuzzy +#| msgid "New password for MySQL \"root\" user:" +msgid "New password for the MySQL \"root\" user:" +msgstr "Nytt passord for MySQLs «root»-bruker:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +#, fuzzy +#| msgid "" +#| "It is highly recommended that you set a password for the MySQL " +#| "administrative \"root\" user." +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Det anbefales sterkt at du oppgir et passord for den administrative «root»-" +"brukeren i MySQl." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +#, fuzzy +#| msgid "New password for MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Nytt passord for MySQLs «root»-bruker:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "Unable to set password for MySQL \"root\" user" +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Klarer ikke angi passord for MySQLs «root»-bruker" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "It seems an error occurred while setting the password for the MySQL " +#| "administrative user. This may have happened because the user already has " +#| "a password, or because there was a problem communicating with the MySQL " +#| "server." +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Det ser ut til at det oppsto en feil mens det ble satt et passord for MySQLs " +"administrative bruker. Dette kan være fordi brukeren allerede har et " +"passord, eller fordi det var et kommunikasjonsproblem med MySQL-tjeneren." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "Skal MySQL-tilkoblinger støttes fra vertsmaskiner som kjører Debian " +#~ "«sarge» eller eldre?" + +#, fuzzy +#~| msgid "" +#~| "The way passwords were stored was not very secure. This has been " +#~| "improved with the drawback that clients (e.g. PHP) from hosts running " +#~| "Debian 3.1 Sarge will not be able to connect to account which are new or " +#~| "whose password have been changed. See /usr/share/doc/mysql-server-5.6/" +#~| "README.Debian." +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Passord ble tidligere lagret pÃ¥ en lite sikker mÃ¥te. Dette er nÃ¥ " +#~ "forbedret, med den ulempen at klienter (f.eks. PHP) fra verter som kjører " +#~ "Debian 3.1 Sarge ikke vil kunne koble til en konto som er ny eller har " +#~ "fÃ¥tt endret passordet. Se /usr/share/doc/mysql-server-5.6/README.Debian." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "For Ã¥ bruke MySQL mÃ¥ du installere en bruker og gruppe tilsvarende den " +#~ "nedenfor og se til at /var/lib/mysql har riktige rettigheter (uid/gid kan " +#~ "være forskjellig)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group: mysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "Skal databasene brukt av alle MySQL-versjoner fjernes?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "" +#~ "Hvis du ikke oppgir et passord blir det ikke gjort noen endringer med " +#~ "kontoen." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "NÃ¥r installasjonen er ferdig bør det sjekkes at kontoen er ordentlig " +#~ "beskyttet med et passord (mer informasjon finnes i README.Debian)." diff --git a/packaging/deb-in/po/nl.po b/packaging/deb-in/po/nl.po new file mode 100644 index 000000000000..8ddab3c159f4 --- /dev/null +++ b/packaging/deb-in/po/nl.po @@ -0,0 +1,219 @@ +# Dutch mysql-dfsg-5.6 po-debconf translation, +# Copyright (C) 2006 THE PACKAGE'S COPYRIGHT HOLDER +# +# Vincent Zweije , 2006. +# Eric Spreen \n" +"Language-Team: Debian l10n Dutch \n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Wilt u echt een oude versie herstellen?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" +"Er bestaat een bestand genaamd /var/lib/mysql/debian-*.flag op dit systeem." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Zulk een bestand geeft aan dat er eerder een pakket mysql-server met een " +"hogere versie is geïnstalleerd." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Er is geen garantie dat de versie die u op dit moment installeert de huidige " +"databases kan gebruiken." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Belangrijke opmerking voor gebruikers van NIS/YP" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Het gebruik van MySQL onder NIS/YP vereist dat een MySQL gebruikersaccount " +"wordt toegevoegd aan het lokale systeem met:" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"U dient ook de permissies en eigenaren van de map /var/lib/mysql te " +"controleren:" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Wilt u alle MySQL-databases verwijderen?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"De map /var/lib/mysql die de MySQL-databases bevat staat op het punt om " +"verwijderd te worden." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Als u het MySQL-pakket verwijdert om later een meer recente versie te " +"installeren of als een ander mysql-server pakket het al gebruikt, zou de " +"data behouden moeten worden." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Moet MySQL starten als de computer start?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"De MySQL-server kan automatisch worden gestart bij het starten van de " +"computer of slechts wanneer u '/etc/init.d/mysql start' handmatig uitvoert." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nieuw wachtwoord voor de MySQL \"root\"-gebruiker:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Hoewel niet verplicht, wordt het sterk aangeraden een wachtwoord in te " +"stellen voor de administratieve MySQL \"root\"-gebruiker." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" +"Als dit veld leeg wordt gelaten, zal het wachtwoord niet worden veranderd." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Herhaal het wachtwoord voor de MySQL \"root\"-gebruiker:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Kan het wachtwoord voor de MySQL \"root\"-gebruiker niet instellen" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Er is een fout opgetreden bij het instellen van het wachtwoord voor de MySQL " +"administratieve gebruiker. Dat kan komen doordat de gebruiker al een " +"wachtwoord heeft, of omdat er een probleem was bij het communiceren met de " +"MySQL-server." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"U zou het wachtwoord van het account moeten controleren nadat het pakket is " +"geïnstalleerd." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Leest u het bestand /usr/share/doc/mysql-server-5.6/README.Debian voor meer " +"informatie." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "Fout bij invoer wachtwoord" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" +"De twee wachtwoorden die u hebt ingevoerd zijn niet gelijk. Probeert u het " +"opnieuw." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "De NDB-cluster lijkt in gebruik te zijn" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.6 biedt niet langer ondersteuning voor NDB Cluster. Migreer naar het " +"nieuwe pakket mysql-cluster en verwijder alle regels die beginnen met \"ndb" +"\" van alle configuratiebestanden onder /etc/mysql/." diff --git a/packaging/deb-in/po/pt.po b/packaging/deb-in/po/pt.po new file mode 100644 index 000000000000..f142e868937c --- /dev/null +++ b/packaging/deb-in/po/pt.po @@ -0,0 +1,296 @@ +# Portuguese translation for mysql-dfsg-5.6's debconf messages +# Copyright (C) 2006 Miguel Figueiredo +# This file is distributed under the same license as the mysql-dfsg-5.6 package. +# Miguel Figueiredo , 2012 +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.6\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2012-05-28 22:40+0100\n" +"Last-Translator: Miguel Figueiredo \n" +"Language-Team: Portuguese \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Deseja mesmo fazer downgrade?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" +"Existe, neste sistema, um ficheiro chamado /var/lib/mysql/debian-*.flag." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"A existência de tal ficheiro é um indicador que anteriormente foi instalado " +"um pacote mysql-server com um número de versão superior." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Não existe nenhuma garantia que a versão que está actualmente a instalar " +"seja capaz de utilizar as bases de dados actuais." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Nota importante para utilizadores de NIS/YP" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Utilizar MySQL com NIS/YP necessita que seja adicionada uma conta de " +"utilizador de mysql ao sistema local com:" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Deve também verificar as permissões e o dono do directório /var/lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Remover todas as bases de dados MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"O directório /var/lib/mysql que contém as bases de dados MySQL está prestes " +"a ser removido." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Se está a remover o pacote MySQL de modo a posteriormente instalar uma " +"versão mais recente ou se um pacote mysql-server já está os está a utilizar, " +"os dados devem ser mantidos." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Iniciar o servidor MySQL no arranque?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"O MySQL pode ser automaticamente lançado no arranque ou manualmente através " +"do comando '/etc/init.d/mysql start'." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nova palavra-passe para o utilizador \"root\" do MySQL:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Embora não seja obrigatório, é fortemente recomendado que defina uma palavra-" +"passe para o utilizador administrativo \"root\" do MySQL." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" +"Se este campo for deixado em branco, a palavra-passe não irá ser alterada." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Repita a palavra-passe para o utilizador \"root\" de MySQL:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "" +"Não foi possível definir a palavra-passe para o utilizador \"root\" do MySQL" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Ocorreu um erro enquanto era definida a palavra-passe para o utilizador " +"administrativo do MySQL. Isto pode ter acontecido porque a conta já tem uma " +"palavra-passe, ou porque ocorreu um problema ao comunicação com o servidor " +"MySQL." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" +"Você deve verificar a palavra-passe da conta após a instalação do pacote." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Para mais informações, por favor leia o ficheiro /usr/share/doc/mysql-" +"server-5.6/README.Debian." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "Erro de entrada da palavra-passe" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" +"As duas palavras-passe que introduziu não são as mesmas. Por favor tente " +"novamente." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "NDB Cluster parece estar a ser utilizado" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.6 já não disponibiliza suporte para NDB Cluster. Por favor migre " +"para o novo pacote mysql-cluster-server e remova todas as linhas que comecem " +"por \"ndb\" em todos os ficheiros de configuração em /etc/mysql/." + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Para utilizar o MySQL, têm de ser acrescentadas as seguintes entradas " +#~ "para os utilizadores e grupos:" + +#~ msgid "Cannot upgrade if ISAM tables are present!" +#~ msgstr "Não é possível actualizar se estiverem presentes tabelas ISAM!" + +#~ msgid "" +#~ "Recent versions of MySQL can no longer use the old ISAM table format and " +#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " +#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " +#~ "The installation of mysql-server-5.6 will now abort. In case your old " +#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " +#~ "those tables." +#~ msgstr "" +#~ "As versões recentes de MySQL já não podem utilizar o antigo formato de " +#~ "tabelas ISAM e é por isso necessário converter as suas tabelas pra e.g. " +#~ "MyISAM antes da actualização, utilizando \"mysql_convert_table_format\" " +#~ "ou \"ALTER TABLE x ENGINE=MyISAM\". A instalação de mysql-server-5.6 irá " +#~ "agora ser cancelada. Se o seu antigo mysql-server-4.1 for removido apenas " +#~ "reinstale para converter essas tabelas." + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "Suportar ligações MySQL de máquinas que corram Debian \"sarge\" ou mais " +#~ "antigos?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Nas versões antigas de clientes de MySQL em Debian, as palavras-passe não " +#~ "eram guardadas de forma segura. Isto foi melhorado desde aí, no entanto " +#~ "os clientes (como o PHP) de máquinas que corram Debian 3.1 Sarge não irão " +#~ "conseguir ligar-se a contas novas ou cuja palavra-passe foi alterada." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Para utilizar mysql e instalar um utilizador e grupo equivalentes para o " +#~ "seguinte e assegurar-se que /var/lib/mysql têm as permissões correctas (o " +#~ "uid/gid podem ser diferentes)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group: mysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "Remover as bases de dados utilizadas por todas as versões de MySQL?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "" +#~ "Se não disponibilizar uma password não serão feitas alterações nesta " +#~ "conta." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "Quando terminar a instalação, deve verificar se a conta está devidamente " +#~ "protegida com uma password (para mais informações veja README.Debian)." diff --git a/packaging/deb-in/po/pt_BR.po b/packaging/deb-in/po/pt_BR.po new file mode 100644 index 000000000000..e5fa5ee82c46 --- /dev/null +++ b/packaging/deb-in/po/pt_BR.po @@ -0,0 +1,443 @@ +# Brazilian Portuguese (pt_BR) debconf template translation for +# Debian's mysql-dfsg source package. +# Debian-BR Project +# André Luís Lopes, , 2004 +# André Luís Lopes, , 2006 +# André Luís Lopes, , 2007 +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.6\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2007-04-21 15:59-0300\n" +"Last-Translator: André Luís Lopes \n" +"Language-Team: Debian-BR Project \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"pt_BR utf-8\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Realmente proceder com o rebaixamento de versão?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Um arquivo de nome /var/lib/mysql/debian-*.flag existe no sistema." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +#, fuzzy +#| msgid "" +#| "Such file is an indication that a mysql-server package with a higher " +#| "version has been installed earlier." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"A presença de um arquivo como este é uma indicação de que um pacote mysql-" +"server com um número de versão mais alto já foi instalado anteriormente." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Não há garantias de que a versão que você está instalando no momento " +"conseguirá utilizar as bases de dados existentes." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Aviso importante para usuários NIS/YP" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +#, fuzzy +#| msgid "" +#| "You should also check the permissions and the owner of the /var/lib/mysql " +#| "directory:" +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Você deverá também checar as permissões e o dono do diretório /var/lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Remover todas as bases de dados do MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"O diretório /var/lib/mysql, o qual contém as bases de dados do MySQL, está " +"prestes a ser removido." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Caso você esteja removendo o pacote MySQL para posteriormente instalar uma " +"versão mais recente ou, caso uma versão diferente do pacote mysql-server " +"esteja sendo utilizada, os dados deverão ser mantidos." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Iniciar o servidor MySQL junto a inicialização da máquina?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"O servidor MySQL pode ser iniciado automaticamente junto a inicialização da " +"máquina ou manualmente com o comando '/etc/init.d/mysql start'." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nova senha para o usuário \"root\" do MySQL:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Apesar de não ser mandatório, é altamente recomendado que você defina uma " +"senha para o usuário administrativo \"root\" do MySQL." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +#, fuzzy +#| msgid "If that field is left blank, the password will not be changed." +msgid "If this field is left blank, the password will not be changed." +msgstr "Caso este campo seja deixado em branco, a senha não sera mudada." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +#, fuzzy +#| msgid "New password for the MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Nova senha para o usuário \"root\" do MySQL:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Impossível definir senha para o usuário \"root\" do MySQL" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Um erro ocorreu durante a definição da senha para o usuário administrativo " +"do MySQL. Isso pode ter acontecido devido a esse usuário já possuir uma " +"senha definida ou devido a ocorrência de um problema de comunicação com o " +"servidor MySQL." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "You should check the account's password after tha package installation." +msgid "You should check the account's password after the package installation." +msgstr "Você deverá checar a senha dessa conta após a instalação deste pacote." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Por favor, leia o arquivo /usr/share/doc/mysql-server-5.6/README.Debian para " +"maiores informações." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "Para utilizar o MySQL, as seguintes entradas para usuários e grupos devem " +#~ "ser adicionadas ao sistema:" + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "Suportar conexões MySQL originadas de hosts executando o Debian \"sarge\" " +#~ "ou mais antigos ?" + +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Em versões antigas dos clientes MySQL no Debian, as senhas não eram " +#~ "armazenadas de forma segura. Isto foi corrigido desde então, porém, " +#~ "clientes (como o PHP) em hosts executando o Debian 3.1 Sarge não serão " +#~ "capazes de conectar em contas recentes ou contas as quais as senhas " +#~ "tenham sido modificadas." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Para utilizar o MySQL, você deve instalar um usuário e um grupo " +#~ "equivalentes ao usuário e grupo a seguir para se certificar de que o " +#~ "diretório /var/lib/mysql possua as permissões correctas (o uid/gid podem " +#~ "ser diferentes)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group: mysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "Remover as bases de dados utilizadas por todas as versões do MySQL?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "" +#~ "Caso você não forneça uma senha, nenhuma mudança será feita na conta." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "Quando a instalação finalizar, você deverá verificar se a conta está " +#~ "apropriadamente protegida com uma senha (consulte o arquivo README.Debian " +#~ "para maiores informações)." + +#~ msgid "internal" +#~ msgstr "interno" + +#~ msgid "Only internally used." +#~ msgstr "Somente utilizado internamente." + +#, fuzzy +#~ msgid "Update Hints" +#~ msgstr "Dicas de atualização" + +#, fuzzy +#~ msgid "" +#~ "Rarely, e.g. on new major versions, the privilege system is improved. To " +#~ "make use of it mysql_fix_privilege_tables must be executed manually. The " +#~ "script is not supposed to give any user more rights that he had before," +#~ msgstr "" +#~ "Raramente, por exemplo, em novas versões maiores, o sistema de " +#~ "privilégios é melhorado. Para fazer uso disso, o script " +#~ "mysql_fix_privilege_tables deve ser executado manualmente. O script não " +#~ "atribuirá a nenhum usuário mais direitos do que os mesmos já possuíam " +#~ "anteriormente." + +#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html" +#~ msgstr "Por favor, leia http://www.mysql.com/doc/en/Upgrade.html" + +#, fuzzy +#~ msgid "Install Hints" +#~ msgstr "Dicas de instalação" + +#, fuzzy +#~ msgid "" +#~ "MySQL will only install if you have a non-numeric hostname that is " +#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " +#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " +#~ "myhostname\"." +#~ msgstr "" +#~ "O MySQL será instalado somente caso você possua um nome de host NÃO " +#~ "NUMÉRICO que possa ser resolvido através do arquivo /etc/hosts, ou seja, " +#~ "caso o comando \"hostname\" retorne \"myhostname\", uma linha como " +#~ "\"10.0.0.1 myhostname\" deverá existir no arquivo /etc/hosts." + +#~ msgid "" +#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " +#~ "is used in the start/stop and cron scripts. Don't delete." +#~ msgstr "" +#~ "Um novo usuário MySQL de nome \"debian-sys-maint\" será criado. Essa " +#~ "conta MySQL é utilizada pelos scripts de inicialização/parada e pelos " +#~ "scripts cron. Não remova esse usuário." + +#, fuzzy +#~ msgid "" +#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" +#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " +#~ "there, never only the password!" +#~ msgstr "" +#~ "Por favor, lembre-se de definir uma SENHA para o usuário root do MySQL ! " +#~ "Caso você utilize um arquivo /root/.my.cnf, sempre inclua as linhas \"user" +#~ "\" e \"password\" nesse arquivo, nunca somente a senha ! Consulte o " +#~ "arquivo /usr/share/doc/mysql-server/README.Debian para mais informações." + +#~ msgid "" +#~ "Should I remove all databases below /var/lib/mysql as you are purging the " +#~ "mysql-server package?" +#~ msgstr "" +#~ "Todas as base de dados sob o diretório /var/lib/mysql devem ser removidas " +#~ "quando você remover o pacote pacote mysql-server ?" + +#~ msgid "" +#~ "Networking is disabled by default for security reasons. You can enable it " +#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf." +#~ msgstr "" +#~ "O suporte ao funcionamento em rede está desativado por padrão por " +#~ "questões de segurança. Você poderá ativá-lo comentando a opção 'skip-" +#~ "networking' no arquivo /etc/mysql/my.cnf." + +#~ msgid "security and update notice" +#~ msgstr "aviso de segurança e actualização" + +#~ msgid "" +#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-" +#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. " +#~ "remove everything including the configuration) somewhen? (default is not)" +#~ msgstr "" +#~ "Devo remover tudo abaixo de /var/lib/mysql quando fizer o purge do pacote " +#~ "mysql-server com o comando \"dpkg --purge mysql-server\" (ou seja, " +#~ "remover tudo incluíndo a configuração)? (o padrão é não remover)" + +#~ msgid "Make MySQL reachable via network?" +#~ msgstr "Fazer com que o MySQL seja acessível via rede?" + +#~ msgid "" +#~ "Should MySQL listen on a network reachable TCP port? This is not " +#~ "necessary for use on a single computer and could be a security problem." +#~ msgstr "" +#~ "O MySQL deve aguardar ligações numa porta TCP acessível via rede? Isto " +#~ "não é necessário para uso num único computador e pode ser um problema de " +#~ "segurança." + +#~ msgid "Enable chroot mode?" +#~ msgstr "Activar o modo chroot?" + +#~ msgid "" +#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so " +#~ "that users cannot modify any files outside this directory. This improves " +#~ "resistence against crackers, too, as they are not able to modify system " +#~ "files." +#~ msgstr "" +#~ "O MySQL é capaz de se prender no diretório /var/lib/mysql_jail, assim os " +#~ "utilizadores não poderão modificar ficheiros fora deste directório. Isto " +#~ "aumenta também a resistência contra crackers, pois eles não poderão " +#~ "modificar arquivos de sistema." + +#~ msgid "Please run mysql_fix_privilege_tables !" +#~ msgstr "Por favor execute mysql_fix_privilege_tables !" + +#~ msgid "" +#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs " +#~ "other than root and mysql with mysql." +#~ msgstr "" +#~ "Permissões seguras para o diretório /var/lib/mysql serão asseguradas " +#~ "substituíndo GIDs diferentes de root e mysql por mysql." + +#~ msgid "" +#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/" +#~ msgstr "" +#~ "Instruções sobre como activar o suporte de SSL estão disponíveis no " +#~ "directório /usr/share/doc/mysql-server/." + +#, fuzzy +#~ msgid "mysql_fix_privileges_tables should be executed" +#~ msgstr "mysql_fix_privileges_tables será executado" + +#, fuzzy +#~ msgid "" +#~ "The latest MySQL versions have an enhanced, more fine grained, privilege " +#~ "system. To make use of it, some new fields must be added to the tables " +#~ "in the \"mysql\" database. This will not happen automatically." +#~ msgstr "" +#~ "As últimas versões do MySQL possuem um sistema de privilégios melhorado e " +#~ "mais refinado. Para utilizá-lo, alguns novos campos devem ser adicionados " +#~ "as tabelas na base de dados \"mysql\". Isto é feito pelo script " +#~ "mysql_fix_privileges_tables durante esta actualização independente do " +#~ "servidor estar a correr ou não !" + +#~ msgid "" +#~ "This script is not supposed to give any user more rights that he had " +#~ "before, if you encounter such a case, please contact me." +#~ msgstr "" +#~ "Este script não deverá fornecer mais direitos a um utilizador além dos " +#~ "quais ele já possua anteriormente. SE encontrar um caso desses, por favor " +#~ "entre em contacto com o mantainer deste pacote Debian." diff --git a/packaging/deb-in/po/ro.po b/packaging/deb-in/po/ro.po new file mode 100644 index 000000000000..0e482258bd4f --- /dev/null +++ b/packaging/deb-in/po/ro.po @@ -0,0 +1,319 @@ +# Romanian translation of mysql-dfsg. +# Copyright (C) 2006 THE mysql-dfsg'S COPYRIGHT HOLDER +# This file is distributed under the same license as the mysql-dfsg package. +# +# Stan Ioan-Eugen , 2006. +msgid "" +msgstr "" +"Project-Id-Version: po-debconf://mysql-dfsg\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2006-12-20 21:27+0200\n" +"Last-Translator: stan ioan-eugen \n" +"Language-Team: romanian \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +#, fuzzy +#| msgid "Do you really want to downgrade?" +msgid "Really proceed with downgrade?" +msgstr "SunteÅ£i sigur că doriÅ£i să instalaÅ£i o versiune mai veche?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +#, fuzzy +#| msgid "" +#| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates " +#| "that a mysql-server package with a higher version has been installed " +#| "before. It can not be guaranteed that this version can use its data." +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"AVERTISMENT: FiÅŸierul /var/lib/mysql/debian-*.flag există. Acest lucru " +"indică faptul că anterior a fost instalată o versiune nouă a pachetului " +"mysql-server. Nu se poate garanta că versiunea instalată acum poate folosi " +"datele versiunii instalate anterior." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +#, fuzzy +#| msgid "Important note for NIS/YP users!" +msgid "Important note for NIS/YP users" +msgstr "Notă importantă pentru utilizatorii NIS/YP!" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +#, fuzzy +#| msgid "" +#| "The script is about to remove the data directory /var/lib/mysql. If it is " +#| "planned to just install a higher MySQL version or if a different mysql-" +#| "server package is already using it, the data should be kept." +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Scriptul urmează să ÅŸteargă directorul de date /var/lib/mysql. Dacă plănuiÅ£i " +"doar să instalaÅ£i o versiune nouă MySQL sau datele sunt folosite de către un " +"alt pachet mysql-server, atunci ar trebui păstraÅ£i datele." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +#, fuzzy +#| msgid "Should MySQL start on boot?" +msgid "Start the MySQL server on boot?" +msgstr "DoriÅ£i ca MySQL să pornească la initializarea sistemului?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +#, fuzzy +#| msgid "" +#| "The MySQL can start automatically on boot time or only if you manually " +#| "type '/etc/init.d/mysql start'." +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL poate porni automat la iniÅ£ializarea sistemului sau doar dacă rulaÅ£i " +"comanda „/etc/init.d/mysql startâ€." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +#, fuzzy +#| msgid "New password for MySQL \"root\" user:" +msgid "New password for the MySQL \"root\" user:" +msgstr "Noua parolă pentru utilizatorul „root†al MySQL:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +#, fuzzy +#| msgid "" +#| "It is highly recommended that you set a password for the MySQL " +#| "administrative \"root\" user." +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Este recomandat să stabiliÅ£i o parolă pentru utilizatorul administrativ " +"„root†al MySQL." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +#, fuzzy +#| msgid "New password for MySQL \"root\" user:" +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Noua parolă pentru utilizatorul „root†al MySQL:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "Unable to set password for MySQL \"root\" user" +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Nu s-a putut stabili parola pentru utilizatorul „root†al MySQL" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "It seems an error occurred while setting the password for the MySQL " +#| "administrative user. This may have happened because the user already has " +#| "a password, or because there was a problem communicating with the MySQL " +#| "server." +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Se pare că a intervenit o eroare în stabilirea parolei pentru utilizatorul " +"administrativ al MySQL. Acest lucru se poate întâmpla dacă utilizatorul are " +"deja o parolă, sau a existat o problemă în comunicarea cu serverul MySQL." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "Cannot upgrade if ISAM tables are present!" +#~ msgstr "Nu se poate face actualizarea dacă sunt prezente tabele ISAM!" + +#~ msgid "" +#~ "Recent versions of MySQL can no longer use the old ISAM table format and " +#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by " +#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". " +#~ "The installation of mysql-server-5.6 will now abort. In case your old " +#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert " +#~ "those tables." +#~ msgstr "" +#~ "Versiunile recente MySQL nu mai pot folosi vechiul format de tabele ISAM " +#~ "ÅŸieste necesar să convertiÅ£i tabelele dumneavoastră de ex. la formatul " +#~ "MyISAM înainte de a face actualizarea folosind comanda " +#~ "„mysql_convert_table_format†sau „ALTER TABLE x ENGINE=MyISAMâ€. " +#~ "Instalarea mysql-server-5.6 va eÅŸua. ÃŽn caz că ÅŸtergeÅ£iversiunea " +#~ "anterioară mysql-server-4.1 va trebui reinstalată pentru a converti " +#~ "tabelele." + +#~ msgid "" +#~ "Support MySQL connections from hosts running Debian \"sarge\" or older?" +#~ msgstr "" +#~ "SuportaÅ£i conexiuni MySQL de la staÅ£ii ce rulează sistemul Debian „sarge†" +#~ "sau mai vechi?" + +#, fuzzy +#~| msgid "" +#~| "The way passwords were stored was not very secure. This has been " +#~| "improved with the drawback that clients (e.g. PHP) from hosts running " +#~| "Debian 3.1 Sarge will not be able to connect to account which are new or " +#~| "whose password have been changed. See /usr/share/doc/mysql-server-5.6/" +#~| "README.Debian." +#~ msgid "" +#~ "In old versions of MySQL clients on Debian, passwords were not stored " +#~ "securely. This has been improved since then, however clients (such as " +#~ "PHP) from hosts running Debian 3.1 Sarge will not be able to connect to " +#~ "recent accounts or accounts whose password have been changed." +#~ msgstr "" +#~ "Modul în care erau păstrate parolele nu era foarte sigur. Acest lucru a " +#~ "fost îmbunătăţitcu dezajantajul că clienÅ£ii (de ex. PHP) de pe staÅ£ii ce " +#~ "rulează sistemul Debian 3.1 Sargenu se vor putea conecta la conturi noi " +#~ "sau ale căror parole au fost schimbate. CitiÅ£i /usr/share/doc/mysql-" +#~ "server-5.6/README.Debian." + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Pentru a folosi mysql trebuie să adăugaÅ£i un utilizator ÅŸi grup " +#~ "echivalent ÅŸi să vă asiguraÅ£i că /var/lib/mysql are permisiunile " +#~ "stabilite corect (uid/gid pot aveavalori diferite)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd:\tmysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group:\tmysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql:\tdrwxr-xr-x\tmysql\tmysql" + +#~ msgid "Remove the databases used by all MySQL versions?" +#~ msgstr "DoriÅ£i să ÅŸtergeÅ£i bazele de date folosite de toate versiune MySQL?" + +#~ msgid "" +#~ "If you do not provide a password no changes will be made to the account." +#~ msgstr "" +#~ "Dacă nu introduceÅ£i nici o parolă, nici o schimbare nu va fi luată în " +#~ "considerare." + +#~ msgid "" +#~ "When installation finishes, you should verify that the account is " +#~ "properly protected with a password (see README.Debian for more " +#~ "information)." +#~ msgstr "" +#~ "După finalizarea instalării, ar trebui să verificaÅ£i dacă contul este " +#~ "protejat cu o parolă (citiÅ£i fiÅŸierul README.Debian pentru informaÅ£ii " +#~ "suplimentare)." diff --git a/packaging/deb-in/po/ru.po b/packaging/deb-in/po/ru.po new file mode 100644 index 000000000000..59fbe33f1176 --- /dev/null +++ b/packaging/deb-in/po/ru.po @@ -0,0 +1,220 @@ +# translation of ru.po to Russian +# Russian messages: +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry'# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +# Ilgiz Kalmetev , 2003. +# Yuriy Talakan' , 2005, 2006. +# Yuriy Talakan' , 2007. +# Yuri Kozlov , 2009, 2012. +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.6 5.6.8-1\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2012-05-23 21:14+0400\n" +"Last-Translator: Yuri Kozlov \n" +"Language-Team: Russian \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "ДейÑтвительно уÑтановить более Ñтарую верÑию?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Ð’ ÑиÑтеме найден файл /var/lib/mysql/debian-*.flag." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Это означает, что ранее уже был уÑтановлен пакет mysql-server более новой " +"верÑии." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Ðет гарантий, что верÑиÑ, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑƒÑтанавливаетÑÑ ÑейчаÑ, будет ÑпоÑобна " +"работать Ñ Ð¸Ð¼ÐµÑŽÑ‰Ð¸Ð¼Ð¸ÑÑ Ð±Ð°Ð·Ð°Ð¼Ð¸ данных." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Важное замечание Ð´Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÐµÐ¹ NIS/YP" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"ИÑпользование MySQL в NIS/YP требует Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ ÑƒÑ‡Ñ‘Ñ‚Ð½Ð¾Ð¹ запиÑи mysql в " +"локальную ÑиÑтему Ñ:" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "Также проверьте права доÑтупа и владельца каталога /var/lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Удалить вÑе базы данных MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð½Ð° удаление каталога /var/lib/mysql, Ñодержащий базы данных MySQL." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"ЕÑли вы удалÑете пакет MySQL Ð´Ð»Ñ ÑƒÑтановки более новой верÑии MySQL, или " +"еÑÑ‚ÑŒ другие пакеты mysql-server, иÑпользующие Ñтот каталог, то данные лучше " +"Ñохранить." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "ЗапуÑкать MySQL при загрузке ÑиÑтемы?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"Сервер MySQL можно запуÑкать автоматичеÑки при загрузке ÑиÑтемы или вручную " +"по команде '/etc/init.d/mysql start'." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Ðовый пароль Ð´Ð»Ñ MySQL Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Â«root»:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Ð¥Ð¾Ñ‚Ñ Ð¸ необÑзательно, но наÑтоÑтельно рекомендуетÑÑ ÑƒÑтановить пароль Ð´Ð»Ñ " +"админиÑтративного Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ MySQL «root»." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "ЕÑли оÑтавить поле пуÑтым, то пароль изменён не будет." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Повторите ввод Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð´Ð»Ñ MySQL Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Â«root»:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Ðевозможно задать пароль MySQL пользователю «root»" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Ð’ процеÑÑе Ð·Ð°Ð´Ð°Ð½Ð¸Ñ Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð°Ð´Ð¼Ð¸Ð½Ð¸Ñтративного MySQL Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¿Ñ€Ð¾Ð¸Ð·Ð¾ÑˆÐ»Ð° " +"ошибка. Это могло произойти, еÑли у Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ ÑƒÐ¶Ðµ был задан пароль, или " +"из-за проблем ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ Ñервером MySQL." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "Проверьте пароль учётной запиÑи поÑле уÑтановки пакета." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "ПодробноÑти Ñм. в файле /usr/share/doc/mysql-server-5.6/README.Debian." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "Ошибка ввода паролÑ" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "Два введённых Ð¿Ð°Ñ€Ð¾Ð»Ñ Ð½Ðµ одинаковы. Повторите ввод." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "NDB Cluster уже иÑпользуетÑÑ" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.6 больше не поддерживает NDB Cluster. Переходите на новый пакет " +"mysql-cluster-server и удалите вÑе Ñтроки, начинающиеÑÑ Ñ Â«ndb», из вÑех " +"файлов наÑтройки в каталоге /etc/mysql/." diff --git a/packaging/deb-in/po/sk.po b/packaging/deb-in/po/sk.po new file mode 100644 index 000000000000..630a9a17e85d --- /dev/null +++ b/packaging/deb-in/po/sk.po @@ -0,0 +1,219 @@ +# Slovak translations for mysql-5.1 package +# Slovenské preklady pre balík mysql-5.1. +# Copyright (C) 2011 THE mysql-5.1'S COPYRIGHT HOLDER +# This file is distributed under the same license as the mysql-5.1 package. +# Slavko , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-5.1 5.1.49-3\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2011-01-04 12:55+0100\n" +"Last-Translator: Slavko \n" +"Language-Team: Slovak \n" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Naozaj pokraÄovaÅ¥ v znížení verzie?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "Súbor s menom /var/lib/mysql/debian-*.flag už v systéme existuje." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"Takýto súbor udáva, že už bol predtým nainÅ¡talovaný balík mysql-server s " +"vyÅ¡Å¡ou verziou." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Neexistuje žiadna záruka, že aktuálne inÅ¡talovaná verzia dokáže pracovaÅ¥ s " +"existujúcimi databázami." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Dôležitá poznámka pre používateľov NIS/YP" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"Používanie MySQL pod NIS/YP vyžaduje aby bol používateľský úÄet mysql " +"pridaný do lokálneho systému pomocou:" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Mali by ste tiež skontrolovaÅ¥ vlastníctvo a práva k adresáru /var/lib/mysql:" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "OdstrániÅ¥ vÅ¡etky databázy MySQL?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Adresár /var/lib/mysql, ktorý obsahuje databázy MySQL, bude odstránený." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Ak odstraňujete balík MySQL kvôli neskorÅ¡ej inÅ¡talácii najnovÅ¡ej verzie " +"alebo ak ich používa aj iný balík mysql-server, mali by ste údaje ponechaÅ¥." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "SpúšťaÅ¥ MySQL server pri Å¡tarte systému?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL server môže byÅ¥ automaticky spúšťaný pri Å¡tarte systému alebo manuálne " +"príkazom „/etc/init.d/mysql startâ€." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nové heslo MySQL používateľa „rootâ€:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Hoci to nie je vyslovene nutné, je silne odporúÄané nastaviÅ¥ heslo " +"správcovského MySQL úÄtu \"root\"." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "Ak toto pole ponecháte prázdne, heslo nebude zmenené." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Zopakujte heslo MySQL používateľa „root“:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Nemožno nastaviÅ¥ heslo MySQL používateľa „root“" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Pri nastavovaní hesla správcu MySQL nastala chyba. Toto môže nastaÅ¥, ak už " +"úÄet má nastavené heslo alebo kvôli problémom pri komunikácii s MySQL " +"serverom." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "Po inÅ¡talácii balíka by ste mali skontrolovaÅ¥ heslo úÄtu." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +#, fuzzy +#| msgid "" +#| "Please read the /usr/share/doc/mysql-server-5.1/README.Debian file for " +#| "more information." +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"ÄŽalÅ¡ie podrobností nájdete v súbore /usr/share/doc/mysql-server-5.1/README." +"Debian." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "Chyba pri zadávaní hesla" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "Heslá, ktoré ste zadali sa nezhodujú. Skúste prosím znova." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "Vyzerá to, že používate NDB Cluster" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +#, fuzzy +#| msgid "" +#| "MySQL-5.1 no longer provides NDB Cluster support. Please migrate to the " +#| "new mysql-cluster package and remove all lines starting with \"ndb\" from " +#| "all config files below /etc/mysql/." +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"MySQL-5.1 už nepodporuje NDB Cluster. Použite prosím nový balík mysql-" +"cluster a zo vÅ¡etkých konfiguraÄných súborov v /etc/mysql/ odstráňte vÅ¡etky " +"riadky, ktoré zaÄínajú na „ndbâ€." diff --git a/packaging/deb-in/po/sv.po b/packaging/deb-in/po/sv.po new file mode 100644 index 000000000000..ebbb49790c3a --- /dev/null +++ b/packaging/deb-in/po/sv.po @@ -0,0 +1,220 @@ +# Translation of mysql-5.6 debconf template to Swedish +# Copyright (C) 2009, 2012 Martin Bagge +# This file is distributed under the same license as the mysql-5.6 package. +# +# Andreas Henriksson , 2007 +# Martin Bagge , 2009, 2012 +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-5.6 5.0.21-3\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2012-05-30 00:29+0100\n" +"Last-Translator: Martin Bagge / brother \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Swedish\n" +"X-Poedit-Country: Sweden\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "Vill du verkligen genomföra nedgraderingen?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "En fil med namnet /var/lib/mysql/debian-*.flag hittades i systemet." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" +"En sÃ¥dan fil är en indikation pÃ¥ att paketet mysql-server med ett högre " +"versionsnummer har installerats tidigare." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" +"Det finns ingen garanti för att den version som du hÃ¥ller pÃ¥ att installera " +"kommer att kunna använda de aktuella databaserna." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "Viktig information för NIS/YP-användare" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" +"För att kunna använda MySQL under NIS/YP mÃ¥ste ett användarkonto för MySQL " +"läggas till i systemet." + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" +"Du bör ocksÃ¥ kontrollera rättigheterna och ägaren av katalogen /var/lib/" +"mysql." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "Ta bort alla MySQL-databaser?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" +"Katalogen /var/lib/mysql som innehÃ¥ller MySQL-databaser kommer att tas bort." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" +"Om avinstallationen av MySQL-paketet görs för att senare kunna installera en " +"nyare version eller om en annan MySQL-server redan använder filerna ska de " +"inte raderas." + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "Ska MySQL startas vid systemets uppstart?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL-servern kan startas vid systemets uppstart eller manuellt med " +"kommandot \"/etc/init.d/mysql start\"." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "Nytt lösenord för MySQLs \"root\"-användare:" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" +"Det är inte obligatoriskt men starkt rekommenderat att du sätter ett " +"lösenord för MySQLs administrativa \"root\"-användare." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "Om detta fält lämnas tom kommer lösenordet inte att ändras." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "Repetera lösenordet för MySQLs \"root\"-användare:" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "Kunde inte sätta lösenord för MySQLs \"root\"-användare" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" +"Ett fel uppstod när det skulle sättas ett lösenord för MySQLs administrativa " +"användare (\"root\"). Detta kan ha skett för att användaren redan har ett " +"lösenord satt, eller pÃ¥ grund av problem med att kommunicera med MySQL-" +"servern." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "Du bör kontrollera kontots lösenord efter installationen av paketet." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" +"Läs filen /usr/share/doc/mysql-server-5.6/README.Debian för mer information." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "Fel vid inmatning av lösenord" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "De tvÃ¥ lösenorden du angav stämde inte överrens. Prova igen." + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "NDB-kluster används inte" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" +"Stödet för NDB-kluster har tagits bort i MySQL-5.6. Migrera till det nya " +"paketet mysql-cluster-server och ta bort alla rader som inleds med \"ndb\" " +"frÃ¥n alla inställlningsfiler i /etc/mysql/." + +#~ msgid "" +#~ "To use MySQL, the following entries for users and groups should be added " +#~ "to the system:" +#~ msgstr "" +#~ "För att använda MySQL mÃ¥ste följande användare och grupper läggas till i " +#~ "systemet:" diff --git a/packaging/deb-in/po/templates.pot b/packaging/deb-in/po/templates.pot new file mode 100644 index 000000000000..f9b2dca89fc4 --- /dev/null +++ b/packaging/deb-in/po/templates.pot @@ -0,0 +1,187 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: mysql-wsrep-5.6\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "Important note for NIS/YP users" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "Start the MySQL server on boot?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" diff --git a/packaging/deb-in/po/tr.po b/packaging/deb-in/po/tr.po new file mode 100644 index 000000000000..f721a65c20d1 --- /dev/null +++ b/packaging/deb-in/po/tr.po @@ -0,0 +1,342 @@ +# Turkish translation of mysql-server. +# This file is distributed under the same license as the mysql-server package. +# Gürkan Aslan , 2004 +# +msgid "" +msgstr "" +"Project-Id-Version: mysql-dfsg-4.1\n" +"Report-Msgid-Bugs-To: mysql-wsrep-5.6@packages.debian.org\n" +"POT-Creation-Date: 2014-11-23 01:05+0200\n" +"PO-Revision-Date: 2004-06-05 08:53+0300\n" +"Last-Translator: Gürkan Aslan \n" +"Language-Team: Turkish \n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "Really proceed with downgrade?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "A file named /var/lib/mysql/debian-*.flag exists on this system." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"Such a file is an indication that a mysql-server package with a higher " +"version has been installed previously." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:2001 +msgid "" +"There is no guarantee that the version you're currently installing will be " +"able to use the current databases." +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +#, fuzzy +#| msgid "Important note for NIS/YP users!" +msgid "Important note for NIS/YP users" +msgstr "NIS/YP kullanıcıları için önemli not!" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"Using MySQL under NIS/YP requires a mysql user account to be added on the " +"local system with:" +msgstr "" + +#. Type: note +#. Description +#: ../mysql-wsrep-server-5.6.templates:3001 +msgid "" +"You should also check the permissions and ownership of the /var/lib/mysql " +"directory:" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "Remove all MySQL databases?" +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"The /var/lib/mysql directory which contains the MySQL databases is about to " +"be removed." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:4001 +msgid "" +"If you're removing the MySQL package in order to later install a more recent " +"version or if a different mysql-server package is already using it, the data " +"should be kept." +msgstr "" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +#, fuzzy +#| msgid "Should MySQL start on boot?" +msgid "Start the MySQL server on boot?" +msgstr "MySQL açılış sırasında baÅŸlatılsın mı?" + +#. Type: boolean +#. Description +#: ../mysql-wsrep-server-5.6.templates:5001 +#, fuzzy +msgid "" +"The MySQL server can be launched automatically at boot time or manually with " +"the '/etc/init.d/mysql start' command." +msgstr "" +"MySQL açılış sırasında veya '/etc/init.d/mysql start' komutunu vermeniz " +"halinde elle baÅŸlatılabilir. EÄŸer açılışta otomatik olarak baÅŸlatılmasını " +"istiyorsanız burada 'evet'i seçin." + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "New password for the MySQL \"root\" user:" +msgstr "" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "" +"While not mandatory, it is highly recommended that you set a password for " +"the MySQL administrative \"root\" user." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:6001 +msgid "If this field is left blank, the password will not be changed." +msgstr "" + +#. Type: password +#. Description +#: ../mysql-wsrep-server-5.6.templates:7001 +msgid "Repeat password for the MySQL \"root\" user:" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "Unable to set password for the MySQL \"root\" user" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"An error occurred while setting the password for the MySQL administrative " +"user. This may have happened because the account already has a password, or " +"because of a communication problem with the MySQL server." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "You should check the account's password after the package installation." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:8001 +msgid "" +"Please read the /usr/share/doc/mysql-server-5.6/README.Debian file for more " +"information." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "Password input error" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:9001 +msgid "The two passwords you entered were not the same. Please try again." +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "NDB Cluster seems to be in use" +msgstr "" + +#. Type: error +#. Description +#: ../mysql-wsrep-server-5.6.templates:10001 +msgid "" +"MySQL-5.6 no longer provides NDB Cluster support. Please migrate to the new " +"mysql-cluster-server package and remove all lines starting with \"ndb\" from " +"all config files below /etc/mysql/." +msgstr "" + +#~ msgid "" +#~ "To use mysql you must install an equivalent user and group to the " +#~ "following and ensure yourself that /var/lib/mysql has the right " +#~ "permissions (the uid/gid may be different)." +#~ msgstr "" +#~ "Mysql'i kullanmak için aÅŸağıdakiyle eÅŸdeÄŸer bir kullanıcı ve grup " +#~ "tanımlamalı, ve /var/lib/mysql izinlerinin uygun ÅŸekilde ayarlandığından " +#~ "emin olmalısınız (uid/gid farklı olabilir)." + +#~ msgid "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" +#~ msgstr "" +#~ "/etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false" + +#~ msgid "/etc/group: mysql:x:101:" +#~ msgstr "/etc/group: mysql:x:101:" + +#~ msgid "/var/lib/mysql: drwxr-xr-x mysql mysql" +#~ msgstr "/var/lib/mysql: drwxr-xr-x mysql mysql" + +#, fuzzy +#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html" +#~ msgstr "Lütfen http://www.mysql.com/doc/en/Upgrade.html belgesini okuyun" + +#, fuzzy +#~ msgid "" +#~ "MySQL will only install if you have a non-numeric hostname that is " +#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command " +#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 " +#~ "myhostname\"." +#~ msgstr "" +#~ "MySQL sadece /etc/hosts dosyası yoluyla çözülebilir NUMERÄ°K OLMAYAN bir " +#~ "makine adına sahipseniz kurulacaktır. ÖrneÄŸin, eÄŸer \"hostname\" komutu " +#~ "\"makinem\" ismini döndürüyorsa, bu dosya içinde \"10.0.0.1 makinem\" " +#~ "gibi bir satır olmalıdır." + +#, fuzzy +#~ msgid "" +#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account " +#~ "is used in the start/stop and cron scripts. Don't delete." +#~ msgstr "" +#~ "Yeni mysql kullanıcısı \"debian-sys-maint\" yaratılacak. Bu hesap, " +#~ "baÅŸlangıç betiklerinde ve cron içinde kullanılıyor. Bu hesabı silmeyin." + +#, fuzzy +#~ msgid "" +#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /" +#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in " +#~ "there, never only the password!" +#~ msgstr "" +#~ "Lütfen MySQL root kullanıcısı için bir PAROLA girmeyi unutmayın! EÄŸer /" +#~ "root/.my.cnf kullanıyorsanız, \"user\" ve \"password\" satırlarını her " +#~ "zaman buraya ekleyin, sadece parolayı deÄŸil! Daha fazla bilgi için /usr/" +#~ "share/doc/mysql-server/README.Debian dosyasını okuyun." + +#, fuzzy +#~ msgid "" +#~ "Should I remove all databases below /var/lib/mysql as you are purging the " +#~ "mysql-server package?" +#~ msgstr "" +#~ "mysql-server paketi kaldırıldıktan sonra bütün veritabanları silinsin mi?" + +#~ msgid "" +#~ "Networking is disabled by default for security reasons. You can enable it " +#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf." +#~ msgstr "" +#~ "AÄŸ, öntanımlı olarak güvenlik gerekçeleriyle devre dışı bırakıldı. Bu " +#~ "özelliÄŸi /etc/mysql/my.cnf dosyası içindeki \"skip-networking\" " +#~ "seçeneÄŸini kaldırarak etkinleÅŸtirebilirsiniz." + +#~ msgid "security and update notice" +#~ msgstr "güvenlik ve güncelleme duyurusu" + +#~ msgid "" +#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-" +#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. " +#~ "remove everything including the configuration) somewhen? (default is not)" +#~ msgstr "" +#~ "mysql-server paketini temizlemek için \"dpkg --purge mysql-server\" " +#~ "komutunu kullandığınızda (yani yapılandırma dahil herÅŸeyi silmek) /var/" +#~ "lib/mysql altındaki herÅŸeyi sileyim mi? (öntanımlı cevap hayır'dır)." + +#~ msgid "Please run mysql_fix_privilege_tables !" +#~ msgstr "Lütfen mysql_fix_privilege_tables komutunu çalıştırın!" + +#~ msgid "" +#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs " +#~ "other than root and mysql with mysql." +#~ msgstr "" +#~ "/var/lib/mysql'in izinlerinin güvenli olmasını saÄŸlamak amacıyla, buna " +#~ "ait GID'leri root ve mysql'den farklı olacak ÅŸekilde deÄŸiÅŸtireceÄŸim." + +#~ msgid "" +#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/" +#~ msgstr "" +#~ "SSL desteÄŸini nasıl etkinleÅŸtirebileceÄŸinize iliÅŸkin talimatlar /usr/" +#~ "share/doc/mysql-server/ içinde." + +#~ msgid "mysql_fix_privileges_tables will be executed" +#~ msgstr "mysql_fix_privileges_tables çalıştırılacak" + +#~ msgid "" +#~ "The latest MySQL versions have an enhanced, more fine grained, privilege " +#~ "system. To make use of it, some new fields must be added to the tables " +#~ "in the \"mysql\" database. This is done by the " +#~ "mysql_fix_privilege_tables script during this upgrade regardless of if " +#~ "the server is currently running or not!" +#~ msgstr "" +#~ "En son MySQL sürümleri zenginleÅŸtirilmiÅŸ, daha ayrıntılandırılmış bir " +#~ "ayrıcalık (privilege) sistemine sahiptir. Yeni sistemi kullanmak için, " +#~ "\"mysql\" veritabanındaki tablolara bazı yeni alanlar eklenmelidir. Bu " +#~ "iÅŸlem, sunucunun çalışıp çalışmamasına baÄŸlı olmaksızın " +#~ "mysql_fix_privilege_tables betiÄŸi tarafından bu yükseltme sırasında " +#~ "yapılır." + +#~ msgid "" +#~ "This script is not supposed to give any user more rights that he had " +#~ "before, if you encounter such a case, please contact me." +#~ msgstr "" +#~ "Bu betiÄŸin hiç bir kullanıcıya öncekinden daha fazla hak kazandırmadığı " +#~ "varsayılıyor. EÄŸer bunun aksinde bir durumla karşılaşırsanız, lütfen " +#~ "benimle baÄŸlantıya geçin." + +#~ msgid "Make MySQL reachable via network?" +#~ msgstr "MySQL network üzerinden ulaşılabilir olsun mu?" + +#~ msgid "" +#~ "Should MySQL listen on a network reachable TCP port? This is not " +#~ "necessary for use on a single computer and could be a security problem." +#~ msgstr "" +#~ "MySQL aÄŸ üzerinde ulaşılabilen bir TCP portunu dinlesin mi? Tek olan bir " +#~ "bilgisayar için bu ayar gerekli deÄŸildir ve bir güvenlik sorunu " +#~ "oluÅŸturabilir." + +#~ msgid "Enable chroot mode?" +#~ msgstr "chroot kipi etkinleÅŸtirilsin mi?" + +#~ msgid "" +#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so " +#~ "that users cannot modify any files outside this directory. This improves " +#~ "resistence against crackers, too, as they are not able to modify system " +#~ "files." +#~ msgstr "" +#~ "MySQL kendini /var/lib/mysql_jail dizinine hapsederek kullanıcıların bu " +#~ "dizin dışındaki hiç bir dosyayı deÄŸiÅŸtirmemesini saÄŸlayabilir. Bu " +#~ "düzenleme, sistem dosyalarını deÄŸiÅŸtirmelerini engelleyeceÄŸinden, " +#~ "cracker'lara karşı dayanıklılığı arttırır." diff --git a/packaging/deb-in/rules.in b/packaging/deb-in/rules.in index 2b81f2dcf2fc..f5174adf7660 100644 --- a/packaging/deb-in/rules.in +++ b/packaging/deb-in/rules.in @@ -84,7 +84,7 @@ override_dh_auto_install: install -m 0644 support-files/wsrep.cnf debian/tmp/usr/share/mysql # SysV init stuff, or Systemd files ? On Debian 8, we need both! #ifneq (,$(findstring SYSV,@DEB_STARTUP@)) -# install -D -m 0755 support-files/mysql.server debian/tmp/etc/init.d/mysql + install -D -m 0755 support-files/mysql.server debian/tmp/etc/init.d/mysql #endif #ifneq (,$(findstring SYSTEMD,@DEB_STARTUP@)) # install -m 0755 scripts/mysqld_bootstrap debian/tmp/usr/bin/ @@ -103,7 +103,7 @@ override_dh_auto_install: # add apparmor profile @DEB_RULES_INSTALL_APPARMOR@ # add systemd script - @DEB_RULES_INSTALL_SYSTEMD@ + #@DEB_RULES_INSTALL_SYSTEMD@ # add directory for legal docs install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-server install -g root -o root -m 0755 -d debian/tmp/usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@ From b2bd96bdb1137709fa01897148e781c6ea2703f3 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Tue, 16 May 2017 13:51:29 +0300 Subject: [PATCH 183/305] MW-371: append wsrep version to deb package version --- packaging/deb-in/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 7f6d030aa317..9df2054f9b7a 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -37,6 +37,9 @@ ELSE() SET (DEB_CONTROL_SERVER_CONFLICT_NDB "mysql-cluster-community-server, mysql-cluster-commercial-server") SET (DEB_CONTROL_CLIENT_CONFLICT_NDB "mysql-cluster-community-client, mysql-cluster-commercial-client") ENDIF() + +SET (DEB_BASE_VERSION "${DEB_BASE_VERSION}+wsrep${WSREP_VERSION}") + # Commercial or community IF (DEB_PRODUCT STREQUAL "commercial") message (FATAL_ERROR "mysql-wsrep is GPL only, no commercial builds") @@ -89,6 +92,7 @@ SET (DEB_PRODUCTNAME "wsrep") SET (DEB_PRODUCTNAMEC "Wsrep") SET (DEB_PRODUCTSERIES "-5.6") + SET (FILES_STARTUP_SYSV " etc/init.d/mysql From 513f11cb5a60a537d76e68f9417441fceb2a0e01 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Tue, 16 May 2017 15:34:23 +0300 Subject: [PATCH 184/305] MW-371: more fixes 1. return my-default.cnf for mysql_install_db 2. do not install init.d script from debian upstream as it is not working with systemd - install the one from support-files instead --- packaging/deb-in/extra/mysql-helpers | 53 +------------------ ...ysql-packagesource-common-SERIES.postrm.in | 1 - ...sql-packagesource-server-SERIES.install.in | 3 +- packaging/deb-in/rules.in | 10 +++- 4 files changed, 13 insertions(+), 54 deletions(-) diff --git a/packaging/deb-in/extra/mysql-helpers b/packaging/deb-in/extra/mysql-helpers index f91f92c11bfa..538177d193c9 100644 --- a/packaging/deb-in/extra/mysql-helpers +++ b/packaging/deb-in/extra/mysql-helpers @@ -62,48 +62,11 @@ get_running () { fi } -get_path () { - my_print_defaults mysqld | grep "$1" | cut -d= -f2 | tail -n 1 -} - -get_recover_pos () { - wsrep_start_position_opt="" - - LOG=$(mktemp --tmpdir=/var/lib/mysql-files/ --suffix=.log) - chown mysql.mysql $LOG - /usr/sbin/mysqld --user=mysql --wsrep_recover --log-error=$LOG - - local rp="$(grep 'WSREP: Recovered position:' $LOG | tail -n 1)" - if [ -z "$rp" ]; then - local skipped="$(grep WSREP $LOG | grep 'skipping position recovery')" - if [ -z "$skipped" ]; then - systemd-cat -t mysql -p err echo "WSREP: Failed to recover position:" - exit 1 - else - systemd-cat -t mysql -p info echo "WSREP: Position recovery skipped" - fi - else - local start_pos="$(echo $rp | sed 's/.*WSREP\:\ Recovered\ position://' \ - | sed 's/^[ \t]*//')" - systemd-cat -t mysql -p info echo "WSREP: Recovered position $start_pos" - wsrep_start_position_opt="--wsrep_start_position=$start_pos" - fi - rm -f $LOG - - if [ -n "$start_pos" ]; then - systemctl set-environment MYSQLD_RECOVER_START="$wsrep_start_position_opt" - fi -} - -clear_recover_pos () { - systemctl unset-environment MYSQLD_RECOVER_START -} - # Runs an arbitrary init sql file supplied in $1. Does not require login access run_init_sql() { tmpdir=$(mktemp -d) chown mysql:mysql "$tmpdir" - /usr/sbin/mysqld --user=mysql --init-file="$1" --socket="$tmpdir/mysqld.sock" --pid-file="$tmpdir/mysqld.pid" > /dev/null 2>&1 + mysqld --bootstrap --user=mysql --socket="$tmpdir/mysqld.sock" --pid-file="$tmpdir/mysqld.pid" > /dev/null 2>&1 < "$1" result=$? rm -rf "$tmpdir" return $result @@ -178,19 +141,7 @@ verify_database() { MYSQLFILES=$(get_mysql_option mysqld secure-file-priv "/var/lib/mysql-files") if [ ! -d "${MYSQLDATA}/mysql" ] && [ -d "${MYSQLFILES}" ]; then - su - mysql -s /bin/bash -c "/usr/sbin/mysqld --initialize-insecure > /dev/null" - SQL=$(mktemp -u ${MYSQLFILES}/XXXXXXXXXX) - install /dev/null -m0600 -omysql -gmysql "${SQL}" - cat << EOF > ${SQL} -USE mysql; -INSTALL PLUGIN auth_socket SONAME 'auth_socket.so'; -ALTER USER 'root'@'localhost' IDENTIFIED WITH 'auth_socket'; -SHUTDOWN; -EOF - run_init_sql "$SQL" - rm -f "$SQL" - else - get_recover_pos + su - mysql -s /bin/bash -c "mysql_install_db --user=mysql > /dev/null" fi if [ -x /usr/bin/mysql_ssl_rsa_setup -a ! -e "${MYSQLDATA}/server-key.pem" ]; then diff --git a/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in b/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in index f79a243935de..fb916686ba2f 100644 --- a/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in +++ b/packaging/deb-in/mysql-packagesource-common-SERIES.postrm.in @@ -19,7 +19,6 @@ set -e if [ "$1" = "purge" ]; then rmdir /etc/mysql 2>/dev/null || true - update-alternatives --remove-all my.cnf fi #DEBHELPER# diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in index 071f377492a6..924d1c7d6027 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -14,7 +14,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # debian/extra/mysql-systemd-start usr/share/mysql/ -debian/extra/mysql.cnf etc/mysql/ +#debian/extra/mysql.cnf etc/mysql/ # debian/extra/mysql.conf.d etc/mysql/ # debian/extra/source_mysql-5.7.py usr/share/apport/package-hooks/ @DEB_INSTALL_SERVER_APPARMOR@ @@ -74,6 +74,7 @@ usr/share/man/man1/resolveip.1 usr/share/man/man1/resolve_stack_dump.1 usr/share/man/man8/mysqld.8 # confguration files +usr/share/mysql/my-default.cnf debian/extra/mysql.cnf etc/mysql/ debian/extra/mysqld.cnf /etc/mysql/mysql.conf.d/ # app armor profile diff --git a/packaging/deb-in/rules.in b/packaging/deb-in/rules.in index f5174adf7660..cce62ab06511 100644 --- a/packaging/deb-in/rules.in +++ b/packaging/deb-in/rules.in @@ -150,11 +150,19 @@ override_dh_auto_install: override_dh_installlogrotate-arch: dh_installlogrotate --name mysql-server +ifneq (,$(findstring SYSTEMD,@DEB_STARTUP@)) +#use upstream init to bypass systemd for 5.6.36 release +INSTALLINITOPTS="" +else +INSTALLINITOPTS="--onlyscripts" +endif + override_dh_installinit: @echo "RULES.$@" @DEB_RULES_APPARMOR_LOAD@ @DEB_RULES_SYSTEMD_ENABLE@ - dh_installinit --name=mysql -- defaults 19 21 + + dh_installinit $(INSTALLINITOPTS) --name=mysql -- defaults 19 21 @DEB_RULES_SYSTEMD_START@ touch $@ From b7c4c8eafb4a2460c0dcca2e8eed0b2dcbbb0386 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Mon, 1 May 2017 19:26:25 +0300 Subject: [PATCH 185/305] IN-4: alter CMakeLists to produce a dummy mysql-common replacement This change assumes that we provide a dummy replacement for mysql-common package to satisfy dependencies while depending on the original mysql-wsrep-commpon-5.7 --- packaging/deb-in/CMakeLists.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 9df2054f9b7a..9c354c25bd8e 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -326,4 +326,27 @@ ENDFOREACH() EXECUTE_PROCESS( COMMAND chmod +x ${CMAKE_BINARY_DIR}/debian/rules ) +IF(DEB_PRODUCTNAME STREQUAL "wsrep") +FILE(APPEND "${CMAKE_BINARY_DIR}/debian/control" " +Package: mysql-common +Architecture: any +Pre-depends: debconf (>= 0.2.17), + \${misc:Pre-Depends} +Multi-Arch: foreign +Depends: \${misc:Depends}, + \${shlibs:Depends}, + mysql-wsrep-common-5.6 +Description: MySQL Common + 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 + Oracle. This package contains common files needed by MySQL client + library and the MySQL database server. + This package is a dummy replacement for the case when using mysql WSREP + implementation to satisfy dependencies of other packages + like libmysqlclient18 +") +ENDIF() + From 2a1441feaab26cb9c29034ce34086f2172c05073 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Wed, 17 May 2017 19:07:04 +0300 Subject: [PATCH 186/305] IN-4: relax the restrictions on libmysqlclient18 dependencies --- packaging/deb-in/control.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/deb-in/control.in b/packaging/deb-in/control.in index 1ca99bb7a649..de8cb6eeada2 100644 --- a/packaging/deb-in/control.in +++ b/packaging/deb-in/control.in @@ -128,7 +128,7 @@ Architecture: any Section: libs Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same -Depends: mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@ (= ${binary:Version}), +Depends: mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@, ${misc:Depends}, ${shlibs:Depends} Description: MySQL shared client libraries From 9451a93996da490f504bdb5995048283cceb0b74 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Thu, 18 May 2017 13:11:21 +0300 Subject: [PATCH 187/305] IN-4: change provides and dependencies for mysql-common dummy package 1. Provide mysql-wsrep-common with mysql-wsrep-common-5.6 2. Make mysql-common dummy package depend on mysql-wsrep-common of any version --- packaging/deb-in/CMakeLists.txt | 4 ++-- packaging/deb-in/control.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 9c354c25bd8e..4277767fb16e 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -335,7 +335,7 @@ Pre-depends: debconf (>= 0.2.17), Multi-Arch: foreign Depends: \${misc:Depends}, \${shlibs:Depends}, - mysql-wsrep-common-5.6 + mysql-wsrep-common Description: MySQL Common The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server @@ -345,7 +345,7 @@ Description: MySQL Common library and the MySQL database server. This package is a dummy replacement for the case when using mysql WSREP implementation to satisfy dependencies of other packages - like libmysqlclient18 + like libmysqlclient18. It depends on any mysql-wsrep-common ") ENDIF() diff --git a/packaging/deb-in/control.in b/packaging/deb-in/control.in index de8cb6eeada2..e9296f554caf 100644 --- a/packaging/deb-in/control.in +++ b/packaging/deb-in/control.in @@ -159,7 +159,7 @@ Replaces: mysql, mysql-server-5.6, mysql-server-core-5.6, mariadb-server-5.5, percona-xtradb-cluster-common-5.5, mysql-common (<< 5.6.35) -Provides: mysql-common +Provides: mysql-common, mysql-@DEB_PRODUCTNAME@-common Description: MySQL Common The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server From dfa1461a7de63a16e1bc56c757767a0037f2606a Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Thu, 18 May 2017 18:01:19 +0300 Subject: [PATCH 188/305] MW-371: fix some missing files and licenses --- packaging/deb-in/CMakeLists.txt | 1 + .../deb-in/mysql-packagesource-client-SERIES.install.in | 3 +++ .../deb-in/mysql-packagesource-server-SERIES.install.in | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 4277767fb16e..2e18cf2bba93 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -91,6 +91,7 @@ ENDIF() SET (DEB_PRODUCTNAME "wsrep") SET (DEB_PRODUCTNAMEC "Wsrep") SET (DEB_PRODUCTSERIES "-5.6") +SET (DEB_WSREP_README "README-wsrep") SET (FILES_STARTUP_SYSV diff --git a/packaging/deb-in/mysql-packagesource-client-SERIES.install.in b/packaging/deb-in/mysql-packagesource-client-SERIES.install.in index d0cd6a336120..7572d2b6fc90 100644 --- a/packaging/deb-in/mysql-packagesource-client-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-client-SERIES.install.in @@ -16,3 +16,6 @@ usr/bin/mysqldumpslow usr/bin/mysqlimport usr/bin/mysqlshow usr/bin/mysqlslap +usr/share/doc/mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@/ +usr/share/doc/mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ +usr/share/doc/mysql-@DEB_PRODUCTNAME@-client@DEB_PRODUCTSERIES@/README diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in index 924d1c7d6027..7cf226cc1f70 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -21,16 +21,22 @@ etc/mysql/debian-start # binaries usr/bin/innochecksum +usr/bin/msql2mysql +usr/bin/mysqlhotcopy +usr/bin/mysql_convert_table_format usr/bin/myisamchk usr/bin/myisamlog usr/bin/myisampack usr/bin/my_print_defaults +usr/bin/mysqld_multi usr/scripts/mysql_install_db usr/bin/ usr/bin/mysql_plugin usr/bin/mysql_secure_installation +usr/bin/mysql_setpermission usr/bin/mysql_tzinfo_to_sql usr/bin/mysql_upgrade usr/bin/mysqlbinlog +usr/bin/mysql_zap usr/bin/perror usr/bin/replace usr/bin/resolveip @@ -43,6 +49,7 @@ usr/bin/wsrep_sst_xtrabackup-v2 # plugins usr/lib/mysql/plugin/adt_null.so usr/lib/mysql/plugin/auth_socket.so +usr/lib/mysql/plugin/connection_control.so usr/lib/mysql/plugin/innodb_engine.so usr/lib/mysql/plugin/libmemcached.so usr/lib/mysql/plugin/mypluglib.so @@ -107,3 +114,4 @@ usr/share/mysql/errmsg-utf8.txt usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/ usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/README +usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/@DEB_WSREP_README@ From fd7610daf23146b05c346b304ddeb6e425f39467 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Fri, 19 May 2017 13:05:23 +0300 Subject: [PATCH 189/305] MW-371: relax libmysqlclient18 deps to depend on mysql-wsrep-common --- packaging/deb-in/control.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/deb-in/control.in b/packaging/deb-in/control.in index e9296f554caf..10862858dac6 100644 --- a/packaging/deb-in/control.in +++ b/packaging/deb-in/control.in @@ -128,7 +128,7 @@ Architecture: any Section: libs Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same -Depends: mysql-@DEB_PRODUCTNAME@-common@DEB_PRODUCTSERIES@, +Depends: mysql-@DEB_PRODUCTNAME@-common, ${misc:Depends}, ${shlibs:Depends} Description: MySQL shared client libraries @@ -152,7 +152,7 @@ Conflicts: mysql, mysql-server-5.7, mysql-server-core-5.7, mysql-client-5.7, mysql-client-core-5.7, mariadb-server-5.5, percona-xtradb-cluster-common-5.5, - mysql-common (<< 5.6.35), mysql-@DEB_PRODUCTNAME@-common (<< 5.6.35), + mysql-@DEB_PRODUCTNAME@-common (<< 5.6.35), mysql-@DEB_PRODUCTNAME@-common-5.6, mysql-@DEB_PRODUCTNAME@-common-5.5 Replaces: mysql, mysql-server-5.5, mysql-server-core-5.5, libmysqlclient-dev, From 402c709942ebbafc99b18f83757a338ea8f40505 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 8 Mar 2017 13:08:21 +0100 Subject: [PATCH 190/305] MW-86 Add separate wsrep_sync_wait bitmask value for SHOW commands Previously, setting `wsrep_sync_wait = 1` would have an effect on both SELECT and SHOW statements. This patch changes wsrep_sync_wait so that bitmask value 1 is used for SELECT statements, while bitmask value 8 is reserved for SHOW statements. It is still possible to achieve sync wait on both SELECT and SHOW statements by setting `wsrep_sync_wait = 9`. --- sql/sql_parse.cc | 72 ++++++++++++++-------------------------------- sql/sql_parse.h | 5 ++++ sql/wsrep_mysqld.h | 5 ++-- 3 files changed, 30 insertions(+), 52 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 0a786667d9e1..a04b2584d49f 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2429,9 +2429,7 @@ mysql_execute_command(THD *thd) #endif case SQLCOM_SHOW_STATUS_PROC: case SQLCOM_SHOW_STATUS_FUNC: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if ((res= check_table_access(thd, SELECT_ACL, all_tables, FALSE, UINT_MAX, FALSE))) goto error; @@ -2441,9 +2439,7 @@ mysql_execute_command(THD *thd) { system_status_var old_status_var= thd->status_var; thd->initial_status_var= &old_status_var; -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (!(res= check_table_access(thd, SELECT_ACL, all_tables, FALSE, UINT_MAX, FALSE))) res= execute_sqlcom_select(thd, all_tables); @@ -2472,23 +2468,18 @@ mysql_execute_command(THD *thd) case SQLCOM_SHOW_PLUGINS: case SQLCOM_SHOW_FIELDS: case SQLCOM_SHOW_KEYS: -#ifndef WITH_WSREP case SQLCOM_SHOW_VARIABLES: case SQLCOM_SHOW_CHARSETS: case SQLCOM_SHOW_COLLATIONS: case SQLCOM_SHOW_STORAGE_ENGINES: case SQLCOM_SHOW_PROFILE: -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); case SQLCOM_SELECT: + { #ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; - case SQLCOM_SHOW_VARIABLES: - case SQLCOM_SHOW_CHARSETS: - case SQLCOM_SHOW_COLLATIONS: - case SQLCOM_SHOW_STORAGE_ENGINES: - case SQLCOM_SHOW_PROFILE: + if (lex->sql_command == SQLCOM_SELECT) + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ); #endif /* WITH_WSREP */ - { thd->status_var.last_query_cost= 0.0; /* @@ -3085,9 +3076,7 @@ case SQLCOM_PREPARE: goto error; #else { -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); /* Access check: @@ -3144,9 +3133,7 @@ case SQLCOM_PREPARE: case SQLCOM_CHECKSUM: { DBUG_ASSERT(first_table == all_tables && first_table != 0); -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ); if (check_table_access(thd, SELECT_ACL, all_tables, FALSE, UINT_MAX, FALSE)) @@ -3156,11 +3143,8 @@ case SQLCOM_PREPARE: break; } case SQLCOM_UPDATE: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE)) goto error; -#endif /* WITH_WSREP */ { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE); ha_rows found= 0, updated= 0; DBUG_ASSERT(first_table == all_tables && first_table != 0); if (update_precheck(thd, all_tables)) @@ -3199,10 +3183,7 @@ case SQLCOM_PREPARE: /* if we switched from normal update, rights are checked */ if (up_result != 2) { -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE); if ((res= multi_update_precheck(thd, all_tables))) break; } @@ -3272,10 +3253,7 @@ case SQLCOM_PREPARE: break; } case SQLCOM_REPLACE: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE)) goto error; -#endif /* WITH_WSREP */ + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); #ifndef DBUG_OFF if (mysql_bin_log.is_open()) { @@ -3311,11 +3289,8 @@ case SQLCOM_PREPARE: } #endif case SQLCOM_INSERT: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE)) goto error; -#endif /* WITH_WSREP */ { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); DBUG_ASSERT(first_table == all_tables && first_table != 0); if ((res= insert_precheck(thd, all_tables))) break; @@ -3348,12 +3323,9 @@ case SQLCOM_PREPARE: } case SQLCOM_REPLACE_SELECT: case SQLCOM_INSERT_SELECT: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE)) goto error; -#endif /* WITH_WSREP */ { - select_result *sel_result; + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); + select_insert *sel_result; DBUG_ASSERT(first_table == all_tables && first_table != 0); if ((res= insert_precheck(thd, all_tables))) break; @@ -3444,11 +3416,8 @@ case SQLCOM_PREPARE: break; } case SQLCOM_DELETE: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE)) goto error; -#endif /* WITH_WSREP */ { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE); DBUG_ASSERT(first_table == all_tables && first_table != 0); if ((res= delete_precheck(thd, all_tables))) break; @@ -3463,11 +3432,8 @@ case SQLCOM_PREPARE: break; } case SQLCOM_DELETE_MULTI: -#ifdef WITH_WSREP - if (WSREP_CLIENT(thd) && - wsrep_sync_wait(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE)) goto error; -#endif /* WITH_WSREP */ { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE); DBUG_ASSERT(first_table == all_tables && first_table != 0); TABLE_LIST *aux_tables= thd->lex->auxiliary_table_list.first; multi_delete *del_result; @@ -3834,6 +3800,7 @@ case SQLCOM_PREPARE: my_error(ER_WRONG_DB_NAME, MYF(0), lex->name.str); break; } + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); res= mysqld_show_create_db(thd, lex->name.str, &lex->create_info); break; } @@ -3885,6 +3852,7 @@ case SQLCOM_PREPARE: /* lex->unit.cleanup() is called outside, no need to call it here */ break; case SQLCOM_SHOW_CREATE_EVENT: + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); res= Events::show_create_event(thd, lex->spname->m_db, lex->spname->m_name); break; @@ -4735,12 +4703,14 @@ case SQLCOM_PREPARE: } case SQLCOM_SHOW_CREATE_PROC: { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (sp_show_create_routine(thd, TYPE_ENUM_PROCEDURE, lex->spname)) goto error; break; } case SQLCOM_SHOW_CREATE_FUNC: { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (sp_show_create_routine(thd, TYPE_ENUM_FUNCTION, lex->spname)) goto error; break; @@ -4753,6 +4723,7 @@ case SQLCOM_PREPARE: int type= (lex->sql_command == SQLCOM_SHOW_PROC_CODE ? TYPE_ENUM_PROCEDURE : TYPE_ENUM_FUNCTION); + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (sp_cache_routine(thd, type, lex->spname, FALSE, &sp)) goto error; if (!sp || sp->show_routine_code(thd)) @@ -4777,6 +4748,7 @@ case SQLCOM_PREPARE: goto error; } + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (show_create_trigger(thd, lex->spname)) goto error; /* Error has been already logged. */ diff --git a/sql/sql_parse.h b/sql/sql_parse.h index 8eb19e14312c..c5140f1476f3 100644 --- a/sql/sql_parse.h +++ b/sql/sql_parse.h @@ -214,10 +214,15 @@ inline bool is_supported_parser_charset(CHARSET_INFO *cs) if (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER)) \ wsrep_to_isolation_end(thd); +#define WSREP_SYNC_WAIT(thd_, before_) \ + if (WSREP_CLIENT(thd_) && \ + wsrep_sync_wait(thd_, before_)) goto error; + #else #define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) #define WSREP_TO_ISOLATION_END +#define WSREP_SYNC_WAIT(thd_, before_) #endif /* WITH_WSREP */ diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index 120bbd36c861..1db1141e2501 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -103,11 +103,12 @@ extern my_bool wsrep_slave_UK_checks; enum enum_wsrep_OSU_method { WSREP_OSU_TOI, WSREP_OSU_RSU }; enum enum_wsrep_sync_wait { WSREP_SYNC_WAIT_NONE = 0x0, - // show, select, begin + // select, begin WSREP_SYNC_WAIT_BEFORE_READ = 0x1, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE = 0x2, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE = 0x4, - WSREP_SYNC_WAIT_MAX = 0x7 + WSREP_SYNC_WAIT_BEFORE_SHOW = 0x8, + WSREP_SYNC_WAIT_MAX = 0xF }; // MySQL status variables From 57e736f6a65378fbdbdacc8b0799d49104e1a7fc Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Mon, 13 Mar 2017 15:35:04 +0100 Subject: [PATCH 191/305] MW-86 Additional wsrep_sync_wait coverage The following commands are now subject to wsrep_sync_wait with bitmask value 8: SHOW BINARY LOGS SHOW BINLOG EVENTS SHOW GRANTS --- sql/sql_parse.cc | 10 +++++++--- sql/sql_parse.h | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a04b2584d49f..c8f28121b6d8 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2473,12 +2473,13 @@ mysql_execute_command(THD *thd) case SQLCOM_SHOW_COLLATIONS: case SQLCOM_SHOW_STORAGE_ENGINES: case SQLCOM_SHOW_PROFILE: - WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); case SQLCOM_SELECT: { #ifdef WITH_WSREP - if (lex->sql_command == SQLCOM_SELECT) - WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ); + if (lex->sql_command == SQLCOM_SELECT) + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_READ) + else + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW) #endif /* WITH_WSREP */ thd->status_var.last_query_cost= 0.0; @@ -2606,6 +2607,7 @@ case SQLCOM_PREPARE: case SQLCOM_SHOW_RELAYLOG_EVENTS: /* fall through */ case SQLCOM_SHOW_BINLOG_EVENTS: { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); if (check_global_access(thd, REPL_SLAVE_ACL)) goto error; res = mysql_show_binlog_events(thd); @@ -3063,6 +3065,7 @@ case SQLCOM_PREPARE: { if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL)) goto error; + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); res = show_binlogs(thd); break; } @@ -4148,6 +4151,7 @@ case SQLCOM_PREPARE: !strcmp(thd->security_ctx->priv_user, grant_user->user.str)) || !check_access(thd, SELECT_ACL, "mysql", NULL, NULL, 1, 0)) { + WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW); res = mysql_show_grants(thd, grant_user); } break; diff --git a/sql/sql_parse.h b/sql/sql_parse.h index c5140f1476f3..9020a8f08f3d 100644 --- a/sql/sql_parse.h +++ b/sql/sql_parse.h @@ -215,8 +215,8 @@ inline bool is_supported_parser_charset(CHARSET_INFO *cs) wsrep_to_isolation_end(thd); #define WSREP_SYNC_WAIT(thd_, before_) \ - if (WSREP_CLIENT(thd_) && \ - wsrep_sync_wait(thd_, before_)) goto error; + { if (WSREP_CLIENT(thd_) && \ + wsrep_sync_wait(thd_, before_)) goto error; } #else From 14f2b7d4527b785a8897930f26787109ddc66afa Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Mon, 13 Mar 2017 22:45:42 +0100 Subject: [PATCH 192/305] MW-86 Removed unnecessary wsrep_sync_wait before processing SQLCOM_REPLACE Sync waiting before processing SQLCOM_REPLACE was not necessary given that this case falls through to processing of SQLCOM_INSERT. In case of SQLCOM_REPLACE, wsrep_sync_wait would be called twice. --- sql/sql_parse.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index c8f28121b6d8..6265fef59187 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3256,7 +3256,6 @@ case SQLCOM_PREPARE: break; } case SQLCOM_REPLACE: - WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE); #ifndef DBUG_OFF if (mysql_bin_log.is_open()) { From 8b5ce9a0cc45d7052c2e833f40f815c59eecf1b2 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sat, 20 May 2017 00:21:36 +0300 Subject: [PATCH 193/305] IN-4: provide mysql-wsrep-common virtual package --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index c03576ad890b..39647b408e10 100644 --- a/debian/control +++ b/debian/control @@ -66,7 +66,7 @@ Package: mysql-wsrep-common-5.5 Architecture: all Depends: ${misc:Depends}, ${shlibs:Depends} Multi-Arch: foreign -Provides: mysql-common +Provides: mysql-common, mysql-wsrep-common Replaces: mysql-common Description: MySQL database common files, e.g. /etc/mysql/my.cnf MySQL is a fast, stable and true multi-user, multi-threaded SQL database From 9c86211e0890830a24dd77f9905c6860361935b8 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Wed, 24 May 2017 12:41:36 +0300 Subject: [PATCH 194/305] MW-371: fix typo in versioning scheme --- packaging/deb-in/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 2e18cf2bba93..6b63351989b4 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -38,7 +38,7 @@ ELSE() SET (DEB_CONTROL_CLIENT_CONFLICT_NDB "mysql-cluster-community-client, mysql-cluster-commercial-client") ENDIF() -SET (DEB_BASE_VERSION "${DEB_BASE_VERSION}+wsrep${WSREP_VERSION}") +SET (DEB_BASE_VERSION "${DEB_BASE_VERSION}-${WSREP_VERSION}") # Commercial or community IF (DEB_PRODUCT STREQUAL "commercial") From 7c44e327507872a38c0629239e40e89ef529b4d8 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Wed, 24 May 2017 16:09:58 +0300 Subject: [PATCH 195/305] MW-371: change source format to support revision Change source format back to quilt, so that we can support revisions properly (cherry picked from commit 2d12ce0d0d6e437010d5ca339118b76828f2de3d) --- packaging/deb-in/source/format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/deb-in/source/format b/packaging/deb-in/source/format index 89ae9db8f88b..163aaf8d82b6 100644 --- a/packaging/deb-in/source/format +++ b/packaging/deb-in/source/format @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) From 4e0dc76a0b9313768a7f7ee430d76180754ee61a Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Fri, 26 May 2017 17:36:13 +0300 Subject: [PATCH 196/305] MW-371: make wsrep mysql-common dummy conflict with upstream one --- packaging/deb-in/CMakeLists.txt | 1 + packaging/deb-in/control.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 6b63351989b4..b2c42ac3f1f6 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -348,6 +348,7 @@ Description: MySQL Common implementation to satisfy dependencies of other packages like libmysqlclient18. It depends on any mysql-wsrep-common ") +SET(@COMMON_WSREP_CONFLICTS@ "mysql-common (>> ${VERSION})") ENDIF() diff --git a/packaging/deb-in/control.in b/packaging/deb-in/control.in index 10862858dac6..44e1f5965a4d 100644 --- a/packaging/deb-in/control.in +++ b/packaging/deb-in/control.in @@ -154,11 +154,11 @@ Conflicts: mysql, mariadb-server-5.5, percona-xtradb-cluster-common-5.5, mysql-@DEB_PRODUCTNAME@-common (<< 5.6.35), mysql-@DEB_PRODUCTNAME@-common-5.6, mysql-@DEB_PRODUCTNAME@-common-5.5 + @COMMON_WSREP_CONFLICTS@ Replaces: mysql, mysql-server-5.5, mysql-server-core-5.5, libmysqlclient-dev, mysql-server-5.6, mysql-server-core-5.6, mariadb-server-5.5, percona-xtradb-cluster-common-5.5, - mysql-common (<< 5.6.35) Provides: mysql-common, mysql-@DEB_PRODUCTNAME@-common Description: MySQL Common The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, From 7317d1b958813d168449b93ccb55877dc1837f13 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sun, 28 May 2017 20:05:26 +0300 Subject: [PATCH 197/305] MW-371: fix-up cmake var typo and some control.in typos --- packaging/deb-in/CMakeLists.txt | 4 +--- packaging/deb-in/control.in | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index b2c42ac3f1f6..37bb774bb4c5 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -287,6 +287,7 @@ LIST(REMOVE_ITEM SOURCEFILES "CMakeLists.txt") # Combine the list of all startup files to be included, # skip Debian magical init files unless needed IF(DEB_PRODUCTNAME STREQUAL "wsrep") + SET(COMMON_WSREP_CONFLICTS "mysql-common (>> ${VERSION})") LIST(REMOVE_ITEM SOURCEFILES "mysql-common.install.in") LIST(REMOVE_ITEM SOURCEFILES "mysql-common.dirs.in") LIST(REMOVE_ITEM SOURCEFILES "mysql-common.postinst.in") @@ -348,7 +349,4 @@ Description: MySQL Common implementation to satisfy dependencies of other packages like libmysqlclient18. It depends on any mysql-wsrep-common ") -SET(@COMMON_WSREP_CONFLICTS@ "mysql-common (>> ${VERSION})") ENDIF() - - diff --git a/packaging/deb-in/control.in b/packaging/deb-in/control.in index 44e1f5965a4d..5627be551448 100644 --- a/packaging/deb-in/control.in +++ b/packaging/deb-in/control.in @@ -153,12 +153,13 @@ Conflicts: mysql, mysql-client-5.7, mysql-client-core-5.7, mariadb-server-5.5, percona-xtradb-cluster-common-5.5, mysql-@DEB_PRODUCTNAME@-common (<< 5.6.35), - mysql-@DEB_PRODUCTNAME@-common-5.6, mysql-@DEB_PRODUCTNAME@-common-5.5 + mysql-@DEB_PRODUCTNAME@-common-5.6, mysql-@DEB_PRODUCTNAME@-common-5.5, @COMMON_WSREP_CONFLICTS@ Replaces: mysql, mysql-server-5.5, mysql-server-core-5.5, libmysqlclient-dev, mysql-server-5.6, mysql-server-core-5.6, mariadb-server-5.5, percona-xtradb-cluster-common-5.5, + @COMMON_WSREP_CONFLICTS@, mysql-common (<< ${binary:Version}) Provides: mysql-common, mysql-@DEB_PRODUCTNAME@-common Description: MySQL Common The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, From b132d86b1707235b7ad6ca166d25a499b2cb179c Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sun, 28 May 2017 21:25:11 +0300 Subject: [PATCH 198/305] MW-371: relax conflicts on mysql-common --- packaging/deb-in/CMakeLists.txt | 2 +- packaging/deb-in/control.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 37bb774bb4c5..cfc8f4f8b0fd 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -287,7 +287,7 @@ LIST(REMOVE_ITEM SOURCEFILES "CMakeLists.txt") # Combine the list of all startup files to be included, # skip Debian magical init files unless needed IF(DEB_PRODUCTNAME STREQUAL "wsrep") - SET(COMMON_WSREP_CONFLICTS "mysql-common (>> ${VERSION})") + SET(COMMON_WSREP_CONFLICTS "mysql-common (>= 5.7)") LIST(REMOVE_ITEM SOURCEFILES "mysql-common.install.in") LIST(REMOVE_ITEM SOURCEFILES "mysql-common.dirs.in") LIST(REMOVE_ITEM SOURCEFILES "mysql-common.postinst.in") diff --git a/packaging/deb-in/control.in b/packaging/deb-in/control.in index 5627be551448..e68f5cfe523b 100644 --- a/packaging/deb-in/control.in +++ b/packaging/deb-in/control.in @@ -159,7 +159,7 @@ Replaces: mysql, mysql-server-5.5, mysql-server-core-5.5, libmysqlclient-dev, mysql-server-5.6, mysql-server-core-5.6, mariadb-server-5.5, percona-xtradb-cluster-common-5.5, - @COMMON_WSREP_CONFLICTS@, mysql-common (<< ${binary:Version}) + @COMMON_WSREP_CONFLICTS@, mysql-common Provides: mysql-common, mysql-@DEB_PRODUCTNAME@-common Description: MySQL Common The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, From 68abfa1d3038c2ecbe77ca4aa643b3d0d66ccb63 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sun, 28 May 2017 22:04:53 +0300 Subject: [PATCH 199/305] MW-371: add explicit dep on our mysql-common package --- packaging/deb-in/control.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packaging/deb-in/control.in b/packaging/deb-in/control.in index e68f5cfe523b..660b4b376989 100644 --- a/packaging/deb-in/control.in +++ b/packaging/deb-in/control.in @@ -145,7 +145,8 @@ Pre-depends: debconf (>= 0.2.17), ${misc:Pre-Depends} Multi-Arch: foreign Depends: ${misc:Depends}, - ${shlibs:Depends} + ${shlibs:Depends}, + mysql-common (= ${binary:Version}) Conflicts: mysql, mysql-server-5.6, mysql-server-core-5.6, mysql-client-5.6, mysql-client-core-5.6, From 2701ba12a310b2c8487860ab0621d6d033882701 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Wed, 31 May 2017 16:00:45 +0300 Subject: [PATCH 200/305] MW-371: add _r symlinks for libmysqlclient --- packaging/deb-in/libmysqlclient18.install.in | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/deb-in/libmysqlclient18.install.in b/packaging/deb-in/libmysqlclient18.install.in index 5f7ef63484c9..32f23c29e8b1 100644 --- a/packaging/deb-in/libmysqlclient18.install.in +++ b/packaging/deb-in/libmysqlclient18.install.in @@ -14,6 +14,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA usr/lib/*/libmysqlclient.so.18* +usr/lib/*/libmysqlclient_r.so.18* # legal usr/share/doc/libmysqlclient18/@DEB_INSTALL_LICENSEFILE@ usr/share/doc/libmysqlclient18/README From b9db600590336b5409dab483bea4f6ebbd4eeca6 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sun, 4 Jun 2017 19:17:56 +0300 Subject: [PATCH 201/305] MW-371: fix 5.6 specs remainders 1. install init ONLY for server package we do not want to restart server on client installation, do we? 2. add *_r symlinks into the libmysqlclient-dev package for 5.6, so that we can safely build required libraries --- packaging/deb-in/libmysqlclient-dev.install.in | 2 ++ packaging/deb-in/rules.in | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packaging/deb-in/libmysqlclient-dev.install.in b/packaging/deb-in/libmysqlclient-dev.install.in index bee63636f363..8c649ccee200 100644 --- a/packaging/deb-in/libmysqlclient-dev.install.in +++ b/packaging/deb-in/libmysqlclient-dev.install.in @@ -19,7 +19,9 @@ usr/include/mysql/mysql/*.h usr/include/mysql/mysql/*.h.pp usr/include/mysql/mysql/psi/*.h usr/lib/*/libmysqlclient.a +usr/lib/*/libmysqlclient_r.a usr/lib/*/libmysqlclient.so +usr/lib/*/libmysqlclient_r.so usr/lib/*/libmysqlservices.a usr/share/aclocal/mysql.m4 usr/share/man/man1/mysql_config.1 diff --git a/packaging/deb-in/rules.in b/packaging/deb-in/rules.in index cce62ab06511..09dffea0bf97 100644 --- a/packaging/deb-in/rules.in +++ b/packaging/deb-in/rules.in @@ -162,7 +162,7 @@ override_dh_installinit: @DEB_RULES_APPARMOR_LOAD@ @DEB_RULES_SYSTEMD_ENABLE@ - dh_installinit $(INSTALLINITOPTS) --name=mysql -- defaults 19 21 + dh_installinit $(INSTALLINITOPTS) -pmysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@ --name=mysql -- defaults 19 21 @DEB_RULES_SYSTEMD_START@ touch $@ From 17461989b5589ac6c5c8723145ae77e37da3449b Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Wed, 24 May 2017 14:53:56 +0300 Subject: [PATCH 202/305] MW-383 Updated man pages to 5.6.36 --- man/comp_err.1 | 6 +- man/innochecksum.1 | 13 +- man/msql2mysql.1 | 6 +- man/my_print_defaults.1 | 6 +- man/myisam_ftdump.1 | 6 +- man/myisamchk.1 | 12 +- man/myisamlog.1 | 6 +- man/myisampack.1 | 6 +- man/mysql-stress-test.pl.1 | 6 +- man/mysql-test-run.pl.1 | 208 +++++++++++++++++++++++++++++-- man/mysql.1 | 44 ++++--- man/mysql.server.1 | 6 +- man/mysql_client_test.1 | 11 +- man/mysql_config.1 | 10 +- man/mysql_config_editor.1 | 6 +- man/mysql_convert_table_format.1 | 8 +- man/mysql_find_rows.1 | 6 +- man/mysql_fix_extensions.1 | 6 +- man/mysql_install_db.1 | 8 +- man/mysql_plugin.1 | 6 +- man/mysql_secure_installation.1 | 6 +- man/mysql_setpermission.1 | 8 +- man/mysql_tzinfo_to_sql.1 | 6 +- man/mysql_upgrade.1 | 8 +- man/mysql_waitpid.1 | 6 +- man/mysql_zap.1 | 6 +- man/mysqlaccess.1 | 6 +- man/mysqladmin.1 | 10 +- man/mysqlbinlog.1 | 12 +- man/mysqlbug.1 | 6 +- man/mysqlcheck.1 | 22 ++-- man/mysqld.8 | 6 +- man/mysqld_multi.1 | 16 +-- man/mysqld_safe.1 | 39 ++++-- man/mysqldump.1 | 39 ++++-- man/mysqldumpslow.1 | 6 +- man/mysqlhotcopy.1 | 8 +- man/mysqlimport.1 | 10 +- man/mysqlshow.1 | 30 +++-- man/mysqlslap.1 | 10 +- man/mysqltest.1 | 16 +-- man/perror.1 | 6 +- man/replace.1 | 6 +- man/resolve_stack_dump.1 | 6 +- man/resolveip.1 | 6 +- 45 files changed, 462 insertions(+), 224 deletions(-) diff --git a/man/comp_err.1 b/man/comp_err.1 index 35f2caee1628..052a404dfe3d 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -2,12 +2,12 @@ .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -241,7 +241,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 26dee3e68249..362faf99dee9 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -2,12 +2,12 @@ .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -39,15 +39,18 @@ prints checksums for InnoDB files\&. This tool reads an InnoDB -tablespace file, calculates the checksum for each page, compares the calculated checksum to the stored checksum, and reports mismatches, which indicate damaged pages\&. It was originally developed to speed up verifying the integrity of tablespace files after power outages but can also be used after file copies\&. Because checksum mismatches will cause +tablespace file, calculates the checksum for each page, compares the calculated checksum to the stored checksum, and reports mismatches, which indicate damaged pages\&. It was originally developed to speed up verifying the integrity of tablespace files after power outages but can also be used after file copies\&. Because checksum mismatches cause InnoDB -to deliberately shut down a running server, it can be preferable to use this tool rather than waiting for a server in production usage to encounter the damaged pages\&. As of MySQL 5\&.6\&.16, +to deliberately shut down a running server, it may be preferable to use this tool rather than waiting for an in\-production server to encounter the damaged pages\&. As of MySQL 5\&.6\&.16, \fBinnochecksum\fR supports files greater than 2GB in size\&. Previously, \fBinnochecksum\fR only supported files up to 2GB in size\&. .PP \fBinnochecksum\fR +does not support tablespaces that contain compressed pages\&. +.PP +\fBinnochecksum\fR cannot be used on tablespace files that the server already has open\&. For such files, you should use CHECK TABLE to check tables within the tablespace\&. @@ -153,7 +156,7 @@ Verbose mode; print a progress indicator every five seconds\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 index d2c1c5be6a78..458f898d9c5a 100644 --- a/man/msql2mysql.1 +++ b/man/msql2mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmsql2mysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMSQL2MYSQL\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMSQL2MYSQL\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -84,7 +84,7 @@ utility to make the function name substitutions\&. See .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index b083cbbab815..6e027b11c17d 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -2,12 +2,12 @@ .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -220,7 +220,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index 5c129d583af7..dc6894a43eb9 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -238,7 +238,7 @@ Verbose mode\&. Print more output about what the program does\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/myisamchk.1 b/man/myisamchk.1 index 5ed1b29175e3..ca02573d91a2 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -627,7 +627,7 @@ myisam_stats_method system variable\&. For more information, see the description of myisam_stats_method in -Section\ \&5.1.4, \(lqServer System Variables\(rq, and +Section\ \&5.1.5, \(lqServer System Variables\(rq, and Section\ \&8.3.7, \(lqInnoDB and MyISAM Index Statistics Collection\(rq\&. .PP ft_min_word_len @@ -975,7 +975,7 @@ Overwrite old intermediate files (files with names like \fB\-k \fR\fB\fIval\fR\fR .sp For -\fBmyisamchk\fR, the option value is a bit\-value that indicates which indexes to update\&. Each binary bit of the option value corresponds to a table index, where the first index is bit 0\&. An option value of 0 disables updates to all indexes, which can be used to get faster inserts\&. Deactivated indexes can be reactivated by using +\fBmyisamchk\fR, the option value is a bit value that indicates which indexes to update\&. Each binary bit of the option value corresponds to a table index, where the first index is bit 0\&. An option value of 0 disables updates to all indexes, which can be used to get faster inserts\&. Deactivated indexes can be reactivated by using \fBmyisamchk \-r\fR\&. .RE .sp @@ -1142,7 +1142,7 @@ uses the value of the TMPDIR environment variable\&. \fB\-\-tmpdir\fR -can be set to a list of directory paths that are used successively in round\-robin fashion for creating temporary files\&. The separator character between directory names is the colon (\(lq:\(rq) on Unix and the semicolon (\(lq;\(rq) on Windows\&. +can be set to a list of directory paths that are used successively in round\-robin fashion for creating temporary files\&. The separator character between directory names is the colon (:) on Unix and the semicolon (;) on Windows\&. .RE .sp .RS 4 @@ -2463,7 +2463,7 @@ instead of .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/myisamlog.1 b/man/myisamlog.1 index dbc7b278666e..a91dde8b832b 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -227,7 +227,7 @@ Display version information\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/myisampack.1 b/man/myisampack.1 index 6a86a12792b8..7f55d6acc9b2 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -825,7 +825,7 @@ option to .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index 9b1116b8582b..b40f240280ad 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/14/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "08/25/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "03/14/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -445,7 +445,7 @@ Verbose mode\&. Print more information about what the program does\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index 553fa257edf8..d6035bc8527e 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/14/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "08/25/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "03/14/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -262,6 +262,7 @@ l l l l l l l l +l l l l. T{ MTR_BUILD_THREAD @@ -293,7 +294,7 @@ Setting of a timeout in minutes or seconds, corresponding to command CTEST (all in seconds)\&. MTR_CTEST_TIMEOUT is for \fBctest\fR unit tests; it was added in - MySQL 5\&.8\&.0\&. + MySQL 8\&.0\&.0\&. T} T{ MTR_PARALLEL @@ -365,6 +366,12 @@ T}:T{ Path name to the var directory that is used for logs, temporary files, and so forth T} +T{ +TSAN_OPTIONS +T}:T{ +Path name to a file containing ThreadSanitizer suppressions\&. Supported + as of MySQL 8\&.0\&.1\&. +T} .TE .sp 1 .PP @@ -428,6 +435,14 @@ BIG_TEST is set to 1\&. .sp This is typically done for tests that take very long to run, or that use very much resources, so that they are not suitable for running as part of a normal test suite run\&. +.sp +If both +\fB\-\-big\-test\fR +and +\fB\-\-only\-big\-tests\fR +are given, +\fB\-\-only\-big\-tests\fR +is ignored\&. .RE .sp .RS 4 @@ -536,9 +551,29 @@ to use .sp -1 .IP \(bu 2.3 .\} +\fB\-\-charset\-for\-testdb=\fR\fB\fIcharset_name\fR\fR +.sp +Specify the default character set for the +test +database\&. The default value is +latin1\&. +.sp +This option was added in MySQL 8\&.0\&.1\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-check\-testcases\fR .sp -Check test cases for side effects\&. This is done by checking system state before and after each test case; if there is any difference, a warning to that effect will be written, but the test case will not be marked as failed because of it\&. This check is enabled by default\&. +Check test cases for side effects\&. This is done by checking the system state before and after each test case; if there is any difference, a warning to that effect is written, but the test case is not marked as failed because of it\&. This check is enabled by default\&. To disable it, use the +\fB\-\-nocheck\-testcases\fR +option\&. .RE .sp .RS 4 @@ -849,7 +884,7 @@ prefix is used so that does not fail if Debug Sync is not compiled in\&. .sp For information about using the Debug Sync facility for testing, see -Section\ \&4.14, \(lqThread Synchronization in Test Cases\(rq\&. +Section\ \&4.15, \(lqThread Synchronization in Test Cases\(rq\&. .RE .sp .RS 4 @@ -862,7 +897,10 @@ Section\ \&4.14, \(lqThread Synchronization in Test Cases\(rq\&. .\} \fB\-\-default\-myisam\fR .sp -Use MyISAM as default engine for all except InnoDB\-specific tests\&. This option is on by default in MySQL 5\&.5 and 5\&.6 but it off by default from MySQL 5\&.7\&. See also +Use +MyISAM +as the default storage engine for all except +InnoDB\-specific tests\&. This option is on by default in MySQL 5\&.5 and 5\&.6, but is off by default as of MySQL 5\&.7\&. See also \fB\-\-nodefault\-myisam\fR\&. .RE .sp @@ -900,6 +938,26 @@ Add setting from the named file to all generated configs\&. .sp -1 .IP \(bu 2.3 .\} +\fB\-\-discover\fR +.sp +Attempt to preload +discover, the Developer Studio Memory Error Discovery Tool when starting +\fBmysqld\fR\&. Reports from +discover +may be found in +log/mysqld\&.%p\&.txt +under the directory given by +\fB\-\-vardir\fR\&. This option was added in MySQL 8\&.0\&.1\&. It is supported only on SPARC\-M7 systems\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-do\-suite=\fR\fB\fIprefix or regex\fR\fR .sp Run all test cases from suites having a name that begins with the given @@ -987,7 +1045,7 @@ option is available from MySQL 5\&.7\&. .sp Use a version of \fBmysqltest\fR -built with the embedded server\&. +built with the embedded server\&. This option was removed in MySQL 8\&.0\&. .RE .sp .RS 4 @@ -1040,7 +1098,13 @@ It is also possible to supply more than one .sp Run EXPLAIN EXTENDED -on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. +on all +SELECT, +INSERT, +REPLACE, +UPDATE, and +DELETE +statements\&. .RE .sp .RS 4 @@ -1099,6 +1163,25 @@ Do not perform controlled shutdown when servers need to be restarted or at the e .sp -1 .IP \(bu 2.3 .\} +\fB\-\-fail\-check\-testcases\fR +.sp +Enabling this option when a test is run, causes it to fail if MTR\*(Aqs internal check of the test case fails\&. If this option is disabled, only a warning is generated while the test passes\&. This option is enabled by default\&. For additional information, see the description of the +\fB\-\-check\-testcases\fR +option\&. +.sp +The +\fB\-\-fail\-check\-testcases\fR +option was added in MySQL 8\&.0\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-force\fR .sp Normally, @@ -1427,7 +1510,7 @@ options to set more than one variable\&. Extra options to pass to \fBmysqltest\fR\&. .sp -This option was added in MySQL 5\&.8\&.0\&. +This option was added in MySQL 8\&.0\&.0\&. .RE .sp .RS 4 @@ -1457,9 +1540,9 @@ from starting a cluster\&. It is assumed that there is already a cluster running .\} \fB\-\-nocheck\-testcases\fR .sp -Disable the check for test case side effects; see +Disable the check for test case side effects\&. For additional information, see the description of the \fB\-\-check\-testcases\fR -for a description\&. +option\&. .RE .sp .RS 4 @@ -1498,6 +1581,39 @@ Do not reorder tests to reduce number of restarts, but run them in exactly the o .sp -1 .IP \(bu 2.3 .\} +\fB\-\-no\-skip\fR +.sp +This option forces all tests to run, ignoring any +\fB\-\-skip\fR +commands used in the test\&. This ensures that all tests are run\&. An excluded list (excludenoskip\&.list) is maintained to track which tests should continue to be skipped\&. The +\fB\-\-no\-skip\fR +option continues to skip the tests that are named in the excluded list\&. The default value of +\fB\-\-no\-skip\fR +introduced variable is OFF, which implies users are not forced to run all tests unless the +\fB\-\-no\-skip\fR +is explicitly used\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql\-test\-run\&.pl\fR + \fB\-\-suite=innodb\fR + \fB\-\-no\-skip\fR +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-notimer\fR .sp Cause @@ -1543,6 +1659,28 @@ Do not look for and report errors and warning in the server logs\&. .sp -1 .IP \(bu 2.3 .\} +\fB\-\-only\-big\-tests\fR +.sp +This option causes only big tests to run\&. Normal (non\-big) tests are skipped\&. If both +\fB\-\-big\-test\fR +and +\fB\-\-only\-big\-tests\fR +are given, +\fB\-\-only\-big\-tests\fR +is ignored\&. +.sp +\fB\-\-only\-big\-tests\fR +was added in MySQL 8\&.0\&.1\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-parallel={\fR\fB\fIN\fR\fR\fB|auto}\fR .sp Run tests using @@ -1754,6 +1892,26 @@ Allow a failed and retried test to fail more than the default 2 times before giv .sp -1 .IP \(bu 2.3 .\} +\fB\-\-sanitize\fR +.sp +Scan the server log files for warnings from various sanitizers\&. Use of this option assumes that MySQL was configured with +\fB\-DWITH_ASAN\fR +or +\fB\-DWITH_UBSAN\fR\&. +.sp +This option was added in MySQL 8\&.0\&.0\&. As of MySQL 8\&.0\&.1, the +TSAN_OPTIONS +environment variable can be set to specify the path name of a file containing ThreadSanitizer suppressions\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-shutdown\-timeout=\fR\fB\fIseconds\fR\fR .sp Max number of seconds to wait for servers to do controlled shutdown before killing them\&. Default is 10\&. @@ -2120,6 +2278,32 @@ Specify the maximum test suite runtime in minutes\&. .sp -1 .IP \(bu 2.3 .\} +\fB\-\-summary\-report=\fR\fB\fIfile_name\fR\fR +.sp +Generate a plain text version of the test summary only and write it to the file named as the option argument\&. The file is suitable for sending by email\&. This option was added in MySQL 8\&.0\&.1\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-test\-progress\fR +.sp +Display the percentage of tests remaining\&. This option was added in MySQL 5\&.7\&.19\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-testcase\-timeout=\fR\fB\fIminutes\fR\fR .sp Specify the maximum test case runtime in minutes\&. @@ -2499,7 +2683,7 @@ The hostname resolves to 127\&.0\&.0\&.1 and not to the actual IP address\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql.1 b/man/mysql.1 index f3c703b19140..bff992206e33 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -73,7 +73,7 @@ shell> \fBmysql \-\-user=\fR\fB\fIuser_name\fR\fR\fB \-\-password=\fR\fB\fIyour_ .\} .PP Then type an SQL statement, end it with -\(lq;\(rq, +;, \eg, or \eG and press Enter\&. @@ -313,7 +313,11 @@ Display result set metadata\&. \fB\-\-comments\fR, \fB\-c\fR .sp -Whether to preserve comments in statements sent to the server\&. The default is \-\-skip\-comments (discard comments), enable with \-\-comments (preserve comments)\&. +Whether to preserve comments in statements sent to the server\&. The default is +\fB\-\-skip\-comments\fR +(discard comments), enable with +\fB\-\-comments\fR +(preserve comments)\&. .RE .sp .RS 4 @@ -443,7 +447,7 @@ This option can be useful if the operating system uses one character set and the client by default uses another\&. In this case, output may be formatted incorrectly\&. You can usually fix such issues by using this option to force the client to use the system character set instead\&. .sp For more information, see -Section\ \&10.1.5, \(lqConnection Character Sets and Collations\(rq, and +Section\ \&10.1.4, \(lqConnection Character Sets and Collations\(rq, and Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp @@ -475,6 +479,10 @@ is interpreted relative to the current directory if given as a relative path nam Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. \fIfile_name\fR is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. +.sp +Exception: Even with +\fB\-\-defaults\-file\fR, client programs read +\&.mylogin\&.cnf\&. .RE .sp .RS 4 @@ -515,7 +523,7 @@ groups\&. .\} \fB\-\-delimiter=\fR\fB\fIstr\fR\fR .sp -Set the statement delimiter\&. The default is the semicolon character (\(lq;\(rq)\&. +Set the statement delimiter\&. The default is the semicolon character (;)\&. .RE .sp .RS 4 @@ -530,7 +538,7 @@ Set the statement delimiter\&. The default is the semicolon character (\(lq;\(rq .sp Disable named commands\&. Use the \e* -form only, or use named commands only at the beginning of a line ending with a semicolon (\(lq;\(rq)\&. +form only, or use named commands only at the beginning of a line ending with a semicolon (;)\&. \fBmysql\fR starts with this option \fIenabled\fR @@ -642,7 +650,7 @@ Produce HTML output\&. Ignore spaces after function names\&. The effect of this is described in the discussion for the IGNORE_SPACE SQL mode (see -Section\ \&5.1.7, \(lqServer SQL Modes\(rq)\&. +Section\ \&5.1.8, \(lqServer SQL Modes\(rq)\&. .RE .sp .RS 4 @@ -1744,11 +1752,11 @@ delimiter \fIstr\fR, .sp Change the string that \fBmysql\fR -interprets as the separator between SQL statements\&. The default is the semicolon character (\(lq;\(rq)\&. +interprets as the separator between SQL statements\&. The default is the semicolon character (;)\&. .sp The delimiter string can be specified as an unquoted or quoted argument on the delimiter -command line\&. Quoting can be done with either single quote (\*(Aq), double quote ("), or backtick (`) characters\&. To include a quote within a quoted string, either quote the string with a different quote character or escape the quote with a backslash (\(lq\e\(rq) character\&. Backslash should be avoided outside of quoted strings because it is the escape character for MySQL\&. For an unquoted argument, the delimiter is read up to the first space or end of line\&. For a quoted argument, the delimiter is read up to the matching quote on the line\&. +command line\&. Quoting can be done with either single quote (\*(Aq), double quote ("), or backtick (`) characters\&. To include a quote within a quoted string, either quote the string with a different quote character or escape the quote with a backslash (\e) character\&. Backslash should be avoided outside of quoted strings because it is the escape character for MySQL\&. For an unquoted argument, the delimiter is read up to the first space or end of line\&. For a quoted argument, the delimiter is read up to the matching quote on the line\&. .sp \fBmysql\fR interprets instances of the delimiter string as a statement delimiter anywhere it occurs, except within quoted strings\&. Be careful about defining a delimiter that might occur within other words\&. For example, if you define the delimiter as @@ -1764,8 +1772,8 @@ X\&. When the delimiter recognized by \fBmysql\fR is set to something other than the default of -\(lq;\(rq, instances of that character are sent to the server without interpretation\&. However, the server itself still interprets -\(lq;\(rq +;, instances of that character are sent to the server without interpretation\&. However, the server itself still interprets +; as a statement delimiter and processes statements accordingly\&. This behavior on the server side comes into play for multiple\-statement execution (see Section\ \&23.8.17, \(lqC API Support for Multiple Statement Execution\(rq), and for parsing the body of stored procedures and functions, triggers, and events (see Section\ \&20.1, \(lqDefining Stored Programs\(rq)\&. @@ -2445,7 +2453,7 @@ T} T{ \e\e T}:T{ -A literal \(lq\e\(rq backslash character +A literal \e backslash character T} T{ \e\fIx\fR @@ -2820,7 +2828,7 @@ command, uses it as a search string to access server\-side help from the contents of the MySQL Reference Manual\&. The proper operation of this command requires that the help tables in the mysql database be initialized with help topic information (see -Section\ \&5.1.9, \(lqServer-Side Help\(rq)\&. +Section\ \&5.1.10, \(lqServer-Side Help\(rq)\&. .PP If there is no match for the search string, the search fails: .sp @@ -2917,9 +2925,9 @@ mysql> SHOW BINARY LOGS; .\} .PP The search string can contain the wildcard characters -\(lq%\(rq +% and -\(lq_\(rq\&. These have the same meaning as for pattern\-matching operations performed with the +_\&. These have the same meaning as for pattern\-matching operations performed with the LIKE operator\&. For example, HELP rep% @@ -3260,7 +3268,7 @@ SET sql_safe_updates=1, sql_select_limit=1000, max_join_size=1000000; .\} .PP See -Section\ \&5.1.4, \(lqServer System Variables\(rq\&. +Section\ \&5.1.5, \(lqServer System Variables\(rq\&. .PP The SET @@ -3386,7 +3394,7 @@ Section\ \&23.8.16, \(lqControlling Automatic Reconnection Behavior\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql.server.1 b/man/mysql.server.1 index ee23019f5829..0d50a917c04e 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -329,7 +329,7 @@ exits with an error\&. The default value is 900\&. A value of 0 means not to wai .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index 25fa050ef181..2fa8540c6813 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/14/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "08/25/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "03/14/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -43,8 +43,11 @@ The program is used for testing aspects of the MySQL client API that cannot be tested using \fBmysqltest\fR and its test language\&. +\fBmysql_client_test\fR +is run as part of the test suite\&. +.PP \fBmysql_client_test_embedded\fR -is similar but used for testing the embedded server\&. Both programs are run as part of the test suite\&. +is similar but is used for testing the embedded server\&. This program is available only prior to MySQL 8\&.0\&. .PP The source code for the programs can be found in in tests/mysql_client_test\&.c @@ -303,7 +306,7 @@ mysql\-test/var\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_config.1 b/man/mysql_config.1 index 926f47c3b4ff..e5ea2fe96729 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -93,9 +93,11 @@ Compiler options to find MySQL include files\&. .IP \(bu 2.3 .\} \fB\-\-libmysqld\-libs\fR, +\fB\-\-embedded\-libs\fR, \fB\-\-embedded\fR .sp -Libraries and options required to link with the MySQL embedded server\&. +Libraries and options required to link with +libmysqld, the MySQL embedded server\&. .RE .sp .RS 4 @@ -251,7 +253,7 @@ gcc \-o progname progname\&.o `mysql_config \-\-libs` .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_config_editor.1 b/man/mysql_config_editor.1 index a225cced5f4b..98ffa109d057 100644 --- a/man/mysql_config_editor.1 +++ b/man/mysql_config_editor.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config_editor\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG_EDIT" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_CONFIG_EDIT" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1064,7 +1064,7 @@ to disable it\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 index faf26db596ef..b3390cce0cdb 100644 --- a/man/mysql_convert_table_format.1 +++ b/man/mysql_convert_table_format.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_convert_table_format\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_CONVERT_TAB" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_CONVERT_TAB" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -59,7 +59,7 @@ DBI and DBD::mysql Perl modules be installed (see -Section\ \&2.13, \(lqPerl Installation Notes\(rq)\&. +Section\ \&2.12, \(lqPerl Installation Notes\(rq)\&. .PP Invoke \fBmysql_convert_table_format\fR @@ -220,7 +220,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 index fa34538b92df..8ecc25c61823 100644 --- a/man/mysql_find_rows.1 +++ b/man/mysql_find_rows.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_find_rows\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_FIND_ROWS\F" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -165,7 +165,7 @@ Start output from this row\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 index 3fa5d65e76ed..ccf00f5e4e3d 100644 --- a/man/mysql_fix_extensions.1 +++ b/man/mysql_fix_extensions.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_fix_extensions\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_FIX_EXTENSI" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -85,7 +85,7 @@ shell> \fBmysql_fix_extensions \fR\fB\fIdata_dir\fR\fR .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index 8b2462658a75..23cb001278fa 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -63,7 +63,7 @@ With one exception, the settings in the default option file are commented and ha sql_mode system variable to NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES\&. This setting produces a server configuration that results in errors rather than warnings for bad data in operations that modify transactional tables\&. See -Section\ \&5.1.7, \(lqServer SQL Modes\(rq\&. +Section\ \&5.1.8, \(lqServer SQL Modes\(rq\&. .PP To invoke \fBmysql_install_db\fR, use the following syntax: @@ -549,7 +549,7 @@ For internal use\&. This option is used for creating Windows distributions\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index a458b0aabb74..080ac1cbee8b 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -347,7 +347,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index bec33429c153..5bb76559f62c 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -109,7 +109,7 @@ When executed, the script prompts you to determine which actions to perform\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 index 299e04061ec0..af98c4d9c023 100644 --- a/man/mysql_setpermission.1 +++ b/man/mysql_setpermission.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_setpermission\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_SETPERMISSI" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_SETPERMISSI" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -58,7 +58,7 @@ DBI and DBD::mysql Perl modules be installed (see -Section\ \&2.13, \(lqPerl Installation Notes\(rq)\&. +Section\ \&2.12, \(lqPerl Installation Notes\(rq)\&. .PP Invoke \fBmysql_setpermission\fR @@ -175,7 +175,7 @@ The MySQL user name to use when connecting to the server\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index 08199e2f8605..3c9ac9cfb2db 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -120,7 +120,7 @@ After running .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index 174c720236fa..bcecffe2dcfe 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -241,7 +241,7 @@ option\&. .PP \fBmysql_upgrade\fR does not upgrade the contents of the help tables\&. For upgrade instructions, see -Section\ \&5.1.9, \(lqServer-Side Help\(rq\&. +Section\ \&5.1.10, \(lqServer-Side Help\(rq\&. .PP By default, \fBmysql_upgrade\fR @@ -819,7 +819,7 @@ Section\ \&17.1.3.4, \(lqRestrictions on Replication with GTIDs\(rq, for more in .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 index 43c115c4e113..232e62e5a113 100644 --- a/man/mysql_waitpid.1 +++ b/man/mysql_waitpid.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_waitpid\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_WAITPID\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_WAITPID\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -124,7 +124,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 index f63098fc7409..fb5f1d172eef 100644 --- a/man/mysql_zap.1 +++ b/man/mysql_zap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_zap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_ZAP\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_ZAP\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -126,7 +126,7 @@ Test mode\&. Display information about each process but do not kill it\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index 8e6220920981..1b0d4abd084b 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlaccess\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLACCESS\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLACCESS\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -407,7 +407,7 @@ error will occur when you run .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index 1a1ff339ca90..7afefb31ed89 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -738,6 +738,10 @@ is interpreted relative to the current directory if given as a relative path nam Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. \fIfile_name\fR is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. +.sp +Exception: Even with +\fB\-\-defaults\-file\fR, client programs read +\&.mylogin\&.cnf\&. .RE .sp .RS 4 @@ -1226,7 +1230,7 @@ The maximum number of seconds to wait for server shutdown\&. The default value i .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index d941d5983071..30517652349f 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -610,6 +610,10 @@ is interpreted relative to the current directory if given as a relative path nam Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. \fIfile_name\fR is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. +.sp +Exception: Even with +\fB\-\-defaults\-file\fR, client programs read +\&.mylogin\&.cnf\&. .RE .sp .RS 4 @@ -1413,7 +1417,7 @@ The MySQL user name to use when connecting to a remote server\&. \fB\-\-verbose\fR, \fB\-v\fR .sp -Reconstruct row events and display them as commented SQL statements\&. If this option is given twice, the output includes comments to indicate column data types and some metadata\&. +Reconstruct row events and display them as commented SQL statements\&. If this option is given twice (by passing in either "\-vv" or "\-\-verbose \-\-verbose"), the output includes comments to indicate column data types and some metadata, and row query log events if so configured\&. .sp For examples that show the effect of \fB\-\-base64\-output\fR @@ -2882,7 +2886,7 @@ specifies a nonzero server ID\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlbug.1 b/man/mysqlbug.1 index 583fb3f09314..21b97e946daf 100644 --- a/man/mysqlbug.1 +++ b/man/mysqlbug.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbug\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLBUG\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLBUG\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -41,7 +41,7 @@ The normal way to report bugs is to visit .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index 1af8de8dba1c..ff7f3281eb2c 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -233,7 +233,7 @@ option and naming all the databases on the command line, except that the INFORMATION_SCHEMA and performace_schema -databases are not dumped\&. They can be dumped by explicitly naming them with the +databases are not checked\&. They can be checked by explicitly naming them with the \fB\-\-databases\fR option\&. .RE @@ -385,16 +385,6 @@ Compress all information sent between the client and the server if both support Process all tables in the named databases\&. Normally, \fBmysqlcheck\fR treats the first name argument on the command line as a database name and any following names as table names\&. With this option, it treats all name arguments as database names\&. -.sp -This option may be used to dump the -INFORMATION_SCHEMA -and -performace_schema -databases, which normally are not dumped even with the -\fB\-\-all\-databases\fR -option\&. (Also use the -\fB\-\-skip\-lock\-tables\fR -option\&.) .RE .sp .RS 4 @@ -485,6 +475,10 @@ is interpreted relative to the current directory if given as a relative path nam Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. \fIfile_name\fR is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. +.sp +Exception: Even with +\fB\-\-defaults\-file\fR, client programs read +\&.mylogin\&.cnf\&. .RE .sp .RS 4 @@ -1068,7 +1062,7 @@ when these statements should not be sent to replication slaves or run when using .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqld.8 b/man/mysqld.8 index 5d715687d600..1bf53423b70f 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -60,7 +60,7 @@ Chapter\ \&2, Installing and Upgrading MySQL\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index cc86616658ee..97c57063ce53 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -435,16 +435,6 @@ what you are doing\&. Starting multiple servers with the same data directory doe \fInot\fR give you extra performance in a threaded system\&. See Section\ \&5.6, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} .if n \{\ .sp .\} @@ -658,7 +648,7 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index af424af2664a..b2bba72594fa 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -58,7 +58,7 @@ Many of the options to \fBmysqld_safe\fR are the same as the options to \fBmysqld\fR\&. See -Section\ \&5.1.3, \(lqServer Command Options\(rq\&. +Section\ \&5.1.4, \(lqServer Command Options\(rq\&. .PP Options unknown to \fBmysqld_safe\fR @@ -169,7 +169,12 @@ The path to the data directory\&. .\} \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp -The name of an option file to be read in addition to the usual option files\&. This must be the first option on the command line if it is used\&. If the file does not exist or is otherwise inaccessible, the server will exit with an error\&. +Read this option file in addition to the usual option files\&. If the file does not exist or is otherwise inaccessible, the server will exit with an error\&. +\fIfile_name\fR +is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. This must be the first option on the command line if it is used\&. +.sp +For additional information about this option, see +Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. .RE .sp .RS 4 @@ -182,7 +187,12 @@ The name of an option file to be read in addition to the usual option files\&. T .\} \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp -The name of an option file to be read instead of the usual option files\&. This must be the first option on the command line if it is used\&. +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, the server will exit with an error\&. +\fIfile_name\fR +is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. This must be the first option on the command line if it is used\&. +.sp +For additional information about this option, see +Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. .RE .sp .RS 4 @@ -198,6 +208,8 @@ The name of an option file to be read instead of the usual option files\&. This If \fBmysqld_safe\fR cannot find the server, use this option to indicate the path name to the directory where the server is located\&. +.sp +As of MySQL 5\&.6\&.35, this option is accepted only on the command line, not in option files\&. .RE .sp .RS 4 @@ -386,7 +398,7 @@ cannot find the server, use the \fB\-\-ledir\fR option to indicate the path name to the directory where the server is located\&. .sp -As of MySQL 5\&.6\&.33, this option can be given only on the command line and not in an option file\&. +As of MySQL 5\&.6\&.33, this option is accepted only on the command line, not in option files\&. .RE .sp .RS 4 @@ -419,7 +431,7 @@ in the ledir directory\&. .sp -As of MySQL 5\&.6\&.33, this option can be given only on the command line and not in an option file\&. +As of MySQL 5\&.6\&.33, this option is accepted only on the command line, not in option files\&. .RE .sp .RS 4 @@ -447,7 +459,12 @@ program to set the server\*(Aqs scheduling priority to the given value\&. .\} \fB\-\-no\-defaults\fR .sp -Do not read any option files\&. This must be the first option on the command line if it is used\&. +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. This must be the first option on the command line if it is used\&. +.sp +For additional information about this option, see +Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. .RE .sp .RS 4 @@ -495,7 +512,9 @@ for this to function properly\&. .\} \fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR .sp -The path name of the process ID file\&. +The path name that +\fBmysqld\fR +should use for its process ID file\&. .RE .sp .RS 4 @@ -828,7 +847,7 @@ stderr\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqldump.1 b/man/mysqldump.1 index 6088a23c73ad..b0ca66990a3c 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -277,7 +277,7 @@ shell> \fBmysqldump [options] > dump\&.sql\fR .\} .PP However, UTF\-16 is not permitted as a connection character set (see -Section\ \&10.1.5, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the +Section\ \&10.1.4, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the \fB\-\-result\-file\fR option, which creates the output in ASCII format: .sp @@ -752,6 +752,10 @@ is interpreted relative to the current directory if given as a relative path nam Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. \fIfile_name\fR is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. +.sp +Exception: Even with +\fB\-\-defaults\-file\fR, client programs read +\&.mylogin\&.cnf\&. .RE .sp .RS 4 @@ -1559,7 +1563,7 @@ maxdb, no_key_options, no_table_options, or no_field_options\&. To use several values, separate them by commas\&. These values have the same meaning as the corresponding options for setting the server SQL mode\&. See -Section\ \&5.1.7, \(lqServer SQL Modes\(rq\&. +Section\ \&5.1.8, \(lqServer SQL Modes\(rq\&. .sp This option does not guarantee compatibility with other servers\&. It only enables those SQL mode values that are currently available for making dump output more compatible\&. For example, \fB\-\-compatible=oracle\fR @@ -1673,11 +1677,11 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. \fB\-Q\fR .sp Quote identifiers (such as database, table, and column names) within -\(lq`\(rq +` characters\&. If the ANSI_QUOTES SQL mode is enabled, identifiers are quoted within -\(lq"\(rq +" characters\&. This option is enabled by default\&. It can be disabled with \fB\-\-skip\-quote\-names\fR, but this option should be given after any option such as \fB\-\-compatible\fR @@ -1699,9 +1703,9 @@ that may enable Direct output to the named file\&. The result file is created and its previous contents overwritten, even if an error occurs while generating the dump\&. .sp This option should be used on Windows to prevent newline -\(lq\en\(rq +\en characters from being converted to -\(lq\er\en\(rq +\er\en carriage return/newline sequences\&. .RE .sp @@ -1946,6 +1950,16 @@ CREATE DATABASE and USE statements are included in the output before each new database\&. +.sp +This option may be used to dump the +INFORMATION_SCHEMA +and +performace_schema +databases, which normally are not dumped even with the +\fB\-\-all\-databases\fR +option\&. (Also use the +\fB\-\-skip\-lock\-tables\fR +option\&.) .RE .sp .RS 4 @@ -2017,7 +2031,7 @@ statement for the table (for example, to create an empty copy of the table by lo \fB\-\-routines\fR, \fB\-R\fR .sp -Include stored routines (procedures and functions) for the dumped databases in the output\&. Use of this option requires the +Include stored routines (procedures and functions) for the dumped databases in the output\&. This option requires the SELECT privilege for the mysql\&.proc @@ -2279,7 +2293,7 @@ LOCK TABLES and UNLOCK TABLES statements\&. This results in faster inserts when the dump file is reloaded\&. See -Section\ \&8.2.2.1, \(lqSpeed of INSERT Statements\(rq\&. +Section\ \&8.2.4.1, \(lqOptimizing INSERT Statements\(rq\&. .RE .sp .RS 4 @@ -2301,7 +2315,8 @@ option, the logs are flushed \fIfor each database dumped\fR\&. The exception is when using \fB\-\-lock\-all\-tables\fR, \fB\-\-master\-data\fR, or -\fB\-\-single\-transaction\fR: In this case, the logs are flushed only once, corresponding to the moment that all tables are locked\&. If you want your dump and the log flush to happen at exactly the same moment, you should use +\fB\-\-single\-transaction\fR: In this case, the logs are flushed only once, corresponding to the moment that all tables are locked by +FLUSH TABLES WITH READ LOCK\&. If you want your dump and the log flush to happen at exactly the same moment, you should use \fB\-\-flush\-logs\fR together with \fB\-\-lock\-all\-tables\fR, @@ -2737,7 +2752,7 @@ for a workaround\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index 6cdc05b8ce10..056326281df2 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -316,7 +316,7 @@ Count: 3 Time=2\&.13s (6s) Lock=0\&.00s (0s) Rows=0\&.0 (0), root[root]@local .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 index b9ebe60a0151..6268aef0a6df 100644 --- a/man/mysqlhotcopy.1 +++ b/man/mysqlhotcopy.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlhotcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLHOTCOPY\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLHOTCOPY\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -107,7 +107,7 @@ shell> \fBmysqlhotcopy \fR\fB\fIdb_name\fR\fR\fB\&./\fR\fB\fIregex\fR\fR\fB/\fR .RE .\} .PP -The regular expression for the table name can be negated by prefixing it with a tilde (\(lq~\(rq): +The regular expression for the table name can be negated by prefixing it with a tilde (~): .sp .if n \{\ .RS 4 @@ -505,7 +505,7 @@ shell> \fBperldoc mysqlhotcopy\fR .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index 93ee02d6ecb7..10ecee724697 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -251,6 +251,10 @@ is interpreted relative to the current directory if given as a relative path nam Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. \fIfile_name\fR is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. +.sp +Exception: Even with +\fB\-\-defaults\-file\fR, client programs read +\&.mylogin\&.cnf\&. .RE .sp .RS 4 @@ -827,7 +831,7 @@ shell> \fBmysql \-e \*(AqSELECT * FROM imptest\*(Aq test\fR .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index 236dc2a39232..7643fc331470 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -95,23 +95,23 @@ If no column is given, all matching columns and column types in the table are sh .PP The output displays only the names of those databases, tables, or columns for which you have some privileges\&. .PP -If the last argument contains shell or SQL wildcard characters (\(lq*\(rq, -\(lq?\(rq, -\(lq%\(rq, or -\(lq_\(rq), only those names that are matched by the wildcard are shown\&. If a database name contains any underscores, those should be escaped with a backslash (some Unix shells require two) to get a list of the proper tables or columns\&. -\(lq*\(rq +If the last argument contains shell or SQL wildcard characters (*, +?, +%, or +_), only those names that are matched by the wildcard are shown\&. If a database name contains any underscores, those should be escaped with a backslash (some Unix shells require two) to get a list of the proper tables or columns\&. +* and -\(lq?\(rq +? characters are converted into SQL -\(lq%\(rq +% and -\(lq_\(rq +_ wildcard characters\&. This might cause some confusion when you try to display the columns for a table with a -\(lq_\(rq +_ in the name, because in this case, \fBmysqlshow\fR shows you only the table names that match the pattern\&. This is easily fixed by adding an extra -\(lq%\(rq +% last on the command line as a separate argument\&. .PP \fBmysqlshow\fR @@ -297,6 +297,10 @@ is interpreted relative to the current directory if given as a relative path nam Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. \fIfile_name\fR is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. +.sp +Exception: Even with +\fB\-\-defaults\-file\fR, client programs read +\&.mylogin\&.cnf\&. .RE .sp .RS 4 @@ -691,7 +695,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index c23fecfd0c65..051e92af4f2d 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -501,6 +501,10 @@ is interpreted relative to the current directory if given as a relative path nam Use only the given option file\&. If the file does not exist or is otherwise inaccessible, an error occurs\&. \fIfile_name\fR is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. +.sp +Exception: Even with +\fB\-\-defaults\-file\fR, client programs read +\&.mylogin\&.cnf\&. .RE .sp .RS 4 @@ -1079,7 +1083,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqltest.1 b/man/mysqltest.1 index 41a447dab534..6ba732f51ca7 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/14/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "08/25/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "03/14/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -49,7 +49,7 @@ rather than invoking it directly\&. \fBmysqltest_embedded\fR is similar but is built with support for the libmysqld -embedded server\&. +embedded server\&. This program is available only prior to MySQL 8\&.0\&. .PP Features of \fBmysqltest\fR: @@ -613,7 +613,7 @@ updates the given file by writing the actual test results to it\&. Pass the argument as an argument to the embedded server\&. For example, \fB\-\-server\-arg=\-\-tmpdir=/tmp\fR or -\fB\-\-server\-arg=\-\-core\fR\&. Up to 64 arguments can be given\&. +\fB\-\-server\-arg=\-\-core\fR\&. Up to 64 arguments can be given\&. This option was removed in MySQL 8\&.0\&. .RE .sp .RS 4 @@ -627,7 +627,7 @@ or \fB\-\-server\-file=\fR\fB\fIfile_name\fR\fR, \fB\-F \fR\fB\fIfile_name\fR\fR .sp -Read arguments for the embedded server from the given file\&. The file should contain one argument per line\&. +Read arguments for the embedded server from the given file\&. The file should contain one argument per line\&. This option was removed in MySQL 8\&.0\&. .RE .sp .RS 4 @@ -826,7 +826,7 @@ If enabled, this option causes to immediately display the output from executed programs to stdout\&. .sp -This option was added in MySQL 5\&.8\&.0\&. +This option was added in MySQL 8\&.0\&.0\&. .RE .sp .RS 4 @@ -888,7 +888,7 @@ statement is wrapped inside a view\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP @@ -900,7 +900,7 @@ You should have received a copy of the GNU General Public License along with the .IP " 1." 4 The SHA-256 Authentication Plugin .RS 4 -\%http://dev.mysql.com/doc/refman/5.7/en/sha256-authentication-plugin.html +\%http://dev.mysql.com/doc/refman/8.0/en/sha256-authentication-plugin.html .RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, diff --git a/man/perror.1 b/man/perror.1 index 08e4b64560c9..13d4ecf5d00d 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -2,12 +2,12 @@ .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -176,7 +176,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/replace.1 b/man/replace.1 index 42e523b86734..0e4eebdf7b49 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -2,12 +2,12 @@ .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -167,7 +167,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index 355c686138fe..000e6332b7f0 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -120,7 +120,7 @@ Section\ \&24.5.1.5, \(lqUsing a Stack Trace\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/resolveip.1 b/man/resolveip.1 index 6c9e032141c9..ddb48e2b7ba3 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 03/17/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "08/25/2016" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -101,7 +101,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP From c70c68b76772a2f96723fb3c6332b7f1a6e11a4a Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Wed, 24 May 2017 14:55:13 +0300 Subject: [PATCH 203/305] MW-383 Bumped wsrep patch version --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 7c395168f087..1a511b9c6c80 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "19") +SET(WSREP_PATCH_VERSION "20") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From 163cfea83f93e994620912bf5eb32aad392e2c16 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Wed, 24 May 2017 14:45:56 +0300 Subject: [PATCH 204/305] MW-383 Updated man pages --- man/comp_err.1 | 6 +- man/innochecksum.1 | 13 +- man/msql2mysql.1 | 6 +- man/my_print_defaults.1 | 6 +- man/myisam_ftdump.1 | 6 +- man/myisamchk.1 | 14 +- man/myisamlog.1 | 6 +- man/myisampack.1 | 6 +- man/mysql-stress-test.pl.1 | 6 +- man/mysql-test-run.pl.1 | 232 +++++++++++++++++++++++++++++-- man/mysql.1 | 50 ++++--- man/mysql.server.1 | 6 +- man/mysql_client_test.1 | 13 +- man/mysql_config.1 | 10 +- man/mysql_convert_table_format.1 | 8 +- man/mysql_find_rows.1 | 6 +- man/mysql_fix_extensions.1 | 6 +- man/mysql_install_db.1 | 6 +- man/mysql_plugin.1 | 6 +- man/mysql_secure_installation.1 | 6 +- man/mysql_setpermission.1 | 8 +- man/mysql_tzinfo_to_sql.1 | 6 +- man/mysql_upgrade.1 | 10 +- man/mysql_waitpid.1 | 6 +- man/mysql_zap.1 | 6 +- man/mysqlaccess.1 | 47 ++++++- man/mysqladmin.1 | 8 +- man/mysqlbinlog.1 | 10 +- man/mysqlbug.1 | 6 +- man/mysqlcheck.1 | 22 +-- man/mysqld.8 | 6 +- man/mysqld_multi.1 | 16 +-- man/mysqld_safe.1 | 39 ++++-- man/mysqldump.1 | 45 +++--- man/mysqldumpslow.1 | 6 +- man/mysqlhotcopy.1 | 8 +- man/mysqlimport.1 | 13 +- man/mysqlshow.1 | 28 ++-- man/mysqlslap.1 | 6 +- man/mysqltest.1 | 16 +-- man/perror.1 | 10 +- man/replace.1 | 6 +- man/resolve_stack_dump.1 | 6 +- man/resolveip.1 | 6 +- 44 files changed, 514 insertions(+), 244 deletions(-) diff --git a/man/comp_err.1 b/man/comp_err.1 index 1af5285eb163..883134a974e1 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -2,12 +2,12 @@ .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -241,7 +241,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 021b6bf4a46f..97bf8bc7a05a 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -2,12 +2,12 @@ .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -39,13 +39,16 @@ prints checksums for InnoDB files\&. This tool reads an InnoDB -tablespace file, calculates the checksum for each page, compares the calculated checksum to the stored checksum, and reports mismatches, which indicate damaged pages\&. It was originally developed to speed up verifying the integrity of tablespace files after power outages but can also be used after file copies\&. Because checksum mismatches will cause +tablespace file, calculates the checksum for each page, compares the calculated checksum to the stored checksum, and reports mismatches, which indicate damaged pages\&. It was originally developed to speed up verifying the integrity of tablespace files after power outages but can also be used after file copies\&. Because checksum mismatches cause InnoDB -to deliberately shut down a running server, it can be preferable to use this tool rather than waiting for a server in production usage to encounter the damaged pages\&. +to deliberately shut down a running server, it may be preferable to use this tool rather than waiting for an in\-production server to encounter the damaged pages\&. \fBinnochecksum\fR supports files up to 2GB in size\&. .PP \fBinnochecksum\fR +does not support tablespaces that contain compressed pages\&. +.PP +\fBinnochecksum\fR cannot be used on tablespace files that the server already has open\&. For such files, you should use CHECK TABLE to check tables within the tablespace\&. @@ -151,7 +154,7 @@ Verbose mode; print a progress indicator every five seconds\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 index 378e693e75de..bda3c74ce588 100644 --- a/man/msql2mysql.1 +++ b/man/msql2mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmsql2mysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMSQL2MYSQL\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMSQL2MYSQL\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -68,7 +68,7 @@ utility to make the function name substitutions\&. See .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index 1b5cb1716bbd..d057bb4d3d7c 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -2,12 +2,12 @@ .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -183,7 +183,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index a22b306e2a88..95ec12aa3634 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -238,7 +238,7 @@ Verbose mode\&. Print more output about what the program does\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/myisamchk.1 b/man/myisamchk.1 index 91019f848ab0..167ae19e36ef 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -617,7 +617,7 @@ myisam_stats_method system variable\&. For more information, see the description of myisam_stats_method in -Section\ \&5.1.4, \(lqServer System Variables\(rq, and +Section\ \&5.1.5, \(lqServer System Variables\(rq, and Section\ \&8.3.7, \(lqInnoDB and MyISAM Index Statistics Collection\(rq\&. .PP ft_min_word_len @@ -963,7 +963,7 @@ Overwrite old intermediate files (files with names like \fB\-k \fR\fB\fIval\fR\fR .sp For -\fBmyisamchk\fR, the option value is a bit\-value that indicates which indexes to update\&. Each binary bit of the option value corresponds to a table index, where the first index is bit 0\&. An option value of 0 disables updates to all indexes, which can be used to get faster inserts\&. Deactivated indexes can be reactivated by using +\fBmyisamchk\fR, the option value is a bit value that indicates which indexes to update\&. Each binary bit of the option value corresponds to a table index, where the first index is bit 0\&. An option value of 0 disables updates to all indexes, which can be used to get faster inserts\&. Deactivated indexes can be reactivated by using \fBmyisamchk \-r\fR\&. .RE .sp @@ -1130,7 +1130,7 @@ uses the value of the TMPDIR environment variable\&. \fB\-\-tmpdir\fR -can be set to a list of directory paths that are used successively in round\-robin fashion for creating temporary files\&. The separator character between directory names is the colon (\(lq:\(rq) on Unix and the semicolon (\(lq;\(rq) on Windows\&. +can be set to a list of directory paths that are used successively in round\-robin fashion for creating temporary files\&. The separator character between directory names is the colon (:) on Unix and the semicolon (;) on Windows\&. .RE .sp .RS 4 @@ -1367,7 +1367,7 @@ CREATE TABLE person PRIMARY KEY (id), INDEX (last_name, first_name), INDEX (birth) -) MAX_ROWS = 1000000; +) MAX_ROWS = 1000000 ENGINE=MYISAM; .fi .if n \{\ .RE @@ -2451,7 +2451,7 @@ instead of .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/myisamlog.1 b/man/myisamlog.1 index 3f18134f2f2d..f1d73351fc5b 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -227,7 +227,7 @@ Display version information\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/myisampack.1 b/man/myisampack.1 index d59d70494e46..578df84b23cd 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -825,7 +825,7 @@ option to .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index 9b1116b8582b..706b665035c4 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/20/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "08/25/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "04/20/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -445,7 +445,7 @@ Verbose mode\&. Print more information about what the program does\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index 553fa257edf8..2541cd2e6bd1 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/20/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "08/25/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "04/20/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,6 +33,24 @@ mysql-test-run.pl \- run MySQL test suite .HP \w'\fBmysql\-test\-run\&.pl\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u \fBmysql\-test\-run\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR .SH "DESCRIPTION" +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +\fIThis content is no longer updated\&.\fR +Any further updates to test framework documention take place in the MySQL Source Code documentation and can be accessed at +\m[blue]\fBThe MySQL Test Framework, Version 2\&.0\fR\m[]\&\s-2\u[1]\d\s+2\&. +.sp .5v +.RE .PP The \fBmysql\-test\-run\&.pl\fR @@ -262,6 +280,7 @@ l l l l l l l l +l l l l. T{ MTR_BUILD_THREAD @@ -293,7 +312,7 @@ Setting of a timeout in minutes or seconds, corresponding to command CTEST (all in seconds)\&. MTR_CTEST_TIMEOUT is for \fBctest\fR unit tests; it was added in - MySQL 5\&.8\&.0\&. + MySQL 8\&.0\&.0\&. T} T{ MTR_PARALLEL @@ -365,6 +384,12 @@ T}:T{ Path name to the var directory that is used for logs, temporary files, and so forth T} +T{ +TSAN_OPTIONS +T}:T{ +Path name to a file containing ThreadSanitizer suppressions\&. Supported + as of MySQL 8\&.0\&.1\&. +T} .TE .sp 1 .PP @@ -428,6 +453,14 @@ BIG_TEST is set to 1\&. .sp This is typically done for tests that take very long to run, or that use very much resources, so that they are not suitable for running as part of a normal test suite run\&. +.sp +If both +\fB\-\-big\-test\fR +and +\fB\-\-only\-big\-tests\fR +are given, +\fB\-\-only\-big\-tests\fR +is ignored\&. .RE .sp .RS 4 @@ -536,9 +569,29 @@ to use .sp -1 .IP \(bu 2.3 .\} +\fB\-\-charset\-for\-testdb=\fR\fB\fIcharset_name\fR\fR +.sp +Specify the default character set for the +test +database\&. The default value is +latin1\&. +.sp +This option was added in MySQL 8\&.0\&.1\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-check\-testcases\fR .sp -Check test cases for side effects\&. This is done by checking system state before and after each test case; if there is any difference, a warning to that effect will be written, but the test case will not be marked as failed because of it\&. This check is enabled by default\&. +Check test cases for side effects\&. This is done by checking the system state before and after each test case; if there is any difference, a warning to that effect is written, but the test case is not marked as failed because of it\&. This check is enabled by default\&. To disable it, use the +\fB\-\-nocheck\-testcases\fR +option\&. .RE .sp .RS 4 @@ -849,7 +902,7 @@ prefix is used so that does not fail if Debug Sync is not compiled in\&. .sp For information about using the Debug Sync facility for testing, see -Section\ \&4.14, \(lqThread Synchronization in Test Cases\(rq\&. +Section\ \&4.15, \(lqThread Synchronization in Test Cases\(rq\&. .RE .sp .RS 4 @@ -862,7 +915,10 @@ Section\ \&4.14, \(lqThread Synchronization in Test Cases\(rq\&. .\} \fB\-\-default\-myisam\fR .sp -Use MyISAM as default engine for all except InnoDB\-specific tests\&. This option is on by default in MySQL 5\&.5 and 5\&.6 but it off by default from MySQL 5\&.7\&. See also +Use +MyISAM +as the default storage engine for all except +InnoDB\-specific tests\&. This option is on by default in MySQL 5\&.5 and 5\&.6, but is off by default as of MySQL 5\&.7\&. See also \fB\-\-nodefault\-myisam\fR\&. .RE .sp @@ -900,6 +956,26 @@ Add setting from the named file to all generated configs\&. .sp -1 .IP \(bu 2.3 .\} +\fB\-\-discover\fR +.sp +Attempt to preload +discover, the Developer Studio Memory Error Discovery Tool when starting +\fBmysqld\fR\&. Reports from +discover +may be found in +log/mysqld\&.%p\&.txt +under the directory given by +\fB\-\-vardir\fR\&. This option was added in MySQL 8\&.0\&.1\&. It is supported only on SPARC\-M7 systems\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-do\-suite=\fR\fB\fIprefix or regex\fR\fR .sp Run all test cases from suites having a name that begins with the given @@ -987,7 +1063,7 @@ option is available from MySQL 5\&.7\&. .sp Use a version of \fBmysqltest\fR -built with the embedded server\&. +built with the embedded server\&. This option was removed in MySQL 8\&.0\&. .RE .sp .RS 4 @@ -1040,7 +1116,13 @@ It is also possible to supply more than one .sp Run EXPLAIN EXTENDED -on all SELECT, INSERT, REPLACE, UPDATE and DELETE queries\&. +on all +SELECT, +INSERT, +REPLACE, +UPDATE, and +DELETE +statements\&. .RE .sp .RS 4 @@ -1099,6 +1181,25 @@ Do not perform controlled shutdown when servers need to be restarted or at the e .sp -1 .IP \(bu 2.3 .\} +\fB\-\-fail\-check\-testcases\fR +.sp +Enabling this option when a test is run, causes it to fail if MTR\*(Aqs internal check of the test case fails\&. If this option is disabled, only a warning is generated while the test passes\&. This option is enabled by default\&. For additional information, see the description of the +\fB\-\-check\-testcases\fR +option\&. +.sp +The +\fB\-\-fail\-check\-testcases\fR +option was added in MySQL 8\&.0\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-force\fR .sp Normally, @@ -1427,7 +1528,7 @@ options to set more than one variable\&. Extra options to pass to \fBmysqltest\fR\&. .sp -This option was added in MySQL 5\&.8\&.0\&. +This option was added in MySQL 8\&.0\&.0\&. .RE .sp .RS 4 @@ -1457,9 +1558,9 @@ from starting a cluster\&. It is assumed that there is already a cluster running .\} \fB\-\-nocheck\-testcases\fR .sp -Disable the check for test case side effects; see +Disable the check for test case side effects\&. For additional information, see the description of the \fB\-\-check\-testcases\fR -for a description\&. +option\&. .RE .sp .RS 4 @@ -1498,6 +1599,39 @@ Do not reorder tests to reduce number of restarts, but run them in exactly the o .sp -1 .IP \(bu 2.3 .\} +\fB\-\-no\-skip\fR +.sp +This option forces all tests to run, ignoring any +\fB\-\-skip\fR +commands used in the test\&. This ensures that all tests are run\&. An excluded list (excludenoskip\&.list) is maintained to track which tests should continue to be skipped\&. The +\fB\-\-no\-skip\fR +option continues to skip the tests that are named in the excluded list\&. The default value of +\fB\-\-no\-skip\fR +introduced variable is OFF, which implies users are not forced to run all tests unless the +\fB\-\-no\-skip\fR +is explicitly used\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBmysql\-test\-run\&.pl\fR + \fB\-\-suite=innodb\fR + \fB\-\-no\-skip\fR +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-notimer\fR .sp Cause @@ -1543,6 +1677,28 @@ Do not look for and report errors and warning in the server logs\&. .sp -1 .IP \(bu 2.3 .\} +\fB\-\-only\-big\-tests\fR +.sp +This option causes only big tests to run\&. Normal (non\-big) tests are skipped\&. If both +\fB\-\-big\-test\fR +and +\fB\-\-only\-big\-tests\fR +are given, +\fB\-\-only\-big\-tests\fR +is ignored\&. +.sp +\fB\-\-only\-big\-tests\fR +was added in MySQL 8\&.0\&.1\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-parallel={\fR\fB\fIN\fR\fR\fB|auto}\fR .sp Run tests using @@ -1754,6 +1910,26 @@ Allow a failed and retried test to fail more than the default 2 times before giv .sp -1 .IP \(bu 2.3 .\} +\fB\-\-sanitize\fR +.sp +Scan the server log files for warnings from various sanitizers\&. Use of this option assumes that MySQL was configured with +\fB\-DWITH_ASAN\fR +or +\fB\-DWITH_UBSAN\fR\&. +.sp +This option was added in MySQL 8\&.0\&.0\&. As of MySQL 8\&.0\&.1, the +TSAN_OPTIONS +environment variable can be set to specify the path name of a file containing ThreadSanitizer suppressions\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-shutdown\-timeout=\fR\fB\fIseconds\fR\fR .sp Max number of seconds to wait for servers to do controlled shutdown before killing them\&. Default is 10\&. @@ -2120,6 +2296,32 @@ Specify the maximum test suite runtime in minutes\&. .sp -1 .IP \(bu 2.3 .\} +\fB\-\-summary\-report=\fR\fB\fIfile_name\fR\fR +.sp +Generate a plain text version of the test summary only and write it to the file named as the option argument\&. The file is suitable for sending by email\&. This option was added in MySQL 8\&.0\&.1\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-test\-progress\fR +.sp +Display the percentage of tests remaining\&. This option was added in MySQL 5\&.7\&.19\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-testcase\-timeout=\fR\fB\fIminutes\fR\fR .sp Specify the maximum test case runtime in minutes\&. @@ -2499,7 +2701,7 @@ The hostname resolves to 127\&.0\&.0\&.1 and not to the actual IP address\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP @@ -2507,6 +2709,12 @@ This documentation is distributed in the hope that it will be useful, but WITHOU .PP You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. .sp +.SH "NOTES" +.IP " 1." 4 +The MySQL Test Framework, Version 2.0 +.RS 4 +\%http://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_MYSQL_TEST_RUN.html +.RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available diff --git a/man/mysql.1 b/man/mysql.1 index 43d31634033b..b6429c7ca892 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -73,7 +73,7 @@ shell> \fBmysql \-\-user=\fR\fB\fIuser_name\fR\fR\fB \-\-password=\fR\fB\fIyour_ .\} .PP Then type an SQL statement, end it with -\(lq;\(rq, +;, \eg, or \eG and press Enter\&. @@ -222,7 +222,7 @@ On a computer having multiple network interfaces, use this option to select whic .sp This option is supported only in the version of the \fBmysql\fR -client that is supplied with MySQL Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. +client that is supplied with NDB Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. .RE .sp .RS 4 @@ -276,7 +276,11 @@ Display result set metadata\&. \fB\-\-comments\fR, \fB\-c\fR .sp -Whether to preserve comments in statements sent to the server\&. The default is \-\-skip\-comments (discard comments), enable with \-\-comments (preserve comments)\&. +Whether to preserve comments in statements sent to the server\&. The default is +\fB\-\-skip\-comments\fR +(discard comments), enable with +\fB\-\-comments\fR +(preserve comments)\&. .RE .sp .RS 4 @@ -392,7 +396,7 @@ This option can be useful if the operating system uses one character set and the client by default uses another\&. In this case, output may be formatted incorrectly\&. You can usually fix such issues by using this option to force the client to use the system character set instead\&. .sp For more information, see -Section\ \&10.1.5, \(lqConnection Character Sets and Collations\(rq, and +Section\ \&10.1.4, \(lqConnection Character Sets and Collations\(rq, and Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp @@ -464,7 +468,7 @@ groups\&. .\} \fB\-\-delimiter=\fR\fB\fIstr\fR\fR .sp -Set the statement delimiter\&. The default is the semicolon character (\(lq;\(rq)\&. +Set the statement delimiter\&. The default is the semicolon character (;)\&. .RE .sp .RS 4 @@ -479,7 +483,7 @@ Set the statement delimiter\&. The default is the semicolon character (\(lq;\(rq .sp Disable named commands\&. Use the \e* -form only, or use named commands only at the beginning of a line ending with a semicolon (\(lq;\(rq)\&. +form only, or use named commands only at the beginning of a line ending with a semicolon (;)\&. \fBmysql\fR starts with this option \fIenabled\fR @@ -577,7 +581,7 @@ Produce HTML output\&. Ignore spaces after function names\&. The effect of this is described in the discussion for the IGNORE_SPACE SQL mode (see -Section\ \&5.1.7, \(lqServer SQL Modes\(rq)\&. +Section\ \&5.1.8, \(lqServer SQL Modes\(rq)\&. .RE .sp .RS 4 @@ -620,15 +624,15 @@ Write line numbers for errors\&. Disable this with Enable or disable LOCAL capability for -LOAD DATA INFILE\&. With no value, the option enables +LOAD DATA INFILE\&. For +\fBmysql\fR, this capability is disabled by default\&. With no value, the option enables LOCAL\&. The option may be given as \fB\-\-local\-infile=0\fR or \fB\-\-local\-infile=1\fR to explicitly disable or enable -LOCAL\&. Enabling -LOCAL -has no effect if the server does not also support it\&. +LOCAL\&. Enabling local data loading has no effect if the server does not also support it; see +Section\ \&6.1.6, \(lqSecurity Issues with LOAD DATA LOCAL\(rq .RE .sp .RS 4 @@ -1646,11 +1650,11 @@ delimiter \fIstr\fR, .sp Change the string that \fBmysql\fR -interprets as the separator between SQL statements\&. The default is the semicolon character (\(lq;\(rq)\&. +interprets as the separator between SQL statements\&. The default is the semicolon character (;)\&. .sp The delimiter string can be specified as an unquoted or quoted argument on the delimiter -command line\&. Quoting can be done with either single quote (\*(Aq), double quote ("), or backtick (`) characters\&. To include a quote within a quoted string, either quote the string with a different quote character or escape the quote with a backslash (\(lq\e\(rq) character\&. Backslash should be avoided outside of quoted strings because it is the escape character for MySQL\&. For an unquoted argument, the delimiter is read up to the first space or end of line\&. For a quoted argument, the delimiter is read up to the matching quote on the line\&. +command line\&. Quoting can be done with either single quote (\*(Aq), double quote ("), or backtick (`) characters\&. To include a quote within a quoted string, either quote the string with a different quote character or escape the quote with a backslash (\e) character\&. Backslash should be avoided outside of quoted strings because it is the escape character for MySQL\&. For an unquoted argument, the delimiter is read up to the first space or end of line\&. For a quoted argument, the delimiter is read up to the matching quote on the line\&. .sp \fBmysql\fR interprets instances of the delimiter string as a statement delimiter anywhere it occurs, except within quoted strings\&. Be careful about defining a delimiter that might occur within other words\&. For example, if you define the delimiter as @@ -1666,8 +1670,8 @@ X\&. When the delimiter recognized by \fBmysql\fR is set to something other than the default of -\(lq;\(rq, instances of that character are sent to the server without interpretation\&. However, the server itself still interprets -\(lq;\(rq +;, instances of that character are sent to the server without interpretation\&. However, the server itself still interprets +; as a statement delimiter and processes statements accordingly\&. This behavior on the server side comes into play for multiple\-statement execution (see Section\ \&23.8.17, \(lqC API Support for Multiple Statement Execution\(rq), and for parsing the body of stored procedures and functions, triggers, and events (see Section\ \&20.1, \(lqDefining Stored Programs\(rq)\&. @@ -2347,7 +2351,7 @@ T} T{ \e\e T}:T{ -A literal \(lq\e\(rq backslash character +A literal \e backslash character T} T{ \e\fIx\fR @@ -2654,7 +2658,7 @@ command, uses it as a search string to access server\-side help from the contents of the MySQL Reference Manual\&. The proper operation of this command requires that the help tables in the mysql database be initialized with help topic information (see -Section\ \&5.1.9, \(lqServer-Side Help\(rq)\&. +Section\ \&5.1.10, \(lqServer-Side Help\(rq)\&. .PP If there is no match for the search string, the search fails: .sp @@ -2751,9 +2755,9 @@ mysql> SHOW BINARY LOGS; .\} .PP The search string can contain the wildcard characters -\(lq%\(rq +% and -\(lq_\(rq\&. These have the same meaning as for pattern\-matching operations performed with the +_\&. These have the same meaning as for pattern\-matching operations performed with the LIKE operator\&. For example, HELP rep% @@ -3013,7 +3017,7 @@ SET sql_safe_updates=1, sql_select_limit=1000, sql_max_join_size=1000000; .\} .PP See -Section\ \&5.1.4, \(lqServer System Variables\(rq\&. +Section\ \&5.1.5, \(lqServer System Variables\(rq\&. .PP The SET @@ -3139,7 +3143,7 @@ Section\ \&23.8.16, \(lqControlling Automatic Reconnection Behavior\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql.server.1 b/man/mysql.server.1 index 75bd26772f1d..874f01319735 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -329,7 +329,7 @@ exits with an error\&. The default value is 900\&. A value of 0 means not to wai .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index 25fa050ef181..a548ed5fe8db 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/20/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "08/25/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "04/20/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -43,8 +43,11 @@ The program is used for testing aspects of the MySQL client API that cannot be tested using \fBmysqltest\fR and its test language\&. +\fBmysql_client_test\fR +is run as part of the test suite\&. +.PP \fBmysql_client_test_embedded\fR -is similar but used for testing the embedded server\&. Both programs are run as part of the test suite\&. +is similar but is used for testing the embedded server\&. This program is available only prior to MySQL 8\&.0\&. .PP The source code for the programs can be found in in tests/mysql_client_test\&.c @@ -208,7 +211,7 @@ The TCP/IP port number to use for the connection\&. \fB\-\-server\-arg=\fR\fB\fIarg\fR\fR, \fB\-A \fR\fB\fIarg\fR\fR .sp -Argument to send to the embedded server\&. +Argument to send to the embedded server\&. This option was removed in MySQL 8\&.0\&. .RE .sp .RS 4 @@ -303,7 +306,7 @@ mysql\-test/var\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_config.1 b/man/mysql_config.1 index 51291d2dae37..fb7fa66cbb24 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -79,9 +79,11 @@ Compiler options to find MySQL include files\&. .IP \(bu 2.3 .\} \fB\-\-libmysqld\-libs\fR, +\fB\-\-embedded\-libs\fR, \fB\-\-embedded\fR .sp -Libraries and options required to link with the MySQL embedded server\&. +Libraries and options required to link with +libmysqld, the MySQL embedded server\&. .RE .sp .RS 4 @@ -236,7 +238,7 @@ gcc \-o progname progname\&.o `mysql_config \-\-libs` .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 index 609774ecbdfa..1f14b43d2c5b 100644 --- a/man/mysql_convert_table_format.1 +++ b/man/mysql_convert_table_format.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_convert_table_format\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONVERT_TAB" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONVERT_TAB" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -43,7 +43,7 @@ DBI and DBD::mysql Perl modules be installed (see -Section\ \&2.13, \(lqPerl Installation Notes\(rq)\&. +Section\ \&2.12, \(lqPerl Installation Notes\(rq)\&. .PP Invoke \fBmysql_convert_table_format\fR @@ -204,7 +204,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 index 806108d38021..01756ecc740c 100644 --- a/man/mysql_find_rows.1 +++ b/man/mysql_find_rows.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_find_rows\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIND_ROWS\F" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -149,7 +149,7 @@ Start output from this row\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 index 5b7ea7483a56..dac5ea3f01b9 100644 --- a/man/mysql_fix_extensions.1 +++ b/man/mysql_fix_extensions.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_fix_extensions\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIX_EXTENSI" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -69,7 +69,7 @@ shell> \fBmysql_fix_extensions \fR\fB\fIdata_dir\fR\fR .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index db5ce4ca6168..cda9ef903fd6 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -351,7 +351,7 @@ For internal use\&. This option is used for creating Windows distributions\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index 45b1d786e555..dfacef981c8a 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -347,7 +347,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index 535458224c51..cbcc0963891a 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -109,7 +109,7 @@ When executed, the script prompts you to determine which actions to perform\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 index 1a5d3fd7ebe6..ba8e82ef7f24 100644 --- a/man/mysql_setpermission.1 +++ b/man/mysql_setpermission.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_setpermission\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SETPERMISSI" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SETPERMISSI" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -42,7 +42,7 @@ DBI and DBD::mysql Perl modules be installed (see -Section\ \&2.13, \(lqPerl Installation Notes\(rq)\&. +Section\ \&2.12, \(lqPerl Installation Notes\(rq)\&. .PP Invoke \fBmysql_setpermission\fR @@ -159,7 +159,7 @@ The MySQL user name to use when connecting to the server\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index 5e7a37e81ed3..8c464bc8936f 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -120,7 +120,7 @@ After running .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index 8044650651ea..ca262e024bba 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -42,7 +42,7 @@ also upgrades the system tables so that you can take advantage of new privileges If \fBmysql_upgrade\fR finds that a table has a possible incompatibility, it performs a table check and, if problems are found, attempts a table repair\&. If the table cannot be repaired, see -Section\ \&2.11.4, \(lqRebuilding or Repairing Tables or Indexes\(rq +Section\ \&2.11.3, \(lqRebuilding or Repairing Tables or Indexes\(rq for manual table repair strategies\&. .PP You should execute @@ -237,7 +237,7 @@ option\&. .PP \fBmysql_upgrade\fR does not upgrade the contents of the help tables\&. For upgrade instructions, see -Section\ \&5.1.9, \(lqServer-Side Help\(rq\&. +Section\ \&5.1.10, \(lqServer-Side Help\(rq\&. .PP \fBmysql_upgrade\fR supports the following options, which can be specified on the command line or in the @@ -741,7 +741,7 @@ runs\&. This is the default behavior; to disable binary logging during the upgra .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 index 84f5dec5b4d7..5f161785f1ed 100644 --- a/man/mysql_waitpid.1 +++ b/man/mysql_waitpid.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_waitpid\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_WAITPID\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_WAITPID\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -122,7 +122,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 index f5da5a6e0432..adbd5d792ae5 100644 --- a/man/mysql_zap.1 +++ b/man/mysql_zap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_zap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_ZAP\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_ZAP\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -124,7 +124,7 @@ Test mode\&. Display information about each process but do not kill it\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index 31136bb8feee..4b66177e7fba 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlaccess\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLACCESS\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLACCESS\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -35,7 +35,7 @@ mysqlaccess \- client for checking access privileges .SH "DESCRIPTION" .PP \fBmysqlaccess\fR -is a diagnostic tool that Yves Carlier has provided for the MySQL distribution\&. It checks the access privileges for a host name, user name, and database combination\&. Note that +is a diagnostic tool that Yves Carlier has provided for the MySQL distribution\&. It checks the access privileges for a host name, user name, and database combination\&. \fBmysqlaccess\fR checks access using only the user, @@ -61,8 +61,45 @@ shell> \fBmysqlaccess [\fR\fB\fIhost_name\fR\fR\fB [\fR\fB\fIuser_name\fR\fR\fB .RE .\} .PP +When \fBmysqlaccess\fR -supports the following options\&. +runs, it loads and executes the contents of its configuration file, +mysqlaccess\&.conf\&. +\fBmysqlaccess\fR +looks for the configuration file in these locations, in order: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The directory named by the +\fBSYSCONFDIR\fR +option to +\fBCMake\fR +when MySQL was built\&. By default, this is the +etc +directory located under the compiled\-in installation directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The +/etc +directory\&. +.RE +.PP +\fBmysqlaccess\fR +supports the options shown in the following table\&. .sp .RS 4 .ie n \{\ @@ -391,7 +428,7 @@ error will occur when you run .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index cf5d0d475f75..b8dc9bb31fe7 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -621,7 +621,7 @@ On a computer having multiple network interfaces, use this option to select whic .sp This option is supported only in the version of \fBmysqladmin\fR -that is supplied with MySQL Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. +that is supplied with NDB Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. .RE .sp .RS 4 @@ -1189,7 +1189,7 @@ The maximum number of seconds to wait for server shutdown\&. The default value i .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index cbea755cb0e8..d0e165e96067 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -491,7 +491,7 @@ USE\&. (In particular, no cross\-database updates should be used\&.) \fBNote\fR .ps -1 .br -Prior to MySQL Cluster NDB 7\&.2\&.2, this option did not work correctly with MySQL Cluster tables unless, unless the binary log was generated using +Prior to MySQL NDB Cluster 7\&.2\&.2, this option did not work correctly with NDB Cluster tables unless, unless the binary log was generated using \fB\-\-log\-bin\-use\-v1\-row\-events=0\fR\&. (Bug #13067813) .sp .5v .RE @@ -946,7 +946,7 @@ set to 32 enables this data to be seen\&. .sp This option is supported only by the versions of \fBmysqlbinlog\fR -supplied with the MySQL Cluster distribution, or built from the MySQL Cluster sources\&. +supplied with the NDB Cluster distribution, or built from the NDB Cluster sources\&. .RE .sp .RS 4 @@ -2152,7 +2152,7 @@ option can be used to prevent this header from being written\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlbug.1 b/man/mysqlbug.1 index a9f8baafd09d..276bdc2e6074 100644 --- a/man/mysqlbug.1 +++ b/man/mysqlbug.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbug\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBUG\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBUG\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -41,7 +41,7 @@ The normal way to report bugs is to visit .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index a535c9a5fdf9..8b5dd645623f 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -105,7 +105,7 @@ note : The storage engine for the table doesn\*(Aqt support check If \fBmysqlcheck\fR is unable to repair a table, see -Section\ \&2.11.4, \(lqRebuilding or Repairing Tables or Indexes\(rq +Section\ \&2.11.3, \(lqRebuilding or Repairing Tables or Indexes\(rq for manual table repair strategies\&. This will be the case, for example, for InnoDB tables, which can be checked with @@ -233,7 +233,7 @@ option and naming all the databases on the command line, except that the INFORMATION_SCHEMA and performace_schema -databases are not dumped\&. They can be dumped by explicitly naming them with the +databases are not checked\&. They can be checked by explicitly naming them with the \fB\-\-databases\fR option\&. .RE @@ -293,7 +293,7 @@ On a computer having multiple network interfaces, use this option to select whic .sp This option is supported only in the version of \fBmysqlcheck\fR -that is supplied with MySQL Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. +that is supplied with NDB Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. .RE .sp .RS 4 @@ -387,16 +387,6 @@ Compress all information sent between the client and the server if both support Process all tables in the named databases\&. Normally, \fBmysqlcheck\fR treats the first name argument on the command line as a database name and any following names as table names\&. With this option, it treats all name arguments as database names\&. -.sp -This option may be used to dump the -INFORMATION_SCHEMA -and -performace_schema -databases, which normally are not dumped even with the -\fB\-\-all\-databases\fR -option\&. (Also use the -\fB\-\-skip\-lock\-tables\fR -option\&.) .RE .sp .RS 4 @@ -980,7 +970,7 @@ when these statements should not be sent to replication slaves or run when using .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqld.8 b/man/mysqld.8 index c92890ffeeb4..c384cb64d3c3 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -60,7 +60,7 @@ Chapter\ \&2, Installing and Upgrading MySQL\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index eaff3ac7cf8e..fc69564abd2f 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -448,16 +448,6 @@ what you are doing\&. Starting multiple servers with the same data directory doe \fInot\fR give you extra performance in a threaded system\&. See Section\ \&5.6, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} .if n \{\ .sp .\} @@ -671,7 +661,7 @@ Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index 6e7b3891ac65..6a9b556a253e 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -58,7 +58,7 @@ Many of the options to \fBmysqld_safe\fR are the same as the options to \fBmysqld\fR\&. See -Section\ \&5.1.3, \(lqServer Command Options\(rq\&. +Section\ \&5.1.4, \(lqServer Command Options\(rq\&. .PP Options unknown to \fBmysqld_safe\fR @@ -169,7 +169,12 @@ The path to the data directory\&. .\} \fB\-\-defaults\-extra\-file=\fR\fB\fIfile_name\fR\fR .sp -The name of an option file to be read in addition to the usual option files\&. This must be the first option on the command line if it is used\&. If the file does not exist or is otherwise inaccessible, the server will exit with an error\&. +Read this option file in addition to the usual option files\&. If the file does not exist or is otherwise inaccessible, the server will exit with an error\&. +\fIfile_name\fR +is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. This must be the first option on the command line if it is used\&. +.sp +For additional information about this option, see +Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. .RE .sp .RS 4 @@ -182,7 +187,12 @@ The name of an option file to be read in addition to the usual option files\&. T .\} \fB\-\-defaults\-file=\fR\fB\fIfile_name\fR\fR .sp -The name of an option file to be read instead of the usual option files\&. This must be the first option on the command line if it is used\&. +Use only the given option file\&. If the file does not exist or is otherwise inaccessible, the server will exit with an error\&. +\fIfile_name\fR +is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. This must be the first option on the command line if it is used\&. +.sp +For additional information about this option, see +Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. .RE .sp .RS 4 @@ -198,6 +208,8 @@ The name of an option file to be read instead of the usual option files\&. This If \fBmysqld_safe\fR cannot find the server, use this option to indicate the path name to the directory where the server is located\&. +.sp +As of MySQL 5\&.5\&.54, this option is accepted only on the command line, not in option files\&. .RE .sp .RS 4 @@ -386,7 +398,7 @@ cannot find the server, use the \fB\-\-ledir\fR option to indicate the path name to the directory where the server is located\&. .sp -As of MySQL 5\&.5\&.52, this option can be given only on the command line and not in an option file\&. +As of MySQL 5\&.5\&.52, this option is accepted only on the command line, not in option files\&. .RE .sp .RS 4 @@ -419,7 +431,7 @@ in the ledir directory\&. .sp -As of MySQL 5\&.5\&.52, this option can be given only on the command line and not in an option file\&. +As of MySQL 5\&.5\&.52, this option is accepted only on the command line, not in option files\&. .RE .sp .RS 4 @@ -447,7 +459,12 @@ program to set the server\*(Aqs scheduling priority to the given value\&. .\} \fB\-\-no\-defaults\fR .sp -Do not read any option files\&. This must be the first option on the command line if it is used\&. +Do not read any option files\&. If program startup fails due to reading unknown options from an option file, +\fB\-\-no\-defaults\fR +can be used to prevent them from being read\&. This must be the first option on the command line if it is used\&. +.sp +For additional information about this option, see +Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. .RE .sp .RS 4 @@ -495,7 +512,9 @@ for this to function properly\&. .\} \fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR .sp -The path name of the process ID file\&. +The path name that +\fBmysqld\fR +should use for its process ID file\&. .RE .sp .RS 4 @@ -842,7 +861,7 @@ might be overwritten if you upgrade MySQL in the future, so you should make a co .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqldump.1 b/man/mysqldump.1 index f0812eb36f99..c717385f6b7e 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -129,7 +129,7 @@ shell> \fBmysqldump [options] > dump\&.sql\fR .\} .PP However, UTF\-16 is not permitted as a connection character set (see -Section\ \&10.1.5, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the +Section\ \&10.1.4, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the \fB\-\-result\-file\fR option, which creates the output in ASCII format: .sp @@ -272,7 +272,7 @@ mysql database\&. As of 5\&.5\&.25, the dump includes statements to recreate those tables so that they are not missing after reloading the dump file\&. Log table contents are not dumped\&. .PP \fBmysqldump\fR -also does not dump the MySQL Cluster +also does not dump the NDB Cluster ndbinfo information database\&. .PP @@ -498,7 +498,7 @@ statement\&. .br This option is supported only by \fBmysqldump\fR -as supplied with MySQL Cluster\&. It is not available when using MySQL Server 5\&.5\&. +as supplied with NDB Cluster\&. It is not available when using MySQL Server 5\&.5\&. .sp .5v .RE .RE @@ -518,7 +518,7 @@ LOCK TABLES and UNLOCK TABLES statements\&. This results in faster inserts when the dump file is reloaded\&. See -Section\ \&8.2.2.1, \(lqSpeed of INSERT Statements\(rq\&. +Section\ \&8.2.4.1, \(lqOptimizing INSERT Statements\(rq\&. .RE .sp .RS 4 @@ -551,7 +551,7 @@ option and naming all the databases on the command line\&. Adds to a table dump all SQL statements needed to create any tablespaces used by an NDBCLUSTER table\&. This information is not otherwise included in the output from -\fBmysqldump\fR\&. This option is currently relevant only to MySQL Cluster tables\&. +\fBmysqldump\fR\&. This option is currently relevant only to NDB Cluster tables\&. .RE .sp .RS 4 @@ -602,7 +602,7 @@ On a computer having multiple network interfaces, use this option to select whic .sp This option is supported only in the version of \fBmysqldump\fR -that is supplied with MySQL Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. +that is supplied with NDB Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. .RE .sp .RS 4 @@ -677,7 +677,7 @@ maxdb, no_key_options, no_table_options, or no_field_options\&. To use several values, separate them by commas\&. These values have the same meaning as the corresponding options for setting the server SQL mode\&. See -Section\ \&5.1.7, \(lqServer SQL Modes\(rq\&. +Section\ \&5.1.8, \(lqServer SQL Modes\(rq\&. .sp This option does not guarantee compatibility with other servers\&. It only enables those SQL mode values that are currently available for making dump output more compatible\&. For example, \fB\-\-compatible=oracle\fR @@ -749,6 +749,16 @@ CREATE DATABASE and USE statements are included in the output before each new database\&. +.sp +This option may be used to dump the +INFORMATION_SCHEMA +and +performace_schema +databases, which normally are not dumped even with the +\fB\-\-all\-databases\fR +option\&. (Also use the +\fB\-\-skip\-lock\-tables\fR +option\&.) .RE .sp .RS 4 @@ -1117,7 +1127,8 @@ option, the logs are flushed \fIfor each database dumped\fR\&. The exception is when using \fB\-\-lock\-all\-tables\fR, \fB\-\-master\-data\fR, or (as of MySQL 5\&.5\&.21) -\fB\-\-single\-transaction\fR: In this case, the logs are flushed only once, corresponding to the moment that all tables are locked\&. If you want your dump and the log flush to happen at exactly the same moment, you should use +\fB\-\-single\-transaction\fR: In this case, the logs are flushed only once, corresponding to the moment that all tables are locked by +FLUSH TABLES WITH READ LOCK\&. If you want your dump and the log flush to happen at exactly the same moment, you should use \fB\-\-flush\-logs\fR together with \fB\-\-lock\-all\-tables\fR, @@ -1854,11 +1865,11 @@ to retrieve rows for a table from the server a row at a time rather than retriev \fB\-Q\fR .sp Quote identifiers (such as database, table, and column names) within -\(lq`\(rq +` characters\&. If the ANSI_QUOTES SQL mode is enabled, identifiers are quoted within -\(lq"\(rq +" characters\&. This option is enabled by default\&. It can be disabled with \fB\-\-skip\-quote\-names\fR, but this option should be given after any option such as \fB\-\-compatible\fR @@ -1897,9 +1908,9 @@ statements\&. Direct output to the named file\&. The result file is created and its previous contents overwritten, even if an error occurs while generating the dump\&. .sp This option should be used on Windows to prevent newline -\(lq\en\(rq +\en characters from being converted to -\(lq\er\en\(rq +\er\en carriage return/newline sequences\&. .RE .sp @@ -1914,7 +1925,7 @@ carriage return/newline sequences\&. \fB\-\-routines\fR, \fB\-R\fR .sp -Include stored routines (procedures and functions) for the dumped databases in the output\&. Use of this option requires the +Include stored routines (procedures and functions) for the dumped databases in the output\&. This option requires the SELECT privilege for the mysql\&.proc @@ -2024,7 +2035,7 @@ option are mutually exclusive because LOCK TABLES causes any pending transactions to be committed implicitly\&. .sp -This option is not supported for MySQL Cluster tables; the results cannot be guaranteed to be consistent due to the fact that the +This option is not supported for NDB Cluster tables; the results cannot be guaranteed to be consistent due to the fact that the NDBCLUSTER storage engine supports only the READ_COMMITTED @@ -2590,7 +2601,7 @@ Section\ \&C.5, \(lqRestrictions on Views\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index 4597f10e3e23..3b6a5a82c380 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -316,7 +316,7 @@ Count: 3 Time=2\&.13s (6s) Lock=0\&.00s (0s) Rows=0\&.0 (0), root[root]@local .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 index df1b51ded694..467e2c1f3f5e 100644 --- a/man/mysqlhotcopy.1 +++ b/man/mysqlhotcopy.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlhotcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLHOTCOPY\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLHOTCOPY\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -91,7 +91,7 @@ shell> \fBmysqlhotcopy \fR\fB\fIdb_name\fR\fR\fB\&./\fR\fB\fIregex\fR\fR\fB/\fR .RE .\} .PP -The regular expression for the table name can be negated by prefixing it with a tilde (\(lq~\(rq): +The regular expression for the table name can be negated by prefixing it with a tilde (~): .sp .if n \{\ .RS 4 @@ -491,7 +491,7 @@ shell> \fBperldoc mysqlhotcopy\fR .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index 19066c479346..24f7dcff60f0 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -117,7 +117,7 @@ On a computer having multiple network interfaces, use this option to select whic .sp This option is supported only in the version of \fBmysqlimport\fR -that is supplied with MySQL Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. +that is supplied with NDB Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. .RE .sp .RS 4 @@ -436,7 +436,10 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. \fB\-\-local\fR, \fB\-L\fR .sp -Read input files locally from the client host\&. +By default, files are read by the server on the server host\&. With this option, +\fBmysqlimport\fR +reads input files locally on the client host\&. Enabling local data loading has no effect if the server does not also support it; see +Section\ \&6.1.6, \(lqSecurity Issues with LOAD DATA LOCAL\(rq .RE .sp .RS 4 @@ -766,7 +769,7 @@ shell> \fBmysql \-e \*(AqSELECT * FROM imptest\*(Aq test\fR .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index 94ec48674047..8d15bf108458 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -95,23 +95,23 @@ If no column is given, all matching columns and column types in the table are sh .PP The output displays only the names of those databases, tables, or columns for which you have some privileges\&. .PP -If the last argument contains shell or SQL wildcard characters (\(lq*\(rq, -\(lq?\(rq, -\(lq%\(rq, or -\(lq_\(rq), only those names that are matched by the wildcard are shown\&. If a database name contains any underscores, those should be escaped with a backslash (some Unix shells require two) to get a list of the proper tables or columns\&. -\(lq*\(rq +If the last argument contains shell or SQL wildcard characters (*, +?, +%, or +_), only those names that are matched by the wildcard are shown\&. If a database name contains any underscores, those should be escaped with a backslash (some Unix shells require two) to get a list of the proper tables or columns\&. +* and -\(lq?\(rq +? characters are converted into SQL -\(lq%\(rq +% and -\(lq_\(rq +_ wildcard characters\&. This might cause some confusion when you try to display the columns for a table with a -\(lq_\(rq +_ in the name, because in this case, \fBmysqlshow\fR shows you only the table names that match the pattern\&. This is easily fixed by adding an extra -\(lq%\(rq +% last on the command line as a separate argument\&. .PP \fBmysqlshow\fR @@ -150,7 +150,7 @@ On a computer having multiple network interfaces, use this option to select whic .sp This option is supported only in the version of \fBmysqlshow\fR -that is supplied with MySQL Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. +that is supplied with NDB Cluster\&. It is not available in standard MySQL Server 5\&.5 releases\&. .RE .sp .RS 4 @@ -617,7 +617,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index df1eefbc4257..13909a9aeec8 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1003,7 +1003,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/mysqltest.1 b/man/mysqltest.1 index 41a447dab534..9bd1b7c5b4c2 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/20/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "08/25/2016" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "04/20/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -49,7 +49,7 @@ rather than invoking it directly\&. \fBmysqltest_embedded\fR is similar but is built with support for the libmysqld -embedded server\&. +embedded server\&. This program is available only prior to MySQL 8\&.0\&. .PP Features of \fBmysqltest\fR: @@ -613,7 +613,7 @@ updates the given file by writing the actual test results to it\&. Pass the argument as an argument to the embedded server\&. For example, \fB\-\-server\-arg=\-\-tmpdir=/tmp\fR or -\fB\-\-server\-arg=\-\-core\fR\&. Up to 64 arguments can be given\&. +\fB\-\-server\-arg=\-\-core\fR\&. Up to 64 arguments can be given\&. This option was removed in MySQL 8\&.0\&. .RE .sp .RS 4 @@ -627,7 +627,7 @@ or \fB\-\-server\-file=\fR\fB\fIfile_name\fR\fR, \fB\-F \fR\fB\fIfile_name\fR\fR .sp -Read arguments for the embedded server from the given file\&. The file should contain one argument per line\&. +Read arguments for the embedded server from the given file\&. The file should contain one argument per line\&. This option was removed in MySQL 8\&.0\&. .RE .sp .RS 4 @@ -826,7 +826,7 @@ If enabled, this option causes to immediately display the output from executed programs to stdout\&. .sp -This option was added in MySQL 5\&.8\&.0\&. +This option was added in MySQL 8\&.0\&.0\&. .RE .sp .RS 4 @@ -888,7 +888,7 @@ statement is wrapped inside a view\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 2006, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 2006, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP @@ -900,7 +900,7 @@ You should have received a copy of the GNU General Public License along with the .IP " 1." 4 The SHA-256 Authentication Plugin .RS 4 -\%http://dev.mysql.com/doc/refman/5.7/en/sha256-authentication-plugin.html +\%http://dev.mysql.com/doc/refman/8.0/en/sha256-authentication-plugin.html .RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, diff --git a/man/perror.1 b/man/perror.1 index 862974c7e69e..2545ecdf2ff2 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -2,12 +2,12 @@ .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -82,7 +82,7 @@ OS error code 64: Machine is not on the network .RE .\} .PP -To obtain the error message for a MySQL Cluster error code, invoke +To obtain the error message for an NDB Cluster error code, invoke \fBperror\fR with the \fB\-\-ndb\fR @@ -129,7 +129,7 @@ Display a help message and exit\&. .\} \fB\-\-ndb\fR .sp -Print the error message for a MySQL Cluster error code\&. +Print the error message for an NDB Cluster error code\&. .RE .sp .RS 4 @@ -176,7 +176,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/replace.1 b/man/replace.1 index 4bcc4d07053f..7319af2f8b2b 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -2,12 +2,12 @@ .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -167,7 +167,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index 71e04e04f887..cffe437012c7 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -120,7 +120,7 @@ Section\ \&24.5.1.5, \(lqUsing a Stack Trace\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/resolveip.1 b/man/resolveip.1 index 5df65be56b9a..9ce971100e02 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 04/27/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -101,7 +101,7 @@ Display version information and exit\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP From 8120c0cad38da9645f82d20c04e3d57d71471856 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Wed, 24 May 2017 14:46:25 +0300 Subject: [PATCH 205/305] MW-383 Bumped wsrep patch version --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 1a511b9c6c80..28cb95b56ac2 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "20") +SET(WSREP_PATCH_VERSION "21") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From fd3a84624d47004d1240e4b013a31753214ec94f Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Mon, 19 Jun 2017 17:23:02 +0700 Subject: [PATCH 206/305] MW-384 protect access to wsrep_ready variable with mutex --- sql/mysqld.cc | 2 +- sql/slave.cc | 2 +- sql/sql_parse.cc | 10 +++++----- sql/wsrep_mysqld.cc | 36 +++++++++++++++++++++++------------- sql/wsrep_mysqld.h | 3 ++- sql/wsrep_priv.h | 2 +- sql/wsrep_sst.cc | 1 - 7 files changed, 33 insertions(+), 23 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 51b2d3e79fe0..c3fe68170832 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7412,7 +7412,7 @@ SHOW_VAR status_vars[]= { #endif #ifdef WITH_WSREP {"wsrep_connected", (char*) &wsrep_connected, SHOW_BOOL}, - {"wsrep_ready", (char*) &wsrep_ready, SHOW_BOOL}, + {"wsrep_ready", (char*) &wsrep_show_ready, SHOW_FUNC}, {"wsrep_cluster_state_uuid", (char*) &wsrep_cluster_state_uuid,SHOW_CHAR_PTR}, {"wsrep_cluster_conf_id", (char*) &wsrep_cluster_conf_id, SHOW_LONGLONG}, {"wsrep_cluster_status", (char*) &wsrep_cluster_status, SHOW_CHAR_PTR}, diff --git a/sql/slave.cc b/sql/slave.cc index d0b14d17ec98..7384fe4eaeb2 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3552,7 +3552,7 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \ */ if (wsrep_node_dropped && wsrep_restart_slave) { - if (wsrep_ready) + if (wsrep_ready_get()) { WSREP_INFO("Slave error due to node temporarily non-primary" "SQL slave will continue"); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 6265fef59187..591dc1b06482 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -833,7 +833,7 @@ bool do_command(THD *thd) * bail out if DB snapshot has not been installed. We however, * allow queries "SET" and "SHOW", they are trapped later in execute_command */ - if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready && + if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready_get() && command != COM_QUERY && command != COM_PING && command != COM_QUIT && @@ -847,7 +847,7 @@ bool do_command(THD *thd) command != COM_END ) { my_error(ER_UNKNOWN_COM_ERROR, MYF(0), - "WSREP has not yet prepared node for application use"); + "WSREP has not yet prepared node for application use"); thd->protocol->end_statement(); return_value= FALSE; goto out; @@ -864,7 +864,7 @@ bool do_command(THD *thd) while (thd->wsrep_conflict_state== RETRY_AUTOCOMMIT) { return_value= dispatch_command(command, thd, thd->wsrep_retry_query, - thd->wsrep_retry_query_len); + thd->wsrep_retry_query_len); } } if (thd->wsrep_retry_query && thd->wsrep_conflict_state != REPLAYING) @@ -2352,7 +2352,7 @@ mysql_execute_command(THD *thd) * bail out if DB snapshot has not been installed. We however, * allow SET and SHOW queries */ - if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready && + if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready_get() && lex->sql_command != SQLCOM_SET_OPTION && !wsrep_is_show_query(lex->sql_command)) { @@ -2370,7 +2370,7 @@ mysql_execute_command(THD *thd) { #endif /* DIRTY_HACK */ my_error(ER_UNKNOWN_COM_ERROR, MYF(0), - "WSREP has not yet prepared node for application use"); + "WSREP has not yet prepared node for application use"); goto error; #if DIRTY_HACK } diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 3502621fe913..f0362b396c62 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -13,6 +13,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include // SHOW_MY_BOOL #include #include #include @@ -272,7 +273,7 @@ wsrep_view_handler_cb (void* app_ctx, // version change if (view->proto_ver != wsrep_protocol_version) { - my_bool wsrep_ready_saved= wsrep_ready; + my_bool wsrep_ready_saved= wsrep_ready_get(); wsrep_ready_set(FALSE); WSREP_INFO("closing client connections for " "protocol change %ld -> %d", @@ -386,16 +387,34 @@ wsrep_view_handler_cb (void* app_ctx, return WSREP_CB_SUCCESS; } -void wsrep_ready_set (my_bool x) +my_bool wsrep_ready_set (my_bool x) { WSREP_DEBUG("Setting wsrep_ready to %d", x); if (mysql_mutex_lock (&LOCK_wsrep_ready)) abort(); - if (wsrep_ready != x) + my_bool ret= (wsrep_ready != x); + if (ret) { wsrep_ready= x; mysql_cond_signal (&COND_wsrep_ready); } mysql_mutex_unlock (&LOCK_wsrep_ready); + return ret; +} + +my_bool wsrep_ready_get (void) +{ + if (mysql_mutex_lock (&LOCK_wsrep_ready)) abort(); + my_bool ret= wsrep_ready; + mysql_mutex_unlock (&LOCK_wsrep_ready); + return ret; +} + +int wsrep_show_ready(THD *thd, SHOW_VAR *var, char *buff) +{ + var->type= SHOW_MY_BOOL; + var->value= buff; + *((my_bool *)buff)= wsrep_ready_get(); + return 0; } // Wait until wsrep has reached ready state @@ -414,17 +433,8 @@ void wsrep_ready_wait () static void wsrep_synced_cb(void* app_ctx) { WSREP_INFO("Synchronized with group, ready for connections"); - bool signal_main= false; - if (mysql_mutex_lock (&LOCK_wsrep_ready)) abort(); - if (!wsrep_ready) - { - wsrep_ready= TRUE; - mysql_cond_signal (&COND_wsrep_ready); - signal_main= true; - - } + my_bool signal_main= wsrep_ready_set(TRUE); local_status.set(WSREP_MEMBER_SYNCED); - mysql_mutex_unlock (&LOCK_wsrep_ready); if (signal_main) { diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index 1db1141e2501..723137209d8e 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -113,7 +113,6 @@ enum enum_wsrep_sync_wait { // MySQL status variables extern my_bool wsrep_connected; -extern my_bool wsrep_ready; extern const char* wsrep_cluster_state_uuid; extern long long wsrep_cluster_conf_id; extern const char* wsrep_cluster_status; @@ -125,6 +124,7 @@ extern const char* wsrep_provider_version; extern const char* wsrep_provider_vendor; int wsrep_show_status(THD *thd, SHOW_VAR *var, char *buff); +int wsrep_show_ready(THD *thd, SHOW_VAR *var, char *buff); void wsrep_free_status(THD *thd); /* Filters out --wsrep-new-cluster oprtion from argv[] @@ -237,6 +237,7 @@ extern wsrep_seqno_t wsrep_locked_seqno; if (victim_thd) WSREP_LOG_CONFLICT_THD(victim_thd, "Victim thread"); \ } +extern my_bool wsrep_ready_get(); extern void wsrep_ready_wait(); enum wsrep_trx_status { diff --git a/sql/wsrep_priv.h b/sql/wsrep_priv.h index 93640fbcc03d..ce97ac651828 100644 --- a/sql/wsrep_priv.h +++ b/sql/wsrep_priv.h @@ -26,7 +26,7 @@ #include #include -void wsrep_ready_set (my_bool x); +my_bool wsrep_ready_set (my_bool x); ssize_t wsrep_sst_prepare (void** msg); wsrep_cb_status wsrep_sst_donate_cb (void* app_ctx, diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index 930d40e6ac9c..ddd96abf2865 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -1023,7 +1023,6 @@ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx, { /* This will be reset when sync callback is called. * Should we set wsrep_ready to FALSE here too? */ -// wsrep_notify_status(WSREP_MEMBER_DONOR); local_status.set(WSREP_MEMBER_DONOR); const char* method = (char*)msg; From 0b56927825bc7aba7a38855bfa89681b1552736a Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Wed, 14 Jun 2017 15:29:48 +0200 Subject: [PATCH 207/305] GCF-1058 MTR test galera.MW-86 fails on repeated runs The reason for the galera.MW-86 failure is not fully understood. A slightly modified test that fails more easily is planted in galera.MW-86-fail. It fails when run as: ./mtr --repeat=1000 galera.MW-86-fail with a result set difference: SELECT @@debug_sync; @@debug_sync -ON - signals: '' +ON - signals: 'signal.wsrep_apply_cb' meaning that it leaves a pending signal to be unexpectedly consumed by a subsequent iteration of the test (or another test that uses the same signal name). Split galera.MW-86 in two tests as that silences the problem - no leftover signals are left: ./mtr --no-reorder $(for i in {1..1000} ; do echo galera.MW-86-wait1 galera.MW-86-wait8 ; done) --- .../r/{MW-86.result => MW-86-fail.result} | 37 +--- mysql-test/suite/galera/r/MW-86-wait1.result | 39 ++++ mysql-test/suite/galera/r/MW-86-wait8.result | 41 ++++ .../suite/galera/t/MW-86-fail-master.opt | 1 + mysql-test/suite/galera/t/MW-86-fail.test | 202 ++++++++++++++++++ .../suite/galera/t/MW-86-wait1-master.opt | 1 + mysql-test/suite/galera/t/MW-86-wait1.test | 101 +++++++++ .../suite/galera/t/MW-86-wait8-master.opt | 1 + .../galera/t/{MW-86.test => MW-86-wait8.test} | 120 +++-------- 9 files changed, 423 insertions(+), 120 deletions(-) rename mysql-test/suite/galera/r/{MW-86.result => MW-86-fail.result} (61%) create mode 100644 mysql-test/suite/galera/r/MW-86-wait1.result create mode 100644 mysql-test/suite/galera/r/MW-86-wait8.result create mode 100644 mysql-test/suite/galera/t/MW-86-fail-master.opt create mode 100644 mysql-test/suite/galera/t/MW-86-fail.test create mode 100644 mysql-test/suite/galera/t/MW-86-wait1-master.opt create mode 100644 mysql-test/suite/galera/t/MW-86-wait1.test create mode 100644 mysql-test/suite/galera/t/MW-86-wait8-master.opt rename mysql-test/suite/galera/t/{MW-86.test => MW-86-wait8.test} (54%) diff --git a/mysql-test/suite/galera/r/MW-86.result b/mysql-test/suite/galera/r/MW-86-fail.result similarity index 61% rename from mysql-test/suite/galera/r/MW-86.result rename to mysql-test/suite/galera/r/MW-86-fail.result index b29175216a8f..80c9a8c4b8b8 100644 --- a/mysql-test/suite/galera/r/MW-86.result +++ b/mysql-test/suite/galera/r/MW-86-fail.result @@ -1,10 +1,13 @@ +SELECT @@debug_sync; +@@debug_sync +ON - signals: '' SET SESSION wsrep_sync_wait = 1; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -CREATE DATABASE db1; +CREATE TABLE bar (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO bar VALUES (1); SHOW BINARY LOGS; SHOW BINLOG EVENTS; SHOW COLUMNS FROM t1; -SHOW CREATE DATABASE db1; SHOW CREATE EVENT e1; SHOW CREATE FUNCTION f1; SHOW CREATE PROCEDURE p1; @@ -30,36 +33,14 @@ SHOW WARNINGS; SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; SET SESSION wsrep_sync_wait = 8; -DROP DATABASE db1; SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; SET SESSION wsrep_sync_wait = 8; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO q VALUES (1); SHOW BINARY LOGS; -SHOW BINLOG EVENTS; -SHOW COLUMNS FROM t1; -SHOW CREATE DATABASE db1; -SHOW CREATE EVENT e1; -SHOW CREATE FUNCTION f1; -SHOW CREATE PROCEDURE p1; -SHOW CREATE TABLE t1; -SHOW CREATE TRIGGER tr1; -SHOW CREATE VIEW v1; -SHOW DATABASES; -SHOW ENGINE InnoDB STATUS; -SHOW FUNCTION CODE f1; -SHOW FUNCTION STATUS; -SHOW GRANTS FOR 'root'@'localhost'; -SHOW INDEX FROM t1; -SHOW OPEN TABLES; -SHOW PROCEDURE CODE p1; -SHOW PROCEDURE STATUS; -SHOW PRIVILEGES; -SHOW STATUS LIKE 'wsrep_cluster_size'; -SHOW TABLE STATUS; -SHOW TABLES; -SHOW TRIGGERS; -SHOW GLOBAL VARIABLES LIKE 'foo_bar'; -SHOW WARNINGS; SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +SELECT @@debug_sync; +@@debug_sync +ON - signals: '' diff --git a/mysql-test/suite/galera/r/MW-86-wait1.result b/mysql-test/suite/galera/r/MW-86-wait1.result new file mode 100644 index 000000000000..bbd63b99c08c --- /dev/null +++ b/mysql-test/suite/galera/r/MW-86-wait1.result @@ -0,0 +1,39 @@ +SELECT @@debug_sync; +@@debug_sync +ON - signals: '' +SET SESSION wsrep_sync_wait = 1; +SET GLOBAL debug = "+d,sync.wsrep_apply_cb"; +CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t_wait1 VALUES (1); +SHOW BINARY LOGS; +SHOW BINLOG EVENTS; +SHOW COLUMNS FROM t1; +SHOW CREATE EVENT e1; +SHOW CREATE FUNCTION f1; +SHOW CREATE PROCEDURE p1; +SHOW CREATE TABLE t1; +SHOW CREATE TRIGGER tr1; +SHOW CREATE VIEW v1; +SHOW DATABASES; +SHOW ENGINE InnoDB STATUS; +SHOW FUNCTION CODE f1; +SHOW FUNCTION STATUS; +SHOW GRANTS FOR 'root'@'localhost'; +SHOW INDEX FROM t1; +SHOW OPEN TABLES; +SHOW PROCEDURE CODE p1; +SHOW PROCEDURE STATUS; +SHOW PRIVILEGES; +SHOW STATUS LIKE 'wsrep_cluster_size'; +SHOW TABLE STATUS; +SHOW TABLES; +SHOW TRIGGERS; +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; +SHOW WARNINGS; +SET GLOBAL debug = "-d,sync.wsrep_apply_cb"; +SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb"; +SET SESSION wsrep_sync_wait = default; +DROP TABLE t_wait1; +SELECT @@debug_sync; +@@debug_sync +ON - signals: '' diff --git a/mysql-test/suite/galera/r/MW-86-wait8.result b/mysql-test/suite/galera/r/MW-86-wait8.result new file mode 100644 index 000000000000..d8a1cbfa38b7 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-86-wait8.result @@ -0,0 +1,41 @@ +SELECT @@debug_sync; +@@debug_sync +ON - signals: '' +SET SESSION wsrep_sync_wait = 8; +SET GLOBAL debug = "+d,sync.wsrep_apply_cb"; +CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t_wait8 VALUES (1); +SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; +SHOW BINARY LOGS; +SHOW BINLOG EVENTS; +SHOW COLUMNS FROM t1; +SHOW CREATE DATABASE db1; +SHOW CREATE EVENT e1; +SHOW CREATE FUNCTION f1; +SHOW CREATE PROCEDURE p1; +SHOW CREATE TABLE t1; +SHOW CREATE TRIGGER tr1; +SHOW CREATE VIEW v1; +SHOW DATABASES; +SHOW ENGINE InnoDB STATUS; +SHOW FUNCTION CODE f1; +SHOW FUNCTION STATUS; +SHOW GRANTS FOR 'root'@'localhost'; +SHOW INDEX FROM t1; +SHOW OPEN TABLES; +SHOW PROCEDURE CODE p1; +SHOW PROCEDURE STATUS; +SHOW PRIVILEGES; +SHOW STATUS LIKE 'wsrep_cluster_size'; +SHOW TABLE STATUS; +SHOW TABLES; +SHOW TRIGGERS; +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; +SHOW WARNINGS; +SET GLOBAL debug = "-d,sync.wsrep_apply_cb"; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +SET SESSION wsrep_sync_wait = default; +DROP TABLE t_wait8; +SELECT @@debug_sync; +@@debug_sync +ON - signals: '' diff --git a/mysql-test/suite/galera/t/MW-86-fail-master.opt b/mysql-test/suite/galera/t/MW-86-fail-master.opt new file mode 100644 index 000000000000..8a755e98b005 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-fail-master.opt @@ -0,0 +1 @@ +--log-bin --log-slave-updates diff --git a/mysql-test/suite/galera/t/MW-86-fail.test b/mysql-test/suite/galera/t/MW-86-fail.test new file mode 100644 index 000000000000..6bf03a13e3ec --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-fail.test @@ -0,0 +1,202 @@ +--source include/galera_cluster.inc +--source include/have_binlog_format_row.inc + +# +# Test 1: SHOW commands no longer obey wsrep_sync_wait = 1 +# + +--connection node_2 +SELECT @@debug_sync; + +SET SESSION wsrep_sync_wait = 1; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +--disable_result_log + +--connection node_1 +CREATE TABLE bar (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO bar VALUES (1); + +--connection node_2 +SHOW BINARY LOGS; + +SHOW BINLOG EVENTS; + +--error ER_NO_SUCH_TABLE +SHOW COLUMNS FROM t1; + +--error ER_EVENT_DOES_NOT_EXIST +SHOW CREATE EVENT e1; + +--error ER_SP_DOES_NOT_EXIST +SHOW CREATE FUNCTION f1; + +--error ER_SP_DOES_NOT_EXIST +SHOW CREATE PROCEDURE p1; + +--error ER_NO_SUCH_TABLE +SHOW CREATE TABLE t1; + +--error ER_TRG_DOES_NOT_EXIST +SHOW CREATE TRIGGER tr1; + +--error ER_NO_SUCH_TABLE +SHOW CREATE VIEW v1; + +SHOW DATABASES; + +SHOW ENGINE InnoDB STATUS; + +--error ER_SP_DOES_NOT_EXIST +SHOW FUNCTION CODE f1; + +SHOW FUNCTION STATUS; + +SHOW GRANTS FOR 'root'@'localhost'; + +--error ER_NO_SUCH_TABLE +SHOW INDEX FROM t1; + +SHOW OPEN TABLES; + +--error ER_SP_DOES_NOT_EXIST +SHOW PROCEDURE CODE p1; + +SHOW PROCEDURE STATUS; + +SHOW PRIVILEGES; + +SHOW STATUS LIKE 'wsrep_cluster_size'; + +SHOW TABLE STATUS; + +SHOW TABLES; + +SHOW TRIGGERS; + +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; + +--error 0 +SHOW WARNINGS; + +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +#DROP TABLE bar; + +SET SESSION wsrep_sync_wait = 8; + + +# +# Test 2: SHOW commands now obey wsrep_sync_wait = 8 +# + +--connection node_2 +--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` +SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; +SET SESSION wsrep_sync_wait = 8; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; + +--connection node_1 +CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO q VALUES (1); + +--connection node_2 +--error ER_LOCK_WAIT_TIMEOUT +SHOW BINARY LOGS; + +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW BINLOG EVENTS; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW COLUMNS FROM t1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE DATABASE db1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE EVENT e1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE FUNCTION f1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE PROCEDURE p1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE TABLE t1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE TRIGGER tr1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE VIEW v1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW DATABASES; +# +#--error 0 +#SHOW ENGINE InnoDB STATUS; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW FUNCTION CODE f1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW FUNCTION STATUS; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW GRANTS FOR 'root'@'localhost'; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW INDEX FROM t1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW OPEN TABLES; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW PROCEDURE CODE p1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW PROCEDURE STATUS; +# +#--error 0 +#SHOW PRIVILEGES; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW STATUS LIKE 'wsrep_cluster_size'; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW TABLE STATUS; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW TABLES; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW TRIGGERS; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW GLOBAL VARIABLES LIKE 'foo_bar'; +# +#--error 0 +#SHOW WARNINGS; + +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +--disable_query_log +--eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig" + +SET SESSION wsrep_sync_wait = 15; +DROP TABLE bar, q; + +# Occasionally this fails with: +# SELECT @@debug_sync; +# @@debug_sync +# -ON - signals: '' +# +ON - signals: 'signal.wsrep_apply_cb' +# which means that we leave this signal for a subsequent test to consume and +# fail unexpectedly (because the thread that is supposed to wait for the signal +# to be emitted from that invocation of the test will proceed immediately, +# consuming this leftover signal). +--enable_query_log +--enable_result_log +SELECT @@debug_sync; diff --git a/mysql-test/suite/galera/t/MW-86-wait1-master.opt b/mysql-test/suite/galera/t/MW-86-wait1-master.opt new file mode 100644 index 000000000000..8a755e98b005 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-wait1-master.opt @@ -0,0 +1 @@ +--log-bin --log-slave-updates diff --git a/mysql-test/suite/galera/t/MW-86-wait1.test b/mysql-test/suite/galera/t/MW-86-wait1.test new file mode 100644 index 000000000000..e26d9ab9d32e --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-wait1.test @@ -0,0 +1,101 @@ +# +# SHOW commands no longer obey wsrep_sync_wait = 1 (WSREP_SYNC_WAIT_BEFORE_READ) +# (they do not wait for the background INSERT in the applier in node_2 to +# complete) +# +--source include/galera_cluster.inc +--source include/have_binlog_format_row.inc +--source include/have_debug_sync.inc + +--connection node_2 +# Make sure no signals have been leftover from previous tests to surprise us. +SELECT @@debug_sync; + +SET SESSION wsrep_sync_wait = 1; +SET GLOBAL debug = "+d,sync.wsrep_apply_cb"; + +--connection node_1 +CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB; +# This will complete in node_1 but will start a background apply in node_2 +# which will stop because of sync.wsrep_apply_cb we set above. +INSERT INTO t_wait1 VALUES (1); + +--connection node_2 + +--disable_result_log + +SHOW BINARY LOGS; + +SHOW BINLOG EVENTS; + +--error ER_NO_SUCH_TABLE +SHOW COLUMNS FROM t1; + +--error ER_EVENT_DOES_NOT_EXIST +SHOW CREATE EVENT e1; + +--error ER_SP_DOES_NOT_EXIST +SHOW CREATE FUNCTION f1; + +--error ER_SP_DOES_NOT_EXIST +SHOW CREATE PROCEDURE p1; + +--error ER_NO_SUCH_TABLE +SHOW CREATE TABLE t1; + +--error ER_TRG_DOES_NOT_EXIST +SHOW CREATE TRIGGER tr1; + +--error ER_NO_SUCH_TABLE +SHOW CREATE VIEW v1; + +SHOW DATABASES; + +SHOW ENGINE InnoDB STATUS; + +--error ER_SP_DOES_NOT_EXIST +SHOW FUNCTION CODE f1; + +SHOW FUNCTION STATUS; + +SHOW GRANTS FOR 'root'@'localhost'; + +--error ER_NO_SUCH_TABLE +SHOW INDEX FROM t1; + +SHOW OPEN TABLES; + +--error ER_SP_DOES_NOT_EXIST +SHOW PROCEDURE CODE p1; + +SHOW PROCEDURE STATUS; + +SHOW PRIVILEGES; + +SHOW STATUS LIKE 'wsrep_cluster_size'; + +SHOW TABLE STATUS; + +SHOW TABLES; + +SHOW TRIGGERS; + +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; + +--error 0 +SHOW WARNINGS; + +--enable_result_log + +# Unblock the background INSERT and remove the sync point. +SET GLOBAL debug = "-d,sync.wsrep_apply_cb"; +SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb"; + +SET SESSION wsrep_sync_wait = default; + +# This will wait for the background INSERT to complete before we quit +# from the test. +DROP TABLE t_wait1; + +# Make sure no pending signals are leftover to surprise subsequent tests. +SELECT @@debug_sync; diff --git a/mysql-test/suite/galera/t/MW-86-wait8-master.opt b/mysql-test/suite/galera/t/MW-86-wait8-master.opt new file mode 100644 index 000000000000..8a755e98b005 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-wait8-master.opt @@ -0,0 +1 @@ +--log-bin --log-slave-updates diff --git a/mysql-test/suite/galera/t/MW-86.test b/mysql-test/suite/galera/t/MW-86-wait8.test similarity index 54% rename from mysql-test/suite/galera/t/MW-86.test rename to mysql-test/suite/galera/t/MW-86-wait8.test index c6550ecdaaac..fc461c9caa3f 100644 --- a/mysql-test/suite/galera/t/MW-86.test +++ b/mysql-test/suite/galera/t/MW-86-wait8.test @@ -1,104 +1,30 @@ ---source include/galera_cluster.inc ---source include/have_binlog_format_row.inc - # -# Test 1: SHOW commands no longer obey wsrep_sync_wait = 1 +# SHOW commands now obey wsrep_sync_wait = 8 (WSREP_SYNC_WAIT_BEFORE_SHOW) # +--source include/galera_cluster.inc +--source include/have_binlog_format_row.inc +--source include/have_debug_sync.inc --connection node_2 -SET SESSION wsrep_sync_wait = 1; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; ---disable_result_log - ---connection node_1 -CREATE DATABASE db1; - ---connection node_2 -SHOW BINARY LOGS; - -SHOW BINLOG EVENTS; - ---error ER_NO_SUCH_TABLE -SHOW COLUMNS FROM t1; - ---error ER_BAD_DB_ERROR -SHOW CREATE DATABASE db1; - ---error ER_EVENT_DOES_NOT_EXIST -SHOW CREATE EVENT e1; - ---error ER_SP_DOES_NOT_EXIST -SHOW CREATE FUNCTION f1; - ---error ER_SP_DOES_NOT_EXIST -SHOW CREATE PROCEDURE p1; - ---error ER_NO_SUCH_TABLE -SHOW CREATE TABLE t1; - ---error ER_TRG_DOES_NOT_EXIST -SHOW CREATE TRIGGER tr1; - ---error ER_NO_SUCH_TABLE -SHOW CREATE VIEW v1; - -SHOW DATABASES; - -SHOW ENGINE InnoDB STATUS; - ---error ER_SP_DOES_NOT_EXIST -SHOW FUNCTION CODE f1; - -SHOW FUNCTION STATUS; - -SHOW GRANTS FOR 'root'@'localhost'; - ---error ER_NO_SUCH_TABLE -SHOW INDEX FROM t1; - -SHOW OPEN TABLES; - ---error ER_SP_DOES_NOT_EXIST -SHOW PROCEDURE CODE p1; - -SHOW PROCEDURE STATUS; - -SHOW PRIVILEGES; - -SHOW STATUS LIKE 'wsrep_cluster_size'; - -SHOW TABLE STATUS; - -SHOW TABLES; - -SHOW TRIGGERS; - -SHOW GLOBAL VARIABLES LIKE 'foo_bar'; - ---error 0 -SHOW WARNINGS; - -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +# Make sure no signals have been leftover from previous tests to surprise us. +SELECT @@debug_sync; SET SESSION wsrep_sync_wait = 8; -DROP DATABASE db1; +SET GLOBAL debug = "+d,sync.wsrep_apply_cb"; - -# -# Test 2: SHOW commands now obey wsrep_sync_wait = 8 -# +--connection node_1 +CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB; +# This will complete in node_1 but will start a background apply in node_2 +# which will stop because of sync.wsrep_apply_cb we set above. +INSERT INTO t_wait8 VALUES (1); --connection node_2 + --let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; -SET SESSION wsrep_sync_wait = 8; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; ---connection node_1 -CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB; +--disable_result_log ---connection node_2 --error ER_LOCK_WAIT_TIMEOUT SHOW BINARY LOGS; @@ -177,11 +103,21 @@ SHOW GLOBAL VARIABLES LIKE 'foo_bar'; --error 0 SHOW WARNINGS; -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +--enable_result_log --disable_query_log --eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig" +--enable_query_log + +# Unblock the background INSERT and remove the sync point. +SET GLOBAL debug = "-d,sync.wsrep_apply_cb"; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +SET SESSION wsrep_sync_wait = default; + +# This will wait for the background INSERT to complete before we quit +# from the test. +DROP TABLE t_wait8; -SET SESSION wsrep_sync_wait = 15; -DROP TABLE q; +# Make sure no pending signals are leftover to surprise subsequent tests. +SELECT @@debug_sync; From d921a77bb45c161e7797a3252c51bddf78ddd9b5 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Wed, 14 Jun 2017 15:31:31 +0200 Subject: [PATCH 208/305] GCF-1058 MTR test galera.MW-86 fails on repeated runs Remove a known-to-fail test that was added as an example and for future reference. --- mysql-test/suite/galera/r/MW-86-fail.result | 46 ---- .../suite/galera/t/MW-86-fail-master.opt | 1 - mysql-test/suite/galera/t/MW-86-fail.test | 202 ------------------ 3 files changed, 249 deletions(-) delete mode 100644 mysql-test/suite/galera/r/MW-86-fail.result delete mode 100644 mysql-test/suite/galera/t/MW-86-fail-master.opt delete mode 100644 mysql-test/suite/galera/t/MW-86-fail.test diff --git a/mysql-test/suite/galera/r/MW-86-fail.result b/mysql-test/suite/galera/r/MW-86-fail.result deleted file mode 100644 index 80c9a8c4b8b8..000000000000 --- a/mysql-test/suite/galera/r/MW-86-fail.result +++ /dev/null @@ -1,46 +0,0 @@ -SELECT @@debug_sync; -@@debug_sync -ON - signals: '' -SET SESSION wsrep_sync_wait = 1; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -CREATE TABLE bar (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO bar VALUES (1); -SHOW BINARY LOGS; -SHOW BINLOG EVENTS; -SHOW COLUMNS FROM t1; -SHOW CREATE EVENT e1; -SHOW CREATE FUNCTION f1; -SHOW CREATE PROCEDURE p1; -SHOW CREATE TABLE t1; -SHOW CREATE TRIGGER tr1; -SHOW CREATE VIEW v1; -SHOW DATABASES; -SHOW ENGINE InnoDB STATUS; -SHOW FUNCTION CODE f1; -SHOW FUNCTION STATUS; -SHOW GRANTS FOR 'root'@'localhost'; -SHOW INDEX FROM t1; -SHOW OPEN TABLES; -SHOW PROCEDURE CODE p1; -SHOW PROCEDURE STATUS; -SHOW PRIVILEGES; -SHOW STATUS LIKE 'wsrep_cluster_size'; -SHOW TABLE STATUS; -SHOW TABLES; -SHOW TRIGGERS; -SHOW GLOBAL VARIABLES LIKE 'foo_bar'; -SHOW WARNINGS; -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; -SET SESSION wsrep_sync_wait = 8; -SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; -SET SESSION wsrep_sync_wait = 8; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO q VALUES (1); -SHOW BINARY LOGS; -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; -SELECT @@debug_sync; -@@debug_sync -ON - signals: '' diff --git a/mysql-test/suite/galera/t/MW-86-fail-master.opt b/mysql-test/suite/galera/t/MW-86-fail-master.opt deleted file mode 100644 index 8a755e98b005..000000000000 --- a/mysql-test/suite/galera/t/MW-86-fail-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log-bin --log-slave-updates diff --git a/mysql-test/suite/galera/t/MW-86-fail.test b/mysql-test/suite/galera/t/MW-86-fail.test deleted file mode 100644 index 6bf03a13e3ec..000000000000 --- a/mysql-test/suite/galera/t/MW-86-fail.test +++ /dev/null @@ -1,202 +0,0 @@ ---source include/galera_cluster.inc ---source include/have_binlog_format_row.inc - -# -# Test 1: SHOW commands no longer obey wsrep_sync_wait = 1 -# - ---connection node_2 -SELECT @@debug_sync; - -SET SESSION wsrep_sync_wait = 1; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; ---disable_result_log - ---connection node_1 -CREATE TABLE bar (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO bar VALUES (1); - ---connection node_2 -SHOW BINARY LOGS; - -SHOW BINLOG EVENTS; - ---error ER_NO_SUCH_TABLE -SHOW COLUMNS FROM t1; - ---error ER_EVENT_DOES_NOT_EXIST -SHOW CREATE EVENT e1; - ---error ER_SP_DOES_NOT_EXIST -SHOW CREATE FUNCTION f1; - ---error ER_SP_DOES_NOT_EXIST -SHOW CREATE PROCEDURE p1; - ---error ER_NO_SUCH_TABLE -SHOW CREATE TABLE t1; - ---error ER_TRG_DOES_NOT_EXIST -SHOW CREATE TRIGGER tr1; - ---error ER_NO_SUCH_TABLE -SHOW CREATE VIEW v1; - -SHOW DATABASES; - -SHOW ENGINE InnoDB STATUS; - ---error ER_SP_DOES_NOT_EXIST -SHOW FUNCTION CODE f1; - -SHOW FUNCTION STATUS; - -SHOW GRANTS FOR 'root'@'localhost'; - ---error ER_NO_SUCH_TABLE -SHOW INDEX FROM t1; - -SHOW OPEN TABLES; - ---error ER_SP_DOES_NOT_EXIST -SHOW PROCEDURE CODE p1; - -SHOW PROCEDURE STATUS; - -SHOW PRIVILEGES; - -SHOW STATUS LIKE 'wsrep_cluster_size'; - -SHOW TABLE STATUS; - -SHOW TABLES; - -SHOW TRIGGERS; - -SHOW GLOBAL VARIABLES LIKE 'foo_bar'; - ---error 0 -SHOW WARNINGS; - -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; - -#DROP TABLE bar; - -SET SESSION wsrep_sync_wait = 8; - - -# -# Test 2: SHOW commands now obey wsrep_sync_wait = 8 -# - ---connection node_2 ---let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` -SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; -SET SESSION wsrep_sync_wait = 8; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; - ---connection node_1 -CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO q VALUES (1); - ---connection node_2 ---error ER_LOCK_WAIT_TIMEOUT -SHOW BINARY LOGS; - -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW BINLOG EVENTS; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW COLUMNS FROM t1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE DATABASE db1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE EVENT e1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE FUNCTION f1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE PROCEDURE p1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE TABLE t1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE TRIGGER tr1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE VIEW v1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW DATABASES; -# -#--error 0 -#SHOW ENGINE InnoDB STATUS; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW FUNCTION CODE f1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW FUNCTION STATUS; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW GRANTS FOR 'root'@'localhost'; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW INDEX FROM t1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW OPEN TABLES; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW PROCEDURE CODE p1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW PROCEDURE STATUS; -# -#--error 0 -#SHOW PRIVILEGES; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW STATUS LIKE 'wsrep_cluster_size'; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW TABLE STATUS; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW TABLES; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW TRIGGERS; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW GLOBAL VARIABLES LIKE 'foo_bar'; -# -#--error 0 -#SHOW WARNINGS; - -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; - ---disable_query_log ---eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig" - -SET SESSION wsrep_sync_wait = 15; -DROP TABLE bar, q; - -# Occasionally this fails with: -# SELECT @@debug_sync; -# @@debug_sync -# -ON - signals: '' -# +ON - signals: 'signal.wsrep_apply_cb' -# which means that we leave this signal for a subsequent test to consume and -# fail unexpectedly (because the thread that is supposed to wait for the signal -# to be emitted from that invocation of the test will proceed immediately, -# consuming this leftover signal). ---enable_query_log ---enable_result_log -SELECT @@debug_sync; From e4a0aeb51f95709005f1437ea158dbfd0df621a1 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Wed, 14 Jun 2017 15:29:48 +0200 Subject: [PATCH 209/305] GCF-1058 MTR test galera.MW-86 fails on repeated runs The reason for the galera.MW-86 failure is not fully understood. A slightly modified test that fails more easily is planted in galera.MW-86-fail. It fails when run as: ./mtr --repeat=1000 galera.MW-86-fail with a result set difference: SELECT @@debug_sync; @@debug_sync -ON - signals: '' +ON - signals: 'signal.wsrep_apply_cb' meaning that it leaves a pending signal to be unexpectedly consumed by a subsequent iteration of the test (or another test that uses the same signal name). Split galera.MW-86 in two tests as that silences the problem - no leftover signals are left: ./mtr --no-reorder $(for i in {1..1000} ; do echo galera.MW-86-wait1 galera.MW-86-wait8 ; done) (cherry picked from commit 306d82521373d714eb73f978da1fea739d4f73b4) --- .../r/{MW-86.result => MW-86-fail.result} | 38 +--- mysql-test/suite/galera/r/MW-86-wait1.result | 39 ++++ mysql-test/suite/galera/r/MW-86-wait8.result | 41 ++++ .../suite/galera/t/MW-86-fail-master.opt | 1 + mysql-test/suite/galera/t/MW-86-fail.test | 202 ++++++++++++++++++ .../suite/galera/t/MW-86-wait1-master.opt | 1 + mysql-test/suite/galera/t/MW-86-wait1.test | 101 +++++++++ .../suite/galera/t/MW-86-wait8-master.opt | 1 + .../galera/t/{MW-86.test => MW-86-wait8.test} | 120 +++-------- 9 files changed, 423 insertions(+), 121 deletions(-) rename mysql-test/suite/galera/r/{MW-86.result => MW-86-fail.result} (60%) create mode 100644 mysql-test/suite/galera/r/MW-86-wait1.result create mode 100644 mysql-test/suite/galera/r/MW-86-wait8.result create mode 100644 mysql-test/suite/galera/t/MW-86-fail-master.opt create mode 100644 mysql-test/suite/galera/t/MW-86-fail.test create mode 100644 mysql-test/suite/galera/t/MW-86-wait1-master.opt create mode 100644 mysql-test/suite/galera/t/MW-86-wait1.test create mode 100644 mysql-test/suite/galera/t/MW-86-wait8-master.opt rename mysql-test/suite/galera/t/{MW-86.test => MW-86-wait8.test} (55%) diff --git a/mysql-test/suite/galera/r/MW-86.result b/mysql-test/suite/galera/r/MW-86-fail.result similarity index 60% rename from mysql-test/suite/galera/r/MW-86.result rename to mysql-test/suite/galera/r/MW-86-fail.result index afa75f7df473..80c9a8c4b8b8 100644 --- a/mysql-test/suite/galera/r/MW-86.result +++ b/mysql-test/suite/galera/r/MW-86-fail.result @@ -1,10 +1,13 @@ +SELECT @@debug_sync; +@@debug_sync +ON - signals: '' SET SESSION wsrep_sync_wait = 1; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -CREATE DATABASE db1; +CREATE TABLE bar (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO bar VALUES (1); SHOW BINARY LOGS; SHOW BINLOG EVENTS; SHOW COLUMNS FROM t1; -SHOW CREATE DATABASE db1; SHOW CREATE EVENT e1; SHOW CREATE FUNCTION f1; SHOW CREATE PROCEDURE p1; @@ -30,37 +33,14 @@ SHOW WARNINGS; SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; SET SESSION wsrep_sync_wait = 8; -DROP DATABASE db1; SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; SET SESSION wsrep_sync_wait = 8; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO q VALUES (1); SHOW BINARY LOGS; -SHOW BINLOG EVENTS; -SHOW COLUMNS FROM t1; -SHOW CREATE DATABASE db1; -SHOW CREATE EVENT e1; -SHOW CREATE FUNCTION f1; -SHOW CREATE PROCEDURE p1; -SHOW CREATE TABLE t1; -SHOW CREATE TRIGGER tr1; -SHOW CREATE VIEW v1; -SHOW DATABASES; -SHOW ENGINE InnoDB STATUS; -SHOW FUNCTION CODE f1; -SHOW FUNCTION STATUS; -SHOW GRANTS FOR 'root'@'localhost'; -SHOW INDEX FROM t1; -SHOW OPEN TABLES; -SHOW PROCEDURE CODE p1; -SHOW PROCEDURE STATUS; -SHOW PRIVILEGES; -SHOW STATUS LIKE 'wsrep_cluster_size'; -SHOW TABLE STATUS; -SHOW TABLES; -SHOW TRIGGERS; -SHOW GLOBAL VARIABLES LIKE 'foo_bar'; -SHOW CREATE USER 'root'; -SHOW WARNINGS; SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +SELECT @@debug_sync; +@@debug_sync +ON - signals: '' diff --git a/mysql-test/suite/galera/r/MW-86-wait1.result b/mysql-test/suite/galera/r/MW-86-wait1.result new file mode 100644 index 000000000000..bbd63b99c08c --- /dev/null +++ b/mysql-test/suite/galera/r/MW-86-wait1.result @@ -0,0 +1,39 @@ +SELECT @@debug_sync; +@@debug_sync +ON - signals: '' +SET SESSION wsrep_sync_wait = 1; +SET GLOBAL debug = "+d,sync.wsrep_apply_cb"; +CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t_wait1 VALUES (1); +SHOW BINARY LOGS; +SHOW BINLOG EVENTS; +SHOW COLUMNS FROM t1; +SHOW CREATE EVENT e1; +SHOW CREATE FUNCTION f1; +SHOW CREATE PROCEDURE p1; +SHOW CREATE TABLE t1; +SHOW CREATE TRIGGER tr1; +SHOW CREATE VIEW v1; +SHOW DATABASES; +SHOW ENGINE InnoDB STATUS; +SHOW FUNCTION CODE f1; +SHOW FUNCTION STATUS; +SHOW GRANTS FOR 'root'@'localhost'; +SHOW INDEX FROM t1; +SHOW OPEN TABLES; +SHOW PROCEDURE CODE p1; +SHOW PROCEDURE STATUS; +SHOW PRIVILEGES; +SHOW STATUS LIKE 'wsrep_cluster_size'; +SHOW TABLE STATUS; +SHOW TABLES; +SHOW TRIGGERS; +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; +SHOW WARNINGS; +SET GLOBAL debug = "-d,sync.wsrep_apply_cb"; +SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb"; +SET SESSION wsrep_sync_wait = default; +DROP TABLE t_wait1; +SELECT @@debug_sync; +@@debug_sync +ON - signals: '' diff --git a/mysql-test/suite/galera/r/MW-86-wait8.result b/mysql-test/suite/galera/r/MW-86-wait8.result new file mode 100644 index 000000000000..d8a1cbfa38b7 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-86-wait8.result @@ -0,0 +1,41 @@ +SELECT @@debug_sync; +@@debug_sync +ON - signals: '' +SET SESSION wsrep_sync_wait = 8; +SET GLOBAL debug = "+d,sync.wsrep_apply_cb"; +CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t_wait8 VALUES (1); +SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; +SHOW BINARY LOGS; +SHOW BINLOG EVENTS; +SHOW COLUMNS FROM t1; +SHOW CREATE DATABASE db1; +SHOW CREATE EVENT e1; +SHOW CREATE FUNCTION f1; +SHOW CREATE PROCEDURE p1; +SHOW CREATE TABLE t1; +SHOW CREATE TRIGGER tr1; +SHOW CREATE VIEW v1; +SHOW DATABASES; +SHOW ENGINE InnoDB STATUS; +SHOW FUNCTION CODE f1; +SHOW FUNCTION STATUS; +SHOW GRANTS FOR 'root'@'localhost'; +SHOW INDEX FROM t1; +SHOW OPEN TABLES; +SHOW PROCEDURE CODE p1; +SHOW PROCEDURE STATUS; +SHOW PRIVILEGES; +SHOW STATUS LIKE 'wsrep_cluster_size'; +SHOW TABLE STATUS; +SHOW TABLES; +SHOW TRIGGERS; +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; +SHOW WARNINGS; +SET GLOBAL debug = "-d,sync.wsrep_apply_cb"; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +SET SESSION wsrep_sync_wait = default; +DROP TABLE t_wait8; +SELECT @@debug_sync; +@@debug_sync +ON - signals: '' diff --git a/mysql-test/suite/galera/t/MW-86-fail-master.opt b/mysql-test/suite/galera/t/MW-86-fail-master.opt new file mode 100644 index 000000000000..8a755e98b005 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-fail-master.opt @@ -0,0 +1 @@ +--log-bin --log-slave-updates diff --git a/mysql-test/suite/galera/t/MW-86-fail.test b/mysql-test/suite/galera/t/MW-86-fail.test new file mode 100644 index 000000000000..6bf03a13e3ec --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-fail.test @@ -0,0 +1,202 @@ +--source include/galera_cluster.inc +--source include/have_binlog_format_row.inc + +# +# Test 1: SHOW commands no longer obey wsrep_sync_wait = 1 +# + +--connection node_2 +SELECT @@debug_sync; + +SET SESSION wsrep_sync_wait = 1; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +--disable_result_log + +--connection node_1 +CREATE TABLE bar (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO bar VALUES (1); + +--connection node_2 +SHOW BINARY LOGS; + +SHOW BINLOG EVENTS; + +--error ER_NO_SUCH_TABLE +SHOW COLUMNS FROM t1; + +--error ER_EVENT_DOES_NOT_EXIST +SHOW CREATE EVENT e1; + +--error ER_SP_DOES_NOT_EXIST +SHOW CREATE FUNCTION f1; + +--error ER_SP_DOES_NOT_EXIST +SHOW CREATE PROCEDURE p1; + +--error ER_NO_SUCH_TABLE +SHOW CREATE TABLE t1; + +--error ER_TRG_DOES_NOT_EXIST +SHOW CREATE TRIGGER tr1; + +--error ER_NO_SUCH_TABLE +SHOW CREATE VIEW v1; + +SHOW DATABASES; + +SHOW ENGINE InnoDB STATUS; + +--error ER_SP_DOES_NOT_EXIST +SHOW FUNCTION CODE f1; + +SHOW FUNCTION STATUS; + +SHOW GRANTS FOR 'root'@'localhost'; + +--error ER_NO_SUCH_TABLE +SHOW INDEX FROM t1; + +SHOW OPEN TABLES; + +--error ER_SP_DOES_NOT_EXIST +SHOW PROCEDURE CODE p1; + +SHOW PROCEDURE STATUS; + +SHOW PRIVILEGES; + +SHOW STATUS LIKE 'wsrep_cluster_size'; + +SHOW TABLE STATUS; + +SHOW TABLES; + +SHOW TRIGGERS; + +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; + +--error 0 +SHOW WARNINGS; + +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +#DROP TABLE bar; + +SET SESSION wsrep_sync_wait = 8; + + +# +# Test 2: SHOW commands now obey wsrep_sync_wait = 8 +# + +--connection node_2 +--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` +SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; +SET SESSION wsrep_sync_wait = 8; +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; + +--connection node_1 +CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO q VALUES (1); + +--connection node_2 +--error ER_LOCK_WAIT_TIMEOUT +SHOW BINARY LOGS; + +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW BINLOG EVENTS; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW COLUMNS FROM t1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE DATABASE db1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE EVENT e1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE FUNCTION f1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE PROCEDURE p1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE TABLE t1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE TRIGGER tr1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW CREATE VIEW v1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW DATABASES; +# +#--error 0 +#SHOW ENGINE InnoDB STATUS; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW FUNCTION CODE f1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW FUNCTION STATUS; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW GRANTS FOR 'root'@'localhost'; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW INDEX FROM t1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW OPEN TABLES; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW PROCEDURE CODE p1; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW PROCEDURE STATUS; +# +#--error 0 +#SHOW PRIVILEGES; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW STATUS LIKE 'wsrep_cluster_size'; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW TABLE STATUS; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW TABLES; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW TRIGGERS; +# +#--error ER_LOCK_WAIT_TIMEOUT +#SHOW GLOBAL VARIABLES LIKE 'foo_bar'; +# +#--error 0 +#SHOW WARNINGS; + +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +--disable_query_log +--eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig" + +SET SESSION wsrep_sync_wait = 15; +DROP TABLE bar, q; + +# Occasionally this fails with: +# SELECT @@debug_sync; +# @@debug_sync +# -ON - signals: '' +# +ON - signals: 'signal.wsrep_apply_cb' +# which means that we leave this signal for a subsequent test to consume and +# fail unexpectedly (because the thread that is supposed to wait for the signal +# to be emitted from that invocation of the test will proceed immediately, +# consuming this leftover signal). +--enable_query_log +--enable_result_log +SELECT @@debug_sync; diff --git a/mysql-test/suite/galera/t/MW-86-wait1-master.opt b/mysql-test/suite/galera/t/MW-86-wait1-master.opt new file mode 100644 index 000000000000..8a755e98b005 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-wait1-master.opt @@ -0,0 +1 @@ +--log-bin --log-slave-updates diff --git a/mysql-test/suite/galera/t/MW-86-wait1.test b/mysql-test/suite/galera/t/MW-86-wait1.test new file mode 100644 index 000000000000..e26d9ab9d32e --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-wait1.test @@ -0,0 +1,101 @@ +# +# SHOW commands no longer obey wsrep_sync_wait = 1 (WSREP_SYNC_WAIT_BEFORE_READ) +# (they do not wait for the background INSERT in the applier in node_2 to +# complete) +# +--source include/galera_cluster.inc +--source include/have_binlog_format_row.inc +--source include/have_debug_sync.inc + +--connection node_2 +# Make sure no signals have been leftover from previous tests to surprise us. +SELECT @@debug_sync; + +SET SESSION wsrep_sync_wait = 1; +SET GLOBAL debug = "+d,sync.wsrep_apply_cb"; + +--connection node_1 +CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB; +# This will complete in node_1 but will start a background apply in node_2 +# which will stop because of sync.wsrep_apply_cb we set above. +INSERT INTO t_wait1 VALUES (1); + +--connection node_2 + +--disable_result_log + +SHOW BINARY LOGS; + +SHOW BINLOG EVENTS; + +--error ER_NO_SUCH_TABLE +SHOW COLUMNS FROM t1; + +--error ER_EVENT_DOES_NOT_EXIST +SHOW CREATE EVENT e1; + +--error ER_SP_DOES_NOT_EXIST +SHOW CREATE FUNCTION f1; + +--error ER_SP_DOES_NOT_EXIST +SHOW CREATE PROCEDURE p1; + +--error ER_NO_SUCH_TABLE +SHOW CREATE TABLE t1; + +--error ER_TRG_DOES_NOT_EXIST +SHOW CREATE TRIGGER tr1; + +--error ER_NO_SUCH_TABLE +SHOW CREATE VIEW v1; + +SHOW DATABASES; + +SHOW ENGINE InnoDB STATUS; + +--error ER_SP_DOES_NOT_EXIST +SHOW FUNCTION CODE f1; + +SHOW FUNCTION STATUS; + +SHOW GRANTS FOR 'root'@'localhost'; + +--error ER_NO_SUCH_TABLE +SHOW INDEX FROM t1; + +SHOW OPEN TABLES; + +--error ER_SP_DOES_NOT_EXIST +SHOW PROCEDURE CODE p1; + +SHOW PROCEDURE STATUS; + +SHOW PRIVILEGES; + +SHOW STATUS LIKE 'wsrep_cluster_size'; + +SHOW TABLE STATUS; + +SHOW TABLES; + +SHOW TRIGGERS; + +SHOW GLOBAL VARIABLES LIKE 'foo_bar'; + +--error 0 +SHOW WARNINGS; + +--enable_result_log + +# Unblock the background INSERT and remove the sync point. +SET GLOBAL debug = "-d,sync.wsrep_apply_cb"; +SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb"; + +SET SESSION wsrep_sync_wait = default; + +# This will wait for the background INSERT to complete before we quit +# from the test. +DROP TABLE t_wait1; + +# Make sure no pending signals are leftover to surprise subsequent tests. +SELECT @@debug_sync; diff --git a/mysql-test/suite/galera/t/MW-86-wait8-master.opt b/mysql-test/suite/galera/t/MW-86-wait8-master.opt new file mode 100644 index 000000000000..8a755e98b005 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-86-wait8-master.opt @@ -0,0 +1 @@ +--log-bin --log-slave-updates diff --git a/mysql-test/suite/galera/t/MW-86.test b/mysql-test/suite/galera/t/MW-86-wait8.test similarity index 55% rename from mysql-test/suite/galera/t/MW-86.test rename to mysql-test/suite/galera/t/MW-86-wait8.test index 8e215d300c7f..82d7519f5cec 100644 --- a/mysql-test/suite/galera/t/MW-86.test +++ b/mysql-test/suite/galera/t/MW-86-wait8.test @@ -1,104 +1,30 @@ ---source include/galera_cluster.inc ---source include/have_binlog_format_row.inc - # -# Test 1: SHOW commands no longer obey wsrep_sync_wait = 1 +# SHOW commands now obey wsrep_sync_wait = 8 (WSREP_SYNC_WAIT_BEFORE_SHOW) # +--source include/galera_cluster.inc +--source include/have_binlog_format_row.inc +--source include/have_debug_sync.inc --connection node_2 -SET SESSION wsrep_sync_wait = 1; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; ---disable_result_log - ---connection node_1 -CREATE DATABASE db1; - ---connection node_2 -SHOW BINARY LOGS; - -SHOW BINLOG EVENTS; - ---error ER_NO_SUCH_TABLE -SHOW COLUMNS FROM t1; - ---error ER_BAD_DB_ERROR -SHOW CREATE DATABASE db1; - ---error ER_EVENT_DOES_NOT_EXIST -SHOW CREATE EVENT e1; - ---error ER_SP_DOES_NOT_EXIST -SHOW CREATE FUNCTION f1; - ---error ER_SP_DOES_NOT_EXIST -SHOW CREATE PROCEDURE p1; - ---error ER_NO_SUCH_TABLE -SHOW CREATE TABLE t1; - ---error ER_TRG_DOES_NOT_EXIST -SHOW CREATE TRIGGER tr1; - ---error ER_NO_SUCH_TABLE -SHOW CREATE VIEW v1; - -SHOW DATABASES; - -SHOW ENGINE InnoDB STATUS; - ---error ER_SP_DOES_NOT_EXIST -SHOW FUNCTION CODE f1; - -SHOW FUNCTION STATUS; - -SHOW GRANTS FOR 'root'@'localhost'; - ---error ER_NO_SUCH_TABLE -SHOW INDEX FROM t1; - -SHOW OPEN TABLES; - ---error ER_SP_DOES_NOT_EXIST -SHOW PROCEDURE CODE p1; - -SHOW PROCEDURE STATUS; - -SHOW PRIVILEGES; - -SHOW STATUS LIKE 'wsrep_cluster_size'; - -SHOW TABLE STATUS; - -SHOW TABLES; - -SHOW TRIGGERS; - -SHOW GLOBAL VARIABLES LIKE 'foo_bar'; - ---error 0 -SHOW WARNINGS; - -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +# Make sure no signals have been leftover from previous tests to surprise us. +SELECT @@debug_sync; SET SESSION wsrep_sync_wait = 8; -DROP DATABASE db1; +SET GLOBAL debug = "+d,sync.wsrep_apply_cb"; - -# -# Test 2: SHOW commands now obey wsrep_sync_wait = 8 -# +--connection node_1 +CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB; +# This will complete in node_1 but will start a background apply in node_2 +# which will stop because of sync.wsrep_apply_cb we set above. +INSERT INTO t_wait8 VALUES (1); --connection node_2 + --let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; -SET SESSION wsrep_sync_wait = 8; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; ---connection node_1 -CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB; +--disable_result_log ---connection node_2 --error ER_LOCK_WAIT_TIMEOUT SHOW BINARY LOGS; @@ -180,11 +106,21 @@ SHOW CREATE USER 'root'; --error 0 SHOW WARNINGS; -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +--enable_result_log --disable_query_log --eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig" +--enable_query_log + +# Unblock the background INSERT and remove the sync point. +SET GLOBAL debug = "-d,sync.wsrep_apply_cb"; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +SET SESSION wsrep_sync_wait = default; + +# This will wait for the background INSERT to complete before we quit +# from the test. +DROP TABLE t_wait8; -SET SESSION wsrep_sync_wait = 15; -DROP TABLE q; +# Make sure no pending signals are leftover to surprise subsequent tests. +SELECT @@debug_sync; From da39ed8398d9650ae7fb4020fe23765bd29416ca Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Wed, 14 Jun 2017 15:31:31 +0200 Subject: [PATCH 210/305] GCF-1058 MTR test galera.MW-86 fails on repeated runs Remove a known-to-fail test that was added as an example and for future reference. (cherry picked from commit d9a4fda9129b200ba8d2333cc3915867806255b8) --- mysql-test/suite/galera/r/MW-86-fail.result | 46 ---- .../suite/galera/t/MW-86-fail-master.opt | 1 - mysql-test/suite/galera/t/MW-86-fail.test | 202 ------------------ 3 files changed, 249 deletions(-) delete mode 100644 mysql-test/suite/galera/r/MW-86-fail.result delete mode 100644 mysql-test/suite/galera/t/MW-86-fail-master.opt delete mode 100644 mysql-test/suite/galera/t/MW-86-fail.test diff --git a/mysql-test/suite/galera/r/MW-86-fail.result b/mysql-test/suite/galera/r/MW-86-fail.result deleted file mode 100644 index 80c9a8c4b8b8..000000000000 --- a/mysql-test/suite/galera/r/MW-86-fail.result +++ /dev/null @@ -1,46 +0,0 @@ -SELECT @@debug_sync; -@@debug_sync -ON - signals: '' -SET SESSION wsrep_sync_wait = 1; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -CREATE TABLE bar (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO bar VALUES (1); -SHOW BINARY LOGS; -SHOW BINLOG EVENTS; -SHOW COLUMNS FROM t1; -SHOW CREATE EVENT e1; -SHOW CREATE FUNCTION f1; -SHOW CREATE PROCEDURE p1; -SHOW CREATE TABLE t1; -SHOW CREATE TRIGGER tr1; -SHOW CREATE VIEW v1; -SHOW DATABASES; -SHOW ENGINE InnoDB STATUS; -SHOW FUNCTION CODE f1; -SHOW FUNCTION STATUS; -SHOW GRANTS FOR 'root'@'localhost'; -SHOW INDEX FROM t1; -SHOW OPEN TABLES; -SHOW PROCEDURE CODE p1; -SHOW PROCEDURE STATUS; -SHOW PRIVILEGES; -SHOW STATUS LIKE 'wsrep_cluster_size'; -SHOW TABLE STATUS; -SHOW TABLES; -SHOW TRIGGERS; -SHOW GLOBAL VARIABLES LIKE 'foo_bar'; -SHOW WARNINGS; -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; -SET SESSION wsrep_sync_wait = 8; -SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; -SET SESSION wsrep_sync_wait = 8; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO q VALUES (1); -SHOW BINARY LOGS; -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; -SELECT @@debug_sync; -@@debug_sync -ON - signals: '' diff --git a/mysql-test/suite/galera/t/MW-86-fail-master.opt b/mysql-test/suite/galera/t/MW-86-fail-master.opt deleted file mode 100644 index 8a755e98b005..000000000000 --- a/mysql-test/suite/galera/t/MW-86-fail-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log-bin --log-slave-updates diff --git a/mysql-test/suite/galera/t/MW-86-fail.test b/mysql-test/suite/galera/t/MW-86-fail.test deleted file mode 100644 index 6bf03a13e3ec..000000000000 --- a/mysql-test/suite/galera/t/MW-86-fail.test +++ /dev/null @@ -1,202 +0,0 @@ ---source include/galera_cluster.inc ---source include/have_binlog_format_row.inc - -# -# Test 1: SHOW commands no longer obey wsrep_sync_wait = 1 -# - ---connection node_2 -SELECT @@debug_sync; - -SET SESSION wsrep_sync_wait = 1; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; ---disable_result_log - ---connection node_1 -CREATE TABLE bar (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO bar VALUES (1); - ---connection node_2 -SHOW BINARY LOGS; - -SHOW BINLOG EVENTS; - ---error ER_NO_SUCH_TABLE -SHOW COLUMNS FROM t1; - ---error ER_EVENT_DOES_NOT_EXIST -SHOW CREATE EVENT e1; - ---error ER_SP_DOES_NOT_EXIST -SHOW CREATE FUNCTION f1; - ---error ER_SP_DOES_NOT_EXIST -SHOW CREATE PROCEDURE p1; - ---error ER_NO_SUCH_TABLE -SHOW CREATE TABLE t1; - ---error ER_TRG_DOES_NOT_EXIST -SHOW CREATE TRIGGER tr1; - ---error ER_NO_SUCH_TABLE -SHOW CREATE VIEW v1; - -SHOW DATABASES; - -SHOW ENGINE InnoDB STATUS; - ---error ER_SP_DOES_NOT_EXIST -SHOW FUNCTION CODE f1; - -SHOW FUNCTION STATUS; - -SHOW GRANTS FOR 'root'@'localhost'; - ---error ER_NO_SUCH_TABLE -SHOW INDEX FROM t1; - -SHOW OPEN TABLES; - ---error ER_SP_DOES_NOT_EXIST -SHOW PROCEDURE CODE p1; - -SHOW PROCEDURE STATUS; - -SHOW PRIVILEGES; - -SHOW STATUS LIKE 'wsrep_cluster_size'; - -SHOW TABLE STATUS; - -SHOW TABLES; - -SHOW TRIGGERS; - -SHOW GLOBAL VARIABLES LIKE 'foo_bar'; - ---error 0 -SHOW WARNINGS; - -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; - -#DROP TABLE bar; - -SET SESSION wsrep_sync_wait = 8; - - -# -# Test 2: SHOW commands now obey wsrep_sync_wait = 8 -# - ---connection node_2 ---let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` -SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; -SET SESSION wsrep_sync_wait = 8; -SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; - ---connection node_1 -CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB; -INSERT INTO q VALUES (1); - ---connection node_2 ---error ER_LOCK_WAIT_TIMEOUT -SHOW BINARY LOGS; - -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW BINLOG EVENTS; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW COLUMNS FROM t1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE DATABASE db1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE EVENT e1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE FUNCTION f1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE PROCEDURE p1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE TABLE t1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE TRIGGER tr1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW CREATE VIEW v1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW DATABASES; -# -#--error 0 -#SHOW ENGINE InnoDB STATUS; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW FUNCTION CODE f1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW FUNCTION STATUS; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW GRANTS FOR 'root'@'localhost'; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW INDEX FROM t1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW OPEN TABLES; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW PROCEDURE CODE p1; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW PROCEDURE STATUS; -# -#--error 0 -#SHOW PRIVILEGES; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW STATUS LIKE 'wsrep_cluster_size'; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW TABLE STATUS; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW TABLES; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW TRIGGERS; -# -#--error ER_LOCK_WAIT_TIMEOUT -#SHOW GLOBAL VARIABLES LIKE 'foo_bar'; -# -#--error 0 -#SHOW WARNINGS; - -SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; - ---disable_query_log ---eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig" - -SET SESSION wsrep_sync_wait = 15; -DROP TABLE bar, q; - -# Occasionally this fails with: -# SELECT @@debug_sync; -# @@debug_sync -# -ON - signals: '' -# +ON - signals: 'signal.wsrep_apply_cb' -# which means that we leave this signal for a subsequent test to consume and -# fail unexpectedly (because the thread that is supposed to wait for the signal -# to be emitted from that invocation of the test will proceed immediately, -# consuming this leftover signal). ---enable_query_log ---enable_result_log -SELECT @@debug_sync; From d5b9696c3f8db1dfd8af82fc2fd266dfd5dcf903 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Thu, 22 Jun 2017 15:07:51 +0200 Subject: [PATCH 211/305] GCF-1058 MTR test galera.MW-86 fails on repeated runs Adjust MW-86-wait8.result. MySQL 5.6 does not have SHOW CREATE USER, so we only have that SHOW in the test for 5.7. --- mysql-test/suite/galera/r/MW-86-wait8.result | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/galera/r/MW-86-wait8.result b/mysql-test/suite/galera/r/MW-86-wait8.result index d8a1cbfa38b7..3e4f593413a1 100644 --- a/mysql-test/suite/galera/r/MW-86-wait8.result +++ b/mysql-test/suite/galera/r/MW-86-wait8.result @@ -31,6 +31,7 @@ SHOW TABLE STATUS; SHOW TABLES; SHOW TRIGGERS; SHOW GLOBAL VARIABLES LIKE 'foo_bar'; +SHOW CREATE USER 'root'; SHOW WARNINGS; SET GLOBAL debug = "-d,sync.wsrep_apply_cb"; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; From af65b45b134fa2ef0cf41f35d621dfea04a763a9 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sat, 1 Jul 2017 17:18:36 +0300 Subject: [PATCH 212/305] Fix debian stretch building for 5.7 for systemd --- packaging/deb-in/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 47671a3310c3..dbed5941dffa 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -164,13 +164,17 @@ ELSEIF(DEB_CODENAME STREQUAL "stretch") "install -m 0755 debian/extra/mysql-systemd-start debian/tmp/usr/share/mysql/") SET (DEB_RULES_INSTALL_APPARMOR "") SET (DEB_RULES_APPARMOR_LOAD "") + SET (DEB_SYSTEMD_SERVICE_NAME "mysql") SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --name=mysql") SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade") SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start") SET (DEB_INSTALL_SERVER_APPARMOR "") SET (DEB_SERVICE_SERVER_EXECPRE "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre") + SET (DEB_SERVICE_SERVER_EXECPOST + "ExecStartPost=/usr/share/mysql/mysql-systemd-start post") SET (DEB_INIT_APPARMOR "") + SET (DEB_STARTUP "SYSTEMD") ELSEIF(DEB_CODENAME STREQUAL "precise") SET (DEB_PLATFORMRELEASE "ubuntu12.04") SET (DEB_CONTROL_BDEPS "dh-apparmor") From 389d8f1273f71757531e7bc63d128c04163a0ab4 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sun, 2 Jul 2017 20:24:08 +0300 Subject: [PATCH 213/305] Fix debian stretch for 5.6 - set deb_startup variable properly --- packaging/deb-in/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index cfc8f4f8b0fd..8d97a9f30b9b 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -157,6 +157,7 @@ ELSEIF(DEB_CODENAME STREQUAL "stretch") SET (DEB_INSTALL_SERVER_APPARMOR "") SET (DEB_SERVICE_SERVER_EXECPRE "") SET (DEB_INIT_APPARMOR "") + SET (DEB_STARTUP "SYSV") ELSEIF(DEB_CODENAME STREQUAL "precise") SET (DEB_PLATFORMRELEASE "ubuntu12.04") SET (DEB_CONTROL_BDEPS "dh-apparmor") From a43524ccdf2869ce00730d222b10f37483e1c64e Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Wed, 5 Jul 2017 10:11:14 +0200 Subject: [PATCH 214/305] GCF-1058 MTR test galera.MW-86 fails on repeated runs Wait for the sync point sync.wsrep_apply_cb to be reached before executing the test and clearing the debug flag sync.wsrep_apply_cb. The race scenario: Intended behavior: node2: set sync.wsrep_apply_cb in order to start waiting in the background INSERT node1: INSERT start node2 (background): INSERT start node1: INSERT end node2: send signal to background INSERT: "stop waiting and continue executing" node2: clear sync.wsrep_apply_cb as no longer needed node2 (background): consume the signal node2 (background): INSERT end node2: DROP TABLE node2: check no pending signals are left - ok What happens occasionally (unexpected): node2: set sync.wsrep_apply_cb in order to start waiting in the background INSERT node1: INSERT start node2 (background): INSERT start node1: INSERT end // The background INSERT still has _not_ reached the place where it starts // waiting for the signal: // DBUG_EXECUTE_IF("sync.wsrep_apply_cb", "now wait_for..."); node2: send signal to background INSERT: "stop waiting and continue executing" node2: clear sync.wsrep_apply_cb as no longer needed // The background INSERT reaches DBUG_EXECUTE_IF("sync.wsrep_apply_cb", ...) // but sync.wsrep_apply_cb has already been cleared and the "wait" code is not // executed. The signal remains unconsumed. node2 (background): INSERT end node2: DROP TABLE node2: check no pending signals are left - failure, signal.wsrep_apply_cb is pending (not consumed) --- mysql-test/suite/galera/r/MW-86-wait1.result | 1 + mysql-test/suite/galera/r/MW-86-wait8.result | 1 + mysql-test/suite/galera/t/MW-86-wait1.test | 2 ++ mysql-test/suite/galera/t/MW-86-wait8.test | 2 ++ sql/wsrep_applier.cc | 3 ++- 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/galera/r/MW-86-wait1.result b/mysql-test/suite/galera/r/MW-86-wait1.result index bbd63b99c08c..ee9ae00e8c8c 100644 --- a/mysql-test/suite/galera/r/MW-86-wait1.result +++ b/mysql-test/suite/galera/r/MW-86-wait1.result @@ -5,6 +5,7 @@ SET SESSION wsrep_sync_wait = 1; SET GLOBAL debug = "+d,sync.wsrep_apply_cb"; CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t_wait1 VALUES (1); +SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached"; SHOW BINARY LOGS; SHOW BINLOG EVENTS; SHOW COLUMNS FROM t1; diff --git a/mysql-test/suite/galera/r/MW-86-wait8.result b/mysql-test/suite/galera/r/MW-86-wait8.result index d8a1cbfa38b7..093f462124b3 100644 --- a/mysql-test/suite/galera/r/MW-86-wait8.result +++ b/mysql-test/suite/galera/r/MW-86-wait8.result @@ -6,6 +6,7 @@ SET GLOBAL debug = "+d,sync.wsrep_apply_cb"; CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t_wait8 VALUES (1); SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; +SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached"; SHOW BINARY LOGS; SHOW BINLOG EVENTS; SHOW COLUMNS FROM t1; diff --git a/mysql-test/suite/galera/t/MW-86-wait1.test b/mysql-test/suite/galera/t/MW-86-wait1.test index e26d9ab9d32e..7443ad98bfb4 100644 --- a/mysql-test/suite/galera/t/MW-86-wait1.test +++ b/mysql-test/suite/galera/t/MW-86-wait1.test @@ -22,6 +22,8 @@ INSERT INTO t_wait1 VALUES (1); --connection node_2 +SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached"; + --disable_result_log SHOW BINARY LOGS; diff --git a/mysql-test/suite/galera/t/MW-86-wait8.test b/mysql-test/suite/galera/t/MW-86-wait8.test index fc461c9caa3f..9680d461e21b 100644 --- a/mysql-test/suite/galera/t/MW-86-wait8.test +++ b/mysql-test/suite/galera/t/MW-86-wait8.test @@ -23,6 +23,8 @@ INSERT INTO t_wait8 VALUES (1); --let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S"; +SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached"; + --disable_result_log --error ER_LOCK_WAIT_TIMEOUT diff --git a/sql/wsrep_applier.cc b/sql/wsrep_applier.cc index 9248b82cbcec..0161161367f2 100644 --- a/sql/wsrep_applier.cc +++ b/sql/wsrep_applier.cc @@ -207,7 +207,8 @@ wsrep_cb_status_t wsrep_apply_cb(void* const ctx, { const char act[]= "now " - "wait_for signal.wsrep_apply_cb"; + "SIGNAL sync.wsrep_apply_cb_reached " + "WAIT_FOR signal.wsrep_apply_cb"; DBUG_ASSERT(!debug_sync_set_action(thd, STRING_WITH_LEN(act))); };); From 574754ebe06aefea22d1dc6ef7c3d9bf786b114f Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Tue, 11 Jul 2017 12:55:03 +0200 Subject: [PATCH 215/305] MW-388 Fix conflict handling of SPs with DECLARE ... HANDLER It is possible for a stored procedure that has an error handler that catches SQLEXCEPTION to call thd->clear_error() on a thd that failed certification. And because the error is cleared, wsrep patch proceeds with the normal path and may try to commit statements that should actually abort. This patch catches the situation where wsrep_conflict_state is still set, but the thd's error has been cleared, and rolls back the statement in such cases. --- mysql-test/suite/galera/r/MW-388.result | 33 +++++++++++++++ mysql-test/suite/galera/t/MW-388.test | 54 +++++++++++++++++++++++++ sql/sql_parse.cc | 20 +++++++++ 3 files changed, 107 insertions(+) create mode 100644 mysql-test/suite/galera/r/MW-388.result create mode 100644 mysql-test/suite/galera/t/MW-388.test diff --git a/mysql-test/suite/galera/r/MW-388.result b/mysql-test/suite/galera/r/MW-388.result new file mode 100644 index 000000000000..f81f1e1a9fb2 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-388.result @@ -0,0 +1,33 @@ +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB; +CREATE PROCEDURE insert_proc () +BEGIN +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION +BEGIN +GET DIAGNOSTICS CONDITION 1 @errno = MYSQL_ERRNO; +END; +INSERT INTO t1 VALUES (1, 'node 1'),(2, 'node 1'); +INSERT INTO t1 VALUES (3, 'node 1'); +END| +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; +INSERT INTO t1 VALUES (1, 'node 2');; +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; +SET SESSION wsrep_sync_wait = 0; +SET SESSION DEBUG_SYNC = 'wsrep_before_replication SIGNAL wsrep_before_replication_reached WAIT_FOR wsrep_before_replication_continue'; +CALL insert_proc ();; +SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_before_replication_reached"; +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL wsrep_before_replication_continue"; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; +SELECT @errno; +@errno +1213 +SELECT * FROM t1; +f1 f2 +1 node 2 +3 node 1 +SELECT * FROM t1; +f1 f2 +1 node 2 +3 node 1 +DROP TABLE t1; +DROP PROCEDURE insert_proc; diff --git a/mysql-test/suite/galera/t/MW-388.test b/mysql-test/suite/galera/t/MW-388.test new file mode 100644 index 000000000000..59b28dba2369 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-388.test @@ -0,0 +1,54 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB; + +DELIMITER |; +CREATE PROCEDURE insert_proc () +BEGIN + DECLARE CONTINUE HANDLER FOR SQLEXCEPTION + BEGIN + GET DIAGNOSTICS CONDITION 1 @errno = MYSQL_ERRNO; + END; + INSERT INTO t1 VALUES (1, 'node 1'),(2, 'node 1'); + INSERT INTO t1 VALUES (3, 'node 1'); +END| +DELIMITER ;| + +SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; + +--connection node_2 +--send INSERT INTO t1 VALUES (1, 'node 2'); + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; + +--connection node_1 +SET SESSION wsrep_sync_wait = 0; +SET SESSION DEBUG_SYNC = 'wsrep_before_replication SIGNAL wsrep_before_replication_reached WAIT_FOR wsrep_before_replication_continue'; +--send CALL insert_proc (); + +--connection node_1a +SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_before_replication_reached"; + +--connection node_1a +SET GLOBAL DEBUG = ""; +SET DEBUG_SYNC = "now SIGNAL wsrep_before_replication_continue"; +SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; + +--connection node_2 +--reap + +--connection node_1 +# We expect no errors here, because the handler in insert_proc() caught the deadlock error +--reap +SELECT @errno; +SELECT * FROM t1; + +--connection node_2 +SELECT * FROM t1; + +DROP TABLE t1; +DROP PROCEDURE insert_proc; \ No newline at end of file diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 1b87f4cc2196..c8dabd93608c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -5600,6 +5600,26 @@ case SQLCOM_PREPARE: } if (thd->is_error() || (thd->variables.option_bits & OPTION_MASTER_SQL_ERROR)) trans_rollback_stmt(thd); +#ifdef WITH_WSREP + else if (thd->sp_runtime_ctx && + !thd->is_error() && + !thd->in_multi_stmt_transaction_mode() && + (thd->wsrep_conflict_state == MUST_ABORT || + thd->wsrep_conflict_state == CERT_FAILURE)) + { + /* + The error was cleared, but THD was aborted by wsrep and + wsrep_conflict_state is still set accordingly. This + situation is expected if we are running a stored procedure + that declares a handler that catches ER_LOCK_DEADLOCK error. + In which case the error may have been cleared in method + sp_rcontext::handle_sql_condition(). + */ + trans_rollback_stmt(thd); + thd->wsrep_conflict_state= NO_CONFLICT; + thd->killed= THD::NOT_KILLED; + } +#endif /* WITH_WSREP */ else { /* If commit fails, we should be able to reset the OK status. */ From 3694a1355e28c0e428edc70ac5db3f6c754f7b98 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 19 Jul 2017 12:12:40 +0300 Subject: [PATCH 216/305] MW-393 Resolved all packaging conflicts by taking "ours" version --- packaging/deb-in/control.in | 5 --- packaging/deb-in/extra/mysql-helpers | 11 ----- packaging/deb-in/extra/mysql-systemd-start | 4 -- ...sql-packagesource-server-SERIES.install.in | 43 ------------------- packaging/deb-in/rules.in | 10 ----- packaging/rpm-oel/mysql.spec.in | 5 --- packaging/rpm-sles/mysql.spec.in | 5 --- 7 files changed, 83 deletions(-) diff --git a/packaging/deb-in/control.in b/packaging/deb-in/control.in index d79516bd1260..5f367102b590 100644 --- a/packaging/deb-in/control.in +++ b/packaging/deb-in/control.in @@ -3,7 +3,6 @@ Maintainer: Codership Oy Section: database Priority: optional Standards-Version: 3.9.6 -<<<<<<< HEAD Homepage: http://galeracluster.com/ Build-Depends: bison, cmake, @@ -19,10 +18,6 @@ Build-Depends: bison, psmisc, zlib1g-dev (>= 1:1.1.3-5), @DEB_CONTROL_BDEPS@ -======= -Homepage: http://www.mysql.com/ -Build-Depends: debhelper (>= 9.0.0), libaio-dev[linux-any], libncurses5-dev (>= 5.0-6), perl, zlib1g-dev (>= 1:1.1.3-5), po-debconf, psmisc, bison, lsb-release, cmake, fakeroot, libnuma-dev, libmecab-dev, @DEB_CONTROL_BDEPS@ @DEB_CONTROL_BDEPS_EXTRA@ ->>>>>>> mysql-5.7.19 Package: mysql-server diff --git a/packaging/deb-in/extra/mysql-helpers b/packaging/deb-in/extra/mysql-helpers index b4d1f1b725cd..ab452415d0c9 100644 --- a/packaging/deb-in/extra/mysql-helpers +++ b/packaging/deb-in/extra/mysql-helpers @@ -103,11 +103,7 @@ clear_recover_pos () { run_init_sql() { tmpdir=$(mktemp -d) chown mysql:mysql "$tmpdir" -<<<<<<< HEAD /usr/sbin/mysqld --user=mysql --init-file="$1" --socket="$tmpdir/mysqld.sock" --pid-file="$tmpdir/mysqld.pid" > /dev/null 2>&1 -======= - mysqld --defaults-group-suffix="$2" --user=mysql --init-file="$1" --socket="$tmpdir/mysqld.sock" --pid-file="$tmpdir/mysqld.pid" > /dev/null 2>&1 ->>>>>>> mysql-5.7.19 result=$? rm -rf "$tmpdir" return $result @@ -185,11 +181,7 @@ verify_database() { MYSQLFILES=$(get_mysql_option ${INSTANCE} secure-file-priv "/var/lib/mysql-files") if [ ! -d "${MYSQLDATA}/mysql" ] && [ -d "${MYSQLFILES}" ]; then -<<<<<<< HEAD su - mysql -s /bin/bash -c "/usr/sbin/mysqld --initialize-insecure > /dev/null" -======= - su - mysql -s /bin/bash -c "/usr/sbin/mysqld --defaults-group-suffix="$1" --initialize-insecure > /dev/null" ->>>>>>> mysql-5.7.19 SQL=$(mktemp -u ${MYSQLFILES}/XXXXXXXXXX) install /dev/null -m0600 -omysql -gmysql "${SQL}" cat << EOF > ${SQL} @@ -200,11 +192,8 @@ SHUTDOWN; EOF run_init_sql "$SQL" "$1" rm -f "$SQL" -<<<<<<< HEAD else get_recover_pos -======= ->>>>>>> mysql-5.7.19 fi if [ -x /usr/bin/mysql_ssl_rsa_setup -a ! -e "${MYSQLDATA}/server-key.pem" ]; then diff --git a/packaging/deb-in/extra/mysql-systemd-start b/packaging/deb-in/extra/mysql-systemd-start index e8b0fa8ebb88..b3423c09b846 100644 --- a/packaging/deb-in/extra/mysql-systemd-start +++ b/packaging/deb-in/extra/mysql-systemd-start @@ -63,10 +63,6 @@ pinger () { } case $1 in -<<<<<<< HEAD "pre") sanity ;; "post") pinger ;; -======= - "pre") sanity $2 ;; ->>>>>>> mysql-5.7.19 esac diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in index 271a263680a3..d7d47ae37183 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -94,49 +94,6 @@ debian/extra/mysqld.cnf /etc/mysql/mysql.conf.d/ @DEB_FILES_STARTUP@ # SQL files usr/share/mysql/*.sql -<<<<<<< HEAD:packaging/deb-in/mysql-packagesource-server-SERIES.install.in -======= -# plugins -usr/lib/mysql/plugin/adt_null.so -usr/lib/mysql/plugin/auth_socket.so -usr/lib/mysql/plugin/authentication_ldap_sasl_client.so -usr/lib/mysql/plugin/group_replication.so -usr/lib/mysql/plugin/connection_control.so -usr/lib/mysql/plugin/innodb_engine.so -usr/lib/mysql/plugin/keyring_file.so -usr/lib/mysql/plugin/keyring_udf.so -usr/lib/mysql/plugin/libmemcached.so -usr/lib/mysql/plugin/libpluginmecab.so -usr/lib/mysql/plugin/locking_service.so -usr/lib/mysql/plugin/mypluglib.so -usr/lib/mysql/plugin/mysql_no_login.so -usr/lib/mysql/plugin/mysqlx.so -usr/lib/mysql/plugin/rewriter.so -usr/lib/mysql/plugin/semisync_master.so -usr/lib/mysql/plugin/semisync_slave.so -usr/lib/mysql/plugin/validate_password.so -usr/lib/mysql/plugin/version_token.so -usr/lib/mysql/plugin/debug/adt_null.so -usr/lib/mysql/plugin/debug/auth_socket.so -usr/lib/mysql/plugin/debug/authentication_ldap_sasl_client.so -usr/lib/mysql/plugin/debug/group_replication.so -usr/lib/mysql/plugin/debug/connection_control.so -usr/lib/mysql/plugin/debug/innodb_engine.so -usr/lib/mysql/plugin/debug/keyring_file.so -usr/lib/mysql/plugin/debug/keyring_udf.so -usr/lib/mysql/plugin/debug/libmemcached.so -usr/lib/mysql/plugin/debug/libpluginmecab.so -usr/lib/mysql/plugin/debug/locking_service.so -usr/lib/mysql/plugin/debug/mypluglib.so -usr/lib/mysql/plugin/debug/mysql_no_login.so -usr/lib/mysql/plugin/debug/mysqlx.so -usr/lib/mysql/plugin/debug/rewriter.so -usr/lib/mysql/plugin/debug/semisync_master.so -usr/lib/mysql/plugin/debug/semisync_slave.so -usr/lib/mysql/plugin/debug/validate_password.so -usr/lib/mysql/plugin/debug/version_token.so -@DEB_INSTALL_SERVER_PLUGINS@ ->>>>>>> mysql-5.7.19:packaging/deb-in/mysql-packagesource-server.install.in # support files usr/share/mysql/debian-start.inc.sh # usr/share/mysql/debian_create_root_user.sql diff --git a/packaging/deb-in/rules.in b/packaging/deb-in/rules.in index 024571728793..caf7f57f23f8 100644 --- a/packaging/deb-in/rules.in +++ b/packaging/deb-in/rules.in @@ -154,12 +154,7 @@ override_dh_installinit: @echo "RULES.$@" @DEB_RULES_APPARMOR_LOAD@ @DEB_RULES_SYSTEMD_ENABLE@ -<<<<<<< HEAD dh_installinit --no-start --name=mysql -- defaults 19 21 -======= - dh_installinit --name=mysql -- defaults 19 21 - dh_installinit --name=mysql@ -- disable ->>>>>>> mysql-5.7.19 @DEB_RULES_SYSTEMD_START@ touch $@ @@ -172,14 +167,9 @@ override_dh_install: -Xusr/share/mysql/@DEB_INSTALL_LICENSEFILE@ \ -Xusr/share/mysql/README \ -Xusr/share/mysql/docs/mysql.info \ -<<<<<<< HEAD -Xusr/share/mysql/docs/INSTALL-BINARY \ -Xusr/share/man/man1/mysqlman.1 ifneq (,@DEB_RULES_APPARMOR_LOAD@) # non-empty command = apparmor is handled dh_apparmor -pmysql-server@DEB_PRODUCTSERIES@ --profile-name=usr.sbin.mysqld endif -======= - -Xusr/share/man/man1/mysqlman.1 \ - -X.h.pp ->>>>>>> mysql-5.7.19 diff --git a/packaging/rpm-oel/mysql.spec.in b/packaging/rpm-oel/mysql.spec.in index 92d3c48ab255..ad4ddfe3af9d 100644 --- a/packaging/rpm-oel/mysql.spec.in +++ b/packaging/rpm-oel/mysql.spec.in @@ -1493,14 +1493,9 @@ fi %endif # cluster %changelog -<<<<<<< HEAD * Wed Nov 02 2016 Joerg Bruehe - 5.7.15 - Merge Oracle's changes of 5.7.11 .. 5.7.14 which brought new dependency definitions, restore date order of changelog entries. -======= -* Fri May 26 2017 Harin Vadodaria - 5.7.19-1 -- Add keyring_aws.so plugin to commercial server subpackage ->>>>>>> mysql-5.7.19 * Tue Sep 13 2016 Balasubramanian Kandasamy - 5.7.16-1 - Add connection_control.so to server subpackage diff --git a/packaging/rpm-sles/mysql.spec.in b/packaging/rpm-sles/mysql.spec.in index 156d255d0d88..698020d447e4 100644 --- a/packaging/rpm-sles/mysql.spec.in +++ b/packaging/rpm-sles/mysql.spec.in @@ -1269,14 +1269,9 @@ fi %endif # cluster %changelog -<<<<<<< HEAD * Wed Nov 02 2016 Joerg Bruehe - 5.7.15 - Merge Oracle's changes of 5.7.11 .. 5.7.14 which brought new dependency definitions, restore date order of changelog entries. -======= -* Fri May 26 2017 Harin Vadodaria - 5.7.19-1 -- Add keyring_aws.so plugin to commercial server subpackage ->>>>>>> mysql-5.7.19 * Tue Sep 13 2016 Balasubramanian Kandasamy - 5.7.16-1 - Add connection_control.so to server subpackage From 50d1cfe243ebc77fd57353a181caaa5244b865df Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 19 Jul 2017 12:23:19 +0300 Subject: [PATCH 217/305] MW-393 Resolved packaging conflicts by takin "ours" version --- packaging/deb-in/control.in | 16 ---------------- .../mysql-packagesource-server-SERIES.install.in | 5 ----- packaging/deb-in/rules.in | 13 ------------- 3 files changed, 34 deletions(-) diff --git a/packaging/deb-in/control.in b/packaging/deb-in/control.in index 2d3d41e14207..8dd58090fa76 100644 --- a/packaging/deb-in/control.in +++ b/packaging/deb-in/control.in @@ -56,14 +56,7 @@ Conflicts: mysql, mysql-server-5.5, mysql-server-core-5.5, mysql-server-5.6, mysql-server-core-5.6, mysql-@DEB_NOTPRODUCTNAME@-server, -<<<<<<< HEAD @DEB_CONTROL_SERVER_CONFLICT_NDB@, -======= - mariadb-client-5.5, mariadb-client-core-5.5, - mariadb-client-10.0, mariadb-client-core-10.0, - mariadb-client-10.1, mariadb-client-core-10.1, - mariadb-client-10.2, mariadb-client-core-10.2, ->>>>>>> mysql-5.6.37 mariadb-server-5.5, mariadb-server-core-5.5, mariadb-server-10.0, mariadb-server-core-10.0, mariadb-server-10.1, mariadb-server-core-10.1, @@ -110,15 +103,6 @@ Conflicts: mysql, mysql-client-5.1, mysql-client-core-5.1, mysql-client-5.5, mysql-client-core-5.5, mysql-client-5.6, mysql-client-core-5.6, -<<<<<<< HEAD -======= - mysql-client-5.7, mysql-client-core-5.7, - mysql-server-5.0, mysql-server-core-5.0, - mysql-server-5.1, mysql-server-core-5.1, - mysql-server-5.5, mysql-server-core-5.5, - mysql-server-5.6, mysql-server-core-5.6, - mysql-server-5.7, mysql-server-core-5.7, ->>>>>>> mysql-5.6.37 mysql-@DEB_NOTPRODUCTNAME@-client, @DEB_CONTROL_CLIENT_CONFLICT_NDB@, mariadb-client-5.5, mariadb-client-core-5.5, diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in index 8eb648863be8..75a63c82f3a9 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -70,13 +70,8 @@ usr/share/man/man1/myisamlog.1 usr/share/man/man1/myisampack.1 usr/share/man/man1/my_print_defaults.1 usr/share/man/man1/mysql-stress-test.pl.1 -<<<<<<< HEAD:packaging/deb-in/mysql-packagesource-server-SERIES.install.in usr/share/man/man1/mysql_install_db.1 usr/share/man/man1/mysql_plugin.1 -======= -usr/share/man/man1/mysql_convert_table_format.1 -usr/share/man/man1/mysql_install_db.1 ->>>>>>> mysql-5.6.37:packaging/deb-in/mysql-packagesource-server.install.in usr/share/man/man1/mysql_secure_installation.1 @DEB_MAN_SETPERMISSION@ usr/share/man/man1/mysql_tzinfo_to_sql.1 diff --git a/packaging/deb-in/rules.in b/packaging/deb-in/rules.in index f6c8b2a8985d..09dffea0bf97 100644 --- a/packaging/deb-in/rules.in +++ b/packaging/deb-in/rules.in @@ -167,7 +167,6 @@ override_dh_installinit: touch $@ override_dh_install: -<<<<<<< HEAD dh_install --list-missing \ -Xusr/bin/i_mysql_client_test \ -Xusr/share/mysql/mysql.server \ @@ -180,15 +179,3 @@ ifneq (,@DEB_RULES_APPARMOR_LOAD@) # non-empty command = apparmor is handled dh_apparmor -pmysql-server@DEB_PRODUCTSERIES@ --profile-name=usr.sbin.mysqld endif -======= - dh_install --fail-missing \ - -Xusr/bin/i_mysql_client_test \ - -Xusr/share/mysql/mysql.server \ - -Xusr/share/man/man1/mysql.server.1 \ - -Xusr/share/mysql/binary-configure \ - -Xusr/share/mysql/@DEB_INSTALL_LICENSEFILE@ \ - -Xusr/share/mysql/README \ - -Xusr/share/mysql/docs/mysql.info \ - -Xusr/share/man/man1/mysqlman.1 \ - -X.h.pp ->>>>>>> mysql-5.6.37 From eade014965c7ace4961d78d8d03bb40fa7ef9ea8 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Thu, 20 Jul 2017 15:26:21 +0300 Subject: [PATCH 218/305] MW-318 Packaging: Preserve --wsrep-recover log for future reference when starting server Preserve the temporary log file that contains the mysqld log from recovery. --- scripts/mysqld_safe.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index c6b4f8d598bc..9eabe5d6d804 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -254,7 +254,16 @@ wsrep_recover_position() { wsrep_start_position_opt="--wsrep_start_position=$start_pos" fi - rm $wr_logfile + if [ $ret -eq 0 ] ; then + local wr_logfile_permanent="$DATADIR/wsrep_recovery.ok" + else + local wr_logfile_permanent="$DATADIR/wsrep_recovery.fail" + fi + touch $wr_logfile_permanent + [ "$euid" = "0" ] && chown $user $wr_logfile_permanent + chmod 600 $wr_logfile_permanent + cat "$wr_logfile" >> $wr_logfile_permanent + rm -f "$wr_logfile" return $ret } From 9ab84e904b7109725b44cbde809a8b4cb8d68651 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 21 Jul 2017 09:09:20 +0300 Subject: [PATCH 219/305] MW-392 Fix according to pull request review --- packaging/deb-in/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 5721982be3bf..aa14eb424251 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -49,7 +49,7 @@ IF (DEB_PRODUCT STREQUAL "commercial") SET (DEB_NOTPRODUCTNAME "${DEB_BASE_PRODUCT}community") SET (DEB_LICENSENAME "Advanced") SET (DEB_INSTALL_LICENSEFILE "LICENSE.mysql") - SET (DEB_SERVERVERSION "${VERSION}+commercial-1") + SET (DEB_SERVERVERSION "${DEB_BASE_VERSION}+commercial.1") SET (DEB_PLUGIN_SETPERMISSION "") SET (DEB_MAN_SETPERMISSION "") # List of plugins that are only in commercial packages From 58e8fd5dbdda72843b631bbc242f75d72197764f Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 21 Jul 2017 10:56:25 +0200 Subject: [PATCH 220/305] MW-388 Remove unnecessary conditions --- sql/sql_parse.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index c8dabd93608c..097cd556062e 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -5602,8 +5602,6 @@ case SQLCOM_PREPARE: trans_rollback_stmt(thd); #ifdef WITH_WSREP else if (thd->sp_runtime_ctx && - !thd->is_error() && - !thd->in_multi_stmt_transaction_mode() && (thd->wsrep_conflict_state == MUST_ABORT || thd->wsrep_conflict_state == CERT_FAILURE)) { From 799bcedce44f2bbf7078e7c73a90de5a8be2c23a Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 25 Jul 2017 10:56:44 +0300 Subject: [PATCH 221/305] MW-394 * ported the partition.test from MariaDB 10.3 code tree * fix to TOI replicate ALTER TABLE EXCHANGE PARTITION statement --- mysql-test/suite/galera/r/partition.result | 157 ++++++++++++++++ mysql-test/suite/galera/t/partition.test | 207 +++++++++++++++++++++ sql/sql_partition_admin.cc | 6 + 3 files changed, 370 insertions(+) create mode 100644 mysql-test/suite/galera/r/partition.result create mode 100644 mysql-test/suite/galera/t/partition.test diff --git a/mysql-test/suite/galera/r/partition.result b/mysql-test/suite/galera/r/partition.result new file mode 100644 index 000000000000..824572065c18 --- /dev/null +++ b/mysql-test/suite/galera/r/partition.result @@ -0,0 +1,157 @@ +# +# MDEV#4953 Galera: DELETE from a partitioned table is not replicated +# +USE test; +CREATE TABLE t1 (pk INT PRIMARY KEY, i INT) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +INSERT INTO t1 VALUES (1,100), (2,200); +SELECT * FROM t1; +pk i +2 200 +1 100 +DELETE FROM t1; +SELECT * FROM t1; +pk i + +# On node_1 +connection node_1; +SELECT * FROM t1; +pk i + +# On node_2 +connection node_2; +SELECT * FROM t1; +pk i +DROP TABLE t1; +# +# MDEV#7501 : alter table exchange partition is not replicated in +# galera cluster +# + +# On node_1 +connection node_1; +CREATE TABLE test.t1 ( +i INT UNSIGNED NOT NULL AUTO_INCREMENT, +PRIMARY KEY (i) +) ENGINE=INNODB +PARTITION BY RANGE (i) +(PARTITION p1 VALUES LESS THAN (10) ENGINE = INNODB, +PARTITION p2 VALUES LESS THAN (20) ENGINE = INNODB, +PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = INNODB); +INSERT INTO test.t1 (i) VALUE (9),(19); +CREATE TABLE test.p1 LIKE test.t1; +ALTER TABLE test.p1 REMOVE PARTITIONING; +ALTER TABLE test.t1 EXCHANGE PARTITION p1 WITH TABLE test.p1; +SELECT * FROM test.t1; +i +19 +SELECT * FROM test.p1; +i +9 + +# On node_2 +connection node_2; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`i`) +) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 + PARTITION BY RANGE (i) +(PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB, + PARTITION p2 VALUES LESS THAN (20) ENGINE = InnoDB, + PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) +SHOW CREATE TABLE p1; +Table Create Table +p1 CREATE TABLE `p1` ( + `i` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`i`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 +SELECT * FROM test.t1; +i +19 +SELECT * FROM test.p1; +i +9 + +# On node_1 +connection node_1; +ALTER TABLE t1 TRUNCATE PARTITION p2; +SELECT * FROM test.t1; +i + +# On node_2 +connection node_2; +SELECT * FROM test.t1; +i + +# On node_1 +connection node_1; +ALTER TABLE t1 DROP PARTITION p2; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + PARTITION BY RANGE (i) +(PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB, + PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) + +# On node_2 +connection node_2; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + PARTITION BY RANGE (i) +(PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB, + PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) +DROP TABLE t1, p1; +# +# MDEV-5146: Bulk loads into partitioned table not working +# +connection node_1; +# Case 1: wsrep_load_data_splitting = ON & LOAD DATA with 20002 +# entries. +SET GLOBAL wsrep_load_data_splitting = ON; +CREATE TABLE t1 (pk INT PRIMARY KEY) +ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +connection node_2; +SELECT COUNT(*) = 20002 FROM t1; +COUNT(*) = 20002 +1 +wsrep_last_committed_diff +1 +DROP TABLE t1; +# Case 2: wsrep_load_data_splitting = ON & LOAD DATA with 101 entries. +connection node_1; +SET GLOBAL wsrep_load_data_splitting = ON; +CREATE TABLE t1 (pk INT PRIMARY KEY) +ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +connection node_2; +SELECT COUNT(*) = 101 FROM t1; +COUNT(*) = 101 +1 +wsrep_last_committed_diff +1 +DROP TABLE t1; +# Case 3: wsrep_load_data_splitting = OFF & LOAD DATA with 20002 +# entries. +connection node_1; +SET GLOBAL wsrep_load_data_splitting = OFF; +CREATE TABLE t1 (pk INT PRIMARY KEY) +ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +connection node_2; +SELECT COUNT(*) = 20002 FROM t1; +COUNT(*) = 20002 +1 +wsrep_last_committed_diff +1 +DROP TABLE t1; +connection node_1; +SET GLOBAL wsrep_load_data_splitting = 1;; +disconnect node_2; +disconnect node_1; +# End of test diff --git a/mysql-test/suite/galera/t/partition.test b/mysql-test/suite/galera/t/partition.test new file mode 100644 index 000000000000..bb5a02411c34 --- /dev/null +++ b/mysql-test/suite/galera/t/partition.test @@ -0,0 +1,207 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_partition.inc + +--echo # +--echo # MDEV#4953 Galera: DELETE from a partitioned table is not replicated +--echo # + +USE test; +CREATE TABLE t1 (pk INT PRIMARY KEY, i INT) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +INSERT INTO t1 VALUES (1,100), (2,200); +SELECT * FROM t1; + +DELETE FROM t1; +SELECT * FROM t1; + +--echo +--echo # On node_1 +--connection node_1 +SELECT * FROM t1; + +--echo +--echo # On node_2 +--connection node_2 +SELECT * FROM t1; + +# Cleanup +DROP TABLE t1; + + +--echo # +--echo # MDEV#7501 : alter table exchange partition is not replicated in +--echo # galera cluster +--echo # + +--echo +--echo # On node_1 +--connection node_1 + +CREATE TABLE test.t1 ( + i INT UNSIGNED NOT NULL AUTO_INCREMENT, + PRIMARY KEY (i) + ) ENGINE=INNODB + PARTITION BY RANGE (i) + (PARTITION p1 VALUES LESS THAN (10) ENGINE = INNODB, + PARTITION p2 VALUES LESS THAN (20) ENGINE = INNODB, + PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = INNODB); + +INSERT INTO test.t1 (i) VALUE (9),(19); +CREATE TABLE test.p1 LIKE test.t1; +ALTER TABLE test.p1 REMOVE PARTITIONING; + +ALTER TABLE test.t1 EXCHANGE PARTITION p1 WITH TABLE test.p1; +SELECT * FROM test.t1; +SELECT * FROM test.p1; + +--echo +--echo # On node_2 +--connection node_2 + +SHOW CREATE TABLE t1; +SHOW CREATE TABLE p1; + +SELECT * FROM test.t1; +SELECT * FROM test.p1; + +--echo +--echo # On node_1 +--connection node_1 +ALTER TABLE t1 TRUNCATE PARTITION p2; +SELECT * FROM test.t1; + +--echo +--echo # On node_2 +--connection node_2 +SELECT * FROM test.t1; + +--echo +--echo # On node_1 +--connection node_1 +ALTER TABLE t1 DROP PARTITION p2; +SHOW CREATE TABLE t1; + +--echo +--echo # On node_2 +--connection node_2 +SHOW CREATE TABLE t1; + + +# Cleanup +DROP TABLE t1, p1; + +--echo # +--echo # MDEV-5146: Bulk loads into partitioned table not working +--echo # + +# Create 2 files with 20002 & 101 entries in each. +--perl +open(FILE, ">", "$ENV{'MYSQLTEST_VARDIR'}/tmp/mdev-5146-1.dat") or die; +foreach my $i (1..20002) { + print FILE "$i\n"; +} + +open(FILE, ">", "$ENV{'MYSQLTEST_VARDIR'}/tmp/mdev-5146-2.dat") or die; +foreach my $i (1..101) { + print FILE "$i\n"; +} +EOF + +--connection node_1 + +--let $wsrep_load_data_splitting_orig = `SELECT @@wsrep_load_data_splitting` + +--echo # Case 1: wsrep_load_data_splitting = ON & LOAD DATA with 20002 +--echo # entries. + +SET GLOBAL wsrep_load_data_splitting = ON; + +CREATE TABLE t1 (pk INT PRIMARY KEY) + ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; + +# Record wsrep_last_committed as it was before LOAD DATA +--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--disable_query_log +--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/mdev-5146-1.dat' INTO TABLE t1; +--enable_query_log + +--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--connection node_2 +SELECT COUNT(*) = 20002 FROM t1; + +# LOAD-ing 20002 rows causes 3 commits to be registered +--disable_query_log +--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 3 AS wsrep_last_committed_diff; +--enable_query_log + +DROP TABLE t1; + +--echo # Case 2: wsrep_load_data_splitting = ON & LOAD DATA with 101 entries. + +--connection node_1 + +SET GLOBAL wsrep_load_data_splitting = ON; + +CREATE TABLE t1 (pk INT PRIMARY KEY) + ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; + +# Record wsrep_last_committed as it was before LOAD DATA +--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--disable_query_log +--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/mdev-5146-2.dat' INTO TABLE t1; +--enable_query_log + +--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--connection node_2 +SELECT COUNT(*) = 101 FROM t1; + +# LOAD-ing 101 rows causes 1 commit to be registered +--disable_query_log +--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff; +--enable_query_log + +DROP TABLE t1; + +--echo # Case 3: wsrep_load_data_splitting = OFF & LOAD DATA with 20002 +--echo # entries. + +--connection node_1 + +SET GLOBAL wsrep_load_data_splitting = OFF; + +CREATE TABLE t1 (pk INT PRIMARY KEY) + ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; + +# Record wsrep_last_committed as it was before LOAD DATA +--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--disable_query_log +--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/mdev-5146-1.dat' INTO TABLE t1; +--enable_query_log + +--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--connection node_2 +SELECT COUNT(*) = 20002 FROM t1; + +# LOAD-ing 20002 rows causes 1 commit to be registered +--disable_query_log +--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff; +--enable_query_log + +DROP TABLE t1; + +--connection node_1 +# Restore the original value +--eval SET GLOBAL wsrep_load_data_splitting = $wsrep_load_data_splitting_orig; + +# Cleanup +remove_file '$MYSQLTEST_VARDIR/tmp/mdev-5146-1.dat'; +remove_file '$MYSQLTEST_VARDIR/tmp/mdev-5146-2.dat'; + +--source include/galera_end.inc +--echo # End of test diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index c2624f4af211..2331224902ef 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -88,9 +88,15 @@ bool Sql_cmd_alter_table_exchange_partition::execute(THD *thd) /* Not allowed with EXCHANGE PARTITION */ DBUG_ASSERT(!create_info.data_file_name && !create_info.index_file_name); + WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table); thd->enable_slow_log= opt_log_slow_admin_statements; DBUG_RETURN(exchange_partition(thd, first_table, &alter_info)); +#ifdef WITH_WSREP + error: + /* handle errors in TO_ISOLATION here */ + DBUG_RETURN(true); +#endif /* WITH_WSREP */ } From 20341042008505204d36df2b79fa78787d74a34a Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 27 Jul 2017 11:39:31 +0300 Subject: [PATCH 222/305] MW-394 * changed thd_binlog_format to return configured binlog format in wsrep execution, regardless of binlogging setting (i.e. with or without binlogging) * thd_binlog_format is used in innobase::write_row(), and would return confusing result there when log_bin==OFF --- sql/sql_class.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index eeff21000486..909749a28f2c 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -4527,12 +4527,14 @@ extern "C" int thd_non_transactional_update(const MYSQL_THD thd) extern "C" int thd_binlog_format(const MYSQL_THD thd) { #ifdef WITH_WSREP - if (((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()) && - (thd->variables.option_bits & OPTION_BIN_LOG)) -#else - if (mysql_bin_log.is_open() && (thd->variables.option_bits & OPTION_BIN_LOG)) -#endif + if (WSREP(thd)) + { + /* for wsrep binlog format is meaningful also when binlogging is off */ return (int) WSREP_BINLOG_FORMAT(thd->variables.binlog_format); + } +#endif /* WITH_WSREP */ + if (mysql_bin_log.is_open() && (thd->variables.option_bits & OPTION_BIN_LOG)) + return (int) thd->variables.binlog_format; else return BINLOG_FORMAT_UNSPEC; } From f01ff968b159e00846aa65820d902bd3e98d98c0 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 27 Jul 2017 11:43:33 +0300 Subject: [PATCH 223/305] MW-394 * recorded new result file, original was copied from MariaDB which produces syntactically a bit different result * semantics are same in MariaDB and ours result file --- mysql-test/suite/galera/r/partition.result | 29 +++++----------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/mysql-test/suite/galera/r/partition.result b/mysql-test/suite/galera/r/partition.result index 824572065c18..3907b4f08c95 100644 --- a/mysql-test/suite/galera/r/partition.result +++ b/mysql-test/suite/galera/r/partition.result @@ -13,12 +13,10 @@ SELECT * FROM t1; pk i # On node_1 -connection node_1; SELECT * FROM t1; pk i # On node_2 -connection node_2; SELECT * FROM t1; pk i DROP TABLE t1; @@ -28,7 +26,6 @@ DROP TABLE t1; # # On node_1 -connection node_1; CREATE TABLE test.t1 ( i INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (i) @@ -49,17 +46,16 @@ i 9 # On node_2 -connection node_2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`i`) ) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 - PARTITION BY RANGE (i) +/*!50100 PARTITION BY RANGE (i) (PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION p2 VALUES LESS THAN (20) ENGINE = InnoDB, - PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) + PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ SHOW CREATE TABLE p1; Table Create Table p1 CREATE TABLE `p1` ( @@ -74,18 +70,15 @@ i 9 # On node_1 -connection node_1; ALTER TABLE t1 TRUNCATE PARTITION p2; SELECT * FROM test.t1; i # On node_2 -connection node_2; SELECT * FROM test.t1; i # On node_1 -connection node_1; ALTER TABLE t1 DROP PARTITION p2; SHOW CREATE TABLE t1; Table Create Table @@ -93,32 +86,29 @@ t1 CREATE TABLE `t1` ( `i` int(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`i`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 - PARTITION BY RANGE (i) +/*!50100 PARTITION BY RANGE (i) (PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB, - PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) + PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ # On node_2 -connection node_2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`i`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 - PARTITION BY RANGE (i) +/*!50100 PARTITION BY RANGE (i) (PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB, - PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) + PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ DROP TABLE t1, p1; # # MDEV-5146: Bulk loads into partitioned table not working # -connection node_1; # Case 1: wsrep_load_data_splitting = ON & LOAD DATA with 20002 # entries. SET GLOBAL wsrep_load_data_splitting = ON; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; -connection node_2; SELECT COUNT(*) = 20002 FROM t1; COUNT(*) = 20002 1 @@ -126,11 +116,9 @@ wsrep_last_committed_diff 1 DROP TABLE t1; # Case 2: wsrep_load_data_splitting = ON & LOAD DATA with 101 entries. -connection node_1; SET GLOBAL wsrep_load_data_splitting = ON; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; -connection node_2; SELECT COUNT(*) = 101 FROM t1; COUNT(*) = 101 1 @@ -139,19 +127,14 @@ wsrep_last_committed_diff DROP TABLE t1; # Case 3: wsrep_load_data_splitting = OFF & LOAD DATA with 20002 # entries. -connection node_1; SET GLOBAL wsrep_load_data_splitting = OFF; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; -connection node_2; SELECT COUNT(*) = 20002 FROM t1; COUNT(*) = 20002 1 wsrep_last_committed_diff 1 DROP TABLE t1; -connection node_1; SET GLOBAL wsrep_load_data_splitting = 1;; -disconnect node_2; -disconnect node_1; # End of test From b871ba205b74bbbb8856e507b2575c38bd414b1d Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 4 Aug 2017 11:22:35 +0300 Subject: [PATCH 224/305] MW-394 Merged fix for LOAD DATA splitting with log_bin==OFF, from mysql-wsrep-bugs/MW-394 --- sql/sql_class.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 5e0a9031038f..9b33a3358e07 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -3937,14 +3937,16 @@ extern "C" int thd_non_transactional_update(const MYSQL_THD thd) extern "C" int thd_binlog_format(const MYSQL_THD thd) { #ifdef WITH_WSREP - if (((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()) && - (thd->variables.option_bits & OPTION_BIN_LOG)) -#else + if (WSREP(thd)) + { + /* for wsrep binlog format is meaningful also when binlogging is off */ + return (int) WSREP_BINLOG_FORMAT(thd->variables.binlog_format); + } +#endif /* WITH_WSREP */ if (mysql_bin_log.is_open() && (thd->variables.option_bits & OPTION_BIN_LOG)) -#endif - return (int) WSREP_BINLOG_FORMAT(thd->variables.binlog_format); + return (int) thd->variables.binlog_format; else - return BINLOG_FORMAT_UNSPEC; + return BINLOG_FORMAT_UNSPEC; } extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all) From a23587255aa96b2e9442cfb3d09cc18e50b0770a Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 4 Aug 2017 13:13:23 +0300 Subject: [PATCH 225/305] MW-394 Merged fix for LOAD DATA splitting with log_bin==OFF and ALTER TABLE EXCHANGE PARTITION from mysql-wsrep-bugs/MW-394 --- sql/sql_class.cc | 14 ++++++++------ sql/sql_partition_admin.cc | 6 ++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 9ae16d6ebd86..63dd48b4814d 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -4171,14 +4171,16 @@ extern "C" int thd_non_transactional_update(const MYSQL_THD thd) extern "C" int thd_binlog_format(const MYSQL_THD thd) { #ifdef WITH_WSREP - if (((WSREP(thd) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()) && - (thd->variables.option_bits & OPTION_BIN_LOG)) -#else + if (WSREP(thd)) + { + /* for wsrep binlog format is meaningful also when binlogging is off */ + return (int) WSREP_BINLOG_FORMAT(thd->variables.binlog_format); + } +#endif /* WITH_WSREP */ if (mysql_bin_log.is_open() && (thd->variables.option_bits & OPTION_BIN_LOG)) -#endif - return (int) WSREP_BINLOG_FORMAT(thd->variables.binlog_format); + return (int) thd->variables.binlog_format; else - return BINLOG_FORMAT_UNSPEC; + return BINLOG_FORMAT_UNSPEC; } extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, int all) diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index cbdafcd7847f..bb73a2223308 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -69,9 +69,15 @@ bool Sql_cmd_alter_table_exchange_partition::execute(THD *thd) /* Not allowed with EXCHANGE PARTITION */ DBUG_ASSERT(!create_info.data_file_name && !create_info.index_file_name); + WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table); thd->enable_slow_log= opt_log_slow_admin_statements; DBUG_RETURN(exchange_partition(thd, first_table, &alter_info)); +#ifdef WITH_WSREP + error: + /* handle errors in TO_ISOLATION here */ + DBUG_RETURN(true); +#endif /* WITH_WSREP */ } From 9a7a86ff80cc281c4ff697be8c7abc6ab5a9b0f8 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 4 Aug 2017 15:22:00 +0300 Subject: [PATCH 226/305] MW-394 Added partition test from MariaDB sources A minor fix in sql_partition_admin to enable successful build --- mysql-test/suite/galera/r/partition.result | 140 ++++++++++++++ mysql-test/suite/galera/t/partition.test | 207 +++++++++++++++++++++ sql/sql_partition_admin.cc | 3 + 3 files changed, 350 insertions(+) create mode 100644 mysql-test/suite/galera/r/partition.result create mode 100644 mysql-test/suite/galera/t/partition.test diff --git a/mysql-test/suite/galera/r/partition.result b/mysql-test/suite/galera/r/partition.result new file mode 100644 index 000000000000..3907b4f08c95 --- /dev/null +++ b/mysql-test/suite/galera/r/partition.result @@ -0,0 +1,140 @@ +# +# MDEV#4953 Galera: DELETE from a partitioned table is not replicated +# +USE test; +CREATE TABLE t1 (pk INT PRIMARY KEY, i INT) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +INSERT INTO t1 VALUES (1,100), (2,200); +SELECT * FROM t1; +pk i +2 200 +1 100 +DELETE FROM t1; +SELECT * FROM t1; +pk i + +# On node_1 +SELECT * FROM t1; +pk i + +# On node_2 +SELECT * FROM t1; +pk i +DROP TABLE t1; +# +# MDEV#7501 : alter table exchange partition is not replicated in +# galera cluster +# + +# On node_1 +CREATE TABLE test.t1 ( +i INT UNSIGNED NOT NULL AUTO_INCREMENT, +PRIMARY KEY (i) +) ENGINE=INNODB +PARTITION BY RANGE (i) +(PARTITION p1 VALUES LESS THAN (10) ENGINE = INNODB, +PARTITION p2 VALUES LESS THAN (20) ENGINE = INNODB, +PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = INNODB); +INSERT INTO test.t1 (i) VALUE (9),(19); +CREATE TABLE test.p1 LIKE test.t1; +ALTER TABLE test.p1 REMOVE PARTITIONING; +ALTER TABLE test.t1 EXCHANGE PARTITION p1 WITH TABLE test.p1; +SELECT * FROM test.t1; +i +19 +SELECT * FROM test.p1; +i +9 + +# On node_2 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`i`) +) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (i) +(PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB, + PARTITION p2 VALUES LESS THAN (20) ENGINE = InnoDB, + PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +SHOW CREATE TABLE p1; +Table Create Table +p1 CREATE TABLE `p1` ( + `i` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`i`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 +SELECT * FROM test.t1; +i +19 +SELECT * FROM test.p1; +i +9 + +# On node_1 +ALTER TABLE t1 TRUNCATE PARTITION p2; +SELECT * FROM test.t1; +i + +# On node_2 +SELECT * FROM test.t1; +i + +# On node_1 +ALTER TABLE t1 DROP PARTITION p2; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (i) +(PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB, + PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ + +# On node_2 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(10) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`i`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY RANGE (i) +(PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB, + PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ +DROP TABLE t1, p1; +# +# MDEV-5146: Bulk loads into partitioned table not working +# +# Case 1: wsrep_load_data_splitting = ON & LOAD DATA with 20002 +# entries. +SET GLOBAL wsrep_load_data_splitting = ON; +CREATE TABLE t1 (pk INT PRIMARY KEY) +ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +SELECT COUNT(*) = 20002 FROM t1; +COUNT(*) = 20002 +1 +wsrep_last_committed_diff +1 +DROP TABLE t1; +# Case 2: wsrep_load_data_splitting = ON & LOAD DATA with 101 entries. +SET GLOBAL wsrep_load_data_splitting = ON; +CREATE TABLE t1 (pk INT PRIMARY KEY) +ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +SELECT COUNT(*) = 101 FROM t1; +COUNT(*) = 101 +1 +wsrep_last_committed_diff +1 +DROP TABLE t1; +# Case 3: wsrep_load_data_splitting = OFF & LOAD DATA with 20002 +# entries. +SET GLOBAL wsrep_load_data_splitting = OFF; +CREATE TABLE t1 (pk INT PRIMARY KEY) +ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +SELECT COUNT(*) = 20002 FROM t1; +COUNT(*) = 20002 +1 +wsrep_last_committed_diff +1 +DROP TABLE t1; +SET GLOBAL wsrep_load_data_splitting = 1;; +# End of test diff --git a/mysql-test/suite/galera/t/partition.test b/mysql-test/suite/galera/t/partition.test new file mode 100644 index 000000000000..bb5a02411c34 --- /dev/null +++ b/mysql-test/suite/galera/t/partition.test @@ -0,0 +1,207 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_partition.inc + +--echo # +--echo # MDEV#4953 Galera: DELETE from a partitioned table is not replicated +--echo # + +USE test; +CREATE TABLE t1 (pk INT PRIMARY KEY, i INT) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; +INSERT INTO t1 VALUES (1,100), (2,200); +SELECT * FROM t1; + +DELETE FROM t1; +SELECT * FROM t1; + +--echo +--echo # On node_1 +--connection node_1 +SELECT * FROM t1; + +--echo +--echo # On node_2 +--connection node_2 +SELECT * FROM t1; + +# Cleanup +DROP TABLE t1; + + +--echo # +--echo # MDEV#7501 : alter table exchange partition is not replicated in +--echo # galera cluster +--echo # + +--echo +--echo # On node_1 +--connection node_1 + +CREATE TABLE test.t1 ( + i INT UNSIGNED NOT NULL AUTO_INCREMENT, + PRIMARY KEY (i) + ) ENGINE=INNODB + PARTITION BY RANGE (i) + (PARTITION p1 VALUES LESS THAN (10) ENGINE = INNODB, + PARTITION p2 VALUES LESS THAN (20) ENGINE = INNODB, + PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = INNODB); + +INSERT INTO test.t1 (i) VALUE (9),(19); +CREATE TABLE test.p1 LIKE test.t1; +ALTER TABLE test.p1 REMOVE PARTITIONING; + +ALTER TABLE test.t1 EXCHANGE PARTITION p1 WITH TABLE test.p1; +SELECT * FROM test.t1; +SELECT * FROM test.p1; + +--echo +--echo # On node_2 +--connection node_2 + +SHOW CREATE TABLE t1; +SHOW CREATE TABLE p1; + +SELECT * FROM test.t1; +SELECT * FROM test.p1; + +--echo +--echo # On node_1 +--connection node_1 +ALTER TABLE t1 TRUNCATE PARTITION p2; +SELECT * FROM test.t1; + +--echo +--echo # On node_2 +--connection node_2 +SELECT * FROM test.t1; + +--echo +--echo # On node_1 +--connection node_1 +ALTER TABLE t1 DROP PARTITION p2; +SHOW CREATE TABLE t1; + +--echo +--echo # On node_2 +--connection node_2 +SHOW CREATE TABLE t1; + + +# Cleanup +DROP TABLE t1, p1; + +--echo # +--echo # MDEV-5146: Bulk loads into partitioned table not working +--echo # + +# Create 2 files with 20002 & 101 entries in each. +--perl +open(FILE, ">", "$ENV{'MYSQLTEST_VARDIR'}/tmp/mdev-5146-1.dat") or die; +foreach my $i (1..20002) { + print FILE "$i\n"; +} + +open(FILE, ">", "$ENV{'MYSQLTEST_VARDIR'}/tmp/mdev-5146-2.dat") or die; +foreach my $i (1..101) { + print FILE "$i\n"; +} +EOF + +--connection node_1 + +--let $wsrep_load_data_splitting_orig = `SELECT @@wsrep_load_data_splitting` + +--echo # Case 1: wsrep_load_data_splitting = ON & LOAD DATA with 20002 +--echo # entries. + +SET GLOBAL wsrep_load_data_splitting = ON; + +CREATE TABLE t1 (pk INT PRIMARY KEY) + ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; + +# Record wsrep_last_committed as it was before LOAD DATA +--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--disable_query_log +--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/mdev-5146-1.dat' INTO TABLE t1; +--enable_query_log + +--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--connection node_2 +SELECT COUNT(*) = 20002 FROM t1; + +# LOAD-ing 20002 rows causes 3 commits to be registered +--disable_query_log +--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 3 AS wsrep_last_committed_diff; +--enable_query_log + +DROP TABLE t1; + +--echo # Case 2: wsrep_load_data_splitting = ON & LOAD DATA with 101 entries. + +--connection node_1 + +SET GLOBAL wsrep_load_data_splitting = ON; + +CREATE TABLE t1 (pk INT PRIMARY KEY) + ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; + +# Record wsrep_last_committed as it was before LOAD DATA +--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--disable_query_log +--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/mdev-5146-2.dat' INTO TABLE t1; +--enable_query_log + +--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--connection node_2 +SELECT COUNT(*) = 101 FROM t1; + +# LOAD-ing 101 rows causes 1 commit to be registered +--disable_query_log +--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff; +--enable_query_log + +DROP TABLE t1; + +--echo # Case 3: wsrep_load_data_splitting = OFF & LOAD DATA with 20002 +--echo # entries. + +--connection node_1 + +SET GLOBAL wsrep_load_data_splitting = OFF; + +CREATE TABLE t1 (pk INT PRIMARY KEY) + ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; + +# Record wsrep_last_committed as it was before LOAD DATA +--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--disable_query_log +--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/mdev-5146-1.dat' INTO TABLE t1; +--enable_query_log + +--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + +--connection node_2 +SELECT COUNT(*) = 20002 FROM t1; + +# LOAD-ing 20002 rows causes 1 commit to be registered +--disable_query_log +--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff; +--enable_query_log + +DROP TABLE t1; + +--connection node_1 +# Restore the original value +--eval SET GLOBAL wsrep_load_data_splitting = $wsrep_load_data_splitting_orig; + +# Cleanup +remove_file '$MYSQLTEST_VARDIR/tmp/mdev-5146-1.dat'; +remove_file '$MYSQLTEST_VARDIR/tmp/mdev-5146-2.dat'; + +--source include/galera_end.inc +--echo # End of test diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc index bb73a2223308..8331aadc22dc 100644 --- a/sql/sql_partition_admin.cc +++ b/sql/sql_partition_admin.cc @@ -23,6 +23,9 @@ #include "sql_base.h" // open_and_lock_tables #include "log.h" #include "partitioning/partition_handler.h" // Partition_handler +#ifdef WITH_WSREP +#include "sql_parse.h" // WSREP_TO_ISOLATION_BEGIN_WRTCHK +#endif /* WITH_WSREP */ bool Sql_cmd_alter_table_exchange_partition::execute(THD *thd) From 51d093f3ceb44b55414c738e2dc040ea945d0291 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 9 Aug 2017 16:44:44 +0300 Subject: [PATCH 227/305] MW-393 mysqldump SST did not copy mysql.gtid_executed table, and this is because mysqldump tool does not dump mysql.gtid_executed table when run with --all-databases option This has been worked around by dumping and loading mysql.gtid_executed separately --- scripts/wsrep_sst_mysqldump.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh index 733ea1a31815..6816b901982f 100644 --- a/scripts/wsrep_sst_mysqldump.sh +++ b/scripts/wsrep_sst_mysqldump.sh @@ -78,12 +78,20 @@ fi STOP_WSREP="SET wsrep_on=OFF;" # NOTE: we don't use --routines here because we're dumping mysql.proc table -MYSQLDUMP="$MYSQLDUMP --defaults-extra-file=$WSREP_SST_OPT_CONF \ +DUMP_DATABASES="$MYSQLDUMP --defaults-extra-file=$WSREP_SST_OPT_CONF \ $AUTH -S$WSREP_SST_OPT_SOCKET \ --add-drop-database --add-drop-table --skip-add-locks --create-options \ --disable-keys --extended-insert --skip-lock-tables --quick --set-charset \ --skip-comments --flush-privileges --all-databases --events" +# NOTE: mysqldump --all-databases does not dump (for some reason) mysql.gtid_executed +# we have to dump it separately here +DUMP_GTID_EXECUTED="$MYSQLDUMP --defaults-extra-file=$WSREP_SST_OPT_CONF \ +$AUTH -S$WSREP_SST_OPT_SOCKET \ +--add-drop-database --add-drop-table --skip-add-locks --create-options \ +--disable-keys --extended-insert --skip-lock-tables --quick --set-charset \ +--skip-comments mysql gtid_executed" + # mysqldump cannot restore CSV tables, fix this issue CSV_TABLES_FIX=" set sql_mode=''; @@ -131,7 +139,7 @@ then # and if joiner binlog is disabled, 'RESET MASTER' returns error # ERROR 1186 (HY000) at line 2: Binlog closed, cannot RESET MASTER (echo $STOP_WSREP && echo $RESET_MASTER) | $MYSQL || true - (echo $STOP_WSREP && $MYSQLDUMP \ + (echo $STOP_WSREP && $DUMP_DATABASES && echo "use mysql" && $DUMP_GTID_EXECUTED \ && echo $RESTORE_GENERAL_LOG && echo $RESTORE_SLOW_QUERY_LOG \ && echo $SET_START_POSITION \ || echo "SST failed to complete;") | $MYSQL From f298f587ac50f9264ffb035ef811c401199bab81 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 18 Aug 2017 11:02:21 +0200 Subject: [PATCH 228/305] MW-403 MTR test galera.MW-388 fails sporadically --- mysql-test/suite/galera/r/MW-388.result | 14 ++++++++------ mysql-test/suite/galera/t/MW-388.test | 24 +++++++++++++++++++----- sql/wsrep_hton.cc | 5 +++-- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/mysql-test/suite/galera/r/MW-388.result b/mysql-test/suite/galera/r/MW-388.result index f81f1e1a9fb2..117b0fe88d01 100644 --- a/mysql-test/suite/galera/r/MW-388.result +++ b/mysql-test/suite/galera/r/MW-388.result @@ -8,19 +8,20 @@ END; INSERT INTO t1 VALUES (1, 'node 1'),(2, 'node 1'); INSERT INTO t1 VALUES (3, 'node 1'); END| +SET GLOBAL wsrep_slave_threads = 2; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; INSERT INTO t1 VALUES (1, 'node 2');; SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; SET SESSION wsrep_sync_wait = 0; -SET SESSION DEBUG_SYNC = 'wsrep_before_replication SIGNAL wsrep_before_replication_reached WAIT_FOR wsrep_before_replication_continue'; +SET SESSION DEBUG_SYNC = 'wsrep_after_replication SIGNAL wsrep_after_replication_reached WAIT_FOR wsrep_after_replication_continue'; CALL insert_proc ();; -SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_before_replication_reached"; +SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_replication_reached"; SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL wsrep_before_replication_continue"; +SET DEBUG_SYNC = "now SIGNAL wsrep_after_replication_continue"; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; -SELECT @errno; -@errno -1213 +SELECT @errno = 1213; +@errno = 1213 +1 SELECT * FROM t1; f1 f2 1 node 2 @@ -29,5 +30,6 @@ SELECT * FROM t1; f1 f2 1 node 2 3 node 1 +SET GLOBAL wsrep_slave_threads = DEFAULT; DROP TABLE t1; DROP PROCEDURE insert_proc; diff --git a/mysql-test/suite/galera/t/MW-388.test b/mysql-test/suite/galera/t/MW-388.test index 59b28dba2369..5446731093b3 100644 --- a/mysql-test/suite/galera/t/MW-388.test +++ b/mysql-test/suite/galera/t/MW-388.test @@ -16,6 +16,18 @@ BEGIN END| DELIMITER ;| +# We need two slave threads here to guarantee progress. +# If we use only one thread the following could happen +# in node_1: +# We block the only slave thread in wsrep_apply_cb and we +# issue an INSERT (by calling the stored procedure) that will +# try to acquire galera's local monitor in pre_commit(). +# This usually works fine, except for when a commit cut event +# sneaks in the slave queue and gets a local seqno smaller than +# that of the INSERT. Because there is only one slave thread, +# commit cut is not processed and therefore does not advance +# local monitor, and our INSERT remains stuck there. +SET GLOBAL wsrep_slave_threads = 2; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; --connection node_2 @@ -27,15 +39,15 @@ SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; --connection node_1 SET SESSION wsrep_sync_wait = 0; -SET SESSION DEBUG_SYNC = 'wsrep_before_replication SIGNAL wsrep_before_replication_reached WAIT_FOR wsrep_before_replication_continue'; +SET SESSION DEBUG_SYNC = 'wsrep_after_replication SIGNAL wsrep_after_replication_reached WAIT_FOR wsrep_after_replication_continue'; --send CALL insert_proc (); --connection node_1a -SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_before_replication_reached"; +SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_replication_reached"; + ---connection node_1a SET GLOBAL DEBUG = ""; -SET DEBUG_SYNC = "now SIGNAL wsrep_before_replication_continue"; +SET DEBUG_SYNC = "now SIGNAL wsrep_after_replication_continue"; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; --connection node_2 @@ -44,11 +56,13 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; --connection node_1 # We expect no errors here, because the handler in insert_proc() caught the deadlock error --reap -SELECT @errno; +SELECT @errno = 1213; SELECT * FROM t1; --connection node_2 SELECT * FROM t1; +--connection node_1 +SET GLOBAL wsrep_slave_threads = DEFAULT; DROP TABLE t1; DROP PROCEDURE insert_proc; \ No newline at end of file diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index 0c5ec5217131..ca2df1c7d44a 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -321,9 +321,7 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) } DBUG_ENTER("wsrep_run_wsrep_commit"); -#ifdef WITH_WSREP DEBUG_SYNC(thd, "wsrep_before_replication"); -#endif /* WITH_WSREP */ if (thd->slave_thread && !opt_log_slave_updates) DBUG_RETURN(WSREP_TRX_OK); @@ -507,6 +505,9 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all) } mysql_mutex_lock(&thd->LOCK_wsrep_thd); + + DEBUG_SYNC(thd, "wsrep_after_replication"); + switch(rcode) { case 0: /* From 96eae5c0fd56e5c1eaf067c23bd130bef32d7b74 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sat, 12 Aug 2017 21:23:59 +0300 Subject: [PATCH 229/305] MW-393 packaging: fix up deb specs --- .../deb-in/mysql-packagesource-server-SERIES.install.in | 6 ++++++ packaging/deb-in/mysql-packagesource-test-SERIES.install.in | 2 ++ 2 files changed, 8 insertions(+) diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in index d7d47ae37183..c5ce492a7d9e 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -46,6 +46,8 @@ usr/bin/zlib_decompress usr/lib/mysql/ # plugins usr/lib/mysql/plugin/adt_null.so usr/lib/mysql/plugin/auth_socket.so +usr/lib/mysql/plugin/group_replication.so +usr/lib/mysql/plugin/connection_control.so usr/lib/mysql/plugin/innodb_engine.so usr/lib/mysql/plugin/keyring_file.so usr/lib/mysql/plugin/keyring_udf.so @@ -73,6 +75,8 @@ usr/share/man/man1/myisampack.1 usr/share/man/man1/my_print_defaults.1 usr/share/man/man1/mysql-stress-test.pl.1 usr/share/man/man1/mysql_install_db.1 +usr/share/man/man1/mysqld_multi.1 +usr/share/man/man1/mysqld_safe.1 usr/share/man/man1/mysql_plugin.1 usr/share/man/man1/mysql_secure_installation.1 usr/share/man/man1/mysql_ssl_rsa_setup.1 @@ -109,6 +113,7 @@ usr/share/mysql/mysql_sys_schema.sql usr/share/mysql/mysql_system_tables.sql usr/share/mysql/mysql_system_tables_data.sql usr/share/mysql/mysql_test_data_timezone.sql +usr/share/mysql/mysqld_multi.server usr/share/mysql/uninstall_rewriter.sql usr/share/mysql/wsrep.cnf usr/share/mysql/wsrep_notify @@ -117,6 +122,7 @@ usr/share/mysql/mysql-helpers usr/share/mysql/*/errmsg.sys usr/share/mysql/errmsg-utf8.txt @DEB_INSTALL_SERVER_SYSTEMD@ +usr/lib/tmpfiles.d/mysql.conf # legal usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/ usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ diff --git a/packaging/deb-in/mysql-packagesource-test-SERIES.install.in b/packaging/deb-in/mysql-packagesource-test-SERIES.install.in index 27aec21842f5..185ff8903110 100644 --- a/packaging/deb-in/mysql-packagesource-test-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-test-SERIES.install.in @@ -19,8 +19,10 @@ usr/bin/mysqltest usr/bin/mysqlxtest # manpages usr/share/man/man1/mysql_client_test.1 +usr/share/man/man1/mysql_client_test_embedded.1 usr/share/man/man1/mysql-test-run.pl.1 usr/share/man/man1/mysqltest.1 +usr/share/man/man1/mysqltest_embedded.1 # plugins usr/lib/mysql/plugin/auth.so usr/lib/mysql/plugin/auth_test_plugin.so From 73f26080a1a72d36453e5cdf4a216de26a83960c Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sun, 13 Aug 2017 16:07:40 +0300 Subject: [PATCH 230/305] MW-393: install tmpfiles.d only for systemd-based releases --- packaging/deb-in/CMakeLists.txt | 9 ++++++--- .../deb-in/mysql-packagesource-server-SERIES.install.in | 1 - 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 4c76256aad6f..d58a7386f0e1 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -165,7 +165,8 @@ ELSEIF(DEB_CODENAME STREQUAL "jessie") SET (DEB_SYSTEMD_SERVICE_NAME "mysql") SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --no-enable --name=mysql") SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade") - SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start") + SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start + usr/lib/tmpfiles.d/mysql.conf") SET (DEB_INSTALL_SERVER_APPARMOR "") SET (DEB_SERVICE_SERVER_EXECPRE "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre") @@ -188,7 +189,8 @@ ELSEIF(DEB_CODENAME STREQUAL "stretch") SET (DEB_SYSTEMD_SERVICE_NAME "mysql") SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --name=mysql") SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade") - SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start") + SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start + usr/lib/tmpfiles.d/mysql.conf") SET (DEB_INSTALL_SERVER_APPARMOR "") SET (DEB_SERVICE_SERVER_EXECPRE "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre") @@ -264,7 +266,8 @@ ELSEIF(DEB_CODENAME STREQUAL "xenial") SET (DEB_SYSTEMD_SERVICE_NAME "mysql") SET (DEB_RULES_SYSTEMD_ENABLE "dh_systemd_enable --no-enable --name=mysql") SET (DEB_RULES_SYSTEMD_START "dh_systemd_start --restart-after-upgrade") - SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start") + SET (DEB_INSTALL_SERVER_SYSTEMD "usr/share/mysql/mysql-systemd-start + usr/lib/tmpfiles.d/mysql.conf") SET (DEB_INSTALL_SERVER_APPARMOR "etc/apparmor.d/usr.sbin.mysqld") SET (DEB_SERVICE_SERVER_EXECPRE "ExecStartPre=/usr/share/mysql/mysql-systemd-start pre") diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in index c5ce492a7d9e..e9c7dd265f29 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -122,7 +122,6 @@ usr/share/mysql/mysql-helpers usr/share/mysql/*/errmsg.sys usr/share/mysql/errmsg-utf8.txt @DEB_INSTALL_SERVER_SYSTEMD@ -usr/lib/tmpfiles.d/mysql.conf # legal usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/ usr/share/doc/mysql-@DEB_PRODUCTNAME@-server@DEB_PRODUCTSERIES@/@DEB_INSTALL_LICENSEFILE@ From 94bf0976592f6dea22f6eb70bf4c4b15d0e98c1f Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sun, 13 Aug 2017 16:36:14 +0300 Subject: [PATCH 231/305] MW-393: add mysqld_multi to the installation --- packaging/deb-in/mysql-packagesource-server-SERIES.install.in | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in index e9c7dd265f29..017a0608edb4 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -64,6 +64,7 @@ usr/lib/mysql/plugin/validate_password.so usr/lib/mysql/plugin/version_token.so @DEB_INSTALL_SERVER_PLUGINS@ # server +usr/bin/mysqld_multi usr/sbin/mysqld # man pages usr/share/man/man1/innochecksum.1 From d0fa52c7e2d595aadd6b4b55617587ecee3b1090 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sun, 13 Aug 2017 18:39:59 +0300 Subject: [PATCH 232/305] MW-393: ignore mysqld_multi for deb packages --- packaging/deb-in/mysql-packagesource-server-SERIES.install.in | 2 +- packaging/deb-in/rules.in | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in index 017a0608edb4..58475b68abbd 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -64,7 +64,7 @@ usr/lib/mysql/plugin/validate_password.so usr/lib/mysql/plugin/version_token.so @DEB_INSTALL_SERVER_PLUGINS@ # server -usr/bin/mysqld_multi +# usr/bin/mysqld_multi usr/sbin/mysqld # man pages usr/share/man/man1/innochecksum.1 diff --git a/packaging/deb-in/rules.in b/packaging/deb-in/rules.in index caf7f57f23f8..2b4f8a1609b0 100644 --- a/packaging/deb-in/rules.in +++ b/packaging/deb-in/rules.in @@ -168,7 +168,8 @@ override_dh_install: -Xusr/share/mysql/README \ -Xusr/share/mysql/docs/mysql.info \ -Xusr/share/mysql/docs/INSTALL-BINARY \ - -Xusr/share/man/man1/mysqlman.1 + -Xusr/share/man/man1/mysqlman.1 \ + -Xusr/bin/mysqld_multi ifneq (,@DEB_RULES_APPARMOR_LOAD@) # non-empty command = apparmor is handled dh_apparmor -pmysql-server@DEB_PRODUCTSERIES@ --profile-name=usr.sbin.mysqld From ae160585a1fd7fc32037378a7adfec1b1b3c3cfe Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Tue, 8 Aug 2017 16:43:57 +0200 Subject: [PATCH 233/305] MW-398 MTR stability fix for test galera.MW-329 --- mysql-test/suite/galera/r/MW-329.result | 7 +------ mysql-test/suite/galera/t/MW-329.test | 25 ++++++++++++++++++------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/mysql-test/suite/galera/r/MW-329.result b/mysql-test/suite/galera/r/MW-329.result index a79ba598d69a..652ef91fdb58 100644 --- a/mysql-test/suite/galera/r/MW-329.result +++ b/mysql-test/suite/galera/r/MW-329.result @@ -1,9 +1,5 @@ CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; INSERT INTO t1 (f1) VALUES (1),(65535); -FLUSH STATUS; -SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'; -VARIABLE_VALUE = 0 -1 CREATE PROCEDURE proc_insert () BEGIN DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END; @@ -13,8 +9,7 @@ INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 )); END WHILE; END| CALL proc_insert();; -SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'; -VARIABLE_VALUE > 0 +wsrep_local_replays 1 DROP PROCEDURE proc_insert; DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MW-329.test b/mysql-test/suite/galera/t/MW-329.test index 73f32b9e808b..a3956961e13a 100644 --- a/mysql-test/suite/galera/t/MW-329.test +++ b/mysql-test/suite/galera/t/MW-329.test @@ -9,11 +9,6 @@ CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; # We start with a populated table INSERT INTO t1 (f1) VALUES (1),(65535); -# Clear the wsrep_local_replays counter - -FLUSH STATUS; -SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'; - # # Run concurrent INSERTs # @@ -41,6 +36,8 @@ DELIMITER ;| --connection node_2 --let $count = 10 +--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` + while ($count) { --let $signature = `SELECT LEFT(MD5(RAND()), 10)` @@ -54,14 +51,28 @@ while ($count) --die ROW_COUNT() = 0 } } - --dec $count + + # + # Ensure at least one replay happens + # + + --let $wsrep_replays = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` + --disable_query_log + if (`SELECT $wsrep_replays - $wsrep_local_replays_old > 0`) { + --dec $count + } + --enable_query_log } # # Confirm that some transaction replays occurred # -SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'; +--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'` +--disable_query_log +--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old > 0 AS wsrep_local_replays; +--enable_query_log + # # Terminate the stored procedure From 6a503c43283be47456566183bf10f0d80bdbcfd4 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 24 Aug 2017 10:34:21 +0300 Subject: [PATCH 234/305] MW-402 cascading FK issues * created tests focusing in multi-master conflicts during cascading foreign key processing * in row0upd.cc, calling wsrep_row_ups_check_foreign_constraints only when running in cluster * in row0ins.cc fixed regression from MW-369, which caused crash with MW-402.test --- mysql-test/suite/galera/r/MW-402.result | 152 ++++++++++++++++++++ mysql-test/suite/galera/t/MW-402.test | 184 ++++++++++++++++++++++++ storage/innobase/row/row0ins.cc | 3 +- storage/innobase/row/row0upd.cc | 7 +- 4 files changed, 341 insertions(+), 5 deletions(-) create mode 100644 mysql-test/suite/galera/r/MW-402.result create mode 100644 mysql-test/suite/galera/t/MW-402.test diff --git a/mysql-test/suite/galera/r/MW-402.result b/mysql-test/suite/galera/r/MW-402.result new file mode 100644 index 000000000000..4261bc6bac31 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-402.result @@ -0,0 +1,152 @@ +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON DELETE CASCADE); +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE c SET f2=1 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM p WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +SELECT * FROM c; +f1 p_id f2 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE c SET f2=2 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE p set f1=11 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +11 0 +SELECT * FROM c; +f1 p_id f2 +1 11 0 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE c SET p_id=2 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE p set f1=11 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +11 0 +SELECT * FROM c; +f1 p_id f2 +1 11 0 +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p set f1=21 WHERE f1 = 11; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE c SET p_id=2 where f1=1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +11 0 +SELECT * FROM c; +f1 p_id f2 +1 2 0 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE, +CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); +INSERT INTO c VALUES (1, 1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p2 SET f2=2 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM p1 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +SELECT * FROM p1; +f1 f2 +SELECT * FROM p2; +f1 f2 +1 2 +SELECT * FROM c; +f1 p1_id p2_id f2 +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; diff --git a/mysql-test/suite/galera/t/MW-402.test b/mysql-test/suite/galera/t/MW-402.test new file mode 100644 index 000000000000..5713cda52824 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-402.test @@ -0,0 +1,184 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +# +# we must open connection node_1a here, MW-369.inc will use it later +# +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 + +# +# cascading delete operation is replicated from node2 +# and this conflicts with an update for child table in node1 +# +# As a result, the update should fail for certification error +# +--connection node_1 + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON DELETE CASCADE); + + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = UPDATE c SET f2=1 where f1=1 +--let $mw_369_child_query = DELETE FROM p WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# cascading update operation is replicated from node2 +# and this conflicts with an update for child table in node1 +# +# As a result, the update should fail for certification error +# +--connection node_1 + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); + + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = UPDATE c SET f2=2 where f1=1 +--let $mw_369_child_query = UPDATE p set f1=11 WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# ON UPDATE CASCADE tests +# Here we update primary key of parent table to cause cascaded update +# on child table +# +# cascading update operation is replicated from node2 +# and this conflicts with an update for child table in node1 +# +# As a result, the update should fail for certification error +# +--connection node_1 + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); + + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = UPDATE c SET p_id=2 where f1=1 +--let $mw_369_child_query = UPDATE p set f1=11 WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +# same as previous, but statements in different order +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +--let $mw_369_parent_query = UPDATE p set f1=21 WHERE f1 = 11 +--let $mw_369_child_query = UPDATE c SET p_id=2 where f1=1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + + +# +# CASCADE DELETE tests with two parent tables +# Here we cause cascaded operation on child table through +# one parent table and have other operation on the other +# parent table +# +# cascading update operation is replicated from node2 +# but this does not conflict with an update for the other parent table in node1 +# +# As a result, the update on p2 should succeed +# +--connection node_1 + +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE, + CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); + + +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); + +INSERT INTO c VALUES (1, 1, 1, 0); + +--let $mw_369_parent_query = UPDATE p2 SET f2=2 where f1=1 +--let $mw_369_child_query = DELETE FROM p1 WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--reap + +# same as previous, but statements in different order +--connection node_2 +SELECT * FROM p1; +SELECT * FROM p2; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; \ No newline at end of file diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index c3feb967f029..3dcb1fd508a5 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -1285,8 +1285,7 @@ row_ins_foreign_check_on_constraint( foreign, clust_rec, clust_index, - FALSE, - (node) ? TRUE : FALSE); + FALSE, FALSE); if (err != DB_SUCCESS) { fprintf(stderr, "WSREP: foreign key append failed: %d\n", err); diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index 6e2745838bde..a6a3cc085ed0 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -2265,7 +2265,7 @@ row_upd_clust_rec_by_insert( } } #ifdef WITH_WSREP - if (!referenced && + if (wsrep_on(trx->mysql_thd) && !referenced && !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE && ((upd_node_t*)parent)->cascade_node == node) && foreign @@ -2495,6 +2495,7 @@ row_upd_del_mark_clust_rec( #ifdef WITH_WSREP rec_t* rec; que_node_t *parent = que_node_get_parent(node); + trx_t* trx = thr_get_trx(thr); #endif /* WITH_WSREP */ ut_ad(node); @@ -2530,10 +2531,10 @@ row_upd_del_mark_clust_rec( node, pcur, index->table, index, offsets, thr, mtr); } #ifdef WITH_WSREP - if (err == DB_SUCCESS && !referenced && + if (trx && wsrep_on(trx->mysql_thd) && + (err == DB_SUCCESS) && !referenced && !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE && ((upd_node_t*)parent)->cascade_node == node) && - thr_get_trx(thr) && foreign ) { err = wsrep_row_upd_check_foreign_constraints( From 14c5e4dfcc04d9a1249bd3ff3acd7fc8660287e2 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 24 Aug 2017 10:34:21 +0300 Subject: [PATCH 235/305] MW-402 cascading FK issues * created tests focusing in multi-master conflicts during cascading foreign key processing * in row0upd.cc, calling wsrep_row_ups_check_foreign_constraints only when running in cluster * in row0ins.cc fixed regression from MW-369, which caused crash with MW-402.test --- mysql-test/suite/galera/r/MW-402.result | 152 ++++++++++++++++++++ mysql-test/suite/galera/t/MW-402.test | 184 ++++++++++++++++++++++++ storage/innobase/row/row0ins.cc | 3 +- storage/innobase/row/row0upd.cc | 12 +- 4 files changed, 342 insertions(+), 9 deletions(-) create mode 100644 mysql-test/suite/galera/r/MW-402.result create mode 100644 mysql-test/suite/galera/t/MW-402.test diff --git a/mysql-test/suite/galera/r/MW-402.result b/mysql-test/suite/galera/r/MW-402.result new file mode 100644 index 000000000000..4261bc6bac31 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-402.result @@ -0,0 +1,152 @@ +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON DELETE CASCADE); +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE c SET f2=1 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM p WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +SELECT * FROM c; +f1 p_id f2 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE c SET f2=2 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE p set f1=11 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +11 0 +SELECT * FROM c; +f1 p_id f2 +1 11 0 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE c SET p_id=2 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE p set f1=11 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +11 0 +SELECT * FROM c; +f1 p_id f2 +1 11 0 +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p set f1=21 WHERE f1 = 11; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE c SET p_id=2 where f1=1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +2 0 +11 0 +SELECT * FROM c; +f1 p_id f2 +1 2 0 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE, +CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); +INSERT INTO c VALUES (1, 1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p2 SET f2=2 where f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM p1 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +SELECT * FROM p1; +f1 f2 +SELECT * FROM p2; +f1 f2 +1 2 +SELECT * FROM c; +f1 p1_id p2_id f2 +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; diff --git a/mysql-test/suite/galera/t/MW-402.test b/mysql-test/suite/galera/t/MW-402.test new file mode 100644 index 000000000000..5713cda52824 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-402.test @@ -0,0 +1,184 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +# +# we must open connection node_1a here, MW-369.inc will use it later +# +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 + +# +# cascading delete operation is replicated from node2 +# and this conflicts with an update for child table in node1 +# +# As a result, the update should fail for certification error +# +--connection node_1 + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON DELETE CASCADE); + + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = UPDATE c SET f2=1 where f1=1 +--let $mw_369_child_query = DELETE FROM p WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# cascading update operation is replicated from node2 +# and this conflicts with an update for child table in node1 +# +# As a result, the update should fail for certification error +# +--connection node_1 + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); + + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = UPDATE c SET f2=2 where f1=1 +--let $mw_369_child_query = UPDATE p set f1=11 WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# ON UPDATE CASCADE tests +# Here we update primary key of parent table to cause cascaded update +# on child table +# +# cascading update operation is replicated from node2 +# and this conflicts with an update for child table in node1 +# +# As a result, the update should fail for certification error +# +--connection node_1 + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) ON UPDATE CASCADE); + + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = UPDATE c SET p_id=2 where f1=1 +--let $mw_369_child_query = UPDATE p set f1=11 WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +# same as previous, but statements in different order +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +--let $mw_369_parent_query = UPDATE p set f1=21 WHERE f1 = 11 +--let $mw_369_child_query = UPDATE c SET p_id=2 where f1=1 + +--connection node_1a +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + + +# +# CASCADE DELETE tests with two parent tables +# Here we cause cascaded operation on child table through +# one parent table and have other operation on the other +# parent table +# +# cascading update operation is replicated from node2 +# but this does not conflict with an update for the other parent table in node1 +# +# As a result, the update on p2 should succeed +# +--connection node_1 + +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE, + CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); + + +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); + +INSERT INTO c VALUES (1, 1, 1, 0); + +--let $mw_369_parent_query = UPDATE p2 SET f2=2 where f1=1 +--let $mw_369_child_query = DELETE FROM p1 WHERE f1 = 1 + +--connection node_1a +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--reap + +# same as previous, but statements in different order +--connection node_2 +SELECT * FROM p1; +SELECT * FROM p2; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; \ No newline at end of file diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc index ba4385917bcf..9d9c1b987539 100644 --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@ -1437,8 +1437,7 @@ row_ins_foreign_check_on_constraint( foreign, clust_rec, clust_index, - FALSE, - (node) ? TRUE : FALSE); + FALSE, FALSE); if (err != DB_SUCCESS) { ib::warn() << "WSREP: foreign key append failed: " << err; } else diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index 9708b0491118..bc5b9932ab6f 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -2758,7 +2758,7 @@ row_upd_clust_rec_by_insert( } } #ifdef WITH_WSREP - if (!referenced && + if (wsrep_on(trx->mysql_thd) && !referenced && !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE && (std::find(((upd_node_t*)parent)->cascade_upd_nodes->begin(), ((upd_node_t*)parent)->cascade_upd_nodes->end(), @@ -2977,6 +2977,7 @@ row_upd_del_mark_clust_rec( dberr_t err; #ifdef WITH_WSREP que_node_t *parent = que_node_get_parent(node); + trx_t* trx = thr_get_trx(thr); #endif /* WITH_WSREP */ ut_ad(node); @@ -3005,13 +3006,10 @@ row_upd_del_mark_clust_rec( node, pcur, index->table, index, offsets, thr, mtr); } #ifdef WITH_WSREP - if (err == DB_SUCCESS && !referenced && + if (trx && wsrep_on(trx->mysql_thd) && + (err == DB_SUCCESS) && !referenced && !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE && - (std::find(((upd_node_t*)parent)->cascade_upd_nodes->begin(), - ((upd_node_t*)parent)->cascade_upd_nodes->end(), - node) == - ((upd_node_t*)parent)->cascade_upd_nodes->end())) && - thr_get_trx(thr) && + ((upd_node_t*)parent)->cascade_node == node) && foreign ) { err = wsrep_row_upd_check_foreign_constraints( From 8c8b7f67e8860f8d6e3d4f3e1f939abd2248bffd Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 24 Aug 2017 13:44:15 +0300 Subject: [PATCH 236/305] MW-402 MW-369 cascading FK issues for 5.7 version Copied the mtr test for MW-369, there has been earlier merge problem and this test has been missing in 5.7 branch --- mysql-test/suite/galera/r/MW-369.result | 155 +++++++++++++++ mysql-test/suite/galera/t/MW-369.inc | 75 ++++++++ mysql-test/suite/galera/t/MW-369.test | 246 ++++++++++++++++++++++++ 3 files changed, 476 insertions(+) create mode 100644 mysql-test/suite/galera/r/MW-369.result create mode 100644 mysql-test/suite/galera/t/MW-369.inc create mode 100644 mysql-test/suite/galera/t/MW-369.test diff --git a/mysql-test/suite/galera/r/MW-369.result b/mysql-test/suite/galera/r/MW-369.result new file mode 100644 index 000000000000..516904d1b2aa --- /dev/null +++ b/mysql-test/suite/galera/r/MW-369.result @@ -0,0 +1,155 @@ +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +DELETE FROM p WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +INSERT INTO c VALUES (1, 1); +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +1 0 +2 0 +SELECT * FROM c; +f1 p_id +1 1 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, +f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE c SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +SELECT * FROM p; +f1 f2 +1 1 +2 0 +SELECT * FROM c; +f1 p_id f2 +1 1 1 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM c WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +SELECT * FROM p; +f1 f2 +1 1 +2 0 +SELECT * FROM c; +f1 p_id +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER UNIQUE KEY) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f2)) ; +INSERT INTO p VALUES (1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +INSERT INTO c VALUES (1, 0);; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +1 0 +SELECT * FROM c; +f1 p_id +1 0 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) +ON DELETE CASCADE) ; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +DELETE FROM p WHERE f1 = 1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +UPDATE c SET f2 = 1 WHERE f1 = 1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +1 0 +2 0 +SELECT * FROM c; +f1 p_id f2 +1 1 1 +DROP TABLE c; +DROP TABLE p; diff --git a/mysql-test/suite/galera/t/MW-369.inc b/mysql-test/suite/galera/t/MW-369.inc new file mode 100644 index 000000000000..5fd9ef150ae0 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-369.inc @@ -0,0 +1,75 @@ +# +# This file should be included from tests for MW-369 to run concurrent +# transaction from node_1 with autocommit query from node_2. +# +# The parameters: +# * $mw_369_parent_query - the parent query to be run inside transaction +# * $mw_369_child_query - the child query +# +# The operations are the following: +# +# node_1: +# START TRANSACTION; +# $mw_369_parent_query +# node_2 +# $mw_369_child_query - will be blocked on node_1 in apply monitor +# node_1: +# COMMIT; - will be blocked on node_1 in local monitor +# +# The $mw_369_child_query is always expected to succeed. The caller is +# responsible for checking if the final COMMIT on connection node_1 +# succeeds. +# + +--connection node_1 +SET AUTOCOMMIT=ON; +START TRANSACTION; + +--eval $mw_369_parent_query + +# +# Block the $mw_369_child_query from node_2 +# +# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--connection node_1a +SET SESSION wsrep_sync_wait = 0; +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_set_sync_point.inc + +# +# insert client row, which will make it impossible to replay the +# delete on parent +# +--connection node_2 +--eval $mw_369_child_query + +# +# Wait until $mw_369_child_query from node_2 reaches the sync point and +# block the 'COMMIT' from node_1 before it certifies. +# +--connection node_1a +--source include/galera_wait_sync_point.inc +--source include/galera_clear_sync_point.inc + +--let $galera_sync_point = local_monitor_enter_sync +--source include/galera_set_sync_point.inc + +--connection node_1 +--send COMMIT + +# +# Wait until both sync points have been reached +# +--connection node_1a +--let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_enter_sync +--source include/galera_wait_sync_point.inc + +# +# both threads are now parked in sync points, signal them to continue +# +--let $galera_sync_point = apply_monitor_slave_enter_sync +--source include/galera_signal_sync_point.inc + +--let $galera_sync_point = local_monitor_enter_sync +--source include/galera_signal_sync_point.inc +--source include/galera_clear_sync_point.inc diff --git a/mysql-test/suite/galera/t/MW-369.test b/mysql-test/suite/galera/t/MW-369.test new file mode 100644 index 000000000000..720d6daf518c --- /dev/null +++ b/mysql-test/suite/galera/t/MW-369.test @@ -0,0 +1,246 @@ +# +# Test A Outline: +# =============== +# +# This test tests the scenario for MW-369 where a new child table +# row referring to parent table row is inserted concurrently from +# another node while the transaction which tries to delete a +# referred row from the parent table is committing. +# +# The p table will originally have rows (1, 0), (2, 0). +# The c table will be empty. +# +# A new row (1, 1) pointing to parent row (1, 0) is inserted from +# connection node_2, the transaction which tries to remove the +# parent row (1, 0) is run from connection node_1. +# +# Expected outcome: +# ================ +# +# The transaction on node_1 will fail. The parent table will contain +# rows (1, 0), (2, 0) and the child table will contain row (1, 1). +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +--let $mw_369_parent_query = DELETE FROM p WHERE f1 = 1 +--let $mw_369_child_query = INSERT INTO c VALUES (1, 1) + +# +# we must open connection node_1a here, MW-369.inc will use it later +# +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# Test B Outline: +# =============== +# +# This test tests the scenario for MW-369 where a existing +# child table row is updated concurrently from another node +# with a transaction which updates the parent table. +# +# The p table will originally have rows (1, 0), (2, 0). +# The c table will originally have rows (1, 1, 0) which points +# to parent table row (1, 0). +# +# Expected outcome: +# ================ +# +# Both updates should succeed since they are done to separate tables and +# rows. The parent table will contain rows (1, 1), (2, 0). The child +# table will contain row (1, 1, 1). +# + +--connection node_1 +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, + f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); + +--let mw_369_parent_query = UPDATE p SET f2 = 1 WHERE f1 = 1 +--let $mw_369_child_query = UPDATE c SET f2 = 1 WHERE f1 = 1 +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# Test C Outline: +# =============== +# +# This test tests the scenario for MW-369 where a child table row is +# deleted concurrently from the other node while a transaction updates +# the parent table referred by the child table row. +# +# The p table will originally have rows (1, 0), (2, 0) +# The c table will originally have row (1, 1) which points to parent +# table row (1, 0). +# +# A row (1, 1) pointing to parent row (1, 0) is deleted from +# connection node_2, the transaction which tries to update the +# parent row (1, 0) is run from connection node_1. +# +# Expected Outcome: +# ================ +# Both operations on node_1 and node_2 should succeed without conflicts. +# The parent table should contain values (1, 1), (2, 0) and the child +# table should be empty. + +--connection node_1 +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1); + +--let $mw_369_parent_query = UPDATE p SET f2 = 1 WHERE f1 = 1 +--let $mw_369_child_query = DELETE FROM c WHERE f1 = 1 +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + + +# +# Test D Outline: +# =============== +# +# This test is similar to test A, where parent row is deleted while a child row +# is inserted simultaneously on node 2. However, in this test case the FK +# constraint's target column is a unique key, and parent row is not delete, +# but this key value is changed so that insert on node 2 will cause FK +# violation +# +# The p table will originally have rows (1, 0) +# The c table will originally be empty +# +# in node_1, parent row is updated to value (1,1) +# A row (1, 0) pointing to the old version of parent row (1, 0) is inserted +# in connection node_2 +# +# Expected Outcome: +# ================ +# This is a true conflict and one transaciton must abort. In this case it is node_1 +# transaction, which was scheduled later. +# Parent table should have row (1,0) +# child table should have row (1,0) +# + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER UNIQUE KEY) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f2)) ; + +INSERT INTO p VALUES (1, 0); + +--let $mw_369_parent_query = UPDATE p SET f2 = 1 WHERE f1 = 1 +--let $mw_369_child_query = INSERT INTO c VALUES (1, 0); +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + +# +# Test E Outline: +# =============== +# +# This test is similar to test B, where parent row is deleted while a child row +# is updated simultaneously on node 2. However, in this test case the FK +# constraint has ON DELETE CASCADE option, and the delete on parent row will +# cascade a delete on child row as well. This will cause true conflict with +# connection node_2, which tries to update unrelated column on child table. +# +# The p table will originally have rows (1, 0), (2,0) +# The c table will originally have row (1,1,0) +# +# in node_1, parent row (1,0) is deleted and cascaded delete will happen on +# child table row (1,1,0). +# in connection node_2 child table row is update to value (1,1,1) +# +# Expected Outcome: +# ================ +# This is a true conflict and one transaciton must abort. In this case it is node_1 +# transaction, which was scheduled later. +# Parent table should have rows (1,0), (2,0) +# child table should have row (1,1,1) +# + + +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1) + ON DELETE CASCADE) ; + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1, 0); + +--let $mw_369_parent_query = DELETE FROM p WHERE f1 = 1 +--let $mw_369_child_query = UPDATE c SET f2 = 1 WHERE f1 = 1 +--source MW-369.inc + +# Commit fails +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + From fd8b7c0f151b97980de3378f7f52c2bfe0236867 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 25 Aug 2017 11:33:13 +0300 Subject: [PATCH 237/305] MW-402 cascading FK issue (5.7 version) Optimizing cascade node list traversal, which could turn out as performance bottleneck Even this current cascade node check could be skipped, but a dedicated mtr test is needed to confirm that --- storage/innobase/row/row0upd.cc | 34 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index bc5b9932ab6f..a6b82876f213 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -2442,15 +2442,11 @@ row_upd_sec_index_entry( #ifdef WITH_WSREP if (wsrep_on(trx->mysql_thd) && !wsrep_thd_is_BF(trx->mysql_thd, FALSE) && - err == DB_SUCCESS && !referenced && - !(parent && que_node_get_type(parent) == - QUE_NODE_UPDATE && - (std::find(((upd_node_t*)parent)->cascade_upd_nodes->begin(), - ((upd_node_t*)parent)->cascade_upd_nodes->end(), - node) == - ((upd_node_t*)parent)->cascade_upd_nodes->end())) && - foreign - ) { + err == DB_SUCCESS && !referenced && foreign && + (!parent || (que_node_get_type(parent) != + QUE_NODE_UPDATE) || + ((upd_node_t*)parent)->cascade_upd_nodes->empty()) + ) { ulint* offsets = rec_get_offsets( rec, index, NULL, ULINT_UNDEFINED, @@ -2758,13 +2754,10 @@ row_upd_clust_rec_by_insert( } } #ifdef WITH_WSREP - if (wsrep_on(trx->mysql_thd) && !referenced && - !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE && - (std::find(((upd_node_t*)parent)->cascade_upd_nodes->begin(), - ((upd_node_t*)parent)->cascade_upd_nodes->end(), - node) == - ((upd_node_t*)parent)->cascade_upd_nodes->end())) && - foreign + if (wsrep_on(trx->mysql_thd) && + !referenced && foreign && + (!parent || (que_node_get_type(parent) != QUE_NODE_UPDATE) || + ((upd_node_t*)parent)->cascade_upd_nodes->empty()) ) { err = wsrep_row_upd_check_foreign_constraints( node, pcur, table, index, offsets, thr, mtr); @@ -3006,11 +2999,10 @@ row_upd_del_mark_clust_rec( node, pcur, index->table, index, offsets, thr, mtr); } #ifdef WITH_WSREP - if (trx && wsrep_on(trx->mysql_thd) && - (err == DB_SUCCESS) && !referenced && - !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE && - ((upd_node_t*)parent)->cascade_node == node) && - foreign + if (trx && wsrep_on(trx->mysql_thd) && + err == DB_SUCCESS && !referenced && + (!parent || (que_node_get_type(parent) != QUE_NODE_UPDATE) || + ((upd_node_t*)parent)->cascade_upd_nodes->empty()) ) { err = wsrep_row_upd_check_foreign_constraints( node, pcur, index->table, index, offsets, thr, mtr); From 066374024484ca2266667f270edb54bfcaf3c2b6 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 25 Aug 2017 12:41:56 +0300 Subject: [PATCH 238/305] MW-402 cascading FK issues (5.5 version) copied the fix for MW-402 from mysql-wsrep-bugs/MW-402-5.6 (note, this is not git merge) --- storage/innobase/row/row0ins.c | 3 +-- storage/innobase/row/row0upd.c | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/storage/innobase/row/row0ins.c b/storage/innobase/row/row0ins.c index 3726c517ff0f..1cd3e9e7c74b 100644 --- a/storage/innobase/row/row0ins.c +++ b/storage/innobase/row/row0ins.c @@ -1086,8 +1086,7 @@ row_ins_foreign_check_on_constraint( foreign, clust_rec, clust_index, - FALSE, - (node) ? TRUE : FALSE); + FALSE, FALSE); if (err != DB_SUCCESS) { fprintf(stderr, "WSREP: foreign key append failed: %lu\n", err); diff --git a/storage/innobase/row/row0upd.c b/storage/innobase/row/row0upd.c index 83899ba1e4b3..be83ca20881b 100644 --- a/storage/innobase/row/row0upd.c +++ b/storage/innobase/row/row0upd.c @@ -2111,7 +2111,7 @@ row_upd_clust_rec_by_insert( } } #ifdef WITH_WSREP - if (!referenced && + if (wsrep_on(trx->mysql_thd) && !referenced && !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE && ((upd_node_t*)parent)->cascade_node == node) && foreign @@ -2317,6 +2317,7 @@ row_upd_del_mark_clust_rec( #ifdef WITH_WSREP rec_t* rec; que_node_t *parent = que_node_get_parent(node); + trx_t* trx = thr_get_trx(thr); #endif /* WITH_WSREP */ ut_ad(node); @@ -2352,11 +2353,10 @@ row_upd_del_mark_clust_rec( node, pcur, index->table, index, offsets, thr, mtr); } #ifdef WITH_WSREP - if (err == DB_SUCCESS && !referenced && + if (trx && wsrep_on(trx->mysql_thd) && + err == DB_SUCCESS && !referenced && foreign && !(parent && que_node_get_type(parent) == QUE_NODE_UPDATE && - ((upd_node_t*)parent)->cascade_node == node) && - thr_get_trx(thr) && - foreign + ((upd_node_t*)parent)->cascade_node == node) ) { err = wsrep_row_upd_check_foreign_constraints( node, pcur, index->table, index, offsets, thr, mtr); From 1c11a4bdc8d99b71849e0b7743f34f8f9580757a Mon Sep 17 00:00:00 2001 From: sjaakola Date: Mon, 28 Aug 2017 14:50:02 +0300 Subject: [PATCH 239/305] MW-402 cascading FK issues (5.7 version) Sanity fixes according to MariaDB fix (MDEV-13498 patch by Marko) --- storage/innobase/row/row0upd.cc | 49 +++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index a6b82876f213..adc1d1c03170 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -2460,13 +2460,16 @@ row_upd_sec_index_entry( err = DB_SUCCESS; break; case DB_DEADLOCK: - if (wsrep_debug) fprintf (stderr, - "WSREP: sec index FK check fail for deadlock"); + if (wsrep_debug) { + ib::warn() << "WSREP: sec index FK check fail for deadlock" + << " index " << index->name + << " table " << index->table->name; + } break; default: - fprintf (stderr, - "WSREP: referenced FK check fail: %d", - (int)err); + ib::error() << "WSREP: referenced FK check fail: " << ut_strerr(err) + << " index " << index->name + << " table " << index->table->name; break; } } @@ -2754,10 +2757,9 @@ row_upd_clust_rec_by_insert( } } #ifdef WITH_WSREP - if (wsrep_on(trx->mysql_thd) && - !referenced && foreign && - (!parent || (que_node_get_type(parent) != QUE_NODE_UPDATE) || - ((upd_node_t*)parent)->cascade_upd_nodes->empty()) + else if (wsrep_on(trx->mysql_thd) && foreign && + (!parent || (que_node_get_type(parent) != QUE_NODE_UPDATE) || + ((upd_node_t*)parent)->cascade_upd_nodes->empty()) ) { err = wsrep_row_upd_check_foreign_constraints( node, pcur, table, index, offsets, thr, mtr); @@ -2767,13 +2769,16 @@ row_upd_clust_rec_by_insert( err = DB_SUCCESS; break; case DB_DEADLOCK: - if (wsrep_debug) fprintf (stderr, - "WSREP: insert FK check fail for deadlock"); + if (wsrep_debug) { + ib::warn() << "WSREP: insert FK check fail for deadlock" + << " index " << index->name + << " table " << index->table->name; + } break; default: - fprintf (stderr, - "WSREP: referenced FK check fail: %d", - (int)err); + ib::error() << "WSREP: referenced FK check fail: " << ut_strerr(err) + << " index " << index->name + << " table " << index->table->name; break; } if (err != DB_SUCCESS) { @@ -2999,8 +3004,7 @@ row_upd_del_mark_clust_rec( node, pcur, index->table, index, offsets, thr, mtr); } #ifdef WITH_WSREP - if (trx && wsrep_on(trx->mysql_thd) && - err == DB_SUCCESS && !referenced && + else if (trx && wsrep_on(trx->mysql_thd) && err == DB_SUCCESS && (!parent || (que_node_get_type(parent) != QUE_NODE_UPDATE) || ((upd_node_t*)parent)->cascade_upd_nodes->empty()) ) { @@ -3012,13 +3016,16 @@ row_upd_del_mark_clust_rec( err = DB_SUCCESS; break; case DB_DEADLOCK: - if (wsrep_debug) fprintf (stderr, - "WSREP: clust rec FK check fail for deadlock"); + if (wsrep_debug) { + ib::warn() << "WSREP: clust rec FK check fail for deadlock" + << " index " << index->name + << " table " << index->table->name; + } break; default: - fprintf (stderr, - "WSREP: clust rec referenced FK check fail: %d", - (int)err); + ib::error() << "WSREP: referenced FK check fail: " << ut_strerr(err) + << " index " << index->name + << " table " << index->table->name; break; } } From 2fd4dae84862ecfe98ecdf361386adcaef5904c4 Mon Sep 17 00:00:00 2001 From: Piotr Obrzut Date: Mon, 28 Aug 2017 12:30:21 +0200 Subject: [PATCH 240/305] Bug #26501092 mysql server installer cannot detect that visual c++ 2010 is installed. (cherry picked from commit 816d1307409636655afee3424aa96451a4e22be2) --- packaging/WiX/mysql_server.wxs.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packaging/WiX/mysql_server.wxs.in b/packaging/WiX/mysql_server.wxs.in index 44849323e8ac..7b3cffb5a38e 100644 --- a/packaging/WiX/mysql_server.wxs.in +++ b/packaging/WiX/mysql_server.wxs.in @@ -79,8 +79,9 @@ @@ -90,8 +91,9 @@ From 68576765ab5caa6e284b6b1696853837c9d7ff24 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 10 Aug 2017 14:04:55 +0300 Subject: [PATCH 241/305] MW-399 Freeing wsrep_status_vars, before provider is released. This is needed to clear THD::wsrep_status_vars reference, which would otherwise remain to point to status variable array, which is no more effective. --- sql/wsrep_var.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index 1707fe33601e..f32561d5b601 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -299,6 +299,12 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type) wsrep_stop_replication(thd); mysql_mutex_lock(&LOCK_global_system_variables); + /* provider status variables are allocated in provider library + and need to freed here, otherwise a dangling reference to + wsrep_status_vars would remain in THD + */ + wsrep_free_status(thd); + wsrep_deinit(); char* tmp= strdup(wsrep_provider); // wsrep_init() rewrites provider From e95298221d74cea58b24e891813a58eeff330dde Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Tue, 5 Sep 2017 17:21:37 +0200 Subject: [PATCH 242/305] Galera MTR Tests: add galera related warnings to mtr_warnings.sql --- mysql-test/include/mtr_warnings.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index 6c3563d1b39d..ae1d6c74e865 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -287,6 +287,7 @@ INSERT INTO global_suppressions VALUES ("WSREP: gcs_caused\\(\\) returned -107 \\(Transport endpoint is not connected\\)"), ("WSREP: gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)"), ("Action message in non-primary configuration from member"), + ("SYNC message from member"), ("InnoDB: Resizing redo log from"), ("InnoDB: Starting to delete and rewrite log files"), ("InnoDB: New log files created, LSN="), From da5cef52ed6082b7f85e4e449a1db2749150685d Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 7 Sep 2017 16:45:21 +0300 Subject: [PATCH 243/305] MW-402 cascading FK issues, 5.6 version Added one more test scenario for two cascading parent tables --- mysql-test/suite/galera/r/MW-402.result | 44 +++++++++++++++++++- mysql-test/suite/galera/t/MW-402.test | 54 ++++++++++++++++++++++--- 2 files changed, 91 insertions(+), 7 deletions(-) diff --git a/mysql-test/suite/galera/r/MW-402.result b/mysql-test/suite/galera/r/MW-402.result index 4261bc6bac31..fdcf6e324b56 100644 --- a/mysql-test/suite/galera/r/MW-402.result +++ b/mysql-test/suite/galera/r/MW-402.result @@ -118,8 +118,10 @@ DROP TABLE c; DROP TABLE p; CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; -CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER, -CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE, +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) +ON DELETE CASCADE, CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); INSERT INTO p1 VALUES (1, 0); INSERT INTO p2 VALUES (1, 0); @@ -150,3 +152,41 @@ f1 p1_id p2_id f2 DROP TABLE c; DROP TABLE p1; DROP TABLE p2; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, +f2 INTEGER, +CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) +ON DELETE CASCADE, +CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1) +ON DELETE CASCADE); +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); +INSERT INTO c VALUES (1, 1, 1, 0); +SET AUTOCOMMIT=ON; +START TRANSACTION; +DELETE FROM p2 WHERE f1=1; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +DELETE FROM p1 WHERE f1=1; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p1; +f1 f2 +SELECT * FROM p2; +f1 f2 +1 0 +SELECT * FROM c; +f1 p1_id p2_id f2 +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; diff --git a/mysql-test/suite/galera/t/MW-402.test b/mysql-test/suite/galera/t/MW-402.test index 5713cda52824..80f368b50c88 100644 --- a/mysql-test/suite/galera/t/MW-402.test +++ b/mysql-test/suite/galera/t/MW-402.test @@ -137,7 +137,6 @@ SELECT * FROM c; DROP TABLE c; DROP TABLE p; - # # CASCADE DELETE tests with two parent tables # Here we cause cascaded operation on child table through @@ -153,10 +152,11 @@ DROP TABLE p; CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; -CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER, - CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE, +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) + ON DELETE CASCADE, CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); - INSERT INTO p1 VALUES (1, 0); INSERT INTO p2 VALUES (1, 0); @@ -173,7 +173,51 @@ INSERT INTO c VALUES (1, 1, 1, 0); --connection node_1 --reap -# same as previous, but statements in different order +--connection node_2 +SELECT * FROM p1; +SELECT * FROM p2; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; + +# +# CASCADE DELETE tests with two parent tables +# Here we cause cascaded operation on child table through +# one parent table and issue other delete operation through the +# other parent table. The cascade progresses to same child table row where +# we should see the conflict to happen +# +# As a result, the update on p2 should fail +# +--connection node_1 + +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, + f2 INTEGER, + CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) + ON DELETE CASCADE, + CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1) + ON DELETE CASCADE); + +INSERT INTO p1 VALUES (1, 0); +INSERT INTO p2 VALUES (1, 0); + +INSERT INTO c VALUES (1, 1, 1, 0); + +--let $mw_369_parent_query = DELETE FROM p2 WHERE f1=1 +--let $mw_369_child_query = DELETE FROM p1 WHERE f1=1 + +--connection node_1a +--source MW-369.inc + +# Commit succeeds +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + --connection node_2 SELECT * FROM p1; SELECT * FROM p2; From f92e67251acf9e23592b255536129567facc8f3d Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 8 Sep 2017 11:36:03 +0300 Subject: [PATCH 244/305] MW-402 cascading FK issues, 5.7 edition There were unresolved merge conflicts in mtr test, resolved now --- mysql-test/suite/galera/r/MW-402.result | 8 -------- mysql-test/suite/galera/t/MW-402.test | 15 --------------- 2 files changed, 23 deletions(-) diff --git a/mysql-test/suite/galera/r/MW-402.result b/mysql-test/suite/galera/r/MW-402.result index c73acb6d9d4f..fdcf6e324b56 100644 --- a/mysql-test/suite/galera/r/MW-402.result +++ b/mysql-test/suite/galera/r/MW-402.result @@ -118,15 +118,10 @@ DROP TABLE c; DROP TABLE p; CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; -<<<<<<< HEAD -CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER, -CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE, -======= CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER, CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE, ->>>>>>> MW-402-5.6 CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); INSERT INTO p1 VALUES (1, 0); INSERT INTO p2 VALUES (1, 0); @@ -157,8 +152,6 @@ f1 p1_id p2_id f2 DROP TABLE c; DROP TABLE p1; DROP TABLE p2; -<<<<<<< HEAD -======= CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, @@ -197,4 +190,3 @@ f1 p1_id p2_id f2 DROP TABLE c; DROP TABLE p1; DROP TABLE p2; ->>>>>>> MW-402-5.6 diff --git a/mysql-test/suite/galera/t/MW-402.test b/mysql-test/suite/galera/t/MW-402.test index 437d76a8de5a..80f368b50c88 100644 --- a/mysql-test/suite/galera/t/MW-402.test +++ b/mysql-test/suite/galera/t/MW-402.test @@ -137,10 +137,6 @@ SELECT * FROM c; DROP TABLE c; DROP TABLE p; -<<<<<<< HEAD - -======= ->>>>>>> MW-402-5.6 # # CASCADE DELETE tests with two parent tables # Here we cause cascaded operation on child table through @@ -156,18 +152,11 @@ DROP TABLE p; CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; -<<<<<<< HEAD -CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER, - CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE, - CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); - -======= CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER, CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE, CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)); ->>>>>>> MW-402-5.6 INSERT INTO p1 VALUES (1, 0); INSERT INTO p2 VALUES (1, 0); @@ -184,9 +173,6 @@ INSERT INTO c VALUES (1, 1, 1, 0); --connection node_1 --reap -<<<<<<< HEAD -# same as previous, but statements in different order -======= --connection node_2 SELECT * FROM p1; SELECT * FROM p2; @@ -232,7 +218,6 @@ INSERT INTO c VALUES (1, 1, 1, 0); --error ER_LOCK_DEADLOCK --reap ->>>>>>> MW-402-5.6 --connection node_2 SELECT * FROM p1; SELECT * FROM p2; From 9820475fb46d7458f120a530f07121e98e30f509 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 8 Sep 2017 11:29:15 +0200 Subject: [PATCH 245/305] MW-376 MTR: fix waiting for wsrep ready on server startup There were a couple of flaws in the way that mysql-test-run.pl was checking if wsrep is ready to accept queries from clients. Essentially, it was working like this: At server startup, try to execute query "SELECT @@wsrep_ready", using function run_query(). And retry until run_query() returns 1. First problem was that SELECT @@wsrep_ready is not correct, because wsrep_ready is a status variable, not a global variable. So issuing "SELECT @@wsrep_ready" always results with mysql returning an error. Second problem was that run_query() returns the exit code of the mysql client, rather than the result of query itself. And the mysql client returns code 0 if no errors were encountered, otherwise it return exit code 1. Since "SELECT @@wsrep_ready" always returns an error, the above logic would just return immediately after the first try. Essentially the above logic would just submit an incorrect query and then continue, with the assumption that wsrep was ready. Occasionally leading to error "1047: WSREP has not yet prepared node for application use". The patch changes the above logic, so that it retrieves the actual value of wsrep_ready from information schema. The fixed version also includes some sleep time before retrying. --- mysql-test/mysql-test-run.pl | 65 +++++++++++++++++++++++++++++------- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index effc86fcb491..1b6617648287 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3809,20 +3809,60 @@ sub run_query { } -sub sleep_until_returns_true($$$) { - my ($tinfo, $mysqld, $query)= @_; +sub run_query_output { + my ($mysqld, $query, $outfile)= @_; + + my $args; + mtr_init_args(\$args); + mtr_add_arg($args, "--defaults-file=%s", $path_config_file); + mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld')); + + mtr_add_arg($args, "-s"); + mtr_add_arg($args, "-e %s", $query); + + my $res= My::SafeProcess->run + ( + name => "run_query_output -> ".$mysqld->name(), + path => $exe_mysql, + args => \$args, + output => $outfile, + error => $outfile + ); + + return $res +} + + +sub wait_wsrep_ready($$) { + my ($tinfo, $mysqld)= @_; - my $timeout = $opt_start_timeout; my $sleeptime= 100; # Milliseconds - my $loops= ($timeout * 1000) / $sleeptime; + my $loops= ($opt_start_timeout * 1000) / $sleeptime; + + my $name= $mysqld->name(); + my $outfile= "$opt_vardir/tmp/$name.wsrep_ready"; + my $query= "SELECT VARIABLE_VALUE + FROM INFORMATION_SCHEMA.GLOBAL_STATUS + WHERE VARIABLE_NAME = 'wsrep_ready'"; + + for (my $loop= 1; $loop <= $loops; $loop++) + { + if (run_query_output($mysqld, $query, $outfile) != 0) + { + $tinfo->{logfile}= "WSREP error while trying to determine node state"; + return 1; + } - for ( my $loop= 1; $loop <= $loops; $loop++ ) { - my $query_result = run_query($tinfo, $mysqld, $query); - if (run_query($tinfo, $mysqld, $query) == 1) { + if (mtr_grab_file($outfile) =~ /^ON/) + { + unlink($outfile); return 0; } + + mtr_milli_sleep($sleeptime); } - + + $tinfo->{logfile}= "WSREP did not transition to state READY"; return 1; } @@ -5873,10 +5913,11 @@ ($) return 1; } - if (have_wsrep()) { - if(sleep_until_returns_true($tinfo, $mysqld, 'SELECT @@wsrep_ready')) { - $tinfo->{logfile}= "WSREP did not transition to state READY"; - return 1; + if (have_wsrep()) + { + if (wait_wsrep_ready($tinfo, $mysqld)) + { + return 1; } } } From edb0256253b0ecaf19d434eed593d987f72283c7 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Mon, 11 Sep 2017 18:12:33 +0200 Subject: [PATCH 246/305] MW-376 Cosmetic changes --- mysql-test/mysql-test-run.pl | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 1b6617648287..a5312e28c891 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3817,8 +3817,8 @@ sub run_query_output { mtr_add_arg($args, "--defaults-file=%s", $path_config_file); mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld')); - mtr_add_arg($args, "-s"); - mtr_add_arg($args, "-e %s", $query); + mtr_add_arg($args, "--silent"); + mtr_add_arg($args, "--execute=%s", $query); my $res= My::SafeProcess->run ( @@ -3850,20 +3850,20 @@ ($$) if (run_query_output($mysqld, $query, $outfile) != 0) { $tinfo->{logfile}= "WSREP error while trying to determine node state"; - return 1; + return 0; } if (mtr_grab_file($outfile) =~ /^ON/) { unlink($outfile); - return 0; + return 1; } mtr_milli_sleep($sleeptime); } $tinfo->{logfile}= "WSREP did not transition to state READY"; - return 1; + return 0; } @@ -5913,12 +5913,9 @@ ($) return 1; } - if (have_wsrep()) + if (have_wsrep() && !wait_wsrep_ready($tinfo, $mysqld)) { - if (wait_wsrep_ready($tinfo, $mysqld)) - { - return 1; - } + return 1; } } From 2b81c707edb60ca506bf083b249f630188150cf3 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Thu, 7 Sep 2017 17:39:30 +0300 Subject: [PATCH 247/305] Remove unaligned decorative /*===*/ and fix some whitespace errors --- storage/innobase/handler/ha_innodb.cc | 81 ++++++++++++--------------- 1 file changed, 37 insertions(+), 44 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 532322bff18b..a3f3366c30a8 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -1513,8 +1513,8 @@ innobase_release_temporary_latches( } #ifdef WITH_WSREP -static int -wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd, +static int +wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd, my_bool signal); static void wsrep_fake_trx_id(handlerton* hton, THD *thd); @@ -5397,7 +5397,6 @@ get_field_offset( UNIV_INTERN int wsrep_innobase_mysql_sort( -/*===============*/ /* out: str contains sort string */ int mysql_type, /* in: MySQL type */ uint charset_number, /* in: number of the charset */ @@ -6015,7 +6014,6 @@ Stores a key value for a row to a buffer. UNIV_INTERN uint wsrep_store_key_val_for_row( -/*===============================*/ THD* thd, TABLE* table, uint keynr, /*!< in: key number */ @@ -6027,7 +6025,7 @@ wsrep_store_key_val_for_row( { KEY* key_info = table->key_info + keynr; KEY_PART_INFO* key_part = key_info->key_part; - KEY_PART_INFO* end = + KEY_PART_INFO* end = key_part + key_info->user_defined_key_parts; char* buff_start = buff; enum_field_types mysql_type; @@ -6046,7 +6044,7 @@ wsrep_store_key_val_for_row( if (key_part->null_bit) { if (buff_space > 0) { - if (record[key_part->null_offset] + if (record[key_part->null_offset] & key_part->null_bit) { *buff = 1; part_is_null = TRUE; @@ -7511,7 +7509,6 @@ ha_innobase::write_row( static int wsrep_calc_row_hash( -/*================*/ byte* digest, /*!< in/out: md5 sum */ const uchar* row, /*!< in: row in MySQL format */ TABLE* table, /*!< in: table in MySQL data @@ -9258,18 +9255,17 @@ wsrep_dict_foreign_find_index( extern dberr_t wsrep_append_foreign_key( -/*===========================*/ trx_t* trx, /*!< in: trx */ dict_foreign_t* foreign, /*!< in: foreign key constraint */ - const rec_t* rec, /*!mysql_thd; - int rcode = 0; - char cache_key[513] = {'\0'}; - int cache_key_len; + const rec_t* rec, /*!< in: clustered index record */ + dict_index_t* index, /*!< in: clustered index */ + ibool referenced, /*!< in: is check for referenced table */ + ibool shared) /*!< in: is shared access */ +{ + THD* thd = (THD*)trx->mysql_thd; + int rcode = 0; + char cache_key[513] = {'\0'}; + int cache_key_len; bool const copy = true; ut_a(trx); @@ -9307,7 +9303,7 @@ wsrep_append_foreign_key( wsrep_dict_foreign_find_index( foreign->referenced_table, NULL, foreign->referenced_col_names, - foreign->n_fields, + foreign->n_fields, foreign->foreign_index, TRUE, FALSE); } @@ -9324,14 +9320,14 @@ wsrep_append_foreign_key( foreign->foreign_table, NULL, foreign->foreign_col_names, foreign->n_fields, - foreign->referenced_index, + foreign->referenced_index, TRUE, FALSE); } } mutex_exit(&(dict_sys->mutex)); } - if ( !((referenced) ? + if (!((referenced) ? foreign->referenced_table : foreign->foreign_table)) { WSREP_WARN("FK: %s missing in query: %s", @@ -9432,7 +9428,6 @@ wsrep_append_foreign_key( static int wsrep_append_key( -/*==================*/ THD *thd, trx_t *trx, TABLE_SHARE *table_share, @@ -9509,7 +9504,6 @@ wsrep_is_FK_index(dict_table_t* table, int ha_innobase::wsrep_append_keys( -/*==================*/ THD *thd, bool shared, const uchar* record0, /* in: row in MySQL format */ @@ -9522,10 +9516,10 @@ ha_innobase::wsrep_append_keys( trx_t *trx = thd_to_trx(thd); if (table_share && table_share->tmp_table != NO_TMP_TABLE) { - WSREP_DEBUG("skipping tmp table DML: THD: %lu tmp: %d SQL: %s", + WSREP_DEBUG("skipping tmp table DML: THD: %lu tmp: %d SQL: %s", wsrep_thd_thread_id(thd), table_share->tmp_table, - (wsrep_thd_query(thd)) ? + (wsrep_thd_query(thd)) ? wsrep_thd_query(thd) : "void"); DBUG_RETURN(0); } @@ -9537,18 +9531,18 @@ ha_innobase::wsrep_append_keys( ibool is_null; len = wsrep_store_key_val_for_row( - thd, table, 0, key, WSREP_MAX_SUPPORTED_KEY_LENGTH, + thd, table, 0, key, WSREP_MAX_SUPPORTED_KEY_LENGTH, record0, &is_null); if (!is_null) { rcode = wsrep_append_key( - thd, trx, table_share, table, keyval, + thd, trx, table_share, table, keyval, len, shared); if (rcode) DBUG_RETURN(rcode); } else { - WSREP_DEBUG("NULL key skipped (proto 0): %s", + WSREP_DEBUG("NULL key skipped (proto 0): %s", wsrep_thd_query(thd)); } } else { @@ -9580,22 +9574,22 @@ ha_innobase::wsrep_append_keys( if (!tab) { WSREP_WARN("MySQL-InnoDB key mismatch %s %s", - table->s->table_name.str, + table->s->table_name.str, key_info->name); } - /* !hasPK == table with no PK, + /* !hasPK == table with no PK, must append all non-unique keys */ if (!hasPK || key_info->flags & HA_NOSAME || ((tab && wsrep_is_FK_index(tab, idx)) || (!tab && referenced_by_foreign_key()))) { len = wsrep_store_key_val_for_row( - thd, table, i, key0, - WSREP_MAX_SUPPORTED_KEY_LENGTH, + thd, table, i, key0, + WSREP_MAX_SUPPORTED_KEY_LENGTH, record0, &is_null); if (!is_null) { rcode = wsrep_append_key( - thd, trx, table_share, table, + thd, trx, table_share, table, keyval0, len+1, shared); if (rcode) DBUG_RETURN(rcode); @@ -9604,18 +9598,18 @@ ha_innobase::wsrep_append_keys( } else { - WSREP_DEBUG("NULL key skipped: %s", + WSREP_DEBUG("NULL key skipped: %s", wsrep_thd_query(thd)); } if (record1) { len = wsrep_store_key_val_for_row( - thd, table, i, key1, + thd, table, i, key1, WSREP_MAX_SUPPORTED_KEY_LENGTH, record1, &is_null); if (!is_null && memcmp(key0, key1, len)) { rcode = wsrep_append_key( - thd, trx, table_share, - table, + thd, trx, table_share, + table, keyval1, len+1, shared); if (rcode) DBUG_RETURN(rcode); } @@ -9630,8 +9624,8 @@ ha_innobase::wsrep_append_keys( int rcode; wsrep_calc_row_hash(digest, record0, table, prebuilt, thd); - if ((rcode = wsrep_append_key(thd, trx, table_share, table, - (const char*) digest, 16, + if ((rcode = wsrep_append_key(thd, trx, table_share, table, + (const char*) digest, 16, shared))) { DBUG_RETURN(rcode); } @@ -9639,9 +9633,9 @@ ha_innobase::wsrep_append_keys( if (record1) { wsrep_calc_row_hash( digest, record1, table, prebuilt, thd); - if ((rcode = wsrep_append_key(thd, trx, table_share, + if ((rcode = wsrep_append_key(thd, trx, table_share, table, - (const char*) digest, + (const char*) digest, 16, shared))) { DBUG_RETURN(rcode); } @@ -17282,11 +17276,11 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, break; } wsrep_thd_UNLOCK(thd); - + DBUG_RETURN(0); } -static int -wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd, +static int +wsrep_abort_transaction(handlerton* hton, THD *bf_thd, THD *victim_thd, my_bool signal) { DBUG_ENTER("wsrep_innobase_abort_thd"); @@ -17343,7 +17337,6 @@ static int innobase_wsrep_get_checkpoint(handlerton* hton, XID* xid) static void wsrep_fake_trx_id( -/*==================*/ handlerton *hton, THD *thd) /*!< in: user thread handle */ { From 5ac61b2af0cf37eeed5050a91819d6d273f037a5 Mon Sep 17 00:00:00 2001 From: Anushree Prakash B Date: Fri, 8 Sep 2017 18:29:07 +0530 Subject: [PATCH 248/305] Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASH DESCRIPTION: =========== The bug is related to incorrect parsing of SQL queries when typed in on the CLI. The incorrect parsing can result in unexpected results. ANALYSIS: ======== The scenarios mainly happens for identifier names with a typical combination of backslashes and backticks. The incorrect parsing can either result in executing additional queries or can result in query truncation. This can impact mysqldump as well. FIX: === The fix makes sure that such identifier names are correctly parsed and a proper query is sent to the server for execution. (cherry picked from commit 31a372aa1c2b93dc75267d1f05a7f7fca6080dc0) --- client/mysql.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index d09499c120a3..715d74f18b2f 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2119,7 +2119,10 @@ static bool add_line(String &buffer,char *line,char *in_string, if (*in_string || inchar == 'N') // \N is short for NULL { // Don't allow commands in string *out++='\\'; - *out++= (char) inchar; + if ((inchar == '`') && (*in_string == inchar)) + pos--; + else + *out++= (char) inchar; continue; } if ((com=find_command(NullS,(char) inchar))) From 1da916c37e5107b27297fc9e22c3da7772bb097d Mon Sep 17 00:00:00 2001 From: "mysql-builder@oracle.com" <> Date: Wed, 13 Sep 2017 12:14:06 +0530 Subject: [PATCH 249/305] From 955b65ce92359548ff7c4c3c7327d2330cbda2c5 Mon Sep 17 00:00:00 2001 From: Anushree Prakash B Date: Fri, 8 Sep 2017 18:30:57 +0530 Subject: [PATCH 250/305] Merge branch 'mysql-5.5' into mysql-5.6 (cherry picked from commit c25e5c808ba2957db29a319acd4751bf74864584) --- client/mysql.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index 71fba6a9d9da..dc4c3d03e09b 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2400,7 +2400,10 @@ static bool add_line(String &buffer, char *line, ulong line_length, if (*in_string || inchar == 'N') // \N is short for NULL { // Don't allow commands in string *out++='\\'; - *out++= (char) inchar; + if ((inchar == '`') && (*in_string == inchar)) + pos--; + else + *out++= (char) inchar; continue; } if ((com= find_command((char) inchar))) From 38e2b4d1fe7564b8e1a0d0f0eeb7f542d0d534b6 Mon Sep 17 00:00:00 2001 From: "mysql-builder@oracle.com" <> Date: Wed, 13 Sep 2017 12:17:36 +0530 Subject: [PATCH 251/305] From 70129d99e8987c31177ca07aea581fb2a7221d54 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Thu, 14 Sep 2017 11:55:28 +0200 Subject: [PATCH 252/305] MW-405 Restore file wait_until_connected_again.inc Our changes to mysql-test/include/wait_until_connected_again.inc are not effective. This patch restores the original file contents. --- .../include/wait_until_connected_again.inc | 35 +++++++------------ 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/mysql-test/include/wait_until_connected_again.inc b/mysql-test/include/wait_until_connected_again.inc index c45917e7776c..c7bb774929a6 100644 --- a/mysql-test/include/wait_until_connected_again.inc +++ b/mysql-test/include/wait_until_connected_again.inc @@ -1,34 +1,23 @@ # # Include this script to wait until the connection to the # server has been restored or timeout occurs - -# -# We require two consequtive connection successes in order to -# work around a race condition on Galera startup where the server -# can temporarily accept queries before starting to reject them again -# - --disable_result_log --disable_query_log -let $counter= 1200; +let $counter= 500; let $mysql_errno= 9999; -let $successes= 2; - -while ($successes) { - while ($mysql_errno) { - # Strangely enough, the server might return "Too many connections" - # while being shutdown, thus 1040 is an "allowed" error - # See BUG#36228 - --error 0,1040,1047,1053,1205,2002,2003,2006,2013,1205 - show status; +while ($mysql_errno) +{ + # Strangely enough, the server might return "Too many connections" + # while being shutdown, thus 1040 is an "allowed" error + # See BUG#36228 + --error 0,1040,1053,2002,2003,2006,2013 + show status; - --dec $counter - if (!$counter) { - --die Server failed to restart - } - --sleep 0.1 + dec $counter; + if (!$counter) + { + --die Server failed to restart } - --dec $successes --sleep 0.1 } --enable_query_log From c566fe65a751a5f18a6f1e96fa55f67de278e6b8 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Thu, 14 Sep 2017 13:46:34 +0200 Subject: [PATCH 253/305] MW-405 Make sure wsrep is ready in wait_until_connected_again.inc wait_until_connected_again issues 'SHOW STATUS' query repeatedly until mysqld replies without errors. However, SHOW STATUS is treated specially by wsrep in that it is allowed to proceed even if wsrep is not yet in ready state. As a consequence, after returning from wait_until_connected_again, wsrep may not be ready yet and subsequent queries may fail with error "1047 WSREP has not yet prepared node for application use". To avoid those errors, the patch includes wait_wsrep_ready.inc at the end of the wait_until_connected_again. --- mysql-test/include/restart_mysqld.inc | 3 --- mysql-test/include/start_mysqld.inc | 3 --- mysql-test/include/wait_until_connected_again.inc | 11 ++++++++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/mysql-test/include/restart_mysqld.inc b/mysql-test/include/restart_mysqld.inc index 140472b9283d..7cb9c7994d8f 100644 --- a/mysql-test/include/restart_mysqld.inc +++ b/mysql-test/include/restart_mysqld.inc @@ -26,9 +26,6 @@ shutdown_server 10; # Call script that will poll the server waiting for it to be back online again --source include/wait_until_connected_again.inc -# Wait for wsrep ---source include/wait_wsrep_ready.inc - # Turn off reconnect again --disable_reconnect diff --git a/mysql-test/include/start_mysqld.inc b/mysql-test/include/start_mysqld.inc index baa79bec1fd7..4ee3d17810cb 100644 --- a/mysql-test/include/start_mysqld.inc +++ b/mysql-test/include/start_mysqld.inc @@ -18,8 +18,5 @@ if ($galera_wsrep_start_position == '') { # Call script that will poll the server waiting for it to be back online again --source include/wait_until_connected_again.inc -# Wait for wsrep ---source include/wait_wsrep_ready.inc - # Turn off reconnect again --disable_reconnect diff --git a/mysql-test/include/wait_until_connected_again.inc b/mysql-test/include/wait_until_connected_again.inc index c7bb774929a6..1e93009d1a1b 100644 --- a/mysql-test/include/wait_until_connected_again.inc +++ b/mysql-test/include/wait_until_connected_again.inc @@ -10,7 +10,10 @@ while ($mysql_errno) # Strangely enough, the server might return "Too many connections" # while being shutdown, thus 1040 is an "allowed" error # See BUG#36228 - --error 0,1040,1053,2002,2003,2006,2013 + + # WSREP: allow error 1205, as SHOW STATUS may fail if + # wsrep_sync_wait is enabled + --error 0,1040,1053,1205,2002,2003,2006,2013 show status; dec $counter; @@ -22,3 +25,9 @@ while ($mysql_errno) } --enable_query_log --enable_result_log + +# WSREP: SHOW STATUS queries are allowed even if wsrep +# is not ready. Make sure wsrep is ready before +# returning from this script + +--source include/wait_wsrep_ready.inc From 9e6d0c41b63fc4cfb6df7285bd7ebaa7e9e25928 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Thu, 14 Sep 2017 11:48:50 +0200 Subject: [PATCH 254/305] MW-405 Remove redundant conditions Remove clause on `thd->variables.wsrep_on` in the following code: if (WSREP(thd)) { ... if (thd->variables.wsrep_on && ... In the above snippet, `WSREP(thd)` already ensures thd->variables.wsrep_on --- sql/sql_parse.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 4ef067dac097..f5d53844398d 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1132,15 +1132,16 @@ bool do_command(THD *thd) command_name[command].str)); #ifdef WITH_WSREP - if (WSREP(thd)) { + if (WSREP(thd)) + { /* * bail out if DB snapshot has not been installed. We however, * allow queries "SET" and "SHOW", they are trapped later in execute_command */ - if (thd->variables.wsrep_on && !thd->wsrep_applier && + if (!thd->wsrep_applier && (!wsrep_ready_get() || wsrep_reject_queries != WSREP_REJECT_NONE) && - (server_command_flags[command] & CF_SKIP_WSREP_CHECK) == 0 - ) { + (server_command_flags[command] & CF_SKIP_WSREP_CHECK) == 0) + { my_message(ER_UNKNOWN_COM_ERROR, "WSREP has not yet prepared node for application use", MYF(0)); thd->protocol->end_statement(); @@ -2842,7 +2843,8 @@ mysql_execute_command(THD *thd) Opt_trace_object trace_command(&thd->opt_trace); Opt_trace_array trace_command_steps(&thd->opt_trace, "steps"); #ifdef WITH_WSREP - if (WSREP(thd)) { + if (WSREP(thd)) + { /* change LOCK TABLE WRITE to transaction */ @@ -2871,8 +2873,7 @@ mysql_execute_command(THD *thd) * allow SET and SHOW queries and reads from information schema * and dirty reads (if configured) */ - if (thd->variables.wsrep_on && - !thd->wsrep_applier && + if (!thd->wsrep_applier && !(wsrep_ready_get() && wsrep_reject_queries == WSREP_REJECT_NONE) && !(thd->variables.wsrep_dirty_reads && (sql_command_flags[lex->sql_command] & CF_CHANGES_DATA) == 0) && From c4a56a1c51d7592e9576dc39ba9f583493abbe18 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Thu, 14 Sep 2017 16:54:53 +0200 Subject: [PATCH 255/305] MW-405 Adjust galera_pc_weight to new wait_until_connected_again Test galera_3nodes.galera_pc_weight started to fail because it expects to use wait_until_connected_again while remaining in non-primary view. Hopefully this is the only test which makes this assumption, and fortunately those wait_until_connected_again seem unnecessary, so this patch removes them. --- mysql-test/suite/galera_3nodes/t/galera_pc_weight.test | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test index c118b7481bca..d69881aa5ebf 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test +++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test @@ -9,16 +9,12 @@ --connection node_1 SET GLOBAL wsrep_provider_options = 'pc.weight=3'; - ---source include/wait_until_connected_again.inc --source include/galera_suspend.inc --sleep 10 --connection node_2 # Do not wait for causality as we are no longer in the primary component SET SESSION wsrep_sync_wait=0; ---source include/wait_until_connected_again.inc - SET SESSION wsrep_on=OFF; --let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status' --source include/wait_condition.inc @@ -39,7 +35,6 @@ SHOW STATUS LIKE 'wsrep_local_state_comment'; --source include/galera_connect.inc --connection node_3 SET SESSION wsrep_sync_wait=0; ---source include/wait_until_connected_again.inc SHOW STATUS LIKE 'wsrep_cluster_size'; SHOW STATUS LIKE 'wsrep_cluster_status'; From aecba6fbc1bee9348979da1df79ce1005dbbddd7 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 15 Sep 2017 11:09:02 +0200 Subject: [PATCH 256/305] MW-405 Re-record tests that changed due to wait_until_connected_again Tests query_cache_size_functionality and query_cache_type_functionality perform a restart and then checks the exact number of queries that were not cached by query cache (QCache_not_cached counter) since the restart. This includes the queries made by wait_until_connected_again, which have increased. Re-recorded the tests to account for the changes in wait_until_connected_again. --- mysql-test/r/query_cache_size_functionality.result | 14 +++++++------- mysql-test/r/query_cache_type_functionality.result | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mysql-test/r/query_cache_size_functionality.result b/mysql-test/r/query_cache_size_functionality.result index 87bb0391b27f..7563b3e61eb8 100644 --- a/mysql-test/r/query_cache_size_functionality.result +++ b/mysql-test/r/query_cache_size_functionality.result @@ -112,7 +112,7 @@ variable_value 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -17 +19 17 Expected select 1 from tab1 limit 1; 1 @@ -132,7 +132,7 @@ variable_value 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -22 +24 22 Expected select 1 from tab1 limit 2; 1 @@ -153,7 +153,7 @@ variable_value 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -27 +29 27 Expected # Restart server with query_cache_type ON select 1 from tab1 limit 1; @@ -174,7 +174,7 @@ variable_value 1 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -8 +10 8 Expected select 1 from tab1 limit 2; 1 @@ -195,7 +195,7 @@ variable_value 2 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -12 +14 12 Expected select 1 from tab1 limit 1; 1 @@ -215,12 +215,12 @@ variable_value 2 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -16 +18 16 Expected # opening another client session select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -17 +19 17 Expected #cleanup DROP TABLE IF EXISTS tab1; diff --git a/mysql-test/r/query_cache_type_functionality.result b/mysql-test/r/query_cache_type_functionality.result index 81d8f7ad853e..134d8c3a066a 100644 --- a/mysql-test/r/query_cache_type_functionality.result +++ b/mysql-test/r/query_cache_type_functionality.result @@ -136,7 +136,7 @@ variable_value 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -25 +27 25 Expected select 1 from tab1 limit 1; 1 @@ -156,7 +156,7 @@ variable_value 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -30 +32 30 Expected select 1 from tab1 limit 2; 1 @@ -177,7 +177,7 @@ variable_value 0 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -35 +37 35 Expected # Restart server with query_cache_type ON select 1 from tab1 limit 1; @@ -198,7 +198,7 @@ variable_value 1 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -8 +10 8 Expected select 1 from tab1 limit 2; 1 @@ -219,7 +219,7 @@ variable_value 2 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -12 +14 12 Expected select 1 from tab1 limit 1; 1 @@ -239,12 +239,12 @@ variable_value 2 Expected select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -16 +18 16 Expected # opening another client session select variable_value from information_schema.global_status where variable_name ='Qcache_not_cached'; variable_value -17 +19 17 Expected #cleanup DROP TABLE IF EXISTS tab1; From 11803938dc4c11162f0587c8a29eeb3a91cb9c37 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 15 Sep 2017 11:23:22 +0200 Subject: [PATCH 257/305] Re-enable test galera.galera_flush_local Test galera.galera_flush_local was disabled due to MW-340, which is now fixed. But test the test was not enabled again. --- mysql-test/suite/galera/t/disabled.def | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/suite/galera/t/disabled.def b/mysql-test/suite/galera/t/disabled.def index 3e8f701b4b33..64ad3d214fc3 100644 --- a/mysql-test/suite/galera/t/disabled.def +++ b/mysql-test/suite/galera/t/disabled.def @@ -6,4 +6,3 @@ galera.galera_fk_multitable : fails due to Oracle bug http://bugs.mysql.com/bug. galera.galera_as_slave_replication_bundle : GCF-912 feature no longer works in 5.7 galera_sst_xtrabackup-v2-options : fails in multiple ways, including xtrabackup crash mysql-wsrep#216 : GCF-1021 5.7 Regression: obfuscated passwords not consistent in error logs -galera_flush_local : MW-340 5.7: Assertion `thd->ha_data[wsrep_hton->slot].ha_info[all].is_trx_read_write()' failed From fcedaf2eacbe8f84442ded2fbc18fc8b914a8eb3 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 15 Sep 2017 11:38:00 +0200 Subject: [PATCH 258/305] MW-405 Remove redundant wait_wsrep_ready kill_and_restart_mysqld.inc includes wait_wsrep_ready.inc right after wait_until_connected_again.inc. This is redundant as wait_until_connected_again already includes wait_wsrep_ready. --- mysql-test/include/kill_and_restart_mysqld.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/include/kill_and_restart_mysqld.inc b/mysql-test/include/kill_and_restart_mysqld.inc index f0315dd292fa..b67fb7350b4f 100644 --- a/mysql-test/include/kill_and_restart_mysqld.inc +++ b/mysql-test/include/kill_and_restart_mysqld.inc @@ -12,5 +12,4 @@ if (!$restart_parameters) --source include/wait_until_disconnected.inc --enable_reconnect --source include/wait_until_connected_again.inc ---source include/wait_wsrep_ready.inc --disable_reconnect From e5dae0f5a80aae744b5d301ae3680fe099bb10b9 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 15 Sep 2017 16:56:36 +0200 Subject: [PATCH 259/305] MW-405 Remove wait_until_connected_again.inc from kill_galera.inc kill_galera.inc can no longer rely on wait_until_connected_again.inc. This is because wait_until_connected_again now tries to make sure that the server it is connected eventually transition to ready state. Whereas some tests may need to kill galera while the server is in a non-primary view. --- mysql-test/include/kill_galera.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/include/kill_galera.inc b/mysql-test/include/kill_galera.inc index c61bad8e19d3..d7f665df6c75 100644 --- a/mysql-test/include/kill_galera.inc +++ b/mysql-test/include/kill_galera.inc @@ -1,7 +1,6 @@ --echo Killing server ... # Write file to make mysql-test-run.pl expect the crash, but don't start it ---source include/wait_until_connected_again.inc --let $_server_id= `SELECT @@server_id` --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect --exec echo "wait" > $_expect_file_name From 6d17a37be204cd42d6b647215498b55a171a2e3f Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 18 Sep 2017 16:09:07 +0300 Subject: [PATCH 260/305] MW-406 Updated manpages for 5.5 --- man/comp_err.1 | 4 +- man/innochecksum.1 | 4 +- man/msql2mysql.1 | 4 +- man/my_print_defaults.1 | 4 +- man/myisam_ftdump.1 | 4 +- man/myisamchk.1 | 4 +- man/myisamlog.1 | 4 +- man/myisampack.1 | 4 +- man/mysql-stress-test.pl.1 | 4 +- man/mysql-test-run.pl.1 | 4 +- man/mysql.1 | 27 +- man/mysql.server.1 | 209 ++++++--- man/mysql_client_test.1 | 4 +- man/mysql_config.1 | 4 +- man/mysql_convert_table_format.1 | 6 +- man/mysql_find_rows.1 | 4 +- man/mysql_fix_extensions.1 | 4 +- man/mysql_install_db.1 | 4 +- man/mysql_plugin.1 | 4 +- man/mysql_secure_installation.1 | 4 +- man/mysql_setpermission.1 | 6 +- man/mysql_tzinfo_to_sql.1 | 4 +- man/mysql_upgrade.1 | 4 +- man/mysql_waitpid.1 | 4 +- man/mysql_zap.1 | 4 +- man/mysqlaccess.1 | 4 +- man/mysqladmin.1 | 6 +- man/mysqlbinlog.1 | 20 +- man/mysqlbug.1 | 4 +- man/mysqlcheck.1 | 6 +- man/mysqld.8 | 4 +- man/mysqld_multi.1 | 6 +- man/mysqld_safe.1 | 4 +- man/mysqldump.1 | 10 +- man/mysqldumpslow.1 | 4 +- man/mysqlhotcopy.1 | 4 +- man/mysqlimport.1 | 6 +- man/mysqlshow.1 | 6 +- man/mysqlslap.1 | 6 +- man/mysqltest.1 | 10 +- man/ndb-common-options.1 | 286 +++++++++---- man/ndb_blob_tool.1 | 18 +- man/ndb_config.1 | 702 ++++++++++++++++--------------- man/ndb_cpcd.1 | 8 +- man/ndb_delete_all.1 | 12 +- man/ndb_desc.1 | 24 +- man/ndb_drop_index.1 | 14 +- man/ndb_drop_table.1 | 12 +- man/ndb_error_reporter.1 | 18 +- man/ndb_index_stat.1 | 14 +- man/ndb_mgm.1 | 20 +- man/ndb_mgmd.8 | 71 ++-- man/ndb_print_backup_file.1 | 8 +- man/ndb_print_file.1 | 16 +- man/ndb_print_schema_file.1 | 12 +- man/ndb_print_sys_file.1 | 14 +- man/ndb_restore.1 | 453 +++++++++++++++++--- man/ndb_select_all.1 | 20 +- man/ndb_select_count.1 | 14 +- man/ndb_show_tables.1 | 18 +- man/ndb_size.pl.1 | 20 +- man/ndb_waiter.1 | 18 +- man/ndbd.8 | 76 ++-- man/ndbinfo_select_all.1 | 14 +- man/ndbmtd.8 | 26 +- man/perror.1 | 4 +- man/replace.1 | 4 +- man/resolve_stack_dump.1 | 4 +- man/resolveip.1 | 4 +- 69 files changed, 1499 insertions(+), 857 deletions(-) diff --git a/man/comp_err.1 b/man/comp_err.1 index 883134a974e1..06017f33e49a 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -2,12 +2,12 @@ .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 97bf8bc7a05a..f6ba233955ac 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -2,12 +2,12 @@ .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 index bda3c74ce588..35aabf10747c 100644 --- a/man/msql2mysql.1 +++ b/man/msql2mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmsql2mysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMSQL2MYSQL\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMSQL2MYSQL\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index d057bb4d3d7c..ca6abe17880c 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -2,12 +2,12 @@ .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index 95ec12aa3634..3cc3205910a0 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisamchk.1 b/man/myisamchk.1 index 167ae19e36ef..7b7b80ef64a1 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisamlog.1 b/man/myisamlog.1 index f1d73351fc5b..ba3292314506 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisampack.1 b/man/myisampack.1 index 578df84b23cd..541a29a0caab 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index 706b665035c4..736826aa00eb 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/20/2017 +.\" Date: 06/01/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "04/20/2017" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "06/01/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index 2541cd2e6bd1..3203d7942d2f 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/20/2017 +.\" Date: 06/01/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "04/20/2017" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "06/01/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql.1 b/man/mysql.1 index b6429c7ca892..2b51270492cf 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -66,7 +66,8 @@ Or: .RS 4 .\} .nf -shell> \fBmysql \-\-user=\fR\fB\fIuser_name\fR\fR\fB \-\-password=\fR\fB\fIyour_password\fR\fR\fB \fR\fB\fIdb_name\fR\fR +shell> \fBmysql \-\-user=\fR\fB\fIuser_name\fR\fR\fB \-\-password \fR\fB\fIdb_name\fR\fR +Enter password: \fIyour_password\fR .fi .if n \{\ .RE @@ -216,6 +217,24 @@ option\&. .sp -1 .IP \(bu 2.3 .\} +\fB\-\-binary\-as\-hex\fR, +\fB\-b\fR +.sp +When this option is given, +\fBmysql\fR +displays binary data using hexadecimal notation (0x\fIvalue\fR)\&. This occurs whether the overall output dislay format is tabular, vertical, HTML, or XML\&. +.sp +This option was added in MySQL 5\&.5\&.57\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-bind\-address=\fR\fB\fIip_address\fR\fR .sp On a computer having multiple network interfaces, use this option to select which interface to use for connecting to the MySQL server\&. @@ -504,7 +523,7 @@ the section called \(lqMYSQL COMMANDS\(rq\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. +Section\ \&6.5.1.3, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. .RE .sp .RS 4 diff --git a/man/mysql.server.1 b/man/mysql.server.1 index 874f01319735..55c8573b7a70 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,13 +34,21 @@ mysql.server \- MySQL server startup script \fBmysql {start|stop}\fR .SH "DESCRIPTION" .PP -MySQL distributions on Unix include a script named -\fBmysql\&.server\fR, which starts the server using -\fBmysqld_safe\fR\&. It can be used on systems such as Linux and Solaris that use System V\-style run directories to start and stop system services\&. It is also used by the OS X Startup Item for MySQL\&. +MySQL distributions on Unix and Unix\-like system include a script named +\fBmysql\&.server\fR, which starts the MySQL server using +\fBmysqld_safe\fR\&. It can be used on systems such as Linux and Solaris that use System V\-style run directories to start and stop system services\&. It is also used by the macOS Startup Item for MySQL\&. +.PP +\fBmysql\&.server\fR +is the script name as used within the MySQL source tree\&. The installed name might be different; for example, +\fBmysqld\fR +or +\fBmysql\fR\&. In the following discussion, adjust the name +\fBmysql\&.server\fR +as appropriate for your system\&. .PP To start or stop the server manually using the \fBmysql\&.server\fR -script, invoke it with +script, invoke it from the command line with start or stop @@ -57,21 +65,20 @@ shell> \fBmysql\&.server stop\fR .RE .\} .PP -Before \fBmysql\&.server\fR -starts the server, it changes location to the MySQL installation directory, and then invokes +changes location to the MySQL installation directory, then invokes \fBmysqld_safe\fR\&. To run the server as some specific user, add an appropriate user option to the [mysqld] -group of the +group of the global /etc/my\&.cnf option file, as shown later in this section\&. (It is possible that you must edit \fBmysql\&.server\fR if you\*(Aqve installed a binary distribution of MySQL in a nonstandard location\&. Modify it to change location into the proper directory before it runs \fBmysqld_safe\fR\&. If you do this, your modified version of \fBmysql\&.server\fR -may be overwritten if you upgrade MySQL in the future, so you should make a copy of your edited version that you can reinstall\&.) +may be overwritten if you upgrade MySQL in the future; make a copy of your edited version that you can reinstall\&.) .PP \fBmysql\&.server stop\fR stops the server by sending a signal to it\&. You can also stop the server manually by executing @@ -79,27 +86,44 @@ stops the server by sending a signal to it\&. You can also stop the server manua .PP To start and stop MySQL automatically on your server, you must add start and stop commands to the appropriate places in your /etc/rc* -files\&. -.PP +files: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} If you use the Linux server RPM package (MySQL\-server\-\fIVERSION\fR\&.rpm), or a native Linux package installation, the \fBmysql\&.server\fR script may be installed in the /etc/init\&.d directory with the name +mysqld +or mysql\&. See Section\ \&2.5.1, \(lqInstalling MySQL on Linux Using RPM Packages\(rq, for more information on the Linux RPM packages\&. -.PP -Some vendors provide RPM packages that install a startup script under a different name such as -\fBmysqld\fR\&. -.PP +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} If you install MySQL from a source distribution or using a binary distribution format that does not install \fBmysql\&.server\fR -automatically, you can install it manually\&. The script can be found in the +automatically, you can install the script manually\&. It can be found in the support\-files -directory under the MySQL installation directory or in a MySQL source tree\&. Copy it to the +directory under the MySQL installation directory or in a MySQL source tree\&. Copy the script to the /etc/init\&.d directory with the name -\fBmysql\fR, and then make it executable: +\fBmysql\fR +and make it executable: .sp .if n \{\ .RS 4 @@ -112,40 +136,6 @@ shell> \fBchmod +x /etc/init\&.d/mysql\fR .RE .\} .sp -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.PP -Older Red Hat systems use the -/etc/rc\&.d/init\&.d -directory rather than -/etc/init\&.d\&. Adjust the preceding commands accordingly\&. Alternatively, first create -/etc/init\&.d -as a symbolic link that points to -/etc/rc\&.d/init\&.d: -.sp .5v -.RE -.sp -.if n \{\ -.RS 4 -.\} -.nf -shell> \fBcd /etc\fR -shell> \fBln \-s rc\&.d/init\&.d \&.\fR -.fi -.if n \{\ -.RE -.\} -.PP After installing the script, the commands needed to activate it to run at system startup depend on your operating system\&. On Linux, you can use \fBchkconfig\fR: .sp @@ -158,7 +148,7 @@ shell> \fBchkconfig \-\-add mysql\fR .if n \{\ .RE .\} -.PP +.sp On some Linux systems, the following command also seems to be necessary to fully enable the \fBmysql\fR script: @@ -172,18 +162,36 @@ shell> \fBchkconfig \-\-level 345 mysql on\fR .if n \{\ .RE .\} -.PP +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} On FreeBSD, startup scripts generally should go in -/usr/local/etc/rc\&.d/\&. The -rc(8) -manual page states that scripts in this directory are executed only if their base name matches the -*\&.sh -shell file name pattern\&. Any other files or directories present within the directory are silently ignored\&. In other words, on FreeBSD, you should install the +/usr/local/etc/rc\&.d/\&. Install the mysql\&.server script as /usr/local/etc/rc\&.d/mysql\&.server\&.sh -to enable automatic startup\&. -.PP +to enable automatic startup\&. The +rc(8) +manual page states that scripts in this directory are executed only if their base name matches the +*\&.sh +shell file name pattern\&. Any other files or directories present within the directory are silently ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} As an alternative to the preceding setup, some operating systems also use /etc/rc\&.local or @@ -199,8 +207,18 @@ to start additional services on startup\&. To start up MySQL using this method, .if n \{\ .RE .\} -.PP +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} For other systems, consult your operating system documentation to see how to install startup scripts\&. +.RE .PP \fBmysql\&.server\fR reads options from the @@ -217,7 +235,7 @@ You can add options for in a global /etc/my\&.cnf file\&. A typical -/etc/my\&.cnf +my\&.cnf file might look like this: .sp .if n \{\ @@ -238,7 +256,7 @@ basedir=/usr/local/mysql .PP The \fBmysql\&.server\fR -script supports the following options\&. If specified, they +script supports the options shown in the following table\&. If specified, they \fImust\fR be placed in an option file, not on the command line\&. \fBmysql\&.server\fR @@ -248,6 +266,57 @@ and stop as command\-line arguments\&. .sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&4.3.\ \&mysql\&.server Option\-File Options +.TS +allbox tab(:); +lB lB lB. +T{ +Option Name +T}:T{ +Description +T}:T{ +Type +T} +.T& +l l l +l l l +l l l +l l l. +T{ +basedir +T}:T{ +Path to MySQL installation directory +T}:T{ +directory name +T} +T{ +datadir +T}:T{ +Path to MySQL data directory +T}:T{ +directory name +T} +T{ +pid\-file +T}:T{ +File in which server should write its process ID +T}:T{ +file name +T} +T{ +service\-startup\-timeout +T}:T{ +How long to wait for server startup +T}:T{ +integer +T} +.TE +.sp 1 +.sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c @@ -256,7 +325,7 @@ as command\-line arguments\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR +\fBbasedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. .RE @@ -269,7 +338,7 @@ The path to the MySQL installation directory\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-datadir=\fR\fB\fIdir_name\fR\fR +\fBdatadir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL data directory\&. .RE @@ -282,7 +351,7 @@ The path to the MySQL data directory\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR +\fBpid\-file=\fR\fB\fIfile_name\fR\fR .sp The path name of the file in which the server should write its process ID\&. .sp @@ -301,7 +370,7 @@ option file group but not the [mysqld_safe] group, you can ensure that \fBmysqld_safe\fR -gets the same value when invoke using +gets the same value when invoked from \fBmysql\&.server\fR as when invoked manually by putting the same pid\-file @@ -320,7 +389,7 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-service\-startup\-timeout=\fR\fB\fIseconds\fR\fR +\fBservice\-startup\-timeout=\fR\fB\fIseconds\fR\fR .sp How long in seconds to wait for confirmation of server startup\&. If the server does not start within this time, \fBmysql\&.server\fR diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index a548ed5fe8db..49cf9fc5a93d 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/20/2017 +.\" Date: 06/01/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "04/20/2017" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "06/01/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_config.1 b/man/mysql_config.1 index fb7fa66cbb24..00888cf7123a 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 index 1f14b43d2c5b..0c3ccbb539a4 100644 --- a/man/mysql_convert_table_format.1 +++ b/man/mysql_convert_table_format.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_convert_table_format\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_CONVERT_TAB" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_CONVERT_TAB" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -115,7 +115,7 @@ Connect to the MySQL server on the given host\&. .\} \fB\-\-password=\fR\fB\fIpassword\fR\fR .sp -The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. +The password to use when connecting to the server\&. The password value is not optional for this option, unlike for other MySQL programs\&. .sp Specifying a password on the command line should be considered insecure\&. See Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 index 01756ecc740c..822761431d36 100644 --- a/man/mysql_find_rows.1 +++ b/man/mysql_find_rows.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_find_rows\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIND_ROWS\F" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 index dac5ea3f01b9..ad3c05d76d7d 100644 --- a/man/mysql_fix_extensions.1 +++ b/man/mysql_fix_extensions.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_fix_extensions\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_FIX_EXTENSI" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index cda9ef903fd6..ce7c876945c4 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index dfacef981c8a..41b2b1c97d86 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index cbcc0963891a..5e98816c38e8 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 index ba8e82ef7f24..008fe4715c10 100644 --- a/man/mysql_setpermission.1 +++ b/man/mysql_setpermission.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_setpermission\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_SETPERMISSI" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_SETPERMISSI" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -111,7 +111,7 @@ Connect to the MySQL server on the given host\&. .\} \fB\-\-password=\fR\fB\fIpassword\fR\fR .sp -The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. +The password to use when connecting to the server\&. The password value is not optional for this option, unlike for other MySQL programs\&. .sp Specifying a password on the command line should be considered insecure\&. See Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index 8c464bc8936f..db1313c4748c 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index ca262e024bba..7b147dad4d59 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 index 5f161785f1ed..3b1b29ad864b 100644 --- a/man/mysql_waitpid.1 +++ b/man/mysql_waitpid.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_waitpid\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_WAITPID\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_WAITPID\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 index adbd5d792ae5..6f0cda16cb32 100644 --- a/man/mysql_zap.1 +++ b/man/mysql_zap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_zap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQL_ZAP\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQL_ZAP\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index 4b66177e7fba..835a09cdf635 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlaccess\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLACCESS\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLACCESS\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index b8dc9bb31fe7..acd02cf3ce27 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -815,7 +815,7 @@ groups\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. +Section\ \&6.5.1.3, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. .RE .sp .RS 4 diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index d0e165e96067..c5507c965f17 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1019,6 +1019,22 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} +\fB\-\-ssl*\fR +.sp +Options that begin with +\fB\-\-ssl\fR +specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-start\-datetime=\fR\fB\fIdatetime\fR\fR .sp Start reading the binary log at the first event having a timestamp equal to or later than the diff --git a/man/mysqlbug.1 b/man/mysqlbug.1 index 276bdc2e6074..5ff4ba8a6e3f 100644 --- a/man/mysqlbug.1 +++ b/man/mysqlbug.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbug\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLBUG\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLBUG\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index 8b5dd645623f..6a16feafb8a4 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -552,7 +552,7 @@ This option was added in MySQL 5\&.5\&.10\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.3, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .sp This option was added in MySQL 5\&.5\&.47\&. .RE diff --git a/man/mysqld.8 b/man/mysqld.8 index c384cb64d3c3..131b7ba558a9 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index fc69564abd2f..f96f24ac604b 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -348,7 +348,7 @@ rather than to the log file\&. By default, output goes to the log file\&. \fB\-\-password=\fR\fB\fIpassword\fR\fR .sp The password of the MySQL account to use when invoking -\fBmysqladmin\fR\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. +\fBmysqladmin\fR\&. The password value is not optional for this option, unlike for other MySQL programs\&. .RE .sp .RS 4 diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index 6a9b556a253e..0076249e0532 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqldump.1 b/man/mysqldump.1 index c717385f6b7e..df4995f0aed8 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1194,7 +1194,7 @@ prints the error message, but it also writes an SQL comment containing the view Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.3, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .sp This option was added in MySQL 5\&.5\&.47\&. .RE @@ -2147,9 +2147,9 @@ This option should be used only when \fBmysqldump\fR is run on the same machine as the \fBmysqld\fR -server\&. Because the server creates files +server\&. Because the server creates *\&.txt -file in the directory that you specify, the directory must be writable by the server and the MySQL account that you use must have the +files in the directory that you specify, the directory must be writable by the server and the MySQL account that you use must have the FILE privilege\&. Because \fBmysqldump\fR diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index 3b6a5a82c380..5226273c97ce 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 index 467e2c1f3f5e..e651ab9b4029 100644 --- a/man/mysqlhotcopy.1 +++ b/man/mysqlhotcopy.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlhotcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLHOTCOPY\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLHOTCOPY\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index 24f7dcff60f0..7f6ecee44dd7 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -323,7 +323,7 @@ Empty the table before importing the text file\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.3, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .sp This option was added in MySQL 5\&.5\&.47\&. .RE diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index 8d15bf108458..254872657eb2 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -342,7 +342,7 @@ groups\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.3, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .sp This option was added in MySQL 5\&.5\&.47\&. .RE diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index 13909a9aeec8..19eaf449399f 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -573,7 +573,7 @@ statements\&. The default is 0 (connections are not detached)\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.5, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. +Section\ \&6.5.1.3, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) This option was added in MySQL 5\&.5\&.27\&. .RE .sp .RS 4 diff --git a/man/mysqltest.1 b/man/mysqltest.1 index 9bd1b7c5b4c2..9e395d87ba07 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/20/2017 +.\" Date: 06/01/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "04/20/2017" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "06/01/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -649,7 +649,7 @@ The server sends the public key to the client as needed, so it is not necessary For additional discussion regarding use of the sha256_password plugin, including how to get the RSA public key, see -\m[blue]\fBThe SHA\-256 Authentication Plugin\fR\m[]\&\s-2\u[1]\d\s+2\&. +\m[blue]\fBSHA\-256 Pluggable Authentication\fR\m[]\&\s-2\u[1]\d\s+2\&. .sp This option is available only if MySQL was built using OpenSSL\&. It was added in MySQL 5\&.6\&.6 under the name \fB\-\-server\-public\-key\fR @@ -898,9 +898,9 @@ You should have received a copy of the GNU General Public License along with the .sp .SH "NOTES" .IP " 1." 4 -The SHA-256 Authentication Plugin +SHA-256 Pluggable Authentication .RS 4 -\%http://dev.mysql.com/doc/refman/8.0/en/sha256-authentication-plugin.html +\%http://dev.mysql.com/doc/refman/8.0/en/sha256-pluggable-authentication.html .RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, diff --git a/man/ndb-common-options.1 b/man/ndb-common-options.1 index 05f31021dc7f..df8323a7c3cd 100644 --- a/man/ndb-common-options.1 +++ b/man/ndb-common-options.1 @@ -1,13 +1,13 @@ '\" t -.\" Title: Options Common to MySQL Cluster Programs +.\" Title: Options Common to NDB Cluster Programs .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "OPTIONS COMMON TO MY" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "OPTIONS COMMON TO ND" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,10 +28,10 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -ndb-common-options \- MySQL Cluster Common Program Options +ndb-common-options \- NDB Cluster Common Program Options .SH "DESCRIPTION" .PP -All MySQL Cluster programs accept the options described in this section, with the following exceptions: +All NDB Cluster programs accept the options described in this section, with the following exceptions: .sp .RS 4 .ie n \{\ @@ -77,34 +77,34 @@ All MySQL Cluster programs accept the options described in this section, with th \fBndb_print_sys_file\fR .RE .PP -Users of earlier MySQL Cluster versions should note that some of these options have been changed to make them consistent with one another as well as with +Users of earlier NDB Cluster versions should note that some of these options have been changed to make them consistent with one another as well as with \fBmysqld\fR\&. You can use the \fB\-\-help\fR -option with any MySQL Cluster program\(emwith the exception of +option with any NDB Cluster program\(emwith the exception of \fBndb_print_backup_file\fR, \fBndb_print_schema_file\fR, and \fBndb_print_sys_file\fR\(emto view a list of the options which the program supports\&. .PP -The options in the following table are common to all MySQL Cluster executables (except those noted previously in this section)\&. +The options in the following table are common to all NDB Cluster executables (except those noted previously in this section)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.88.\ \& This table describes command\-line options common to all MySQL Cluster programs +.B Table\ \&18.91.\ \& This table describes command\-line options common to all MySQL NDB Cluster programs .TS allbox tab(:); . .TE .sp 1 .PP -For options specific to individual MySQL Cluster programs, see -Section\ \&18.4, \(lqMySQL Cluster Programs\(rq\&. +For options specific to individual NDB Cluster programs, see +Section\ \&18.4, \(lqNDB Cluster Programs\(rq\&. .PP See -Section\ \&18.3.3.8.1, \(lqMySQL Server Options for MySQL Cluster\(rq, for +Section\ \&18.3.3.8.1, \(lqMySQL Server Options for NDB Cluster\(rq, for \fBmysqld\fR -options relating to MySQL Cluster\&. +options relating to NDB Cluster\&. .sp .RS 4 .ie n \{\ @@ -114,26 +114,31 @@ options relating to MySQL Cluster\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-help\fR, -\fB\-\-usage\fR, -\fB\-?\fR +\fB\-\-character\-sets\-dir=\fR\fB\fIname\fR\fR .TS allbox tab(:); l l s s -l l s s. +l l l s +^ l l s. T{ \fBCommand\-Line Format\fR T}:T{ -\-\-help +\-\-character\-sets\-dir=dir_name T} T{ -\ \& +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +directory name +T} +:T{ +\fBDefault\fR T}:T{ -\-\-usage T} .TE .sp 1 -Prints a short list with descriptions of the available command options\&. +Tells the program where to find character set information\&. .RE .sp .RS 4 @@ -144,7 +149,7 @@ Prints a short list with descriptions of the available command options\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-character\-sets\-dir=\fR\fB\fIname\fR\fR +\fB\-\-core\-file\fR .TS allbox tab(:); l l s s @@ -153,22 +158,175 @@ l l l s T{ \fBCommand\-Line Format\fR T}:T{ -\-\-character\-sets\-dir=dir_name +\-\-core\-file T} T{ \fBPermitted Values\fR T}:T{ \fBType\fR T}:T{ -directory name +boolean T} :T{ \fBDefault\fR T}:T{ +FALSE T} .TE .sp 1 -Tells the program where to find character set information\&. +Write a core file if the program dies\&. The name and location of the core file are system\-dependent\&. (For NDB Cluster programs nodes running on Linux, the default location is the program\*(Aqs working directory\(emfor a data node, this is the node\*(Aqs +DataDir\&.) For some systems, there may be restrictions or limitations; for example, it might be necessary to execute +\fBulimit \-c unlimited\fR +before starting the server\&. Consult your system documentation for detailed information\&. +.sp +If NDB Cluster was built using the +\fB\-\-debug\fR +option for +\fBconfigure\fR, then +\fB\-\-core\-file\fR +is enabled by default\&. For regular builds, +\fB\-\-core\-file\fR +is disabled by default\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-debug[=\fR\fB\fIoptions\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-debug=options +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +d:t:O,/tmp/ndb_restore\&.trace +T} +.TE +.sp 1 +This option can be used only for versions compiled with debugging enabled\&. It is used to enable output from debug calls in the same manner as for the +\fBmysqld\fR +process\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-defaults\-extra\-file\fR=\fIfilename\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-defaults\-extra\-file=filename +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Read this file after global option files are read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-defaults\-file\fR=\fIfilename\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-defaults\-file=filename +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Read default options from this file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-help\fR, +\fB\-\-usage\fR, +\fB\-?\fR +.TS +allbox tab(:); +l l s s +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-help +T} +T{ +\ \& +T}:T{ +\-\-usage +T} +.TE +.sp 1 +Prints a short list with descriptions of the available command options\&. .RE .sp .RS 4 @@ -212,7 +370,7 @@ localhost:1186 T} .TE .sp 1 -This option takes a MySQL Cluster connection string that specifies the management server for the application to connect to, as shown here: +This option takes an NDB Cluster connection string that specifies the management server for the application to connect to, as shown here: .sp .if n \{\ .RS 4 @@ -225,7 +383,7 @@ shell> \fBndbd \-\-ndb\-connectstring="nodeid=2;host=ndb_mgmd\&.mysql\&.com:1186 .\} .sp For more information, see -Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq\&. +Section\ \&18.3.3.3, \(lqNDB Cluster Connection Strings\(rq\&. .RE .sp .RS 4 @@ -236,7 +394,7 @@ Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-core\-file\fR +\fB\-\-ndb\-mgmd\-host=\fR\fB\fIhost\fR\fR\fB[:\fR\fB\fIport\fR\fR\fB]\fR .TS allbox tab(:); l l s s @@ -245,35 +403,25 @@ l l l s T{ \fBCommand\-Line Format\fR T}:T{ -\-\-core\-file +\-\-ndb\-mgmd\-host=host[:port] T} T{ \fBPermitted Values\fR T}:T{ \fBType\fR T}:T{ -boolean +string T} :T{ \fBDefault\fR T}:T{ -FALSE +localhost:1186 T} .TE .sp 1 -Write a core file if the program dies\&. The name and location of the core file are system\-dependent\&. (For MySQL Cluster programs nodes running on Linux, the default location is the program\*(Aqs working directory\(emfor a data node, this is the node\*(Aqs -DataDir\&.) For some systems, there may be restrictions or limitations; for example, it might be necessary to execute -\fBulimit \-c unlimited\fR -before starting the server\&. Consult your system documentation for detailed information\&. -.sp -If MySQL Cluster was built using the -\fB\-\-debug\fR -option for -\fBconfigure\fR, then -\fB\-\-core\-file\fR -is enabled by default\&. For regular builds, -\fB\-\-core\-file\fR -is disabled by default\&. +Can be used to set the host and port number of a single management server for the program to connect to\&. If the program requires node IDs or references to multiple management servers (or both) in its connection information, use the +\fB\-\-ndb\-connectstring\fR +option instead\&. .RE .sp .RS 4 @@ -284,7 +432,7 @@ is disabled by default\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-debug[=\fR\fB\fIoptions\fR\fR\fB]\fR +\fB\-\-ndb\-nodeid=\fR\fB\fI#\fR\fR .TS allbox tab(:); l l s s @@ -293,25 +441,25 @@ l l l s T{ \fBCommand\-Line Format\fR T}:T{ -\-\-debug=options +\-\-ndb\-nodeid=# T} T{ \fBPermitted Values\fR T}:T{ \fBType\fR T}:T{ -string +numeric T} :T{ \fBDefault\fR T}:T{ -d:t:O,/tmp/ndb_restore\&.trace +0 T} .TE .sp 1 -This option can be used only for versions compiled with debugging enabled\&. It is used to enable output from debug calls in the same manner as for the -\fBmysqld\fR -process\&. +Sets this node\*(Aqs NDB Cluster node ID\&. +\fIThe range of permitted values depends on the node\*(Aqs type (data, management, or API) and the NDB Cluster software version\fR\&. See +Section\ \&18.1.6.2, \(lqLimits and Differences of NDB Cluster from Standard MySQL Limits\(rq, for more information\&. .RE .sp .RS 4 @@ -322,7 +470,7 @@ process\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-ndb\-mgmd\-host=\fR\fB\fIhost\fR\fR\fB[:\fR\fB\fIport\fR\fR\fB]\fR +\fB\-\-no\-defaults\fR .TS allbox tab(:); l l s s @@ -331,25 +479,23 @@ l l l s T{ \fBCommand\-Line Format\fR T}:T{ -\-\-ndb\-mgmd\-host=host[:port] +\-\-no\-defaults T} T{ \fBPermitted Values\fR T}:T{ \fBType\fR T}:T{ -string +boolean T} :T{ \fBDefault\fR T}:T{ -localhost:1186 +TRUE T} .TE .sp 1 -Can be used to set the host and port number of a single management server for the program to connect to\&. If the program requires node IDs or references to multiple management servers (or both) in its connection information, use the -\fB\-\-ndb\-connectstring\fR -option instead\&. +Do not read default options from any option file other than login file\&. .RE .sp .RS 4 @@ -360,7 +506,7 @@ option instead\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-ndb\-nodeid=\fR\fB\fI#\fR\fR +\fB\-\-ndb\-optimized\-node\-selection\fR .TS allbox tab(:); l l s s @@ -369,25 +515,23 @@ l l l s T{ \fBCommand\-Line Format\fR T}:T{ -\-\-ndb\-nodeid=# +\-\-ndb\-optimized\-node\-selection T} T{ \fBPermitted Values\fR T}:T{ \fBType\fR T}:T{ -numeric +boolean T} :T{ \fBDefault\fR T}:T{ -0 +TRUE T} .TE .sp 1 -Sets this node\*(Aqs MySQL Cluster node ID\&. -\fIThe range of permitted values depends on the node\*(Aqs type (data, management, or API) and the MySQL Cluster software version\fR\&. See -Section\ \&18.1.6.2, \(lqLimits and Differences of MySQL Cluster from Standard MySQL Limits\(rq, for more information\&. +Optimize selection of nodes for transactions\&. Enabled by default\&. .RE .sp .RS 4 @@ -398,7 +542,7 @@ Section\ \&18.1.6.2, \(lqLimits and Differences of MySQL Cluster from Standard M .sp -1 .IP \(bu 2.3 .\} -\fB\-\-ndb\-optimized\-node\-selection\fR +\fB\-\-print\-defaults\fR .TS allbox tab(:); l l s s @@ -407,7 +551,7 @@ l l l s T{ \fBCommand\-Line Format\fR T}:T{ -\-\-ndb\-optimized\-node\-selection +\-\-print\-defaults T} T{ \fBPermitted Values\fR @@ -423,7 +567,7 @@ TRUE T} .TE .sp 1 -Optimize selection of nodes for transactions\&. Enabled by default\&. +Print the program argument list and exit\&. .RE .sp .RS 4 @@ -446,15 +590,15 @@ T}:T{ T} .TE .sp 1 -Prints the MySQL Cluster version number of the executable\&. The version number is relevant because not all versions can be used together, and the MySQL Cluster startup process verifies that the versions of the binaries being used can co\-exist in the same cluster\&. This is also important when performing an online (rolling) software upgrade or downgrade of MySQL Cluster\&. +Prints the NDB Cluster version number of the executable\&. The version number is relevant because not all versions can be used together, and the NDB Cluster startup process verifies that the versions of the binaries being used can co\-exist in the same cluster\&. This is also important when performing an online (rolling) software upgrade or downgrade of NDB Cluster\&. .sp See -Section\ \&18.5.5, \(lqPerforming a Rolling Restart of a MySQL Cluster\(rq), for more information\&. +Section\ \&18.5.5, \(lqPerforming a Rolling Restart of an NDB Cluster\(rq), for more information\&. .RE .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_blob_tool.1 b/man/ndb_blob_tool.1 index ff6ef57e7492..4f48a092c85e 100644 --- a/man/ndb_blob_tool.1 +++ b/man/ndb_blob_tool.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_blob_tool\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_BLOB_TOOL\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_BLOB_TOOL\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,7 +28,7 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -ndb_blob_tool \- check and repair BLOB and TEXT columns of MySQL Cluster tables +ndb_blob_tool \- check and repair BLOB and TEXT columns of NDB Cluster tables .SH "SYNOPSIS" .HP \w'\fBndb_blob_tool\ \fR\fB\fIoptions\fR\fR\fB\ \fR\fB\fItable\fR\fR\fB\ [\fR\fB\fIcolumn\fR\fR\fB,\ \&.\&.\&.]\fR\ 'u \fBndb_blob_tool \fR\fB\fIoptions\fR\fR\fB \fR\fB\fItable\fR\fR\fB [\fR\fB\fIcolumn\fR\fR\fB, \&.\&.\&.]\fR @@ -85,15 +85,15 @@ The option provides additional information in the output about the tool\*(Aqs progress\&. .PP The following table includes options that are specific to -\fBndb_blob_tool\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_blob_tool\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_blob_tool\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.73.\ \& This table describes command\-line options for the ndb_blob_tool program +.B Table\ \&18.75.\ \& This table describes command\-line options for the ndb_blob_tool program .TS allbox tab(:); . @@ -133,7 +133,7 @@ FALSE T} .TE .sp 1 -Check for orphaned BLOB parts in MySQL Cluster tables\&. +Check for orphaned BLOB parts in NDB Cluster tables\&. .RE .sp .RS 4 @@ -206,7 +206,7 @@ FALSE T} .TE .sp 1 -Remove orphaned BLOB parts from MySQL Cluster tables\&. +Remove orphaned BLOB parts from NDB Cluster tables\&. .RE .sp .RS 4 @@ -377,7 +377,7 @@ Section\ \&11.7, \(lqData Type Storage Requirements\(rq, for more information\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_config.1 b/man/ndb_config.1 index 6be96075116b..c04efc64be69 100644 --- a/man/ndb_config.1 +++ b/man/ndb_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CONFIG\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CONFIG\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,13 +28,13 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -ndb_config \- extract MySQL Cluster configuration information +ndb_config \- extract NDB Cluster configuration information .SH "SYNOPSIS" .HP \w'\fBndb_config\ \fR\fB\fIoptions\fR\fR\ 'u \fBndb_config \fR\fB\fIoptions\fR\fR .SH "DESCRIPTION" .PP -This tool extracts current configuration information for data nodes, SQL nodes, and API nodes from one of a number of sources: a MySQL Cluster management node, or its +This tool extracts current configuration information for data nodes, SQL nodes, and API nodes from one of a number of sources: an NDB Cluster management node, or its config\&.ini or my\&.cnf @@ -60,15 +60,15 @@ CONNECTIONS) using one of the options \fB\-\-connections\fR\&. .PP The following table includes options that are specific to -\fBndb_config\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_config\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_config\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.74.\ \& This table describes command\-line options for the ndb_config program +.B Table\ \&18.76.\ \& This table describes command\-line options for the ndb_config program .TS allbox tab(:); . @@ -83,28 +83,25 @@ allbox tab(:); .sp -1 .IP \(bu 2.3 .\} -\fB\-\-usage\fR, -\fB\-\-help\fR, or -\fB\-?\fR -.TS -allbox tab(:); -l l s s -l l s s. -T{ -\fBCommand\-Line Format\fR -T}:T{ -\-\-help -T} -T{ -\ \& -T}:T{ -\-\-usage -T} -.TE -.sp 1 -Causes +\fB\-\-configinfo\fR +.sp +The +\fB\-\-configinfo\fR +option causes \fBndb_config\fR -to print a list of available options, and then exit\&. +to dump a list of each NDB Cluster configuration parameter supported by the NDB Cluster distribution of which +\fBndb_config\fR +is a part, including the following information: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A brief description of each parameter\*(Aqs purpose, effects, and usage .RE .sp .RS 4 @@ -115,48 +112,20 @@ to print a list of available options, and then exit\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-config_from_node=#\fR -.TS -allbox tab(:); -l l s s -l l l s -^ l l s -^ l l s -^ l l s. -T{ -\fBCommand\-Line Format\fR -T}:T{ -\-\-config_from_node=# -T} -T{ -\fBPermitted Values\fR -T}:T{ -\fBType\fR -T}:T{ -numeric -T} -:T{ -\fBDefault\fR -T}:T{ -none -T} -:T{ -\fBMin Value\fR -T}:T{ -1 -T} -:T{ -\fBMax Value\fR -T}:T{ -48 -T} -.TE -.sp 1 -Obtain the cluster\*(Aqs configuration data from the data node that has this ID\&. +The section of the +config\&.ini +file where the parameter may be used +.RE .sp -If the node having this ID is not a data node, -\fBndb_config\fR -fails with an error\&. (To obtain configuration data from the management node instead, simply omit this option\&.) +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The parameter\*(Aqs data type or unit of measurement .RE .sp .RS 4 @@ -167,21 +136,7 @@ fails with an error\&. (To obtain configuration data from the management node in .sp -1 .IP \(bu 2.3 .\} -\fB\-\-version\fR, -\fB\-V\fR -.TS -allbox tab(:); -l l s s. -T{ -\fBCommand\-Line Format\fR -T}:T{ -\-\-version -T} -.TE -.sp 1 -Causes -\fBndb_config\fR -to print a version information string, and then exit\&. +Where applicable, the parameter\*(Aqs default, minimum, and maximum values .RE .sp .RS 4 @@ -192,41 +147,79 @@ to print a version information string, and then exit\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-ndb\-connectstring=\fR\fB\fIconnection_string\fR\fR, -\fB\-c \fR\fB\fIconnection_string\fR\fR +NDB Cluster release version and build information +.RE +.sp +By default, this output is in text format\&. Part of this output is shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_config \-\-configinfo\fR +****** SYSTEM ****** +Name (String) +Name of system (NDB Cluster) +MANDATORY +PrimaryMGMNode (Non\-negative Integer) +Node id of Primary ndb_mgmd(MGM) node +Default: 0 (Min: 0, Max: 4294967039) +ConfigGenerationNumber (Non\-negative Integer) +Configuration generation number +Default: 0 (Min: 0, Max: 4294967039) +****** DB ****** +MaxNoOfSubscriptions (Non\-negative Integer) +Max no of subscriptions (default 0 == MaxNoOfTables) +Default: 0 (Min: 0, Max: 4294967039) +MaxNoOfSubscribers (Non\-negative Integer) +Max no of subscribers (default 0 == 2 * MaxNoOfTables) +Default: 0 (Min: 0, Max: 4294967039) +\&... +.fi +.if n \{\ +.RE +.\} +.sp +Use this option together with the +\fB\-\-xml\fR +option to obtain output in XML format\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-file=\fR\fB\fIpath\-to\-file\fR\fR .TS allbox tab(:); l l s s -l l s s l l l s ^ l l s. T{ \fBCommand\-Line Format\fR T}:T{ -\-\-ndb\-connectstring=connectstring -T} -T{ -\ \& -T}:T{ -\-\-connect\-string=connectstring +\-\-config\-file=file_name T} T{ \fBPermitted Values\fR T}:T{ \fBType\fR T}:T{ -string +file name T} :T{ \fBDefault\fR T}:T{ -localhost:1186 T} .TE .sp 1 -Specifies the connection string to use in connecting to the management server\&. The format for the connection string is the same as described in -Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq, and defaults to -localhost:1186\&. +Gives the path to the management server\*(Aqs configuration file (config\&.ini)\&. This may be a relative or absolute path\&. If the management node resides on a different host from the one on which +\fBndb_config\fR +is invoked, then an absolute path must be used\&. .RE .sp .RS 4 @@ -237,33 +230,48 @@ localhost:1186\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-config\-file=\fR\fB\fIpath\-to\-file\fR\fR +\fB\-\-config_from_node=#\fR .TS allbox tab(:); l l s s l l l s +^ l l s +^ l l s ^ l l s. T{ \fBCommand\-Line Format\fR T}:T{ -\-\-config\-file=file_name +\-\-config\-from\-node=# T} T{ \fBPermitted Values\fR T}:T{ \fBType\fR T}:T{ -file name +numeric T} :T{ \fBDefault\fR T}:T{ +none +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +48 T} .TE .sp 1 -Gives the path to the management server\*(Aqs configuration file (config\&.ini)\&. This may be a relative or absolute path\&. If the management node resides on a different host from the one on which +Obtain the cluster\*(Aqs configuration data from the data node that has this ID\&. +.sp +If the node having this ID is not a data node, \fBndb_config\fR -is invoked, then an absolute path must be used\&. +fails with an error\&. (To obtain configuration data from the management node instead, simply omit this option\&.) .RE .sp .RS 4 @@ -274,7 +282,7 @@ is invoked, then an absolute path must be used\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-mycnf\fR +\fB\-\-connections\fR .TS allbox tab(:); l l s s @@ -283,7 +291,7 @@ l l l s T{ \fBCommand\-Line Format\fR T}:T{ -\-\-mycnf +\-\-connections T} T{ \fBPermitted Values\fR @@ -299,9 +307,26 @@ FALSE T} .TE .sp 1 -Read configuration data from the -my\&.cnf -file\&. +Tells +\fBndb_config\fR +to print +CONNECTIONS +information only\(emthat is, information about parameters found in the +[tcp], +[tcp default], +[sci], +[sci default], +[shm], or +[shm default] +sections of the cluster configuration file (see +Section\ \&18.3.3.9, \(lqNDB Cluster TCP/IP Connections\(rq, +Section\ \&18.3.3.12, \(lqSCI Transport Connections in NDB Cluster\(rq, and +Section\ \&18.3.3.11, \(lqNDB Cluster Shared-Memory Connections\(rq, for more information)\&. +.sp +This option is mutually exclusive with +\fB\-\-nodes\fR +and +\fB\-\-system\fR; only one of these 3 options can be used\&. .RE .sp .RS 4 @@ -312,9 +337,9 @@ file\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-query=\fR\fB\fIquery\-options\fR\fR, -\fB\-q\fR -\fIquery\-options\fR +\fB\-\-fields=\fR\fB\fIdelimiter\fR\fR, +\fB\-f\fR +\fIdelimiter\fR .TS allbox tab(:); l l s s @@ -323,7 +348,7 @@ l l l s T{ \fBCommand\-Line Format\fR T}:T{ -\-\-query=string +\-\-fields=string T} T{ \fBPermitted Values\fR @@ -338,20 +363,11 @@ T}:T{ T} .TE .sp 1 -This is a comma\-delimited list of -\fIquery options\fR\(emthat is, a list of one or more node attributes to be returned\&. These include -id -(node ID), type (node type\(emthat is, -ndbd, -mysqld, or -ndb_mgmd), and any configuration parameters whose values are to be obtained\&. -.sp -For example, -\fB\-\-query=id,type,indexmemory,datamemory\fR -returns the node ID, node type, -DataMemory, and -IndexMemory -for each node\&. +Specifies a +\fIdelimiter\fR +string used to separate the fields in the result\&. The default is +, +(the comma character)\&. .if n \{\ .sp .\} @@ -364,7 +380,11 @@ for each node\&. \fBNote\fR .ps -1 .br -If a given parameter is not applicable to a certain type of node, than an empty string is returned for the corresponding value\&. See the examples later in this section for more information\&. +If the +\fIdelimiter\fR +contains spaces or escapes (such as +\en +for the linefeed character), then it must be quoted\&. .sp .5v .RE .RE @@ -427,7 +447,7 @@ to fail if is run on a different host where localhost resolves to a different address (for example, on some versions of SUSE Linux, this is -127\&.0\&.0\&.2)\&. In general, for best results, you should use numeric IP addresses for all MySQL Cluster configuration values relating to hosts, or verify that all MySQL Cluster hosts handle +127\&.0\&.0\&.2)\&. In general, for best results, you should use numeric IP addresses for all NDB Cluster configuration values relating to hosts, or verify that all NDB Cluster hosts handle localhost in the same fashion\&. .sp .5v @@ -442,9 +462,91 @@ in the same fashion\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-id=\fR\fB\fInode_id\fR\fR +\fB\-\-ndb\-connectstring=\fR\fB\fIconnection_string\fR\fR, +\fB\-c \fR\fB\fIconnection_string\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-connectstring=connectstring +T} +T{ +\ \& +T}:T{ +\-\-connect\-string=connectstring +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +localhost:1186 +T} +.TE +.sp 1 +Specifies the connection string to use in connecting to the management server\&. The format for the connection string is the same as described in +Section\ \&18.3.3.3, \(lqNDB Cluster Connection Strings\(rq, and defaults to +localhost:1186\&. +.RE .sp -\fB\-\-nodeid=\fR\fB\fInode_id\fR\fR +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-mycnf\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-mycnf +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Read configuration data from the +my\&.cnf +file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nodeid=\fR\fB\fInode_id\fR\fR, +\fB\-\-id=\fR\fB\fInode_id\fR\fR .TS allbox tab(:); l l s s @@ -469,7 +571,7 @@ T}:T{ T} .TE .sp 1 -Either of these options can be used to specify the node ID of the node for which configuration information is to be obtained\&. +Specify the node ID of the node for which configuration information is to be obtained\&. \fB\-\-nodeid\fR is the preferred form\&. .RE @@ -514,7 +616,7 @@ to print information relating only to parameters defined in an or [ndbd default] section of the cluster configuration file (see -Section\ \&18.3.3.6, \(lqDefining MySQL Cluster Data Nodes\(rq)\&. +Section\ \&18.3.3.6, \(lqDefining NDB Cluster Data Nodes\(rq)\&. .sp This option is mutually exclusive with \fB\-\-connections\fR @@ -530,7 +632,67 @@ and .sp -1 .IP \(bu 2.3 .\} -\fB\-\-connections\fR +\fB\-\-rows=\fR\fB\fIseparator\fR\fR, +\fB\-r\fR +\fIseparator\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-rows=string +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Specifies a +\fIseparator\fR +string used to separate the rows in the result\&. The default is a space character\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If the +\fIseparator\fR +contains spaces or escapes (such as +\en +for the linefeed character), then it must be quoted\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-query=\fR\fB\fIquery\-options\fR\fR, +\fB\-q\fR +\fIquery\-options\fR .TS allbox tab(:); l l s s @@ -539,42 +701,50 @@ l l l s T{ \fBCommand\-Line Format\fR T}:T{ -\-\-connections +\-\-query=string T} T{ \fBPermitted Values\fR T}:T{ \fBType\fR T}:T{ -boolean +string T} :T{ \fBDefault\fR T}:T{ -FALSE T} .TE .sp 1 -Tells -\fBndb_config\fR -to print -CONNECTIONS -information only\(emthat is, information about parameters found in the -[tcp], -[tcp default], -[sci], -[sci default], -[shm], or -[shm default] -sections of the cluster configuration file (see -Section\ \&18.3.3.9, \(lqMySQL Cluster TCP/IP Connections\(rq, -Section\ \&18.3.3.12, \(lqSCI Transport Connections in MySQL Cluster\(rq, and -Section\ \&18.3.3.11, \(lqMySQL Cluster Shared-Memory Connections\(rq, for more information)\&. +This is a comma\-delimited list of +\fIquery options\fR\(emthat is, a list of one or more node attributes to be returned\&. These include +id +(node ID), type (node type\(emthat is, +ndbd, +mysqld, or +ndb_mgmd), and any configuration parameters whose values are to be obtained\&. .sp -This option is mutually exclusive with -\fB\-\-nodes\fR -and -\fB\-\-system\fR; only one of these 3 options can be used\&. +For example, +\fB\-\-query=id,type,indexmemory,datamemory\fR +returns the node ID, node type, +DataMemory, and +IndexMemory +for each node\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If a given parameter is not applicable to a certain type of node, than an empty string is returned for the corresponding value\&. See the examples later in this section for more information\&. +.sp .5v +.RE .RE .sp .RS 4 @@ -687,56 +857,28 @@ ndb_mgmd) are returned\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-fields=\fR\fB\fIdelimiter\fR\fR, -\fB\-f\fR -\fIdelimiter\fR +\fB\-\-usage\fR, +\fB\-\-help\fR, or +\fB\-?\fR .TS allbox tab(:); l l s s -l l l s -^ l l s. +l l s s. T{ \fBCommand\-Line Format\fR T}:T{ -\-\-fields=string +\-\-help T} T{ -\fBPermitted Values\fR -T}:T{ -\fBType\fR -T}:T{ -string -T} -:T{ -\fBDefault\fR +\ \& T}:T{ +\-\-usage T} .TE .sp 1 -Specifies a -\fIdelimiter\fR -string used to separate the fields in the result\&. The default is -\(lq,\(rq -(the comma character)\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -If the -\fIdelimiter\fR -contains spaces or escapes (such as -\en -for the linefeed character), then it must be quoted\&. -.sp .5v -.RE +Causes +\fBndb_config\fR +to print a list of available options, and then exit\&. .RE .sp .RS 4 @@ -747,118 +889,21 @@ for the linefeed character), then it must be quoted\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-rows=\fR\fB\fIseparator\fR\fR, -\fB\-r\fR -\fIseparator\fR +\fB\-\-version\fR, +\fB\-V\fR .TS allbox tab(:); -l l s s -l l l s -^ l l s. +l l s s. T{ \fBCommand\-Line Format\fR T}:T{ -\-\-rows=string -T} -T{ -\fBPermitted Values\fR -T}:T{ -\fBType\fR -T}:T{ -string -T} -:T{ -\fBDefault\fR -T}:T{ +\-\-version T} .TE .sp 1 -Specifies a -\fIseparator\fR -string used to separate the rows in the result\&. The default is a space character\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -If the -\fIseparator\fR -contains spaces or escapes (such as -\en -for the linefeed character), then it must be quoted\&. -.sp .5v -.RE -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fB\-\-configinfo\fR -.sp -The -\fB\-\-configinfo\fR -option causes -\fBndb_config\fR -to dump a list of each MySQL Cluster configuration parameter supported by the MySQL Cluster distribution of which +Causes \fBndb_config\fR -is a part, including the following information: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -A brief description of each parameter\*(Aqs purpose, effects, and usage -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The section of the -config\&.ini -file where the parameter may be used -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The parameter\*(Aqs data type or unit of measurement -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Where applicable, the parameter\*(Aqs default, minimum, and maximum values +to print a version information string, and then exit\&. .RE .sp .RS 4 @@ -869,39 +914,6 @@ Where applicable, the parameter\*(Aqs default, minimum, and maximum values .sp -1 .IP \(bu 2.3 .\} -MySQL Cluster release version and build information -.RE -.sp -By default, this output is in text format\&. Part of this output is shown here: -.sp -.if n \{\ -.RS 4 -.\} -.nf -shell> \fBndb_config \-\-configinfo\fR -****** SYSTEM ****** -Name (String) -Name of system (NDB Cluster) -MANDATORY -PrimaryMGMNode (Non\-negative Integer) -Node id of Primary ndb_mgmd(MGM) node -Default: 0 (Min: 0, Max: 4294967039) -ConfigGenerationNumber (Non\-negative Integer) -Configuration generation number -Default: 0 (Min: 0, Max: 4294967039) -****** DB ****** -MaxNoOfSubscriptions (Non\-negative Integer) -Max no of subscriptions (default 0 == MaxNoOfTables) -Default: 0 (Min: 0, Max: 4294967039) -MaxNoOfSubscribers (Non\-negative Integer) -Max no of subscribers (default 0 == 2 * MaxNoOfTables) -Default: 0 (Min: 0, Max: 4294967039) -\&... -.fi -.if n \{\ -.RE -.\} -.sp \fB\-\-configinfo\fR \fB\-\-xml\fR .TS @@ -928,19 +940,17 @@ false T} .TE .sp 1 -You can obtain the output of +Cause \fBndb_config\fR \fB\-\-configinfo\fR -as XML by adding the -\fB\-\-xml\fR -option\&. A portion of the resulting output is shown in this example: +to provide output as XML by adding this option\&. A portion of such output is shown in this example: .sp .if n \{\ .RS 4 .\} .nf shell> \fBndb_config \-\-configinfo \-\-xml\fR -
@@ -1061,14 +1071,15 @@ Unlike the options used with this program to obtain current configuration data, \fB\-\-configinfo\fR and \fB\-\-xml\fR -use information obtained from the MySQL Cluster sources when +use information obtained from the NDB Cluster sources when \fBndb_config\fR -was compiled\&. For this reason, no connection to a running MySQL Cluster or access to a +was compiled\&. For this reason, no connection to a running NDB Cluster or access to a config\&.ini or my\&.cnf file is required for these two options\&. -.sp +.RE +.PP Combining other \fBndb_config\fR options (such as @@ -1076,9 +1087,9 @@ options (such as or \fB\-\-type\fR) with \fB\-\-configinfo\fR -or +(with or without the \fB\-\-xml\fR -is not supported\&. Currently, if you attempt to do so, the usual result is that all other options besides +option) is not supported\&. Currently, if you attempt to do so, the usual result is that all other options besides \fB\-\-configinfo\fR or \fB\-\-xml\fR @@ -1086,14 +1097,13 @@ are simply ignored\&. \fIHowever, this behavior is not guaranteed and is subject to change at any time\fR\&. In addition, since \fBndb_config\fR, when used with the \fB\-\-configinfo\fR -option, does not access the MySQL Cluster or read any files, trying to specify additional options such as +option, does not access the NDB Cluster or read any files, trying to specify additional options such as \fB\-\-ndb\-connectstring\fR or \fB\-\-config\-file\fR with \fB\-\-configinfo\fR serves no purpose\&. -.RE Examples .sp .RS 4 @@ -1223,15 +1233,13 @@ In this example, we also used the short form to determine the attributes to be queried\&. .sp Similarly, you can limit results to a node with a specific ID using the -\fB\-\-id\fR -or \fB\-\-nodeid\fR option\&. .RE .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP @@ -1239,6 +1247,12 @@ This documentation is distributed in the hope that it will be useful, but WITHOU .PP You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. .sp +.SH "NOTES" +.IP " 1." 4 +--query-all +.RS 4 +\%http://dev.mysql.com/doc/refman/5.6/en/mysql-cluster-programs-ndb-config.html#option_ndb_config_query-all +.RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available diff --git a/man/ndb_cpcd.1 b/man/ndb_cpcd.1 index 576feb37194d..906b139f5cc2 100644 --- a/man/ndb_cpcd.1 +++ b/man/ndb_cpcd.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_cpcd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_CPCD\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_CPCD\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,11 +34,11 @@ ndb_cpcd \- automate testing of NDB (development use only) \fBndb_cpcd \fR\fB\fIoptions\fR\fR .SH "DESCRIPTION" .PP -A utility having this name was formerly part of an internal automated test framework used in testing and debugging MySQL Cluster\&. It was deprecated in MySQL Cluster NDB 7\&.0, and removed from MySQL Cluster distributions provided by Oracle beginning with MySQL Cluster NDB 7\&.2\&.1\&. +A utility having this name was formerly part of an internal automated test framework used in testing and debugging NDB Cluster\&. It was deprecated in NDB Cluster 7\&.0, and removed from NDB Cluster distributions provided by Oracle beginning with NDB 7\&.2\&.1\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_delete_all.1 b/man/ndb_delete_all.1 index 3e3c1db96381..9e917d977cc5 100644 --- a/man/ndb_delete_all.1 +++ b/man/ndb_delete_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_delete_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DELETE_ALL\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DELETE_ALL\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -61,15 +61,15 @@ TRUNCATE \fIdb_name\fR\&.\fItbl_name\fR in MySQL\&. .PP The following table includes options that are specific to -\fBndb_delete_all\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_delete_all\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_delete_all\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.75.\ \& This table describes command\-line options for the ndb_delete_all program +.B Table\ \&18.77.\ \& This table describes command\-line options for the ndb_delete_all program .TS allbox tab(:); . @@ -107,7 +107,7 @@ With very large tables, using this option may cause the number of operations ava .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_desc.1 b/man/ndb_desc.1 index d01f6348322c..404992bf1013 100644 --- a/man/ndb_desc.1 +++ b/man/ndb_desc.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_desc\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DESC\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DESC\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -50,7 +50,7 @@ ndb_desc \-c \fIconnection_string\fR \fItbl_name\fR \-d \fIdb_name\fR [\fIoption .RE .\} .PP -(\fIMySQL Cluster NDB 7\&.2\&.9 and later:\fR) +(\fINDB 7\&.2\&.9 and later:\fR) .sp .if n \{\ .RS 4 @@ -141,7 +141,7 @@ Information about multiple tables can be obtained in a single invocation of \fBndb_desc\fR by using their names, separated by spaces\&. All of the tables must be in the same database\&. .PP -Beginning with MySQL Cluster NDB 7\&.2\&.9, it is possible to obtain additional information about a specific index using the +Beginning with NDB 7\&.2\&.9, it is possible to obtain additional information about a specific index using the \fB\-\-table\fR (short form: \fB\-t\fR) option introduced in this version and supplying the name of the index as the first argument to @@ -240,7 +240,7 @@ ALTER TABLESPACE ts_1 .\} .PP (For more information on the statements just shown and the objects created by them, see -Section\ \&18.5.12.1, \(lqMySQL Cluster Disk Data Objects\(rq, as well as +Section\ \&18.5.12.1, \(lqNDB Cluster Disk Data Objects\(rq, as well as Section\ \&13.1.14, \(lqCREATE LOGFILE GROUP Syntax\(rq, and Section\ \&13.1.18, \(lqCREATE TABLESPACE Syntax\(rq\&.) .PP @@ -327,15 +327,15 @@ INFORMATION_SCHEMA\&.FILES table\&. .PP The following table includes options that are specific to -\fBndb_desc\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_desc\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_desc\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.76.\ \& This table describes command\-line options for the ndb_desc program +.B Table\ \&18.78.\ \& This table describes command\-line options for the ndb_desc program .TS allbox tab(:); . @@ -389,7 +389,7 @@ Specify the database in which the table should be found\&. \fB\-\-extra\-node\-info\fR, \fB\-n\fR .sp -Include information about the mappings between table partitions and the data nodes upon which they reside\&. This information can be useful for verifying distribution awareness mechanisms and supporting more efficient application access to the data stored in MySQL Cluster\&. +Include information about the mappings between table partitions and the data nodes upon which they reside\&. This information can be useful for verifying distribution awareness mechanisms and supporting more efficient application access to the data stored in NDB Cluster\&. .sp Use of this option also requires the use of the \fB\-\-extra\-partition\-info\fR @@ -437,7 +437,7 @@ Try to connect this many times before giving up\&. One connect attempt is made p .sp Specify the table in which to look for an index\&. .sp -This option was added in MySQL Cluster NDB 7\&.2\&.9\&. +This option was added in NDB 7\&.2\&.9\&. .RE .sp .RS 4 @@ -456,7 +456,7 @@ Use unqualified table names\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP @@ -468,7 +468,7 @@ You should have received a copy of the GNU General Public License along with the .IP " 1." 4 NDB Schema Object Versions .RS 4 -\%http://dev.mysql.com/doc/ndbapi/en/ndb-internals-schema-object-versions.html +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-internals-schema-object-versions.html .RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, diff --git a/man/ndb_drop_index.1 b/man/ndb_drop_index.1 index 63097b2880c3..d0bfd540e0d4 100644 --- a/man/ndb_drop_index.1 +++ b/man/ndb_drop_index.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_index\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_INDEX\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_INDEX\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -59,15 +59,15 @@ in the \fIdatabase\fR\&. .PP The following table includes options that are specific to -\fBndb_drop_index\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_drop_index\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_drop_index\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.77.\ \& This table describes command\-line options for the ndb_drop_index program +.B Table\ \&18.79.\ \& This table describes command\-line options for the ndb_drop_index program .TS allbox tab(:); . @@ -102,7 +102,7 @@ Enter password: ******* Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with \-A Welcome to the MySQL monitor\&. Commands end with ; or \eg\&. -Your MySQL connection id is 7 to server version: 5\&.5\&.51\-ndb\-7\&.2\&.26 +Your MySQL connection id is 7 to server version: 5\&.5\&.56\-ndb\-7\&.2\&.30 Type \*(Aqhelp;\*(Aq or \*(Aq\eh\*(Aq for help\&. Type \*(Aq\ec\*(Aq to clear the buffer\&. mysql> \fBSHOW TABLES;\fR +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ @@ -133,7 +133,7 @@ utility (see .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_drop_table.1 b/man/ndb_drop_table.1 index d9d088a3f99f..fc6f90ea44ad 100644 --- a/man/ndb_drop_table.1 +++ b/man/ndb_drop_table.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_drop_table\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_DROP_TABLE\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_DROP_TABLE\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -57,15 +57,15 @@ ndb_drop_table \-c \fIconnection_string\fR \fItbl_name\fR \-d \fIdb_name\fR .\} .PP The following table includes options that are specific to -\fBndb_drop_table\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndb_drop_table\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_drop_table\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.78.\ \& This table describes command\-line options for the ndb_drop_table program +.B Table\ \&18.80.\ \& This table describes command\-line options for the ndb_drop_table program .TS allbox tab(:); . @@ -74,7 +74,7 @@ allbox tab(:); .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_error_reporter.1 b/man/ndb_error_reporter.1 index 6300916739f4..5e0c8b402d6c 100644 --- a/man/ndb_error_reporter.1 +++ b/man/ndb_error_reporter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_error_reporter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_ERROR_REPORTE" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_ERROR_REPORTE" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,17 +36,17 @@ ndb_error_reporter \- NDB error\-reporting utility .PP \fBndb_error_reporter\fR creates an archive from data node and management node log files that can be used to help diagnose bugs or other problems with a cluster\&. -\fIIt is highly recommended that you make use of this utility when filing reports of bugs in MySQL Cluster\fR\&. +\fIIt is highly recommended that you make use of this utility when filing reports of bugs in NDB Cluster\fR\&. .PP -The following table includes command options specific to the MySQL Cluster program -\fBndb_error_reporter\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +The following table includes command options specific to the NDB Cluster program +\fBndb_error_reporter\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_error_reporter\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .PP \fBndb_error_reporter\fR did not support the \fB\-\-help\fR -option prior to MySQL Cluster NDB 7\&.2\&.14 (Bug #11756666, Bug #48606)\&. The +option prior to NDB 7\&.2\&.14 (Bug #11756666, Bug #48606)\&. The \fB\-\-connection\-timeout\fR \fB\-\-dry\-scp\fR, and \fB\-\-skip\-nodegroup\fR @@ -56,7 +56,7 @@ options were also added in this release (Bug #16602002)\&. .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.79.\ \& This table describes command\-line options for the ndb_error_reporter program +.B Table\ \&18.81.\ \& This table describes command\-line options for the ndb_error_reporter program .TS allbox tab(:); . @@ -255,7 +255,7 @@ Skip all nodes belong to the node group having the supplied node group ID\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_index_stat.1 b/man/ndb_index_stat.1 index 8c5ce3427b71..a00ec7a62e44 100644 --- a/man/ndb_index_stat.1 +++ b/man/ndb_index_stat.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_index_stat\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_INDEX_STAT\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_INDEX_STAT\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -156,17 +156,17 @@ shell> .\} .sp Options.PP -The following table includes options that are specific to the MySQL Cluster +The following table includes options that are specific to the NDB Cluster \fBndb_index_stat\fR -utility\&. Additional descriptions are listed following the table\&. For options common to most MySQL Cluster programs (including +utility\&. Additional descriptions are listed following the table\&. For options common to most NDB Cluster programs (including \fBndb_index_stat\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.80.\ \& This table describes command\-line options for the ndb_index_stat program +.B Table\ \&18.82.\ \& This table describes command\-line options for the ndb_index_stat program .TS allbox tab(:); . @@ -835,7 +835,7 @@ Repeat commands this number of times (for use in testing)\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_mgm.1 b/man/ndb_mgm.1 index fe385534a6b4..e10894da3640 100644 --- a/man/ndb_mgm.1 +++ b/man/ndb_mgm.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgm\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGM\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGM\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,7 +28,7 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -ndb_mgm \- the MySQL Cluster management client +ndb_mgm \- the NDB Cluster management client .SH "SYNOPSIS" .HP \w'\fBndb_mgm\ \fR\fB\fIoptions\fR\fR\ 'u \fBndb_mgm \fR\fB\fIoptions\fR\fR @@ -67,16 +67,16 @@ The default host name and port number are localhost and 1186, respectively\&. .PP -The following table includes options that are specific to the MySQL Cluster management client program -\fBndb_mgm\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +The following table includes options that are specific to the NDB Cluster management client program +\fBndb_mgm\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_mgm\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.72.\ \& This table describes command\-line options for the ndb_mgm program +.B Table\ \&18.74.\ \& This table describes command\-line options for the ndb_mgm program .TS allbox tab(:); . @@ -103,7 +103,7 @@ T}:T{ T} .TE .sp 1 -This option can be used to send a command to the MySQL Cluster management client from the system shell\&. For example, either of the following is equivalent to executing +This option can be used to send a command to the NDB Cluster management client from the system shell\&. For example, either of the following is equivalent to executing SHOW in the management client: .sp @@ -198,11 +198,11 @@ before giving up and reporting an error instead\&. Additional information about using \fBndb_mgm\fR can be found in -Section\ \&18.5.2, \(lqCommands in the MySQL Cluster Management Client\(rq\&. +Section\ \&18.5.2, \(lqCommands in the NDB Cluster Management Client\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_mgmd.8 b/man/ndb_mgmd.8 index 9d7e938814d7..7f4d6f568a47 100644 --- a/man/ndb_mgmd.8 +++ b/man/ndb_mgmd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndb_mgmd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_MGMD\FR" "8" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_MGMD\FR" "8" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,7 +28,7 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -ndb_mgmd \- the MySQL Cluster management server daemon +ndb_mgmd \- the NDB Cluster management server daemon .SH "SYNOPSIS" .HP \w'\fBndb_mgmd\ \fR\fB\fIoptions\fR\fR\ 'u \fBndb_mgmd \fR\fB\fIoptions\fR\fR @@ -36,16 +36,16 @@ ndb_mgmd \- the MySQL Cluster management server daemon .PP The management server is the process that reads the cluster configuration file and distributes this information to all nodes in the cluster that request it\&. It also maintains a log of cluster activities\&. Management clients can connect to the management server and check the cluster\*(Aqs status\&. .PP -The following table includes options that are specific to the MySQL Cluster management server program -\fBndb_mgmd\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +The following table includes options that are specific to the NDB Cluster management server program +\fBndb_mgmd\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_mgmd\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.71.\ \& This table describes command\-line options for the ndb_mgmd program +.B Table\ \&18.73.\ \& This table describes command\-line options for the ndb_mgmd program .TS allbox tab(:); . @@ -60,7 +60,7 @@ allbox tab(:); .sp -1 .IP \(bu 2.3 .\} -\fB\-\-bind\-address=\fR\fB\fIhost\fR\fR\fB[:\fR\fB\fIport\fR\fR\fB]\fR +\fB\-\-bind\-address=\fR\fB\fIhost\fR\fR .TS allbox tab(:); l l s s @@ -69,7 +69,7 @@ l l l s T{ \fBCommand\-Line Format\fR T}:T{ -\-\-bind\-address=ip_address +\-\-bind\-address=host T} T{ \fBPermitted Values\fR @@ -85,12 +85,7 @@ T}:T{ T} .TE .sp 1 -When specified, this option limits management server connections by management clients to clients at the specified host name or IP address (and possibly port, if this is also specified)\&. In such cases, a management client attempting to connect to the management server from any other address fails with the error -Unable to setup port: \fIhost\fR:\fIport\fR! -.sp -If the -\fIport\fR -is not specified, the management client attempts to use port 1186\&. +Causes the management server to bind to a specific network interface (host name or IP address)\&. This option has no default value\&. .RE .sp .RS 4 @@ -213,7 +208,7 @@ TRUE, or ON), can be used to disable the management server\*(Aqs configuration cache, so that it reads its configuration from config\&.ini every time it starts (see -Section\ \&18.3.3, \(lqMySQL Cluster Configuration Files\(rq)\&. You can do this by starting the +Section\ \&18.3.3, \(lqNDB Cluster Configuration Files\(rq)\&. You can do this by starting the \fBndb_mgmd\fR process with any one of the following options: .sp @@ -316,7 +311,7 @@ or \fB\-\-skip\-config\-cache\fR option that was used previously to disable the configuration cache\&. .sp -Beginning with MySQL Cluster NDB 7\&.2\&.5, +Beginning with NDB 7\&.2\&.5, \fBndb_mgmd\fR no longer checks for the configuration directory (\fB\-\-configdir\fR) or attempts to create one when \fB\-\-skip\-config\-cache\fR @@ -373,11 +368,11 @@ option, or because the management server could not find any configuration cache\ \fBndb_mgmd\fR was started with \fB\-\-config\-cache=OFF\fR\&. See -Section\ \&18.3.3, \(lqMySQL Cluster Configuration Files\(rq, for more information\&. +Section\ \&18.3.3, \(lqNDB Cluster Configuration Files\(rq, for more information\&. .sp Formerly, using this option together with \fB\-\-initial\fR -caused removal of the configuration cache even if the file was not found\&. This issue was resolved in MySQL Cluster NDB 7\&.2\&.13\&. (Bug #1299289) +caused removal of the configuration cache even if the file was not found\&. This issue was resolved in NDB 7\&.2\&.13\&. (Bug #1299289) .RE .sp .RS 4 @@ -498,7 +493,7 @@ Starts \fBndb_mgmd\fR in interactive mode; that is, an \fBndb_mgm\fR -client session is started as soon as the management server is running\&. This option does not start any other MySQL Cluster nodes\&. +client session is started as soon as the management server is running\&. This option does not start any other NDB Cluster nodes\&. .RE .sp .RS 4 @@ -535,7 +530,7 @@ T} .TE .sp 1 Configuration data is cached internally, rather than being read from the cluster global configuration file each time the management server is started (see -Section\ \&18.3.3, \(lqMySQL Cluster Configuration Files\(rq)\&. Using the +Section\ \&18.3.3, \(lqNDB Cluster Configuration Files\(rq)\&. Using the \fB\-\-initial\fR option overrides this behavior, by forcing the management server to delete any existing cache files, and then to re\-read the configuration data from the cluster configuration file and to build a new cache\&. .sp @@ -553,16 +548,16 @@ is invoked with \fB\-\-initial\fR but cannot find a global configuration file, the management server cannot start\&. .sp -When a management server starts, it checks for another management server in the same MySQL Cluster and tries to use the other management server\*(Aqs configuration data; +When a management server starts, it checks for another management server in the same NDB Cluster and tries to use the other management server\*(Aqs configuration data; \fBndb_mgmd\fR ignores \fB\-\-initial\fR -unless it is the only management server running\&. This behavior also has implications when performing a rolling restart of a MySQL Cluster with multiple management nodes\&. See -Section\ \&18.5.5, \(lqPerforming a Rolling Restart of a MySQL Cluster\(rq, for more information\&. +unless it is the only management server running\&. This behavior also has implications when performing a rolling restart of an NDB Cluster with multiple management nodes\&. See +Section\ \&18.5.5, \(lqPerforming a Rolling Restart of an NDB Cluster\(rq, for more information\&. .sp Formerly, using this option together with the \fB\-\-config\-file\fR -option caused removal of the configuration cache even if the file was not found\&. Starting with MySQL Cluster NDB 7\&.2\&.13, the cache is cleared in such cases only if the configuration file is actually found\&. (Bug #1299289) +option caused removal of the configuration cache even if the file was not found\&. Starting with NDB 7\&.2\&.13, the cache is cleared in such cases only if the configuration file is actually found\&. (Bug #1299289) .RE .sp .RS 4 @@ -717,8 +712,8 @@ FALSE T} .TE .sp 1 -In MySQL Cluster NDB 7\&.2, configuration data is stored internally rather than being read from the cluster global configuration file each time the management server is started (see -Section\ \&18.3.3, \(lqMySQL Cluster Configuration Files\(rq)\&. Using this option forces the management server to check its internal data store against the cluster configuration file and to reload the configuration if it finds that the configuration file does not match the cache\&. Existing configuration cache files are preserved, but not used\&. +In NDB Cluster 7\&.2, configuration data is stored internally rather than being read from the cluster global configuration file each time the management server is started (see +Section\ \&18.3.3, \(lqNDB Cluster Configuration Files\(rq)\&. Using this option forces the management server to check its internal data store against the cluster configuration file and to reload the configuration if it finds that the configuration file does not match the cache\&. Existing configuration cache files are preserved, but not used\&. .sp This differs in two ways from the \fB\-\-initial\fR @@ -732,12 +727,12 @@ If the management server cannot find a global configuration file, then the \fB\-\-reload\fR option is ignored\&. .sp -When a management server starts, it checks for another management server in the same MySQL Cluster and tries to use the other management server\*(Aqs configuration data; +When a management server starts, it checks for another management server in the same NDB Cluster and tries to use the other management server\*(Aqs configuration data; \fBndb_mgmd\fR ignores \fB\-\-reload\fR -unless it is the only management server running\&. This behavior also has implications when performing a rolling restart of a MySQL Cluster with multiple management nodes\&. See -Section\ \&18.5.5, \(lqPerforming a Rolling Restart of a MySQL Cluster\(rq, for more information\&. +unless it is the only management server running\&. This behavior also has implications when performing a rolling restart of an NDB Cluster with multiple management nodes\&. See +Section\ \&18.5.5, \(lqPerforming a Rolling Restart of an NDB Cluster\(rq, for more information\&. .RE .sp .RS 4 @@ -784,7 +779,7 @@ T}:T{ T} .TE .sp 1 -When starting a MySQL Cluster is configured with two management nodes, each management server normally checks to see whether the other +When starting an NDB Cluster is configured with two management nodes, each management server normally checks to see whether the other \fBndb_mgmd\fR is also operational and whether the other management server\*(Aqs configuration is identical to its own\&. However, it is sometimes desirable to start the cluster with only one management node (and perhaps to allow the other \fBndb_mgmd\fR @@ -862,8 +857,8 @@ shell> \fBndbd \-c 192\&.168\&.0\&.150,192\&.168\&.0\&.151\fR .sp The same is true with regard to the connection string used with any \fBmysqld\fR -processes that you wish to start as MySQL Cluster SQL nodes connected to this cluster\&. See -Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq, for more information\&. +processes that you wish to start as NDB Cluster SQL nodes connected to this cluster\&. See +Section\ \&18.3.3.3, \(lqNDB Cluster Connection Strings\(rq, for more information\&. .sp When used with \fBndb_mgmd\fR, this option affects the behavior of the management node with regard to other management nodes only\&. Do not confuse it with the @@ -874,7 +869,7 @@ or \fBndbmtd\fR to permit a cluster to start with fewer than its full complement of data nodes; when used with data nodes, this option affects their behavior only with regard to other data nodes\&. .sp -Multiple management node IDs may be passed to this option as a comma\-separated list\&. Each node ID must be no less than 1 and no greater than 255\&. In practice, it is quite rare to use more than two management servers for the same MySQL Cluster (or to have any need for doing so); in most cases you need to pass to this option only the single node ID for the one management server that you do not wish to use when starting the cluster\&. +Multiple management node IDs may be passed to this option as a comma\-separated list\&. Each node ID must be no less than 1 and no greater than 255\&. In practice, it is quite rare to use more than two management servers for the same NDB Cluster (or to have any need for doing so); in most cases you need to pass to this option only the single node ID for the one management server that you do not wish to use when starting the cluster\&. .if n \{\ .sp .\} @@ -897,7 +892,7 @@ management server, its configuration must match that of the management server th It is not strictly necessary to specify a connection string when starting the management server\&. However, if you are using more than one management server, a connection string should be provided and each node in the cluster should specify its node ID explicitly\&. .PP See -Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq, for information about using connection strings\&. +Section\ \&18.3.3.3, \(lqNDB Cluster Connection Strings\(rq, for information about using connection strings\&. \fBndb_mgmd\fR(8), describes other options for \fBndb_mgmd\fR\&. .PP @@ -921,7 +916,7 @@ is the unique node identifier\&. .\} config\&.ini is the configuration file for the cluster as a whole\&. This file is created by the user and read by the management server\&. -Section\ \&18.3, \(lqConfiguration of MySQL Cluster\(rq, discusses how to set up this file\&. +Section\ \&18.3, \(lqConfiguration of NDB Cluster\(rq, discusses how to set up this file\&. .RE .sp .RS 4 @@ -934,7 +929,7 @@ Section\ \&18.3, \(lqConfiguration of MySQL Cluster\(rq, discusses how to set up .\} ndb_\fInode_id\fR_cluster\&.log is the cluster events log file\&. Examples of such events include checkpoint startup and completion, node startup events, node failures, and levels of memory usage\&. A complete listing of cluster events with descriptions may be found in -Section\ \&18.5, \(lqManagement of MySQL Cluster\(rq\&. +Section\ \&18.5, \(lqManagement of NDB Cluster\(rq\&. .sp By default, when the size of the cluster log reaches one million bytes, the file is renamed to ndb_\fInode_id\fR_cluster\&.log\&.\fIseq_id\fR, where @@ -1088,7 +1083,7 @@ option has no effect on non\-Windows platforms\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_print_backup_file.1 b/man/ndb_print_backup_file.1 index 322876cdd182..ee562f324a9a 100644 --- a/man/ndb_print_backup_file.1 +++ b/man/ndb_print_backup_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_backup_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_BACKUP_" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_BACKUP_" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -56,7 +56,7 @@ file) found in a cluster backup directory\&. These files are found in the data n BACKUP\-\fI#\fR, where \fI#\fR is the sequence number for the backup\&. For more information about cluster backup files and their contents, see -Section\ \&18.5.3.1, \(lqMySQL Cluster Backup Concepts\(rq\&. +Section\ \&18.5.3.1, \(lqNDB Cluster Backup Concepts\(rq\&. .PP Like \fBndb_print_schema_file\fR @@ -72,7 +72,7 @@ None\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_print_file.1 b/man/ndb_print_file.1 index 24f87951368c..562c75d5e8f5 100644 --- a/man/ndb_print_file.1 +++ b/man/ndb_print_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_FILE\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_FILE\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -35,7 +35,7 @@ ndb_print_file \- print NDB Disk Data file contents .SH "DESCRIPTION" .PP \fBndb_print_file\fR -obtains information from a MySQL Cluster Disk Data file\&. +obtains information from an NDB Cluster Disk Data file\&. Usage .sp .if n \{\ @@ -49,7 +49,7 @@ ndb_print_file [\-v] [\-q] \fIfile_name\fR+ .\} .PP \fIfile_name\fR -is the name of a MySQL Cluster Disk Data file\&. Multiple filenames are accepted, separated by spaces\&. +is the name of an NDB Cluster Disk Data file\&. Multiple filenames are accepted, separated by spaces\&. .PP Like \fBndb_print_schema_file\fR @@ -59,7 +59,7 @@ and NDB utilities that are intended to be run on a management server host or to connect to a management server) \fBndb_print_file\fR -must be run on a MySQL Cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. +must be run on an NDB Cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. Additional Options.PP \fBndb_print_file\fR supports the following options: @@ -98,15 +98,15 @@ supports the following options: \fB\-h\fR, \fB\-?\fR: Print help message\&. .sp -This option did not work correctly prior to MySQL Cluster NDB 7\&.2\&.18\&. (Bug #17069285) +This option did not work correctly prior to NDB 7\&.2\&.18\&. (Bug #17069285) .RE .PP For more information, see -Section\ \&18.5.12, \(lqMySQL Cluster Disk Data Tables\(rq\&. +Section\ \&18.5.12, \(lqNDB Cluster Disk Data Tables\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_print_schema_file.1 b/man/ndb_print_schema_file.1 index 2badc4628e1b..4e57c50d2c5a 100644 --- a/man/ndb_print_schema_file.1 +++ b/man/ndb_print_schema_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_schema_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SCHEMA_" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SCHEMA_" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -50,7 +50,7 @@ ndb_print_schema_file \fIfile_name\fR .PP \fIfile_name\fR is the name of a cluster schema file\&. For more information about cluster schema files, see -\m[blue]\fBMySQL Cluster Data Node File System Directory Files\fR\m[]\&\s-2\u[1]\d\s+2\&. +\m[blue]\fBNDB Cluster Data Node File System Directory Files\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP Like \fBndb_print_backup_file\fR @@ -66,7 +66,7 @@ None\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP @@ -76,9 +76,9 @@ You should have received a copy of the GNU General Public License along with the .sp .SH "NOTES" .IP " 1." 4 -MySQL Cluster Data Node File System Directory Files +NDB Cluster Data Node File System Directory Files .RS 4 -\%http://dev.mysql.com/doc/ndbapi/en/ndb-internals-ndbd-filesystemdir-files.html +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-internals-ndbd-filesystemdir-files.html .RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, diff --git a/man/ndb_print_sys_file.1 b/man/ndb_print_sys_file.1 index 40f49ffaada4..58c3b9e01df9 100644 --- a/man/ndb_print_sys_file.1 +++ b/man/ndb_print_sys_file.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_print_sys_file\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_PRINT_SYS_FIL" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_PRINT_SYS_FIL" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -35,7 +35,7 @@ ndb_print_sys_file \- print NDB system file contents .SH "DESCRIPTION" .PP \fBndb_print_sys_file\fR -obtains diagnostic information from a MySQL Cluster system file\&. +obtains diagnostic information from an NDB Cluster system file\&. Usage .sp .if n \{\ @@ -53,7 +53,7 @@ is the name of a cluster system file (sysfile)\&. Cluster system files are locat ndb_\fI#\fR_fs/D\fI#\fR/DBDIH/P\fI#\fR\&.sysfile\&. In each case, the \fI#\fR represents a number (not necessarily the same number)\&. For more information, see -\m[blue]\fBMySQL Cluster Data Node File System Directory Files\fR\m[]\&\s-2\u[1]\d\s+2\&. +\m[blue]\fBNDB Cluster Data Node File System Directory Files\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP Like \fBndb_print_backup_file\fR @@ -69,7 +69,7 @@ None\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP @@ -79,9 +79,9 @@ You should have received a copy of the GNU General Public License along with the .sp .SH "NOTES" .IP " 1." 4 -MySQL Cluster Data Node File System Directory Files +NDB Cluster Data Node File System Directory Files .RS 4 -\%http://dev.mysql.com/doc/ndbapi/en/ndb-internals-ndbd-filesystemdir-files.html +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-internals-ndbd-filesystemdir-files.html .RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, diff --git a/man/ndb_restore.1 b/man/ndb_restore.1 index c771016994f1..d9c76c4bb1c3 100644 --- a/man/ndb_restore.1 +++ b/man/ndb_restore.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_restore\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_RESTORE\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_RESTORE\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,7 +28,7 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -ndb_restore \- restore a MySQL Cluster backup +ndb_restore \- restore an NDB Cluster backup .SH "SYNOPSIS" .HP \w'\fBndb_restore\ \fR\fB\fIoptions\fR\fR\ 'u \fBndb_restore \fR\fB\fIoptions\fR\fR @@ -43,7 +43,7 @@ directory\&. This program reads the files created as a result of the backup and must be executed once for each of the backup files that were created by the START BACKUP command used to create the backup (see -Section\ \&18.5.3.2, \(lqUsing The MySQL Cluster Management Client to Create a Backup\(rq)\&. This is equal to the number of data nodes in the cluster at the time that the backup was created\&. +Section\ \&18.5.3.2, \(lqUsing The NDB Cluster Management Client to Create a Backup\(rq)\&. This is equal to the number of data nodes in the cluster at the time that the backup was created\&. .if n \{\ .sp .\} @@ -59,20 +59,20 @@ Section\ \&18.5.3.2, \(lqUsing The MySQL Cluster Management Client to Create a B .PP Before using \fBndb_restore\fR, it is recommended that the cluster be running in single user mode, unless you are restoring multiple data nodes in parallel\&. See -Section\ \&18.5.8, \(lqMySQL Cluster Single User Mode\(rq, for more information\&. +Section\ \&18.5.8, \(lqNDB Cluster Single User Mode\(rq, for more information\&. .sp .5v .RE .PP -The following table includes options that are specific to the MySQL Cluster native backup restoration program -\fBndb_restore\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +The following table includes options that are specific to the NDB Cluster native backup restoration program +\fBndb_restore\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_restore\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.82.\ \& This table describes command\-line options for the ndb_restore program +.B Table\ \&18.85.\ \& This table describes command\-line options for the ndb_restore program .TS allbox tab(:); . @@ -92,7 +92,7 @@ ndb_restore [\-c \fIconnection_string\fR] \-n \fInode_id\fR \-b \fIbackup_id\fR .RE .\} .PP -Normally, when restoring from a MySQL Cluster backup, +Normally, when restoring from an NDB Cluster backup, \fBndb_restore\fR requires at a minimum the \fB\-\-nodeid\fR @@ -109,7 +109,7 @@ The option is used to specify a connection string which tells ndb_restore where to locate the cluster management server\&. (See -Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq, for information on connection strings\&.) If this option is not used, then +Section\ \&18.3.3.3, \(lqNDB Cluster Connection Strings\(rq, for information on connection strings\&.) If this option is not used, then \fBndb_restore\fR attempts to connect to a management server on localhost:1186\&. This utility acts as a cluster API node, and so requires a free connection @@ -127,7 +127,7 @@ or section in config\&.ini that is not being used for a MySQL server or other application for this reason (see -Section\ \&18.3.3.7, \(lqDefining SQL and Other API Nodes in a MySQL Cluster\(rq)\&. +Section\ \&18.3.3.7, \(lqDefining SQL and Other API Nodes in an NDB Cluster\(rq)\&. .PP You can verify that \fBndb_restore\fR @@ -151,17 +151,348 @@ The \fB\-\-nodeid\fR or \fB\-n\fR -is used to specify the node ID of the data node on which the backup should be restored\&. +is used to specify the node ID of the data node on which the backup was taken\&. .PP -The first time you run the -\fBndb_restore\fR -restoration program, you also need to restore the metadata\&. In other words, you must re\-create the database tables\(emthis can be done by running it with the -\fB\-\-restore_meta\fR -(\fB\-m\fR) option\&. Restoring the metdata need be done only on a single data node; this is sufficient to restore it to the entire cluster\&. Note that the cluster should have an empty database when starting to restore a backup\&. (In other words, you should start -\fBndbd\fR -with +When restoring to a cluster with different number of data nodes from that where the backup was taken, this information helps identify the correct set or sets of files to be restored to a given node\&. (In such cases, multiple files usually need to be restored to a single data node\&.) The next few paragraphs provide an example\&. +.PP +\fBRestore to a different number of data nodes\fR. You can restore to a cluster having fewer data nodes than the original provided that the larger number of nodes is an even multiple of the smaller number\&. In the following example, we use a backup taken on a cluster having four data nodes to a cluster having two data nodes\&. +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +The management server for the original cluster is on host +host10\&. The original cluster has four data nodes, with the node IDs and host names shown in the following extract from the management server\*(Aqs +config\&.ini +file: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[ndbd] +NodeId=2 +HostName=host2 +[ndbd] +NodeId=4 +HostName=host4 +[ndbd] +NodeId=6 +HostName=host6 +[ndbd] +NodeId=8 +HostName=host8 +.fi +.if n \{\ +.RE +.\} +.sp +We assume that each data node was originally started with +\fBndbmtd\fR +\fB\-\-ndb\-connectstring=host10\fR +or the equivalent\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +Perform a backup in the normal manner\&. See +Section\ \&18.5.3.2, \(lqUsing The NDB Cluster Management Client to Create a Backup\(rq, for information about how to do this\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 3.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 3." 4.2 +.\} +The files created by the backup on each data node are listed here, where +\fIN\fR +is the node ID and +\fIB\fR +is the backup ID\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-\fIB\fR\-0\&.\fIN\fR\&.Data +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-\fIB\fR\&.\fIN\fR\&.ctl +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-\fIB\fR\&.\fIN\fR\&.log +.RE +.sp +These files are found under +BackupDataDir/BACKUP/BACKUP\-\fIB\fR, on each data node\&. For the rest of this example, we assume that the backup ID is 1\&. +.sp +Have all of these files available for later copying to the new data nodes (where they can be accessed on the data node\*(Aqs local file system by +\fBndb_restore\fR)\&. It is simplest to copy them all to a single location; we assume that this is what you have done\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 4.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 4." 4.2 +.\} +The management server for the target cluster is on host +host20, and the target has two data nodes, with the node IDs and host names shown, from the management server +config\&.ini +file on +host20: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[ndbd] +NodeId=3 +hostname=host3 +[ndbd] +NodeId=5 +hostname=host5 +.fi +.if n \{\ +.RE +.\} +.sp +Each of the data node processes on +host3 +and +host5 +should be started with +\fBndbmtd\fR +\fB\-c host20\fR \fB\-\-initial\fR -prior to performing the restore\&.) +or the equivalent, so that the new (target) cluster starts with clean data node file systems\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 5.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 5." 4.2 +.\} +Copy two different sets of two backup files to each of the target data nodes\&. For this example, copy the backup files from nodes 2 and 6 from the original cluster to node 3 in the target cluster\&. These files are listed here: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\-0\&.2\&.Data +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.2\&.ctl +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.2\&.log +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\-0\&.6\&.Data +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.6\&.ctl +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.6\&.log +.RE +.sp +Then copy the backup files from nodes 4 and 8 to node 5; these files are shown in the following list: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\-0\&.4\&.Data +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.4\&.ctl +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.4\&.log +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\-0\&.8\&.Data +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.8\&.ctl +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.8\&.log +.RE +.sp +For the remainder of this example, we assume that the respective backup files have been saved to the directory +/BACKUP\-1 +on each of nodes 3 and 5\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 6.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 6." 4.2 +.\} +On each of the two target data nodes, you must restore from both sets of backups\&. First, restore the backups from nodes 2 and 6 to node 3 by invoking +\fBndb_restore\fR +on +host3 +as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_restore \-c host20 \fR\fB\fB\-\-nodeid=2\fR\fR\fB \fR\fB\fB\-\-backupid=1\fR\fR\fB \fR\fB\fB\-\-restore_data\fR\fR\fB \fR\fB\fB\-\-backup_path=/BACKUP\-1\fR\fR +shell> \fBndb_restore \-c host20 \-\-nodeid=4 \-\-backupid=1 \-\-restore_data \-\-backup_path=/BACKUP\-1\fR +.fi +.if n \{\ +.RE +.\} +.sp +Then restore the backups from nodes 4 and 8 to node 5 by invoking +\fBndb_restore\fR +on +host5, like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_restore \-c host20 \-\-nodeid=6 \-\-backupid=1 \-\-restore_data \-\-backup_path=/BACKUP\-1\fR +shell> \fBndb_restore \-c host20 \-\-nodeid=8 \-\-backupid=1 \-\-restore_data \-\-backup_path=/BACKUP\-1\fR +.fi +.if n \{\ +.RE +.\} +.RE .PP It is possible to restore data without restoring table metadata\&. The default behavior when doing this is for \fBndb_restore\fR @@ -285,13 +616,13 @@ option (short form \fB\-A\fR) when restoring the table data\&. Attribute promotion does not occur if this option is not used; instead, the restore operation fails with an error\&. .RE .PP -Prior to MySQL Cluster NDB 7\&.2\&.14, conversions between character data types and +Prior to NDB 7\&.2\&.14, conversions between character data types and TEXT or BLOB were not handled correctly (Bug #17325051)\&. .PP -Prior to MySQL Cluster NDB 7\&.2\&.18, demotion of +Prior to NDB 7\&.2\&.18, demotion of TEXT to TINYTEXT @@ -317,7 +648,7 @@ in the same invocation of .PP Converting between TEXT -columns using different character sets is not supported\&. Beginning with MySQL Cluster NDB 7\&.2\&.18, it is expressly disallowed (Bug #18875137)\&. +columns using different character sets is not supported\&. Beginning with NDB 7\&.2\&.18, it is expressly disallowed (Bug #18875137)\&. .PP When performing conversions of character or binary types to TEXT @@ -413,7 +744,7 @@ The option is used to specify the ID or sequence number of the backup, and is the same number shown by the management client in the Backup \fIbackup_id\fR completed message displayed upon completion of a backup\&. (See -Section\ \&18.5.3.2, \(lqUsing The MySQL Cluster Management Client to Create a Backup\(rq\&.) +Section\ \&18.5.3.2, \(lqUsing The NDB Cluster Management Client to Create a Backup\(rq\&.) .if n \{\ .sp .\} @@ -433,14 +764,14 @@ When restoring cluster backups, you must be sure to restore all data nodes from .PP \fB\-\-restore_epoch\fR (short form: -\fB\-e\fR) adds (or restores) epoch information to the cluster replication status table\&. This is useful for starting replication on a MySQL Cluster replication slave\&. When this option is used, the row in the +\fB\-e\fR) adds (or restores) epoch information to the cluster replication status table\&. This is useful for starting replication on an NDB Cluster replication slave\&. When this option is used, the row in the mysql\&.ndb_apply_status having 0 in the id column is updated if it already exists; such a row is inserted if it does not already exist\&. (See -Section\ \&18.6.9, \(lqMySQL Cluster Backups With MySQL Cluster Replication\(rq\&.) +Section\ \&18.6.9, \(lqNDB Cluster Backups With NDB Cluster Replication\(rq\&.) .PP \fB\-\-restore_data\fR .PP @@ -456,19 +787,45 @@ This option causes \fBndb_restore\fR to print NDB -table metadata\&. Generally, you need only use this option when restoring the first data node of a cluster; additional data nodes can obtain the metadata from the first one\&. +table metadata\&. +.PP +The first time you run the +\fBndb_restore\fR +restoration program, you also need to restore the metadata\&. In other words, you must re\-create the database tables\(emthis can be done by running it with the +\fB\-\-restore_meta\fR +(\fB\-m\fR) option\&. Restoring the metadata need be done only on a single data node; this is sufficient to restore it to the entire cluster\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +The cluster should have an empty database when starting to restore a backup\&. (In other words, you should start +\fBndbd\fR +with +\fB\-\-initial\fR +prior to performing the restore\&.) +.sp .5v +.RE .PP \fB\-\-restore\-privilege\-tables\fR .PP \fBndb_restore\fR -does not by default restore distributed MySQL privilege tables (MySQL Cluster NDB 7\&.2\&.0 and later)\&. This option causes +does not by default restore distributed MySQL privilege tables (NDB 7\&.2\&.0 and later)\&. This option causes \fBndb_restore\fR to restore the privilege tables\&. .PP This works only if the privilege tables were converted to NDB before the backup was taken\&. For more information, see -Section\ \&18.5.14, \(lqDistributed MySQL Privileges for MySQL Cluster\(rq\&. +Section\ \&18.5.14, \(lqDistributed MySQL Privileges for NDB Cluster\(rq\&. .PP \fB\-\-backup_path\fR .PP @@ -495,7 +852,7 @@ and must be run twice\(emonce for each database node in the cluster where the backup was taken\&. However, \fBndb_restore\fR cannot always restore backups made from a cluster running one version of MySQL to a cluster running a different MySQL version\&. See -Section\ \&18.2.7, \(lqUpgrading and Downgrading MySQL Cluster NDB 7.2\(rq, for more information\&. +Section\ \&18.2.7, \(lqUpgrading and Downgrading NDB Cluster 7.2\(rq, for more information\&. .if n \{\ .sp .\} @@ -509,14 +866,14 @@ Section\ \&18.2.7, \(lqUpgrading and Downgrading MySQL Cluster NDB 7.2\(rq, for .ps -1 .br .PP -It is not possible to restore a backup made from a newer version of MySQL Cluster using an older version of +It is not possible to restore a backup made from a newer version of NDB Cluster using an older version of \fBndb_restore\fR\&. You can restore a backup made from a newer version of MySQL to an older cluster, but you must use a copy of \fBndb_restore\fR -from the newer MySQL Cluster version to do so\&. +from the newer NDB Cluster version to do so\&. .PP -For example, to restore a cluster backup taken from a cluster running MySQL Cluster NDB 7\&.2\&.5 to a cluster running MySQL Cluster NDB 7\&.1\&.21, you must use the +For example, to restore a cluster backup taken from a cluster running NDB 7\&.2\&.5 to a cluster running NDB 7\&.1\&.21, you must use the \fBndb_restore\fR -that comes with the MySQL Cluster NDB 7\&.2\&.5 distribution\&. +that comes with the NDB 7\&.2\&.5 distribution\&. .sp .5v .RE .PP @@ -554,7 +911,7 @@ stdout\&. TEXT and BLOB -column values are always truncated\&. In MySQL Cluster NDB 7\&.2\&.18 and earlier, such values are truncated to the first 240 bytes in the output; in MySQL Cluster NDB 7\&.2\&.19 and later, they are truncated to 256 bytes\&. (Bug #14571512, Bug #65467) This cannot currently be overridden when using +column values are always truncated\&. In NDB 7\&.2\&.18 and earlier, such values are truncated to the first 240 bytes in the output; in NDB 7\&.2\&.19 and later, they are truncated to 256 bytes\&. (Bug #14571512, Bug #65467) This cannot currently be overridden when using \fB\-\-print_data\fR\&. .PP Several additional options are available for use with the @@ -858,7 +1215,7 @@ or any of the options is in effect performing a dry run\&. Including one or more of these options causes any output to be redirected to stdout; in such cases, \fBndb_restore\fR -makes no attempt to restore data or metadata to a MySQL Cluster\&. +makes no attempt to restore data or metadata to an NDB Cluster\&. .sp .5v .RE .PP @@ -890,8 +1247,8 @@ to their binary logs\&. .PP This option stops \fBndb_restore\fR -from restoring any MySQL Cluster Disk Data objects, such as tablespaces and log file groups; see -Section\ \&18.5.12, \(lqMySQL Cluster Disk Data Tables\(rq, for more information about these\&. +from restoring any NDB Cluster Disk Data objects, such as tablespaces and log file groups; see +Section\ \&18.5.12, \(lqNDB Cluster Disk Data Tables\(rq, for more information about these\&. .PP \fB\-\-parallelism=#\fR, \fB\-p\fR @@ -1024,7 +1381,7 @@ The following table shows several invocations of \fBndb_restore\fR using \fB\-\-include\-*\fR -options (other options possibly required have been omitted for clarity), and the effects these have on restoring from a MySQL Cluster backup: +options (other options possibly required have been omitted for clarity), and the effects these have on restoring from an NDB Cluster backup: .TS allbox tab(:); lB lB. @@ -1170,7 +1527,7 @@ This table shows several invocations of \fBndb_restore\fR usng \fB\-\-exclude\-*\fR -options (other options possibly required have been omitted for clarity), and the effects these options have on restoring from a MySQL Cluster backup: +options (other options possibly required have been omitted for clarity), and the effects these options have on restoring from an NDB Cluster backup: .TS allbox tab(:); lB lB. @@ -1370,7 +1727,7 @@ T} .TE .sp 1 .PP -Beginning with MySQL Cluster NDB 7\&.2\&.17, it is also possible to restore only selected tables columns using this option, which causes +Beginning with NDB 7\&.2\&.17, it is also possible to restore only selected tables columns using this option, which causes \fBndb_restore\fR to ignore any tables from the backup that are not found in the target database\&. .PP @@ -1409,7 +1766,7 @@ backup\&. The number of threads used for building ordered indexes by \fBndb_restore\fR with this option is controlled by the BuildIndexThreads -data node configuration parameter (MySQL Cluster NDB 6\&.3\&.30 and later; MySQL Cluster NDB 7\&.0\&.11 and later)\&. +data node configuration parameter (NDB 6\&.3\&.30 and later; NDB 7\&.0\&.11 and later)\&. .PP It is necessary to use this option only for the first run of \fBndb_restore\fR; this causes all ordered indexes to be rebuilt without using @@ -1469,7 +1826,7 @@ This option causes \fBndb_restore\fR to ignore any schema objects it does not recognize while reading a native NDB -backup\&. This can be used for restoring a backup made from a cluster running MySQL Cluster NDB 7\&.2 to a cluster running MySQL Cluster NDB 7\&.1\&. +backup\&. This can be used for restoring a backup made from a cluster running NDB Cluster 7\&.2 to a cluster running NDB Cluster 7\&.1\&. .PP \fB\-\-rewrite\-database=\fR\fB\fIold_dbname\fR\fR\fB,\fR\fB\fInew_dbname\fR\fR .TS @@ -1610,7 +1967,7 @@ by default\&. .PP The \fB\-\-exclude\-intermediate\-sql\-tables\fR -option was introduced in MySQL Cluster NDB 7\&.2\&.17\&. (Bug #17882305) +option was introduced in NDB 7\&.2\&.17\&. (Bug #17882305) .PP \fBError reporting\fR. \fBndb_restore\fR reports both temporary and permanent errors\&. In the case of temporary errors, it may able to recover from them, and reports @@ -1631,16 +1988,16 @@ in such cases\&. .PP After using \fBndb_restore\fR -to initialize a MySQL Cluster for use in circular replication, binary logs on the SQL node acting as the replication slave are not automatically created, and you must cause them to be created manually\&. To cause the binary logs to be created, issue a +to initialize an NDB Cluster for use in circular replication, binary logs on the SQL node acting as the replication slave are not automatically created, and you must cause them to be created manually\&. To cause the binary logs to be created, issue a SHOW TABLES statement on that SQL node before running -START SLAVE\&. This is a known issue in MySQL Cluster\&. +START SLAVE\&. This is a known issue in NDB Cluster\&. .sp .5v .RE .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_select_all.1 b/man/ndb_select_all.1 index 45148730335d..715982bc66fc 100644 --- a/man/ndb_select_all.1 +++ b/man/ndb_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_ALL\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_ALL\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -51,16 +51,16 @@ ndb_select_all \-c \fIconnection_string\fR \fItbl_name\fR \-d \fIdb_name\fR [> \ .RE .\} .PP -The following table includes options that are specific to the MySQL Cluster native backup restoration program -\fBndb_select_all\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +The following table includes options that are specific to the NDB Cluster native backup restoration program +\fBndb_select_all\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_select_all\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.83.\ \& This table describes command\-line options for the ndb_select_all program +.B Table\ \&18.86.\ \& This table describes command\-line options for the ndb_select_all program .TS allbox tab(:); . @@ -266,8 +266,8 @@ column providing information about the fragments in which rows are stored\&. Adds a GCI column to the output showing the global checkpoint at which each row was last updated\&. See -Section\ \&18.1, \(lqMySQL Cluster Overview\(rq, and -Section\ \&18.5.6.2, \(lqMySQL Cluster Log Events\(rq, for more information about checkpoints\&. +Section\ \&18.1, \(lqNDB Cluster Overview\(rq, and +Section\ \&18.5.6.2, \(lqNDB Cluster Log Events\(rq, for more information about checkpoints\&. .RE .sp .RS 4 @@ -359,7 +359,7 @@ NDBT_ProgramExit: 0 \- OK .RE .\} .PP -Note that all string values are enclosed by square brackets (\(lq[\&.\&.\&.]\(rq) in the output of +Note that all string values are enclosed by square brackets ([\&.\&.\&.]) in the output of \fBndb_select_all\fR\&. For a further example, consider the table created and populated as shown here: .sp .if n \{\ @@ -408,7 +408,7 @@ NDBT_ProgramExit: 0 \- OK .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_select_count.1 b/man/ndb_select_count.1 index 6526d5ab6dd1..564f496883a4 100644 --- a/man/ndb_select_count.1 +++ b/man/ndb_select_count.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_select_count\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SELECT_COUNT\" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SELECT_COUNT\" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -51,16 +51,16 @@ ndb_select_count [\-c \fIconnection_string\fR] \-d\fIdb_name\fR \fItbl_name\fR[, .RE .\} .PP -The following table includes options that are specific to the MySQL Cluster native backup restoration program -\fBndb_select_count\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +The following table includes options that are specific to the NDB Cluster native backup restoration program +\fBndb_select_count\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_select_count\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.84.\ \& This table describes command\-line options for the ndb_select_count program +.B Table\ \&18.87.\ \& This table describes command\-line options for the ndb_select_count program .TS allbox tab(:); . @@ -86,7 +86,7 @@ NDBT_ProgramExit: 0 \- OK .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_show_tables.1 b/man/ndb_show_tables.1 index 49b268ae61c6..a0dd9fe3126a 100644 --- a/man/ndb_show_tables.1 +++ b/man/ndb_show_tables.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_show_tables\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SHOW_TABLES\F" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SHOW_TABLES\F" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,18 +40,18 @@ NDB database objects in the cluster\&. By default, this includes not only both user\-created tables and NDB system tables, but -NDB\-specific indexes, internal triggers, and MySQL Cluster Disk Data objects as well\&. +NDB\-specific indexes, internal triggers, and NDB Cluster Disk Data objects as well\&. .PP -The following table includes options that are specific to the MySQL Cluster native backup restoration program -\fBndb_show_tables\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +The following table includes options that are specific to the NDB Cluster native backup restoration program +\fBndb_show_tables\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_show_tables\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.85.\ \& This table describes command\-line options for the ndb_show_tables program +.B Table\ \&18.88.\ \& This table describes command\-line options for the ndb_show_tables program .TS allbox tab(:); . @@ -202,7 +202,7 @@ If specified, this causes unqualified object names to be displayed\&. .ps -1 .br .PP -Only user\-created MySQL Cluster tables may be accessed from MySQL; system tables such as +Only user\-created NDB Cluster tables may be accessed from MySQL; system tables such as SYSTAB_0 are not visible to \fBmysqld\fR\&. However, you can examine the contents of system tables using @@ -216,7 +216,7 @@ API applications such as .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_size.pl.1 b/man/ndb_size.pl.1 index ada50b78dc38..db2f27737bf4 100644 --- a/man/ndb_size.pl.1 +++ b/man/ndb_size.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_size.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_SIZE\&.PL\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_SIZE\&.PL\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,7 +36,7 @@ ndb_size.pl \- NDBCLUSTER Size Requirement Estimator .PP This is a Perl script that can be used to estimate the amount of space that would be required by a MySQL database if it were converted to use the NDBCLUSTER -storage engine\&. Unlike the other utilities discussed in this section, it does not require access to a MySQL Cluster (in fact, there is no reason for it to do so)\&. However, it does need to access the MySQL server on which the database to be tested resides\&. +storage engine\&. Unlike the other utilities discussed in this section, it does not require access to an NDB Cluster (in fact, there is no reason for it to do so)\&. However, it does need to access the MySQL server on which the database to be tested resides\&. Requirements .sp .RS 4 @@ -47,7 +47,7 @@ Requirements .sp -1 .IP \(bu 2.3 .\} -A running MySQL server\&. The server instance does not have to provide support for MySQL Cluster\&. +A running MySQL server\&. The server instance does not have to provide support for NDB Cluster\&. .RE .sp .RS 4 @@ -92,16 +92,16 @@ ndb_size\&.pl can also be found in the MySQL sources in storage/ndb/tools\&. .PP -The following table includes options that are specific to the MySQL Cluster program -\fBndb_size\&.pl\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +The following table includes options that are specific to the NDB Cluster program +\fBndb_size\&.pl\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_size\&.pl\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.86.\ \& This table describes command\-line options for the ndb_size\&.pl program +.B Table\ \&18.89.\ \& This table describes command\-line options for the ndb_size\&.pl program .TS allbox tab(:); . @@ -132,7 +132,7 @@ option with a comma\-separated list of the names of the databases to be skipped\ \fB\-\-excludetables\fR option\&. A host name can be specified using \fB\-\-hostname\fR; the default is -localhost\&. In MySQL Cluster NDB 7\&.2\&.6 and later, you can specify a port in addition to the host using +localhost\&. In NDB 7\&.2\&.6 and later, you can specify a port in addition to the host using \fIhost\fR:\fIport\fR format for the value of \fB\-\-hostname\fR\&. The default port number is 3306\&. If necessary, you can also specify a socket; the default is @@ -276,7 +276,7 @@ required per table and table row\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndb_waiter.1 b/man/ndb_waiter.1 index 897a883c7c69..1ff720b62905 100644 --- a/man/ndb_waiter.1 +++ b/man/ndb_waiter.1 @@ -2,12 +2,12 @@ .\" Title: \fBndb_waiter\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDB_WAITER\FR" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDB_WAITER\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,7 +28,7 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -ndb_waiter \- wait for MySQL Cluster to reach a given status +ndb_waiter \- wait for NDB Cluster to reach a given status .SH "SYNOPSIS" .HP \w'\fBndb_waiter\ \fR\fB\fIoptions\fR\fR\ 'u \fBndb_waiter \fR\fB\fIoptions\fR\fR @@ -132,16 +132,16 @@ SHUTTING_DOWN: The node is shutting down\&. SINGLE USER MODE: This is shown for all cluster data nodes when the cluster is in single user mode\&. .RE .PP -The following table includes options that are specific to the MySQL Cluster native backup restoration program -\fBndb_waiter\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +The following table includes options that are specific to the NDB Cluster native backup restoration program +\fBndb_waiter\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndb_waiter\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.87.\ \& This table describes command\-line options for the ndb_waiter program +.B Table\ \&18.90.\ \& This table describes command\-line options for the ndb_waiter program .TS allbox tab(:); . @@ -316,7 +316,7 @@ option\&. \fBSample Output\fR. Shown here is the output from \fBndb_waiter\fR when run against a 4\-node cluster in which two nodes have been shut down and then started again manually\&. Duplicate reports (indicated by -\(lq\&.\&.\&.\(rq) are omitted\&. +\&.\&.\&.) are omitted\&. .sp .if n \{\ .RS 4 @@ -393,7 +393,7 @@ Connecting to mgmsrv at (null)\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndbd.8 b/man/ndbd.8 index 5b1d4aa703e9..69c72fc0ee33 100644 --- a/man/ndbd.8 +++ b/man/ndbd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBD\FR" "8" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBD\FR" "8" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,7 +28,7 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -ndbd \- the MySQL Cluster data node daemon +ndbd \- the NDB Cluster data node daemon .SH "SYNOPSIS" .HP \w'\fBndbd\ \fR\fB\fIoptions\fR\fR\ 'u \fBndbd \fR\fB\fIoptions\fR\fR @@ -37,20 +37,20 @@ ndbd \- the MySQL Cluster data node daemon \fBndbd\fR is the process that is used to handle all the data in tables using the NDB Cluster storage engine\&. This is the process that empowers a data node to accomplish distributed transaction handling, node recovery, checkpointing to disk, online backup, and related tasks\&. .PP -In a MySQL Cluster, a set of +In an NDB Cluster, a set of \fBndbd\fR processes cooperate in handling data\&. These processes can execute on the same computer (host) or on different computers\&. The correspondences between data nodes and Cluster hosts is completely configurable\&. .PP -The following table includes command options specific to the MySQL Cluster data node program -\fBndbd\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +The following table includes command options specific to the NDB Cluster data node program +\fBndbd\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndbd\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.69.\ \& This table describes command\-line options for the ndbd program +.B Table\ \&18.71.\ \& This table describes command\-line options for the ndbd program .TS allbox tab(:); . @@ -303,7 +303,7 @@ start is to be used \fIonly\fR when starting the \fBndbd\fR -process under very special circumstances; this is because this option causes all files to be removed from the MySQL Cluster file system and all redo log files to be re\-created\&. These circumstances are listed here: +process under very special circumstances; this is because this option causes all files to be removed from the NDB Cluster file system and all redo log files to be re\-created\&. These circumstances are listed here: .sp .RS 4 .ie n \{\ @@ -339,6 +339,34 @@ When restarting the node with a new version of As a measure of last resort when for some reason the node restart or system restart repeatedly fails\&. In this case, be aware that this node can no longer be used to restore data due to the destruction of the data files\&. .RE .sp +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +To avoid the possibility of eventual data loss, it is recommended that you +\fInot\fR +use the +\fB\-\-initial\fR +option together with +StopOnError = 0\&. Instead, set +StopOnError +to 0 in +config\&.ini +only after the cluster has been started, then restart the data nodes normally\(emthat is, without the +\fB\-\-initial\fR +option\&. See the description of the +StopOnError +parameter for a detailed explanation of this issue\&. (Bug #24945638) +.sp .5v +.RE Use of this option prevents the StartPartialTimeout and @@ -379,11 +407,11 @@ Backup files that have already been created by the affected node .sp -1 .IP \(bu 2.3 .\} -MySQL Cluster Disk Data files (see -Section\ \&18.5.12, \(lqMySQL Cluster Disk Data Tables\(rq)\&. +NDB Cluster Disk Data files (see +Section\ \&18.5.12, \(lqNDB Cluster Disk Data Tables\(rq)\&. .RE .sp -This option also has no effect on recovery of data by a data node that is just starting (or restarting) from data nodes that are already running\&. This recovery of data occurs automatically, and requires no user intervention in a MySQL Cluster that is running normally\&. +This option also has no effect on recovery of data by a data node that is just starting (or restarting) from data nodes that are already running\&. This recovery of data occurs automatically, and requires no user intervention in an NDB Cluster that is running normally\&. .sp .5v .RE It is permissible to use this option when starting the cluster for the very first time (that is, before any data node files have been created); however, it is @@ -554,7 +582,7 @@ not to start automatically\&. When this option is used, connects to the management server, obtains configuration data from it, and initializes communication objects\&. However, it does not actually start the execution engine until specifically requested to do so by the management server\&. This can be accomplished by issuing the proper START command in the management client (see -Section\ \&18.5.2, \(lqCommands in the MySQL Cluster Management Client\(rq)\&. +Section\ \&18.5.2, \(lqCommands in the NDB Cluster Management Client\(rq)\&. .RE .sp .RS 4 @@ -729,7 +757,7 @@ Determines the number of times that the data node attempts to contact a manageme \fB\-\-connect\-delay\fR option\&. .sp -This option was added in MySQL Cluster NDB 7\&.2\&.9\&. +This option was added in NDB 7\&.2\&.9\&. .RE .sp .RS 4 @@ -787,7 +815,7 @@ Determines the time to wait between attempts to contact a management server when \fB\-\-connect\-retries\fR option)\&. The default is 5 attempts\&. .sp -This option was added in MySQL Cluster NDB 7\&.2\&.9\&. +This option was added in NDB 7\&.2\&.9\&. .RE .PP \fBndbd\fR @@ -841,7 +869,7 @@ TraceFile: ndb_2_trace\&.log\&.2 Listings of possible \fBndbd\fR exit codes and messages generated when a data node process shuts down prematurely can be found in -\m[blue]\fBndbd Error Messages\fR\m[]\&\s-2\u[1]\d\s+2\&. +\m[blue]\fBData Node Error Messages\fR\m[]\&\s-2\u[1]\d\s+2\&. .if n \{\ .sp .\} @@ -873,7 +901,7 @@ file (see below)\&. Error log entries are thus overwritten in a cyclical and not .IP \(bu 2.3 .\} ndb_\fInode_id\fR_trace\&.log\&.\fItrace_id\fR -is a trace file describing exactly what happened just before the error occurred\&. This information is useful for analysis by the MySQL Cluster development team\&. +is a trace file describing exactly what happened just before the error occurred\&. This information is useful for analysis by the NDB Cluster development team\&. .sp It is possible to configure the number of these trace files that will be created before old files are overwritten\&. \fItrace_id\fR @@ -955,10 +983,10 @@ shell> \fBndbd \-\-connect\-string="nodeid=2;host=ndb_mgmd\&.mysql\&.com:1186"\f .\} .PP See -Section\ \&18.3.3.3, \(lqMySQL Cluster Connection Strings\(rq, for additional information about this issue\&. -Options Common to MySQL Cluster Programs(1), describes other command\-line options which can be used with +Section\ \&18.3.3.3, \(lqNDB Cluster Connection Strings\(rq, for additional information about this issue\&. +Options Common to NDB Cluster Programs(1), describes other command\-line options which can be used with \fBndbd\fR\&. For information about data node configuration parameters, see -Section\ \&18.3.3.6, \(lqDefining MySQL Cluster Data Nodes\(rq\&. +Section\ \&18.3.3.6, \(lqDefining NDB Cluster Data Nodes\(rq\&. .PP When \fBndbd\fR @@ -982,11 +1010,11 @@ process can consume up to 2 CPUs if permitted to do so\&. For a machine with many CPUs it is possible to use several \fBndbd\fR processes which belong to different node groups; however, such a configuration is still considered experimental and is not supported for MySQL 5\&.5 in a production setting\&. See -Section\ \&18.1.6, \(lqKnown Limitations of MySQL Cluster\(rq\&. +Section\ \&18.1.6, \(lqKnown Limitations of NDB Cluster\(rq\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP @@ -996,9 +1024,9 @@ You should have received a copy of the GNU General Public License along with the .sp .SH "NOTES" .IP " 1." 4 -ndbd Error Messages +Data Node Error Messages .RS 4 -\%http://dev.mysql.com/doc/ndbapi/en/ndbd-error-messages.html +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-node-error-messages.html .RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, diff --git a/man/ndbinfo_select_all.1 b/man/ndbinfo_select_all.1 index a73dad2e0d50..c141a38feedd 100644 --- a/man/ndbinfo_select_all.1 +++ b/man/ndbinfo_select_all.1 @@ -2,12 +2,12 @@ .\" Title: \fBndbinfo_select_all\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBINFO_SELECT_AL" "1" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBINFO_SELECT_AL" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,7 +37,7 @@ ndbinfo_select_all \- select from ndbinfo tables \fBndbinfo_select_all\fR is a client program that selects all rows and columns from one or more tables in the ndbinfo -database\&. It is included with the MySQL Cluster distribution beginning with MySQL Cluster NDB 7\&.2\&.2\&. +database\&. It is included with the NDB Cluster distribution beginning with NDB 7\&.2\&.2\&. .PP Not all ndbinfo @@ -106,15 +106,15 @@ shell> .\} .PP The following table includes options that are specific to -\fBndbinfo_select_all\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including +\fBndbinfo_select_all\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including \fBndbinfo_select_all\fR), see -Options Common to MySQL Cluster Programs(1)\&. +Options Common to NDB Cluster Programs(1)\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br -.B Table\ \&18.70.\ \& This table describes command\-line options for the ndbinfo_select_all program +.B Table\ \&18.72.\ \& This table describes command\-line options for the ndbinfo_select_all program .TS allbox tab(:); . @@ -224,7 +224,7 @@ to set the time between loops\&. .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP diff --git a/man/ndbmtd.8 b/man/ndbmtd.8 index 133a9ad74751..0dc0bdf8b968 100644 --- a/man/ndbmtd.8 +++ b/man/ndbmtd.8 @@ -2,12 +2,12 @@ .\" Title: \fBndbmtd\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 08/25/2016 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBNDBMTD\FR" "8" "08/25/2016" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBNDBMTD\FR" "8" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,7 +28,7 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -ndbmtd \- the MySQL Cluster data node daemon (multi\-threaded version) +ndbmtd \- the NDB Cluster data node daemon (multi\-threaded version) .SH "SYNOPSIS" .HP \w'\fBndbmtd\ \fR\fB\fIoptions\fR\fR\ 'u \fBndbmtd \fR\fB\fIoptions\fR\fR @@ -47,14 +47,14 @@ functions in the same way as \fBndbmtd\fR differs from \fBndbd\fR, and you should consult -\fBndbd\fR(8), for additional information about running MySQL Cluster data nodes that apply to both the single\-threaded and multi\-threaded versions of the data node process\&. +\fBndbd\fR(8), for additional information about running NDB Cluster data nodes that apply to both the single\-threaded and multi\-threaded versions of the data node process\&. .PP Command\-line options and configuration parameters used with \fBndbd\fR also apply to \fBndbmtd\fR\&. For more information about these options and parameters, see \fBndbd\fR(8), and -Section\ \&18.3.3.6, \(lqDefining MySQL Cluster Data Nodes\(rq, respectively\&. +Section\ \&18.3.3.6, \(lqDefining NDB Cluster Data Nodes\(rq, respectively\&. .PP \fBndbmtd\fR is also file system\-compatible with @@ -95,7 +95,7 @@ runs by default in single\-threaded mode (that is, it behaves like config\&.ini file for the MaxNoOfExecutionThreads -configuration parameter or (in MySQL Cluster NDB 7\&.2\&.3 and later) the +configuration parameter or (in NDB 7\&.2\&.3 and later) the ThreadConfig configuration parameter\&. Using MaxNoOfExecutionThreads @@ -133,7 +133,7 @@ configuration file\&. Except for trace files, these are generated in the same wa In the event of a critical error, \fBndbmtd\fR generates trace files describing what happened just prior to the error\*(Aq occurrence\&. These files, which can be found in the data node\*(Aqs -DataDir, are useful for analysis of problems by the MySQL Cluster Development and Support teams\&. One trace file is generated for each +DataDir, are useful for analysis of problems by the NDB Cluster Development and Support teams\&. One trace file is generated for each \fBndbmtd\fR thread\&. The names of these files have the following pattern: .sp @@ -155,7 +155,7 @@ is a trace sequence number, and \fIthread_id\fR is the thread ID\&. For example, in the event of the failure of an \fBndbmtd\fR -process running as a MySQL Cluster data node having the node ID 3 and with +process running as an NDB Cluster data node having the node ID 3 and with MaxNoOfExecutionThreads equal to 4, four trace files are generated in the data node\*(Aqs data directory\&. If the is the first time this node has failed, then these files are named ndb_3_trace\&.log\&.1_t1, @@ -169,7 +169,7 @@ The \fBndbd\fR exit codes and messages that are generated when a data node process shuts down prematurely are also used by \fBndbmtd\fR\&. See -\m[blue]\fBndbd Error Messages\fR\m[]\&\s-2\u[1]\d\s+2, for a listing of these\&. +\m[blue]\fBData Node Error Messages\fR\m[]\&\s-2\u[1]\d\s+2, for a listing of these\&. .if n \{\ .sp .\} @@ -187,13 +187,13 @@ It is possible to use \fBndbd\fR and \fBndbmtd\fR -concurrently on different data nodes in the same MySQL Cluster\&. However, such configurations have not been tested extensively; thus, we cannot recommend doing so in a production setting at this time\&. +concurrently on different data nodes in the same NDB Cluster\&. However, such configurations have not been tested extensively; thus, we cannot recommend doing so in a production setting at this time\&. .sp .5v .RE .SH "COPYRIGHT" .br .PP -Copyright \(co 1997, 2016, Oracle and/or its affiliates. All rights reserved. +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. .PP This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. .PP @@ -203,9 +203,9 @@ You should have received a copy of the GNU General Public License along with the .sp .SH "NOTES" .IP " 1." 4 -ndbd Error Messages +Data Node Error Messages .RS 4 -\%http://dev.mysql.com/doc/ndbapi/en/ndbd-error-messages.html +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-node-error-messages.html .RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, diff --git a/man/perror.1 b/man/perror.1 index 2545ecdf2ff2..db3250248833 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -2,12 +2,12 @@ .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/replace.1 b/man/replace.1 index 7319af2f8b2b..d40545682261 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -2,12 +2,12 @@ .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index cffe437012c7..8c095e8596db 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolveip.1 b/man/resolveip.1 index 9ce971100e02..98852777641c 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 04/27/2017 +.\" Date: 06/03/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.5 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "04/27/2017" "MySQL 5\&.5" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "06/03/2017" "MySQL 5\&.5" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- From bf69da9558f3354bb4284e0d09b742eb7882be47 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 18 Sep 2017 16:12:13 +0300 Subject: [PATCH 261/305] MW-406 Bumped up the wsrep patch version (5.5.57-25.22) --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 28cb95b56ac2..87ba3d000d7f 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "21") +SET(WSREP_PATCH_VERSION "22") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From d2116ae6214eab5fe0cbcb049c96a8fc290076d1 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 18 Sep 2017 16:21:38 +0300 Subject: [PATCH 262/305] MW-406 Updated man pages (5.6) --- man/comp_err.1 | 4 +- man/innochecksum.1 | 4 +- man/msql2mysql.1 | 4 +- man/my_print_defaults.1 | 4 +- man/myisam_ftdump.1 | 4 +- man/myisamchk.1 | 6 +- man/myisamlog.1 | 4 +- man/myisampack.1 | 4 +- man/mysql-stress-test.pl.1 | 4 +- man/mysql-test-run.pl.1 | 28 +- man/mysql.1 | 42 +- man/mysql.server.1 | 209 ++++-- man/mysql_client_test.1 | 6 +- man/mysql_config.1 | 4 +- man/mysql_config_editor.1 | 4 +- man/mysql_convert_table_format.1 | 6 +- man/mysql_find_rows.1 | 4 +- man/mysql_fix_extensions.1 | 4 +- man/mysql_install_db.1 | 4 +- man/mysql_plugin.1 | 4 +- man/mysql_secure_installation.1 | 4 +- man/mysql_setpermission.1 | 6 +- man/mysql_tzinfo_to_sql.1 | 4 +- man/mysql_upgrade.1 | 6 +- man/mysql_waitpid.1 | 4 +- man/mysql_zap.1 | 4 +- man/mysqlaccess.1 | 45 +- man/mysqladmin.1 | 6 +- man/mysqlbinlog.1 | 22 +- man/mysqlbug.1 | 4 +- man/mysqlcheck.1 | 8 +- man/mysqld.8 | 4 +- man/mysqld_multi.1 | 4 +- man/mysqld_safe.1 | 4 +- man/mysqldump.1 | 14 +- man/mysqldumpslow.1 | 4 +- man/mysqlhotcopy.1 | 4 +- man/mysqlimport.1 | 11 +- man/mysqlshow.1 | 6 +- man/mysqlslap.1 | 6 +- man/mysqltest.1 | 10 +- man/ndb_mgmd.8 | 1098 ++++++++++++++++++++++++++++++ man/ndbd.8 | 1089 +++++++++++++++++++++++++++++ man/ndbmtd.8 | 215 ++++++ man/perror.1 | 8 +- man/replace.1 | 4 +- man/resolve_stack_dump.1 | 4 +- man/resolveip.1 | 4 +- 48 files changed, 2761 insertions(+), 194 deletions(-) create mode 100644 man/ndb_mgmd.8 create mode 100644 man/ndbd.8 create mode 100644 man/ndbmtd.8 diff --git a/man/comp_err.1 b/man/comp_err.1 index 052a404dfe3d..66bfce5c32fc 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -2,12 +2,12 @@ .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 362faf99dee9..b4e296bfb0d3 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -2,12 +2,12 @@ .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/msql2mysql.1 b/man/msql2mysql.1 index 458f898d9c5a..2f0205cab695 100644 --- a/man/msql2mysql.1 +++ b/man/msql2mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmsql2mysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMSQL2MYSQL\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMSQL2MYSQL\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index 6e027b11c17d..b06c268a40cf 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -2,12 +2,12 @@ .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index dc6894a43eb9..5aa4c4166fdc 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisamchk.1 b/man/myisamchk.1 index ca02573d91a2..26cf522a1872 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1379,7 +1379,7 @@ CREATE TABLE person PRIMARY KEY (id), INDEX (last_name, first_name), INDEX (birth) -) MAX_ROWS = 1000000; +) MAX_ROWS = 1000000 ENGINE=MYISAM; .fi .if n \{\ .RE diff --git a/man/myisamlog.1 b/man/myisamlog.1 index a91dde8b832b..9d80561efd82 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisampack.1 b/man/myisampack.1 index 7f55d6acc9b2..925b1b6e3615 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index b40f240280ad..736826aa00eb 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/14/2017 +.\" Date: 06/01/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "03/14/2017" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "06/01/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index d6035bc8527e..3203d7942d2f 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/14/2017 +.\" Date: 06/01/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "03/14/2017" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "06/01/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,6 +33,24 @@ mysql-test-run.pl \- run MySQL test suite .HP \w'\fBmysql\-test\-run\&.pl\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u \fBmysql\-test\-run\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR .SH "DESCRIPTION" +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +\fIThis content is no longer updated\&.\fR +Any further updates to test framework documention take place in the MySQL Source Code documentation and can be accessed at +\m[blue]\fBThe MySQL Test Framework, Version 2\&.0\fR\m[]\&\s-2\u[1]\d\s+2\&. +.sp .5v +.RE .PP The \fBmysql\-test\-run\&.pl\fR @@ -2691,6 +2709,12 @@ This documentation is distributed in the hope that it will be useful, but WITHOU .PP You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. .sp +.SH "NOTES" +.IP " 1." 4 +The MySQL Test Framework, Version 2.0 +.RS 4 +\%http://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_MYSQL_TEST_RUN.html +.RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available diff --git a/man/mysql.1 b/man/mysql.1 index bff992206e33..7cb8fb915af4 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -66,7 +66,8 @@ Or: .RS 4 .\} .nf -shell> \fBmysql \-\-user=\fR\fB\fIuser_name\fR\fR\fB \-\-password=\fR\fB\fIyour_password\fR\fR\fB \fR\fB\fIdb_name\fR\fR +shell> \fBmysql \-\-user=\fR\fB\fIuser_name\fR\fR\fB \-\-password \fR\fB\fIdb_name\fR\fR +Enter password: \fIyour_password\fR .fi .if n \{\ .RE @@ -216,6 +217,24 @@ option\&. .sp -1 .IP \(bu 2.3 .\} +\fB\-\-binary\-as\-hex\fR, +\fB\-b\fR +.sp +When this option is given, +\fBmysql\fR +displays binary data using hexadecimal notation (0x\fIvalue\fR)\&. This occurs whether the overall output dislay format is tabular, vertical, HTML, or XML\&. +.sp +This option was added in MySQL 5\&.6\&.37\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-binary\-mode\fR .sp This option helps when processing @@ -559,7 +578,7 @@ the section called \(lqMYSQL COMMANDS\(rq\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&. +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) This option was added in MySQL 5\&.6\&.7\&. .RE .sp .RS 4 @@ -693,15 +712,15 @@ Write line numbers for errors\&. Disable this with Enable or disable LOCAL capability for -LOAD DATA INFILE\&. With no value, the option enables +LOAD DATA INFILE\&. For +\fBmysql\fR, this capability is disabled by default\&. With no value, the option enables LOCAL\&. The option may be given as \fB\-\-local\-infile=0\fR or \fB\-\-local\-infile=1\fR to explicitly disable or enable -LOCAL\&. Enabling -LOCAL -has no effect if the server does not also support it\&. +LOCAL\&. Enabling local data loading has no effect if the server does not also support it; see +Section\ \&6.1.6, \(lqSecurity Issues with LOAD DATA LOCAL\(rq .RE .sp .RS 4 @@ -1209,12 +1228,9 @@ The server sends the public key to the client as needed, so it is not necessary For additional discussion regarding use of the sha256_password plugin, including how to get the RSA public key, see -Section\ \&6.5.1.4, \(lqThe SHA-256 Authentication Plugin\(rq\&. +Section\ \&6.5.1.4, \(lqSHA-256 Pluggable Authentication\(rq\&. .sp -This option is available only if MySQL was built using OpenSSL\&. It was added in MySQL 5\&.6\&.6 under the name -\fB\-\-server\-public\-key\fR -and renamed in 5\&.6\&.7 to -\fB\-\-server\-public\-key\-path\fR\&. +This option is available only if MySQL was built using OpenSSL\&. .RE .sp .RS 4 diff --git a/man/mysql.server.1 b/man/mysql.server.1 index 0d50a917c04e..fd61f6e01457 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,13 +34,21 @@ mysql.server \- MySQL server startup script \fBmysql {start|stop}\fR .SH "DESCRIPTION" .PP -MySQL distributions on Unix include a script named -\fBmysql\&.server\fR, which starts the server using -\fBmysqld_safe\fR\&. It can be used on systems such as Linux and Solaris that use System V\-style run directories to start and stop system services\&. It is also used by the OS X Startup Item for MySQL\&. +MySQL distributions on Unix and Unix\-like system include a script named +\fBmysql\&.server\fR, which starts the MySQL server using +\fBmysqld_safe\fR\&. It can be used on systems such as Linux and Solaris that use System V\-style run directories to start and stop system services\&. It is also used by the macOS Startup Item for MySQL\&. +.PP +\fBmysql\&.server\fR +is the script name as used within the MySQL source tree\&. The installed name might be different; for example, +\fBmysqld\fR +or +\fBmysql\fR\&. In the following discussion, adjust the name +\fBmysql\&.server\fR +as appropriate for your system\&. .PP To start or stop the server manually using the \fBmysql\&.server\fR -script, invoke it with +script, invoke it from the command line with start or stop @@ -57,21 +65,20 @@ shell> \fBmysql\&.server stop\fR .RE .\} .PP -Before \fBmysql\&.server\fR -starts the server, it changes location to the MySQL installation directory, and then invokes +changes location to the MySQL installation directory, then invokes \fBmysqld_safe\fR\&. To run the server as some specific user, add an appropriate user option to the [mysqld] -group of the +group of the global /etc/my\&.cnf option file, as shown later in this section\&. (It is possible that you must edit \fBmysql\&.server\fR if you\*(Aqve installed a binary distribution of MySQL in a nonstandard location\&. Modify it to change location into the proper directory before it runs \fBmysqld_safe\fR\&. If you do this, your modified version of \fBmysql\&.server\fR -may be overwritten if you upgrade MySQL in the future, so you should make a copy of your edited version that you can reinstall\&.) +may be overwritten if you upgrade MySQL in the future; make a copy of your edited version that you can reinstall\&.) .PP \fBmysql\&.server stop\fR stops the server by sending a signal to it\&. You can also stop the server manually by executing @@ -79,27 +86,44 @@ stops the server by sending a signal to it\&. You can also stop the server manua .PP To start and stop MySQL automatically on your server, you must add start and stop commands to the appropriate places in your /etc/rc* -files\&. -.PP +files: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} If you use the Linux server RPM package (MySQL\-server\-\fIVERSION\fR\&.rpm), or a native Linux package installation, the \fBmysql\&.server\fR script may be installed in the /etc/init\&.d directory with the name +mysqld +or mysql\&. See Section\ \&2.5.5, \(lqInstalling MySQL on Linux Using RPM Packages from Oracle\(rq, for more information on the Linux RPM packages\&. -.PP -Some vendors provide RPM packages that install a startup script under a different name such as -\fBmysqld\fR\&. -.PP +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} If you install MySQL from a source distribution or using a binary distribution format that does not install \fBmysql\&.server\fR -automatically, you can install it manually\&. The script can be found in the +automatically, you can install the script manually\&. It can be found in the support\-files -directory under the MySQL installation directory or in a MySQL source tree\&. Copy it to the +directory under the MySQL installation directory or in a MySQL source tree\&. Copy the script to the /etc/init\&.d directory with the name -\fBmysql\fR, and then make it executable: +\fBmysql\fR +and make it executable: .sp .if n \{\ .RS 4 @@ -112,40 +136,6 @@ shell> \fBchmod +x /etc/init\&.d/mysql\fR .RE .\} .sp -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.PP -Older Red Hat systems use the -/etc/rc\&.d/init\&.d -directory rather than -/etc/init\&.d\&. Adjust the preceding commands accordingly\&. Alternatively, first create -/etc/init\&.d -as a symbolic link that points to -/etc/rc\&.d/init\&.d: -.sp .5v -.RE -.sp -.if n \{\ -.RS 4 -.\} -.nf -shell> \fBcd /etc\fR -shell> \fBln \-s rc\&.d/init\&.d \&.\fR -.fi -.if n \{\ -.RE -.\} -.PP After installing the script, the commands needed to activate it to run at system startup depend on your operating system\&. On Linux, you can use \fBchkconfig\fR: .sp @@ -158,7 +148,7 @@ shell> \fBchkconfig \-\-add mysql\fR .if n \{\ .RE .\} -.PP +.sp On some Linux systems, the following command also seems to be necessary to fully enable the \fBmysql\fR script: @@ -172,18 +162,36 @@ shell> \fBchkconfig \-\-level 345 mysql on\fR .if n \{\ .RE .\} -.PP +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} On FreeBSD, startup scripts generally should go in -/usr/local/etc/rc\&.d/\&. The -rc(8) -manual page states that scripts in this directory are executed only if their base name matches the -*\&.sh -shell file name pattern\&. Any other files or directories present within the directory are silently ignored\&. In other words, on FreeBSD, you should install the +/usr/local/etc/rc\&.d/\&. Install the mysql\&.server script as /usr/local/etc/rc\&.d/mysql\&.server\&.sh -to enable automatic startup\&. -.PP +to enable automatic startup\&. The +rc(8) +manual page states that scripts in this directory are executed only if their base name matches the +*\&.sh +shell file name pattern\&. Any other files or directories present within the directory are silently ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} As an alternative to the preceding setup, some operating systems also use /etc/rc\&.local or @@ -199,8 +207,18 @@ to start additional services on startup\&. To start up MySQL using this method, .if n \{\ .RE .\} -.PP +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} For other systems, consult your operating system documentation to see how to install startup scripts\&. +.RE .PP \fBmysql\&.server\fR reads options from the @@ -217,7 +235,7 @@ You can add options for in a global /etc/my\&.cnf file\&. A typical -/etc/my\&.cnf +my\&.cnf file might look like this: .sp .if n \{\ @@ -238,7 +256,7 @@ basedir=/usr/local/mysql .PP The \fBmysql\&.server\fR -script supports the following options\&. If specified, they +script supports the options shown in the following table\&. If specified, they \fImust\fR be placed in an option file, not on the command line\&. \fBmysql\&.server\fR @@ -248,6 +266,57 @@ and stop as command\-line arguments\&. .sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&4.3.\ \&mysql\&.server Option\-File Options +.TS +allbox tab(:); +lB lB lB. +T{ +Option Name +T}:T{ +Description +T}:T{ +Type +T} +.T& +l l l +l l l +l l l +l l l. +T{ +basedir +T}:T{ +Path to MySQL installation directory +T}:T{ +directory name +T} +T{ +datadir +T}:T{ +Path to MySQL data directory +T}:T{ +directory name +T} +T{ +pid\-file +T}:T{ +File in which server should write its process ID +T}:T{ +file name +T} +T{ +service\-startup\-timeout +T}:T{ +How long to wait for server startup +T}:T{ +integer +T} +.TE +.sp 1 +.sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c @@ -256,7 +325,7 @@ as command\-line arguments\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR +\fBbasedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. .RE @@ -269,7 +338,7 @@ The path to the MySQL installation directory\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-datadir=\fR\fB\fIdir_name\fR\fR +\fBdatadir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL data directory\&. .RE @@ -282,7 +351,7 @@ The path to the MySQL data directory\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR +\fBpid\-file=\fR\fB\fIfile_name\fR\fR .sp The path name of the file in which the server should write its process ID\&. .sp @@ -301,7 +370,7 @@ option file group but not the [mysqld_safe] group, you can ensure that \fBmysqld_safe\fR -gets the same value when invoke using +gets the same value when invoked from \fBmysql\&.server\fR as when invoked manually by putting the same pid\-file @@ -320,7 +389,7 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-service\-startup\-timeout=\fR\fB\fIseconds\fR\fR +\fBservice\-startup\-timeout=\fR\fB\fIseconds\fR\fR .sp How long in seconds to wait for confirmation of server startup\&. If the server does not start within this time, \fBmysql\&.server\fR diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index 2fa8540c6813..49cf9fc5a93d 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/14/2017 +.\" Date: 06/01/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "03/14/2017" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "06/01/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -211,7 +211,7 @@ The TCP/IP port number to use for the connection\&. \fB\-\-server\-arg=\fR\fB\fIarg\fR\fR, \fB\-A \fR\fB\fIarg\fR\fR .sp -Argument to send to the embedded server\&. +Argument to send to the embedded server\&. This option was removed in MySQL 8\&.0\&. .RE .sp .RS 4 diff --git a/man/mysql_config.1 b/man/mysql_config.1 index e5ea2fe96729..6c9172d5f816 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_config_editor.1 b/man/mysql_config_editor.1 index 98ffa109d057..e2d08f00d0f3 100644 --- a/man/mysql_config_editor.1 +++ b/man/mysql_config_editor.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config_editor\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG_EDIT" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_CONFIG_EDIT" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 index b3390cce0cdb..a2372ad674a1 100644 --- a/man/mysql_convert_table_format.1 +++ b/man/mysql_convert_table_format.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_convert_table_format\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_CONVERT_TAB" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_CONVERT_TAB" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -131,7 +131,7 @@ Connect to the MySQL server on the given host\&. .\} \fB\-\-password=\fR\fB\fIpassword\fR\fR .sp -The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. +The password to use when connecting to the server\&. The password value is not optional for this option, unlike for other MySQL programs\&. .sp Specifying a password on the command line should be considered insecure\&. See Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. diff --git a/man/mysql_find_rows.1 b/man/mysql_find_rows.1 index 8ecc25c61823..3b081dcac520 100644 --- a/man/mysql_find_rows.1 +++ b/man/mysql_find_rows.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_find_rows\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_FIND_ROWS\F" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_FIND_ROWS\F" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_fix_extensions.1 b/man/mysql_fix_extensions.1 index ccf00f5e4e3d..9d5c4a0083ff 100644 --- a/man/mysql_fix_extensions.1 +++ b/man/mysql_fix_extensions.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_fix_extensions\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_FIX_EXTENSI" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_FIX_EXTENSI" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index 23cb001278fa..5385d00c6b42 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index 080ac1cbee8b..33b7d22c5072 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index 5bb76559f62c..bf6309547762 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 index af98c4d9c023..50ce03a97dce 100644 --- a/man/mysql_setpermission.1 +++ b/man/mysql_setpermission.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_setpermission\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_SETPERMISSI" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_SETPERMISSI" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -127,7 +127,7 @@ Connect to the MySQL server on the given host\&. .\} \fB\-\-password=\fR\fB\fIpassword\fR\fR .sp -The password to use when connecting to the server\&. Note that the password value is not optional for this option, unlike for other MySQL programs\&. +The password to use when connecting to the server\&. The password value is not optional for this option, unlike for other MySQL programs\&. .sp Specifying a password on the command line should be considered insecure\&. See Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index 3c9ac9cfb2db..fd32cf5c1111 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index bcecffe2dcfe..8f0a96e3c7f9 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -42,7 +42,7 @@ also upgrades the system tables so that you can take advantage of new privileges If \fBmysql_upgrade\fR finds that a table has a possible incompatibility, it performs a table check and, if problems are found, attempts a table repair\&. If the table cannot be repaired, see -Section\ \&2.11.4, \(lqRebuilding or Repairing Tables or Indexes\(rq +Section\ \&2.11.3, \(lqRebuilding or Repairing Tables or Indexes\(rq for manual table repair strategies\&. .PP You should execute diff --git a/man/mysql_waitpid.1 b/man/mysql_waitpid.1 index 232e62e5a113..ac55609b1930 100644 --- a/man/mysql_waitpid.1 +++ b/man/mysql_waitpid.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_waitpid\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_WAITPID\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_WAITPID\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_zap.1 b/man/mysql_zap.1 index fb5f1d172eef..8433f4410190 100644 --- a/man/mysql_zap.1 +++ b/man/mysql_zap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_zap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQL_ZAP\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQL_ZAP\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlaccess.1 b/man/mysqlaccess.1 index 1b0d4abd084b..d2df37febf7c 100644 --- a/man/mysqlaccess.1 +++ b/man/mysqlaccess.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlaccess\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLACCESS\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLACCESS\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -51,7 +51,7 @@ This utility is deprecated in MySQL 5\&.6\&.17 and removed in MySQL 5\&.7 .RE .PP \fBmysqlaccess\fR -is a diagnostic tool that Yves Carlier has provided for the MySQL distribution\&. It checks the access privileges for a host name, user name, and database combination\&. Note that +is a diagnostic tool that Yves Carlier has provided for the MySQL distribution\&. It checks the access privileges for a host name, user name, and database combination\&. \fBmysqlaccess\fR checks access using only the user @@ -77,8 +77,45 @@ shell> \fBmysqlaccess [\fR\fB\fIhost_name\fR\fR\fB [\fR\fB\fIuser_name\fR\fR\fB .RE .\} .PP +When \fBmysqlaccess\fR -supports the following options\&. +runs, it loads and executes the contents of its configuration file, +mysqlaccess\&.conf\&. +\fBmysqlaccess\fR +looks for the configuration file in these locations, in order: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The directory named by the +\fBSYSCONFDIR\fR +option to +\fBCMake\fR +when MySQL was built\&. By default, this is the +etc +directory located under the compiled\-in installation directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The +/etc +directory\&. +.RE +.PP +\fBmysqlaccess\fR +supports the options shown in the following table\&. .sp .RS 4 .ie n \{\ diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index 7afefb31ed89..b384b339cd97 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -785,7 +785,7 @@ groups\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&. +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) This option was added in MySQL 5\&.6\&.7\&. .RE .sp .RS 4 diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index 30517652349f..24ff71341eb3 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1138,7 +1138,7 @@ set to 32 enables this data to be seen\&. .sp This option is supported only by the versions of \fBmysqlbinlog\fR -supplied with the MySQL Cluster distribution, or built from the MySQL Cluster sources\&. +supplied with the NDB Cluster distribution, or built from the NDB Cluster sources\&. .RE .sp .RS 4 @@ -1240,6 +1240,22 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi .sp -1 .IP \(bu 2.3 .\} +\fB\-\-ssl*\fR +.sp +Options that begin with +\fB\-\-ssl\fR +specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-start\-datetime=\fR\fB\fIdatetime\fR\fR .sp Start reading the binary log at the first event having a timestamp equal to or later than the diff --git a/man/mysqlbug.1 b/man/mysqlbug.1 index 21b97e946daf..b62abf10f373 100644 --- a/man/mysqlbug.1 +++ b/man/mysqlbug.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbug\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLBUG\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLBUG\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index ff7f3281eb2c..0b1332ea5bae 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -105,7 +105,7 @@ note : The storage engine for the table doesn\*(Aqt support check If \fBmysqlcheck\fR is unable to repair a table, see -Section\ \&2.11.4, \(lqRebuilding or Repairing Tables or Indexes\(rq +Section\ \&2.11.3, \(lqRebuilding or Repairing Tables or Indexes\(rq for manual table repair strategies\&. This will be the case, for example, for InnoDB tables, which can be checked with @@ -554,7 +554,7 @@ This option was added in MySQL 5\&.6\&.2\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .sp This option was added in MySQL 5\&.6\&.28\&. .RE diff --git a/man/mysqld.8 b/man/mysqld.8 index 1bf53423b70f..b491a9609862 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index 97c57063ce53..f491a450a305 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index b2bba72594fa..6fdf0d349e38 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqldump.1 b/man/mysqldump.1 index b0ca66990a3c..d4055a7c4435 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -462,7 +462,7 @@ Section\ \&6.3.7, \(lqPluggable Authentication\(rq\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .sp This option was added in MySQL 5\&.6\&.28\&. .RE @@ -899,7 +899,7 @@ statement\&. Adds to a table dump all SQL statements needed to create any tablespaces used by an NDB table\&. This information is not otherwise included in the output from -\fBmysqldump\fR\&. This option is currently relevant only to MySQL Cluster tables\&. +\fBmysqldump\fR\&. This option is currently relevant only to NDB Cluster tables\&. .RE .sp .RS 4 @@ -1745,9 +1745,9 @@ This option should be used only when \fBmysqldump\fR is run on the same machine as the \fBmysqld\fR -server\&. Because the server creates files +server\&. Because the server creates *\&.txt -file in the directory that you specify, the directory must be writable by the server and the MySQL account that you use must have the +files in the directory that you specify, the directory must be writable by the server and the MySQL account that you use must have the FILE privilege\&. Because \fBmysqldump\fR @@ -2732,7 +2732,7 @@ option\&. Also, use the option\&. .PP \fBmysqldump\fR -does not dump the MySQL Cluster +does not dump the NDB Cluster ndbinfo information database\&. .PP diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index 056326281df2..51babb5e8192 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlhotcopy.1 b/man/mysqlhotcopy.1 index 6268aef0a6df..669ed8a9681c 100644 --- a/man/mysqlhotcopy.1 +++ b/man/mysqlhotcopy.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlhotcopy\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLHOTCOPY\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLHOTCOPY\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index 10ecee724697..664eaff1737d 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -312,7 +312,7 @@ Empty the table before importing the text file\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .sp This option was added in MySQL 5\&.6\&.28\&. .RE @@ -425,7 +425,10 @@ Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. \fB\-\-local\fR, \fB\-L\fR .sp -Read input files locally from the client host\&. +By default, files are read by the server on the server host\&. With this option, +\fBmysqlimport\fR +reads input files locally on the client host\&. Enabling local data loading has no effect if the server does not also support it; see +Section\ \&6.1.6, \(lqSecurity Issues with LOAD DATA LOCAL\(rq .RE .sp .RS 4 diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index 7643fc331470..45f0ee7502dc 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -344,7 +344,7 @@ groups\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .sp This option was added in MySQL 5\&.6\&.28\&. .RE diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index 051e92af4f2d..66bfc74c1a5f 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -577,7 +577,7 @@ statements\&. The default is 0 (connections are not detached)\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&6.5.1.7, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) This option was added in MySQL 5\&.6\&.7\&. +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) This option was added in MySQL 5\&.6\&.7\&. .RE .sp .RS 4 diff --git a/man/mysqltest.1 b/man/mysqltest.1 index 6ba732f51ca7..9e395d87ba07 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/14/2017 +.\" Date: 06/01/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "03/14/2017" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "06/01/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -649,7 +649,7 @@ The server sends the public key to the client as needed, so it is not necessary For additional discussion regarding use of the sha256_password plugin, including how to get the RSA public key, see -\m[blue]\fBThe SHA\-256 Authentication Plugin\fR\m[]\&\s-2\u[1]\d\s+2\&. +\m[blue]\fBSHA\-256 Pluggable Authentication\fR\m[]\&\s-2\u[1]\d\s+2\&. .sp This option is available only if MySQL was built using OpenSSL\&. It was added in MySQL 5\&.6\&.6 under the name \fB\-\-server\-public\-key\fR @@ -898,9 +898,9 @@ You should have received a copy of the GNU General Public License along with the .sp .SH "NOTES" .IP " 1." 4 -The SHA-256 Authentication Plugin +SHA-256 Pluggable Authentication .RS 4 -\%http://dev.mysql.com/doc/refman/8.0/en/sha256-authentication-plugin.html +\%http://dev.mysql.com/doc/refman/8.0/en/sha256-pluggable-authentication.html .RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, diff --git a/man/ndb_mgmd.8 b/man/ndb_mgmd.8 new file mode 100644 index 000000000000..62ea38dab4b6 --- /dev/null +++ b/man/ndb_mgmd.8 @@ -0,0 +1,1098 @@ +'\" t +.\" Title: \fBndb_mgmd\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/02/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.6 +.\" Language: English +.\" +.TH "\FBNDB_MGMD\FR" "8" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_mgmd \- the NDB Cluster management server daemon +.SH "SYNOPSIS" +.HP \w'\fBndb_mgmd\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_mgmd \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +The management server is the process that reads the cluster configuration file and distributes this information to all nodes in the cluster that request it\&. It also maintains a log of cluster activities\&. Management clients can connect to the management server and check the cluster\*(Aqs status\&. +.PP +The following table includes options that are specific to the NDB Cluster management server program +\fBndb_mgmd\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_mgmd\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.85.\ \& This table describes command\-line options for the ndb_mgmd program +.TS +allbox tab(:); +. +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-bind\-address=\fR\fB\fIhost\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-bind\-address=host +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Causes the management server to bind to a specific network interface (host name or IP address)\&. This option has no default value\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-no\-nodeid\-checks\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-no\-nodeid\-checks +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Do not perform any checks of node IDs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-configdir=\fR\fB\fIdir_name\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-configdir=directory +T} +T{ +\ \& +T}:T{ +\-\-config\-dir=directory +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +$INSTALLDIR/mysql\-cluster +T} +.TE +.sp 1 +Specifies the cluster management server\*(Aqs configuration cache directory\&. +\fB\-\-config\-dir\fR +is an alias for this option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-cache\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-config\-cache[=TRUE|FALSE] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +This option, whose default value is +1 +(or +TRUE, or +ON), can be used to disable the management server\*(Aqs configuration cache, so that it reads its configuration from +config\&.ini +every time it starts (see +Section\ \&18.3.3, \(lqNDB Cluster Configuration Files\(rq)\&. You can do this by starting the +\fBndb_mgmd\fR +process with any one of the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-cache=0\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-cache=FALSE\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-cache=OFF\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-skip\-config\-cache\fR +.RE +.sp +Using one of the options just listed is effective only if the management server has no stored configuration at the time it is started\&. If the management server finds any configuration cache files, then the +\fB\-\-config\-cache\fR +option or the +\fB\-\-skip\-config\-cache\fR +option is ignored\&. Therefore, to disable configuration caching, the option should be used the +\fIfirst\fR +time that the management server is started\&. Otherwise\(emthat is, if you wish to disable configuration caching for a management server that has +\fIalready\fR +created a configuration cache\(emyou must stop the management server, delete any existing configuration cache files manually, then restart the management server with +\fB\-\-skip\-config\-cache\fR +(or with +\fB\-\-config\-cache\fR +set equal to 0, +OFF, or +FALSE)\&. +.sp +Configuration cache files are normally created in a directory named +mysql\-cluster +under the installation directory (unless this location has been overridden using the +\fB\-\-configdir\fR +option)\&. Each time the management server updates its configuration data, it writes a new cache file\&. The files are named sequentially in order of creation using the following format: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_\fInode\-id\fR_config\&.bin\&.\fIseq\-number\fR +.fi +.if n \{\ +.RE +.\} +.sp +\fInode\-id\fR +is the management server\*(Aqs node ID; +\fIseq\-number\fR +is a sequence number, beginning with 1\&. For example, if the management server\*(Aqs node ID is 5, then the first three configuration cache files would, when they are created, be named +ndb_5_config\&.bin\&.1, +ndb_5_config\&.bin\&.2, and +ndb_5_config\&.bin\&.3\&. +.sp +If your intent is to purge or reload the configuration cache without actually disabling caching, you should start +\fBndb_mgmd\fR +with one of the options +\fB\-\-reload\fR +or +\fB\-\-initial\fR +instead of +\fB\-\-skip\-config\-cache\fR\&. +.sp +To re\-enable the configuration cache, simply restart the management server, but without the +\fB\-\-config\-cache\fR +or +\fB\-\-skip\-config\-cache\fR +option that was used previously to disable the configuration cache\&. +.sp +\fBndb_mgmd\fR +does not check for the configuration directory (\fB\-\-configdir\fR) or attempts to create one when +\fB\-\-skip\-config\-cache\fR +is used\&. (Bug #13428853) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-file=\fR\fB\fIfilename\fR\fR, +\fB\-f \fR\fB\fIfilename\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-config\-file=file +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Instructs the management server as to which file it should use for its configuration file\&. By default, the management server looks for a file named +config\&.ini +in the same directory as the +\fBndb_mgmd\fR +executable; otherwise the file name and location must be specified explicitly\&. +.sp +This option has no default value, and is ignored unless the management server is forced to read the configuration file, either because +\fBndb_mgmd\fR +was started with the +\fB\-\-reload\fR +or +\fB\-\-initial\fR +option, or because the management server could not find any configuration cache\&. This option is also read if +\fBndb_mgmd\fR +was started with +\fB\-\-config\-cache=OFF\fR\&. See +Section\ \&18.3.3, \(lqNDB Cluster Configuration Files\(rq, for more information\&. +.sp +Formerly, using this option together with +\fB\-\-initial\fR +caused removal of the configuration cache even if the file was not found\&. This issue was resolved in NDB 7\&.3\&.2\&. (Bug #1299289) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-mycnf\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-mycnf +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Read configuration data from the +my\&.cnf +file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-daemon\fR, +\fB\-d\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-daemon +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Instructs +\fBndb_mgmd\fR +to start as a daemon process\&. This is the default behavior\&. +.sp +This option has no effect when running +\fBndb_mgmd\fR +on Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-interactive\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-interactive +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Starts +\fBndb_mgmd\fR +in interactive mode; that is, an +\fBndb_mgm\fR +client session is started as soon as the management server is running\&. This option does not start any other NDB Cluster nodes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-initial\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-initial +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Configuration data is cached internally, rather than being read from the cluster global configuration file each time the management server is started (see +Section\ \&18.3.3, \(lqNDB Cluster Configuration Files\(rq)\&. Using the +\fB\-\-initial\fR +option overrides this behavior, by forcing the management server to delete any existing cache files, and then to re\-read the configuration data from the cluster configuration file and to build a new cache\&. +.sp +This differs in two ways from the +\fB\-\-reload\fR +option\&. First, +\fB\-\-reload\fR +forces the server to check the configuration file against the cache and reload its data only if the contents of the file are different from the cache\&. Second, +\fB\-\-reload\fR +does not delete any existing cache files\&. +.sp +If +\fBndb_mgmd\fR +is invoked with +\fB\-\-initial\fR +but cannot find a global configuration file, the management server cannot start\&. +.sp +When a management server starts, it checks for another management server in the same NDB Cluster and tries to use the other management server\*(Aqs configuration data; +\fBndb_mgmd\fR +ignores +\fB\-\-initial\fR +unless it is the only management server running\&. This behavior also has implications when performing a rolling restart of an NDB Cluster with multiple management nodes\&. See +Section\ \&18.5.5, \(lqPerforming a Rolling Restart of an NDB Cluster\(rq, for more information\&. +.sp +Formerly, using this option together with the +\fB\-\-config\-file\fR +option caused removal of the configuration cache even if the file was not found\&. Starting with NDB 7\&.3\&.2, the cache is cleared in such cases only if the configuration file is actually found\&. (Bug #1299289) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-log\-name=\fR\fB\fIname\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-log\-name=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +MgmtSrvr +T} +.TE +.sp 1 +Provides a name to be used for this node in the cluster log\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nodaemon\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nodaemon +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Instructs +\fBndb_mgmd\fR +not to start as a daemon process\&. +.sp +The default behavior for +\fBndb_mgmd\fR +on Windows is to run in the foreground, making this option unnecessary on Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-print\-full\-config\fR, +\fB\-P\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-print\-full\-config +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Shows extended information regarding the configuration of the cluster\&. With this option on the command line the +\fBndb_mgmd\fR +process prints information about the cluster setup including an extensive list of the cluster configuration sections as well as parameters and their values\&. Normally used together with the +\fB\-\-config\-file\fR +(\fB\-f\fR) option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-reload\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-reload +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +In NDB Cluster 7\&.3, configuration data is stored internally rather than being read from the cluster global configuration file each time the management server is started (see +Section\ \&18.3.3, \(lqNDB Cluster Configuration Files\(rq)\&. Using this option forces the management server to check its internal data store against the cluster configuration file and to reload the configuration if it finds that the configuration file does not match the cache\&. Existing configuration cache files are preserved, but not used\&. +.sp +This differs in two ways from the +\fB\-\-initial\fR +option\&. First, +\fB\-\-initial\fR +causes all cache files to be deleted\&. Second, +\fB\-\-initial\fR +forces the management server to re\-read the global configuration file and construct a new cache\&. +.sp +If the management server cannot find a global configuration file, then the +\fB\-\-reload\fR +option is ignored\&. +.sp +When a management server starts, it checks for another management server in the same NDB Cluster and tries to use the other management server\*(Aqs configuration data; +\fBndb_mgmd\fR +ignores +\fB\-\-reload\fR +unless it is the only management server running\&. This behavior also has implications when performing a rolling restart of an NDB Cluster with multiple management nodes\&. See +Section\ \&18.5.5, \(lqPerforming a Rolling Restart of an NDB Cluster\(rq, for more information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nowait\-nodes\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nowait\-nodes=list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +255 +T} +.TE +.sp 1 +When starting an NDB Cluster is configured with two management nodes, each management server normally checks to see whether the other +\fBndb_mgmd\fR +is also operational and whether the other management server\*(Aqs configuration is identical to its own\&. However, it is sometimes desirable to start the cluster with only one management node (and perhaps to allow the other +\fBndb_mgmd\fR +to be started later)\&. This option causes the management node to bypass any checks for any other management nodes whose node IDs are passed to this option, permitting the cluster to start as though configured to use only the management node that was started\&. +.sp +For purposes of illustration, consider the following portion of a +config\&.ini +file (where we have omitted most of the configuration parameters that are not relevant to this example): +.sp +.if n \{\ +.RS 4 +.\} +.nf +[ndbd] +NodeId = 1 +HostName = 192\&.168\&.0\&.101 +[ndbd] +NodeId = 2 +HostName = 192\&.168\&.0\&.102 +[ndbd] +NodeId = 3 +HostName = 192\&.168\&.0\&.103 +[ndbd] +NodeId = 4 +HostName = 192\&.168\&.0\&.104 +[ndb_mgmd] +NodeId = 10 +HostName = 192\&.168\&.0\&.150 +[ndb_mgmd] +NodeId = 11 +HostName = 192\&.168\&.0\&.151 +[api] +NodeId = 20 +HostName = 192\&.168\&.0\&.200 +[api] +NodeId = 21 +HostName = 192\&.168\&.0\&.201 +.fi +.if n \{\ +.RE +.\} +.sp +Assume that you wish to start this cluster using only the management server having node ID +10 +and running on the host having the IP address 192\&.168\&.0\&.150\&. (Suppose, for example, that the host computer on which you intend to the other management server is temporarily unavailable due to a hardware failure, and you are waiting for it to be repaired\&.) To start the cluster in this way, use a command line on the machine at 192\&.168\&.0\&.150 to enter the following command: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_mgmd \-\-ndb\-nodeid=10 \-\-nowait\-nodes=11\fR +.fi +.if n \{\ +.RE +.\} +.sp +As shown in the preceding example, when using +\fB\-\-nowait\-nodes\fR, you must also use the +\fB\-\-ndb\-nodeid\fR +option to specify the node ID of this +\fBndb_mgmd\fR +process\&. +.sp +You can then start each of the cluster\*(Aqs data nodes in the usual way\&. If you wish to start and use the second management server in addition to the first management server at a later time without restarting the data nodes, you must start each data node with a connection string that references both management servers, like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbd \-c 192\&.168\&.0\&.150,192\&.168\&.0\&.151\fR +.fi +.if n \{\ +.RE +.\} +.sp +The same is true with regard to the connection string used with any +\fBmysqld\fR +processes that you wish to start as NDB Cluster SQL nodes connected to this cluster\&. See +Section\ \&18.3.3.3, \(lqNDB Cluster Connection Strings\(rq, for more information\&. +.sp +When used with +\fBndb_mgmd\fR, this option affects the behavior of the management node with regard to other management nodes only\&. Do not confuse it with the +\fB\-\-nowait\-nodes\fR +option used with +\fBndbd\fR +or +\fBndbmtd\fR +to permit a cluster to start with fewer than its full complement of data nodes; when used with data nodes, this option affects their behavior only with regard to other data nodes\&. +.sp +Multiple management node IDs may be passed to this option as a comma\-separated list\&. Each node ID must be no less than 1 and no greater than 255\&. In practice, it is quite rare to use more than two management servers for the same NDB Cluster (or to have any need for doing so); in most cases you need to pass to this option only the single node ID for the one management server that you do not wish to use when starting the cluster\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +When you later start the +\(lqmissing\(rq +management server, its configuration must match that of the management server that is already in use by the cluster\&. Otherwise, it fails the configuration check performed by the existing management server, and does not start\&. +.sp .5v +.RE +.RE +.PP +It is not strictly necessary to specify a connection string when starting the management server\&. However, if you are using more than one management server, a connection string should be provided and each node in the cluster should specify its node ID explicitly\&. +.PP +See +Section\ \&18.3.3.3, \(lqNDB Cluster Connection Strings\(rq, for information about using connection strings\&. +\fBndb_mgmd\fR(8), describes other options for +\fBndb_mgmd\fR\&. +.PP +The following files are created or used by +\fBndb_mgmd\fR +in its starting directory, and are placed in the +DataDir +as specified in the +config\&.ini +configuration file\&. In the list that follows, +\fInode_id\fR +is the unique node identifier\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +config\&.ini +is the configuration file for the cluster as a whole\&. This file is created by the user and read by the management server\&. +Section\ \&18.3, \(lqConfiguration of NDB Cluster\(rq, discusses how to set up this file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_cluster\&.log +is the cluster events log file\&. Examples of such events include checkpoint startup and completion, node startup events, node failures, and levels of memory usage\&. A complete listing of cluster events with descriptions may be found in +Section\ \&18.5, \(lqManagement of NDB Cluster\(rq\&. +.sp +By default, when the size of the cluster log reaches one million bytes, the file is renamed to +ndb_\fInode_id\fR_cluster\&.log\&.\fIseq_id\fR, where +\fIseq_id\fR +is the sequence number of the cluster log file\&. (For example: If files with the sequence numbers 1, 2, and 3 already exist, the next log file is named using the number +4\&.) You can change the size and number of files, and other characteristics of the cluster log, using the +LogDestination +configuration parameter\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_out\&.log +is the file used for +stdout +and +stderr +when running the management server as a daemon\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR\&.pid +is the process ID file used when running the management server as a daemon\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-install[=\fR\fB\fIname\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-install[=name] +T} +T{ +\fBPlatform Specific\fR +T}:T{ +Windows +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +ndb_mgmd +T} +.TE +.sp 1 +Causes +\fBndb_mgmd\fR +to be installed as a Windows service\&. Optionally, you can specify a name for the service; if not set, the service name defaults to +ndb_mgmd\&. Although it is preferable to specify other +\fBndb_mgmd\fR +program options in a +my\&.ini +or +my\&.cnf +configuration file, it is possible to use them together with +\fB\-\-install\fR\&. However, in such cases, the +\fB\-\-install\fR +option must be specified first, before any other options are given, for the Windows service installation to succeed\&. +.sp +It is generally not advisable to use this option together with the +\fB\-\-initial\fR +option, since this causes the configuration cache to be wiped and rebuilt every time the service is stopped and started\&. Care should also be taken if you intend to use any other +\fBndb_mgmd\fR +options that affect the starting of the management server, and you should make absolutely certain you fully understand and allow for any possible consequences of doing so\&. +.sp +The +\fB\-\-install\fR +option has no effect on non\-Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-remove[=\fR\fB\fIname\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-remove[=name] +T} +T{ +\fBPlatform Specific\fR +T}:T{ +Windows +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +ndb_mgmd +T} +.TE +.sp 1 +Causes an +\fBndb_mgmd\fR +process that was previously installed as a Windows service to be removed\&. Optionally, you can specify a name for the service to be uninstalled; if not set, the service name defaults to +ndb_mgmd\&. +.sp +The +\fB\-\-remove\fR +option has no effect on non\-Windows platforms\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndbd.8 b/man/ndbd.8 new file mode 100644 index 000000000000..ff8303137120 --- /dev/null +++ b/man/ndbd.8 @@ -0,0 +1,1089 @@ +'\" t +.\" Title: \fBndbd\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/02/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.6 +.\" Language: English +.\" +.TH "\FBNDBD\FR" "8" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndbd \- the NDB Cluster data node daemon +.SH "SYNOPSIS" +.HP \w'\fBndbd\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndbd \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndbd\fR +is the process that is used to handle all the data in tables using the NDB Cluster storage engine\&. This is the process that empowers a data node to accomplish distributed transaction handling, node recovery, checkpointing to disk, online backup, and related tasks\&. +.PP +In an NDB Cluster, a set of +\fBndbd\fR +processes cooperate in handling data\&. These processes can execute on the same computer (host) or on different computers\&. The correspondences between data nodes and Cluster hosts is completely configurable\&. +.PP +The following table includes command options specific to the NDB Cluster data node program +\fBndbd\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndbd\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&18.83.\ \& This table describes command\-line options for the ndbd program +.TS +allbox tab(:); +. +.TE +.sp 1 +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +All of these options also apply to the multi\-threaded version of this program (\fBndbmtd\fR) and you may substitute +\(lq\fBndbmtd\fR\(rq +for +\(lq\fBndbd\fR\(rq +wherever the latter occurs in this section\&. +.sp .5v +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-bind\-address\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-bind\-address=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Causes +\fBndbd\fR +to bind to a specific network interface (host name or IP address)\&. This option has no default value\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-daemon\fR, +\fB\-d\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-daemon +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Instructs +\fBndbd\fR +or +\fBndbmtd\fR +to execute as a daemon process\&. This is the default behavior\&. +\fB\-\-nodaemon\fR +can be used to prevent the process from running as a daemon\&. +.sp +This option has no effect when running +\fBndbd\fR +or +\fBndbmtd\fR +on Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nodaemon\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nodaemon +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Prevents +\fBndbd\fR +or +\fBndbmtd\fR +from executing as a daemon process\&. This option overrides the +\fB\-\-daemon\fR +option\&. This is useful for redirecting output to the screen when debugging the binary\&. +.sp +The default behavior for +\fBndbd\fR +and +\fBndbmtd\fR +on Windows is to run in the foreground, making this option unnecessary on Windows platforms, where it has no effect\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-foreground\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-foreground +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Causes +\fBndbd\fR +or +\fBndbmtd\fR +to execute as a foreground process, primarily for debugging purposes\&. This option implies the +\fB\-\-nodaemon\fR +option\&. +.sp +This option has no effect when running +\fBndbd\fR +or +\fBndbmtd\fR +on Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-initial\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-initial +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Instructs +\fBndbd\fR +to perform an initial start\&. An initial start erases any files created for recovery purposes by earlier instances of +\fBndbd\fR\&. It also re\-creates recovery log files\&. On some operating systems, this process can take a substantial amount of time\&. +.sp +An +\fB\-\-initial\fR +start is to be used +\fIonly\fR +when starting the +\fBndbd\fR +process under very special circumstances; this is because this option causes all files to be removed from the NDB Cluster file system and all redo log files to be re\-created\&. These circumstances are listed here: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +When performing a software upgrade which has changed the contents of any files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +When restarting the node with a new version of +\fBndbd\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +As a measure of last resort when for some reason the node restart or system restart repeatedly fails\&. In this case, be aware that this node can no longer be used to restore data due to the destruction of the data files\&. +.RE +.sp +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +To avoid the possibility of eventual data loss, it is recommended that you +\fInot\fR +use the +\fB\-\-initial\fR +option together with +StopOnError = 0\&. Instead, set +StopOnError +to 0 in +config\&.ini +only after the cluster has been started, then restart the data nodes normally\(emthat is, without the +\fB\-\-initial\fR +option\&. See the description of the +StopOnError +parameter for a detailed explanation of this issue\&. (Bug #24945638) +.sp .5v +.RE +Use of this option prevents the +StartPartialTimeout +and +StartPartitionedTimeout +configuration parameters from having any effect\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +This option does +\fInot\fR +affect either of the following types of files: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Backup files that have already been created by the affected node +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NDB Cluster Disk Data files (see +Section\ \&18.5.12, \(lqNDB Cluster Disk Data Tables\(rq)\&. +.RE +.sp +This option also has no effect on recovery of data by a data node that is just starting (or restarting) from data nodes that are already running\&. This recovery of data occurs automatically, and requires no user intervention in an NDB Cluster that is running normally\&. +.sp .5v +.RE +It is permissible to use this option when starting the cluster for the very first time (that is, before any data node files have been created); however, it is +\fInot\fR +necessary to do so\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-initial\-start\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-initial\-start +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +This option is used when performing a partial initial start of the cluster\&. Each node should be started with this option, as well as +\fB\-\-nowait\-nodes\fR\&. +.sp +Suppose that you have a 4\-node cluster whose data nodes have the IDs 2, 3, 4, and 5, and you wish to perform a partial initial start using only nodes 2, 4, and 5\(emthat is, omitting node 3: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbd \-\-ndb\-nodeid=2 \-\-nowait\-nodes=3 \-\-initial\-start\fR +shell> \fBndbd \-\-ndb\-nodeid=4 \-\-nowait\-nodes=3 \-\-initial\-start\fR +shell> \fBndbd \-\-ndb\-nodeid=5 \-\-nowait\-nodes=3 \-\-initial\-start\fR +.fi +.if n \{\ +.RE +.\} +.sp +When using this option, you must also specify the node ID for the data node being started with the +\fB\-\-ndb\-nodeid\fR +option\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +Do not confuse this option with the +\fB\-\-nowait\-nodes\fR +option for +\fBndb_mgmd\fR, which can be used to enable a cluster configured with multiple management servers to be started without all management servers being online\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nowait\-nodes=\fR\fB\fInode_id_1\fR\fR\fB[, \fR\fB\fInode_id_2\fR\fR\fB[, \&.\&.\&.]]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nowait\-nodes=list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +This option takes a list of data nodes which for which the cluster will not wait for before starting\&. +.sp +This can be used to start the cluster in a partitioned state\&. For example, to start the cluster with only half of the data nodes (nodes 2, 3, 4, and 5) running in a 4\-node cluster, you can start each +\fBndbd\fR +process with +\fB\-\-nowait\-nodes=3,5\fR\&. In this case, the cluster starts as soon as nodes 2 and 4 connect, and does +\fInot\fR +wait +StartPartitionedTimeout +milliseconds for nodes 3 and 5 to connect as it would otherwise\&. +.sp +If you wanted to start up the same cluster as in the previous example without one +\fBndbd\fR +(say, for example, that the host machine for node 3 has suffered a hardware failure) then start nodes 2, 4, and 5 with +\fB\-\-nowait\-nodes=3\fR\&. Then the cluster will start as soon as nodes 2, 4, and 5 connect and will not wait for node 3 to start\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nostart\fR, +\fB\-n\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nostart +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Instructs +\fBndbd\fR +not to start automatically\&. When this option is used, +\fBndbd\fR +connects to the management server, obtains configuration data from it, and initializes communication objects\&. However, it does not actually start the execution engine until specifically requested to do so by the management server\&. This can be accomplished by issuing the proper +START +command in the management client (see +Section\ \&18.5.2, \(lqCommands in the NDB Cluster Management Client\(rq)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-install[=\fR\fB\fIname\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-install[=name] +T} +T{ +\fBPlatform Specific\fR +T}:T{ +Windows +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +ndbd +T} +.TE +.sp 1 +Causes +\fBndbd\fR +to be installed as a Windows service\&. Optionally, you can specify a name for the service; if not set, the service name defaults to +ndbd\&. Although it is preferable to specify other +\fBndbd\fR +program options in a +my\&.ini +or +my\&.cnf +configuration file, it is possible to use together with +\fB\-\-install\fR\&. However, in such cases, the +\fB\-\-install\fR +option must be specified first, before any other options are given, for the Windows service installation to succeed\&. +.sp +It is generally not advisable to use this option together with the +\fB\-\-initial\fR +option, since this causes the data node file system to be wiped and rebuilt every time the service is stopped and started\&. Extreme care should also be taken if you intend to use any of the other +\fBndbd\fR +options that affect the starting of data nodes\(emincluding +\fB\-\-initial\-start\fR, +\fB\-\-nostart\fR, and +\fB\-\-nowait\-nodes\fR\(emtogether with +\fB\-\-install\fR, and you should make absolutely certain you fully understand and allow for any possible consequences of doing so\&. +.sp +The +\fB\-\-install\fR +option has no effect on non\-Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-remove[=\fR\fB\fIname\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-remove[=name] +T} +T{ +\fBPlatform Specific\fR +T}:T{ +Windows +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +ndbd +T} +.TE +.sp 1 +Causes an +\fBndbd\fR +process that was previously installed as a Windows service to be removed\&. Optionally, you can specify a name for the service to be uninstalled; if not set, the service name defaults to +ndbd\&. +.sp +The +\fB\-\-remove\fR +option has no effect on non\-Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-connect\-retries=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connect\-retries=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +12 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +65535 +T} +.TE +.sp 1 +Set the number of times to retry a connection before giving up; 0 means 1 attempt only (and no retries)\&. The default is 12 attempts\&. The time to wait between attempts is controlled by the +\fB\-\-connect\-retry\-delay\fR +option in MySQL NDB 7\&.4\&.9 and later (previously, this was +\fB\-\-connect\-delay\fR)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-connect\-delay=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBDeprecated\fR +T}:T{ +5\&.6\&.28\-ndb\-7\&.4\&.9 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connect\-delay=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +5 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +3600 +T} +.TE +.sp 1 +Determines the time to wait between attempts to contact a management server when starting (the number of attempts is controlled by the +\fB\-\-connect\-retries\fR +option)\&. The default is 5 seconds\&. +.sp +This option is deprecated in NDB 7\&.4\&.9, and is subject to removal in a future release of NDB Cluster\&. Use +\fB\-\-connect\-retry\-delay\fR +instead\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-connect\-retry\-delay=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.6\&.28\-ndb\-7\&.4\&.9 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connect\-retry\-delay=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.6\&.28\-ndb\-7\&.4\&.9) +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +5 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Determines the time to wait between attempts to contact a management server when starting (the time between attempts is controlled by the +\fB\-\-connect\-retries\fR +option)\&. The default is 5 seconds\&. +.sp +This option was added in NDB 7\&.4\&.9, and is intended to take the place of the +\fB\-\-connect\-delay\fR +option, which is now deprecated and subject to removal in a future release of NDB Cluster\&. +.RE +.PP +\fBndbd\fR +generates a set of log files which are placed in the directory specified by +DataDir +in the +config\&.ini +configuration file\&. +.PP +These log files are listed below\&. +\fInode_id\fR +is and represents the node\*(Aqs unique identifier\&. For example, +ndb_2_error\&.log +is the error log generated by the data node whose node ID is +2\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_error\&.log +is a file containing records of all crashes which the referenced +\fBndbd\fR +process has encountered\&. Each record in this file contains a brief error string and a reference to a trace file for this crash\&. A typical entry in this file might appear as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +Date/Time: Saturday 30 July 2004 \- 00:20:01 +Type of error: error +Message: Internal program error (failed ndbrequire) +Fault ID: 2341 +Problem data: DbtupFixAlloc\&.cpp +Object of reference: DBTUP (Line: 173) +ProgramName: NDB Kernel +ProcessID: 14909 +TraceFile: ndb_2_trace\&.log\&.2 +***EOM*** +.fi +.if n \{\ +.RE +.\} +.sp +Listings of possible +\fBndbd\fR +exit codes and messages generated when a data node process shuts down prematurely can be found in +\m[blue]\fBData Node Error Messages\fR\m[]\&\s-2\u[1]\d\s+2\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +\fIThe last entry in the error log file is not necessarily the newest one\fR +(nor is it likely to be)\&. Entries in the error log are +\fInot\fR +listed in chronological order; rather, they correspond to the order of the trace files as determined in the +ndb_\fInode_id\fR_trace\&.log\&.next +file (see below)\&. Error log entries are thus overwritten in a cyclical and not sequential fashion\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_trace\&.log\&.\fItrace_id\fR +is a trace file describing exactly what happened just before the error occurred\&. This information is useful for analysis by the NDB Cluster development team\&. +.sp +It is possible to configure the number of these trace files that will be created before old files are overwritten\&. +\fItrace_id\fR +is a number which is incremented for each successive trace file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_trace\&.log\&.next +is the file that keeps track of the next trace file number to be assigned\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_out\&.log +is a file containing any data output by the +\fBndbd\fR +process\&. This file is created only if +\fBndbd\fR +is started as a daemon, which is the default behavior\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR\&.pid +is a file containing the process ID of the +\fBndbd\fR +process when started as a daemon\&. It also functions as a lock file to avoid the starting of nodes with the same identifier\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_signal\&.log +is a file used only in debug versions of +\fBndbd\fR, where it is possible to trace all incoming, outgoing, and internal messages with their data in the +\fBndbd\fR +process\&. +.RE +.PP +It is recommended not to use a directory mounted through NFS because in some environments this can cause problems whereby the lock on the +\&.pid +file remains in effect even after the process has terminated\&. +.PP +To start +\fBndbd\fR, it may also be necessary to specify the host name of the management server and the port on which it is listening\&. Optionally, one may also specify the node ID that the process is to use\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbd \-\-connect\-string="nodeid=2;host=ndb_mgmd\&.mysql\&.com:1186"\fR +.fi +.if n \{\ +.RE +.\} +.PP +See +Section\ \&18.3.3.3, \(lqNDB Cluster Connection Strings\(rq, for additional information about this issue\&. +Options Common to NDB Cluster Programs(1), describes other command\-line options which can be used with +\fBndbd\fR\&. For information about data node configuration parameters, see +Section\ \&18.3.3.6, \(lqDefining NDB Cluster Data Nodes\(rq\&. +.PP +When +\fBndbd\fR +starts, it actually initiates two processes\&. The first of these is called the +\(lqangel process\(rq; its only job is to discover when the execution process has been completed, and then to restart the +\fBndbd\fR +process if it is configured to do so\&. Thus, if you attempt to kill +\fBndbd\fR +using the Unix +\fBkill\fR +command, it is necessary to kill both processes, beginning with the angel process\&. The preferred method of terminating an +\fBndbd\fR +process is to use the management client and stop the process from there\&. +.PP +The execution process uses one thread for reading, writing, and scanning data, as well as all other activities\&. This thread is implemented asynchronously so that it can easily handle thousands of concurrent actions\&. In addition, a watch\-dog thread supervises the execution thread to make sure that it does not hang in an endless loop\&. A pool of threads handles file I/O, with each thread able to handle one open file\&. Threads can also be used for transporter connections by the transporters in the +\fBndbd\fR +process\&. In a multi\-processor system performing a large number of operations (including updates), the +\fBndbd\fR +process can consume up to 2 CPUs if permitted to do so\&. +.PP +For a machine with many CPUs it is possible to use several +\fBndbd\fR +processes which belong to different node groups; however, such a configuration is still considered experimental and is not supported for MySQL 5\&.6 in a production setting\&. See +Section\ \&18.1.6, \(lqKnown Limitations of NDB Cluster\(rq\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +Data Node Error Messages +.RS 4 +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-node-error-messages.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndbmtd.8 b/man/ndbmtd.8 new file mode 100644 index 000000000000..74af2628d077 --- /dev/null +++ b/man/ndbmtd.8 @@ -0,0 +1,215 @@ +'\" t +.\" Title: \fBndbmtd\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/02/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.6 +.\" Language: English +.\" +.TH "\FBNDBMTD\FR" "8" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndbmtd \- the NDB Cluster data node daemon (multi\-threaded version) +.SH "SYNOPSIS" +.HP \w'\fBndbmtd\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndbmtd \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndbmtd\fR +is a multi\-threaded version of +\fBndbd\fR, the process that is used to handle all the data in tables using the +NDBCLUSTER +storage engine\&. +\fBndbmtd\fR +is intended for use on host computers having multiple CPU cores\&. Except where otherwise noted, +\fBndbmtd\fR +functions in the same way as +\fBndbd\fR; therefore, in this section, we concentrate on the ways in which +\fBndbmtd\fR +differs from +\fBndbd\fR, and you should consult +\fBndbd\fR(8), for additional information about running NDB Cluster data nodes that apply to both the single\-threaded and multi\-threaded versions of the data node process\&. +.PP +Command\-line options and configuration parameters used with +\fBndbd\fR +also apply to +\fBndbmtd\fR\&. For more information about these options and parameters, see +\fBndbd\fR(8), and +Section\ \&18.3.3.6, \(lqDefining NDB Cluster Data Nodes\(rq, respectively\&. +.PP +\fBndbmtd\fR +is also file system\-compatible with +\fBndbd\fR\&. In other words, a data node running +\fBndbd\fR +can be stopped, the binary replaced with +\fBndbmtd\fR, and then restarted without any loss of data\&. (However, when doing this, you must make sure that +MaxNoOfExecutionThreads +is set to an apppriate value before restarting the node if you wish for +\fBndbmtd\fR +to run in multi\-threaded fashion\&.) Similarly, an +\fBndbmtd\fR +binary can be replaced with +\fBndbd\fR +simply by stopping the node and then starting +\fBndbd\fR +in place of the multi\-threaded binary\&. It is not necessary when switching between the two to start the data node binary using +\fB\-\-initial\fR\&. +.PP +Using +\fBndbmtd\fR +differs from using +\fBndbd\fR +in two key respects: +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +Because +\fBndbmtd\fR +runs by default in single\-threaded mode (that is, it behaves like +\fBndbd\fR), you must configure it to use multiple threads\&. This can be done by setting an appropriate value in the +config\&.ini +file for the +MaxNoOfExecutionThreads +configuration parameter or the +ThreadConfig +configuration parameter\&. Using +MaxNoOfExecutionThreads +is simpler, but +ThreadConfig +offers more flexibility\&. For more information about these configuration parameters and their use, see +Multi-Threading Configuration Parameters (ndbmtd)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +Trace files are generated by critical errors in +\fBndbmtd\fR +processes in a somewhat different fashion from how these are generated by +\fBndbd\fR +failures\&. These differences are discussed in more detail in the next few paragraphs\&. +.RE +.PP +Like +\fBndbd\fR, +\fBndbmtd\fR +generates a set of log files which are placed in the directory specified by +DataDir +in the +config\&.ini +configuration file\&. Except for trace files, these are generated in the same way and have the same names as those generated by +\fBndbd\fR\&. +.PP +In the event of a critical error, +\fBndbmtd\fR +generates trace files describing what happened just prior to the error\*(Aq occurrence\&. These files, which can be found in the data node\*(Aqs +DataDir, are useful for analysis of problems by the NDB Cluster Development and Support teams\&. One trace file is generated for each +\fBndbmtd\fR +thread\&. The names of these files have the following pattern: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_\fInode_id\fR_trace\&.log\&.\fItrace_id\fR_t\fIthread_id\fR, +.fi +.if n \{\ +.RE +.\} +.PP +In this pattern, +\fInode_id\fR +stands for the data node\*(Aqs unique node ID in the cluster, +\fItrace_id\fR +is a trace sequence number, and +\fIthread_id\fR +is the thread ID\&. For example, in the event of the failure of an +\fBndbmtd\fR +process running as an NDB Cluster data node having the node ID 3 and with +MaxNoOfExecutionThreads +equal to 4, four trace files are generated in the data node\*(Aqs data directory\&. If the is the first time this node has failed, then these files are named +ndb_3_trace\&.log\&.1_t1, +ndb_3_trace\&.log\&.1_t2, +ndb_3_trace\&.log\&.1_t3, and +ndb_3_trace\&.log\&.1_t4\&. Internally, these trace files follow the same format as +\fBndbd\fR +trace files\&. +.PP +The +\fBndbd\fR +exit codes and messages that are generated when a data node process shuts down prematurely are also used by +\fBndbmtd\fR\&. See +\m[blue]\fBData Node Error Messages\fR\m[]\&\s-2\u[1]\d\s+2, for a listing of these\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +It is possible to use +\fBndbd\fR +and +\fBndbmtd\fR +concurrently on different data nodes in the same NDB Cluster\&. However, such configurations have not been tested extensively; thus, we cannot recommend doing so in a production setting at this time\&. +.sp .5v +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +Data Node Error Messages +.RS 4 +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-node-error-messages.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/perror.1 b/man/perror.1 index 13d4ecf5d00d..0e9475cc1c97 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -2,12 +2,12 @@ .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -82,7 +82,7 @@ OS error code 64: Machine is not on the network .RE .\} .PP -To obtain the error message for a MySQL Cluster error code, invoke +To obtain the error message for an NDB Cluster error code, invoke \fBperror\fR with the \fB\-\-ndb\fR @@ -129,7 +129,7 @@ Display a help message and exit\&. .\} \fB\-\-ndb\fR .sp -Print the error message for a MySQL Cluster error code\&. +Print the error message for an NDB Cluster error code\&. .RE .sp .RS 4 diff --git a/man/replace.1 b/man/replace.1 index 0e4eebdf7b49..4115be50fdd1 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -2,12 +2,12 @@ .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index 000e6332b7f0..f53361e299e5 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolveip.1 b/man/resolveip.1 index ddb48e2b7ba3..9e0f17709a20 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/02/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.6 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "03/17/2017" "MySQL 5\&.6" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "06/02/2017" "MySQL 5\&.6" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- From 924e7942a860e7415b377834d0db2fc20622f78f Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 18 Sep 2017 16:22:32 +0300 Subject: [PATCH 263/305] MW-406 Bumped up the wsrep patch version (5.6.37-25.21) --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 1a511b9c6c80..28cb95b56ac2 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "20") +SET(WSREP_PATCH_VERSION "21") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From 24dc56a798750ddf48dd51964ce5c979bb06c273 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 18 Sep 2017 16:29:27 +0300 Subject: [PATCH 264/305] MW-406 Updated man pages (5.7) --- man/comp_err.1 | 4 +- man/innochecksum.1 | 4 +- man/lz4_decompress.1 | 4 +- man/my_print_defaults.1 | 4 +- man/myisam_ftdump.1 | 4 +- man/myisamchk.1 | 30 +- man/myisamlog.1 | 4 +- man/myisampack.1 | 8 +- man/mysql-stress-test.pl.1 | 4 +- man/mysql-test-run.pl.1 | 28 +- man/mysql.1 | 83 +- man/mysql.server.1 | 213 ++- man/mysql_client_test.1 | 6 +- man/mysql_config.1 | 4 +- man/mysql_config_editor.1 | 6 +- man/mysql_install_db.1 | 12 +- man/mysql_plugin.1 | 8 +- man/mysql_secure_installation.1 | 12 +- man/mysql_ssl_rsa_setup.1 | 14 +- man/mysql_tzinfo_to_sql.1 | 6 +- man/mysql_upgrade.1 | 34 +- man/mysqladmin.1 | 32 +- man/mysqlbinlog.1 | 44 +- man/mysqlcheck.1 | 32 +- man/mysqld.8 | 6 +- man/mysqld_multi.1 | 18 +- man/mysqld_safe.1 | 28 +- man/mysqldump.1 | 56 +- man/mysqldumpslow.1 | 6 +- man/mysqlimport.1 | 37 +- man/mysqlpump.1 | 124 +- man/mysqlshow.1 | 28 +- man/mysqlslap.1 | 22 +- man/mysqltest.1 | 10 +- man/ndb-common-options.1 | 841 ++++++++++++ man/ndb_blob_tool.1 | 393 ++++++ man/ndb_config.1 | 1418 ++++++++++++++++++++ man/ndb_cpcd.1 | 54 + man/ndb_delete_all.1 | 123 ++ man/ndb_desc.1 | 622 +++++++++ man/ndb_drop_index.1 | 149 +++ man/ndb_drop_table.1 | 90 ++ man/ndb_error_reporter.1 | 244 ++++ man/ndb_import.1 | 2189 +++++++++++++++++++++++++++++++ man/ndb_index_stat.1 | 851 ++++++++++++ man/ndb_mgm.1 | 311 +++++ man/ndb_mgmd.8 | 1094 +++++++++++++++ man/ndb_move_data.1 | 446 +++++++ man/ndb_perror.1 | 369 ++++++ man/ndb_print_backup_file.1 | 88 ++ man/ndb_print_file.1 | 120 ++ man/ndb_print_frag_file.1 | 138 ++ man/ndb_print_schema_file.1 | 88 ++ man/ndb_print_sys_file.1 | 91 ++ man/ndb_redo_log_reader.1 | 594 +++++++++ man/ndb_restore.1 | 2002 ++++++++++++++++++++++++++++ man/ndb_select_all.1 | 439 +++++++ man/ndb_select_count.1 | 102 ++ man/ndb_setup.py.1 | 546 ++++++++ man/ndb_show_tables.1 | 236 ++++ man/ndb_size.pl.1 | 291 ++++ man/ndb_top.1 | 754 +++++++++++ man/ndb_waiter.1 | 409 ++++++ man/ndbd.8 | 1082 +++++++++++++++ man/ndbinfo_select_all.1 | 240 ++++ man/ndbmtd.8 | 215 +++ man/perror.1 | 28 +- man/replace.1 | 4 +- man/resolve_stack_dump.1 | 4 +- man/resolveip.1 | 4 +- man/zlib_decompress.1 | 4 +- 71 files changed, 17219 insertions(+), 389 deletions(-) create mode 100644 man/ndb-common-options.1 create mode 100644 man/ndb_blob_tool.1 create mode 100644 man/ndb_config.1 create mode 100644 man/ndb_cpcd.1 create mode 100644 man/ndb_delete_all.1 create mode 100644 man/ndb_desc.1 create mode 100644 man/ndb_drop_index.1 create mode 100644 man/ndb_drop_table.1 create mode 100644 man/ndb_error_reporter.1 create mode 100644 man/ndb_import.1 create mode 100644 man/ndb_index_stat.1 create mode 100644 man/ndb_mgm.1 create mode 100644 man/ndb_mgmd.8 create mode 100644 man/ndb_move_data.1 create mode 100644 man/ndb_perror.1 create mode 100644 man/ndb_print_backup_file.1 create mode 100644 man/ndb_print_file.1 create mode 100644 man/ndb_print_frag_file.1 create mode 100644 man/ndb_print_schema_file.1 create mode 100644 man/ndb_print_sys_file.1 create mode 100644 man/ndb_redo_log_reader.1 create mode 100644 man/ndb_restore.1 create mode 100644 man/ndb_select_all.1 create mode 100644 man/ndb_select_count.1 create mode 100644 man/ndb_setup.py.1 create mode 100644 man/ndb_show_tables.1 create mode 100644 man/ndb_size.pl.1 create mode 100644 man/ndb_top.1 create mode 100644 man/ndb_waiter.1 create mode 100644 man/ndbd.8 create mode 100644 man/ndbinfo_select_all.1 create mode 100644 man/ndbmtd.8 diff --git a/man/comp_err.1 b/man/comp_err.1 index 874fad4d6fd3..e89465d31242 100644 --- a/man/comp_err.1 +++ b/man/comp_err.1 @@ -2,12 +2,12 @@ .\" Title: \fBcomp_err\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBCOMP_ERR\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBCOMP_ERR\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/innochecksum.1 b/man/innochecksum.1 index 25d9d146dbb7..44503801e782 100644 --- a/man/innochecksum.1 +++ b/man/innochecksum.1 @@ -2,12 +2,12 @@ .\" Title: \fBinnochecksum\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBINNOCHECKSUM\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBINNOCHECKSUM\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/lz4_decompress.1 b/man/lz4_decompress.1 index c95ab8a98975..6c05cfe247de 100644 --- a/man/lz4_decompress.1 +++ b/man/lz4_decompress.1 @@ -2,12 +2,12 @@ .\" Title: \fBlz4_decompress\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBLZ4_DECOMPRESS\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBLZ4_DECOMPRESS\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1 index c9e5b48429c9..c855af11e91c 100644 --- a/man/my_print_defaults.1 +++ b/man/my_print_defaults.1 @@ -2,12 +2,12 @@ .\" Title: \fBmy_print_defaults\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMY_PRINT_DEFAULTS" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMY_PRINT_DEFAULTS" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisam_ftdump.1 b/man/myisam_ftdump.1 index afc3adc56c04..d3b200ffeed1 100644 --- a/man/myisam_ftdump.1 +++ b/man/myisam_ftdump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisam_ftdump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYISAM_FTDUMP\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYISAM_FTDUMP\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisamchk.1 b/man/myisamchk.1 index da03435ab34a..7b7b4d6712be 100644 --- a/man/myisamchk.1 +++ b/man/myisamchk.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamchk\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYISAMCHK\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYISAMCHK\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -53,8 +53,8 @@ REPAIR TABLE statements to check and repair MyISAM tables\&. See -Section\ \&14.7.2.2, \(lqCHECK TABLE Syntax\(rq, and -Section\ \&14.7.2.5, \(lqREPAIR TABLE Syntax\(rq\&. +Section\ \&13.7.2.2, \(lqCHECK TABLE Syntax\(rq, and +Section\ \&13.7.2.5, \(lqREPAIR TABLE Syntax\(rq\&. .PP The use of \fBmyisamchk\fR @@ -192,7 +192,7 @@ the section called \(lqMYISAMCHK MEMORY USAGE\(rq\&. .PP For additional information about using \fBmyisamchk\fR, see -Section\ \&8.6, \(lqMyISAM Table Maintenance and Crash Recovery\(rq\&. +Section\ \&7.6, \(lqMyISAM Table Maintenance and Crash Recovery\(rq\&. .if n \{\ .sp .\} @@ -241,7 +241,7 @@ CHECK TABLE instead of \fBmyisamchk\fR to check tables\&. See -Section\ \&14.7.2.2, \(lqCHECK TABLE Syntax\(rq\&. +Section\ \&13.7.2.2, \(lqCHECK TABLE Syntax\(rq\&. .sp .5v .RE .PP @@ -249,7 +249,7 @@ Section\ \&14.7.2.2, \(lqCHECK TABLE Syntax\(rq\&. supports the following options, which can be specified on the command line or in the [myisamchk] group of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .SH "MYISAMCHK GENERAL OPTIONS" .PP The options described in this section can be used for any type of table maintenance operation performed by @@ -619,8 +619,8 @@ myisam_stats_method system variable\&. For more information, see the description of myisam_stats_method in -Section\ \&6.1.5, \(lqServer System Variables\(rq, and -Section\ \&9.3.7, \(lqInnoDB and MyISAM Index Statistics Collection\(rq\&. +Section\ \&5.1.5, \(lqServer System Variables\(rq, and +Section\ \&8.3.7, \(lqInnoDB and MyISAM Index Statistics Collection\(rq\&. .PP ft_min_word_len and @@ -890,7 +890,7 @@ file as \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -1371,7 +1371,7 @@ CREATE TABLE person PRIMARY KEY (id), INDEX (last_name, first_name), INDEX (birth) -) MAX_ROWS = 1000000; +) MAX_ROWS = 1000000 ENGINE=MYISAM; .fi .if n \{\ .RE @@ -1594,7 +1594,7 @@ The number of rows in the table\&. Deleted blocks .sp How many deleted blocks still have reserved space\&. You can optimize your table to minimize this space\&. See -Section\ \&8.6.4, \(lqMyISAM Table Optimization\(rq\&. +Section\ \&7.6.4, \(lqMyISAM Table Optimization\(rq\&. .RE .sp .RS 4 @@ -1622,7 +1622,7 @@ Data records\&. Deleted data .sp How many bytes of unreclaimed deleted data there are\&. You can optimize your table to minimize this space\&. See -Section\ \&8.6.4, \(lqMyISAM Table Optimization\(rq\&. +Section\ \&7.6.4, \(lqMyISAM Table Optimization\(rq\&. .RE .sp .RS 4 @@ -2109,7 +2109,7 @@ The number of rows in the table\&. Deleted blocks .sp How many deleted blocks still have reserved space\&. You can optimize your table to minimize this space\&. See -Section\ \&8.6.4, \(lqMyISAM Table Optimization\(rq\&. +Section\ \&7.6.4, \(lqMyISAM Table Optimization\(rq\&. .RE .sp .RS 4 @@ -2247,7 +2247,7 @@ What percentage of the data file is unused\&. Blocks/Record .sp Average number of blocks per row (that is, how many links a fragmented row is composed of)\&. This is always 1\&.0 for fixed\-format tables\&. This value should stay as close to 1\&.0 as possible\&. If it gets too large, you can reorganize the table\&. See -Section\ \&8.6.4, \(lqMyISAM Table Optimization\(rq\&. +Section\ \&7.6.4, \(lqMyISAM Table Optimization\(rq\&. .RE .sp .RS 4 diff --git a/man/myisamlog.1 b/man/myisamlog.1 index 6e6455128cf6..1231d22412a9 100644 --- a/man/myisamlog.1 +++ b/man/myisamlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisamlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYISAMLOG\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYISAMLOG\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/myisampack.1 b/man/myisampack.1 index 9a5e32af8aa1..b6407a867f77 100644 --- a/man/myisampack.1 +++ b/man/myisampack.1 @@ -2,12 +2,12 @@ .\" Title: \fBmyisampack\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYISAMPACK\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYISAMPACK\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -118,7 +118,7 @@ to rebuild its indexes\&. .PP \fBmyisampack\fR supports the following options\&. It also reads option files and supports the options for processing them described at -Section\ \&5.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. +Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. .sp .RS 4 .ie n \{\ @@ -160,7 +160,7 @@ Make a backup of each table\*(Aqs data file using the name \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 diff --git a/man/mysql-stress-test.pl.1 b/man/mysql-stress-test.pl.1 index b40f240280ad..44c28249cb2f 100644 --- a/man/mysql-stress-test.pl.1 +++ b/man/mysql-stress-test.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-stress-test.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/14/2017 +.\" Date: 06/16/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-STRESS\-TE" "1" "03/14/2017" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-STRESS\-TE" "1" "06/16/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql-test-run.pl.1 b/man/mysql-test-run.pl.1 index d6035bc8527e..bc64771066f1 100644 --- a/man/mysql-test-run.pl.1 +++ b/man/mysql-test-run.pl.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql-test-run.pl\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/14/2017 +.\" Date: 06/16/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL\-TEST\-RUN\" "1" "03/14/2017" "MySQL" "MySQL Database System" +.TH "\FBMYSQL\-TEST\-RUN\" "1" "06/16/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,6 +33,24 @@ mysql-test-run.pl \- run MySQL test suite .HP \w'\fBmysql\-test\-run\&.pl\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u \fBmysql\-test\-run\&.pl [\fR\fB\fIoptions\fR\fR\fB]\fR .SH "DESCRIPTION" +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +\fIThis content is no longer updated\&.\fR +Any further updates to test framework documention take place in the MySQL Source Code documentation and can be accessed at +\m[blue]\fBThe MySQL Test Framework, Version 2\&.0\fR\m[]\&\s-2\u[1]\d\s+2\&. +.sp .5v +.RE .PP The \fBmysql\-test\-run\&.pl\fR @@ -2691,6 +2709,12 @@ This documentation is distributed in the hope that it will be useful, but WITHOU .PP You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. .sp +.SH "NOTES" +.IP " 1." 4 +The MySQL Test Framework, Version 2.0 +.RS 4 +\%http://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_MYSQL_TEST_RUN.html +.RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available diff --git a/man/mysql.1 b/man/mysql.1 index 6ac08d4b84be..65119e023fff 100644 --- a/man/mysql.1 +++ b/man/mysql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQL\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQL\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -59,7 +59,7 @@ mysql_store_result()\&. .br .PP Alternatively, MySQL Shell offers access to the X DevAPI\&. For details, see -Section\ \&3.8, \(lqMySQL Shell User Guide\(rq\&. +Chapter\ \&18, MySQL Shell User Guide\&. .sp .5v .RE .PP @@ -83,7 +83,8 @@ Or: .RS 4 .\} .nf -shell> \fBmysql \-\-user=\fR\fB\fIuser_name\fR\fR\fB \-\-password=\fR\fB\fIyour_password\fR\fR\fB \fR\fB\fIdb_name\fR\fR +shell> \fBmysql \-\-user=\fR\fB\fIuser_name\fR\fR\fB \-\-password \fR\fB\fIdb_name\fR\fR +Enter password: \fIyour_password\fR .fi .if n \{\ .RE @@ -123,7 +124,7 @@ supports the following options, which can be specified on the command line or in and [client] groups of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp .RS 4 .ie n \{\ @@ -227,6 +228,24 @@ option\&. .sp -1 .IP \(bu 2.3 .\} +\fB\-\-binary\-as\-hex\fR, +\fB\-b\fR +.sp +When this option is given, +\fBmysql\fR +displays binary data using hexadecimal notation (0x\fIvalue\fR)\&. This occurs whether the overall output dislay format is tabular, vertical, HTML, or XML\&. +.sp +This option was added in MySQL 5\&.7\&.19\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-binary\-mode\fR .sp This option helps when processing @@ -280,7 +299,7 @@ On a computer having multiple network interfaces, use this option to select whic \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -377,7 +396,7 @@ Compress all information sent between the client and the server if both support Indicate to the server that the client can handle sandbox mode if the account used to connect has an expired password\&. This can be useful for noninteractive invocations of \fBmysql\fR because normally the server disconnects noninteractive clients that attempt to connect using an account with an expired password\&. (See -Section\ \&7.3.7, \(lqPassword Expiration and Sandbox Mode\(rq\&.) This option was added in MySQL 5\&.7\&.2\&. +Section\ \&6.3.7, \(lqPassword Expiration and Sandbox Mode\(rq\&.) This option was added in MySQL 5\&.7\&.2\&. .RE .sp .RS 4 @@ -455,7 +474,7 @@ Print debugging information and memory and CPU usage statistics when the program \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -477,8 +496,8 @@ This option can be useful if the operating system uses one character set and the client by default uses another\&. In this case, output may be formatted incorrectly\&. You can usually fix such issues by using this option to force the client to use the system character set instead\&. .sp For more information, see -Section\ \&11.1.4, \(lqConnection Character Sets and Collations\(rq, and -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.1.4, \(lqConnection Character Sets and Collations\(rq, and +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -589,7 +608,7 @@ the section called \(lqMYSQL COMMANDS\(rq\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&7.5.1.8, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .RE .sp .RS 4 @@ -605,7 +624,7 @@ Section\ \&7.5.1.8, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) .sp Execute the statement and quit\&. The default output format is like that produced with \fB\-\-batch\fR\&. See -Section\ \&5.2.4, \(lqUsing Options on the Command Line\(rq, for some examples\&. With this option, +Section\ \&4.2.4, \(lqUsing Options on the Command Line\(rq, for some examples\&. With this option, \fBmysql\fR does not use the history file\&. .RE @@ -684,7 +703,7 @@ Produce HTML output\&. Ignore spaces after function names\&. The effect of this is described in the discussion for the IGNORE_SPACE SQL mode (see -Section\ \&6.1.8, \(lqServer SQL Modes\(rq)\&. +Section\ \&5.1.8, \(lqServer SQL Modes\(rq)\&. .RE .sp .RS 4 @@ -727,15 +746,15 @@ Write line numbers for errors\&. Disable this with Enable or disable LOCAL capability for -LOAD DATA INFILE\&. With no value, the option enables +LOAD DATA INFILE\&. For +\fBmysql\fR, this capability is disabled by default\&. With no value, the option enables LOCAL\&. The option may be given as \fB\-\-local\-infile=0\fR or \fB\-\-local\-infile=1\fR to explicitly disable or enable -LOCAL\&. Enabling -LOCAL -has no effect if the server does not also support it\&. +LOCAL\&. Enabling local data loading also requires that the server permits it; see +Section\ \&6.1.6, \(lqSecurity Issues with LOAD DATA LOCAL\(rq .RE .sp .RS 4 @@ -982,7 +1001,7 @@ option on the command line, prompts for one\&. .sp Specifying a password on the command line should be considered insecure\&. See -Section\ \&7.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. .RE .sp .RS 4 @@ -1014,7 +1033,7 @@ The directory in which to look for plugins\&. Specify this option if the option is used to specify an authentication plugin but \fBmysql\fR does not find it\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -1070,7 +1089,7 @@ the section called \(lqMYSQL COMMANDS\(rq\&. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see -Section\ \&5.2.2, \(lqConnecting to the MySQL Server\(rq\&. +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .RE .sp .RS 4 @@ -1205,7 +1224,7 @@ As of MySQL 5\&.7\&.5, this option is deprecated and will be removed in a future .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them is removed in MySQL 5\&.7\&.5\&. For account upgrade instructions, see -Section\ \&7.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. .sp .5v .RE .RE @@ -1229,7 +1248,7 @@ The server sends the public key to the client as needed, so it is not necessary For additional discussion regarding use of the sha256_password plugin, including how to get the RSA public key, see -Section\ \&7.5.1.4, \(lqThe SHA-256 Authentication Plugin\(rq\&. +Section\ \&6.5.1.4, \(lqSHA-256 Pluggable Authentication\(rq\&. .sp This option is available only if MySQL was built using OpenSSL\&. .RE @@ -1355,7 +1374,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -1441,7 +1460,7 @@ the section called \(lqMYSQL COMMANDS\(rq, discusses tee files further\&. \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more protocol names\&. The protocols that can be named for this option depend on the SSL library used to compile MySQL\&. For details, see -Section\ \&7.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. +Section\ \&6.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. .sp This option was added in MySQL 5\&.7\&.10\&. .RE @@ -1561,9 +1580,9 @@ The output when is used with \fBmysql\fR matches that of -\fBmysqldump \fR\fB\fB\-\-xml\fR\fR\&. See -\fBmysqldump\fR(1) -for details\&. +\fBmysqldump\fR +\fB\-\-xml\fR\&. See +\fBmysqldump\fR(1), for details\&. .sp The XML output also uses an XML namespace, as shown here: .sp @@ -2687,7 +2706,7 @@ prompt=(\e\eu@\e\eh) [\e\ed]>\e\e_ In this example, note that the backslashes are doubled\&. If you set the prompt using the prompt option in an option file, it is advisable to double the backslashes when using the special prompt options\&. There is some overlap in the set of permissible prompt options and the set of special escape sequences that are recognized in option files\&. (The rules for escape sequences in option files are listed in -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&.) The overlap may cause you problems if you use single backslashes\&. For example, +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&.) The overlap may cause you problems if you use single backslashes\&. For example, \es is interpreted as a space rather than as the current seconds value\&. The following example shows how to define a prompt within an option file to include the current time in HH:MM:SS> @@ -2934,7 +2953,7 @@ Controlling the History File.PP The \&.mysql_history file should be protected with a restrictive access mode because sensitive information might be written to it, such as the text of SQL statements that contain passwords\&. See -Section\ \&7.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. .PP If you do not want to maintain a history file, first remove \&.mysql_history @@ -3128,7 +3147,7 @@ command, uses it as a search string to access server\-side help from the contents of the MySQL Reference Manual\&. The proper operation of this command requires that the help tables in the mysql database be initialized with help topic information (see -Section\ \&6.1.10, \(lqServer-Side Help\(rq)\&. +Section\ \&5.1.10, \(lqServer-Side Help\(rq)\&. .PP If there is no match for the search string, the search fails: .sp @@ -3348,7 +3367,7 @@ with an option such as \fB\-\-default\-character\-set=utf8\fR\&. .PP For more information about batch mode, see -Section\ \&4.5, \(lqUsing mysql in Batch Mode\(rq\&. +Section\ \&3.5, \(lqUsing mysql in Batch Mode\(rq\&. .SH "MYSQL TIPS" .PP This section describes some techniques that can help you use @@ -3568,7 +3587,7 @@ SET sql_safe_updates=1, sql_select_limit=1000, max_join_size=1000000; .\} .PP See -Section\ \&6.1.5, \(lqServer System Variables\(rq\&. +Section\ \&5.1.5, \(lqServer System Variables\(rq\&. .PP The SET diff --git a/man/mysql.server.1 b/man/mysql.server.1 index cd6bf0e2e681..14b881ffbd23 100644 --- a/man/mysql.server.1 +++ b/man/mysql.server.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql.server\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQL\&.SERVER\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQL\&.SERVER\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,9 +34,17 @@ mysql.server \- MySQL server startup script \fBmysql {start|stop}\fR .SH "DESCRIPTION" .PP -MySQL distributions on Unix include a script named -\fBmysql\&.server\fR, which starts the server using -\fBmysqld_safe\fR\&. It can be used on systems such as Linux and Solaris that use System V\-style run directories to start and stop system services\&. It is also used by the OS X Startup Item for MySQL\&. +MySQL distributions on Unix and Unix\-like system include a script named +\fBmysql\&.server\fR, which starts the MySQL server using +\fBmysqld_safe\fR\&. It can be used on systems such as Linux and Solaris that use System V\-style run directories to start and stop system services\&. It is also used by the macOS Startup Item for MySQL\&. +.PP +\fBmysql\&.server\fR +is the script name as used within the MySQL source tree\&. The installed name might be different; for example, +\fBmysqld\fR +or +\fBmysql\fR\&. In the following discussion, adjust the name +\fBmysql\&.server\fR +as appropriate for your system\&. .if n \{\ .sp .\} @@ -50,18 +58,18 @@ MySQL distributions on Unix include a script named .ps -1 .br .PP -For MySQL installation using an RPM distribution, server startup and shutdown is managed by systemd on several Linux platforms\&. On these platforms, +For some Linux platforms, MySQL installation from RPM or Debian packages includes systemd support for managing MySQL server startup and shutdown\&. On these platforms, \fBmysql\&.server\fR and \fBmysqld_safe\fR -are no longer installed because they are unnecessary\&. For more information, see +are not installed because they are unnecessary\&. For more information, see Section\ \&2.5.10, \(lqManaging MySQL Server with systemd\(rq\&. .sp .5v .RE .PP To start or stop the server manually using the \fBmysql\&.server\fR -script, invoke it with +script, invoke it from the command line with start or stop @@ -78,21 +86,20 @@ shell> \fBmysql\&.server stop\fR .RE .\} .PP -Before \fBmysql\&.server\fR -starts the server, it changes location to the MySQL installation directory, and then invokes +changes location to the MySQL installation directory, then invokes \fBmysqld_safe\fR\&. To run the server as some specific user, add an appropriate user option to the [mysqld] -group of the +group of the global /etc/my\&.cnf option file, as shown later in this section\&. (It is possible that you must edit \fBmysql\&.server\fR if you\*(Aqve installed a binary distribution of MySQL in a nonstandard location\&. Modify it to change location into the proper directory before it runs \fBmysqld_safe\fR\&. If you do this, your modified version of \fBmysql\&.server\fR -may be overwritten if you upgrade MySQL in the future, so you should make a copy of your edited version that you can reinstall\&.) +may be overwritten if you upgrade MySQL in the future; make a copy of your edited version that you can reinstall\&.) .PP \fBmysql\&.server stop\fR stops the server by sending a signal to it\&. You can also stop the server manually by executing @@ -100,27 +107,44 @@ stops the server by sending a signal to it\&. You can also stop the server manua .PP To start and stop MySQL automatically on your server, you must add start and stop commands to the appropriate places in your /etc/rc* -files\&. -.PP +files: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} If you use the Linux server RPM package (MySQL\-server\-\fIVERSION\fR\&.rpm), or a native Linux package installation, the \fBmysql\&.server\fR script may be installed in the /etc/init\&.d directory with the name +mysqld +or mysql\&. See Section\ \&2.5.5, \(lqInstalling MySQL on Linux Using RPM Packages from Oracle\(rq, for more information on the Linux RPM packages\&. -.PP -Some vendors provide RPM packages that install a startup script under a different name such as -\fBmysqld\fR\&. -.PP +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} If you install MySQL from a source distribution or using a binary distribution format that does not install \fBmysql\&.server\fR -automatically, you can install it manually\&. The script can be found in the +automatically, you can install the script manually\&. It can be found in the support\-files -directory under the MySQL installation directory or in a MySQL source tree\&. Copy it to the +directory under the MySQL installation directory or in a MySQL source tree\&. Copy the script to the /etc/init\&.d directory with the name -\fBmysql\fR, and then make it executable: +\fBmysql\fR +and make it executable: .sp .if n \{\ .RS 4 @@ -133,40 +157,6 @@ shell> \fBchmod +x /etc/init\&.d/mysql\fR .RE .\} .sp -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.PP -Older Red Hat systems use the -/etc/rc\&.d/init\&.d -directory rather than -/etc/init\&.d\&. Adjust the preceding commands accordingly\&. Alternatively, first create -/etc/init\&.d -as a symbolic link that points to -/etc/rc\&.d/init\&.d: -.sp .5v -.RE -.sp -.if n \{\ -.RS 4 -.\} -.nf -shell> \fBcd /etc\fR -shell> \fBln \-s rc\&.d/init\&.d \&.\fR -.fi -.if n \{\ -.RE -.\} -.PP After installing the script, the commands needed to activate it to run at system startup depend on your operating system\&. On Linux, you can use \fBchkconfig\fR: .sp @@ -179,7 +169,7 @@ shell> \fBchkconfig \-\-add mysql\fR .if n \{\ .RE .\} -.PP +.sp On some Linux systems, the following command also seems to be necessary to fully enable the \fBmysql\fR script: @@ -193,18 +183,36 @@ shell> \fBchkconfig \-\-level 345 mysql on\fR .if n \{\ .RE .\} -.PP +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} On FreeBSD, startup scripts generally should go in -/usr/local/etc/rc\&.d/\&. The -rc(8) -manual page states that scripts in this directory are executed only if their base name matches the -*\&.sh -shell file name pattern\&. Any other files or directories present within the directory are silently ignored\&. In other words, on FreeBSD, you should install the +/usr/local/etc/rc\&.d/\&. Install the mysql\&.server script as /usr/local/etc/rc\&.d/mysql\&.server\&.sh -to enable automatic startup\&. -.PP +to enable automatic startup\&. The +rc(8) +manual page states that scripts in this directory are executed only if their base name matches the +*\&.sh +shell file name pattern\&. Any other files or directories present within the directory are silently ignored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} As an alternative to the preceding setup, some operating systems also use /etc/rc\&.local or @@ -220,8 +228,18 @@ to start additional services on startup\&. To start up MySQL using this method, .if n \{\ .RE .\} -.PP +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} For other systems, consult your operating system documentation to see how to install startup scripts\&. +.RE .PP \fBmysql\&.server\fR reads options from the @@ -238,7 +256,7 @@ You can add options for in a global /etc/my\&.cnf file\&. A typical -/etc/my\&.cnf +my\&.cnf file might look like this: .sp .if n \{\ @@ -259,7 +277,7 @@ basedir=/usr/local/mysql .PP The \fBmysql\&.server\fR -script supports the following options\&. If specified, they +script supports the options shown in the following table\&. If specified, they \fImust\fR be placed in an option file, not on the command line\&. \fBmysql\&.server\fR @@ -269,6 +287,57 @@ and stop as command\-line arguments\&. .sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&4.3.\ \&mysql\&.server Option\-File Options +.TS +allbox tab(:); +lB lB lB. +T{ +Option Name +T}:T{ +Description +T}:T{ +Type +T} +.T& +l l l +l l l +l l l +l l l. +T{ +basedir +T}:T{ +Path to MySQL installation directory +T}:T{ +directory name +T} +T{ +datadir +T}:T{ +Path to MySQL data directory +T}:T{ +directory name +T} +T{ +pid\-file +T}:T{ +File in which server should write its process ID +T}:T{ +file name +T} +T{ +service\-startup\-timeout +T}:T{ +How long to wait for server startup +T}:T{ +integer +T} +.TE +.sp 1 +.sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c @@ -277,7 +346,7 @@ as command\-line arguments\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-basedir=\fR\fB\fIdir_name\fR\fR +\fBbasedir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL installation directory\&. .RE @@ -290,7 +359,7 @@ The path to the MySQL installation directory\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-datadir=\fR\fB\fIdir_name\fR\fR +\fBdatadir=\fR\fB\fIdir_name\fR\fR .sp The path to the MySQL data directory\&. .RE @@ -303,7 +372,7 @@ The path to the MySQL data directory\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-pid\-file=\fR\fB\fIfile_name\fR\fR +\fBpid\-file=\fR\fB\fIfile_name\fR\fR .sp The path name of the file in which the server should write its process ID\&. .sp @@ -322,7 +391,7 @@ option file group but not the [mysqld_safe] group, you can ensure that \fBmysqld_safe\fR -gets the same value when invoke using +gets the same value when invoked from \fBmysql\&.server\fR as when invoked manually by putting the same pid\-file @@ -341,7 +410,7 @@ groups\&. .sp -1 .IP \(bu 2.3 .\} -\fB\-\-service\-startup\-timeout=\fR\fB\fIseconds\fR\fR +\fBservice\-startup\-timeout=\fR\fB\fIseconds\fR\fR .sp How long in seconds to wait for confirmation of server startup\&. If the server does not start within this time, \fBmysql\&.server\fR diff --git a/man/mysql_client_test.1 b/man/mysql_client_test.1 index 2fa8540c6813..75029793998a 100644 --- a/man/mysql_client_test.1 +++ b/man/mysql_client_test.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_client_test\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/14/2017 +.\" Date: 06/16/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQL_CLIENT_TEST" "1" "03/14/2017" "MySQL" "MySQL Database System" +.TH "\FBMYSQL_CLIENT_TEST" "1" "06/16/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -211,7 +211,7 @@ The TCP/IP port number to use for the connection\&. \fB\-\-server\-arg=\fR\fB\fIarg\fR\fR, \fB\-A \fR\fB\fIarg\fR\fR .sp -Argument to send to the embedded server\&. +Argument to send to the embedded server\&. This option was removed in MySQL 8\&.0\&. .RE .sp .RS 4 diff --git a/man/mysql_config.1 b/man/mysql_config.1 index 974f8823d871..dda3facf9ca8 100644 --- a/man/mysql_config.1 +++ b/man/mysql_config.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQL_CONFIG\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/mysql_config_editor.1 b/man/mysql_config_editor.1 index 6af154f10935..ba8c54cedd58 100644 --- a/man/mysql_config_editor.1 +++ b/man/mysql_config_editor.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_config_editor\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQL_CONFIG_EDIT" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQL_CONFIG_EDIT" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -75,7 +75,7 @@ host = localhost When you invoke a client program to connect to the server, the client uses \&.mylogin\&.cnf in conjunction with other option files\&. Its precedence is higher than other option files, but less than options specified explicitly on the client command line\&. For information about the order in which option files are used, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .PP To specify an alternate login path file name, set the MYSQL_TEST_LOGIN_FILE diff --git a/man/mysql_install_db.1 b/man/mysql_install_db.1 index ade71c605f78..cb9b58b0d31c 100644 --- a/man/mysql_install_db.1 +++ b/man/mysql_install_db.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_install_db\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQL_INSTALL_DB\" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQL_INSTALL_DB\" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -664,13 +664,13 @@ With one exception, the settings in the default option file are commented and ha sql_mode system variable to NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES\&. This setting produces a server configuration that results in errors rather than warnings for bad data in operations that modify transactional tables\&. See -Section\ \&6.1.8, \(lqServer SQL Modes\(rq\&. +Section\ \&5.1.8, \(lqServer SQL Modes\(rq\&. Command Options.PP \fBmysql_install_db\fR supports the following options, which can be specified on the command line or in the [mysql_install_db] group of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .PP Before MySQL 5\&.7\&.5, \fBmysql_install_db\fR @@ -1036,7 +1036,7 @@ The locale to use for error messages\&. The default is en_US\&. The argument is converted to a language name and combined with the value of \fB\-\-lc\-messages\-dir\fR to produce the location for the error message file\&. See -Section\ \&11.2, \(lqSetting the Error Message Language\(rq\&. +Section\ \&10.2, \(lqSetting the Error Message Language\(rq\&. .sp This option was added in MySQL 5\&.7\&.5\&. .RE @@ -1054,7 +1054,7 @@ This option was added in MySQL 5\&.7\&.5\&. The directory where error messages are located\&. The value is used together with the value of \fB\-\-lc\-messages\fR to produce the location for the error message file\&. See -Section\ \&11.2, \(lqSetting the Error Message Language\(rq\&. +Section\ \&10.2, \(lqSetting the Error Message Language\(rq\&. .sp This option was added in MySQL 5\&.7\&.5\&. .RE diff --git a/man/mysql_plugin.1 b/man/mysql_plugin.1 index 4e70a1ad9484..1551098b40c4 100644 --- a/man/mysql_plugin.1 +++ b/man/mysql_plugin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_plugin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQL_PLUGIN\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQL_PLUGIN\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -78,7 +78,7 @@ mysql\&.plugin automatically\&. For additional control over plugin activation, use \fB\-\-\fR\fB\fIplugin_name\fR\fR options named for specific plugins, as described in -Section\ \&6.5.2, \(lqInstalling and Uninstalling Plugins\(rq\&. +Section\ \&5.5.2, \(lqInstalling and Uninstalling Plugins\(rq\&. .PP Each invocation of \fBmysql_plugin\fR @@ -184,7 +184,7 @@ recognizes the \fB\-\-datadir\fR, and \fB\-\-plugin\-dir\fR options and ignores others\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp .RS 4 .ie n \{\ diff --git a/man/mysql_secure_installation.1 b/man/mysql_secure_installation.1 index 83a339139fba..032ce9e8c7f5 100644 --- a/man/mysql_secure_installation.1 +++ b/man/mysql_secure_installation.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_secure_installation\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQL_SECURE_INST" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQL_SECURE_INST" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -163,7 +163,7 @@ supports the following options, which can be specified on the command line or in and [client] groups of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp .RS 4 .ie n \{\ @@ -330,7 +330,7 @@ Print the program name and all options that it gets from option files\&. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see -Section\ \&5.2.2, \(lqConnecting to the MySQL Server\(rq\&. +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .RE .sp .RS 4 @@ -361,7 +361,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -375,7 +375,7 @@ Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more protocol names\&. The protocols that can be named for this option depend on the SSL library used to compile MySQL\&. For details, see -Section\ \&7.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. +Section\ \&6.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. .sp This option was added in MySQL 5\&.7\&.10\&. .RE diff --git a/man/mysql_ssl_rsa_setup.1 b/man/mysql_ssl_rsa_setup.1 index 413a0654d049..11cc2022d973 100644 --- a/man/mysql_ssl_rsa_setup.1 +++ b/man/mysql_ssl_rsa_setup.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_ssl_rsa_setup\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQL_SSL_RSA_SET" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQL_SSL_RSA_SET" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -56,7 +56,7 @@ uses the command, so its use is contingent on having OpenSSL installed on your machine\&. .PP Another way to generate SSL and RSA files, for MySQL distributions compiled using OpenSSL, is to have the server generated them automatically\&. See -Section\ \&7.4.6.1, \(lqCreating SSL and RSA Certificates and Keys using MySQL\(rq\&. +Section\ \&6.4.6.1, \(lqCreating SSL and RSA Certificates and Keys using MySQL\(rq\&. .sp .5v .RE .if n \{\ @@ -187,7 +187,7 @@ client\-key\&.pem Client private key .\} .sp These files enable secure client connections using SSL; see -Section\ \&7.4.4, \(lqConfiguring MySQL to Use Secure Connections\(rq\&. +Section\ \&6.4.4, \(lqConfiguring MySQL to Use Secure Connections\(rq\&. .RE .sp .RS 4 @@ -228,12 +228,12 @@ creates no RSA files\&. Otherwise, it invokes to create them\&. These files enable secure password exchange using RSA over unencrypted connections for accounts authenticated by the sha256_password plugin; see -Section\ \&7.5.1.4, \(lqThe SHA-256 Authentication Plugin\(rq\&. +Section\ \&6.5.1.4, \(lqSHA-256 Pluggable Authentication\(rq\&. .RE .PP For information about the characteristics of files created by \fBmysql_ssl_rsa_setup\fR, see -Section\ \&7.4.6.1, \(lqCreating SSL and RSA Certificates and Keys using MySQL\(rq\&. +Section\ \&6.4.6.1, \(lqCreating SSL and RSA Certificates and Keys using MySQL\(rq\&. .PP At startup, the MySQL server automatically uses the SSL files created by \fBmysql_ssl_rsa_setup\fR @@ -360,7 +360,7 @@ supports the following command\-line options, which can be specified on the comm [mysql_install_db], and [mysqld] groups of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp .RS 4 .ie n \{\ diff --git a/man/mysql_tzinfo_to_sql.1 b/man/mysql_tzinfo_to_sql.1 index b86f7551ce96..ec10458def56 100644 --- a/man/mysql_tzinfo_to_sql.1 +++ b/man/mysql_tzinfo_to_sql.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_tzinfo_to_sql\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQL_TZINFO_TO_S" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQL_TZINFO_TO_S" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -44,7 +44,7 @@ database (the set of files describing time zones)\&. Examples of such systems ar /usr/share/zoneinfo directory (/usr/share/lib/zoneinfo on Solaris)\&. If your system does not have a zoneinfo database, you can use the downloadable package described in -Section\ \&11.6, \(lqMySQL Server Time Zone Support\(rq\&. +Section\ \&10.6, \(lqMySQL Server Time Zone Support\(rq\&. .PP \fBmysql_tzinfo_to_sql\fR can be invoked several ways: diff --git a/man/mysql_upgrade.1 b/man/mysql_upgrade.1 index a99c0039c456..0e857a19ae77 100644 --- a/man/mysql_upgrade.1 +++ b/man/mysql_upgrade.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysql_upgrade\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQL_UPGRADE\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQL_UPGRADE\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -42,7 +42,7 @@ also upgrades the system tables so that you can take advantage of new privileges If \fBmysql_upgrade\fR finds that a table has a possible incompatibility, it performs a table check and, if problems are found, attempts a table repair\&. If the table cannot be repaired, see -Section\ \&2.11.4, \(lqRebuilding or Repairing Tables or Indexes\(rq +Section\ \&2.11.3, \(lqRebuilding or Repairing Tables or Indexes\(rq for manual table repair strategies\&. .PP You should execute @@ -100,7 +100,7 @@ keyring_file plugin: Start the server with an \fB\-\-early\-plugin\-load\fR option that names the plugin library file\&. For additional information, see -Section\ \&7.5.4, \(lqThe MySQL Keyring\(rq\&. +Section\ \&6.5.4, \(lqThe MySQL Keyring\(rq\&. .sp .5v .RE .if n \{\ @@ -157,7 +157,7 @@ with administrator privileges\&. You can do this by running a Command Prompt as You should always back up your current MySQL installation \fIbefore\fR performing an upgrade\&. See -Section\ \&8.2, \(lqDatabase Backup Methods\(rq\&. +Section\ \&7.2, \(lqDatabase Backup Methods\(rq\&. .PP Some upgrade incompatibilities may require special handling before you upgrade your MySQL installation and run \fBmysql_upgrade\fR\&. See @@ -209,7 +209,7 @@ FOR UPGRADE option of the CHECK TABLE statement (see -Section\ \&14.7.2.2, \(lqCHECK TABLE Syntax\(rq)\&. +Section\ \&13.7.2.2, \(lqCHECK TABLE Syntax\(rq)\&. .PP All checked and repaired tables are marked with the current MySQL version number\&. This ensures that next time you run \fBmysql_upgrade\fR @@ -243,11 +243,11 @@ plugin values to \*(Aqmysql_native_password\*(Aq if the credentials use a hash format compatible with that plugin\&. Rows with a pre\-4\&.1 password hash must be upgraded manually\&. For account upgrade instructions, see -Section\ \&7.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. .PP \fBmysql_upgrade\fR does not upgrade the contents of the help tables\&. For upgrade instructions, see -Section\ \&6.1.10, \(lqServer-Side Help\(rq\&. +Section\ \&5.1.10, \(lqServer-Side Help\(rq\&. .PP As of MySQL 5\&.7\&.7, unless invoked with the \fB\-\-skip\-sys\-schema\fR @@ -366,7 +366,7 @@ supports the following options, which can be specified on the command line or in and [client] groups of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp .RS 4 .ie n \{\ @@ -418,7 +418,7 @@ On a computer having multiple network interfaces, use this option to select whic \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -506,7 +506,7 @@ Print debugging information and memory and CPU usage statistics when the program \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -522,7 +522,7 @@ Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. Use \fIcharset_name\fR as the default character set\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -709,7 +709,7 @@ option on the command line, prompts for one\&. .sp Specifying a password on the command line should be considered insecure\&. See -Section\ \&7.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. .RE .sp .RS 4 @@ -741,7 +741,7 @@ The directory in which to look for plugins\&. Specify this option if the option is used to specify an authentication plugin but \fBmysql_upgrade\fR does not find it\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -782,7 +782,7 @@ Print the program name and all options that it gets from option files\&. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see -Section\ \&5.2.2, \(lqConnecting to the MySQL Server\(rq\&. +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .RE .sp .RS 4 @@ -850,7 +850,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -864,7 +864,7 @@ Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more protocol names\&. The protocols that can be named for this option depend on the SSL library used to compile MySQL\&. For details, see -Section\ \&7.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. +Section\ \&6.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. .sp This option was added in MySQL 5\&.7\&.10\&. .RE diff --git a/man/mysqladmin.1 b/man/mysqladmin.1 index 921d5c1fc3dc..620b9be62129 100644 --- a/man/mysqladmin.1 +++ b/man/mysqladmin.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqladmin\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQLADMIN\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQLADMIN\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -231,7 +231,7 @@ old\-password \fInew_password\fR This is like the password command but stores the password using the old (pre\-4\&.1) password\-hashing format\&. (See -Section\ \&7.1.2.4, \(lqPassword Hashing in MySQL\(rq\&.) +Section\ \&6.1.2.4, \(lqPassword Hashing in MySQL\(rq\&.) .sp This command was removed in MySQL 5\&.7\&.5\&. .RE @@ -336,7 +336,7 @@ statement\&. If the \fB\-\-verbose\fR option is given, the output is like that of SHOW FULL PROCESSLIST\&. (See -Section\ \&14.7.5.29, \(lqSHOW PROCESSLIST Syntax\(rq\&.) +Section\ \&13.7.5.29, \(lqSHOW PROCESSLIST Syntax\(rq\&.) .RE .sp .RS 4 @@ -519,7 +519,7 @@ Slow queries The number of queries that have taken more than long_query_time seconds\&. See -Section\ \&6.4.5, \(lqThe Slow Query Log\(rq\&. +Section\ \&5.4.5, \(lqThe Slow Query Log\(rq\&. .RE .sp .RS 4 @@ -577,7 +577,7 @@ supports the following options, which can be specified on the command line or in and [client] groups of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp .RS 4 .ie n \{\ @@ -617,7 +617,7 @@ On a computer having multiple network interfaces, use this option to select whic \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -705,7 +705,7 @@ Print debugging information and memory and CPU usage statistics when the program \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -721,7 +721,7 @@ Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. Use \fIcharset_name\fR as the default character set\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -799,7 +799,7 @@ groups\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&7.5.1.8, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .RE .sp .RS 4 @@ -915,7 +915,7 @@ option on the command line, prompts for one\&. .sp Specifying a password on the command line should be considered insecure\&. See -Section\ \&7.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. .RE .sp .RS 4 @@ -947,7 +947,7 @@ The directory in which to look for plugins\&. Specify this option if the option is used to specify an authentication plugin but \fBmysqladmin\fR does not find it\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -988,7 +988,7 @@ Print the program name and all options that it gets from option files\&. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see -Section\ \&5.2.2, \(lqConnecting to the MySQL Server\(rq\&. +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .RE .sp .RS 4 @@ -1049,7 +1049,7 @@ As of MySQL 5\&.7\&.5, this option is deprecated and will be removed in a future .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them is removed in MySQL 5\&.7\&.5\&. For account upgrade instructions, see -Section\ \&7.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. .sp .5v .RE .RE @@ -1136,7 +1136,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -1150,7 +1150,7 @@ Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more protocol names\&. The protocols that can be named for this option depend on the SSL library used to compile MySQL\&. For details, see -Section\ \&7.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. +Section\ \&6.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. .sp This option was added in MySQL 5\&.7\&.10\&. .RE diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index 04a6a473e6ec..9463409c6fe4 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlbinlog\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQLBINLOG\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQLBINLOG\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -41,8 +41,8 @@ that describe modifications to database contents\&. The server writes these file utility\&. You can also use \fBmysqlbinlog\fR to display the contents of relay log files written by a slave server in a replication setup because relay logs have the same format as binary logs\&. The binary log and relay log are discussed further in -Section\ \&6.4.4, \(lqThe Binary Log\(rq, and -Section\ \&18.2.4, \(lqReplication Relay and Status Logs\(rq\&. +Section\ \&5.4.4, \(lqThe Binary Log\(rq, and +Section\ \&16.2.4, \(lqReplication Relay and Status Logs\(rq\&. .PP Invoke \fBmysqlbinlog\fR @@ -73,7 +73,7 @@ shell> \fBmysqlbinlog binlog\&.0000003\fR .PP The output includes events contained in binlog\&.000003\&. For statement\-based logging, event information includes the SQL statement, the ID of the server on which it was executed, the timestamp when the statement was executed, how much time it took, and so forth\&. For row\-based logging, the event indicates a row change rather than an SQL statement\&. See -Section\ \&18.2.1, \(lqReplication Formats\(rq, for information about logging modes\&. +Section\ \&16.2.1, \(lqReplication Formats\(rq, for information about logging modes\&. .PP Events are preceded by header comments that provide additional information\&. For example: .sp @@ -127,7 +127,7 @@ The output from \fBmysqlbinlog\fR can be re\-executed (for example, by using it as input to \fBmysql\fR) to redo the statements in the log\&. This is useful for recovery operations after a server crash\&. For other usage examples, see the discussion later in this section and in -Section\ \&8.5, \(lqPoint-in-Time (Incremental) Recovery Using the Binary Log\(rq\&. +Section\ \&7.5, \(lqPoint-in-Time (Incremental) Recovery Using the Binary Log\(rq\&. .PP Normally, you use \fBmysqlbinlog\fR @@ -157,7 +157,7 @@ supports the following options, which can be specified on the command line or in and [client] groups of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp .RS 4 .ie n \{\ @@ -344,7 +344,7 @@ Specify the maximum size of a row\-based binary log event, in bytes\&. Rows are \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -583,7 +583,7 @@ Print debugging information and memory and CPU usage statistics when the program \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -904,7 +904,7 @@ option on the command line, prompts for one\&. .sp Specifying a password on the command line should be considered insecure\&. See -Section\ \&7.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. .RE .sp .RS 4 @@ -922,7 +922,7 @@ The directory in which to look for plugins\&. Specify this option if the option is used to specify an authentication plugin but \fBmysqlbinlog\fR does not find it\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -963,7 +963,7 @@ Print the program name and all options that it gets from option files\&. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see -Section\ \&5.2.2, \(lqConnecting to the MySQL Server\(rq\&. +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .RE .sp .RS 4 @@ -1178,7 +1178,7 @@ As of MySQL 5\&.7\&.5, this option is deprecated and will be removed in a future .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them is removed in MySQL 5\&.7\&.5\&. For account upgrade instructions, see -Section\ \&7.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. .sp .5v .RE .RE @@ -1220,7 +1220,7 @@ set to 32 enables this data to be seen\&. .sp This option is supported only by the versions of \fBmysqlbinlog\fR -supplied with the MySQL Cluster distribution, or built from the MySQL Cluster sources\&. +supplied with the NDB Cluster distribution, or built from the NDB Cluster sources\&. .RE .sp .RS 4 @@ -1325,7 +1325,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -1360,7 +1360,7 @@ shell> \fBmysqlbinlog \-\-start\-datetime="2005\-12\-25 11:25:56" binlog\&.00000 .\} .sp This option is useful for point\-in\-time recovery\&. See -Section\ \&8.3, \(lqExample Backup and Recovery Strategy\(rq\&. +Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .RE .sp .RS 4 @@ -1378,7 +1378,7 @@ Start reading the binary log at the first event having a position equal to or gr \fIN\fR\&. This option applies to the first log file named on the command line\&. .sp This option is useful for point\-in\-time recovery\&. See -Section\ \&8.3, \(lqExample Backup and Recovery Strategy\(rq\&. +Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .RE .sp .RS 4 @@ -1400,7 +1400,7 @@ option for information about the value\&. .sp This option is useful for point\-in\-time recovery\&. See -Section\ \&8.3, \(lqExample Backup and Recovery Strategy\(rq\&. +Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .RE .sp .RS 4 @@ -1466,7 +1466,7 @@ Stop reading the binary log at the first event having a position equal to or gre \fIN\fR\&. This option applies to the last log file named on the command line\&. .sp This option is useful for point\-in\-time recovery\&. See -Section\ \&8.3, \(lqExample Backup and Recovery Strategy\(rq\&. +Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .RE .sp .RS 4 @@ -1480,7 +1480,7 @@ Section\ \&8.3, \(lqExample Backup and Recovery Strategy\(rq\&. \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more protocol names\&. The protocols that can be named for this option depend on the SSL library used to compile MySQL\&. For details, see -Section\ \&7.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. +Section\ \&6.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. .sp This option was added in MySQL 5\&.7\&.10\&. .RE @@ -1589,7 +1589,7 @@ You can pipe the output of into the \fBmysql\fR client to execute the events contained in the binary log\&. This technique is used to recover from a crash when you have an old backup (see -Section\ \&8.5, \(lqPoint-in-Time (Incremental) Recovery Using the Binary Log\(rq)\&. For example: +Section\ \&7.5, \(lqPoint-in-Time (Incremental) Recovery Using the Binary Log\(rq)\&. For example: .sp .if n \{\ .RS 4 @@ -1725,7 +1725,7 @@ statements (that is, it adds LOCAL), both the client and the server that you use to process the statements must be configured with the LOCAL capability enabled\&. See -Section\ \&7.1.6, \(lqSecurity Issues with LOAD DATA LOCAL\(rq\&. +Section\ \&6.1.6, \(lqSecurity Issues with LOAD DATA LOCAL\(rq\&. .if n \{\ .sp .\} diff --git a/man/mysqlcheck.1 b/man/mysqlcheck.1 index 00f83978e2e5..3e7cba816343 100644 --- a/man/mysqlcheck.1 +++ b/man/mysqlcheck.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlcheck\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQLCHECK\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQLCHECK\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -41,7 +41,7 @@ client performs table maintenance: It checks, repairs, optimizes, or analyzes ta Each table is locked and therefore unavailable to other sessions while it is being processed, although for check operations, the table is locked with a READ lock only (see -Section\ \&14.3.5, \(lqLOCK TABLES and UNLOCK TABLES Syntax\(rq, for more information about +Section\ \&13.3.5, \(lqLOCK TABLES and UNLOCK TABLES Syntax\(rq, for more information about READ and WRITE @@ -76,7 +76,7 @@ REPAIR TABLE, ANALYZE TABLE, and OPTIMIZE TABLE in a convenient way for the user\&. It determines which statements to use for the operation you want to perform, and then sends the statements to the server to be executed\&. For details about which storage engines each statement works with, see the descriptions for those statements in -Section\ \&14.7.2, \(lqTable Maintenance Statements\(rq\&. +Section\ \&13.7.2, \(lqTable Maintenance Statements\(rq\&. .PP The MyISAM @@ -105,7 +105,7 @@ note : The storage engine for the table doesn\*(Aqt support check If \fBmysqlcheck\fR is unable to repair a table, see -Section\ \&2.11.4, \(lqRebuilding or Repairing Tables or Indexes\(rq +Section\ \&2.11.3, \(lqRebuilding or Repairing Tables or Indexes\(rq for manual table repair strategies\&. This will be the case, for example, for InnoDB tables, which can be checked with @@ -200,7 +200,7 @@ supports the following options, which can be specified on the command line or in and [client] groups of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp .RS 4 .ie n \{\ @@ -303,7 +303,7 @@ On a computer having multiple network interfaces, use this option to select whic \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -442,7 +442,7 @@ Print debugging information and memory and CPU usage statistics when the program Use \fIcharset_name\fR as the default character set\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -534,7 +534,7 @@ If you are using this option to repair tables, it runs an extended repair that m \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -550,7 +550,7 @@ Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&7.5.1.8, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .sp This option was added in MySQL 5\&.7\&.10\&. .RE @@ -726,7 +726,7 @@ option on the command line, prompts for one\&. .sp Specifying a password on the command line should be considered insecure\&. See -Section\ \&7.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. .RE .sp .RS 4 @@ -758,7 +758,7 @@ The directory in which to look for plugins\&. Specify this option if the option is used to specify an authentication plugin but \fBmysqlcheck\fR does not find it\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -799,7 +799,7 @@ Print the program name and all options that it gets from option files\&. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see -Section\ \&5.2.2, \(lqConnecting to the MySQL Server\(rq\&. +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .RE .sp .RS 4 @@ -859,7 +859,7 @@ As of MySQL 5\&.7\&.5, this option is deprecated and will be removed in a future .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them is removed in MySQL 5\&.7\&.5\&. For account upgrade instructions, see -Section\ \&7.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. .sp .5v .RE .RE @@ -938,7 +938,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -969,7 +969,7 @@ option\&. All name arguments following the option are regarded as table names\&. \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more protocol names\&. The protocols that can be named for this option depend on the SSL library used to compile MySQL\&. For details, see -Section\ \&7.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. +Section\ \&6.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. .sp This option was added in MySQL 5\&.7\&.10\&. .RE diff --git a/man/mysqld.8 b/man/mysqld.8 index 7cb4d7b39d02..bdaa3a42a607 100644 --- a/man/mysqld.8 +++ b/man/mysqld.8 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQLD\FR" "8" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQLD\FR" "8" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -55,7 +55,7 @@ shell> \fBmysqld \-\-verbose \-\-help\fR MySQL Server also has a set of system variables that affect its operation as it runs\&. System variables can be set at server startup, and many of them can be changed at runtime to effect dynamic server reconfiguration\&. MySQL Server also has a set of status variables that provide information about its operation\&. You can monitor these status variables to access runtime performance characteristics\&. .PP For a full description of MySQL Server command options, system variables, and status variables, see -Section\ \&6.1, \(lqThe MySQL Server\(rq\&. For information about installing MySQL and setting up the initial configuration, see +Section\ \&5.1, \(lqThe MySQL Server\(rq\&. For information about installing MySQL and setting up the initial configuration, see Chapter\ \&2, Installing and Upgrading MySQL\&. .SH "COPYRIGHT" .br diff --git a/man/mysqld_multi.1 b/man/mysqld_multi.1 index 04b1deee3d7f..0f6e6b6b6010 100644 --- a/man/mysqld_multi.1 +++ b/man/mysqld_multi.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_multi\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQLD_MULTI\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQLD_MULTI\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -51,9 +51,9 @@ processes that listen for connections on different Unix socket files and TCP/IP .ps -1 .br .PP -For MySQL installation using an RPM distribution, server startup and shutdown is managed by systemd on several Linux platforms\&. On these platforms, +For some Linux platforms, MySQL installation from RPM or Debian packages includes systemd support for managing MySQL server startup and shutdown\&. On these platforms, \fBmysqld_multi\fR -is no longer installed because it is unnecessary\&. For information about using systemd to handle multiple MySQL instances, see +is not installed because it is unnecessary\&. For information about using systemd to handle multiple MySQL instances, see Section\ \&2.5.10, \(lqManaging MySQL Server with systemd\(rq\&. .sp .5v .RE @@ -75,7 +75,7 @@ to specify which servers you want to start, stop, or obtain a status report for\ group used for starting \fBmysqld\fR\&. (See, for example, Section\ \&2.10.5, \(lqStarting and Stopping MySQL Automatically\(rq\&.) However, when using multiple servers, it is necessary that each one use its own value for options such as the Unix socket file and TCP/IP port number\&. For more information on which options must be unique per server in a multiple\-server environment, see -Section\ \&6.6, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. +Section\ \&5.6, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. .PP To invoke \fBmysqld_multi\fR, use the following syntax: @@ -452,7 +452,7 @@ servers with the same data directory\&. Use separate data directories, unless yo what you are doing\&. Starting multiple servers with the same data directory does \fInot\fR give you extra performance in a threaded system\&. See -Section\ \&6.6, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. +Section\ \&5.6, \(lqRunning Multiple MySQL Instances on One Machine\(rq\&. .if n \{\ .sp .\} @@ -474,7 +474,7 @@ use the Unix account for this, unless you \fIknow\fR what you are doing\&. See -Section\ \&7.1.5, \(lqHow to Run MySQL as a Normal User\(rq\&. +Section\ \&6.1.5, \(lqHow to Run MySQL as a Normal User\(rq\&. .sp .5v .RE .RE @@ -511,7 +511,7 @@ mysql> \fBGRANT SHUTDOWN ON *\&.* TO \*(Aqmulti_admin\*(Aq@\*(Aqlocalhost\*(Aq;\ .\} .sp See -Section\ \&7.2, \(lqThe MySQL Access Privilege System\(rq\&. You have to do this for each +Section\ \&6.2, \(lqThe MySQL Access Privilege System\(rq\&. You have to do this for each \fBmysqld\fR server\&. Change the connection parameters appropriately when connecting to each one\&. Note that the host name part of the account name must permit you to connect as multi_admin @@ -662,7 +662,7 @@ user = unix_user4 .\} .PP See -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .SH "COPYRIGHT" .br .PP diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index 8a7a3ba54498..8cc8a18d1454 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqld_safe\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQLD_SAFE\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQLD_SAFE\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -53,9 +53,9 @@ adds some safety features such as restarting the server when an error occurs and .ps -1 .br .PP -As of MySQL 5\&.7\&.6, for MySQL installation using an RPM distribution, server startup and shutdown is managed by systemd on several Linux platforms\&. On these platforms, +For some Linux platforms, MySQL installation from RPM or Debian packages includes systemd support for managing MySQL server startup and shutdown\&. On these platforms, \fBmysqld_safe\fR -is no longer installed because it is unnecessary\&. For more information, see +is not installed because it is unnecessary\&. For more information, see Section\ \&2.5.10, \(lqManaging MySQL Server with systemd\(rq\&. .sp .5v .RE @@ -77,7 +77,7 @@ Many of the options to \fBmysqld_safe\fR are the same as the options to \fBmysqld\fR\&. See -Section\ \&6.1.4, \(lqServer Command Options\(rq\&. +Section\ \&5.1.4, \(lqServer Command Options\(rq\&. .PP Options unknown to \fBmysqld_safe\fR @@ -86,7 +86,7 @@ are passed to if they are specified on the command line, but ignored if they are specified in the [mysqld_safe] group of an option file\&. See -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .PP \fBmysqld_safe\fR reads all options from the @@ -121,7 +121,7 @@ sections, but to be current you should rename such sections to .PP \fBmysqld_safe\fR accepts options on the command line and in option files, as described in the following table\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp .RS 4 .ie n \{\ @@ -193,7 +193,7 @@ Read this option file in addition to the usual option files\&. If the file does is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. This must be the first option on the command line if it is used\&. .sp For additional information about this option, see -Section\ \&5.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. +Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. .RE .sp .RS 4 @@ -211,7 +211,7 @@ Use only the given option file\&. If the file does not exist or is otherwise ina is interpreted relative to the current directory if given as a relative path name rather than a full path name\&. This must be the first option on the command line if it is used\&. .sp For additional information about this option, see -Section\ \&5.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. +Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. .RE .sp .RS 4 @@ -244,7 +244,7 @@ Section\ \&2.5.10, \(lqManaging MySQL Server with systemd\(rq\&. \fB\-\-log\-error=\fR\fB\fIfile_name\fR\fR .sp Write the error log to the given file\&. See -Section\ \&6.4.2, \(lqThe Error Log\(rq\&. +Section\ \&5.4.2, \(lqThe Error Log\(rq\&. .RE .sp .RS 4 @@ -595,7 +595,7 @@ Do not read any option files\&. If program startup fails due to reading unknown can be used to prevent them from being read\&. This must be the first option on the command line if it is used\&. .sp For additional information about this option, see -Section\ \&5.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. +Section\ \&4.2.7, \(lqCommand-Line Options that Affect Option-File Handling\(rq\&. .RE .sp .RS 4 @@ -744,7 +744,7 @@ log_syslog system variable instead\&. To control the facility, use the server log_syslog_facility system variable\&. See -Section\ \&6.4.2, \(lqThe Error Log\(rq\&. +Section\ \&5.4.2, \(lqThe Error Log\(rq\&. .RE .sp .RS 4 @@ -776,7 +776,7 @@ Using this option to control logging is deprecated as of MySQL 5\&.7\&.5\&. Use the server log_syslog_tag system variable instead\&. See -Section\ \&6.4.2, \(lqThe Error Log\(rq\&. +Section\ \&5.4.2, \(lqThe Error Log\(rq\&. .RE .sp .RS 4 @@ -1010,7 +1010,7 @@ logging from is deprecated as of MySQL 5\&.7\&.5\&. Use the server\*(Aqs native syslog support instead\&. For more information, see -Section\ \&6.4.2, \(lqThe Error Log\(rq\&. +Section\ \&5.4.2, \(lqThe Error Log\(rq\&. .sp .5v .RE .SH "COPYRIGHT" diff --git a/man/mysqldump.1 b/man/mysqldump.1 index 26de9db66cae..5e830944d013 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQLDUMP\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQLDUMP\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -299,7 +299,7 @@ shell> \fBmysqldump [options] > dump\&.sql\fR .\} .PP However, UTF\-16 is not permitted as a connection character set (see -Section\ \&11.1.4, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the +Section\ \&10.1.4, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the \fB\-\-result\-file\fR option, which creates the output in ASCII format: .sp @@ -369,7 +369,7 @@ option\&. .PP For additional information about \fBmysqldump\fR, see -Section\ \&8.4, \(lqUsing mysqldump for Backups\(rq\&. +Section\ \&7.4, \(lqUsing mysqldump for Backups\(rq\&. Invocation Syntax.PP There are in general three ways to use \fBmysqldump\fR\(emin order to dump a set of one or more tables, a set of one or more complete databases, or an entire MySQL server\(emas shown here: @@ -404,7 +404,7 @@ supports the following options, which can be specified on the command line or in and [client] groups of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. Connection Options.PP The \fBmysqldump\fR @@ -448,7 +448,7 @@ Compress all information sent between the client and the server if both support \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -464,7 +464,7 @@ Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&7.5.1.8, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .sp This option was added in MySQL 5\&.7\&.10\&. .RE @@ -528,7 +528,7 @@ option on the command line, prompts for one\&. .sp Specifying a password on the command line should be considered insecure\&. See -Section\ \&7.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. .RE .sp .RS 4 @@ -560,7 +560,7 @@ The directory in which to look for plugins\&. Specify this option if the option is used to specify an authentication plugin but \fBmysqldump\fR does not find it\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -588,7 +588,7 @@ The TCP/IP port number to use for the connection\&. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see -Section\ \&5.2.2, \(lqConnecting to the MySQL Server\(rq\&. +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .RE .sp .RS 4 @@ -618,7 +618,7 @@ As of MySQL 5\&.7\&.5, this option is deprecated and will be removed in a future .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them is removed in MySQL 5\&.7\&.5\&. For account upgrade instructions, see -Section\ \&7.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. .sp .5v .RE .RE @@ -651,7 +651,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -665,7 +665,7 @@ Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more protocol names\&. The protocols that can be named for this option depend on the SSL library used to compile MySQL\&. For details, see -Section\ \&7.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. +Section\ \&6.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. .sp This option was added in MySQL 5\&.7\&.10\&. .RE @@ -903,7 +903,7 @@ statement\&. Adds to a table dump all SQL statements needed to create any tablespaces used by an NDB table\&. This information is not otherwise included in the output from -\fBmysqldump\fR\&. This option is currently relevant only to MySQL Cluster tables, which are not supported in MySQL 5\&.7\&. +\fBmysqldump\fR\&. This option is currently relevant only to NDB Cluster tables, which are not supported in MySQL 5\&.7\&. .RE .sp .RS 4 @@ -1229,7 +1229,7 @@ command represents character data with national language settings\&. \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -1245,7 +1245,7 @@ Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. Use \fIcharset_name\fR as the default character set\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. If no character set is specified, +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. If no character set is specified, \fBmysqldump\fR uses utf8\&. @@ -1367,7 +1367,7 @@ respectively\&. These are the master server coordinates from which the slave sho .ps -1 .br Inconsistencies in the sequence of transactions from the relay log which have been executed can cause the wrong position to be used\&. See -Section\ \&18.4.1.34, \(lqReplication and Transaction Inconsistencies\(rq +Section\ \&16.4.1.34, \(lqReplication and Transaction Inconsistencies\(rq for more information\&. .sp .5v .RE @@ -1613,7 +1613,7 @@ maxdb, no_key_options, no_table_options, or no_field_options\&. To use several values, separate them by commas\&. These values have the same meaning as the corresponding options for setting the server SQL mode\&. See -Section\ \&6.1.8, \(lqServer SQL Modes\(rq\&. +Section\ \&5.1.8, \(lqServer SQL Modes\(rq\&. .sp This option does not guarantee compatibility with other servers\&. It only enables those SQL mode values that are currently available for making dump output more compatible\&. For example, \fB\-\-compatible=oracle\fR @@ -1672,7 +1672,7 @@ option and have the same meaning as the corresponding FIELDS clauses for LOAD DATA INFILE\&. See -Section\ \&14.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. +Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .RE .sp .RS 4 @@ -1712,7 +1712,7 @@ option and has the same meaning as the corresponding LINES clause for LOAD DATA INFILE\&. See -Section\ \&14.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. +Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .RE .sp .RS 4 @@ -1795,9 +1795,9 @@ This option should be used only when \fBmysqldump\fR is run on the same machine as the \fBmysqld\fR -server\&. Because the server creates files +server\&. Because the server creates *\&.txt -file in the directory that you specify, the directory must be writable by the server and the MySQL account that you use must have the +files in the directory that you specify, the directory must be writable by the server and the MySQL account that you use must have the FILE privilege\&. Because \fBmysqldump\fR @@ -2335,7 +2335,7 @@ LOCK TABLES and UNLOCK TABLES statements\&. This results in faster inserts when the dump file is reloaded\&. See -Section\ \&9.2.4.1, \(lqOptimizing INSERT Statements\(rq\&. +Section\ \&8.2.4.1, \(lqOptimizing INSERT Statements\(rq\&. .RE .sp .RS 4 @@ -2703,7 +2703,7 @@ statement is issued, the MySQL server may get stalled until those statements fin For point\-in\-time recovery (also known as \(lqroll\-forward,\(rq when you need to restore an old backup and replay the changes that happened since that backup), it is often useful to rotate the binary log (see -Section\ \&6.4.4, \(lqThe Binary Log\(rq) or at least know the binary log coordinates to which the dump corresponds: +Section\ \&5.4.4, \(lqThe Binary Log\(rq) or at least know the binary log coordinates to which the dump corresponds: .sp .if n \{\ .RS 4 @@ -2737,8 +2737,8 @@ InnoDB storage engine\&. .PP For more information on making backups, see -Section\ \&8.2, \(lqDatabase Backup Methods\(rq, and -Section\ \&8.3, \(lqExample Backup and Recovery Strategy\(rq\&. +Section\ \&7.2, \(lqDatabase Backup Methods\(rq, and +Section\ \&7.3, \(lqExample Backup and Recovery Strategy\(rq\&. .sp .RS 4 .ie n \{\ @@ -2794,14 +2794,14 @@ performance_schema, also use the option\&. .PP \fBmysqldump\fR -does not dump the MySQL Cluster +does not dump the NDB Cluster ndbinfo information database\&. .PP It is not recommended to restore from a dump made using \fBmysqldump\fR to a MySQL 5\&.6\&.9 or earlier server that has GTIDs enabled\&. See -Section\ \&18.1.3.4, \(lqRestrictions on Replication with GTIDs\(rq\&. +Section\ \&16.1.3.4, \(lqRestrictions on Replication with GTIDs\(rq\&. .PP \fBmysqldump\fR includes statements to recreate the diff --git a/man/mysqldumpslow.1 b/man/mysqldumpslow.1 index a00155441ac9..1f986c3bff00 100644 --- a/man/mysqldumpslow.1 +++ b/man/mysqldumpslow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqldumpslow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQLDUMPSLOW\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQLDUMPSLOW\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -35,7 +35,7 @@ mysqldumpslow \- Summarize slow query log files .SH "DESCRIPTION" .PP The MySQL slow query log contains information about queries that take a long time to execute (see -Section\ \&6.4.5, \(lqThe Slow Query Log\(rq)\&. +Section\ \&5.4.5, \(lqThe Slow Query Log\(rq)\&. \fBmysqldumpslow\fR parses MySQL slow query log files and prints a summary of their contents\&. .PP diff --git a/man/mysqlimport.1 b/man/mysqlimport.1 index f5f4dd97e95e..e862be2b8ad2 100644 --- a/man/mysqlimport.1 +++ b/man/mysqlimport.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlimport\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQLIMPORT\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQLIMPORT\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -43,7 +43,7 @@ SQL statement\&. Most options to correspond directly to clauses of LOAD DATA INFILE syntax\&. See -Section\ \&14.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. +Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .PP Invoke \fBmysqlimport\fR @@ -74,7 +74,7 @@ supports the following options, which can be specified on the command line or in and [client] groups of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp .RS 4 .ie n \{\ @@ -114,7 +114,7 @@ On a computer having multiple network interfaces, use this option to select whic \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -202,7 +202,7 @@ Print debugging information and memory and CPU usage statistics when the program Use \fIcharset_name\fR as the default character set\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -216,7 +216,7 @@ Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -308,7 +308,7 @@ Empty the table before importing the text file\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&7.5.1.8, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .sp This option was added in MySQL 5\&.7\&.10\&. .RE @@ -328,7 +328,7 @@ This option was added in MySQL 5\&.7\&.10\&. .sp These options have the same meaning as the corresponding clauses for LOAD DATA INFILE\&. See -Section\ \&14.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. +Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .RE .sp .RS 4 @@ -407,7 +407,7 @@ lines of the data file\&. This option has the same meaning as the corresponding clause for LOAD DATA INFILE\&. For example, to import Windows files that have lines terminated with carriage return/linefeed pairs, use \fB\-\-lines\-terminated\-by="\er\en"\fR\&. (You might have to double the backslashes, depending on the escaping conventions of your command interpreter\&.) See -Section\ \&14.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. +Section\ \&13.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. .RE .sp .RS 4 @@ -421,7 +421,10 @@ Section\ \&14.2.6, \(lqLOAD DATA INFILE Syntax\(rq\&. \fB\-\-local\fR, \fB\-L\fR .sp -Read input files locally from the client host\&. +By default, files are read by the server on the server host\&. With this option, +\fBmysqlimport\fR +reads input files locally on the client host\&. Enabling local data loading also requires that the server permits it; see +Section\ \&6.1.6, \(lqSecurity Issues with LOAD DATA LOCAL\(rq .RE .sp .RS 4 @@ -527,7 +530,7 @@ option on the command line, prompts for one\&. .sp Specifying a password on the command line should be considered insecure\&. See -Section\ \&7.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. .RE .sp .RS 4 @@ -559,7 +562,7 @@ The directory in which to look for plugins\&. Specify this option if the option is used to specify an authentication plugin but \fBmysqlimport\fR does not find it\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -600,7 +603,7 @@ Print the program name and all options that it gets from option files\&. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see -Section\ \&5.2.2, \(lqConnecting to the MySQL Server\(rq\&. +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .RE .sp .RS 4 @@ -650,7 +653,7 @@ As of MySQL 5\&.7\&.5, this option is deprecated and will be removed in a future .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them is removed in MySQL 5\&.7\&.5\&. For account upgrade instructions, see -Section\ \&7.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. .sp .5v .RE .RE @@ -715,7 +718,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -729,7 +732,7 @@ Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more protocol names\&. The protocols that can be named for this option depend on the SSL library used to compile MySQL\&. For details, see -Section\ \&7.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. +Section\ \&6.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. .sp This option was added in MySQL 5\&.7\&.10\&. .RE diff --git a/man/mysqlpump.1 b/man/mysqlpump.1 index e087c4f763eb..85c96320aec1 100644 --- a/man/mysqlpump.1 +++ b/man/mysqlpump.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlpump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQLPUMP\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQLPUMP\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -244,7 +244,7 @@ shell> \fBmysqlpump [options] > dump\&.sql\fR .\} .PP However, UTF\-16 is not permitted as a connection character set (see -Section\ \&11.1.4, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the +Section\ \&10.1.4, \(lqConnection Character Sets and Collations\(rq), so the dump file will not load correctly\&. To work around this issue, use the \fB\-\-result\-file\fR option, which creates the output in ASCII format: .sp @@ -366,7 +366,7 @@ supports the following options, which can be specified on the command line or in and [client] groups of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. mysqlpump Option Descriptions .sp .RS 4 @@ -449,7 +449,7 @@ LOCK TABLES and UNLOCK TABLES statements\&. This results in faster inserts when the dump file is reloaded\&. See -Section\ \&9.2.4.1, \(lqOptimizing INSERT Statements\(rq\&. +Section\ \&8.2.4.1, \(lqOptimizing INSERT Statements\(rq\&. .sp This option does not work with parallelism because INSERT @@ -507,7 +507,7 @@ On a computer having multiple network interfaces, use this option to select whic \fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR .sp The directory where character sets are installed\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -687,7 +687,7 @@ Print debugging information and memory and CPU usage statistics when the program \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -703,7 +703,7 @@ Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. Use \fIcharset_name\fR as the default character set\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. If no character set is specified, +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. If no character set is specified, \fBmysqlpump\fR uses utf8\&. @@ -1316,7 +1316,7 @@ option on the command line, prompts for one\&. .sp Specifying a password on the command line should be considered insecure\&. See -Section\ \&7.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. .RE .sp .RS 4 @@ -1334,7 +1334,7 @@ The directory in which to look for plugins\&. Specify this option if the option is used to specify an authentication plugin but \fBmysqlpump\fR does not find it\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -1375,7 +1375,7 @@ Print the program name and all options that it gets from option files\&. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see -Section\ \&5.2.2, \(lqConnecting to the MySQL Server\(rq\&. +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .RE .sp .RS 4 @@ -1494,6 +1494,102 @@ statement, use .sp -1 .IP \(bu 2.3 .\} +\fB\-\-set\-gtid\-purged=\fR\fB\fIvalue\fR\fR +.sp +This option enables control over global transaction ID (GTID) information written to the dump file, by indicating whether to add a +SET @@global\&.gtid_purged +statement to the output\&. This option may also cause a statement to be written to the output that disables binary logging while the dump file is being reloaded\&. +.sp +The following table shows the permitted option values\&. The default value is +AUTO\&. +.TS +allbox tab(:); +lB lB. +T{ +Value +T}:T{ +Meaning +T} +.T& +l l +l l +l l. +T{ +OFF +T}:T{ +Add no SET statement to the output\&. +T} +T{ +ON +T}:T{ +Add a SET statement to the output\&. An error occurs if + GTIDs are not enabled on the server\&. +T} +T{ +AUTO +T}:T{ +Add a SET statement to the output if GTIDs are + enabled on the server\&. +T} +.TE +.sp 1 +The +\fB\-\-set\-gtid\-purged\fR +option has the following effect on binary logging when the dump file is reloaded: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-set\-gtid\-purged=OFF\fR: +SET @@SESSION\&.SQL_LOG_BIN=0; +is not added to the output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-set\-gtid\-purged=ON\fR: +SET @@SESSION\&.SQL_LOG_BIN=0; +is added to the output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-set\-gtid\-purged=AUTO\fR: +SET @@SESSION\&.SQL_LOG_BIN=0; +is added to the output if GTIDs are enabled on the server you are backing up (that is, if +AUTO +evaluates to +ON)\&. +.RE +.sp +This option was added in MySQL 5\&.7\&.18\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} \fB\-\-single\-transaction\fR .sp This option sets the transaction isolation mode to @@ -1629,7 +1725,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -1643,7 +1739,7 @@ Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more protocol names\&. The protocols that can be named for this option depend on the SSL library used to compile MySQL\&. For details, see -Section\ \&7.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. +Section\ \&6.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. .sp This option was added in MySQL 5\&.7\&.10\&. .RE @@ -1917,7 +2013,7 @@ u1 and u1@% are equivalent\&. This is the same equivalence that applies in MySQL generally (see -Section\ \&7.2.3, \(lqSpecifying Account Names\(rq)\&. +Section\ \&6.2.3, \(lqSpecifying Account Names\(rq)\&. .PP Inclusion and exclusion options interact as follows: .sp diff --git a/man/mysqlshow.1 b/man/mysqlshow.1 index 9f292e0b078b..14f6762b590a 100644 --- a/man/mysqlshow.1 +++ b/man/mysqlshow.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlshow\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQLSHOW\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQLSHOW\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -42,7 +42,7 @@ client can be used to quickly see which databases exist, their tables, or a tabl provides a command\-line interface to several SQL SHOW statements\&. See -Section\ \&14.7.5, \(lqSHOW Syntax\(rq\&. The same information can be obtained by using those statements directly\&. For example, you can issue them from the +Section\ \&13.7.5, \(lqSHOW Syntax\(rq\&. The same information can be obtained by using those statements directly\&. For example, you can issue them from the \fBmysql\fR client program\&. .PP @@ -120,7 +120,7 @@ supports the following options, which can be specified on the command line or in and [client] groups of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp .RS 4 .ie n \{\ @@ -160,7 +160,7 @@ On a computer having multiple network interfaces, use this option to select whic \fB\-\-character\-sets\-dir=\fR\fB\fIdir_name\fR\fR .sp The directory where character sets are installed\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -248,7 +248,7 @@ Print debugging information and memory and CPU usage statistics when the program Use \fIcharset_name\fR as the default character set\&. See -Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. +Section\ \&10.5, \(lqCharacter Set Configuration\(rq\&. .RE .sp .RS 4 @@ -262,7 +262,7 @@ Section\ \&11.5, \(lqCharacter Set Configuration\(rq\&. \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -340,7 +340,7 @@ groups\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&7.5.1.8, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .sp This option was added in MySQL 5\&.7\&.10\&. .RE @@ -442,7 +442,7 @@ option on the command line, prompts for one\&. .sp Specifying a password on the command line should be considered insecure\&. See -Section\ \&7.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. .RE .sp .RS 4 @@ -474,7 +474,7 @@ The directory in which to look for plugins\&. Specify this option if the option is used to specify an authentication plugin but \fBmysqlshow\fR does not find it\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -515,7 +515,7 @@ Print the program name and all options that it gets from option files\&. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see -Section\ \&5.2.2, \(lqConnecting to the MySQL Server\(rq\&. +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .RE .sp .RS 4 @@ -545,7 +545,7 @@ As of MySQL 5\&.7\&.5, this option is deprecated and will be removed in a future .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them is removed in MySQL 5\&.7\&.5\&. For account upgrade instructions, see -Section\ \&7.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. .sp .5v .RE .RE @@ -614,7 +614,7 @@ localhost, the Unix socket file to use, or, on Windows, the name of the named pi Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -642,7 +642,7 @@ Display extra information about each table\&. \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more protocol names\&. The protocols that can be named for this option depend on the SSL library used to compile MySQL\&. For details, see -Section\ \&7.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. +Section\ \&6.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. .sp This option was added in MySQL 5\&.7\&.10\&. .RE diff --git a/man/mysqlslap.1 b/man/mysqlslap.1 index 772fa41c49e1..cd63fb7dceca 100644 --- a/man/mysqlslap.1 +++ b/man/mysqlslap.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqlslap\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBMYSQLSLAP\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBMYSQLSLAP\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -161,7 +161,7 @@ supports the following options, which can be specified on the command line or in and [client] groups of an option file\&. For information about option files used by MySQL programs, see -Section\ \&5.2.6, \(lqUsing Option Files\(rq\&. +Section\ \&4.2.6, \(lqUsing Option Files\(rq\&. .sp .RS 4 .ie n \{\ @@ -468,7 +468,7 @@ Print debugging information and memory and CPU usage statistics when the program \fB\-\-default\-auth=\fR\fB\fIplugin\fR\fR .sp A hint about the client\-side authentication plugin to use\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -575,7 +575,7 @@ statements\&. The default is 0 (connections are not detached)\&. Enable the mysql_clear_password cleartext authentication plugin\&. (See -Section\ \&7.5.1.8, \(lqThe Cleartext Client-Side Authentication Plugin\(rq\&.) +Section\ \&6.5.1.5, \(lqClient-Side Cleartext Pluggable Authentication\(rq\&.) .RE .sp .RS 4 @@ -783,7 +783,7 @@ option on the command line, prompts for one\&. .sp Specifying a password on the command line should be considered insecure\&. See -Section\ \&7.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. +Section\ \&6.1.2.1, \(lqEnd-User Guidelines for Password Security\(rq\&. You can use an option file to avoid giving the password on the command line\&. .RE .sp .RS 4 @@ -815,7 +815,7 @@ The directory in which to look for plugins\&. Specify this option if the option is used to specify an authentication plugin but \fBmysqlslap\fR does not find it\&. See -Section\ \&7.3.8, \(lqPluggable Authentication\(rq\&. +Section\ \&6.3.8, \(lqPluggable Authentication\(rq\&. .RE .sp .RS 4 @@ -912,7 +912,7 @@ Print the program name and all options that it gets from option files\&. \fB\-\-protocol={TCP|SOCKET|PIPE|MEMORY}\fR .sp The connection protocol to use for connecting to the server\&. It is useful when the other connection parameters normally would cause a protocol to be used other than the one you want\&. For details on the permissible values, see -Section\ \&5.2.2, \(lqConnecting to the MySQL Server\(rq\&. +Section\ \&4.2.2, \(lqConnecting to the MySQL Server\(rq\&. .RE .sp .RS 4 @@ -958,7 +958,7 @@ As of MySQL 5\&.7\&.5, this option is deprecated and will be removed in a future .ps -1 .br Passwords that use the pre\-4\&.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided\&. Pre\-4\&.1 passwords are deprecated and support for them is removed in MySQL 5\&.7\&.5\&. For account upgrade instructions, see -Section\ \&7.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. +Section\ \&6.5.1.3, \(lqMigrating Away from Pre-4.1 Password Hashing and the mysql_old_password Plugin\(rq\&. .sp .5v .RE .RE @@ -1031,7 +1031,7 @@ Set the SQL mode for the client session\&. This option was added in MySQL 5\&.7\ Options that begin with \fB\-\-ssl\fR specify whether to connect to the server using SSL and indicate where to find SSL keys and certificates\&. See -Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. +Section\ \&6.4.5, \(lqCommand Options for Secure Connections\(rq\&. .RE .sp .RS 4 @@ -1045,7 +1045,7 @@ Section\ \&7.4.5, \(lqCommand Options for Secure Connections\(rq\&. \fB\-\-tls\-version=\fR\fB\fIprotocol_list\fR\fR .sp The protocols permitted by the client for encrypted connections\&. The value is a comma\-separated list containing one or more protocol names\&. The protocols that can be named for this option depend on the SSL library used to compile MySQL\&. For details, see -Section\ \&7.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. +Section\ \&6.4.3, \(lqSecure Connection Protocols and Ciphers\(rq\&. .sp This option was added in MySQL 5\&.7\&.10\&. .RE diff --git a/man/mysqltest.1 b/man/mysqltest.1 index 6ba732f51ca7..020e5e92f9de 100644 --- a/man/mysqltest.1 +++ b/man/mysqltest.1 @@ -2,12 +2,12 @@ .\" Title: \fBmysqltest\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/14/2017 +.\" Date: 06/16/2017 .\" Manual: MySQL Database System .\" Source: MySQL .\" Language: English .\" -.TH "\FBMYSQLTEST\FR" "1" "03/14/2017" "MySQL" "MySQL Database System" +.TH "\FBMYSQLTEST\FR" "1" "06/16/2017" "MySQL" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -649,7 +649,7 @@ The server sends the public key to the client as needed, so it is not necessary For additional discussion regarding use of the sha256_password plugin, including how to get the RSA public key, see -\m[blue]\fBThe SHA\-256 Authentication Plugin\fR\m[]\&\s-2\u[1]\d\s+2\&. +\m[blue]\fBSHA\-256 Pluggable Authentication\fR\m[]\&\s-2\u[1]\d\s+2\&. .sp This option is available only if MySQL was built using OpenSSL\&. It was added in MySQL 5\&.6\&.6 under the name \fB\-\-server\-public\-key\fR @@ -898,9 +898,9 @@ You should have received a copy of the GNU General Public License along with the .sp .SH "NOTES" .IP " 1." 4 -The SHA-256 Authentication Plugin +SHA-256 Pluggable Authentication .RS 4 -\%http://dev.mysql.com/doc/refman/8.0/en/sha256-authentication-plugin.html +\%http://dev.mysql.com/doc/refman/8.0/en/sha256-pluggable-authentication.html .RE .SH "SEE ALSO" For more information, please refer to the MySQL Reference Manual, diff --git a/man/ndb-common-options.1 b/man/ndb-common-options.1 new file mode 100644 index 000000000000..b17a023ece4a --- /dev/null +++ b/man/ndb-common-options.1 @@ -0,0 +1,841 @@ +'\" t +.\" Title: Options Common to NDB Cluster Programs +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "OPTIONS COMMON TO ND" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb-common-options \- NDB Cluster Common Program Options +.SH "DESCRIPTION" +.PP +All NDB Cluster programs accept the options described in this section, with the following exceptions: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBmysqld\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBndb_print_backup_file\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBndb_print_schema_file\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBndb_print_sys_file\fR +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +Users of earlier NDB Cluster versions should note that some of these options have been changed to make them consistent with one another, and also with +\fBmysqld\fR\&. You can use the +\fB\-\-help\fR +option with any NDB Cluster program\(emwith the exception of +\fBndb_print_backup_file\fR, +\fBndb_print_schema_file\fR, and +\fBndb_print_sys_file\fR\(emto view a list of the options which the program supports\&. +.sp .5v +.RE +.PP +The options in the following table are common to all NDB Cluster executables (except those noted previously in this section)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.110.\ \& This table describes command\-line options common to all MySQL NDB Cluster programs +.TS +allbox tab(:); +. +.TE +.sp 1 +.PP +For options specific to individual NDB Cluster programs, see +Section\ \&21.4, \(lqNDB Cluster Programs\(rq\&. +.PP +See +Section\ \&21.3.3.8.1, \(lqMySQL Server Options for NDB Cluster\(rq, for +\fBmysqld\fR +options relating to NDB Cluster\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-character\-sets\-dir=\fR\fB\fIname\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-character\-sets\-dir=dir_name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +directory name +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Tells the program where to find character set information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-connect\-retries=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connect\-retries=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +12 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +This option specifies the number of times following the first attempt to retry a connection before giving up (the client always tries the connection at least once)\&. The length of time to wait per attempt is set using +\fB\-\-connect\-retry\-delay\fR\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +When used with +\fBndb_mgm\fR, this option has 3 as its default\&. See +\fBndb_mgm\fR(1), for more information\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-connect\-retry\-delay=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connect\-retry\-delay=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +5 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.10\-ndb\-7\&.5\&.0) +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +5 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +This option specifies the length of time to wait per attempt a connection before giving up\&. The number of times to try connecting is set by +\fB\-\-connect\-retries\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-core\-file\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-core\-file +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Write a core file if the program dies\&. The name and location of the core file are system\-dependent\&. (For NDB Cluster programs nodes running on Linux, the default location is the program\*(Aqs working directory\(emfor a data node, this is the node\*(Aqs +DataDir\&.) For some systems, there may be restrictions or limitations; for example, it might be necessary to execute +\fBulimit \-c unlimited\fR +before starting the server\&. Consult your system documentation for detailed information\&. +.sp +If NDB Cluster was built using the +\fB\-\-debug\fR +option for +\fBconfigure\fR, then +\fB\-\-core\-file\fR +is enabled by default\&. For regular builds, +\fB\-\-core\-file\fR +is disabled by default\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-debug[=\fR\fB\fIoptions\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-debug=options +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +d:t:O,/tmp/ndb_restore\&.trace +T} +.TE +.sp 1 +This option can be used only for versions compiled with debugging enabled\&. It is used to enable output from debug calls in the same manner as for the +\fBmysqld\fR +process\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-defaults\-extra\-file\fR=\fIfilename\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-defaults\-extra\-file=filename +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Read this file after global option files are read\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-defaults\-file\fR=\fIfilename\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-defaults\-file=filename +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Read default options from this file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-defaults\-group\-suffix\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-defaults\-group\-suffix +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Also read groups with names ending in this suffix\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-help\fR, +\fB\-\-usage\fR, +\fB\-?\fR +.TS +allbox tab(:); +l l s s +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-help +T} +T{ +\ \& +T}:T{ +\-\-usage +T} +.TE +.sp 1 +Prints a short list with descriptions of the available command options\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-login\-path\fR=\fIpath\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-login\-path=path +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Read this path from the login file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-ndb\-connectstring=\fR\fB\fIconnection_string\fR\fR, +\fB\-\-connect\-string=\fR\fB\fIconnection_string\fR\fR, +\fB\-c \fR\fB\fIconnection_string\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-connectstring=connectstring +T} +T{ +\ \& +T}:T{ +\-\-connect\-string=connectstring +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +localhost:1186 +T} +.TE +.sp 1 +This option takes an NDB Cluster connection string that specifies the management server for the application to connect to, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbd \-\-ndb\-connectstring="nodeid=2;host=ndb_mgmd\&.mysql\&.com:1186"\fR +.fi +.if n \{\ +.RE +.\} +.sp +For more information, see +Section\ \&21.3.3.3, \(lqNDB Cluster Connection Strings\(rq\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-ndb\-mgmd\-host=\fR\fB\fIhost\fR\fR\fB[:\fR\fB\fIport\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-mgmd\-host=host[:port] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +localhost:1186 +T} +.TE +.sp 1 +Can be used to set the host and port number of a single management server for the program to connect to\&. If the program requires node IDs or references to multiple management servers (or both) in its connection information, use the +\fB\-\-ndb\-connectstring\fR +option instead\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-ndb\-nodeid=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-nodeid=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +.TE +.sp 1 +Sets this node\*(Aqs NDB Cluster node ID\&. +\fIThe range of permitted values depends on the node\*(Aqs type (data, management, or API) and the NDB Cluster software version\fR\&. See +Section\ \&21.1.6.2, \(lqLimits and Differences of NDB Cluster from Standard MySQL Limits\(rq, for more information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-no\-defaults\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-no\-defaults +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Do not read default options from any option file other than login file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-ndb\-optimized\-node\-selection\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-optimized\-node\-selection +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Optimize selection of nodes for transactions\&. Enabled by default\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-print\-defaults\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-print\-defaults +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Print the program argument list and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-version\fR, +\fB\-V\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-version +T} +.TE +.sp 1 +Prints the NDB Cluster version number of the executable\&. The version number is relevant because not all versions can be used together, and the NDB Cluster startup process verifies that the versions of the binaries being used can co\-exist in the same cluster\&. This is also important when performing an online (rolling) software upgrade or downgrade of NDB Cluster\&. +.sp +See +Section\ \&21.5.5, \(lqPerforming a Rolling Restart of an NDB Cluster\(rq), for more information\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_blob_tool.1 b/man/ndb_blob_tool.1 new file mode 100644 index 000000000000..1779f736b495 --- /dev/null +++ b/man/ndb_blob_tool.1 @@ -0,0 +1,393 @@ +'\" t +.\" Title: \fBndb_blob_tool\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_BLOB_TOOL\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_blob_tool \- check and repair BLOB and TEXT columns of NDB Cluster tables +.SH "SYNOPSIS" +.HP \w'\fBndb_blob_tool\ \fR\fB\fIoptions\fR\fR\fB\ \fR\fB\fItable\fR\fR\fB\ [\fR\fB\fIcolumn\fR\fR\fB,\ \&.\&.\&.]\fR\ 'u +\fBndb_blob_tool \fR\fB\fIoptions\fR\fR\fB \fR\fB\fItable\fR\fR\fB [\fR\fB\fIcolumn\fR\fR\fB, \&.\&.\&.]\fR +.SH "DESCRIPTION" +.PP +This tool can be used to check for and remove orphaned BLOB column parts from +NDB +tables, as well as to generate a file listing any orphaned parts\&. It is sometimes useful in diagnosing and repairing corrupted or damaged +NDB +tables containing +BLOB +or +TEXT +columns\&. +.PP +The basic syntax for +\fBndb_blob_tool\fR +is shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_blob_tool [\fIoptions\fR] \fItable\fR [\fIcolumn\fR, \&.\&.\&.] +.fi +.if n \{\ +.RE +.\} +.PP +Unless you use the +\fB\-\-help\fR +option, you must specify an action to be performed by including one or more of the options +\fB\-\-check\-orphans\fR, +\fB\-\-delete\-orphans\fR, or +\fB\-\-dump\-file\fR\&. These options cause +\fBndb_blob_tool\fR +to check for orphaned BLOB parts, remove any orphaned BLOB parts, and generate a dump file listing orphaned BLOB parts, respectively, and are described in more detail later in this section\&. +.PP +You must also specify the name of a table when invoking +\fBndb_blob_tool\fR\&. In addition, you can optionally follow the table name with the (comma\-separated) names of one or more +BLOB +or +TEXT +columns from that table\&. If no columns are listed, the tool works on all of the table\*(Aqs +BLOB +and +TEXT +columns\&. If you need to specify a database, use the +\fB\-\-database\fR +(\fB\-d\fR) option\&. +.PP +The +\fB\-\-verbose\fR +option provides additional information in the output about the tool\*(Aqs progress\&. +.PP +The following table includes options that are specific to +\fBndb_blob_tool\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_blob_tool\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.90.\ \& This table describes command\-line options for the ndb_blob_tool program +.TS +allbox tab(:); +. +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-check\-orphans\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-check\-orphans +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Check for orphaned BLOB parts in NDB Cluster tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-database=\fR\fB\fIdb_name\fR\fR, +\fB\-d\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-database=db_name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Specify the database to find the table in\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-delete\-orphans\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-delete\-orphans +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Remove orphaned BLOB parts from NDB Cluster tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-dump\-file=\fR\fB\fIfile\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-dump\-file=file +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Writes a list of orphaned BLOB column parts to +\fIfile\fR\&. The information written to the file includes the table key and BLOB part number for each orphaned BLOB part\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-verbose\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-verbose +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Provide extra information in the tool\*(Aqs output regarding its progress\&. +.RE +Example.PP +First we create an +NDB +table in the +test +database, using the +CREATE TABLE +statement shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +USE test; +CREATE TABLE btest ( + c0 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + c1 TEXT, + c2 BLOB +) ENGINE=NDB; +.fi +.if n \{\ +.RE +.\} +.PP +Then we insert a few rows into this table, using a series of statements similar to this one: +.sp +.if n \{\ +.RS 4 +.\} +.nf +INSERT INTO btest VALUES (NULL, \*(Aqx\*(Aq, REPEAT(\*(Aqx\*(Aq, 1000)); +.fi +.if n \{\ +.RE +.\} +.PP +When run with +\fB\-\-check\-orphans\fR +against this table, +\fBndb_blob_tool\fR +generates the following output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_blob_tool \-\-check\-orphans \-\-verbose \-d test btest\fR +connected +processing 2 blobs +processing blob #0 c1 NDB$BLOB_19_1 +NDB$BLOB_19_1: nextResult: res=1 +total parts: 0 +orphan parts: 0 +processing blob #1 c2 NDB$BLOB_19_2 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=0 +NDB$BLOB_19_2: nextResult: res=1 +total parts: 10 +orphan parts: 0 +disconnected +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +The tool reports that there are no +NDB +BLOB column parts associated with column +c1, even though +c1 +is a +TEXT +column\&. This is due to the fact that, in an +NDB +table, only the first 256 bytes of a +BLOB +or +TEXT +column value are stored inline, and only the excess, if any, is stored separately; thus, if there are no values using more than 256 bytes in a given column of one of these types, no +BLOB +column parts are created by +NDB +for this column\&. See +Section\ \&11.8, \(lqData Type Storage Requirements\(rq, for more information\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_config.1 b/man/ndb_config.1 new file mode 100644 index 000000000000..97bbb4183a3a --- /dev/null +++ b/man/ndb_config.1 @@ -0,0 +1,1418 @@ +'\" t +.\" Title: \fBndb_config\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_CONFIG\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_config \- extract NDB Cluster configuration information +.SH "SYNOPSIS" +.HP \w'\fBndb_config\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_config \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +This tool extracts current configuration information for data nodes, SQL nodes, and API nodes from one of a number of sources: an NDB Cluster management node, or its +config\&.ini +or +my\&.cnf +file\&. By default, the management node is the source for the configuration data; to override the default, execute ndb_config with the +\fB\-\-config\-file\fR +or +\fB\-\-mycnf\fR +option\&. It is also possible to use a data node as the source by specifying its node ID with +\fB\-\-config_from_node=\fR\fB\fInode_id\fR\fR\&. +.PP +\fBndb_config\fR +can also provide an offline dump of all configuration parameters which can be used, along with their default, maximum, and minimum values and other information\&. The dump can be produced in either text or XML format; for more information, see the discussion of the +\fB\-\-configinfo\fR +and +\fB\-\-xml\fR +options later in this section)\&. +.PP +You can filter the results by section (DB, +SYSTEM, or +CONNECTIONS) using one of the options +\fB\-\-nodes\fR, +\fB\-\-system\fR, or +\fB\-\-connections\fR\&. +.PP +The following table includes options that are specific to +\fBndb_config\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_config\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.91.\ \& This table describes command\-line options for the ndb_config program +.TS +allbox tab(:); +. +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-configinfo\fR +.sp +The +\fB\-\-configinfo\fR +option causes +\fBndb_config\fR +to dump a list of each NDB Cluster configuration parameter supported by the NDB Cluster distribution of which +\fBndb_config\fR +is a part, including the following information: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A brief description of each parameter\*(Aqs purpose, effects, and usage +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The section of the +config\&.ini +file where the parameter may be used +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The parameter\*(Aqs data type or unit of measurement +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Where applicable, the parameter\*(Aqs default, minimum, and maximum values +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NDB Cluster release version and build information +.RE +.sp +By default, this output is in text format\&. Part of this output is shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_config \-\-configinfo\fR +****** SYSTEM ****** +Name (String) +Name of system (NDB Cluster) +MANDATORY +PrimaryMGMNode (Non\-negative Integer) +Node id of Primary ndb_mgmd(MGM) node +Default: 0 (Min: 0, Max: 4294967039) +ConfigGenerationNumber (Non\-negative Integer) +Configuration generation number +Default: 0 (Min: 0, Max: 4294967039) +****** DB ****** +MaxNoOfSubscriptions (Non\-negative Integer) +Max no of subscriptions (default 0 == MaxNoOfTables) +Default: 0 (Min: 0, Max: 4294967039) +MaxNoOfSubscribers (Non\-negative Integer) +Max no of subscribers (default 0 == 2 * MaxNoOfTables) +Default: 0 (Min: 0, Max: 4294967039) +\&... +.fi +.if n \{\ +.RE +.\} +.sp +Use this option together with the +\fB\-\-xml\fR +option to obtain output in XML format\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-file=\fR\fB\fIpath\-to\-file\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-config\-file=file_name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Gives the path to the management server\*(Aqs configuration file (config\&.ini)\&. This may be a relative or absolute path\&. If the management node resides on a different host from the one on which +\fBndb_config\fR +is invoked, then an absolute path must be used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config_from_node=#\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-config\-from\-node=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +none +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +48 +T} +.TE +.sp 1 +Obtain the cluster\*(Aqs configuration data from the data node that has this ID\&. +.sp +If the node having this ID is not a data node, +\fBndb_config\fR +fails with an error\&. (To obtain configuration data from the management node instead, simply omit this option\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-connections\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connections +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Tells +\fBndb_config\fR +to print +CONNECTIONS +information only\(emthat is, information about parameters found in the +[tcp], +[tcp default], +[sci], +[sci default], +[shm], or +[shm default] +sections of the cluster configuration file (see +Section\ \&21.3.3.9, \(lqNDB Cluster TCP/IP Connections\(rq, +Section\ \&21.3.3.12, \(lqSCI Transport Connections in NDB Cluster\(rq, and +Section\ \&21.3.3.11, \(lqNDB Cluster Shared-Memory Connections\(rq, for more information)\&. +.sp +This option is mutually exclusive with +\fB\-\-nodes\fR +and +\fB\-\-system\fR; only one of these 3 options can be used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-diff\-default\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +l l l s +^ l l s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-diff\-default +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.5\&.7) +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.3) +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Print only configuration parameters that have non\-default values\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-fields=\fR\fB\fIdelimiter\fR\fR, +\fB\-f\fR +\fIdelimiter\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields=string +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Specifies a +\fIdelimiter\fR +string used to separate the fields in the result\&. The default is +, +(the comma character)\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If the +\fIdelimiter\fR +contains spaces or escapes (such as +\en +for the linefeed character), then it must be quoted\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-host=\fR\fB\fIhostname\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-host=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Specifies the host name of the node for which configuration information is to be obtained\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +While the hostname +localhost +usually resolves to the IP address +127\&.0\&.0\&.1, this may not necessarily be true for all operating platforms and configurations\&. This means that it is possible, when +localhost +is used in +config\&.ini, for +\fBndb_config \fR\fB\fB\-\-host=localhost\fR\fR +to fail if +\fBndb_config\fR +is run on a different host where +localhost +resolves to a different address (for example, on some versions of SUSE Linux, this is +127\&.0\&.0\&.2)\&. In general, for best results, you should use numeric IP addresses for all NDB Cluster configuration values relating to hosts, or verify that all NDB Cluster hosts handle +localhost +in the same fashion\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-mycnf\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-mycnf +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Read configuration data from the +my\&.cnf +file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-ndb\-connectstring=\fR\fB\fIconnection_string\fR\fR, +\fB\-c \fR\fB\fIconnection_string\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-connectstring=connectstring +T} +T{ +\ \& +T}:T{ +\-\-connect\-string=connectstring +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +localhost:1186 +T} +.TE +.sp 1 +Specifies the connection string to use in connecting to the management server\&. The format for the connection string is the same as described in +Section\ \&21.3.3.3, \(lqNDB Cluster Connection Strings\(rq, and defaults to +localhost:1186\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nodeid=\fR\fB\fInode_id\fR\fR, +\fB\-\-id=\fR\fB\fInode_id\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb\-nodeid=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +.TE +.sp 1 +Specify the node ID of the node for which configuration information is to be obtained\&. +\fB\-\-nodeid\fR +is the preferred form\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nodes\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nodes +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Tells +\fBndb_config\fR +to print information relating only to parameters defined in an +[ndbd] +or +[ndbd default] +section of the cluster configuration file (see +Section\ \&21.3.3.6, \(lqDefining NDB Cluster Data Nodes\(rq)\&. +.sp +This option is mutually exclusive with +\fB\-\-connections\fR +and +\fB\-\-system\fR; only one of these 3 options can be used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-query=\fR\fB\fIquery\-options\fR\fR, +\fB\-q\fR +\fIquery\-options\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-query=string +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +This is a comma\-delimited list of +\fIquery options\fR\(emthat is, a list of one or more node attributes to be returned\&. These include +id +(node ID), type (node type\(emthat is, +ndbd, +mysqld, or +ndb_mgmd), and any configuration parameters whose values are to be obtained\&. +.sp +For example, +\fB\-\-query=nodeid,type,indexmemory,datamemory\fR +returns the node ID, node type, +DataMemory, and +IndexMemory +for each node\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If a given parameter is not applicable to a certain type of node, than an empty string is returned for the corresponding value\&. See the examples later in this section for more information\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-query\-all\fR, +\fB\-a\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.5\&.7 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-query\-all +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.4\&.16,5\&.7\&.18\-ndb\-7\&.5\&.7) +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Returns a comma\-delimited list of all query options (node attributes; note that this list is a single string\&. +.sp +This option was introduced in NDB 7\&.5\&.7 (Bug #60095, Bug #11766869)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-rows=\fR\fB\fIseparator\fR\fR, +\fB\-r\fR +\fIseparator\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-rows=string +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Specifies a +\fIseparator\fR +string used to separate the rows in the result\&. The default is a space character\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If the +\fIseparator\fR +contains spaces or escapes (such as +\en +for the linefeed character), then it must be quoted\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-system\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-system +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Tells +\fBndb_config\fR +to print +SYSTEM +information only\&. This consists of system variables that cannot be changed at run time; thus, there is no corresponding section of the cluster configuration file for them\&. They can be seen (prefixed with +****** SYSTEM ******) in the output of +\fBndb_config\fR +\fB\-\-configinfo\fR\&. +.sp +This option is mutually exclusive with +\fB\-\-nodes\fR +and +\fB\-\-connections\fR; only one of these 3 options can be used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-type=\fR\fB\fInode_type\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ lt l s +^ ^ l s +^ ^ l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-type=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +enumeration +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +:T{ +\fBValid Values\fR +T}:T{ +ndbd +T} +::T{ +mysqld +T} +::T{ +ndb_mgmd +T} +.TE +.sp 1 +Filters results so that only configuration values applying to nodes of the specified +\fInode_type\fR +(ndbd, +mysqld, or +ndb_mgmd) are returned\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-usage\fR, +\fB\-\-help\fR, or +\fB\-?\fR +.TS +allbox tab(:); +l l s s +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-help +T} +T{ +\ \& +T}:T{ +\-\-usage +T} +.TE +.sp 1 +Causes +\fBndb_config\fR +to print a list of available options, and then exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-version\fR, +\fB\-V\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-version +T} +.TE +.sp 1 +Causes +\fBndb_config\fR +to print a version information string, and then exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-configinfo\fR +\fB\-\-xml\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-configinfo \-\-xml +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +.TE +.sp 1 +Cause +\fBndb_config\fR +\fB\-\-configinfo\fR +to provide output as XML by adding this option\&. A portion of such output is shown in this example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_config \-\-configinfo \-\-xml\fR + +
+ + + +
+
+ + + + + + \&... +
+ \&... +
+.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +Normally, the XML output produced by +\fBndb_config\fR +\fB\-\-configinfo\fR +\fB\-\-xml\fR +is formatted using one line per element; we have added extra whitespace in the previous example, as well as the next one, for reasons of legibility\&. This should not make any difference to applications using this output, since most XML processors either ignore nonessential whitespace as a matter of course, or can be instructed to do so\&. +.sp .5v +.RE +The XML output also indicates when changing a given parameter requires that data nodes be restarted using the +\fB\-\-initial\fR +option\&. This is shown by the presence of an +initial="true" +attribute in the corresponding + +element\&. In addition, the restart type (system +or +node) is also shown; if a given parameter requires a system restart, this is indicated by the presence of a +restart="system" +attribute in the corresponding + +element\&. For example, changing the value set for the +Diskless +parameter requires a system initial restart, as shown here (with the +restart +and +initial +attributes highlighted for visibility): +.sp +.if n \{\ +.RS 4 +.\} +.nf + +.fi +.if n \{\ +.RE +.\} +.sp +Currently, no +initial +attribute is included in the XML output for + +elements corresponding to parameters which do not require initial restarts; in other words, +initial="false" +is the default, and the value +false +should be assumed if the attribute is not present\&. Similarly, the default restart type is +node +(that is, an online or +\(lqrolling\(rq +restart of the cluster), but the +restart +attribute is included only if the restart type is +system +(meaning that all cluster nodes must be shut down at the same time, then restarted)\&. +.sp +Deprecated parameters are indicated in the XML output by the +deprecated +attribute, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf + +.fi +.if n \{\ +.RE +.\} +.sp +In such cases, the +comment +refers to one or more parameters that supersede the deprecated parameter\&. Similarly to +initial, the +deprecated +attribute is indicated only when the parameter is deprecated, with +deprecated="true", and does not appear at all for parameters which are not deprecated\&. (Bug #21127135) +.sp +Beginning with NDB 7\&.5\&.0, parameters that are required are indicated with +mandatory="true", as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf + +.fi +.if n \{\ +.RE +.\} +.sp +In much the same way that the +initial +or +deprecated +attribute is displayed only for a parameter that requires an intial restart or that is deprecated, the +mandatory +attribute is included only if the given parameter is actually required\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +The +\fB\-\-xml\fR +option can be used only with the +\fB\-\-configinfo\fR +option\&. Using +\fB\-\-xml\fR +without +\fB\-\-configinfo\fR +fails with an error\&. +.sp .5v +.RE +Unlike the options used with this program to obtain current configuration data, +\fB\-\-configinfo\fR +and +\fB\-\-xml\fR +use information obtained from the NDB Cluster sources when +\fBndb_config\fR +was compiled\&. For this reason, no connection to a running NDB Cluster or access to a +config\&.ini +or +my\&.cnf +file is required for these two options\&. +.RE +.PP +Combining other +\fBndb_config\fR +options (such as +\fB\-\-query\fR +or +\fB\-\-type\fR) with +\fB\-\-configinfo\fR +(with or without the +\fB\-\-xml\fR +option is not supported\&. Currently, if you attempt to do so, the usual result is that all other options besides +\fB\-\-configinfo\fR +or +\fB\-\-xml\fR +are simply ignored\&. +\fIHowever, this behavior is not guaranteed and is subject to change at any time\fR\&. In addition, since +\fBndb_config\fR, when used with the +\fB\-\-configinfo\fR +option, does not access the NDB Cluster or read any files, trying to specify additional options such as +\fB\-\-ndb\-connectstring\fR +or +\fB\-\-config\-file\fR +with +\fB\-\-configinfo\fR +serves no purpose\&. +Examples +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +To obtain the node ID and type of each node in the cluster: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_config \-\-query=id,type \-\-fields=\*(Aq:\*(Aq \-\-rows=\*(Aq\en\*(Aq\fR +1:ndbd +2:ndbd +3:ndbd +4:ndbd +5:ndb_mgmd +6:mysqld +7:mysqld +8:mysqld +9:mysqld +.fi +.if n \{\ +.RE +.\} +.sp +In this example, we used the +\fB\-\-fields\fR +options to separate the ID and type of each node with a colon character (:), and the +\fB\-\-rows\fR +options to place the values for each node on a new line in the output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +To produce a connection string that can be used by data, SQL, and API nodes to connect to the management server: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_config \-\-config\-file=usr/local/mysql/cluster\-data/config\&.ini \e +\-\-query=hostname,portnumber \-\-fields=: \-\-rows=, \-\-type=ndb_mgmd\fR +192\&.168\&.0\&.179:1186 +.fi +.if n \{\ +.RE +.\} +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 3.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 3." 4.2 +.\} +This invocation of +\fBndb_config\fR +checks only data nodes (using the +\fB\-\-type\fR +option), and shows the values for each node\*(Aqs ID and host name, as well as the values set for its +DataMemory, +IndexMemory, and +DataDir +parameters: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_config \-\-type=ndbd \-\-query=id,host,datamemory,indexmemory,datadir \-f \*(Aq : \*(Aq \-r \*(Aq\en\*(Aq\fR +1 : 192\&.168\&.0\&.193 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data +2 : 192\&.168\&.0\&.112 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data +3 : 192\&.168\&.0\&.176 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data +4 : 192\&.168\&.0\&.119 : 83886080 : 18874368 : /usr/local/mysql/cluster\-data +.fi +.if n \{\ +.RE +.\} +.sp +In this example, we used the short options +\fB\-f\fR +and +\fB\-r\fR +for setting the field delimiter and row separator, respectively\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 4.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 4." 4.2 +.\} +To exclude results from any host except one in particular, use the +\fB\-\-host\fR +option: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_config \-\-host=192\&.168\&.0\&.176 \-f : \-r \*(Aq\en\*(Aq \-q id,type\fR +3:ndbd +5:ndb_mgmd +.fi +.if n \{\ +.RE +.\} +.sp +In this example, we also used the short form +\fB\-q\fR +to determine the attributes to be queried\&. +.sp +Similarly, you can limit results to a node with a specific ID using the +\fB\-\-nodeid\fR +option\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_cpcd.1 b/man/ndb_cpcd.1 new file mode 100644 index 000000000000..55050e691c15 --- /dev/null +++ b/man/ndb_cpcd.1 @@ -0,0 +1,54 @@ +'\" t +.\" Title: \fBndb_cpcd\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_CPCD\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_cpcd \- automate testing of NDB (development use only) +.SH "SYNOPSIS" +.HP \w'\fBndb_cpcd\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_cpcd \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +A utility having this name was formerly part of an internal automated test framework used in testing and debugging NDB Cluster\&. It is no longer included in NDB Cluster distributions provided by Oracle\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_delete_all.1 b/man/ndb_delete_all.1 new file mode 100644 index 000000000000..ffcf32f6c2d8 --- /dev/null +++ b/man/ndb_delete_all.1 @@ -0,0 +1,123 @@ +'\" t +.\" Title: \fBndb_delete_all\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_DELETE_ALL\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_delete_all \- delete all rows from an NDB table +.SH "SYNOPSIS" +.HP \w'\fBndb_delete_all\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_delete_all \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_delete_all\fR +deletes all rows from the given +NDB +table\&. In some cases, this can be much faster than +DELETE +or even +TRUNCATE TABLE\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_delete_all \-c \fIconnection_string\fR \fItbl_name\fR \-d \fIdb_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +This deletes all rows from the table named +\fItbl_name\fR +in the database named +\fIdb_name\fR\&. It is exactly equivalent to executing +TRUNCATE \fIdb_name\fR\&.\fItbl_name\fR +in MySQL\&. +.PP +The following table includes options that are specific to +\fBndb_delete_all\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_delete_all\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.92.\ \& This table describes command\-line options for the ndb_delete_all program +.TS +allbox tab(:); +. +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-transactional\fR, +\fB\-t\fR +.sp +Use of this option causes the delete operation to be performed as a single transaction\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +With very large tables, using this option may cause the number of operations available to the cluster to be exceeded\&. +.sp .5v +.RE +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_desc.1 b/man/ndb_desc.1 new file mode 100644 index 000000000000..74efb51d0668 --- /dev/null +++ b/man/ndb_desc.1 @@ -0,0 +1,622 @@ +'\" t +.\" Title: \fBndb_desc\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_DESC\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_desc \- describe NDB tables +.SH "SYNOPSIS" +.HP \w'\fBndb_desc\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_desc \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_desc\fR +provides a detailed description of one or more +NDB +tables\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_desc \-c \fIconnection_string\fR \fItbl_name\fR \-d \fIdb_name\fR [\fIoptions\fR] +ndb_desc \-c \fIconnection_string\fR \fIindex_name\fR \-d \fIdb_name\fR \-t \fItbl_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +Additional options that can be used with +\fBndb_desc\fR +are listed later in this section\&. +Sample Output.PP +MySQL table creation and population statements: +.sp +.if n \{\ +.RS 4 +.\} +.nf +USE test; +CREATE TABLE fish ( + id INT(11) NOT NULL AUTO_INCREMENT, + name VARCHAR(20) NOT NULL, + length_mm INT(11) NOT NULL, + weight_gm INT(11) NOT NULL, + PRIMARY KEY pk (id), + UNIQUE KEY uk (name) +) ENGINE=NDB; +INSERT INTO fish VALUES + (NULL, \*(Aqguppy\*(Aq, 35, 2), (NULL, \*(Aqtuna\*(Aq, 2500, 150000), + (NULL, \*(Aqshark\*(Aq, 3000, 110000), (NULL, \*(Aqmanta ray\*(Aq, 1500, 50000), + (NULL, \*(Aqgrouper\*(Aq, 900, 125000), (NULL ,\*(Aqpuffer\*(Aq, 250, 2500); +.fi +.if n \{\ +.RE +.\} +.PP +Output from +\fBndb_desc\fR: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_desc \-c localhost fish \-d test \-p\fR +\-\- fish \-\- +Version: 2 +Fragment type: HashMapPartition +K Value: 6 +Min load factor: 78 +Max load factor: 80 +Temporary table: no +Number of attributes: 4 +Number of primary keys: 1 +Length of frm data: 337 +Max Rows: 0 +Row Checksum: 1 +Row GCI: 1 +SingleUserMode: 0 +ForceVarPart: 1 +PartitionCount: 2 +FragmentCount: 2 +PartitionBalance: FOR_RP_BY_LDM +ExtraRowGciBits: 0 +ExtraRowAuthorBits: 0 +TableStatus: Retrieved +Table options: +HashMap: DEFAULT\-HASHMAP\-3840\-2 +\-\- Attributes \-\- +id Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR +name Varchar(20;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY DYNAMIC +length_mm Int NOT NULL AT=FIXED ST=MEMORY DYNAMIC +weight_gm Int NOT NULL AT=FIXED ST=MEMORY DYNAMIC +\-\- Indexes \-\- +PRIMARY KEY(id) \- UniqueHashIndex +PRIMARY(id) \- OrderedIndex +uk(name) \- OrderedIndex +uk$unique(name) \- UniqueHashIndex +\-\- Per partition info \-\- +Partition Row count Commit count Frag fixed memory Frag varsized memory Extent_space Free extent_space +0 2 2 32768 32768 0 0 +1 4 4 32768 32768 0 0 +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +Information about multiple tables can be obtained in a single invocation of +\fBndb_desc\fR +by using their names, separated by spaces\&. All of the tables must be in the same database\&. +.PP +You can obtain additional information about a specific index using the +\fB\-\-table\fR +(short form: +\fB\-t\fR) option and supplying the name of the index as the first argument to +\fBndb_desc\fR, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_desc uk \-d test \-t fish\fR +\-\- uk \-\- +Version: 2 +Base table: fish +Number of attributes: 1 +Logging: 0 +Index type: OrderedIndex +Index status: Retrieved +\-\- Attributes \-\- +name Varchar(20;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY +\-\- IndexTable 10/uk \-\- +Version: 2 +Fragment type: FragUndefined +K Value: 6 +Min load factor: 78 +Max load factor: 80 +Temporary table: yes +Number of attributes: 2 +Number of primary keys: 1 +Length of frm data: 0 +Max Rows: 0 +Row Checksum: 1 +Row GCI: 1 +SingleUserMode: 2 +ForceVarPart: 0 +PartitionCount: 2 +FragmentCount: 2 +FragmentCountType: ONE_PER_LDM_PER_NODE +ExtraRowGciBits: 0 +ExtraRowAuthorBits: 0 +TableStatus: Retrieved +Table options: +\-\- Attributes \-\- +name Varchar(20;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY +NDB$TNODE Unsigned [64] PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY +\-\- Indexes \-\- +PRIMARY KEY(NDB$TNODE) \- UniqueHashIndex +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +When an index is specified in this way, the +\fB\-\-extra\-partition\-info\fR +and +\fB\-\-extra\-node\-info\fR +options have no effect\&. +.PP +The +Version +column in the output contains the table\*(Aqs schema object version\&. For information about interpreting this value, see +\m[blue]\fBNDB Schema Object Versions\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +Three of the table properties that can be set using +NDB_TABLE +comments embedded in +CREATE TABLE +and +ALTER TABLE +statements are also visible in +\fBndb_desc\fR +output\&. The table\*(Aqs +FRAGMENT_COUNT_TYPE +is always shown in the +FragmentCountType +column\&. +READ_ONLY +and +FULLY_REPLICATED, if set to 1, are shown in the +Table options +column\&. You can see this after executing the following +ALTER TABLE +statement in the +\fBmysql\fR +client: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBALTER TABLE fish COMMENT=\*(AqNDB_TABLE=READ_ONLY=1,FULLY_REPLICATED=1\*(Aq;\fR +1 row in set, 1 warning (0\&.00 sec) +mysql> \fBSHOW WARNINGS\eG\fR ++\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| Level | Code | Message | ++\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| Warning | 1296 | Got error 4503 \*(AqTable property is FRAGMENT_COUNT_TYPE=ONE_PER_LDM_PER_NODE but not in comment\*(Aq from NDB | ++\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +1 row in set (0\&.00 sec) +.fi +.if n \{\ +.RE +.\} +.PP +The warning is issued because +READ_ONLY=1 +requires that the table\*(Aqs fragment count type is (or be set to) +ONE_PER_LDM_PER_NODE_GROUP; +NDB +sets this automatically in such cases\&. You can check that the +ALTER TABLE +statement has the desired effect using +SHOW CREATE TABLE: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBSHOW CREATE TABLE fish\eG\fR +*************************** 1\&. row *************************** + Table: fish +Create Table: CREATE TABLE `fish` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(20) NOT NULL, + `length_mm` int(11) NOT NULL, + `weight_gm` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `uk` (`name`) +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 +COMMENT=\*(AqNDB_TABLE=READ_BACKUP=1,FULLY_REPLICATED=1\*(Aq +1 row in set (0\&.01 sec) +.fi +.if n \{\ +.RE +.\} +.PP +Because +FRAGMENT_COUNT_TYPE +was not set explicitly, its value is not shown in the comment text printed by +SHOW CREATE TABLE\&. +\fBndb_desc\fR, however, displays the updated value for this attribute\&. The +Table options +column shows the binary properties just enabled\&. You can see this in the output shown here (emphasized text): +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_desc \-c localhost fish \-d test \-p\fR +\-\- fish \-\- +Version: 4 +Fragment type: HashMapPartition +K Value: 6 +Min load factor: 78 +Max load factor: 80 +Temporary table: no +Number of attributes: 4 +Number of primary keys: 1 +Length of frm data: 380 +Max Rows: 0 +Row Checksum: 1 +Row GCI: 1 +SingleUserMode: 0 +ForceVarPart: 1 +PartitionCount: 1 +FragmentCount: 1 +\fIFragmentCountType: ONE_PER_LDM_PER_NODE_GROUP\fR +ExtraRowGciBits: 0 +ExtraRowAuthorBits: 0 +TableStatus: Retrieved +\fITable options: readbackup, fullyreplicated\fR +HashMap: DEFAULT\-HASHMAP\-3840\-1 +\-\- Attributes \-\- +id Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR +name Varchar(20;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY DYNAMIC +length_mm Int NOT NULL AT=FIXED ST=MEMORY DYNAMIC +weight_gm Int NOT NULL AT=FIXED ST=MEMORY DYNAMIC +\-\- Indexes \-\- +PRIMARY KEY(id) \- UniqueHashIndex +PRIMARY(id) \- OrderedIndex +uk(name) \- OrderedIndex +uk$unique(name) \- UniqueHashIndex +\-\- Per partition info \-\- +Partition Row count Commit count Frag fixed memory Frag varsized memory Extent_space Free extent_space +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +For more information about these table properties, see +Section\ \&13.1.18.10, \(lqSetting NDB_TABLE Options in Table Comments\(rq\&. +.PP +The +Extent_space +and +Free extent_space +columns are applicable only to +NDB +tables having columns on disk; for tables having only in\-memory columns, these columns always contain the value +0\&. +.PP +To illustrate their use, we modify the previous example\&. First, we must create the necessary Disk Data objects, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +CREATE LOGFILE GROUP lg_1 + ADD UNDOFILE \*(Aqundo_1\&.log\*(Aq + INITIAL_SIZE 16M + UNDO_BUFFER_SIZE 2M + ENGINE NDB; +ALTER LOGFILE GROUP lg_1 + ADD UNDOFILE \*(Aqundo_2\&.log\*(Aq + INITIAL_SIZE 12M + ENGINE NDB; +CREATE TABLESPACE ts_1 + ADD DATAFILE \*(Aqdata_1\&.dat\*(Aq + USE LOGFILE GROUP lg_1 + INITIAL_SIZE 32M + ENGINE NDB; +ALTER TABLESPACE ts_1 + ADD DATAFILE \*(Aqdata_2\&.dat\*(Aq + INITIAL_SIZE 48M + ENGINE NDB; +.fi +.if n \{\ +.RE +.\} +.PP +(For more information on the statements just shown and the objects created by them, see +Section\ \&21.5.13.1, \(lqNDB Cluster Disk Data Objects\(rq, as well as +Section\ \&13.1.15, \(lqCREATE LOGFILE GROUP Syntax\(rq, and +Section\ \&13.1.19, \(lqCREATE TABLESPACE Syntax\(rq\&.) +.PP +Now we can create and populate a version of the +fish +table that stores 2 of its columns on disk (deleting the previous version of the table first, if it already exists): +.sp +.if n \{\ +.RS 4 +.\} +.nf +CREATE TABLE fish ( + id INT(11) NOT NULL AUTO_INCREMENT, + name VARCHAR(20) NOT NULL, + length_mm INT(11) NOT NULL, + weight_gm INT(11) NOT NULL, + PRIMARY KEY pk (id), + UNIQUE KEY uk (name) +) TABLESPACE ts_1 STORAGE DISK +ENGINE=NDB; +INSERT INTO fish VALUES + (NULL, \*(Aqguppy\*(Aq, 35, 2), (NULL, \*(Aqtuna\*(Aq, 2500, 150000), + (NULL, \*(Aqshark\*(Aq, 3000, 110000), (NULL, \*(Aqmanta ray\*(Aq, 1500, 50000), + (NULL, \*(Aqgrouper\*(Aq, 900, 125000), (NULL ,\*(Aqpuffer\*(Aq, 250, 2500); +.fi +.if n \{\ +.RE +.\} +.PP +When run against this version of the table, +\fBndb_desc\fR +displays the following output: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_desc \-c localhost fish \-d test \-p\fR +\-\- fish \-\- +Version: 1 +Fragment type: HashMapPartition +K Value: 6 +Min load factor: 78 +Max load factor: 80 +Temporary table: no +Number of attributes: 4 +Number of primary keys: 1 +Length of frm data: 346 +Max Rows: 0 +Row Checksum: 1 +Row GCI: 1 +SingleUserMode: 0 +ForceVarPart: 1 +PartitionCount: 2 +FragmentCount: 2 +FragmentCountType: ONE_PER_LDM_PER_NODE +ExtraRowGciBits: 0 +ExtraRowAuthorBits: 0 +TableStatus: Retrieved +Table options: +HashMap: DEFAULT\-HASHMAP\-3840\-2 +\-\- Attributes \-\- +id Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR +name Varchar(20;latin1_swedish_ci) NOT NULL AT=SHORT_VAR ST=MEMORY +length_mm Int NOT NULL AT=FIXED ST=DISK +weight_gm Int NOT NULL AT=FIXED ST=DISK +\-\- Indexes \-\- +PRIMARY KEY(id) \- UniqueHashIndex +PRIMARY(id) \- OrderedIndex +uk(name) \- OrderedIndex +uk$unique(name) \- UniqueHashIndex +\-\- Per partition info \-\- +Partition Row count Commit count Frag fixed memory Frag varsized memory Extent_space Free extent_space +0 2 2 32768 32768 1048576 1044440 +1 4 4 32768 32768 1048576 1044400 +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +This means that 1048576 bytes are allocated from the tablespace for this table on each partition, of which 1044440 bytes remain free for additional storage\&. In other words, 1048576 \- 1044440 = 4136 bytes per partition is currently being used to store the data from this table\*(Aqs disk\-based columns\&. The number of bytes shown as +Free extent_space +is available for storing on\-disk column data from the +fish +table only; for this reason, it is not visible when selecting from the +INFORMATION_SCHEMA\&.FILES +table\&. +.PP +For fully replicated tables, +\fBndb_desc\fR +shows only the nodes holding primary partition fragment replicas; nodes with copy fragment replicas (only) are ignored\&. Beginning with NDB 7\&.5\&.4, you can obtain such information, using the +\fBmysql\fR +client, from the +table_distribution_status, +table_fragments, +table_info, and +table_replicas +tables in the +ndbinfo +database\&. +.PP +The following table includes options that are specific to +\fBndb_desc\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_desc\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.93.\ \& This table describes command\-line options for the ndb_desc program +.TS +allbox tab(:); +. +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-blob\-info\fR, +\fB\-b\fR +.sp +Include information about subordinate +BLOB +and +TEXT +columns\&. +.sp +Use of this option also requires the use of the +\fB\-\-extra\-partition\-info\fR +(\fB\-p\fR) option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-database=\fR\fB\fIdb_name\fR\fR, +\fB\-d\fR +.sp +Specify the database in which the table should be found\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-extra\-node\-info\fR, +\fB\-n\fR +.sp +Include information about the mappings between table partitions and the data nodes upon which they reside\&. This information can be useful for verifying distribution awareness mechanisms and supporting more efficient application access to the data stored in NDB Cluster\&. +.sp +Use of this option also requires the use of the +\fB\-\-extra\-partition\-info\fR +(\fB\-p\fR) option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-extra\-partition\-info\fR, +\fB\-p\fR +.sp +Print additional information about the table\*(Aqs partitions\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-retries=\fR\fB\fI#\fR\fR, +\fB\-r\fR +.sp +Try to connect this many times before giving up\&. One connect attempt is made per second\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-table=\fR\fB\fItbl_name\fR\fR, +\fB\-t\fR +.sp +Specify the table in which to look for an index\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-unqualified\fR, +\fB\-u\fR +.sp +Use unqualified table names\&. +.RE +.PP +In NDB 7\&.5\&.3 and later, table indexes listed in the output are ordered by ID\&. Previously, this was not deterministic and could vary between platforms\&. (Bug #81763, Bug #23547742) +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +NDB Schema Object Versions +.RS 4 +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-internals-schema-object-versions.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_drop_index.1 b/man/ndb_drop_index.1 new file mode 100644 index 000000000000..cadea5b28ad9 --- /dev/null +++ b/man/ndb_drop_index.1 @@ -0,0 +1,149 @@ +'\" t +.\" Title: \fBndb_drop_index\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_DROP_INDEX\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_drop_index \- drop index from an NDB table +.SH "SYNOPSIS" +.HP \w'\fBndb_drop_index\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_drop_index \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_drop_index\fR +drops the specified index from an +NDB +table\&. +\fIIt is recommended that you use this utility only as an example for writing NDB API applications\fR\(emsee the Warning later in this section for details\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_drop_index \-c \fIconnection_string\fR \fItable_name\fR \fIindex\fR \-d \fIdb_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +The statement shown above drops the index named +\fIindex\fR +from the +\fItable\fR +in the +\fIdatabase\fR\&. +.PP +The following table includes options that are specific to +\fBndb_drop_index\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_drop_index\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.94.\ \& This table describes command\-line options for the ndb_drop_index program +.TS +allbox tab(:); +. +.TE +.sp 1 +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +.PP +\fIOperations performed on Cluster table indexes using the NDB API are not visible to MySQL and make the table unusable by a MySQL server\fR\&. If you use this program to drop an index, then try to access the table from an SQL node, an error results, as shown here: +.sp .5v +.RE +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_drop_index \-c localhost dogs ix \-d ctest1\fR +Dropping index dogs/idx\&.\&.\&.OK +NDBT_ProgramExit: 0 \- OK +shell> \fB\&./mysql \-u jon \-p ctest1\fR +Enter password: ******* +Reading table information for completion of table and column names +You can turn off this feature to get a quicker startup with \-A +Welcome to the MySQL monitor\&. Commands end with ; or \eg\&. +Your MySQL connection id is 7 to server version: 5\&.7\&.19\-ndb\-7\&.5\&.8 +Type \*(Aqhelp;\*(Aq or \*(Aq\eh\*(Aq for help\&. Type \*(Aq\ec\*(Aq to clear the buffer\&. +mysql> \fBSHOW TABLES;\fR ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| Tables_in_ctest1 | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| a | +| bt1 | +| bt2 | +| dogs | +| employees | +| fish | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +6 rows in set (0\&.00 sec) +mysql> \fBSELECT * FROM dogs;\fR +ERROR 1296 (HY000): Got error 4243 \*(AqIndex not found\*(Aq from NDBCLUSTER +.fi +.if n \{\ +.RE +.\} +.PP +In such a case, your +\fIonly\fR +option for making the table available to MySQL again is to drop the table and re\-create it\&. You can use either the SQL statementDROP TABLE +or the +\fBndb_drop_table\fR +utility (see +\fBndb_drop_table\fR(1)) to drop the table\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_drop_table.1 b/man/ndb_drop_table.1 new file mode 100644 index 000000000000..90fdee763139 --- /dev/null +++ b/man/ndb_drop_table.1 @@ -0,0 +1,90 @@ +'\" t +.\" Title: \fBndb_drop_table\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_DROP_TABLE\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_drop_table \- drop an NDB table +.SH "SYNOPSIS" +.HP \w'\fBndb_drop_table\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_drop_table \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_drop_table\fR +drops the specified +NDB +table\&. (If you try to use this on a table created with a storage engine other than +NDB, the attempt fails with the error +723: No such table exists\&.) This operation is extremely fast; in some cases, it can be an order of magnitude faster than using a MySQL +DROP TABLE +statement on an +NDB +table\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_drop_table \-c \fIconnection_string\fR \fItbl_name\fR \-d \fIdb_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +The following table includes options that are specific to +\fBndb_drop_table\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_drop_table\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.95.\ \& This table describes command\-line options for the ndb_drop_table program +.TS +allbox tab(:); +. +.TE +.sp 1 +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_error_reporter.1 b/man/ndb_error_reporter.1 new file mode 100644 index 000000000000..9a41a5ff669c --- /dev/null +++ b/man/ndb_error_reporter.1 @@ -0,0 +1,244 @@ +'\" t +.\" Title: \fBndb_error_reporter\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_ERROR_REPORTE" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_error_reporter \- NDB error\-reporting utility +.SH "SYNOPSIS" +.HP \w'\fBndb_error_reporter\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_error_reporter \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_error_reporter\fR +creates an archive from data node and management node log files that can be used to help diagnose bugs or other problems with a cluster\&. +\fIIt is highly recommended that you make use of this utility when filing reports of bugs in NDB Cluster \fR\&. +.PP +The following table includes command options specific to the NDB Cluster program +\fBndb_error_reporter\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_error_reporter\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.96.\ \& This table describes command\-line options for the ndb_error_reporter program +.TS +allbox tab(:); +. +.TE +.sp 1 +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_error_reporter \fIpath/to/config\-file\fR [\fIusername\fR] [\fIoptions\fR] +.fi +.if n \{\ +.RE +.\} +.PP +This utility is intended for use on a management node host, and requires the path to the management host configuration file (usually named +config\&.ini)\&. Optionally, you can supply the name of a user that is able to access the cluster\*(Aqs data nodes using SSH, to copy the data node log files\&. +\fBndb_error_reporter\fR +then includes all of these files in archive that is created in the same directory in which it is run\&. The archive is named +ndb_error_report_\fIYYYYMMDDHHMMSS\fR\&.tar\&.bz2, where +\fIYYYYMMDDHHMMSS\fR +is a datetime string\&. +.PP +\fBndb_error_reporter\fR +also accepts the options listed here: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-connection\-timeout=\fR\fB\fItimeout\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connection\-timeout=timeout +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +.TE +.sp 1 +Wait this many seconds when trying to connect to nodes before timing out\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-dry\-scp\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-dry\-scp +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Run +\fBndb_error_reporter\fR +without using scp from remote hosts\&. Used for testing only\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-fs\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fs +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Copy the data node file systems to the management host and include them in the archive\&. +.sp +Because data node file systems can be extremely large, even after being compressed, we ask that you please do +\fInot\fR +send archives created using this option to Oracle unless you are specifically requested to do so\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-skip\-nodegroup=\fR\fB\fInodegroup_id\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connection\-timeout=timeout +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +.TE +.sp 1 +Skip all nodes belong to the node group having the supplied node group ID\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_import.1 b/man/ndb_import.1 new file mode 100644 index 000000000000..d8f3272966f8 --- /dev/null +++ b/man/ndb_import.1 @@ -0,0 +1,2189 @@ +'\" t +.\" Title: \fBndb_import\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_IMPORT\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_import \- Import CSV data into NDB +.SH "SYNOPSIS" +.HP \w'\fBndb_import\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_import \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_import\fR +imports CSV\-formatted data into +NDB +using the NDB API, which requires a connection to an NDB management server\&. A connection to a MySQL Server is not required\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_import \fIdb_name\fR \fIfile_name\fR \fIoptions\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBndb_import\fR +requires two arguments\&. +\fIdb_name\fR +is the name of the database in which the database where the table into which to import the data is found; +\fIfile_name\fR +is the name of the CSV file from which to read the data, including the path to this file if it is not in the current directory\&. The name of the file must match the name of the table; the file\*(Aqs extention, if any, is not taken into consdieration\&. Additional arguments (described later in this section) are supported, including options for specifying field separators, escapes, and line terminators\&. +\fBndb_import\fR +must be able to connect to an NDB Cluster management server; for this reason, there must be an unused +[api] +slot in the +config\&.ini +file\&. +.PP +To duplicate an existing table that uses a different storage engine, such as +InnoDB, as an +NDB +table, use the +\fBmysql\fR +client to perform a +SELECT INTO OUTFILE +statement to export the existing table to a CSV file, then to execute a +CREATE TABLE LIKE +statement to create a new table having the same structure as the existing table, then perform +ALTER TABLE \&.\&.\&. ENGINE=NDB +on the new table; after this, from the system shell, invoke +\fBndb_import\fR +to load the data into the new +NDB +table\&. For example, an existing +InnoDB +table named +myinnodb_table +in a database named +myinnodb +can be exported into an +NDB +table named +myndb_table +in a database named +myndb +as shown here, assuming that you are already logged in as a MySQL user with the appropriate privileges: +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +In the +\fBmysql\fR +client: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBUSE myinnodb;\fR +mysql> \fBSELECT * INTO OUTFILE \*(Aq/tmp/myndb_table\&.csv\*(Aq\fR +mysql> \fBFIELDS TERMINATED BY \*(Aq,\*(Aq OPTIONALLY ENCLOSED BY \*(Aq"\*(Aq ESCAPED BY \*(Aq\e\e\*(Aq\fR +mysql> \fBLINES TERMINATED BY \*(Aq\en\*(Aq\fR +mysql> \fBFROM myinnodbtable;\fR +mysql> \fBCREATE DATABASE myndb;\fR +mysql> \fBUSE myndb;\fR +mysql> \fBCREATE TABLE myndb_table LIKE myinnodb\&.myinnodb_table;\fR +mysql> \fBALTER TABLE myndb_table ENGINE=NDB;\fR +mysql> \fBEXIT;\fR +Bye +shell> +.fi +.if n \{\ +.RE +.\} +.sp +Once the target database and table have been created, a running +\fBmysqld\fR +is no longer required\&. You can stop it using +\fBmysqladmin shutdown\fR +or another method before proceeding, if you wish\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +In the system shell: +.sp +.if n \{\ +.RS 4 +.\} +.nf +# if you are not already in the MySQL bin directory: +shell> \fBcd \fR\fB\fIpath\-to\-mysql\-bin\-dir\fR\fR +shell> \fBndb_import myndb /tmp/myndb_table\&.csv \-\-fields\-optionally\-enclosed\-by=\*(Aq"\*(Aq \e\fR + \fB\-\-fields\-separated\-by="," \-\-fields\-escaped\-by=\*(Aq\e\e\*(Aq\fR +.fi +.if n \{\ +.RE +.\} +.sp +The output should resemble what is shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +job\-1 import myndb\&.myndb_table from /tmp/myndb_table\&.csv +job\-1 [running] import myndb\&.myndb_table from /tmp/myndb_table\&.csv +job\-1 [success] import myndb\&.myndb_table from /tmp/myndb_table\&.csv +job\-1 imported 19984 rows in 0h0m9s at 2277 rows/s +jobs summary: defined: 1 run: 1 with success: 1 with failure: 0 +shell> +.fi +.if n \{\ +.RE +.\} +.RE +.PP +The following table includes options that are specific to +\fBndb_import\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_import\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.97.\ \& This table describes command\-line options for the ndb_import program +.TS +allbox tab(:); +. +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-abort\-on\-error\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-abort\-on\-error +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Dump core on any fatal error; used for debugging only\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-ai\-increment\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ai\-increment=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +1 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +For a table with a hidden primary key, specify the autoincrement increment, like the the +auto_increment_increment +system variable does in the MySQL Server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-ai\-offset\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ai\-offset=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +1 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +For a table with hidden primary key, specify the autoincrement offset\&. Similar to the +auto_increment_offset +system variable\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-ai\-prefetch\-sz\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ai\-prefetch\-sz=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +1024 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +For a table with a hidden primary key, specify the number of autoincrement values that are prefetched\&. Behaves like the +ndb_autoincrement_prefetch_sz +system variable does in the MySQL Server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-connections\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connections=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +1 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Number of cluster connections to create\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-continue\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-continue +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +When a job fails, continue to the next job\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-db\-workers\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-db\-workers=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +1 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Number of threads, per data node, executing database operations\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-errins\-type\fR=\fIname\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ lt l s +^ ^ l s +^ ^ l s +^ ^ l s +^ ^ l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-errins\-type=name +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +enumeration +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +:T{ +\fBValid Values\fR +T}:T{ +stopjob +T} +::T{ +stopall +T} +::T{ +sighup +T} +::T{ +sigint +T} +::T{ +list +T} +.TE +.sp 1 +Error insert type; use +list +as the +\fIname\fR +value to obtain all possible values\&. This option is used for testing purposes only\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-errins\-delay\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-errins\-delay=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +1000 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Error insert delay in milliseconds; random variation is added\&. This option is used for testing purposes only\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-fields\-enclosed\-by\fR=\fIchar\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields\-enclosed\-by=char +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +This works in the same way as the +FIELDS ENCLOSED BY +option does for the +LOAD DATA +statement, specifying a character to be interpeted as quoting field values\&. For CSV input, this is the same as +\fB\-\-fields\-optionally\-enclosed\-by\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-fields\-escaped\-by\fR=\fIname\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields\-escaped\-by=name +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +\e +T} +.TE +.sp 1 +Specify an escape character in the same way as the +FIELDS ESCAPED BY +option does for the SQL +LOAD DATA +statement\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-fields\-optionally\-enclosed\-by\fR=\fIchar\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields\-optionally\-enclosed\-by=char +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +This works in the same way as the +FIELDS OPTIONALLY ENCLOSED BY +option does for the +LOAD DATA +statement, specifying a character to be interpeted as optionally quoting field values\&. For CSV input, this is the same as +\fB\-\-fields\-enclosed\-by\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-fields\-terminated\-by\fR=\fIchar\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields\-terminated\-by=char +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +\et +T} +.TE +.sp 1 +This works in the same way as the +FIELDS TERMINATED BY +option does for the +LOAD DATA +statement, specifying a character to be interpeted as the field separator\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-idlesleep\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-idlesleep=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +1 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Number of milliseconds to sleep waiting for more work to perform\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-idlespin\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-idlespin=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Number of times to retry before sleeping\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-ignore\-lines\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ignore\-lines=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Cause ndb_import to ignore the first +\fI#\fR +lines of the input file\&. This can be employed to skip a file header that does not contain any data\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-input\-type\fR=\fIname\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ lt l s +^ ^ l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-input\-type=name +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +enumeration +T} +:T{ +\fBDefault\fR +T}:T{ +csv +T} +:T{ +\fBValid Values\fR +T}:T{ +random +T} +::T{ +csv +T} +.TE +.sp 1 +Set the type of input type\&. The default is +csv; +random +is intended for testing purposes only\&. \&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-input\-workers\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-input\-workers=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +2 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Set the number of threads processing input\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-lines\-terminated\-by\fR=\fIname\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-lines\-terminated\-by=name +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +\en +T} +.TE +.sp 1 +This works in the same way as the +LINES TERMINATED BY +option does for the +LOAD DATA +statement, specifying a character to be interpeted as end\-of\-line\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-max\-rows\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-max\-rows=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Import only this number of input data rows; the default is 0, which imports all rows\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-monitor\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-monitor=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +2 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Periodically print the status of a running job if something has changed (status, rejected rows, temporary errors)\&. Set to 0 to disable this reporting\&. Setting to 1 prints any change that is seen\&. Higher values reduce the frequency of this status reporting\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-no\-asynch\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-no\-asynch +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Run database operations as batches, in single transactions\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-no\-hint\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-no\-hint +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Do not use distribution key hinting to select a data node\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-opbatch\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-opbatch=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +256 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Set a limit on the number of operations (including blob operations), and thus the number of asynchronous transactions, per execution batch\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-opbytes\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-opbytes=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Set a limit on the number of bytes per execution batch\&. Use 0 for no limit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-output\-type\fR=\fIname\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ lt l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-output\-type=name +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +enumeration +T} +:T{ +\fBDefault\fR +T}:T{ +ndb +T} +:T{ +\fBValid Values\fR +T}:T{ +null +T} +.TE +.sp 1 +Set the output type\&. +ndb +is the default\&. +null +is used only for testing\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-output\-workers\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-output\-workers=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +2 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Set the number of threads processing output or relaying database operations\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-pagesize\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-pagesize=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +4096 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Align I/O buffers to the given size\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-pagecnt\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-pagecnt=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +64 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Set the size of I/O buffers as multiple of page size\&. The CSV input worker allocates buffer that is doubled in size\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-polltimeout\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-polltimeout=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +1000 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Set a timeout per poll for completed asynchonous transactions; polling continues until all polls are completed, or until an error occurs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-rejects\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-rejects=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Limit the number of rejected rows (rows with permanent errors) in the data load\&. The default is 0, which means that any rejected row causes a fatal error\&. The row causing the limit to be exceeded is added to the +\&.rej +file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-resume\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-resume +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +If a job is aborted (due to a temporary db error or when interrupted by the user), resume with any rows not yet processed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-rowbatch\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-rowbatch=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Set a limit on the number of rows per row queue\&. Use 0 for no limit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-rowbytes\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-rowbytes=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +262144 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Set a limit on the number of bytes per row queue\&. Use 0 for no limit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB \-\-state\-dir\fR=\fIname\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-state\-dir=name +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +\&. +T} +.TE +.sp 1 +Where to write the state files (\fItbl_name\fR\&.map, +\fItbl_name\fR\&.rej, +\fItbl_name\fR\&.res, and +\fItbl_name\fR\&.stt) produced by a run of the program; the default is the current directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-tempdelay\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-tempdelay=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +10 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Number of milliseconds to sleep between temporary errors\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-temperrors\fR=\fI#\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-temperrors=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Number of times a transaction can fail due to a temporary error, per execution batch\&. The default is 0, which means that any temporary error is fatal\&. Temporary errors do not cause any rows to be added to the +\&.rej +file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-verbose\fR=\fI#\fR, +\fB\-v\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.18\-ndb\-7\&.6\&.2 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-verbose=# +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.18\-ndb\-7\&.6\&.2) +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +2 +T} +.TE +.sp 1 +Verbosity level for debugging messages\&. +.RE +.PP +As with +LOAD DATA INFILE, options for field and line formatting much match those used to create the CSV file, whether this was done using +SELECT INTO OUTFILE, or by some other means\&. There is no equivalent to the +LOAD DATA INFILE +statement\*(Aqs +STARTING WITH +option\&. +.PP +\fBndb_import\fR +was added in NDB 7\&.6\&.2\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_index_stat.1 b/man/ndb_index_stat.1 new file mode 100644 index 000000000000..e093cb070909 --- /dev/null +++ b/man/ndb_index_stat.1 @@ -0,0 +1,851 @@ +'\" t +.\" Title: \fBndb_index_stat\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_INDEX_STAT\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_index_stat \- NDB index statistics utility +.SH "SYNOPSIS" +.HP \w'\fBndb_index_stat\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_index_stat \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_index_stat\fR +provides per\-fragment statistical information about indexes on +NDB +tables\&. This includes cache version and age, number of index entries per partition, and memory consumption by indexes\&. +Usage.PP +To obtain basic index statistics about a given +NDB +table, invoke +\fBndb_index_stat\fR +as shown here, with the name of the table as the first argument and the name of the database containing this table specified immediately following it, using the +\fB\-\-database\fR +(\fB\-d\fR) option: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_index_stat \fItable\fR \-d \fIdatabase\fR +.fi +.if n \{\ +.RE +.\} +.PP +In this example, we use +\fBndb_index_stat\fR +to obtain such information about an +NDB +table named +mytable +in the +test +database: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_index_stat \-d test mytable\fR +table:City index:PRIMARY fragCount:2 +sampleVersion:3 loadTime:1399585986 sampleCount:1994 keyBytes:7976 +query cache: valid:1 sampleCount:1994 totalBytes:27916 +times in ms: save: 7\&.133 sort: 1\&.974 sort per sample: 0\&.000 +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +sampleVersion +is the version number of the cache from which the statistics data is taken\&. Running +\fBndb_index_stat\fR +with the +\fB\-\-update\fR +option causes sampleVersion to be incremented\&. +.PP +loadTime +shows when the cache was last updated\&. This is expressed as seconds since the Unix Epoch\&. +.PP +sampleCount +is the number of index entries found per partition\&. You can estimate the total number of entries by multiplying this by the number of fragments (shown as +fragCount)\&. +.PP +sampleCount +can be compared with the cardinality of +SHOW INDEX +or +INFORMATION_SCHEMA\&.STATISTICS, although the latter two provide a view of the table as a whole, while +\fBndb_index_stat\fR +provides a per\-fragment average\&. +.PP +keyBytes +is the number of bytes used by the index\&. In this example, the primary key is an integer, which requires four bytes for each index, so +keyBytes +can be calculated in this case as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf + keyBytes = sampleCount * (4 bytes per index) = 1994 * 4 = 7976 +.fi +.if n \{\ +.RE +.\} +.PP +This information can also be obtained using the corresponding column definitions from +INFORMATION_SCHEMA\&.COLUMNS +(this requires a MySQL Server and a MySQL client application)\&. +.PP +totalBytes +is the total memory consumed by all indexes on the table, in bytes\&. +.PP +Timings shown in the preceding examples are specific to each invocation of +\fBndb_index_stat\fR\&. +.PP +The +\fB\-\-verbose\fR +option provides some additional output, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_index_stat \-d test mytable \-\-verbose\fR +random seed 1337010518 +connected +loop 1 of 1 +table:mytable index:PRIMARY fragCount:4 +sampleVersion:2 loadTime:1336751773 sampleCount:0 keyBytes:0 +read stats +query cache created +query cache: valid:1 sampleCount:0 totalBytes:0 +times in ms: save: 20\&.766 sort: 0\&.001 +disconnected +NDBT_ProgramExit: 0 \- OK +shell> +.fi +.if n \{\ +.RE +.\} +.sp +Options.PP +The following table includes options that are specific to the NDB Cluster +\fBndb_index_stat\fR +utility\&. Additional descriptions are listed following the table\&. For options common to most NDB Cluster programs (including +\fBndb_index_stat\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.98.\ \& This table describes command\-line options for the ndb_index_stat program +.TS +allbox tab(:); +. +.TE +.sp 1 +.PP +\fBndb_index_stat statistics options\fR. The following options are used to generate index statistics\&. They work with a given table and database\&. They cannot be mixed with system options (see +ndb_index_stat system options)\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-database=\fR\fB\fIname\fR\fR, +\fB\-d \fR\fB\fIname\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-database=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +The name of the database that contains the table being queried\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-delete\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-delete +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Delete the index statistics for the given table, stopping any auto\-update that was previously configured\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-update\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-update +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Update the index statistics for the given table, and restart any auto\-update that was previously configured\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-dump\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-dump +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Dump the contents of the query cache\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-query=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-query=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +MAX_INT +T} +.TE +.sp 1 +Perform random range queries on first key attribute (must be int unsigned)\&. +.RE +.PP +\fBndb_index_stat system options\fR. The following options are used to generate and update the statistics tables in the NDB kernel\&. None of these options can be mixed with statistics options (see +ndb_index_stat statistics options)\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-sys\-drop\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-drop +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Drop all statistics tables and events in the NDB kernel\&. +\fIThis causes all statistics to be lost\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-sys\-create\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-create +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Create all statistics tables and events in the NDB kernel\&. This works only if none of them exist previously\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBsys\-create\-if\-not\-exist\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-create\-if\-not\-exist +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Create any NDB system statistics tables or events (or both) that do not already exist when the program is invoked\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-sys\-create\-if\-not\-valid\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-create\-if\-not\-valid +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Create any NDB system statistics tables or events that do not already exist, after dropping any that are invalid\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-sys\-check\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-check +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Verify that all required system statistics tables and events exist in the NDB kernel\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-sys\-skip\-tables\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-skip\-tables +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Do not apply any +\fB\-\-sys\-*\fR +options to any statistics tables\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-sys\-skip\-events\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sys\-skip\-events +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Do not apply any +\fB\-\-sys\-*\fR +options to any events\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-verbose\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-verbose +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +false +T} +:T{ +\fBMin Value\fR +T}:T{ +T} +:T{ +\fBMax Value\fR +T}:T{ +T} +.TE +.sp 1 +Turn on verbose output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-loops=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-loops=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +MAX_INT +T} +.TE +.sp 1 +Repeat commands this number of times (for use in testing)\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_mgm.1 b/man/ndb_mgm.1 new file mode 100644 index 000000000000..0bbbe5e45759 --- /dev/null +++ b/man/ndb_mgm.1 @@ -0,0 +1,311 @@ +'\" t +.\" Title: \fBndb_mgm\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_MGM\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_mgm \- the NDB Cluster management client +.SH "SYNOPSIS" +.HP \w'\fBndb_mgm\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_mgm \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +The +\fBndb_mgm\fR +management client process is actually not needed to run the cluster\&. Its value lies in providing a set of commands for checking the cluster\*(Aqs status, starting backups, and performing other administrative functions\&. The management client accesses the management server using a C API\&. Advanced users can also employ this API for programming dedicated management processes to perform tasks similar to those performed by +\fBndb_mgm\fR\&. +.PP +To start the management client, it is necessary to supply the host name and port number of the management server: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_mgm [\fR\fB\fIhost_name\fR\fR\fB [\fR\fB\fIport_num\fR\fR\fB]]\fR +.fi +.if n \{\ +.RE +.\} +.PP +For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_mgm ndb_mgmd\&.mysql\&.com 1186\fR +.fi +.if n \{\ +.RE +.\} +.PP +The default host name and port number are +localhost +and 1186, respectively\&. +.PP +The following table includes options that are specific to the NDB Cluster management client program +\fBndb_mgm\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_mgm\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.89.\ \& This table describes command\-line options for the ndb_mgm program +.TS +allbox tab(:); +. +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-connect\-retries=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connect\-retries=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +3 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +This option specifies the number of times following the first attempt to retry a connection before giving up (the client always tries the connection at least once)\&. The length of time to wait per attempt is set using +\fB\-\-connect\-retry\-delay\fR\&. +.sp +This option is synonymous with the +\fB\-\-try\-reconnect\fR +option, which is now deprecated\&. +.sp +The default for this option this option differs from its default when used with other +NDB +programs\&. See +Options Common to NDB Cluster Programs(1), for more information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-execute=\fR\fBcommand\fR, +\fB\-e \fR\fBcommand\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-execute=name +T} +.TE +.sp 1 +This option can be used to send a command to the NDB Cluster management client from the system shell\&. For example, either of the following is equivalent to executing +SHOW +in the management client: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_mgm \-e "SHOW"\fR +shell> \fBndb_mgm \-\-execute="SHOW"\fR +.fi +.if n \{\ +.RE +.\} +.sp +This is analogous to how the +\fB\-\-execute\fR +or +\fB\-e\fR +option works with the +\fBmysql\fR +command\-line client\&. See +Section\ \&4.2.4, \(lqUsing Options on the Command Line\(rq\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +If the management client command to be passed using this option contains any space characters, then the command +\fImust\fR +be enclosed in quotation marks\&. Either single or double quotation marks may be used\&. If the management client command contains no space characters, the quotation marks are optional\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-try\-reconnect=\fR\fB\fInumber\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBDeprecated\fR +T}:T{ +5\&.6\&.28\-ndb\-7\&.4\&.9 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-try\-reconnect=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +3 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +T{ +\fBPermitted Values\fR (>= 5\&.7\&.10\-ndb\-7\&.5\&.0) +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +12 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +If the connection to the management server is broken, the node tries to reconnect to it every 5 seconds until it succeeds\&. By using this option, it is possible to limit the number of attempts to +\fInumber\fR +before giving up and reporting an error instead\&. +.sp +This option is deprecated and subject to removal in a future release\&. Use +\fB\-\-connect\-retries\fR, instead\&. +.RE +.PP +Additional information about using +\fBndb_mgm\fR +can be found in +Section\ \&21.5.2, \(lqCommands in the NDB Cluster Management Client\(rq\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_mgmd.8 b/man/ndb_mgmd.8 new file mode 100644 index 000000000000..b5bb39ccd109 --- /dev/null +++ b/man/ndb_mgmd.8 @@ -0,0 +1,1094 @@ +'\" t +.\" Title: \fBndb_mgmd\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_MGMD\FR" "8" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_mgmd \- the NDB Cluster management server daemon +.SH "SYNOPSIS" +.HP \w'\fBndb_mgmd\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_mgmd \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +The management server is the process that reads the cluster configuration file and distributes this information to all nodes in the cluster that request it\&. It also maintains a log of cluster activities\&. Management clients can connect to the management server and check the cluster\*(Aqs status\&. +.PP +The following table includes options that are specific to the NDB Cluster management server program +\fBndb_mgmd\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_mgmd\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.88.\ \& This table describes command\-line options for the ndb_mgmd program +.TS +allbox tab(:); +. +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-bind\-address=\fR\fB\fIhost\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-bind\-address=host +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Causes the management server to bind to a specific network interface (host name or IP address)\&. This option has no default value\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-no\-nodeid\-checks\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-no\-nodeid\-checks +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Do not perform any checks of node IDs\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-configdir=\fR\fB\fIdir_name\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-configdir=directory +T} +T{ +\ \& +T}:T{ +\-\-config\-dir=directory +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +$INSTALLDIR/mysql\-cluster +T} +.TE +.sp 1 +Specifies the cluster management server\*(Aqs configuration cache directory\&. +\fB\-\-config\-dir\fR +is an alias for this option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-cache\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-config\-cache[=TRUE|FALSE] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +This option, whose default value is +1 +(or +TRUE, or +ON), can be used to disable the management server\*(Aqs configuration cache, so that it reads its configuration from +config\&.ini +every time it starts (see +Section\ \&21.3.3, \(lqNDB Cluster Configuration Files\(rq)\&. You can do this by starting the +\fBndb_mgmd\fR +process with any one of the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-cache=0\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-cache=FALSE\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-cache=OFF\fR +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-skip\-config\-cache\fR +.RE +.sp +Using one of the options just listed is effective only if the management server has no stored configuration at the time it is started\&. If the management server finds any configuration cache files, then the +\fB\-\-config\-cache\fR +option or the +\fB\-\-skip\-config\-cache\fR +option is ignored\&. Therefore, to disable configuration caching, the option should be used the +\fIfirst\fR +time that the management server is started\&. Otherwise\(emthat is, if you wish to disable configuration caching for a management server that has +\fIalready\fR +created a configuration cache\(emyou must stop the management server, delete any existing configuration cache files manually, then restart the management server with +\fB\-\-skip\-config\-cache\fR +(or with +\fB\-\-config\-cache\fR +set equal to 0, +OFF, or +FALSE)\&. +.sp +Configuration cache files are normally created in a directory named +mysql\-cluster +under the installation directory (unless this location has been overridden using the +\fB\-\-configdir\fR +option)\&. Each time the management server updates its configuration data, it writes a new cache file\&. The files are named sequentially in order of creation using the following format: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_\fInode\-id\fR_config\&.bin\&.\fIseq\-number\fR +.fi +.if n \{\ +.RE +.\} +.sp +\fInode\-id\fR +is the management server\*(Aqs node ID; +\fIseq\-number\fR +is a sequence number, beginning with 1\&. For example, if the management server\*(Aqs node ID is 5, then the first three configuration cache files would, when they are created, be named +ndb_5_config\&.bin\&.1, +ndb_5_config\&.bin\&.2, and +ndb_5_config\&.bin\&.3\&. +.sp +If your intent is to purge or reload the configuration cache without actually disabling caching, you should start +\fBndb_mgmd\fR +with one of the options +\fB\-\-reload\fR +or +\fB\-\-initial\fR +instead of +\fB\-\-skip\-config\-cache\fR\&. +.sp +To re\-enable the configuration cache, simply restart the management server, but without the +\fB\-\-config\-cache\fR +or +\fB\-\-skip\-config\-cache\fR +option that was used previously to disable the configuration cache\&. +.sp +\fBndb_mgmd\fR +does not check for the configuration directory (\fB\-\-configdir\fR) or attempts to create one when +\fB\-\-skip\-config\-cache\fR +is used\&. (Bug #13428853) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-config\-file=\fR\fB\fIfilename\fR\fR, +\fB\-f \fR\fB\fIfilename\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-config\-file=file +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Instructs the management server as to which file it should use for its configuration file\&. By default, the management server looks for a file named +config\&.ini +in the same directory as the +\fBndb_mgmd\fR +executable; otherwise the file name and location must be specified explicitly\&. +.sp +This option has no default value, and is ignored unless the management server is forced to read the configuration file, either because +\fBndb_mgmd\fR +was started with the +\fB\-\-reload\fR +or +\fB\-\-initial\fR +option, or because the management server could not find any configuration cache\&. This option is also read if +\fBndb_mgmd\fR +was started with +\fB\-\-config\-cache=OFF\fR\&. See +Section\ \&21.3.3, \(lqNDB Cluster Configuration Files\(rq, for more information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-mycnf\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-mycnf +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Read configuration data from the +my\&.cnf +file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-daemon\fR, +\fB\-d\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-daemon +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Instructs +\fBndb_mgmd\fR +to start as a daemon process\&. This is the default behavior\&. +.sp +This option has no effect when running +\fBndb_mgmd\fR +on Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-interactive\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-interactive +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Starts +\fBndb_mgmd\fR +in interactive mode; that is, an +\fBndb_mgm\fR +client session is started as soon as the management server is running\&. This option does not start any other NDB Cluster nodes\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-initial\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-initial +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Configuration data is cached internally, rather than being read from the cluster global configuration file each time the management server is started (see +Section\ \&21.3.3, \(lqNDB Cluster Configuration Files\(rq)\&. Using the +\fB\-\-initial\fR +option overrides this behavior, by forcing the management server to delete any existing cache files, and then to re\-read the configuration data from the cluster configuration file and to build a new cache\&. +.sp +This differs in two ways from the +\fB\-\-reload\fR +option\&. First, +\fB\-\-reload\fR +forces the server to check the configuration file against the cache and reload its data only if the contents of the file are different from the cache\&. Second, +\fB\-\-reload\fR +does not delete any existing cache files\&. +.sp +If +\fBndb_mgmd\fR +is invoked with +\fB\-\-initial\fR +but cannot find a global configuration file, the management server cannot start\&. +.sp +When a management server starts, it checks for another management server in the same NDB Cluster and tries to use the other management server\*(Aqs configuration data; +\fBndb_mgmd\fR +ignores +\fB\-\-initial\fR +unless it is the only management server running\&. This behavior also has implications when performing a rolling restart of an NDB Cluster with multiple management nodes\&. See +Section\ \&21.5.5, \(lqPerforming a Rolling Restart of an NDB Cluster\(rq, for more information\&. +.sp +When used together with the +\fB\-\-config\-file\fR +option, the cache is cleared only if the configuration file is actually found\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-log\-name=\fR\fB\fIname\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-log\-name=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +MgmtSrvr +T} +.TE +.sp 1 +Provides a name to be used for this node in the cluster log\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nodaemon\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nodaemon +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Instructs +\fBndb_mgmd\fR +not to start as a daemon process\&. +.sp +The default behavior for +\fBndb_mgmd\fR +on Windows is to run in the foreground, making this option unnecessary on Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-print\-full\-config\fR, +\fB\-P\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-print\-full\-config +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Shows extended information regarding the configuration of the cluster\&. With this option on the command line the +\fBndb_mgmd\fR +process prints information about the cluster setup including an extensive list of the cluster configuration sections as well as parameters and their values\&. Normally used together with the +\fB\-\-config\-file\fR +(\fB\-f\fR) option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-reload\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-reload +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +NDB Cluster configuration data is stored internally rather than being read from the cluster global configuration file each time the management server is started (see +Section\ \&21.3.3, \(lqNDB Cluster Configuration Files\(rq)\&. Using this option forces the management server to check its internal data store against the cluster configuration file and to reload the configuration if it finds that the configuration file does not match the cache\&. Existing configuration cache files are preserved, but not used\&. +.sp +This differs in two ways from the +\fB\-\-initial\fR +option\&. First, +\fB\-\-initial\fR +causes all cache files to be deleted\&. Second, +\fB\-\-initial\fR +forces the management server to re\-read the global configuration file and construct a new cache\&. +.sp +If the management server cannot find a global configuration file, then the +\fB\-\-reload\fR +option is ignored\&. +.sp +When a management server starts, it checks for another management server in the same NDB Cluster and tries to use the other management server\*(Aqs configuration data; +\fBndb_mgmd\fR +ignores +\fB\-\-reload\fR +unless it is the only management server running\&. This behavior also has implications when performing a rolling restart of an NDB Cluster with multiple management nodes\&. See +Section\ \&21.5.5, \(lqPerforming a Rolling Restart of an NDB Cluster\(rq, for more information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nowait\-nodes\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nowait\-nodes=list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +255 +T} +.TE +.sp 1 +When starting an NDB Cluster is configured with two management nodes, each management server normally checks to see whether the other +\fBndb_mgmd\fR +is also operational and whether the other management server\*(Aqs configuration is identical to its own\&. However, it is sometimes desirable to start the cluster with only one management node (and perhaps to allow the other +\fBndb_mgmd\fR +to be started later)\&. This option causes the management node to bypass any checks for any other management nodes whose node IDs are passed to this option, permitting the cluster to start as though configured to use only the management node that was started\&. +.sp +For purposes of illustration, consider the following portion of a +config\&.ini +file (where we have omitted most of the configuration parameters that are not relevant to this example): +.sp +.if n \{\ +.RS 4 +.\} +.nf +[ndbd] +NodeId = 1 +HostName = 192\&.168\&.0\&.101 +[ndbd] +NodeId = 2 +HostName = 192\&.168\&.0\&.102 +[ndbd] +NodeId = 3 +HostName = 192\&.168\&.0\&.103 +[ndbd] +NodeId = 4 +HostName = 192\&.168\&.0\&.104 +[ndb_mgmd] +NodeId = 10 +HostName = 192\&.168\&.0\&.150 +[ndb_mgmd] +NodeId = 11 +HostName = 192\&.168\&.0\&.151 +[api] +NodeId = 20 +HostName = 192\&.168\&.0\&.200 +[api] +NodeId = 21 +HostName = 192\&.168\&.0\&.201 +.fi +.if n \{\ +.RE +.\} +.sp +Assume that you wish to start this cluster using only the management server having node ID +10 +and running on the host having the IP address 192\&.168\&.0\&.150\&. (Suppose, for example, that the host computer on which you intend to the other management server is temporarily unavailable due to a hardware failure, and you are waiting for it to be repaired\&.) To start the cluster in this way, use a command line on the machine at 192\&.168\&.0\&.150 to enter the following command: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_mgmd \-\-ndb\-nodeid=10 \-\-nowait\-nodes=11\fR +.fi +.if n \{\ +.RE +.\} +.sp +As shown in the preceding example, when using +\fB\-\-nowait\-nodes\fR, you must also use the +\fB\-\-ndb\-nodeid\fR +option to specify the node ID of this +\fBndb_mgmd\fR +process\&. +.sp +You can then start each of the cluster\*(Aqs data nodes in the usual way\&. If you wish to start and use the second management server in addition to the first management server at a later time without restarting the data nodes, you must start each data node with a connection string that references both management servers, like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbd \-c 192\&.168\&.0\&.150,192\&.168\&.0\&.151\fR +.fi +.if n \{\ +.RE +.\} +.sp +The same is true with regard to the connection string used with any +\fBmysqld\fR +processes that you wish to start as NDB Cluster SQL nodes connected to this cluster\&. See +Section\ \&21.3.3.3, \(lqNDB Cluster Connection Strings\(rq, for more information\&. +.sp +When used with +\fBndb_mgmd\fR, this option affects the behavior of the management node with regard to other management nodes only\&. Do not confuse it with the +\fB\-\-nowait\-nodes\fR +option used with +\fBndbd\fR +or +\fBndbmtd\fR +to permit a cluster to start with fewer than its full complement of data nodes; when used with data nodes, this option affects their behavior only with regard to other data nodes\&. +.sp +Multiple management node IDs may be passed to this option as a comma\-separated list\&. Each node ID must be no less than 1 and no greater than 255\&. In practice, it is quite rare to use more than two management servers for the same NDB Cluster (or to have any need for doing so); in most cases you need to pass to this option only the single node ID for the one management server that you do not wish to use when starting the cluster\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +When you later start the +\(lqmissing\(rq +management server, its configuration must match that of the management server that is already in use by the cluster\&. Otherwise, it fails the configuration check performed by the existing management server, and does not start\&. +.sp .5v +.RE +.RE +.PP +It is not strictly necessary to specify a connection string when starting the management server\&. However, if you are using more than one management server, a connection string should be provided and each node in the cluster should specify its node ID explicitly\&. +.PP +See +Section\ \&21.3.3.3, \(lqNDB Cluster Connection Strings\(rq, for information about using connection strings\&. +\fBndb_mgmd\fR(8), describes other options for +\fBndb_mgmd\fR\&. +.PP +The following files are created or used by +\fBndb_mgmd\fR +in its starting directory, and are placed in the +DataDir +as specified in the +config\&.ini +configuration file\&. In the list that follows, +\fInode_id\fR +is the unique node identifier\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +config\&.ini +is the configuration file for the cluster as a whole\&. This file is created by the user and read by the management server\&. +Section\ \&21.3, \(lqConfiguration of NDB Cluster\(rq, discusses how to set up this file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_cluster\&.log +is the cluster events log file\&. Examples of such events include checkpoint startup and completion, node startup events, node failures, and levels of memory usage\&. A complete listing of cluster events with descriptions may be found in +Section\ \&21.5, \(lqManagement of NDB Cluster\(rq\&. +.sp +By default, when the size of the cluster log reaches one million bytes, the file is renamed to +ndb_\fInode_id\fR_cluster\&.log\&.\fIseq_id\fR, where +\fIseq_id\fR +is the sequence number of the cluster log file\&. (For example: If files with the sequence numbers 1, 2, and 3 already exist, the next log file is named using the number +4\&.) You can change the size and number of files, and other characteristics of the cluster log, using the +LogDestination +configuration parameter\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_out\&.log +is the file used for +stdout +and +stderr +when running the management server as a daemon\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR\&.pid +is the process ID file used when running the management server as a daemon\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-install[=\fR\fB\fIname\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-install[=name] +T} +T{ +\fBPlatform Specific\fR +T}:T{ +Windows +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +ndb_mgmd +T} +.TE +.sp 1 +Causes +\fBndb_mgmd\fR +to be installed as a Windows service\&. Optionally, you can specify a name for the service; if not set, the service name defaults to +ndb_mgmd\&. Although it is preferable to specify other +\fBndb_mgmd\fR +program options in a +my\&.ini +or +my\&.cnf +configuration file, it is possible to use them together with +\fB\-\-install\fR\&. However, in such cases, the +\fB\-\-install\fR +option must be specified first, before any other options are given, for the Windows service installation to succeed\&. +.sp +It is generally not advisable to use this option together with the +\fB\-\-initial\fR +option, since this causes the configuration cache to be wiped and rebuilt every time the service is stopped and started\&. Care should also be taken if you intend to use any other +\fBndb_mgmd\fR +options that affect the starting of the management server, and you should make absolutely certain you fully understand and allow for any possible consequences of doing so\&. +.sp +The +\fB\-\-install\fR +option has no effect on non\-Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-remove[=\fR\fB\fIname\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-remove[=name] +T} +T{ +\fBPlatform Specific\fR +T}:T{ +Windows +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +ndb_mgmd +T} +.TE +.sp 1 +Causes an +\fBndb_mgmd\fR +process that was previously installed as a Windows service to be removed\&. Optionally, you can specify a name for the service to be uninstalled; if not set, the service name defaults to +ndb_mgmd\&. +.sp +The +\fB\-\-remove\fR +option has no effect on non\-Windows platforms\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_move_data.1 b/man/ndb_move_data.1 new file mode 100644 index 000000000000..6c3e98b37e3d --- /dev/null +++ b/man/ndb_move_data.1 @@ -0,0 +1,446 @@ +'\" t +.\" Title: \fBndb_move_data\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_MOVE_DATA\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_move_data \- NDB data copy utility +.SH "SYNOPSIS" +.HP \w'\fBndb_move_data\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_move_data \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_move_data\fR +copies data from one NDB table to another\&. +Usage.PP +The program is invoked with the names of the source and target tables; either or both of these may be qualified optionally with the database name\&. Both tables must use the NDB storage engine\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_move_data \fIoptions\fR \fIsource\fR \fItarget\fR +.fi +.if n \{\ +.RE +.\} +.PP +The following table includes options that are specific to +\fBndb_move_data\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_move_data\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.99.\ \& This table describes command\-line options for the ndb_move_data program +.TS +allbox tab(:); +. +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-abort\-on\-error\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-abort\-on\-error +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Dump core on permanent error (debug option)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-character\-sets\-dir\fR=\fIname\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-character\-sets\-dir=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Directory where character sets are\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-database\fR=\fIdbname\fR, +\fB\-d\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-database=dbname +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +TEST_DB +T} +.TE +.sp 1 +Name of the database in which the table is found\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-drop\-source\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-drop\-source +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Drop source table after all rows have been moved\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-error\-insert\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-error\-insert +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Insert random temporary errors (testing option)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-exclude\-missing\-columns\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-exclude\-missing\-columns +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Ignore extra columns in source or target table\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-lossy\-conversions\fR, +\fB\-l\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-lossy\-conversions +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Allow attribute data to be truncated when converted to a smaller type\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-promote\-attributes\fR, +\fB\-A\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-promote\-attributes +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Allow attribute data to be converted to a larger type\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-staging\-tries\fR=\fIx[,y[,z]]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-staging\-tries=x[,y[,z]] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +0,1000,60000 +T} +.TE +.sp 1 +Specify tries on temporary errors\&. Format is x[,y[,z]] where x=max tries (0=no limit), y=min delay (ms), z=max delay (ms)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-verbose\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-verbose +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Enable verbose messages\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_perror.1 b/man/ndb_perror.1 new file mode 100644 index 000000000000..c27dc7806646 --- /dev/null +++ b/man/ndb_perror.1 @@ -0,0 +1,369 @@ +'\" t +.\" Title: \fBndb_perror\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_PERROR\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_perror \- Obtain NDB error message information +.SH "SYNOPSIS" +.HP \w'\fBndb_perror\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_perror \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_perror\fR +shows information about an NDB error, given its error code\&. This includes the error message, the type of error, and whether the error is permanent or temporary\&. Added to the MySQL NDB Cluster distribution in NDB 7\&.6\&.4, it is intended as a drop\-in replacement for +\fBperror\fR +\fB\-\-ndb\fR\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_perror [\fIoptions\fR] \fIerror_code\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fBndb_perror\fR +does not need to access a running NDB Cluster, or any nodes (including SQL nodes)\&. To view information about a given NDB error, invoke the program, using the error code as an argument, like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_perror 323\fR +NDB error code 323: Invalid nodegroup id, nodegroup already existing: Permanent error: Application error +.fi +.if n \{\ +.RE +.\} +.PP +To display only the error message, invoke +\fBndb_perror\fR +with the +\fB\-\-silent\fR +option (short form +\fB\-s\fR), as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_perror \-s 323\fR +Invalid nodegroup id, nodegroup already existing: Permanent error: Application error +.fi +.if n \{\ +.RE +.\} +.PP +Like +\fBperror\fR, +\fBndb_perror\fR +accepts multiple error codes: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_perror 321 1001\fR +NDB error code 321: Invalid nodegroup id: Permanent error: Application error +NDB error code 1001: Illegal connect string +.fi +.if n \{\ +.RE +.\} +.PP +Additional program options for +\fBndb_perror\fR +are described later in this section\&. +.PP +\fBndb_perror\fR +replaces +\fBperror\fR +\fB\-\-ndb\fR, which is deprecated as of NDB 7\&.6\&.4 and subject to removal in a future release of MySQL NDB Cluster\&. To make substitution easier in scripts and other applications that might depend on +\fBperror\fR +for obtaining NDB error information, +\fBndb_perror\fR +supports its own +\(lqdummy\(rq +\fB\-\-ndb\fR +option, which does nothing\&. +.PP +The following table includes all options that are specific to the NDB Cluster program +\fBndb_perror\fR\&. Additional descriptions follow the table\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.100.\ \& This table describes command\-line options for the ndb_perror program +.TS +allbox tab(:); +. +.TE +.sp 1 +Additional Options +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-help\fR, +\fB\-?\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.4 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-help +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Display program help text and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-ndb\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.4 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ndb +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +For compatibility with applications depending on old versions of +\fBperror\fR +that use that program\*(Aqs +\fB\-\-ndb\fR +option\&. The option when used with +\fBndb_perror\fR +does nothing, and is ignored by it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-silent\fR, +\fB\-s\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.4 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-silent +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Show error message only\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-version\fR, +\fB\-V\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.4 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-version +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Print program version information and exit\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-verbose\fR, +\fB\-v\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.4 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-verbose +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Verbose output; disable with +\fB\-\-silent\fR\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_print_backup_file.1 b/man/ndb_print_backup_file.1 new file mode 100644 index 000000000000..e0a05805de2d --- /dev/null +++ b/man/ndb_print_backup_file.1 @@ -0,0 +1,88 @@ +'\" t +.\" Title: \fBndb_print_backup_file\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_PRINT_BACKUP_" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_print_backup_file \- print NDB backup file contents +.SH "SYNOPSIS" +.HP \w'\fBndb_print_backup_file\ \fR\fB\fIfile_name\fR\fR\ 'u +\fBndb_print_backup_file \fR\fB\fIfile_name\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_print_backup_file\fR +obtains diagnostic information from a cluster backup file\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_print_backup_file \fIfile_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fIfile_name\fR +is the name of a cluster backup file\&. This can be any of the files (\&.Data, +\&.ctl, or +\&.log +file) found in a cluster backup directory\&. These files are found in the data node\*(Aqs backup directory under the subdirectory +BACKUP\-\fI#\fR, where +\fI#\fR +is the sequence number for the backup\&. For more information about cluster backup files and their contents, see +Section\ \&21.5.3.1, \(lqNDB Cluster Backup Concepts\(rq\&. +.PP +Like +\fBndb_print_schema_file\fR +and +\fBndb_print_sys_file\fR +(and unlike most of the other +NDB +utilities that are intended to be run on a management server host or to connect to a management server) +\fBndb_print_backup_file\fR +must be run on a cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. +Additional Options.PP +None\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_print_file.1 b/man/ndb_print_file.1 new file mode 100644 index 000000000000..dcba90f81764 --- /dev/null +++ b/man/ndb_print_file.1 @@ -0,0 +1,120 @@ +'\" t +.\" Title: \fBndb_print_file\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_PRINT_FILE\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_print_file \- print NDB Disk Data file contents +.SH "SYNOPSIS" +.HP \w'\fBndb_print_file\ [\-v]\ [\-q]\ \fR\fB\fIfile_name\fR\fR\fB+\fR\ 'u +\fBndb_print_file [\-v] [\-q] \fR\fB\fIfile_name\fR\fR\fB+\fR +.SH "DESCRIPTION" +.PP +\fBndb_print_file\fR +obtains information from an NDB Cluster Disk Data file\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_print_file [\-v] [\-q] \fIfile_name\fR+ +.fi +.if n \{\ +.RE +.\} +.PP +\fIfile_name\fR +is the name of an NDB Cluster Disk Data file\&. Multiple filenames are accepted, separated by spaces\&. +.PP +Like +\fBndb_print_schema_file\fR +and +\fBndb_print_sys_file\fR +(and unlike most of the other +NDB +utilities that are intended to be run on a management server host or to connect to a management server) +\fBndb_print_file\fR +must be run on an NDB Cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. +Additional Options.PP +\fBndb_print_file\fR +supports the following options: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-v\fR: Make output verbose\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-q\fR: Suppress output (quiet mode)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-help\fR, +\fB\-h\fR, +\fB\-?\fR: Print help message\&. +.RE +.PP +For more information, see +Section\ \&21.5.13, \(lqNDB Cluster Disk Data Tables\(rq\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_print_frag_file.1 b/man/ndb_print_frag_file.1 new file mode 100644 index 000000000000..57ebd4470fed --- /dev/null +++ b/man/ndb_print_frag_file.1 @@ -0,0 +1,138 @@ +'\" t +.\" Title: \fBndb_print_frag_file\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_PRINT_FRAG_FI" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_print_frag_file \- print NDB Fragment List File contents +.SH "SYNOPSIS" +.HP \w'\fBndb_print_frag_file\ \fR\fB\fIfile_name\fR\fR\ 'u +\fBndb_print_frag_file \fR\fB\fIfile_name\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_print_frag_file\fR +obtains information from a cluster fragment list file\&. It is intended for use in helping to diagnose issues with data node restarts\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_print_frag_file \fIfile_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fIfile_name\fR +is the name of a cluster fragment list file, which matches the pattern +S\fIX\fR\&.FragList, where +\fIX\fR +is a digit in the range 2\-9 inclusive, and are found in the data node file system of the data node having the node ID +\fInodeid\fR, in directories named +ndb_\fInodeid\fR_fs/D\fIN\fR/DBDIH/, where +\fIN\fR +is +1 +or +2\&. Each fragment file contains records of the fragments belonging to each +NDB +table\&. For more information about cluster fragment files, see +\m[blue]\fBNDB Cluster Data Node File System Directory Files\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +Like +\fBndb_print_backup_file\fR, +\fBndb_print_sys_file\fR, and +\fBndb_print_schema_file\fR +(and unlike most of the other +NDB +utilities that are intended to be run on a management server host or to connect to a management server), +\fBndb_print_frag_file\fR +must be run on a cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. +Additional Options.PP +None\&. +Sample Output +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_print_frag_file /usr/local/mysqld/data/ndb_3_fs/D1/DBDIH/S2\&.FragList\fR +Filename: /usr/local/mysqld/data/ndb_3_fs/D1/DBDIH/S2\&.FragList with size 8192 +noOfPages = 1 noOfWords = 182 +Table Data +\-\-\-\-\-\-\-\-\-\- +Num Frags: 2 NoOfReplicas: 2 hashpointer: 4294967040 +kvalue: 6 mask: 0x00000000 method: HashMap +Storage is on Logged and checkpointed, survives SR +\-\-\-\-\-\- Fragment with FragId: 0 \-\-\-\-\-\-\-\- +Preferred Primary: 2 numStoredReplicas: 2 numOldStoredReplicas: 0 distKey: 0 LogPartId: 0 +\-\-\-\-\-\-\-Stored Replica\-\-\-\-\-\-\-\-\-\- +Replica node is: 2 initialGci: 2 numCrashedReplicas = 0 nextLcpNo = 1 +LcpNo[0]: maxGciCompleted: 1 maxGciStarted: 2 lcpId: 1 lcpStatus: valid +LcpNo[1]: maxGciCompleted: 0 maxGciStarted: 0 lcpId: 0 lcpStatus: invalid +\-\-\-\-\-\-\-Stored Replica\-\-\-\-\-\-\-\-\-\- +Replica node is: 3 initialGci: 2 numCrashedReplicas = 0 nextLcpNo = 1 +LcpNo[0]: maxGciCompleted: 1 maxGciStarted: 2 lcpId: 1 lcpStatus: valid +LcpNo[1]: maxGciCompleted: 0 maxGciStarted: 0 lcpId: 0 lcpStatus: invalid +\-\-\-\-\-\- Fragment with FragId: 1 \-\-\-\-\-\-\-\- +Preferred Primary: 3 numStoredReplicas: 2 numOldStoredReplicas: 0 distKey: 0 LogPartId: 1 +\-\-\-\-\-\-\-Stored Replica\-\-\-\-\-\-\-\-\-\- +Replica node is: 3 initialGci: 2 numCrashedReplicas = 0 nextLcpNo = 1 +LcpNo[0]: maxGciCompleted: 1 maxGciStarted: 2 lcpId: 1 lcpStatus: valid +LcpNo[1]: maxGciCompleted: 0 maxGciStarted: 0 lcpId: 0 lcpStatus: invalid +\-\-\-\-\-\-\-Stored Replica\-\-\-\-\-\-\-\-\-\- +Replica node is: 2 initialGci: 2 numCrashedReplicas = 0 nextLcpNo = 1 +LcpNo[0]: maxGciCompleted: 1 maxGciStarted: 2 lcpId: 1 lcpStatus: valid +LcpNo[1]: maxGciCompleted: 0 maxGciStarted: 0 lcpId: 0 lcpStatus: invalid +.fi +.if n \{\ +.RE +.\} +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +NDB Cluster Data Node File System Directory Files +.RS 4 +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-internals-ndbd-filesystemdir-files.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_print_schema_file.1 b/man/ndb_print_schema_file.1 new file mode 100644 index 000000000000..965ade2890da --- /dev/null +++ b/man/ndb_print_schema_file.1 @@ -0,0 +1,88 @@ +'\" t +.\" Title: \fBndb_print_schema_file\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_PRINT_SCHEMA_" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_print_schema_file \- print NDB schema file contents +.SH "SYNOPSIS" +.HP \w'\fBndb_print_schema_file\ \fR\fB\fIfile_name\fR\fR\ 'u +\fBndb_print_schema_file \fR\fB\fIfile_name\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_print_schema_file\fR +obtains diagnostic information from a cluster schema file\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_print_schema_file \fIfile_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fIfile_name\fR +is the name of a cluster schema file\&. For more information about cluster schema files, see +\m[blue]\fBNDB Cluster Data Node File System Directory Files\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +Like +\fBndb_print_backup_file\fR +and +\fBndb_print_sys_file\fR +(and unlike most of the other +NDB +utilities that are intended to be run on a management server host or to connect to a management server) +\fBndb_print_schema_file\fR +must be run on a cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. +Additional Options.PP +None\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +NDB Cluster Data Node File System Directory Files +.RS 4 +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-internals-ndbd-filesystemdir-files.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_print_sys_file.1 b/man/ndb_print_sys_file.1 new file mode 100644 index 000000000000..a73143839d3b --- /dev/null +++ b/man/ndb_print_sys_file.1 @@ -0,0 +1,91 @@ +'\" t +.\" Title: \fBndb_print_sys_file\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_PRINT_SYS_FIL" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_print_sys_file \- print NDB system file contents +.SH "SYNOPSIS" +.HP \w'\fBndb_print_sys_file\ \fR\fB\fIfile_name\fR\fR\ 'u +\fBndb_print_sys_file \fR\fB\fIfile_name\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_print_sys_file\fR +obtains diagnostic information from an NDB Cluster system file\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_print_sys_file \fIfile_name\fR +.fi +.if n \{\ +.RE +.\} +.PP +\fIfile_name\fR +is the name of a cluster system file (sysfile)\&. Cluster system files are located in a data node\*(Aqs data directory (DataDir); the path under this directory to system files matches the pattern +ndb_\fI#\fR_fs/D\fI#\fR/DBDIH/P\fI#\fR\&.sysfile\&. In each case, the +\fI#\fR +represents a number (not necessarily the same number)\&. For more information, see +\m[blue]\fBNDB Cluster Data Node File System Directory Files\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +Like +\fBndb_print_backup_file\fR +and +\fBndb_print_schema_file\fR +(and unlike most of the other +NDB +utilities that are intended to be run on a management server host or to connect to a management server) +\fBndb_print_backup_file\fR +must be run on a cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. +Additional Options.PP +None\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +NDB Cluster Data Node File System Directory Files +.RS 4 +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-internals-ndbd-filesystemdir-files.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_redo_log_reader.1 b/man/ndb_redo_log_reader.1 new file mode 100644 index 000000000000..ad078378fadd --- /dev/null +++ b/man/ndb_redo_log_reader.1 @@ -0,0 +1,594 @@ +'\" t +.\" Title: \fBndb_redo_log_reader\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_REDO_LOG_READ" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_redo_log_reader \- check and print content of cluster redo log +.SH "SYNOPSIS" +.HP \w'\fBndb_redo_log_reader\ \fR\fB\fIfile_name\fR\fR\fB\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBndb_redo_log_reader \fR\fB\fIfile_name\fR\fR\fB [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +Reads a redo log file, checking it for errors, printing its contents in a human\-readable format, or both\&. +\fBndb_redo_log_reader\fR +is intended for use primarily by NDB Cluster developers and Support personnel in debugging and diagnosing problems\&. +.PP +This utility remains under development, and its syntax and behavior are subject to change in future NDB Cluster releases\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +Prior to NDB 7\&.2, this utility was named +\fBndbd_redo_log_reader\fR\&. +.sp .5v +.RE +.PP +The C++ source files for +\fBndb_redo_log_reader\fR +can be found in the directory +/storage/ndb/src/kernel/blocks/dblqh/redoLogReader\&. +.PP +The following table includes options that are specific to the NDB Cluster program +\fBndb_redo_log_reader\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_redo_log_reader\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.101.\ \& This table describes command\-line options for the ndb_redo_log_reader program +.TS +allbox tab(:); +. +.TE +.sp 1 +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_redo_log_reader \fIfile_name\fR [\fIoptions\fR] +.fi +.if n \{\ +.RE +.\} +.PP +\fIfile_name\fR +is the name of a cluster redo log file\&. redo log files are located in the numbered directories under the data node\*(Aqs data directory (DataDir); the path under this directory to the redo log files matches the pattern +ndb_\fInodeid\fR_fs/D\fI#\fR/DBLQH/S\fI#\fR\&.FragLog\&. +\fInodeid\fR +is the data node\*(Aqs node ID\&. The two instances of +\fI#\fR +each represent a number (not necessarily the same number); the number following +D +is in the range 8\-39 inclusive; the range of the number following +S +varies according to the value of the +NoOfFragmentLogFiles +configuration parameter, whose default value is 16; thus, the default range of the number in the file name is 0\-15 inclusive\&. For more information, see +\m[blue]\fBNDB Cluster Data Node File System Directory Files\fR\m[]\&\s-2\u[1]\d\s+2\&. +.PP +The name of the file to be read may be followed by one or more of the options listed here: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-dump\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-dump +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Print dump info\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-filedescriptors +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +\fB\-filedescriptors\fR: Print file descriptors only\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-help +T} +.TE +.sp 1 +\fB\-\-help\fR: Print usage information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-lap\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-lap +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Provide lap info, with max GCI started and completed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-mbyte # +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +15 +T} +.TE +.sp 1 +\fB\-mbyte \fR\fB\fI#\fR\fR: Starting megabyte\&. +.sp +\fI#\fR +is an integer in the range 0 to 15, inclusive\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-mbyteheaders +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +\fB\-mbyteheaders\fR: Show only the first page header of every megabyte in the file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-noprint +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +\fB\-noprint\fR: Do not print the contents of the log file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-nocheck +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +\fB\-nocheck\fR: Do not check the log file for errors\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-page # +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +0 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +31 +T} +.TE +.sp 1 +\fB\-page \fR\fB\fI#\fR\fR: Start at this page\&. +.sp +\fI#\fR +is an integer in the range 0 to 31, inclusive\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-pageheaders +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +\fB\-pageheaders\fR: Show page headers only\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-pageindex # +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +12 +T} +:T{ +\fBMin Value\fR +T}:T{ +12 +T} +:T{ +\fBMax Value\fR +T}:T{ +8191 +T} +.TE +.sp 1 +\fB\-pageindex \fR\fB\fI#\fR\fR: Start at this page index\&. +.sp +\fI#\fR +is an integer between 12 and 8191, inclusive\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-twiddle\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-twiddle +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Bit\-shifted dump\&. +.RE +.PP +Like +\fBndb_print_backup_file\fR +and +\fBndb_print_schema_file\fR +(and unlike most of the +NDB +utilities that are intended to be run on a management server host or to connect to a management server) +\fBndb_redo_log_reader\fR +must be run on a cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +NDB Cluster Data Node File System Directory Files +.RS 4 +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-internals-ndbd-filesystemdir-files.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_restore.1 b/man/ndb_restore.1 new file mode 100644 index 000000000000..8c4c6041792f --- /dev/null +++ b/man/ndb_restore.1 @@ -0,0 +1,2002 @@ +'\" t +.\" Title: \fBndb_restore\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_RESTORE\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_restore \- restore an NDB Cluster backup +.SH "SYNOPSIS" +.HP \w'\fBndb_restore\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_restore \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +The cluster restoration program is implemented as a separate command\-line utility +\fBndb_restore\fR, which can normally be found in the MySQL +bin +directory\&. This program reads the files created as a result of the backup and inserts the stored information into the database\&. +.PP +\fBndb_restore\fR +must be executed once for each of the backup files that were created by the +START BACKUP +command used to create the backup (see +Section\ \&21.5.3.2, \(lqUsing The NDB Cluster Management Client to Create a Backup\(rq)\&. This is equal to the number of data nodes in the cluster at the time that the backup was created\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +Before using +\fBndb_restore\fR, it is recommended that the cluster be running in single user mode, unless you are restoring multiple data nodes in parallel\&. See +Section\ \&21.5.8, \(lqNDB Cluster Single User Mode\(rq, for more information\&. +.sp .5v +.RE +.PP +The following table includes options that are specific to the NDB Cluster native backup restoration program +\fBndb_restore\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_restore\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.102.\ \& This table describes command\-line options for the ndb_restore program +.TS +allbox tab(:); +. +.TE +.sp 1 +.PP +Normally, when restoring from an NDB Cluster backup, +\fBndb_restore\fR +requires at a minimum the +\fB\-\-nodeid\fR +(short form: +\fB\-n\fR), +\fB\-\-backupid\fR +(short form: +\fB\-b\fR), and +\fB\-\-backup_path\fR +options\&. In addition, when +\fBndb_restore\fR +is used to restore any tables containing unique indexes, you must include +\fB\-\-disable\-indexes\fR +or +\fB\-\-rebuild\-indexes\fR\&. (Bug #57782, Bug #11764893) +.PP +Typical options for this utility are shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_restore [\-c \fIconnection_string\fR] \-n \fInode_id\fR \-b \fIbackup_id\fR \e + [\-m] \-r \-\-backup_path=\fI/path/to/backup/files\fR +.fi +.if n \{\ +.RE +.\} +.PP +The +\fB\-c\fR +option is used to specify a connection string which tells +ndb_restore +where to locate the cluster management server\&. (See +Section\ \&21.3.3.3, \(lqNDB Cluster Connection Strings\(rq, for information on connection strings\&.) If this option is not used, then +\fBndb_restore\fR +attempts to connect to a management server on +localhost:1186\&. This utility acts as a cluster API node, and so requires a free connection +\(lqslot\(rq +to connect to the cluster management server\&. This means that there must be at least one +[api] +or +[mysqld] +section that can be used by it in the cluster +config\&.ini +file\&. It is a good idea to keep at least one empty +[api] +or +[mysqld] +section in +config\&.ini +that is not being used for a MySQL server or other application for this reason (see +Section\ \&21.3.3.7, \(lqDefining SQL and Other API Nodes in an NDB Cluster\(rq)\&. +.PP +You can verify that +\fBndb_restore\fR +is connected to the cluster by using the +\fBSHOW\fR +command in the +\fBndb_mgm\fR +management client\&. You can also accomplish this from a system shell, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_mgm \-e "SHOW"\fR +.fi +.if n \{\ +.RE +.\} +.PP +The +\fB\-\-nodeid\fR +or +\fB\-n\fR +is used to specify the node ID of the data node on which the backup was taken\&. +.PP +When restoring to a cluster with different number of data nodes from that where the backup was taken, this information helps identify the correct set or sets of files to be restored to a given node\&. (In such cases, multiple files usually need to be restored to a single data node\&.) The next few paragraphs provide an example\&. +.PP +\fBRestore to a different number of data nodes\fR. You can restore to a cluster having fewer data nodes than the original provided that the larger number of nodes is an even multiple of the smaller number\&. In the following example, we use a backup taken on a cluster having four data nodes to a cluster having two data nodes\&. +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +The management server for the original cluster is on host +host10\&. The original cluster has four data nodes, with the node IDs and host names shown in the following extract from the management server\*(Aqs +config\&.ini +file: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[ndbd] +NodeId=2 +HostName=host2 +[ndbd] +NodeId=4 +HostName=host4 +[ndbd] +NodeId=6 +HostName=host6 +[ndbd] +NodeId=8 +HostName=host8 +.fi +.if n \{\ +.RE +.\} +.sp +We assume that each data node was originally started with +\fBndbmtd\fR +\fB\-\-ndb\-connectstring=host10\fR +or the equivalent\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +Perform a backup in the normal manner\&. See +Section\ \&21.5.3.2, \(lqUsing The NDB Cluster Management Client to Create a Backup\(rq, for information about how to do this\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 3.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 3." 4.2 +.\} +The files created by the backup on each data node are listed here, where +\fIN\fR +is the node ID and +\fIB\fR +is the backup ID\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-\fIB\fR\-0\&.\fIN\fR\&.Data +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-\fIB\fR\&.\fIN\fR\&.ctl +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-\fIB\fR\&.\fIN\fR\&.log +.RE +.sp +These files are found under +BackupDataDir/BACKUP/BACKUP\-\fIB\fR, on each data node\&. For the rest of this example, we assume that the backup ID is 1\&. +.sp +Have all of these files available for later copying to the new data nodes (where they can be accessed on the data node\*(Aqs local file system by +\fBndb_restore\fR)\&. It is simplest to copy them all to a single location; we assume that this is what you have done\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 4.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 4." 4.2 +.\} +The management server for the target cluster is on host +host20, and the target has two data nodes, with the node IDs and host names shown, from the management server +config\&.ini +file on +host20: +.sp +.if n \{\ +.RS 4 +.\} +.nf +[ndbd] +NodeId=3 +hostname=host3 +[ndbd] +NodeId=5 +hostname=host5 +.fi +.if n \{\ +.RE +.\} +.sp +Each of the data node processes on +host3 +and +host5 +should be started with +\fBndbmtd\fR +\fB\-c host20\fR +\fB\-\-initial\fR +or the equivalent, so that the new (target) cluster starts with clean data node file systems\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 5.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 5." 4.2 +.\} +Copy two different sets of two backup files to each of the target data nodes\&. For this example, copy the backup files from nodes 2 and 6 from the original cluster to node 3 in the target cluster\&. These files are listed here: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\-0\&.2\&.Data +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.2\&.ctl +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.2\&.log +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\-0\&.6\&.Data +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.6\&.ctl +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.6\&.log +.RE +.sp +Then copy the backup files from nodes 4 and 8 to node 5; these files are shown in the following list: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\-0\&.4\&.Data +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.4\&.ctl +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.4\&.log +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\-0\&.8\&.Data +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.8\&.ctl +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +BACKUP\-1\&.8\&.log +.RE +.sp +For the remainder of this example, we assume that the respective backup files have been saved to the directory +/BACKUP\-1 +on each of nodes 3 and 5\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 6.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 6." 4.2 +.\} +On each of the two target data nodes, you must restore from both sets of backups\&. First, restore the backups from nodes 2 and 6 to node 3 by invoking +\fBndb_restore\fR +on +host3 +as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_restore \-c host20 \fR\fB\fB\-\-nodeid=2\fR\fR\fB \fR\fB\fB\-\-backupid=1\fR\fR\fB \fR\fB\fB\-\-restore_data\fR\fR\fB \fR\fB\fB\-\-backup_path=/BACKUP\-1\fR\fR +shell> \fBndb_restore \-c host20 \-\-nodeid=4 \-\-backupid=1 \-\-restore_data \-\-backup_path=/BACKUP\-1\fR +.fi +.if n \{\ +.RE +.\} +.sp +Then restore the backups from nodes 4 and 8 to node 5 by invoking +\fBndb_restore\fR +on +host5, like this: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_restore \-c host20 \-\-nodeid=6 \-\-backupid=1 \-\-restore_data \-\-backup_path=/BACKUP\-1\fR +shell> \fBndb_restore \-c host20 \-\-nodeid=8 \-\-backupid=1 \-\-restore_data \-\-backup_path=/BACKUP\-1\fR +.fi +.if n \{\ +.RE +.\} +.RE +.PP +It is possible to restore data without restoring table metadata\&. The default behavior when doing this is for +\fBndb_restore\fR +to fail with an error if table data do not match the table schema; this can be overridden using the +\fB\-\-skip\-table\-check\fR +or +\fB\-s\fR +option\&. +.PP +Some of the restrictions on mismatches in column definitions when restoring data using +\fBndb_restore\fR +are relaxed; when one of these types of mismatches is encountered, +\fBndb_restore\fR +does not stop with an error as it did previously, but rather accepts the data and inserts it into the target table while issuing a warning to the user that this is being done\&. This behavior occurs whether or not either of the options +\fB\-\-skip\-table\-check\fR +or +\fB\-\-promote\-attributes\fR +is in use\&. These differences in column definitions are of the following types: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Different +COLUMN_FORMAT +settings (FIXED, +DYNAMIC, +DEFAULT) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Different +STORAGE +settings (MEMORY, +DISK) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Different default values +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Different distribution key settings +.RE +.PP +\fBndb_restore\fR +supports limited +\fIattribute promotion\fR +in much the same way that it is supported by MySQL replication; that is, data backed up from a column of a given type can generally be restored to a column using a +\(lqlarger, similar\(rq +type\&. For example, data from a +CHAR(20) +column can be restored to a column declared as +VARCHAR(20), +VARCHAR(30), or +CHAR(30); data from a +MEDIUMINT +column can be restored to a column of type +INT +or +BIGINT\&. See +Section\ \&16.4.1.10.2, \(lqReplication of Columns Having Different Data Types\(rq, for a table of type conversions currently supported by attribute promotion\&. +.PP +Attribute promotion by +\fBndb_restore\fR +must be enabled explicitly, as follows: +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +Prepare the table to which the backup is to be restored\&. +\fBndb_restore\fR +cannot be used to re\-create the table with a different definition from the original; this means that you must either create the table manually, or alter the columns which you wish to promote using +ALTER TABLE +after restoring the table metadata but before restoring the data\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +Invoke +\fBndb_restore\fR +with the +\fB\-\-promote\-attributes\fR +option (short form +\fB\-A\fR) when restoring the table data\&. Attribute promotion does not occur if this option is not used; instead, the restore operation fails with an error\&. +.RE +.PP +When converting between character data types and +TEXT +or +BLOB, only conversions between character types (CHAR +and +VARCHAR) and binary types (BINARY +and +VARBINARY) can be performed at the same time\&. For example, you cannot promote an +INT +column to +BIGINT +while promoting a +VARCHAR +column to +TEXT +in the same invocation of +\fBndb_restore\fR\&. +.PP +Converting between +TEXT +columns using different character sets is not supported, and is expressly disallowed\&. +.PP +When performing conversions of character or binary types to +TEXT +or +BLOB +with +\fBndb_restore\fR, you may notice that it creates and uses one or more staging tables named +\fItable_name\fR$ST\fInode_id\fR\&. These tables are not needed afterwards, and are normally deleted by +\fBndb_restore\fR +following a successful restoration\&. +.PP +\fB\-\-lossy\-conversions\fR, +\fB\-L\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-lossy\-conversions +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +.PP +This option is intended to complement the +\fB\-\-promote\-attributes\fR +option\&. Using +\fB\-\-lossy\-conversions\fR +allows lossy conversions of column values (type demotions or changes in sign) when restoring data from backup\&. With some exceptions, the rules governing demotion are the same as for MySQL replication; see +Section\ \&16.4.1.10.2, \(lqReplication of Columns Having Different Data Types\(rq, for information about specific type conversions currently supported by attribute demotion\&. +.PP +\fBndb_restore\fR +reports any truncation of data that it performs during lossy conversions once per attribute and column\&. +.PP +The +\fB\-\-preserve\-trailing\-spaces\fR +option (short form +\fB\-R\fR) causes trailing spaces to be preserved when promoting a fixed\-width character data type to its variable\-width equivalent\(emthat is, when promoting a +CHAR +column value to +VARCHAR +or a +BINARY +column value to +VARBINARY\&. Otherwise, any trailing spaces are dropped from such column values when they are inserted into the new columns\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +Although you can promote +CHAR +columns to +VARCHAR +and +BINARY +columns to +VARBINARY, you cannot promote +VARCHAR +columns to +CHAR +or +VARBINARY +columns to +BINARY\&. +.sp .5v +.RE +.PP +The +\fB\-b\fR +option is used to specify the ID or sequence number of the backup, and is the same number shown by the management client in the +Backup \fIbackup_id\fR completed +message displayed upon completion of a backup\&. (See +Section\ \&21.5.3.2, \(lqUsing The NDB Cluster Management Client to Create a Backup\(rq\&.) +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +.PP +When restoring cluster backups, you must be sure to restore all data nodes from backups having the same backup ID\&. Using files from different backups will at best result in restoring the cluster to an inconsistent state, and may fail altogether\&. +.sp .5v +.RE +.PP +\fB\-\-restore_epoch\fR +(short form: +\fB\-e\fR) adds (or restores) epoch information to the cluster replication status table\&. This is useful for starting replication on an NDB Cluster replication slave\&. When this option is used, the row in the +mysql\&.ndb_apply_status +having +0 +in the +id +column is updated if it already exists; such a row is inserted if it does not already exist\&. (See +Section\ \&21.6.9, \(lqNDB Cluster Backups With NDB Cluster Replication\(rq\&.) +.PP +\fB\-\-restore_data\fR +.PP +This option causes +\fBndb_restore\fR +to output +NDB +table data and logs\&. +.PP +\fB\-\-restore_meta\fR +.PP +This option causes +\fBndb_restore\fR +to print +NDB +table metadata\&. +.PP +The first time you run the +\fBndb_restore\fR +restoration program, you also need to restore the metadata\&. In other words, you must re\-create the database tables\(emthis can be done by running it with the +\fB\-\-restore_meta\fR +(\fB\-m\fR) option\&. Restoring the metadata need be done only on a single data node; this is sufficient to restore it to the entire cluster\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +The cluster should have an empty database when starting to restore a backup\&. (In other words, you should start +\fBndbd\fR +with +\fB\-\-initial\fR +prior to performing the restore\&.) +.sp .5v +.RE +.PP +\fB\-\-restore\-privilege\-tables\fR +.PP +\fBndb_restore\fR +does not by default restore distributed MySQL privilege tables\&. This option causes +\fBndb_restore\fR +to restore the privilege tables\&. +.PP +This works only if the privilege tables were converted to +NDB +before the backup was taken\&. For more information, see +Section\ \&21.5.15, \(lqDistributed MySQL Privileges for NDB Cluster\(rq\&. +.PP +\fB\-\-backup_path\fR +.PP +The path to the backup directory is required; this is supplied to +\fBndb_restore\fR +using the +\fB\-\-backup_path\fR +option, and must include the subdirectory corresponding to the ID backup of the backup to be restored\&. For example, if the data node\*(Aqs +DataDir +is +/var/lib/mysql\-cluster, then the backup directory is +/var/lib/mysql\-cluster/BACKUP, and the backup files for the backup with the ID 3 can be found in +/var/lib/mysql\-cluster/BACKUP/BACKUP\-3\&. The path may be absolute or relative to the directory in which the +\fBndb_restore\fR +executable is located, and may be optionally prefixed with +\fBbackup_path=\fR\&. +.PP +It is possible to restore a backup to a database with a different configuration than it was created from\&. For example, suppose that a backup with backup ID +12, created in a cluster with two database nodes having the node IDs +2 +and +3, is to be restored to a cluster with four nodes\&. Then +\fBndb_restore\fR +must be run twice\(emonce for each database node in the cluster where the backup was taken\&. However, +\fBndb_restore\fR +cannot always restore backups made from a cluster running one version of MySQL to a cluster running a different MySQL version\&. See +Section\ \&21.2.8, \(lqUpgrading and Downgrading NDB Cluster\(rq, for more information\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +.PP +It is not possible to restore a backup made from a newer version of NDB Cluster using an older version of +\fBndb_restore\fR\&. You can restore a backup made from a newer version of MySQL to an older cluster, but you must use a copy of +\fBndb_restore\fR +from the newer NDB Cluster version to do so\&. +.PP +For example, to restore a cluster backup taken from a cluster running NDB Cluster 7\&.5\&.8 to a cluster running NDB Cluster 7\&.4\&.17, you must use the +\fBndb_restore\fR +that comes with the NDB Cluster 7\&.5\&.8 distribution\&. +.sp .5v +.RE +.PP +For more rapid restoration, the data may be restored in parallel, provided that there is a sufficient number of cluster connections available\&. That is, when restoring to multiple nodes in parallel, you must have an +[api] +or +[mysqld] +section in the cluster +config\&.ini +file available for each concurrent +\fBndb_restore\fR +process\&. However, the data files must always be applied before the logs\&. +.PP +\fB\-\-no\-upgrade\fR +.PP +When using +\fBndb_restore\fR +to restore a backup, +VARCHAR +columns created using the old fixed format are resized and recreated using the variable\-width format now employed\&. This behavior can be overridden using the +\fB\-\-no\-upgrade\fR +option (short form: +\fB\-u\fR) when running +\fBndb_restore\fR\&. +.PP +\fB\-\-print_data\fR +.PP +The +\fB\-\-print_data\fR +option causes +\fBndb_restore\fR +to direct its output to +stdout\&. +.PP +TEXT +and +BLOB +column values are always truncated\&. Such values are truncated to the first 256 bytes in the output\&. This cannot currently be overridden when using +\fB\-\-print_data\fR\&. +.PP +Several additional options are available for use with the +\fB\-\-print_data\fR +option in generating data dumps, either to +stdout, or to a file\&. These are similar to some of the options used with +\fBmysqldump\fR, and are shown in the following list: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-tab\fR, +\fB\-T\fR +.TS +allbox tab(:); +l l s s +l l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-tab=dir_name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +directory name +T} +.TE +.sp 1 +This option causes +\fB\-\-print_data\fR +to create dump files, one per table, each named +\fItbl_name\fR\&.txt\&. It requires as its argument the path to the directory where the files should be saved; use +\&. +for the current directory\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-fields\-enclosed\-by=\fR\fB\fIstring\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields\-enclosed\-by=char +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Each column values are enclosed by the string passed to this option (regardless of data type; see next item)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-fields\-optionally\-enclosed\-by=\fR\fB\fIstring\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields\-optionally\-enclosed\-by +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +The string passed to this option is used to enclose column values containing character data (such as +CHAR, +VARCHAR, +BINARY, +TEXT, or +ENUM)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-fields\-terminated\-by=\fR\fB\fIstring\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields\-terminated\-by=char +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +\et (tab) +T} +.TE +.sp 1 +The string passed to this option is used to separate column values\&. The default value is a tab character (\et)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-hex\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-hex +T} +.TE +.sp 1 +If this option is used, all binary values are output in hexadecimal format\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-fields\-terminated\-by=\fR\fB\fIstring\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-fields\-terminated\-by=char +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +\et (tab) +T} +.TE +.sp 1 +This option specifies the string used to end each line of output\&. The default is a linefeed character (\en)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-append\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-append +T} +.TE +.sp 1 +When used with the +\fB\-\-tab\fR +and +\fB\-\-print_data\fR +options, this causes the data to be appended to any existing files having the same names\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +If a table has no explicit primary key, then the output generated when using the +\fB\-\-print_data\fR +option includes the table\*(Aqs hidden primary key\&. +.sp .5v +.RE +.PP +\fB\-\-print_meta\fR +.PP +This option causes +\fBndb_restore\fR +to print all metadata to +stdout\&. +.PP +\fB\-\-print_log\fR +.PP +The +\fB\-\-print_log\fR +option causes +\fBndb_restore\fR +to output its log to +stdout\&. +.PP +\fB\-\-print\fR +.PP +Causes +\fBndb_restore\fR +to print all data, metadata, and logs to +stdout\&. Equivalent to using the +\fB\-\-print_data\fR, +\fB\-\-print_meta\fR, and +\fB\-\-print_log\fR +options together\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +Use of +\fB\-\-print\fR +or any of the +\fB\-\-print_*\fR +options is in effect performing a dry run\&. Including one or more of these options causes any output to be redirected to +stdout; in such cases, +\fBndb_restore\fR +makes no attempt to restore data or metadata to an NDB Cluster\&. +.sp .5v +.RE +.PP +\fB\-\-print\-sql\-log\fR +.PP +Causes +\fBndb_restore\fR +to log SQL statements to +stdout\&. Use the option to enable; normally disabled\&. This option checks before attempting to log whether all the tables being restored have explicitly defined primary keys; queries on a table having only the hidden primary key implemented by +NDB +cannot be converted to valid SQL\&. +.PP +The +\fB\-\-print\-sql\-log\fR +option was added in NDB 7\&.5\&.4\&. (Bug #13511949) +.PP +\fB\-\-dont_ignore_systab_0\fR +.PP +Normally, when restoring table data and metadata, +\fBndb_restore\fR +ignores the copy of the +NDB +system table that is present in the backup\&. +\fB\-\-dont_ignore_systab_0\fR +causes the system table to be restored\&. +\fIThis option is intended for experimental and development use only, and is not recommended in a production environment\fR\&. +.PP +\fB\-\-ndb\-nodegroup\-map\fR, +\fB\-z\fR +.PP +This option can be used to restore a backup taken from one node group to a different node group\&. Its argument is a list of the form +\fIsource_node_group\fR, \fItarget_node_group\fR\&. +.PP +\fB\-\-no\-binlog\fR +.PP +This option prevents any connected SQL nodes from writing data restored by +\fBndb_restore\fR +to their binary logs\&. +.PP +\fB\-\-no\-restore\-disk\-objects\fR, +\fB\-d\fR +.PP +This option stops +\fBndb_restore\fR +from restoring any NDB Cluster Disk Data objects, such as tablespaces and log file groups; see +Section\ \&21.5.13, \(lqNDB Cluster Disk Data Tables\(rq, for more information about these\&. +.PP +\fB\-\-parallelism=#\fR, +\fB\-p\fR +.PP +\fBndb_restore\fR +uses single\-row transactions to apply many rows concurrently\&. This parameter determines the number of parallel transactions (concurrent rows) that an instance of +\fBndb_restore\fR +tries to use\&. By default, this is 128; the minimum is 1, and the maximum is 1024\&. +.PP +The work of performing the inserts is parallelized across the threads in the data nodes involved\&. This mechanism is employed for restoring bulk data from the +\&.Data +file\(emthat is, the fuzzy snapshot of the data; it is not used for building or rebuilding indexes\&. The change log is applied serially; index drops and builds are DDL operations and handled separately\&. There is no thread\-level parallelism on the client side of the restore\&. +.PP +\fB\-\-progress\-frequency=\fR\fB\fIN\fR\fR +.PP +Print a status report each +\fIN\fR +seconds while the backup is in progress\&. 0 (the default) causes no status reports to be printed\&. The maximum is 65535\&. +.PP +\fB\-\-verbose=#\fR +.PP +Sets the level for the verbosity of the output\&. The minimum is 0; the maximum is 255\&. The default value is 1\&. +.PP +It is possible to restore only selected databases, or selected tables from a single database, using the syntax shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_restore \fIother_options\fR \fIdb_name\fR,[\fIdb_name\fR[,\&.\&.\&.] | \fItbl_name\fR[,\fItbl_name\fR][,\&.\&.\&.]] +.fi +.if n \{\ +.RE +.\} +.PP +In other words, you can specify either of the following to be restored: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +All tables from one or more databases +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +One or more tables from a single database +.RE +.PP +\fB\-\-include\-databases=\fR\fB\fIdb_name\fR\fR\fB[,\fR\fB\fIdb_name\fR\fR\fB][,\&.\&.\&.]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-include\-databases=db\-list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +.PP +\fB\-\-include\-tables=\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB[,\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB][,\&.\&.\&.]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-include\-tables=table\-list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +.PP +Use the +\fB\-\-include\-databases\fR +option or the +\fB\-\-include\-tables\fR +option for restoring only specific databases or tables, respectively\&. +\fB\-\-include\-databases\fR +takes a comma\-delimited list of databases to be restored\&. +\fB\-\-include\-tables\fR +takes a comma\-delimited list of tables (in +\fIdatabase\fR\&.\fItable\fR +format) to be restored\&. +.PP +When +\fB\-\-include\-databases\fR +or +\fB\-\-include\-tables\fR +is used, only those databases or tables named by the option are restored; all other databases and tables are excluded by +\fBndb_restore\fR, and are not restored\&. +.PP +The following table shows several invocations of +\fBndb_restore\fR +using +\fB\-\-include\-*\fR +options (other options possibly required have been omitted for clarity), and the effects these have on restoring from an NDB Cluster backup: +.TS +allbox tab(:); +lB lB. +T{ +Option Used +T}:T{ +Result +T} +.T& +l l +l l +l l +l l. +T{ +\fB\-\-include\-databases=db1\fR +T}:T{ +Only tables in database db1 are restored; all tables + in all other databases are ignored +T} +T{ +\fB\-\-include\-databases=db1,db2\fR (or + \fB\-\-include\-databases=db1\fR + \fB\-\-include\-databases=db2\fR) +T}:T{ +Only tables in databases db1 and + db2 are restored; all tables in all + other databases are ignored +T} +T{ +\fB\-\-include\-tables=db1\&.t1\fR +T}:T{ +Only table t1 in database db1 is + restored; no other tables in db1 or + in any other database are restored +T} +T{ +\fB\-\-include\-tables=db1\&.t2,db2\&.t1\fR (or + \fB\-\-include\-tables=db1\&.t2\fR + \fB\-\-include\-tables=db2\&.t1\fR) +T}:T{ +Only the table t2 in database db1 + and the table t1 in database + db2 are restored; no other tables in + db1, db2, or any + other database are restored +T} +.TE +.sp 1 +.PP +You can also use these two options together\&. For example, the following causes all tables in databases +db1 +and +db2, together with the tables +t1 +and +t2 +in database +db3, to be restored (and no other databases or tables): +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_restore [\&.\&.\&.] \-\-include\-databases=db1,db2 \-\-include\-tables=db3\&.t1,db3\&.t2\fR +.fi +.if n \{\ +.RE +.\} +.PP +(Again we have omitted other, possibly required, options in the example just shown\&.) +.PP +\fB\-\-exclude\-databases=\fR\fB\fIdb_name\fR\fR\fB[,\fR\fB\fIdb_name\fR\fR\fB][,\&.\&.\&.]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-exclude\-databases=db\-list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +.PP +\fB\-\-exclude\-tables=\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB[,\fR\fB\fIdb_name\&.tbl_name\fR\fR\fB][,\&.\&.\&.]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-exclude\-tables=table\-list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +.PP +It is possible to prevent one or more databases or tables from being restored using the +\fBndb_restore\fR +options +\fB\-\-exclude\-databases\fR +and +\fB\-\-exclude\-tables\fR\&. +\fB\-\-exclude\-databases\fR +takes a comma\-delimited list of one or more databases which should not be restored\&. +\fB\-\-exclude\-tables\fR +takes a comma\-delimited list of one or more tables (using +\fIdatabase\fR\&.\fItable\fR +format) which should not be restored\&. +.PP +When +\fB\-\-exclude\-databases\fR +or +\fB\-\-exclude\-tables\fR +is used, only those databases or tables named by the option are excluded; all other databases and tables are restored by +\fBndb_restore\fR\&. +.PP +This table shows several invocations of +\fBndb_restore\fR +usng +\fB\-\-exclude\-*\fR +options (other options possibly required have been omitted for clarity), and the effects these options have on restoring from an NDB Cluster backup: +.TS +allbox tab(:); +lB lB. +T{ +Option Used +T}:T{ +Result +T} +.T& +l l +l l +l l +l l. +T{ +\fB\-\-exclude\-databases=db1\fR +T}:T{ +All tables in all databases except db1 are restored; + no tables in db1 are restored +T} +T{ +\fB\-\-exclude\-databases=db1,db2\fR (or + \fB\-\-exclude\-databases=db1\fR + \fB\-\-exclude\-databases=db2\fR) +T}:T{ +All tables in all databases except db1 and + db2 are restored; no tables in + db1 or db2 are + restored +T} +T{ +\fB\-\-exclude\-tables=db1\&.t1\fR +T}:T{ +All tables except t1 in database + db1 are restored; all other tables in + db1 are restored; all tables in all + other databases are restored +T} +T{ +\fB\-\-exclude\-tables=db1\&.t2,db2\&.t1\fR (or + \fB\-\-exclude\-tables=db1\&.t2\fR + \fB\-\-exclude\-tables=db2\&.t1)\fR +T}:T{ +All tables in database db1 except for + t2 and all tables in database + db2 except for table + t1 are restored; no other tables in + db1 or db2 are + restored; all tables in all other databases are restored +T} +.TE +.sp 1 +.PP +You can use these two options together\&. For example, the following causes all tables in all databases +\fIexcept for\fR +databases +db1 +and +db2, and tables +t1 +and +t2 +in database +db3, to be restored: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_restore [\&.\&.\&.] \-\-exclude\-databases=db1,db2 \-\-exclude\-tables=db3\&.t1,db3\&.t2\fR +.fi +.if n \{\ +.RE +.\} +.PP +(Again, we have omitted other possibly necessary options in the interest of clarity and brevity from the example just shown\&.) +.PP +You can use +\fB\-\-include\-*\fR +and +\fB\-\-exclude\-*\fR +options together, subject to the following rules: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The actions of all +\fB\-\-include\-*\fR +and +\fB\-\-exclude\-*\fR +options are cumulative\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +All +\fB\-\-include\-*\fR +and +\fB\-\-exclude\-*\fR +options are evaluated in the order passed to ndb_restore, from right to left\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +In the event of conflicting options, the first (rightmost) option takes precedence\&. In other words, the first option (going from right to left) that matches against a given database or table +\(lqwins\(rq\&. +.RE +.PP +For example, the following set of options causes +\fBndb_restore\fR +to restore all tables from database +db1 +except +db1\&.t1, while restoring no other tables from any other databases: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-\-include\-databases=db1 \-\-exclude\-tables=db1\&.t1 +.fi +.if n \{\ +.RE +.\} +.PP +However, reversing the order of the options just given simply causes all tables from database +db1 +to be restored (including +db1\&.t1, but no tables from any other database), because the +\fB\-\-include\-databases\fR +option, being farthest to the right, is the first match against database +db1 +and thus takes precedence over any other option that matches +db1 +or any tables in +db1: +.sp +.if n \{\ +.RS 4 +.\} +.nf +\-\-exclude\-tables=db1\&.t1 \-\-include\-databases=db1 +.fi +.if n \{\ +.RE +.\} +.PP +\fB\-\-exclude\-missing\-columns\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-exclude\-missing\-columns +T} +.TE +.sp 1 +.PP +It is also possible to restore only selected table columns using the +\fB\-\-exclude\-missing\-columns\fR +option\&. When this option is used, +\fBndb_restore\fR +ignores any columns missing from tables being restored as compared to the versions of those tables found in the backup\&. This option applies to all tables being restored\&. If you wish to apply this option only to selected tables or databases, you can use it in combination with one or more of the options described in the previous paragraph to do so, then restore data to the remaining tables using a complementary set of these options\&. +.PP +\fB\-\-exclude\-missing\-tables\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-exclude\-missing\-tables +T} +.TE +.sp 1 +.PP +It is also possible to restore only selected tables columns using this option, which causes +\fBndb_restore\fR +to ignore any tables from the backup that are not found in the target database\&. +.PP +\fB\-\-disable\-indexes\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-disable\-indexes +T} +.TE +.sp 1 +.PP +Disable restoration of indexes during restoration of the data from a native NDB backup\&. Afterwards, you can restore indexes for all tables at once with multi\-threaded building of indexes using +\fB\-\-rebuild\-indexes\fR, which should be faster than rebuilding indexes concurrently for very large tables\&. +.PP +\fB\-\-rebuild\-indexes\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-rebuild\-indexes +T} +.TE +.sp 1 +.PP +You can use this option with +\fBndb_restore\fR +to cause multi\-threaded rebuilding of the ordered indexes while restoring a native +NDB +backup\&. The number of threads used for building ordered indexes by +\fBndb_restore\fR +with this option is controlled by the +BuildIndexThreads +data node configuration parameter and the number of LDMs\&. +.PP +It is necessary to use this option only for the first run of +\fBndb_restore\fR; this causes all ordered indexes to be rebuilt without using +\fB\-\-rebuild\-indexes\fR +again when restoring subsequent nodes\&. You should use this option prior to inserting new rows into the database; otherwise, it is possible for a row to be inserted that later causes a unique constraint violation when trying to rebuild the indexes\&. +.PP +Building of ordered indices is parallelized with the number of LDMs by default\&. Offline index builds performed during node and system restarts can be made faster using the +BuildIndexThreads +data node configuration parameter; this parameter has no effect on dropping and rebuilding of indexes by +\fBndb_restore\fR, which is performed online\&. +.PP +Rebuilding of unique indexes uses disk write bandwidth for redo logging and local checkpointing\&. An insufficient amount of this bandwith can lead to redo buffer overload or log overload errors\&. In such cases you can run +\fBndb_restore\fR +\fB\-\-rebuild\-indexes\fR +again; the process resumes at the point where the error occurred\&. You can also do this when you have encountered temporary errors\&. You can repeat execution of +\fBndb_restore\fR +\fB\-\-rebuild\-indexes\fR +indefinitely; you may be able to stop such errors by reducing the value of +\fB\-\-parallelism\fR\&. If the problem is insufficient space, you can increase the size of the redo log (FragmentLogFileSize +node configuration parameter), or you can increase the speed at which LCPs are performed (MaxDiskWriteSpeed +and related parameters), in order to free space more quickly\&. +.PP +\fB\-\-skip\-broken\-objects\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-skip\-broken\-objects +T} +.TE +.sp 1 +.PP +This option causes +\fBndb_restore\fR +to ignore corrupt tables while reading a native +NDB +backup, and to continue restoring any remaining tables (that are not also corrupted)\&. Currently, the +\fB\-\-skip\-broken\-objects\fR +option works only in the case of missing blob parts tables\&. +.PP +\fB\-\-skip\-unknown\-objects\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-skip\-unknown\-objects +T} +.TE +.sp 1 +.PP +This option causes +\fBndb_restore\fR +to ignore any schema objects it does not recognize while reading a native +NDB +backup\&. This can be used for restoring a backup made from a cluster running NDB 7\&.5 to a cluster running NDB Cluster 7\&.4\&. +.PP +\fB\-\-rewrite\-database=\fR\fB\fIold_dbname\fR\fR\fB,\fR\fB\fInew_dbname\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-rewrite\-database=olddb,newdb +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +none +T} +.TE +.sp 1 +.PP +This option makes it possible to restore to a database having a different name from that used in the backup\&. For example, if a backup is made of a database named +products, you can restore the data it contains to a database named +inventory, use this option as shown here (omitting any other options that might be required): +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> ndb_restore \-\-rewrite\-database=product,inventory +.fi +.if n \{\ +.RE +.\} +.PP +The option can be employed multiple times in a single invocation of +\fBndb_restore\fR\&. Thus it is possible to restore simultaneously from a database named +db1 +to a database named +db2 +and from a database named +db3 +to one named +db4 +using +\fB\-\-rewrite\-database=db1,db2 \-\-rewrite\-database=db3,db4\fR\&. Other +\fBndb_restore\fR +options may be used between multiple occurrences of +\fB\-\-rewrite\-database\fR\&. +.PP +In the event of conflicts between multiple +\fB\-\-rewrite\-database\fR +options, the last +\fB\-\-rewrite\-database\fR +option used, reading from left to right, is the one that takes effect\&. For example, if +\fB\-\-rewrite\-database=db1,db2 \-\-rewrite\-database=db1,db3\fR +is used, only +\fB\-\-rewrite\-database=db1,db3\fR +is honored, and +\fB\-\-rewrite\-database=db1,db2\fR +is ignored\&. It is also possible to restore from multiple databases to a single database, so that +\fB\-\-rewrite\-database=db1,db3 \-\-rewrite\-database=db2,db3\fR +restores all tables and data from databases +db1 +and +db2 +into database +db3\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +.PP +When restoring from multiple backup databases into a single target database using +\fB\-\-rewrite\-database\fR, no check is made for collisions between table or other object names, and the order in which rows are restored is not guaranteed\&. This means that it is possible in such cases for rows to be overwritten and updates to be lost\&. +.sp .5v +.RE +.PP +\fB\-\-exclude\-intermediate\-sql\-tables[=TRUE|FALSE]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-exclude\-intermediate\-sql\-tables[=TRUE|FALSE] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +.PP +When performing copying +ALTER TABLE +operations, +\fBmysqld\fR +creates intermediate tables (whose names are prefixed with +#sql\-)\&. When +TRUE, the +\fB\-\-exclude\-intermediate\-sql\-tables\fR +option keeps +\fBndb_restore\fR +from restoring such tables that may have been left over from such operations\&. This option is +TRUE +by default\&. +.PP +\fBError reporting\fR. \fBndb_restore\fR +reports both temporary and permanent errors\&. In the case of temporary errors, it may able to recover from them, and reports +Restore successful, but encountered temporary error, please look at configuration +in such cases\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +.PP +After using +\fBndb_restore\fR +to initialize an NDB Cluster for use in circular replication, binary logs on the SQL node acting as the replication slave are not automatically created, and you must cause them to be created manually\&. To cause the binary logs to be created, issue a +SHOW TABLES +statement on that SQL node before running +START SLAVE\&. This is a known issue in NDB Cluster\&. +.sp .5v +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_select_all.1 b/man/ndb_select_all.1 new file mode 100644 index 000000000000..9ae7250bac8a --- /dev/null +++ b/man/ndb_select_all.1 @@ -0,0 +1,439 @@ +'\" t +.\" Title: \fBndb_select_all\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_SELECT_ALL\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_select_all \- print rows from an NDB table +.SH "SYNOPSIS" +.HP \w'\fBndb_select_all\ \-c\ \fR\fB\fIconnection_string\fR\fR\fB\ \fR\fB\fItbl_name\fR\fR\fB\ \-d\ \fR\fB\fIdb_name\fR\fR\fB\ [>\ \fR\fB\fIfile_name\fR\fR\fB]\fR\ 'u +\fBndb_select_all \-c \fR\fB\fIconnection_string\fR\fR\fB \fR\fB\fItbl_name\fR\fR\fB \-d \fR\fB\fIdb_name\fR\fR\fB [> \fR\fB\fIfile_name\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBndb_select_all\fR +prints all rows from an +NDB +table to +stdout\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_select_all \-c \fIconnection_string\fR \fItbl_name\fR \-d \fIdb_name\fR [> \fIfile_name\fR] +.fi +.if n \{\ +.RE +.\} +.PP +The following table includes options that are specific to the NDB Cluster native backup restoration program +\fBndb_select_all\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_select_all\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.103.\ \& This table describes command\-line options for the ndb_select_all program +.TS +allbox tab(:); +. +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-database=\fR\fB\fIdbname\fR\fR, +\fB\-d\fR +\fIdbname\fR +.sp +Name of the database in which the table is found\&. The default value is +TEST_DB\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fBparallelism=\fR\fB\fI#\fR\fR, +\fB\-p\fR +\fI#\fR +.sp +Specifies the degree of parallelism\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-lock=\fR\fB\fIlock_type\fR\fR, +\fB\-l \fR\fB\fIlock_type\fR\fR +.sp +Employs a lock when reading the table\&. Possible values for +\fIlock_type\fR +are: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +0: Read lock +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +1: Read lock with hold +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +2: Exclusive read lock +.RE +.sp +There is no default value for this option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-order=\fR\fB\fIindex_name\fR\fR, +\fB\-o \fR\fB\fIindex_name\fR\fR +.sp +Orders the output according to the index named +\fIindex_name\fR\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +This is the name of an index, not of a column; the index must have been explicitly named when created\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-descending\fR, +\fB\-z\fR +.sp +Sorts the output in descending order\&. This option can be used only in conjunction with the +\fB\-o\fR +(\fB\-\-order\fR) option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-header=FALSE\fR +.sp +Excludes column headers from the output\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-useHexFormat\fR +\fB\-x\fR +.sp +Causes all numeric values to be displayed in hexadecimal format\&. This does not affect the output of numerals contained in strings or datetime values\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-delimiter=\fR\fB\fIcharacter\fR\fR, +\fB\-D \fR\fB\fIcharacter\fR\fR +.sp +Causes the +\fIcharacter\fR +to be used as a column delimiter\&. Only table data columns are separated by this delimiter\&. +.sp +The default delimiter is the tab character\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-disk\fR +.sp +Adds a disk reference column to the output\&. The column is nonempty only for Disk Data tables having nonindexed columns\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-rowid\fR +.sp +Adds a +ROWID +column providing information about the fragments in which rows are stored\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-gci\fR +.sp +Adds a +GCI +column to the output showing the global checkpoint at which each row was last updated\&. See +Section\ \&21.1, \(lqNDB Cluster Overview\(rq, and +Section\ \&21.5.6.2, \(lqNDB Cluster Log Events\(rq, for more information about checkpoints\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-gci64\fR +.sp +Adds a +ROW$GCI64 +column to the output showing the global checkpoint at which each row was last updated, as well as the number of the epoch in which this update occurred\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-tupscan\fR, +\fB\-t\fR +.sp +Scan the table in the order of the tuples\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nodata\fR +.sp +Causes any table data to be omitted\&. +.RE +Sample Output.PP +Output from a MySQL +SELECT +statement: +.sp +.if n \{\ +.RS 4 +.\} +.nf +mysql> \fBSELECT * FROM ctest1\&.fish;\fR ++\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ +| id | name | ++\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ +| 3 | shark | +| 6 | puffer | +| 2 | tuna | +| 4 | manta ray | +| 5 | grouper | +| 1 | guppy | ++\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ +6 rows in set (0\&.04 sec) +.fi +.if n \{\ +.RE +.\} +.PP +Output from the equivalent invocation of +\fBndb_select_all\fR: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_select_all \-c localhost fish \-d ctest1\fR +id name +3 [shark] +6 [puffer] +2 [tuna] +4 [manta ray] +5 [grouper] +1 [guppy] +6 rows returned +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.PP +All string values are enclosed by square brackets ([\&.\&.\&.]) in the output of +\fBndb_select_all\fR\&. For another example, consider the table created and populated as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +CREATE TABLE dogs ( + id INT(11) NOT NULL AUTO_INCREMENT, + name VARCHAR(25) NOT NULL, + breed VARCHAR(50) NOT NULL, + PRIMARY KEY pk (id), + KEY ix (name) +) +TABLESPACE ts STORAGE DISK +ENGINE=NDBCLUSTER; +INSERT INTO dogs VALUES + (\*(Aq\*(Aq, \*(AqLassie\*(Aq, \*(Aqcollie\*(Aq), + (\*(Aq\*(Aq, \*(AqScooby\-Doo\*(Aq, \*(AqGreat Dane\*(Aq), + (\*(Aq\*(Aq, \*(AqRin\-Tin\-Tin\*(Aq, \*(AqAlsatian\*(Aq), + (\*(Aq\*(Aq, \*(AqRosscoe\*(Aq, \*(AqMutt\*(Aq); +.fi +.if n \{\ +.RE +.\} +.PP +This demonstrates the use of several additional +\fBndb_select_all\fR +options: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_select_all \-d ctest1 dogs \-o ix \-z \-\-gci \-\-disk\fR +GCI id name breed DISK_REF +834461 2 [Scooby\-Doo] [Great Dane] [ m_file_no: 0 m_page: 98 m_page_idx: 0 ] +834878 4 [Rosscoe] [Mutt] [ m_file_no: 0 m_page: 98 m_page_idx: 16 ] +834463 3 [Rin\-Tin\-Tin] [Alsatian] [ m_file_no: 0 m_page: 34 m_page_idx: 0 ] +835657 1 [Lassie] [Collie] [ m_file_no: 0 m_page: 66 m_page_idx: 0 ] +4 rows returned +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_select_count.1 b/man/ndb_select_count.1 new file mode 100644 index 000000000000..75dfbe7854c5 --- /dev/null +++ b/man/ndb_select_count.1 @@ -0,0 +1,102 @@ +'\" t +.\" Title: \fBndb_select_count\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_SELECT_COUNT\" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_select_count \- print row counts for NDB tables +.SH "SYNOPSIS" +.HP \w'\fBndb_select_count\ [\-c\ \fR\fB\fIconnection_string\fR\fR\fB]\ \-d\ \fR\fB\fIdb_name\fR\fR\fB\ \fR\fB\fItbl_name\fR\fR\fB[\ \fR\fB\fItbl_name2\fR\fR\fB[\ \&.\&.\&.]]\fR\ 'u +\fBndb_select_count [\-c \fR\fB\fIconnection_string\fR\fR\fB] \-d \fR\fB\fIdb_name\fR\fR\fB \fR\fB\fItbl_name\fR\fR\fB[ \fR\fB\fItbl_name2\fR\fR\fB[ \&.\&.\&.]]\fR +.SH "DESCRIPTION" +.PP +\fBndb_select_count\fR +prints the number of rows in one or more +NDB +tables\&. With a single table, the result is equivalent to that obtained by using the MySQL statement +SELECT COUNT(*) FROM \fItbl_name\fR\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_select_count [\-c \fIconnection_string\fR] \-d\fIdb_name\fR \fItbl_name\fR[, \fItbl_name2\fR[, \&.\&.\&.]] +.fi +.if n \{\ +.RE +.\} +.PP +The following table includes options that are specific to the NDB Cluster native backup restoration program +\fBndb_select_count\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_select_count\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.104.\ \& This table describes command\-line options for the ndb_select_count program +.TS +allbox tab(:); +. +.TE +.sp 1 +.PP +You can obtain row counts from multiple tables in the same database by listing the table names separated by spaces when invoking this command, as shown under +\fBSample Output\fR\&. +Sample Output +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_select_count \-c localhost \-d ctest1 fish dogs\fR +6 records in table fish +4 records in table dogs +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_setup.py.1 b/man/ndb_setup.py.1 new file mode 100644 index 000000000000..269b58fa131f --- /dev/null +++ b/man/ndb_setup.py.1 @@ -0,0 +1,546 @@ +'\" t +.\" Title: \fBndb_setup.py\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_SETUP\&.PY\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_setup.py \- Start browser\-based Auti\-Installer for NDB Cluster +.SH "SYNOPSIS" +.HP \w'\fBndb_setup\&.py\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBndb_setup\&.py [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBndb_setup\&.py\fR +starts the NDB Cluster Auto\-Installer and opens the installer\*(Aqs Start page in the default Web browser\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +.PP +This program is intended to be invoked as a normal user, and not with the +mysql, system +root +or other administrative account\&. +.sp .5v +.RE +.PP +This section describes usage of and program options for the command\-line tool only\&. For information about using the Auto\-Installer GUI that is spawned when +\fBndb_setup\&.py\fR +is invoked, see +Section\ \&21.2.1, \(lqThe NDB Cluster Auto-Installer\(rq\&. +Usage.PP +All platforms: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_setup\&.py [\fIoptions\fR] +.fi +.if n \{\ +.RE +.\} +.PP +Additionally, on Windows platforms only: +.sp +.if n \{\ +.RS 4 +.\} +.nf +setup\&.bat [\fIoptions\fR] +.fi +.if n \{\ +.RE +.\} +.PP +The following table includes all options that are supported by the NDB Cluster installation and configuration program +\fBndb_setup\&.py\fR\&. Additional descriptions follow the table\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.105.\ \& This table describes command\-line options for the ndb_setup\&.py program +.TS +allbox tab(:); +. +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-browser\-start\-page=\fR\fB\fIfile\fR\fR, +\fB\-s\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-browser\-start\-page=filename +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +index\&.html +T} +.TE +.sp 1 +Specify the file to open in the browser as the installation and configuration Start page\&. The default is +index\&.html\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-ca\-certs\-file=\fR\fB\fIfile\fR\fR, +\fB\-a\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-ca\-certs\-file=filename +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Specify a file containing a list of client certificates which are allowed to connect to the server\&. The default is an empty string, which means that no client authentication is used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-cert\-file=\fR\fB\fIfile\fR\fR, +\fB\-c\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-cert\-file=filename +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +cfg\&.pem +T} +.TE +.sp 1 +Specify a file containing an X509 certificate which identifies the server\&. It is possible for the certificate to be self\-signed\&. The default is +cfg\&.pem\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-debug\-level=\fR\fB\fIlevel\fR\fR, +\fB\-d\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ lt l s +^ ^ l s +^ ^ l s +^ ^ l s +^ ^ l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-debug\-level=level +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +enumeration +T} +:T{ +\fBDefault\fR +T}:T{ +WARNING +T} +:T{ +\fBValid Values\fR +T}:T{ +WARNING +T} +::T{ +DEBUG +T} +::T{ +INFO +T} +::T{ +ERROR +T} +::T{ +CRITICAL +T} +.TE +.sp 1 +Set the Python logging module debug level\&. This is one of +DEBUG, +INFO, +WARNING, +ERROR, or +CRITICAL\&. +WARNING +is the default\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-help\fR, +\fB\-h\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-help +T} +.TE +.sp 1 +Print a help message\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-key\-file=\fR\fB\fIfile\fR\fR, +\fB\-d\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-key\-file=file +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +[none] +T} +.TE +.sp 1 +Specify a file containing the private key if this is not included in the X509 certificate file (\fB\-\-cert\-file\fR)\&. The default is an empty string, which means that no such file is used\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-no\-browser\fR, +\fB\-n\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-no\-browser +T} +.TE +.sp 1 +Start the installation and configuration tool, but do not open the Start page in a browser\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-port=\fR\fB\fI#\fR\fR, +\fB\-p\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-port=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +8081 +T} +:T{ +\fBMin Value\fR +T}:T{ +1 +T} +:T{ +\fBMax Value\fR +T}:T{ +65535 +T} +.TE +.sp 1 +Set the port used by the web server\&. The default is 8081\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-server\-log\-file=\fR\fB\fIfile\fR\fR, +\fB\-o\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ lt l s +^ ^ l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-server\-log\-file=file +T} +T{ +\ \& +T}:T{ +o +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +file name +T} +:T{ +\fBDefault\fR +T}:T{ +ndb_setup\&.log +T} +:T{ +\fBValid Values\fR +T}:T{ +ndb_setup\&.log +T} +::T{ +\- (Log to stderr) +T} +.TE +.sp 1 +Log requests to this file\&. The default is +ndb_setup\&.log\&. To specify logging to +stderr, rather than to a file, use a +\- +(dash character) for the file name\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-server\-name=\fR\fB\fIhost\fR\fR, +\fB\-N\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-server\-name=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +localhost +T} +.TE +.sp 1 +Specify the host name or IP address for the browser to use when connecting\&. The default is +localhost\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-use\-https\fR, +\fB\-S\fR +.TS +allbox tab(:); +l l s s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-use\-https +T} +.TE +.sp 1 +Make the browser use a secure (HTTPS) connection with the server\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_show_tables.1 b/man/ndb_show_tables.1 new file mode 100644 index 000000000000..78f7823f0095 --- /dev/null +++ b/man/ndb_show_tables.1 @@ -0,0 +1,236 @@ +'\" t +.\" Title: \fBndb_show_tables\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_SHOW_TABLES\F" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_show_tables \- display list of NDB tables +.SH "SYNOPSIS" +.HP \w'\fBndb_show_tables\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u +\fBndb_show_tables [\fR\fB\fIoptions\fR\fR\fB]\fR +.SH "DESCRIPTION" +.PP +\fBndb_show_tables\fR +displays a list of all +NDB +database objects in the cluster\&. By default, this includes not only both user\-created tables and +NDB +system tables, but +NDB\-specific indexes, internal triggers, and NDB Cluster Disk Data objects as well\&. +.PP +The following table includes options that are specific to the NDB Cluster native backup restoration program +\fBndb_show_tables\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_show_tables\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.106.\ \& This table describes command\-line options for the ndb_show_tables program +.TS +allbox tab(:); +. +.TE +.sp 1 +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_show_tables [\-c \fIconnection_string\fR] +.fi +.if n \{\ +.RE +.\} +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-database\fR, +\fB\-d\fR +.sp +Specifies the name of the database in which the tables are found\&. If this option has not been specified, and no tables are found in the +TEST_DB +database, +\fBndb_show_tables\fR +issues a warning\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-loops\fR, +\fB\-l\fR +.sp +Specifies the number of times the utility should execute\&. This is 1 when this option is not specified, but if you do use the option, you must supply an integer argument for it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-parsable\fR, +\fB\-p\fR +.sp +Using this option causes the output to be in a format suitable for use with +LOAD DATA INFILE\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-show\-temp\-status\fR +.sp +If specified, this causes temporary tables to be displayed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-type\fR, +\fB\-t\fR +.sp +Can be used to restrict the output to one type of object, specified by an integer type code as shown here: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +1: System table +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +2: User\-created table +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +3: Unique hash index +.RE +.sp +Any other value causes all +NDB +database objects to be listed (the default)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-unqualified\fR, +\fB\-u\fR +.sp +If specified, this causes unqualified object names to be displayed\&. +.RE +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +Only user\-created NDB Cluster tables may be accessed from MySQL; system tables such as +SYSTAB_0 +are not visible to +\fBmysqld\fR\&. However, you can examine the contents of system tables using +NDB +API applications such as +\fBndb_select_all\fR +(see +\fBndb_select_all\fR(1))\&. +.sp .5v +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_size.pl.1 b/man/ndb_size.pl.1 new file mode 100644 index 000000000000..c43128ecac54 --- /dev/null +++ b/man/ndb_size.pl.1 @@ -0,0 +1,291 @@ +'\" t +.\" Title: \fBndb_size.pl\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_SIZE\&.PL\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_size.pl \- NDBCLUSTER Size Requirement Estimator +.SH "SYNOPSIS" +.HP \w'\fBndb_size\&.pl\ \fR\fB\fIarguments\fR\fR\ 'u +\fBndb_size\&.pl \fR\fB\fIarguments\fR\fR +.SH "DESCRIPTION" +.PP +This is a Perl script that can be used to estimate the amount of space that would be required by a MySQL database if it were converted to use the +NDBCLUSTER +storage engine\&. Unlike the other utilities discussed in this section, it does not require access to an NDB Cluster (in fact, there is no reason for it to do so)\&. However, it does need to access the MySQL server on which the database to be tested resides\&. +Requirements +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A running MySQL server\&. The server instance does not have to provide support for NDB Cluster\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A working installation of Perl\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The +DBI +module, which can be obtained from CPAN if it is not already part of your Perl installation\&. (Many Linux and other operating system distributions provide their own packages for this library\&.) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A MySQL user account having the necessary privileges\&. If you do not wish to use an existing account, then creating one using +GRANT USAGE ON \fIdb_name\fR\&.*\(emwhere +\fIdb_name\fR +is the name of the database to be examined\(emis sufficient for this purpose\&. +.RE +.PP +ndb_size\&.pl +can also be found in the MySQL sources in +storage/ndb/tools\&. +.PP +The following table includes options that are specific to the NDB Cluster program +\fBndb_size\&.pl\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_size\&.pl\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.107.\ \& This table describes command\-line options for the ndb_size\&.pl program +.TS +allbox tab(:); +. +.TE +.sp 1 +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +perl ndb_size\&.pl [\-\-database={\fIdb_name\fR|ALL}] [\-\-hostname=\fIhost\fR[:\fIport\fR]] [\-\-socket=\fIsocket\fR] \e + [\-\-user=\fIuser\fR] [\-\-password=\fIpassword\fR] \e + [\-\-help|\-h] [\-\-format={html|text}] \e + [\-\-loadqueries=\fIfile_name\fR] [\-\-savequeries=\fIfile_name\fR] +.fi +.if n \{\ +.RE +.\} +.PP +By default, this utility attempts to analyze all databases on the server\&. You can specify a single database using the +\fB\-\-database\fR +option; the default behavior can be made explicit by using +ALL +for the name of the database\&. You can also exclude one or more databases by using the +\fB\-\-excludedbs\fR +option with a comma\-separated list of the names of the databases to be skipped\&. Similarly, you can cause specific tables to be skipped by listing their names, separated by commas, following the optional +\fB\-\-excludetables\fR +option\&. A host name can be specified using +\fB\-\-hostname\fR; the default is +localhost\&. You can specify a port in addition to the host using +\fIhost\fR:\fIport\fR +format for the value of +\fB\-\-hostname\fR\&. The default port number is 3306\&. If necessary, you can also specify a socket; the default is +/var/lib/mysql\&.sock\&. A MySQL user name and password can be specified the corresponding options shown\&. It also possible to control the format of the output using the +\fB\-\-format\fR +option; this can take either of the values +html +or +text, with +text +being the default\&. An example of the text output is shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_size\&.pl \-\-database=test \-\-socket=/tmp/mysql\&.sock\fR +ndb_size\&.pl report for database: \*(Aqtest\*(Aq (1 tables) +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +Connected to: DBI:mysql:host=localhost;mysql_socket=/tmp/mysql\&.sock +Including information for versions: 4\&.1, 5\&.0, 5\&.1 +test\&.t1 +\-\-\-\-\-\-\- +DataMemory for Columns (* means varsized DataMemory): + Column Name Type Varsized Key 4\&.1 5\&.0 5\&.1 + HIDDEN_NDB_PKEY bigint PRI 8 8 8 + c2 varchar(50) Y 52 52 4* + c1 int(11) 4 4 4 + \-\- \-\- \-\- +Fixed Size Columns DM/Row 64 64 12 + Varsize Columns DM/Row 0 0 4 +DataMemory for Indexes: + Index Name Type 4\&.1 5\&.0 5\&.1 + PRIMARY BTREE 16 16 16 + \-\- \-\- \-\- + Total Index DM/Row 16 16 16 +IndexMemory for Indexes: + Index Name 4\&.1 5\&.0 5\&.1 + PRIMARY 33 16 16 + \-\- \-\- \-\- + Indexes IM/Row 33 16 16 +Summary (for THIS table): + 4\&.1 5\&.0 5\&.1 + Fixed Overhead DM/Row 12 12 16 + NULL Bytes/Row 4 4 4 + DataMemory/Row 96 96 48 + (Includes overhead, bitmap and indexes) + Varsize Overhead DM/Row 0 0 8 + Varsize NULL Bytes/Row 0 0 4 + Avg Varside DM/Row 0 0 16 + No\&. Rows 0 0 0 + Rows/32kb DM Page 340 340 680 +Fixedsize DataMemory (KB) 0 0 0 +Rows/32kb Varsize DM Page 0 0 2040 + Varsize DataMemory (KB) 0 0 0 + Rows/8kb IM Page 248 512 512 + IndexMemory (KB) 0 0 0 +Parameter Minimum Requirements +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +* indicates greater than default + Parameter Default 4\&.1 5\&.0 5\&.1 + DataMemory (KB) 81920 0 0 0 + NoOfOrderedIndexes 128 1 1 1 + NoOfTables 128 1 1 1 + IndexMemory (KB) 18432 0 0 0 + NoOfUniqueHashIndexes 64 0 0 0 + NoOfAttributes 1000 3 3 3 + NoOfTriggers 768 5 5 5 +.fi +.if n \{\ +.RE +.\} +.PP +For debugging purposes, the Perl arrays containing the queries run by this script can be read from the file specified using can be saved to a file using +\fB\-\-savequeries\fR; a file containing such arrays to be read in during script execution can be specified using +\fB\-\-loadqueries\fR\&. Neither of these options has a default value\&. +.PP +To produce output in HTML format, use the +\fB\-\-format\fR +option and redirect the output to a file, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_size\&.pl \-\-database=test \-\-socket=/tmp/mysql\&.sock \-\-format=html > ndb_size\&.html\fR +.fi +.if n \{\ +.RE +.\} +.PP +(Without the redirection, the output is sent to +stdout\&.) +.PP +The output from this script includes the following information: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Minimum values for the +DataMemory, +IndexMemory, +MaxNoOfTables, +MaxNoOfAttributes, +MaxNoOfOrderedIndexes, and +MaxNoOfTriggers +configuration parameters required to accommodate the tables analyzed\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Memory requirements for all of the tables, attributes, ordered indexes, and unique hash indexes defined in the database\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +The +IndexMemory +and +DataMemory +required per table and table row\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_top.1 b/man/ndb_top.1 new file mode 100644 index 000000000000..0b7843e95582 --- /dev/null +++ b/man/ndb_top.1 @@ -0,0 +1,754 @@ +'\" t +.\" Title: \fBndb_top\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_TOP\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_top \- View CPU usage information for NDB threads +.SH "SYNOPSIS" +.HP \w'\fBndb_top\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_top \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_top\fR +displays running information in the terminal about CPU usage by NDB threads on an NDB Cluster data node\&. Each thread is represented by two rows in the output, the first showing system statistics, the second showing the measured statistics for the thread\&. +.PP +\fBndb_top\fR +is available beginning with MySQL NDB Cluster 7\&.6\&.3\&. +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_top [\-h \fIhostname\fR] [\-t \fIport\fR] [\-u \fIuser\fR] [\-p \fIpass\fR] [\-n \fInode_id\fR] +.fi +.if n \{\ +.RE +.\} +.PP +\fBndb_top\fR +connects to a MySQL Server running as an SQL node of the cluster\&. By default, it attempts to connect to a +\fBmysqld\fR +running on +localhost +and port 3360, as the MySQL +root +user with no password specified\&. You can override the default host and port using, respectively, +\fB\-\-host\fR +(\fB\-h\fR) and +\fB\-\-port\fR +(\fB\-t\fR)\&. To specify a MySQL user and password, use the +\fB\-\-user\fR +(\fB\-u\fR) and +\fB\-\-passwd\fR +(\fB\-p\fR) options\&. This user must be able to read tables in the +ndbinfo +database (\fBndb_top\fR +uses information from +ndbinfo\&.cpustat +and related tables)\&. +.PP +For more information about MySQL user accounts and passwords, see +Section\ \&6.3, \(lqMySQL User Account Management\(rq, as well as +Section\ \&6.2, \(lqThe MySQL Access Privilege System\(rq\&. +.PP +Output is available as plain text or an ASCII graph; you can specify this using the +\fB\-\-text\fR +(\fB\-x\fR) and +\fB\-\-graph\fR +(\fB\-g\fR) options, respectively\&. These two display modes provide the same information; they can be used concurrently\&. At least one display mode must be in use\&. +.PP +Color display of the graph is supported and enabled by default (\fB\-\-color\fR +or +\fB\-c\fR +option)\&. With color support enabled, the graph display shows OS user time in blue, OS system time in green, and idle time as blank\&. For measured load, blue is used for execution time, yellow for send time, red for time spent in send buffer full waits, and blank spaces for idle time\&. The percentage shown in the graph display is the sum of percentages for all threads which are not idle\&. Colors are not currently configurable; you can use grayscale instead by using +\fB\-\-skip\-color\fR\&. +.PP +The sorted view (\fB\-\-sort\fR, +\fB\-r\fR) is based on the maximum of the measured load and the load reported by the OS\&. Display of these can be enabled and disabled using the +\fB\-\-measured\-load\fR +(\fB\-m\fR) and +\fB\-\-os\-load\fR +(\fB\-o\fR) options\&. Display of at least one of these loads must be enabled\&. +.PP +The program tries to obtain statistics from a data node having the node ID given by the +\fB\-\-node\-id\fR +(\fB\-n\fR) option; if unspecified, this is 1\&. +\fBndb_top\fR +cannot provide information about other types of nodes\&. +.PP +The view adjusts itself to the height and width of the terminal window; the minimum supported width is 76 characters\&. +.PP +Once started, +\fBndb_top\fR +runs continuously until forced to exit; you can quit the program using +Ctrl\-C\&. The display updates once per second; to set a different delay interval, use +\fB\-\-sleep\-time\fR +(\fB\-s\fR)\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +\fBndb_top\fR +is available on Mac OS X, Linux, and Solaris\&. It is not currently supported on Windows platforms\&. +.sp .5v +.RE +.PP +The following table includes all options that are specific to the NDB Cluster program +\fBndb_top\fR\&. Additional descriptions follow the table\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.108.\ \& This table describes command\-line options for the ndb_top program +.TS +allbox tab(:); +. +.TE +.sp 1 +Additional Options +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-color\fR, +\fB\-c\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-color +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Show ASCII graphs in color; use +\fB\-\-skip\-colors\fR +to disable\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-graph\fR, +\fB\-g\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-graph +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Display data using graphs; use +\fB\-\-skip\-graphs\fR +to disable\&. This option or +\fB\-\-text\fR +must be true; both options may be true\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-help\fR, +\fB\-?\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-help +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Show program usage information\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-host[\fR=\fIname]\fR, +\fB\-h\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-host[=name] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +localhost +T} +.TE +.sp 1 +Host name or IP address of MySQL Server to connect to\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-measured\-load\fR, +\fB\-m\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-measured\-load +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Show measured load by thread\&. This option or +\fB\-\-os\-load\fR +must be true; both options may be true\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-node\-id[\fR=\fI#]\fR, +\fB\-n\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-node\-id[=#] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +1 +T} +.TE +.sp 1 +Watch the data node having this node ID\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-os\-load\fR, +\fB\-o\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-os\-load +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Show load measured by operating system\&. This option or +\fB\-\-measured\-load\fR +must be true; both options may be true\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-passwd[\fR=\fIpassword]\fR, +\fB\-p\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-passwd[=password] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +NULL +T} +.TE +.sp 1 +Connect using this password\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-port[\fR=\fI#]\fR, +\fB\-t\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-port[=#] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +3306 +T} +.TE +.sp 1 +Port number to use when connecting to MySQL Server\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-sleep\-time[\fR=\fIseconds]\fR, +\fB\-s\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sleep\-time[=seconds] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +integer +T} +:T{ +\fBDefault\fR +T}:T{ +1 +T} +.TE +.sp 1 +Time to wait between display refreshes, in seconds\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-sort\fR, +\fB\-r\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-sort +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Sort threads by usage; use +\fB\-\-skip\-sort\fR +to disable\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-text\fR, +\fB\-x\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-text +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Display data using text\&. This option or +\fB\-\-graph\fR +must be true; both options may be true\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-user[\fR=\fIname]\fR, +\fB\-u\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBIntroduced\fR +T}:T{ +5\&.7\&.19\-ndb\-7\&.6\&.3 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-user[=name] +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +root +T} +.TE +.sp 1 +Connect as this MySQL user\&. +.RE +.PP +\fBSample Output\fR. The next figure shows +\fBndb_top\fR +running in a terminal window on a Linux system with an +\fBndbmtd\fR +data node under a moderate load\&. Here, the program has been invoked using +\fBndb_top\fR +\fB\-n8\fR +\fB\-x\fR +to provide both text and graph output: +.sp +.RS 4 +[IMAGE]\&\s-2\u[1]\d\s+2 +[IMAGE]\&\s-2\u[1]\d\s+2 +Display from ndb_top, running in a terminal + window\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +[set $man.base.url.for.relative.links]/../refman-common/images/published/ndb-top-1.png +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndb_waiter.1 b/man/ndb_waiter.1 new file mode 100644 index 000000000000..c2ea4bc32a49 --- /dev/null +++ b/man/ndb_waiter.1 @@ -0,0 +1,409 @@ +'\" t +.\" Title: \fBndb_waiter\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDB_WAITER\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndb_waiter \- wait for NDB Cluster to reach a given status +.SH "SYNOPSIS" +.HP \w'\fBndb_waiter\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndb_waiter \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndb_waiter\fR +repeatedly (each 100 milliseconds) prints out the status of all cluster data nodes until either the cluster reaches a given status or the +\fB\-\-timeout\fR +limit is exceeded, then exits\&. By default, it waits for the cluster to achieve +STARTED +status, in which all nodes have started and connected to the cluster\&. This can be overridden using the +\fB\-\-no\-contact\fR +and +\fB\-\-not\-started\fR +options\&. +.PP +The node states reported by this utility are as follows: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NO_CONTACT: The node cannot be contacted\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +UNKNOWN: The node can be contacted, but its status is not yet known\&. Usually, this means that the node has received a +START +or +RESTART +command from the management server, but has not yet acted on it\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NOT_STARTED: The node has stopped, but remains in contact with the cluster\&. This is seen when restarting the node using the management client\*(Aqs +RESTART +command\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +STARTING: The node\*(Aqs +\fBndbd\fR +process has started, but the node has not yet joined the cluster\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +STARTED: The node is operational, and has joined the cluster\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SHUTTING_DOWN: The node is shutting down\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +SINGLE USER MODE: This is shown for all cluster data nodes when the cluster is in single user mode\&. +.RE +.PP +The following table includes options that are specific to the NDB Cluster native backup restoration program +\fBndb_waiter\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndb_waiter\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.109.\ \& This table describes command\-line options for the ndb_waiter program +.TS +allbox tab(:); +. +.TE +.sp 1 +Usage +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_waiter [\-c \fIconnection_string\fR] +.fi +.if n \{\ +.RE +.\} +Additional Options +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-no\-contact\fR, +\fB\-n\fR +.sp +Instead of waiting for the +STARTED +state, +\fBndb_waiter\fR +continues running until the cluster reaches +NO_CONTACT +status before exiting\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-not\-started\fR +.sp +Instead of waiting for the +STARTED +state, +\fBndb_waiter\fR +continues running until the cluster reaches +NOT_STARTED +status before exiting\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-timeout=\fR\fB\fIseconds\fR\fR, +\fB\-t \fR\fB\fIseconds\fR\fR +.sp +Time to wait\&. The program exits if the desired state is not achieved within this number of seconds\&. The default is 120 seconds (1200 reporting cycles)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-single\-user\fR +.sp +The program waits for the cluster to enter single user mode\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nowait\-nodes=\fR\fB\fIlist\fR\fR +.sp +When this option is used, ndb_waiter does not wait for the nodes whose IDs are listed\&. The list is comma\-delimited; ranges can be indicated by dashes, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_waiter \-\-nowait\-nodes=1,3,7\-9\fR +.fi +.if n \{\ +.RE +.\} +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +Do +\fInot\fR +use this option together with the +\fB\-\-wait\-nodes\fR +option\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-wait\-nodes=\fR\fB\fIlist\fR\fR, +\fB\-w \fR\fB\fIlist\fR\fR +.sp +When this option is used, +\fBndb_waiter\fR +waits only for the nodes whose IDs are listed\&. The list is comma\-delimited; ranges can be indicated by dashes, as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndb_waiter \-\-wait\-nodes=2,4\-6,10\fR +.fi +.if n \{\ +.RE +.\} +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +Do +\fInot\fR +use this option together with the +\fB\-\-nowait\-nodes\fR +option\&. +.sp .5v +.RE +.RE +.PP +\fBSample Output\fR. Shown here is the output from +\fBndb_waiter\fR +when run against a 4\-node cluster in which two nodes have been shut down and then started again manually\&. Duplicate reports (indicated by +\&.\&.\&.) are omitted\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fB\&./ndb_waiter \-c localhost\fR +Connecting to mgmsrv at (localhost) +State node 1 STARTED +State node 2 NO_CONTACT +State node 3 STARTED +State node 4 NO_CONTACT +Waiting for cluster enter state STARTED +\&.\&.\&. +State node 1 STARTED +State node 2 UNKNOWN +State node 3 STARTED +State node 4 NO_CONTACT +Waiting for cluster enter state STARTED +\&.\&.\&. +State node 1 STARTED +State node 2 STARTING +State node 3 STARTED +State node 4 NO_CONTACT +Waiting for cluster enter state STARTED +\&.\&.\&. +State node 1 STARTED +State node 2 STARTING +State node 3 STARTED +State node 4 UNKNOWN +Waiting for cluster enter state STARTED +\&.\&.\&. +State node 1 STARTED +State node 2 STARTING +State node 3 STARTED +State node 4 STARTING +Waiting for cluster enter state STARTED +\&.\&.\&. +State node 1 STARTED +State node 2 STARTED +State node 3 STARTED +State node 4 STARTING +Waiting for cluster enter state STARTED +\&.\&.\&. +State node 1 STARTED +State node 2 STARTED +State node 3 STARTED +State node 4 STARTED +Waiting for cluster enter state STARTED +NDBT_ProgramExit: 0 \- OK +.fi +.if n \{\ +.RE +.\} +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +If no connection string is specified, then +\fBndb_waiter\fR +tries to connect to a management on +localhost, and reports +Connecting to mgmsrv at (null)\&. +.sp .5v +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndbd.8 b/man/ndbd.8 new file mode 100644 index 000000000000..155b1302a883 --- /dev/null +++ b/man/ndbd.8 @@ -0,0 +1,1082 @@ +'\" t +.\" Title: \fBndbd\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDBD\FR" "8" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndbd \- the NDB Cluster data node daemon +.SH "SYNOPSIS" +.HP \w'\fBndbd\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndbd \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndbd\fR +is the process that is used to handle all the data in tables using the NDB Cluster storage engine\&. This is the process that empowers a data node to accomplish distributed transaction handling, node recovery, checkpointing to disk, online backup, and related tasks\&. +.PP +In an NDB Cluster, a set of +\fBndbd\fR +processes cooperate in handling data\&. These processes can execute on the same computer (host) or on different computers\&. The correspondences between data nodes and Cluster hosts is completely configurable\&. +.PP +The following table includes command options specific to the NDB Cluster data node program +\fBndbd\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndbd\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.86.\ \& This table describes command\-line options for the ndbd program +.TS +allbox tab(:); +. +.TE +.sp 1 +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +All of these options also apply to the multi\-threaded version of this program (\fBndbmtd\fR) and you may substitute +\(lq\fBndbmtd\fR\(rq +for +\(lq\fBndbd\fR\(rq +wherever the latter occurs in this section\&. +.sp .5v +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-bind\-address\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-bind\-address=name +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +Causes +\fBndbd\fR +to bind to a specific network interface (host name or IP address)\&. This option has no default value\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-daemon\fR, +\fB\-d\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-daemon +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +TRUE +T} +.TE +.sp 1 +Instructs +\fBndbd\fR +or +\fBndbmtd\fR +to execute as a daemon process\&. This is the default behavior\&. +\fB\-\-nodaemon\fR +can be used to prevent the process from running as a daemon\&. +.sp +This option has no effect when running +\fBndbd\fR +or +\fBndbmtd\fR +on Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nodaemon\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nodaemon +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Prevents +\fBndbd\fR +or +\fBndbmtd\fR +from executing as a daemon process\&. This option overrides the +\fB\-\-daemon\fR +option\&. This is useful for redirecting output to the screen when debugging the binary\&. +.sp +The default behavior for +\fBndbd\fR +and +\fBndbmtd\fR +on Windows is to run in the foreground, making this option unnecessary on Windows platforms, where it has no effect\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-foreground\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-foreground +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Causes +\fBndbd\fR +or +\fBndbmtd\fR +to execute as a foreground process, primarily for debugging purposes\&. This option implies the +\fB\-\-nodaemon\fR +option\&. +.sp +This option has no effect when running +\fBndbd\fR +or +\fBndbmtd\fR +on Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-initial\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-initial +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Instructs +\fBndbd\fR +to perform an initial start\&. An initial start erases any files created for recovery purposes by earlier instances of +\fBndbd\fR\&. It also re\-creates recovery log files\&. On some operating systems, this process can take a substantial amount of time\&. +.sp +An +\fB\-\-initial\fR +start is to be used +\fIonly\fR +when starting the +\fBndbd\fR +process under very special circumstances; this is because this option causes all files to be removed from the NDB Cluster file system and all redo log files to be re\-created\&. These circumstances are listed here: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +When performing a software upgrade which has changed the contents of any files\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +When restarting the node with a new version of +\fBndbd\fR\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +As a measure of last resort when for some reason the node restart or system restart repeatedly fails\&. In this case, be aware that this node can no longer be used to restore data due to the destruction of the data files\&. +.RE +.sp +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBWarning\fR +.ps -1 +.br +To avoid the possibility of eventual data loss, it is recommended that you +\fInot\fR +use the +\fB\-\-initial\fR +option together with +StopOnError = 0\&. Instead, set +StopOnError +to 0 in +config\&.ini +only after the cluster has been started, then restart the data nodes normally\(emthat is, without the +\fB\-\-initial\fR +option\&. See the description of the +StopOnError +parameter for a detailed explanation of this issue\&. (Bug #24945638) +.sp .5v +.RE +Use of this option prevents the +StartPartialTimeout +and +StartPartitionedTimeout +configuration parameters from having any effect\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +This option does +\fInot\fR +affect either of the following types of files: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +Backup files that have already been created by the affected node +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +NDB Cluster Disk Data files (see +Section\ \&21.5.13, \(lqNDB Cluster Disk Data Tables\(rq)\&. +.RE +.sp +This option also has no effect on recovery of data by a data node that is just starting (or restarting) from data nodes that are already running\&. This recovery of data occurs automatically, and requires no user intervention in an NDB Cluster that is running normally\&. +.sp .5v +.RE +It is permissible to use this option when starting the cluster for the very first time (that is, before any data node files have been created); however, it is +\fInot\fR +necessary to do so\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-initial\-start\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-initial\-start +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +This option is used when performing a partial initial start of the cluster\&. Each node should be started with this option, as well as +\fB\-\-nowait\-nodes\fR\&. +.sp +Suppose that you have a 4\-node cluster whose data nodes have the IDs 2, 3, 4, and 5, and you wish to perform a partial initial start using only nodes 2, 4, and 5\(emthat is, omitting node 3: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbd \-\-ndb\-nodeid=2 \-\-nowait\-nodes=3 \-\-initial\-start\fR +shell> \fBndbd \-\-ndb\-nodeid=4 \-\-nowait\-nodes=3 \-\-initial\-start\fR +shell> \fBndbd \-\-ndb\-nodeid=5 \-\-nowait\-nodes=3 \-\-initial\-start\fR +.fi +.if n \{\ +.RE +.\} +.sp +When using this option, you must also specify the node ID for the data node being started with the +\fB\-\-ndb\-nodeid\fR +option\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +Do not confuse this option with the +\fB\-\-nowait\-nodes\fR +option for +\fBndb_mgmd\fR, which can be used to enable a cluster configured with multiple management servers to be started without all management servers being online\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nowait\-nodes=\fR\fB\fInode_id_1\fR\fR\fB[, \fR\fB\fInode_id_2\fR\fR\fB[, \&.\&.\&.]]\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nowait\-nodes=list +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +T} +.TE +.sp 1 +This option takes a list of data nodes which for which the cluster will not wait for before starting\&. +.sp +This can be used to start the cluster in a partitioned state\&. For example, to start the cluster with only half of the data nodes (nodes 2, 3, 4, and 5) running in a 4\-node cluster, you can start each +\fBndbd\fR +process with +\fB\-\-nowait\-nodes=3,5\fR\&. In this case, the cluster starts as soon as nodes 2 and 4 connect, and does +\fInot\fR +wait +StartPartitionedTimeout +milliseconds for nodes 3 and 5 to connect as it would otherwise\&. +.sp +If you wanted to start up the same cluster as in the previous example without one +\fBndbd\fR +(say, for example, that the host machine for node 3 has suffered a hardware failure) then start nodes 2, 4, and 5 with +\fB\-\-nowait\-nodes=3\fR\&. Then the cluster will start as soon as nodes 2, 4, and 5 connect and will not wait for node 3 to start\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-nostart\fR, +\fB\-n\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-nostart +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +boolean +T} +:T{ +\fBDefault\fR +T}:T{ +FALSE +T} +.TE +.sp 1 +Instructs +\fBndbd\fR +not to start automatically\&. When this option is used, +\fBndbd\fR +connects to the management server, obtains configuration data from it, and initializes communication objects\&. However, it does not actually start the execution engine until specifically requested to do so by the management server\&. This can be accomplished by issuing the proper +START +command in the management client (see +Section\ \&21.5.2, \(lqCommands in the NDB Cluster Management Client\(rq)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-install[=\fR\fB\fIname\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-install[=name] +T} +T{ +\fBPlatform Specific\fR +T}:T{ +Windows +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +ndbd +T} +.TE +.sp 1 +Causes +\fBndbd\fR +to be installed as a Windows service\&. Optionally, you can specify a name for the service; if not set, the service name defaults to +ndbd\&. Although it is preferable to specify other +\fBndbd\fR +program options in a +my\&.ini +or +my\&.cnf +configuration file, it is possible to use together with +\fB\-\-install\fR\&. However, in such cases, the +\fB\-\-install\fR +option must be specified first, before any other options are given, for the Windows service installation to succeed\&. +.sp +It is generally not advisable to use this option together with the +\fB\-\-initial\fR +option, since this causes the data node file system to be wiped and rebuilt every time the service is stopped and started\&. Extreme care should also be taken if you intend to use any of the other +\fBndbd\fR +options that affect the starting of data nodes\(emincluding +\fB\-\-initial\-start\fR, +\fB\-\-nostart\fR, and +\fB\-\-nowait\-nodes\fR\(emtogether with +\fB\-\-install\fR, and you should make absolutely certain you fully understand and allow for any possible consequences of doing so\&. +.sp +The +\fB\-\-install\fR +option has no effect on non\-Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-remove[=\fR\fB\fIname\fR\fR\fB]\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-remove[=name] +T} +T{ +\fBPlatform Specific\fR +T}:T{ +Windows +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +string +T} +:T{ +\fBDefault\fR +T}:T{ +ndbd +T} +.TE +.sp 1 +Causes an +\fBndbd\fR +process that was previously installed as a Windows service to be removed\&. Optionally, you can specify a name for the service to be uninstalled; if not set, the service name defaults to +ndbd\&. +.sp +The +\fB\-\-remove\fR +option has no effect on non\-Windows platforms\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-connect\-retries=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connect\-retries=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +12 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +65535 +T} +.TE +.sp 1 +Set the number of times to retry a connection before giving up; 0 means 1 attempt only (and no retries)\&. The default is 12 attempts\&. The time to wait between attempts is controlled by the +\fB\-\-connect\-retry\-delay\fR +option\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-connect\-delay=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBDeprecated\fR +T}:T{ +5\&.6\&.28\-ndb\-7\&.4\&.9 +T} +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connect\-delay=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +5 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +3600 +T} +.TE +.sp 1 +Determines the time to wait between attempts to contact a management server when starting (the number of attempts is controlled by the +\fB\-\-connect\-retries\fR +option)\&. The default is 5 seconds\&. +.sp +This option is deprecated, and is subject to removal in a future release of NDB Cluster\&. Use +\fB\-\-connect\-retry\-delay\fR +instead\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-connect\-retry\-delay=\fR\fB\fI#\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-connect\-retry\-delay=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +5 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +4294967295 +T} +.TE +.sp 1 +Determines the time to wait between attempts to contact a management server when starting (the time between attempts is controlled by the +\fB\-\-connect\-retries\fR +option)\&. The default is 5 seconds\&. +.sp +This option takes the place of the +\fB\-\-connect\-delay\fR +option, which is now deprecated and subject to removal in a future release of NDB Cluster\&. +.RE +.PP +\fBndbd\fR +generates a set of log files which are placed in the directory specified by +DataDir +in the +config\&.ini +configuration file\&. +.PP +These log files are listed below\&. +\fInode_id\fR +is and represents the node\*(Aqs unique identifier\&. For example, +ndb_2_error\&.log +is the error log generated by the data node whose node ID is +2\&. +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_error\&.log +is a file containing records of all crashes which the referenced +\fBndbd\fR +process has encountered\&. Each record in this file contains a brief error string and a reference to a trace file for this crash\&. A typical entry in this file might appear as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +Date/Time: Saturday 30 July 2004 \- 00:20:01 +Type of error: error +Message: Internal program error (failed ndbrequire) +Fault ID: 2341 +Problem data: DbtupFixAlloc\&.cpp +Object of reference: DBTUP (Line: 173) +ProgramName: NDB Kernel +ProcessID: 14909 +TraceFile: ndb_2_trace\&.log\&.2 +***EOM*** +.fi +.if n \{\ +.RE +.\} +.sp +Listings of possible +\fBndbd\fR +exit codes and messages generated when a data node process shuts down prematurely can be found in +\m[blue]\fBData Node Error Messages\fR\m[]\&\s-2\u[1]\d\s+2\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBImportant\fR +.ps -1 +.br +\fIThe last entry in the error log file is not necessarily the newest one\fR +(nor is it likely to be)\&. Entries in the error log are +\fInot\fR +listed in chronological order; rather, they correspond to the order of the trace files as determined in the +ndb_\fInode_id\fR_trace\&.log\&.next +file (see below)\&. Error log entries are thus overwritten in a cyclical and not sequential fashion\&. +.sp .5v +.RE +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_trace\&.log\&.\fItrace_id\fR +is a trace file describing exactly what happened just before the error occurred\&. This information is useful for analysis by the NDB Cluster development team\&. +.sp +It is possible to configure the number of these trace files that will be created before old files are overwritten\&. +\fItrace_id\fR +is a number which is incremented for each successive trace file\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_trace\&.log\&.next +is the file that keeps track of the next trace file number to be assigned\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_out\&.log +is a file containing any data output by the +\fBndbd\fR +process\&. This file is created only if +\fBndbd\fR +is started as a daemon, which is the default behavior\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR\&.pid +is a file containing the process ID of the +\fBndbd\fR +process when started as a daemon\&. It also functions as a lock file to avoid the starting of nodes with the same identifier\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +ndb_\fInode_id\fR_signal\&.log +is a file used only in debug versions of +\fBndbd\fR, where it is possible to trace all incoming, outgoing, and internal messages with their data in the +\fBndbd\fR +process\&. +.RE +.PP +It is recommended not to use a directory mounted through NFS because in some environments this can cause problems whereby the lock on the +\&.pid +file remains in effect even after the process has terminated\&. +.PP +To start +\fBndbd\fR, it may also be necessary to specify the host name of the management server and the port on which it is listening\&. Optionally, one may also specify the node ID that the process is to use\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbd \-\-connect\-string="nodeid=2;host=ndb_mgmd\&.mysql\&.com:1186"\fR +.fi +.if n \{\ +.RE +.\} +.PP +See +Section\ \&21.3.3.3, \(lqNDB Cluster Connection Strings\(rq, for additional information about this issue\&. +Options Common to NDB Cluster Programs(1), describes other command\-line options which can be used with +\fBndbd\fR\&. For information about data node configuration parameters, see +Section\ \&21.3.3.6, \(lqDefining NDB Cluster Data Nodes\(rq\&. +.PP +When +\fBndbd\fR +starts, it actually initiates two processes\&. The first of these is called the +\(lqangel process\(rq; its only job is to discover when the execution process has been completed, and then to restart the +\fBndbd\fR +process if it is configured to do so\&. Thus, if you attempt to kill +\fBndbd\fR +using the Unix +\fBkill\fR +command, it is necessary to kill both processes, beginning with the angel process\&. The preferred method of terminating an +\fBndbd\fR +process is to use the management client and stop the process from there\&. +.PP +The execution process uses one thread for reading, writing, and scanning data, as well as all other activities\&. This thread is implemented asynchronously so that it can easily handle thousands of concurrent actions\&. In addition, a watch\-dog thread supervises the execution thread to make sure that it does not hang in an endless loop\&. A pool of threads handles file I/O, with each thread able to handle one open file\&. Threads can also be used for transporter connections by the transporters in the +\fBndbd\fR +process\&. In a multi\-processor system performing a large number of operations (including updates), the +\fBndbd\fR +process can consume up to 2 CPUs if permitted to do so\&. +.PP +For a machine with many CPUs it is possible to use several +\fBndbd\fR +processes which belong to different node groups; however, such a configuration is still considered experimental and is not supported for MySQL 5\&.7 in a production setting\&. See +Section\ \&21.1.6, \(lqKnown Limitations of NDB Cluster\(rq\&. +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +Data Node Error Messages +.RS 4 +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-node-error-messages.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndbinfo_select_all.1 b/man/ndbinfo_select_all.1 new file mode 100644 index 000000000000..f24bd7255e0a --- /dev/null +++ b/man/ndbinfo_select_all.1 @@ -0,0 +1,240 @@ +'\" t +.\" Title: \fBndbinfo_select_all\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDBINFO_SELECT_AL" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndbinfo_select_all \- select from ndbinfo tables +.SH "SYNOPSIS" +.HP \w'\fBndbinfo_select_all\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndbinfo_select_all \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndbinfo_select_all\fR +is a client program that selects all rows and columns from one or more tables in the +ndbinfo +database +.PP +Not all +ndbinfo +tables available in the +\fBmysql\fR +client can be read by this program\&. In addition, +\fBndbinfo_select_all\fR +can show information about some tables internal to +ndbinfo +which cannot be accessed using SQL, including the +tables +and +columns +metadata tables\&. +.PP +To select from one or more +ndbinfo +tables using +\fBndbinfo_select_all\fR, it is necessary to supply the names of the tables when invoking the program as shown here: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbinfo_select_all \fR\fB\fItable_name1\fR\fR\fB [\fR\fB\fItable_name2\fR\fR\fB] [\&.\&.\&.]\fR +.fi +.if n \{\ +.RE +.\} +.PP +For example: +.sp +.if n \{\ +.RS 4 +.\} +.nf +shell> \fBndbinfo_select_all logbuffers logspaces\fR +== logbuffers == +node_id log_type log_id log_part total used high +5 0 0 0 33554432 262144 0 +6 0 0 0 33554432 262144 0 +7 0 0 0 33554432 262144 0 +8 0 0 0 33554432 262144 0 +== logspaces == +node_id log_type log_id log_part total used high +5 0 0 0 268435456 0 0 +5 0 0 1 268435456 0 0 +5 0 0 2 268435456 0 0 +5 0 0 3 268435456 0 0 +6 0 0 0 268435456 0 0 +6 0 0 1 268435456 0 0 +6 0 0 2 268435456 0 0 +6 0 0 3 268435456 0 0 +7 0 0 0 268435456 0 0 +7 0 0 1 268435456 0 0 +7 0 0 2 268435456 0 0 +7 0 0 3 268435456 0 0 +8 0 0 0 268435456 0 0 +8 0 0 1 268435456 0 0 +8 0 0 2 268435456 0 0 +8 0 0 3 268435456 0 0 +shell> +.fi +.if n \{\ +.RE +.\} +.PP +The following table includes options that are specific to +\fBndbinfo_select_all\fR\&. Additional descriptions follow the table\&. For options common to most NDB Cluster programs (including +\fBndbinfo_select_all\fR), see +Options Common to NDB Cluster Programs(1)\&. +.sp +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.B Table\ \&21.87.\ \& This table describes command\-line options for the ndbinfo_select_all program +.TS +allbox tab(:); +. +.TE +.sp 1 +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-delay=\fR\fBseconds\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-delay=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +5 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +MAX_INT +T} +.TE +.sp 1 +This option sets the number of seconds to wait between executing loops\&. Has no effect if +\fB\-\-loops\fR +is set to 0 or 1\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +\fB\-\-loops=\fR\fBnumber\fR, +\fB\-l \fR\fB\fInumber\fR\fR +.TS +allbox tab(:); +l l s s +l l l s +^ l l s +^ l l s +^ l l s. +T{ +\fBCommand\-Line Format\fR +T}:T{ +\-\-loops=# +T} +T{ +\fBPermitted Values\fR +T}:T{ +\fBType\fR +T}:T{ +numeric +T} +:T{ +\fBDefault\fR +T}:T{ +1 +T} +:T{ +\fBMin Value\fR +T}:T{ +0 +T} +:T{ +\fBMax Value\fR +T}:T{ +MAX_INT +T} +.TE +.sp 1 +This option sets the number of times to execute the select\&. Use +\fB\-\-delay\fR +to set the time between loops\&. +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/ndbmtd.8 b/man/ndbmtd.8 new file mode 100644 index 000000000000..46d1d6544d91 --- /dev/null +++ b/man/ndbmtd.8 @@ -0,0 +1,215 @@ +'\" t +.\" Title: \fBndbmtd\fR +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 06/22/2017 +.\" Manual: MySQL Database System +.\" Source: MySQL 5.7 +.\" Language: English +.\" +.TH "\FBNDBMTD\FR" "8" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +ndbmtd \- the NDB Cluster data node daemon (multi\-threaded version) +.SH "SYNOPSIS" +.HP \w'\fBndbmtd\ \fR\fB\fIoptions\fR\fR\ 'u +\fBndbmtd \fR\fB\fIoptions\fR\fR +.SH "DESCRIPTION" +.PP +\fBndbmtd\fR +is a multi\-threaded version of +\fBndbd\fR, the process that is used to handle all the data in tables using the +NDBCLUSTER +storage engine\&. +\fBndbmtd\fR +is intended for use on host computers having multiple CPU cores\&. Except where otherwise noted, +\fBndbmtd\fR +functions in the same way as +\fBndbd\fR; therefore, in this section, we concentrate on the ways in which +\fBndbmtd\fR +differs from +\fBndbd\fR, and you should consult +\fBndbd\fR(8), for additional information about running NDB Cluster data nodes that apply to both the single\-threaded and multi\-threaded versions of the data node process\&. +.PP +Command\-line options and configuration parameters used with +\fBndbd\fR +also apply to +\fBndbmtd\fR\&. For more information about these options and parameters, see +\fBndbd\fR(8), and +Section\ \&21.3.3.6, \(lqDefining NDB Cluster Data Nodes\(rq, respectively\&. +.PP +\fBndbmtd\fR +is also file system\-compatible with +\fBndbd\fR\&. In other words, a data node running +\fBndbd\fR +can be stopped, the binary replaced with +\fBndbmtd\fR, and then restarted without any loss of data\&. (However, when doing this, you must make sure that +MaxNoOfExecutionThreads +is set to an apppriate value before restarting the node if you wish for +\fBndbmtd\fR +to run in multi\-threaded fashion\&.) Similarly, an +\fBndbmtd\fR +binary can be replaced with +\fBndbd\fR +simply by stopping the node and then starting +\fBndbd\fR +in place of the multi\-threaded binary\&. It is not necessary when switching between the two to start the data node binary using +\fB\-\-initial\fR\&. +.PP +Using +\fBndbmtd\fR +differs from using +\fBndbd\fR +in two key respects: +.sp +.RS 4 +.ie n \{\ +\h'-04' 1.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 1." 4.2 +.\} +Because +\fBndbmtd\fR +runs by default in single\-threaded mode (that is, it behaves like +\fBndbd\fR), you must configure it to use multiple threads\&. This can be done by setting an appropriate value in the +config\&.ini +file for the +MaxNoOfExecutionThreads +configuration parameter or the +ThreadConfig +configuration parameter\&. Using +MaxNoOfExecutionThreads +is simpler, but +ThreadConfig +offers more flexibility\&. For more information about these configuration parameters and their use, see +Multi-Threading Configuration Parameters (ndbmtd)\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04' 2.\h'+01'\c +.\} +.el \{\ +.sp -1 +.IP " 2." 4.2 +.\} +Trace files are generated by critical errors in +\fBndbmtd\fR +processes in a somewhat different fashion from how these are generated by +\fBndbd\fR +failures\&. These differences are discussed in more detail in the next few paragraphs\&. +.RE +.PP +Like +\fBndbd\fR, +\fBndbmtd\fR +generates a set of log files which are placed in the directory specified by +DataDir +in the +config\&.ini +configuration file\&. Except for trace files, these are generated in the same way and have the same names as those generated by +\fBndbd\fR\&. +.PP +In the event of a critical error, +\fBndbmtd\fR +generates trace files describing what happened just prior to the error\*(Aq occurrence\&. These files, which can be found in the data node\*(Aqs +DataDir, are useful for analysis of problems by the NDB Cluster Development and Support teams\&. One trace file is generated for each +\fBndbmtd\fR +thread\&. The names of these files have the following pattern: +.sp +.if n \{\ +.RS 4 +.\} +.nf +ndb_\fInode_id\fR_trace\&.log\&.\fItrace_id\fR_t\fIthread_id\fR, +.fi +.if n \{\ +.RE +.\} +.PP +In this pattern, +\fInode_id\fR +stands for the data node\*(Aqs unique node ID in the cluster, +\fItrace_id\fR +is a trace sequence number, and +\fIthread_id\fR +is the thread ID\&. For example, in the event of the failure of an +\fBndbmtd\fR +process running as an NDB Cluster data node having the node ID 3 and with +MaxNoOfExecutionThreads +equal to 4, four trace files are generated in the data node\*(Aqs data directory\&. If the is the first time this node has failed, then these files are named +ndb_3_trace\&.log\&.1_t1, +ndb_3_trace\&.log\&.1_t2, +ndb_3_trace\&.log\&.1_t3, and +ndb_3_trace\&.log\&.1_t4\&. Internally, these trace files follow the same format as +\fBndbd\fR +trace files\&. +.PP +The +\fBndbd\fR +exit codes and messages that are generated when a data node process shuts down prematurely are also used by +\fBndbmtd\fR\&. See +\m[blue]\fBData Node Error Messages\fR\m[]\&\s-2\u[1]\d\s+2, for a listing of these\&. +.if n \{\ +.sp +.\} +.RS 4 +.it 1 an-trap +.nr an-no-space-flag 1 +.nr an-break-flag 1 +.br +.ps +1 +\fBNote\fR +.ps -1 +.br +.PP +It is possible to use +\fBndbd\fR +and +\fBndbmtd\fR +concurrently on different data nodes in the same NDB Cluster\&. However, such configurations have not been tested extensively; thus, we cannot recommend doing so in a production setting at this time\&. +.sp .5v +.RE +.SH "COPYRIGHT" +.br +.PP +Copyright \(co 1997, 2017, Oracle and/or its affiliates. All rights reserved. +.PP +This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. +.PP +This documentation 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. +.PP +You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. +.sp +.SH "NOTES" +.IP " 1." 4 +Data Node Error Messages +.RS 4 +\%http://dev.mysql.com/doc/ndb-internals/en/ndb-node-error-messages.html +.RE +.SH "SEE ALSO" +For more information, please refer to the MySQL Reference Manual, +which may already be installed locally and which is also available +online at http://dev.mysql.com/doc/. +.SH AUTHOR +Oracle Corporation (http://dev.mysql.com/). diff --git a/man/perror.1 b/man/perror.1 index 5322098efb27..ad4aa59b5581 100644 --- a/man/perror.1 +++ b/man/perror.1 @@ -2,12 +2,12 @@ .\" Title: \fBperror\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBPERROR\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBPERROR\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -82,22 +82,6 @@ OS error code 64: Machine is not on the network .RE .\} .PP -To obtain the error message for a MySQL Cluster error code, invoke -\fBperror\fR -with the -\fB\-\-ndb\fR -option: -.sp -.if n \{\ -.RS 4 -.\} -.nf -shell> \fBperror \-\-ndb \fR\fB\fIerrorcode\fR\fR -.fi -.if n \{\ -.RE -.\} -.PP The meaning of system error messages may be dependent on your operating system\&. A given error code may mean different things on different operating systems\&. .PP \fBperror\fR @@ -129,7 +113,13 @@ Display a help message and exit\&. .\} \fB\-\-ndb\fR .sp -Print the error message for a MySQL Cluster error code\&. +Print the error message for an NDB Cluster error code\&. +.sp +This option is deprecated in NDB 7\&.6\&.4 and later, where +\fBperror\fR +prints a warning if it is used, and subject to removal in a future NDB Cluster release series\&. Use the +\fBndb_perror\fR +utility instead\&. .RE .sp .RS 4 diff --git a/man/replace.1 b/man/replace.1 index 28be27038815..fc196c02b4fd 100644 --- a/man/replace.1 +++ b/man/replace.1 @@ -2,12 +2,12 @@ .\" Title: \fBreplace\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBREPLACE\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBREPLACE\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolve_stack_dump.1 b/man/resolve_stack_dump.1 index c6be716835d5..6af8166859c5 100644 --- a/man/resolve_stack_dump.1 +++ b/man/resolve_stack_dump.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolve_stack_dump\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBRESOLVE_STACK_DUM" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBRESOLVE_STACK_DUM" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/resolveip.1 b/man/resolveip.1 index a9ce8a6fc2b2..3b62dba232a8 100644 --- a/man/resolveip.1 +++ b/man/resolveip.1 @@ -2,12 +2,12 @@ .\" Title: \fBresolveip\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBRESOLVEIP\FR" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBRESOLVEIP\FR" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/zlib_decompress.1 b/man/zlib_decompress.1 index 99035fd780aa..2ec11213afe3 100644 --- a/man/zlib_decompress.1 +++ b/man/zlib_decompress.1 @@ -2,12 +2,12 @@ .\" Title: \fBzlib_decompress\fR .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 03/17/2017 +.\" Date: 06/22/2017 .\" Manual: MySQL Database System .\" Source: MySQL 5.7 .\" Language: English .\" -.TH "\FBZLIB_DECOMPRESS\F" "1" "03/17/2017" "MySQL 5\&.7" "MySQL Database System" +.TH "\FBZLIB_DECOMPRESS\F" "1" "06/22/2017" "MySQL 5\&.7" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- From 1e8effb9ef027fd4f01eefc6d3b8b0083230227a Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Mon, 18 Sep 2017 16:30:20 +0300 Subject: [PATCH 265/305] MW-406 Bumped up the wsrep patch version (5.7.19-25.13) --- cmake/wsrep.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake index 67d7f918f71f..a52c46cc7d82 100644 --- a/cmake/wsrep.cmake +++ b/cmake/wsrep.cmake @@ -17,7 +17,7 @@ # so WSREP_VERSION is produced regardless # Set the patch version -SET(WSREP_PATCH_VERSION "12") +SET(WSREP_PATCH_VERSION "13") # Obtain patch revision number SET(WSREP_REVISION $ENV{WSREP_REV}) From 4146ff16f9a93c73428873d5336ad9cf9534298d Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 20 Sep 2017 13:40:19 +0200 Subject: [PATCH 266/305] MW-408 Fix 'WSREP error while trying to determine node state' mysql-test-run.pl sporadically reports 'WSREP error while trying to determine node state' right after starting servers for test execution. This happens because we try to execute a SELECT statement that queries the current value of status variable wsrep_ready. If this statement fails, the above message is reported. The failure is due to fact that wsrep may return error ER_LOCK_WAIT_TIMEOUT (on any SELECT statement) if it is not ready and wsrep_sync_wait enabled for SELECTs. The fix is to disable wsrep_sync_wait for the session that issues those SELECT statements. --- mysql-test/mysql-test-run.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index a5312e28c891..0e6baee53d79 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3841,7 +3841,8 @@ ($$) my $name= $mysqld->name(); my $outfile= "$opt_vardir/tmp/$name.wsrep_ready"; - my $query= "SELECT VARIABLE_VALUE + my $query= "SET SESSION wsrep_sync_wait = 0; + SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'"; From 8c69f9838316bb4ad7b8807c9104d58bbce30cc8 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 22 Sep 2017 10:06:59 +0200 Subject: [PATCH 267/305] MW-410 Stability fix for test galera.galera_ftwrl --- mysql-test/suite/galera/t/galera_ftwrl.test | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/galera/t/galera_ftwrl.test b/mysql-test/suite/galera/t/galera_ftwrl.test index de8310e52d25..739255609ee7 100644 --- a/mysql-test/suite/galera/t/galera_ftwrl.test +++ b/mysql-test/suite/galera/t/galera_ftwrl.test @@ -29,12 +29,11 @@ SELECT * FROM t1; UNLOCK TABLES; -SHOW TABLES; -SELECT COUNT(*) = 1 FROM t1; - --disable_query_log --eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig"; --enable_query_log -DROP TABLE t1; +SHOW TABLES; +SELECT COUNT(*) = 1 FROM t1; +DROP TABLE t1; From 717a604a89afb3b17e9fe5e6466d64bb0fc1191a Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sun, 24 Sep 2017 17:51:00 +0300 Subject: [PATCH 268/305] IN-80: Add provides for mysql-libs with mysql-shared --- support-files/mysql.spec.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 4d193eda3769..e6301ce6dad8 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -471,8 +471,10 @@ Obsoletes: MySQL-shared-classic MySQL-shared-community MySQL-shared-enterpr Obsoletes: MySQL-shared-advanced-gpl MySQL-shared-enterprise-gpl # RHEL uses other names: Obsoletes: mysql-libs mysql-community-libs +Provides: mysql-libs mysql-community-libs # Necessary on RHEL 7, no harm on other platforms: -Obsoletes: mariadb-libs +Provides: mariadb-libs +Obsoletes: mariadb-libs %description -n mysql-wsrep-shared%{product_suffix} This package contains the shared libraries (*.so*) which certain languages From ffdc41ed0e1df7e7f593f7673101ce0be9e9fdab Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Fri, 22 Sep 2017 13:46:15 +0300 Subject: [PATCH 269/305] MW-411 Fix to allow testcase timeout longer than 20 mins In run_testcase() while loop handle $test_timeout > $print_timeout case only if there are no processes to wait. --- mysql-test/mysql-test-run.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 0e6baee53d79..44e3a0fd0e53 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4408,11 +4408,10 @@ ($) my @procs; while (1) { - if ($test_timeout > $print_timeout) + if (!@procs && $test_timeout > $print_timeout) { my $proc = My::SafeProcess->wait_any_timeout($print_timeout); mtr_verbose("Got $proc"); - push @procs, $proc; if ( $proc->{timeout} ) { #print out that the test is still on @@ -4421,6 +4420,10 @@ ($) $print_timeout= start_timer($print_freq * 60); next; } + else + { + push @procs, $proc; + } } else { From 64982f5680df3cd2780e61fe9f14c4be09b43781 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Thu, 21 Sep 2017 11:40:48 +0200 Subject: [PATCH 270/305] MW-409 Fix assertion `wsrep_ws_handle.trx_id == WSREP_UNDEFINED_TRX_ID` --- sql/sql_class.h | 2 +- sql/sql_insert.cc | 86 +++++++++++++++++++++++++---------------------- sql/sql_parse.cc | 17 +++------- 3 files changed, 52 insertions(+), 53 deletions(-) diff --git a/sql/sql_class.h b/sql/sql_class.h index 84f706d51f06..2bbc86bed478 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -4411,7 +4411,7 @@ class THD :public MDL_context_owner, query_id= new_query_id; mysql_mutex_unlock(&LOCK_thd_data); #ifdef WITH_WSREP - if (wsrep_next_trx_id() == WSREP_UNDEFINED_TRX_ID) + if (WSREP(this) && wsrep_next_trx_id() == WSREP_UNDEFINED_TRX_ID) { set_wsrep_next_trx_id(query_id); WSREP_DEBUG("set_query_id(), assigned new next trx id: %lu", diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index b959ab57ffeb..f8331c9c7513 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -3045,56 +3045,62 @@ bool Query_result_create::send_eof() if (!table->s->tmp_table) { #ifdef WITH_WSREP - if (thd->wsrep_trx_id() == WSREP_UNDEFINED_TRX_ID) + if (WSREP(thd)) { - (void) wsrep_ws_handle_for_trx(&thd->wsrep_ws_handle, - thd->wsrep_next_trx_id()); - WSREP_DEBUG("CTAS NEW KEY"); - } - DBUG_ASSERT(thd->wsrep_trx_id() != WSREP_UNDEFINED_TRX_ID); - WSREP_DEBUG("CTAS key append for trx: %lu ", thd->wsrep_trx_id()); + if (thd->wsrep_trx_id() == WSREP_UNDEFINED_TRX_ID) + { + (void) wsrep_ws_handle_for_trx(&thd->wsrep_ws_handle, + thd->wsrep_next_trx_id()); + WSREP_DEBUG("CTAS NEW KEY"); + } + DBUG_ASSERT(thd->wsrep_trx_id() != WSREP_UNDEFINED_TRX_ID); + WSREP_DEBUG("CTAS key append for trx: %lu ", thd->wsrep_trx_id()); - /* - append table level exclusive key for CTAS - */ - wsrep_key_arr_t key_arr= {0, 0}; - wsrep_prepare_keys_for_isolation(thd, - create_table->db, - create_table->table_name, - table_list, - &key_arr); - int rcode = wsrep->append_key( - wsrep, - &thd->wsrep_ws_handle, - key_arr.keys, //&wkey, - key_arr.keys_len, - WSREP_KEY_EXCLUSIVE, - false); - wsrep_keys_free(&key_arr); - if (rcode) { - DBUG_PRINT("wsrep", ("row key failed: %d", rcode)); - WSREP_ERROR("Appending table key for CTAS failed: %s, %d", - (wsrep_thd_query(thd)) ? - wsrep_thd_query(thd) : "void", rcode); - return true; + /* + append table level exclusive key for CTAS + */ + wsrep_key_arr_t key_arr= {0, 0}; + wsrep_prepare_keys_for_isolation(thd, + create_table->db, + create_table->table_name, + table_list, + &key_arr); + int rcode = wsrep->append_key(wsrep, + &thd->wsrep_ws_handle, + key_arr.keys, //&wkey, + key_arr.keys_len, + WSREP_KEY_EXCLUSIVE, + false); + wsrep_keys_free(&key_arr); + if (rcode) + { + DBUG_PRINT("wsrep", ("row key failed: %d", rcode)); + WSREP_ERROR("Appending table key for CTAS failed: %s, %d", + (wsrep_thd_query(thd)) ? + wsrep_thd_query(thd) : "void", rcode); + return true; + } + /* If commit fails, we should be able to reset the OK status. */ + thd->get_stmt_da()->set_overwrite_status(true); } - /* If commit fails, we should be able to reset the OK status. */ - thd->get_stmt_da()->set_overwrite_status(true); #endif /* WITH_WSREP */ trans_commit_stmt(thd); trans_commit_implicit(thd); #ifdef WITH_WSREP - thd->get_stmt_da()->set_overwrite_status(false); - mysql_mutex_lock(&thd->LOCK_wsrep_thd); - if (thd->wsrep_conflict_state != NO_CONFLICT) + if (WSREP(thd)) { - WSREP_DEBUG("select_create commit failed, thd: %u err: %d %s", - thd->thread_id(), thd->wsrep_conflict_state, WSREP_QUERY(thd)); + thd->get_stmt_da()->set_overwrite_status(false); + mysql_mutex_lock(&thd->LOCK_wsrep_thd); + if (thd->wsrep_conflict_state != NO_CONFLICT) + { + WSREP_DEBUG("select_create commit failed, thd: %u err: %d %s", + thd->thread_id(), thd->wsrep_conflict_state, WSREP_QUERY(thd)); + mysql_mutex_unlock(&thd->LOCK_wsrep_thd); + abort_result_set(); + return TRUE; + } mysql_mutex_unlock(&thd->LOCK_wsrep_thd); - abort_result_set(); - return TRUE; } - mysql_mutex_unlock(&thd->LOCK_wsrep_thd); #endif /* WITH_WSREP */ } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index acf94279bf28..575280a07581 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1472,13 +1472,6 @@ bool dispatch_command(THD *thd, const COM_DATA *com_data, } } thd->set_query_id(next_query_id()); -#ifdef WITH_WSREP - if (thd->wsrep_next_trx_id() == WSREP_UNDEFINED_TRX_ID) - { - thd->set_wsrep_next_trx_id(thd->query_id); - WSREP_DEBUG("assigned new next trx id: %lu", thd->wsrep_next_trx_id()); - } -#endif /* WITH_WSREP */ thd->rewritten_query.mem_free(); thd_manager->inc_thread_running(); @@ -1712,11 +1705,11 @@ bool dispatch_command(THD *thd, const COM_DATA *com_data, break; #ifdef WITH_WSREP - if (thd->wsrep_next_trx_id() == WSREP_UNDEFINED_TRX_ID) - { - thd->set_wsrep_next_trx_id(thd->query_id); - WSREP_DEBUG("assigned new next trx id: %lu", thd->wsrep_next_trx_id()); - } + if (WSREP(thd) && thd->wsrep_next_trx_id() == WSREP_UNDEFINED_TRX_ID) + { + thd->set_wsrep_next_trx_id(thd->query_id); + WSREP_DEBUG("assigned new next trx id: %lu", thd->wsrep_next_trx_id()); + } wsrep_mysql_parse(thd, thd->query().str, thd->query().length, &parser_state); #else mysql_parse(thd, &parser_state); From e2a4b63b2055c673c4b02a6cffea55c31cbaa087 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 19 Sep 2017 16:23:29 +0300 Subject: [PATCH 271/305] Fix galera.galera_suspend_slave on FreeBSD Use symbolic signal names (e.g. SIGSTOP) instead of numeric ones (e.g. 19) because the latter are not portable. --- mysql-test/suite/galera/t/galera_suspend_slave.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/galera/t/galera_suspend_slave.test b/mysql-test/suite/galera/t/galera_suspend_slave.test index ecc551fbd11c..be4a7e0b91df 100644 --- a/mysql-test/suite/galera/t/galera_suspend_slave.test +++ b/mysql-test/suite/galera/t/galera_suspend_slave.test @@ -20,7 +20,7 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; my $pid_filename = $ENV{'NODE_2_PIDFILE'}; my $mysqld_pid = `cat $pid_filename`; chomp($mysqld_pid); - system("kill -19 $mysqld_pid"); + system("kill -SIGSTOP $mysqld_pid"); exit(0); EOF @@ -32,7 +32,7 @@ INSERT INTO t1 VALUES (1); my $pid_filename = $ENV{'NODE_2_PIDFILE'}; my $mysqld_pid = `cat $pid_filename`; chomp($mysqld_pid); - system("kill -18 $mysqld_pid"); + system("kill -SIGCONT $mysqld_pid"); exit(0); EOF From 2ce2c3d102735c2b6fefbe4a77343756ccb6184b Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 19 Sep 2017 16:36:45 +0300 Subject: [PATCH 272/305] Fix galera.galera_var_cluster_address on FreeBSD Errno numbers are not portable, don't expect that "Software caused connection abort" (ECONNABORTED) is 103. --- mysql-test/suite/galera/r/galera_var_cluster_address.result | 2 +- mysql-test/suite/galera/t/galera_var_cluster_address.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/galera/r/galera_var_cluster_address.result b/mysql-test/suite/galera/r/galera_var_cluster_address.result index 810096279360..83d8de0e842b 100644 --- a/mysql-test/suite/galera/r/galera_var_cluster_address.result +++ b/mysql-test/suite/galera/r/galera_var_cluster_address.result @@ -34,7 +34,7 @@ CALL mtr.add_suppression("Failed to initialize backend using 'foo"); CALL mtr.add_suppression("Failed to open channel 'my_wsrep_cluster' at 'foo"); CALL mtr.add_suppression("gcs connect failed: Socket type not supported"); CALL mtr.add_suppression("wsrep::connect\\(\\) failed: 7"); -CALL mtr.add_suppression("gcs_caused\\(\\) returned -103 \\(Software caused connection abort\\)"); +CALL mtr.add_suppression("gcs_caused\\(\\) returned -[0-9]+ \\(Software caused connection abort\\)"); CALL mtr.add_suppression("failed to open gcomm backend connection: 110: failed to reach primary view: 110"); CALL mtr.add_suppression("Failed to open backend connection: -110 \\(Connection timed out\\)"); CALL mtr.add_suppression("gcs connect failed: Connection timed out"); diff --git a/mysql-test/suite/galera/t/galera_var_cluster_address.test b/mysql-test/suite/galera/t/galera_var_cluster_address.test index b24ec5bbeb4d..a5ad5b7da5f3 100644 --- a/mysql-test/suite/galera/t/galera_var_cluster_address.test +++ b/mysql-test/suite/galera/t/galera_var_cluster_address.test @@ -59,7 +59,7 @@ CALL mtr.add_suppression("Failed to initialize backend using 'foo"); CALL mtr.add_suppression("Failed to open channel 'my_wsrep_cluster' at 'foo"); CALL mtr.add_suppression("gcs connect failed: Socket type not supported"); CALL mtr.add_suppression("wsrep::connect\\(\\) failed: 7"); -CALL mtr.add_suppression("gcs_caused\\(\\) returned -103 \\(Software caused connection abort\\)"); +CALL mtr.add_suppression("gcs_caused\\(\\) returned -[0-9]+ \\(Software caused connection abort\\)"); CALL mtr.add_suppression("failed to open gcomm backend connection: 110: failed to reach primary view: 110"); CALL mtr.add_suppression("Failed to open backend connection: -110 \\(Connection timed out\\)"); CALL mtr.add_suppression("gcs connect failed: Connection timed out"); From 2d7ba0ae2dcc8fed8ac7887c701f21ae8d1884ed Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Wed, 20 Sep 2017 15:44:27 +0300 Subject: [PATCH 273/305] Fix non-determinism in galera.galera_as_slave_preordered Also wait for the `ten` table to be gone at the end in addition to `t1`. The former sometimes appears in the mtr's internal post-test checks as an extra table that did not exist when the test was started. --- mysql-test/suite/galera/t/galera_as_slave_preordered.test | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mysql-test/suite/galera/t/galera_as_slave_preordered.test b/mysql-test/suite/galera/t/galera_as_slave_preordered.test index 6f221f83b3a7..d9def6bfba91 100644 --- a/mysql-test/suite/galera/t/galera_as_slave_preordered.test +++ b/mysql-test/suite/galera/t/galera_as_slave_preordered.test @@ -80,5 +80,8 @@ DROP TABLE ten; --let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; --source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'ten'; +--source include/wait_condition.inc + STOP SLAVE; RESET SLAVE ALL; From 779d5d29da7e566db3060dc7fb0e25a337707ec4 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Wed, 20 Sep 2017 15:45:52 +0300 Subject: [PATCH 274/305] Fix galera.galera_as_slave_nonprim and galera_3nodes.galera_pc_weight on FreeBSD ENOTCONN is "translated" to "Transport endpoint is not connected" on Linux, but "Socket is not connected" on FreeBSD. Also extend the generic warnings in mysql-test/include/mtr_warnings.sql with respect to that. --- mysql-test/include/mtr_warnings.sql | 2 ++ mysql-test/suite/galera/r/galera_as_slave_nonprim.result | 2 +- mysql-test/suite/galera/t/galera_as_slave_nonprim.test | 2 +- mysql-test/suite/galera_3nodes/r/galera_pc_weight.result | 5 ++++- mysql-test/suite/galera_3nodes/t/galera_pc_weight.test | 5 ++++- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index ae1d6c74e865..6bb2c9af52cd 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -285,6 +285,7 @@ INSERT INTO global_suppressions VALUES ("WSREP: no nodes coming from prim view, prim not possible"), ("WSREP: Failed to prepare for incremental state transfer: Local state seqno is undefined:"), ("WSREP: gcs_caused\\(\\) returned -107 \\(Transport endpoint is not connected\\)"), + ("WSREP: gcs_caused\\(\\) returned -57 \\(Socket is not connected\\)"), ("WSREP: gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)"), ("Action message in non-primary configuration from member"), ("SYNC message from member"), @@ -293,6 +294,7 @@ INSERT INTO global_suppressions VALUES ("InnoDB: New log files created, LSN="), -- WSREP: Send action {0x7f86280147f0, 73, STATE_REQUEST} returned -107 (Transport endpoint is not connected) ("Transport endpoint is not connected"), + ("Socket is not connected"), -- "WSREP: Protocol violation. JOIN message sender 1.0 (host-91-221-67-96) is not in state transfer (SYNCED). Message ignored. ("is not in state transfer"), ("JOIN message from member .* in non-primary configuration"), diff --git a/mysql-test/suite/galera/r/galera_as_slave_nonprim.result b/mysql-test/suite/galera/r/galera_as_slave_nonprim.result index 99cb48403461..1624560041b4 100644 --- a/mysql-test/suite/galera/r/galera_as_slave_nonprim.result +++ b/mysql-test/suite/galera/r/galera_as_slave_nonprim.result @@ -14,7 +14,7 @@ STOP SLAVE; RESET SLAVE ALL; CALL mtr.add_suppression("Slave SQL: Error 'WSREP has not yet prepared node for application use' on query"); CALL mtr.add_suppression("Slave: WSREP has not yet prepared node for application use Error_code: 1047"); -CALL mtr.add_suppression("Transport endpoint is not connected"); +CALL mtr.add_suppression("(Transport endpoint is not connected|Socket is not connected)"); CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213"); CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047"); RESET MASTER; diff --git a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test index 0c06941f344e..a54074547d94 100644 --- a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test +++ b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test @@ -88,7 +88,7 @@ RESET SLAVE ALL; CALL mtr.add_suppression("Slave SQL: Error 'WSREP has not yet prepared node for application use' on query"); CALL mtr.add_suppression("Slave: WSREP has not yet prepared node for application use Error_code: 1047"); -CALL mtr.add_suppression("Transport endpoint is not connected"); +CALL mtr.add_suppression("(Transport endpoint is not connected|Socket is not connected)"); CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213"); CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047"); diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result index 6fb931638ef4..0e854fa6c230 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result +++ b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result @@ -116,6 +116,9 @@ VARIABLE_VALUE = 'Synced' SET GLOBAL wsrep_provider_options = 'pc.weight=1'; CALL mtr.add_suppression('WSREP: gcs_caused\\(\\) returned -1'); CALL mtr.add_suppression('overriding reported weight for'); +CALL mtr.add_suppression('SYNC message from member'); +CALL mtr.add_suppression('user message in state LEAVING'); +CALL mtr.add_suppression('sending install message failed: (Transport endpoint is not connected|Socket is not connected)'); CALL mtr.add_suppression('WSREP: user message in state LEAVING'); -CALL mtr.add_suppression('sending install message failed: Transport endpoint is not connected'); +CALL mtr.add_suppression('sending install message failed: (Transport endpoint is not connected|Socket is not connected)'); CALL mtr.add_suppression('overriding reported weight for'); diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test index d69881aa5ebf..5228a176963f 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test +++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test @@ -116,8 +116,11 @@ CALL mtr.add_suppression('WSREP: gcs_caused\\(\\) returned -1'); --connection node_2 CALL mtr.add_suppression('overriding reported weight for'); +CALL mtr.add_suppression('SYNC message from member'); +CALL mtr.add_suppression('user message in state LEAVING'); +CALL mtr.add_suppression('sending install message failed: (Transport endpoint is not connected|Socket is not connected)'); --connection node_3 CALL mtr.add_suppression('WSREP: user message in state LEAVING'); -CALL mtr.add_suppression('sending install message failed: Transport endpoint is not connected'); +CALL mtr.add_suppression('sending install message failed: (Transport endpoint is not connected|Socket is not connected)'); CALL mtr.add_suppression('overriding reported weight for'); From 186b3b1e10699ad11c906e89768c3d07216abefc Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Wed, 20 Sep 2017 18:38:08 +0300 Subject: [PATCH 275/305] Fix and enable galera.galera_bf_abort_for_update The test was not deterministic as it would not wait for the second INSERT to be applied (and thus the victim transaction rolled back). --- .../r/galera_bf_abort_for_update.result | 23 +++++++--- mysql-test/suite/galera/t/disabled.def | 1 - .../galera/t/galera_bf_abort_for_update.test | 45 +++++++++++++++---- 3 files changed, 53 insertions(+), 16 deletions(-) diff --git a/mysql-test/suite/galera/r/galera_bf_abort_for_update.result b/mysql-test/suite/galera/r/galera_bf_abort_for_update.result index 3978a3df193f..2367924466c4 100644 --- a/mysql-test/suite/galera/r/galera_bf_abort_for_update.result +++ b/mysql-test/suite/galera/r/galera_bf_abort_for_update.result @@ -1,10 +1,21 @@ -CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (1); +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, 10); +BEGIN; SELECT * FROM t1 FOR UPDATE; +f1 f2 +1 10 +UPDATE t1 SET f1 = 2; +COMMIT; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction -wsrep_local_aborts_increment +wsrep_local_bf_aborts_diff +1 +BEGIN; +SELECT * FROM t1 FOR UPDATE; +f1 f2 +2 10 +UPDATE t1 SET f2 = 20; +COMMIT; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +wsrep_local_bf_aborts_diff 1 DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/disabled.def b/mysql-test/suite/galera/t/disabled.def index 120d7a422cbd..205be60a0c80 100644 --- a/mysql-test/suite/galera/t/disabled.def +++ b/mysql-test/suite/galera/t/disabled.def @@ -1,5 +1,4 @@ galera_wsrep_provider_unset_set : lp1379204 'Unsupported protocol downgrade: incremental data collection disabled. Expect abort.' galera_kill_nochanges : mysql-wsrep#24 Galera server does not restart properly if killed -galera_bf_abort_for_update : mysql-wsrep#26 SELECT FOR UPDATE sometimes allowed to proceed in the face of a concurrent update galera_toi_ddl_fk_insert : qa#39 galera_toi_ddl_fk_insert fails sporadically galera_sst_xtrabackup-v2-options : SST Encryption does not work with xtrabackup 2.4.2 diff --git a/mysql-test/suite/galera/t/galera_bf_abort_for_update.test b/mysql-test/suite/galera/t/galera_bf_abort_for_update.test index 24c29778e5d2..13e48f8f3cec 100644 --- a/mysql-test/suite/galera/t/galera_bf_abort_for_update.test +++ b/mysql-test/suite/galera/t/galera_bf_abort_for_update.test @@ -5,25 +5,52 @@ # Test a local transaction being aborted by a slave one while it is running a SELECT FOR UPDATE # -CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT) ENGINE=InnoDB; ---connection node_2 ---let $wsrep_local_bf_aborts_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1, 10); + +# Test updating the PK --connection node_1 -INSERT INTO t1 VALUES (1); +--let $wsrep_local_bf_aborts_before = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts'` +BEGIN; +SELECT * FROM t1 FOR UPDATE; --connection node_2 +UPDATE t1 SET f1 = 2; + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--let $wait_condition = SELECT COUNT(*) FROM t1 WHERE f1 = 2 +--source include/wait_condition.inc + +--connection node_1 --error ER_LOCK_DEADLOCK +COMMIT; + +--disable_query_log +--eval SELECT variable_value - $wsrep_local_bf_aborts_before AS wsrep_local_bf_aborts_diff FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts' +--enable_query_log + +# Test updating non-indexed column + +--connection node_1 +--let $wsrep_local_bf_aborts_before = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts'` +BEGIN; SELECT * FROM t1 FOR UPDATE; ---let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` +--connection node_2 +UPDATE t1 SET f2 = 20; + +--connection node_1a +--let $wait_condition = SELECT COUNT(*) FROM t1 WHERE f2 = 20 +--source include/wait_condition.inc + +--connection node_1 +--error ER_LOCK_DEADLOCK +COMMIT; --disable_query_log ---eval SELECT $wsrep_local_bf_aborts_after - $wsrep_local_bf_aborts_before = 1 AS wsrep_local_aborts_increment; +--eval SELECT variable_value - $wsrep_local_bf_aborts_before AS wsrep_local_bf_aborts_diff FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts' --enable_query_log DROP TABLE t1; From 91fe8f882249b09d67082703d961d4ee74e66ea0 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Thu, 21 Sep 2017 16:24:06 +0300 Subject: [PATCH 276/305] Fix galera_3nodes.galera_garbd on FreeBSD Use pkill(1)'s short options -o and -f, recognized by both Linux and FreeBSD's pkill. --- mysql-test/suite/galera_3nodes/t/galera_garbd.test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/galera_3nodes/t/galera_garbd.test b/mysql-test/suite/galera_3nodes/t/galera_garbd.test index a68ba8ce15bb..519f992d1b48 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_garbd.test +++ b/mysql-test/suite/galera_3nodes/t/galera_garbd.test @@ -32,7 +32,10 @@ INSERT INTO t1 VALUES (1); SELECT COUNT(*) = 1 FROM t1; --echo Killing garbd ... ---exec pkill --oldest --full garbd.*$NODE_GALERAPORT_3 +# FreeBSD's /bin/pkill only supports short versions of the options: +# -o Select only the oldest (least recently started) +# -f Match against full argument lists +--exec pkill -o -f garbd.*$NODE_GALERAPORT_3 --sleep 5 From bd51984e8268cfa048c918d981ce88567804440a Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Thu, 21 Sep 2017 18:13:13 +0300 Subject: [PATCH 277/305] Fix wsrep_sst_xtrabackup-v2.sh on FreeBSD Use sockstat(1) on FreeBSD and ss(1) otherwise (old code) to check if we have a listening program on the given port. --- scripts/wsrep_sst_xtrabackup-v2.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh index 62284d1de8c3..11edc6225c30 100644 --- a/scripts/wsrep_sst_xtrabackup-v2.sh +++ b/scripts/wsrep_sst_xtrabackup-v2.sh @@ -656,7 +656,12 @@ wait_for_listen() for i in {1..300} do - ss -p state listening "( sport = :$PORT )" | grep -qE 'socat|nc' && break + if [ "`uname`" = "FreeBSD" ] ; then + get_listening_on_port_cmd="sockstat -l -P tcp -p $PORT" + else + get_listening_on_port_cmd="ss -p state listening ( sport = :$PORT )" + fi + $get_listening_on_port_cmd | grep -qE 'socat|nc' && break sleep 0.2 done From 231de8d52cce49b1b242d3e3c0e66d562cd2ddd8 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Thu, 21 Sep 2017 18:15:34 +0300 Subject: [PATCH 278/305] Fix galera_evs_suspect_timeout and galera_pc_weight on FreeBSD Use symbolic signal names (e.g. SIGSTOP) instead of numeric ones (e.g. 19) because the latter are not portable. --- mysql-test/include/galera_resume.inc | 2 +- mysql-test/include/galera_suspend.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/include/galera_resume.inc b/mysql-test/include/galera_resume.inc index 232cb46479e0..af8f2b956fd9 100644 --- a/mysql-test/include/galera_resume.inc +++ b/mysql-test/include/galera_resume.inc @@ -3,7 +3,7 @@ my $pid_filename = $ENV{'_SUSPEND_NODE_PIDFILE'}; my $mysqld_pid = `cat $pid_filename`; chomp($mysqld_pid); - system("kill -18 $mysqld_pid"); + system("kill -SIGCONT $mysqld_pid"); exit(0); EOF diff --git a/mysql-test/include/galera_suspend.inc b/mysql-test/include/galera_suspend.inc index 3495ad2342b1..d4037d8958ca 100644 --- a/mysql-test/include/galera_suspend.inc +++ b/mysql-test/include/galera_suspend.inc @@ -9,6 +9,6 @@ my $pid_filename = $ENV{'_SUSPEND_NODE_PIDFILE'}; my $mysqld_pid = `cat $pid_filename`; chomp($mysqld_pid); - system("kill -19 $mysqld_pid"); + system("kill -SIGSTOP $mysqld_pid"); exit(0); EOF From 7737f2701fb866811c116b2766b3384e7a38dc52 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Mon, 25 Sep 2017 20:32:58 +0300 Subject: [PATCH 279/305] Use performance_schema instead of information_schema in 5.7 The latter produces a deprecation warning. --- mysql-test/suite/galera/t/galera_bf_abort_for_update.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/galera/t/galera_bf_abort_for_update.test b/mysql-test/suite/galera/t/galera_bf_abort_for_update.test index 13e48f8f3cec..9f9a76b5f808 100644 --- a/mysql-test/suite/galera/t/galera_bf_abort_for_update.test +++ b/mysql-test/suite/galera/t/galera_bf_abort_for_update.test @@ -12,7 +12,7 @@ INSERT INTO t1 VALUES (1, 10); # Test updating the PK --connection node_1 ---let $wsrep_local_bf_aborts_before = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts'` +--let $wsrep_local_bf_aborts_before = `SELECT variable_value FROM performance_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts'` BEGIN; SELECT * FROM t1 FOR UPDATE; @@ -28,13 +28,13 @@ UPDATE t1 SET f1 = 2; COMMIT; --disable_query_log ---eval SELECT variable_value - $wsrep_local_bf_aborts_before AS wsrep_local_bf_aborts_diff FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts' +--eval SELECT variable_value - $wsrep_local_bf_aborts_before AS wsrep_local_bf_aborts_diff FROM performance_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts' --enable_query_log # Test updating non-indexed column --connection node_1 ---let $wsrep_local_bf_aborts_before = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts'` +--let $wsrep_local_bf_aborts_before = `SELECT variable_value FROM performance_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts'` BEGIN; SELECT * FROM t1 FOR UPDATE; @@ -50,7 +50,7 @@ UPDATE t1 SET f2 = 20; COMMIT; --disable_query_log ---eval SELECT variable_value - $wsrep_local_bf_aborts_before AS wsrep_local_bf_aborts_diff FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts' +--eval SELECT variable_value - $wsrep_local_bf_aborts_before AS wsrep_local_bf_aborts_diff FROM performance_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts' --enable_query_log DROP TABLE t1; From de8f4288966941027fca7fa46b8a4b881fc535b3 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 27 Sep 2017 14:35:20 +0200 Subject: [PATCH 280/305] MW-412 Fix configuration of MTR test galera_3nodes.galera_ipv6_xtrabackup-v2 Set wsrep_sst_donor to ensure that node_1 is always picked as donor node (as expected by the test itself). --- .../suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf b/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf index 8a80be0d2a90..5cc8fb04cdd7 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_xtrabackup-v2.cnf @@ -5,18 +5,22 @@ wsrep_sst_method=xtrabackup-v2 wsrep_sst_auth="root:" [mysqld.1] +wsrep_node_name='node_1' wsrep-cluster-address=gcomm:// wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port' wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port' wsrep_node_incoming_address='[::1]:@mysqld.1.port' [mysqld.2] +wsrep_node_name='node_2' +wsrep_sst_donor='node_1' wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port' wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port' wsrep_node_incoming_address='[::1]:@mysqld.2.port' [mysqld.3] +wsrep_node_name='node_3' wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port' wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port' wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port' From fbccf32725528f231aaaf42c8ffb49f34fcdf06e Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 29 Sep 2017 11:58:22 +0200 Subject: [PATCH 281/305] MW-409 Remove redundant call to thd->wsrep_set_next_trx_id() --- sql/sql_parse.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 575280a07581..982626584646 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1705,11 +1705,6 @@ bool dispatch_command(THD *thd, const COM_DATA *com_data, break; #ifdef WITH_WSREP - if (WSREP(thd) && thd->wsrep_next_trx_id() == WSREP_UNDEFINED_TRX_ID) - { - thd->set_wsrep_next_trx_id(thd->query_id); - WSREP_DEBUG("assigned new next trx id: %lu", thd->wsrep_next_trx_id()); - } wsrep_mysql_parse(thd, thd->query().str, thd->query().length, &parser_state); #else mysql_parse(thd, &parser_state); From 0cc9ec6d87964cf59d39fa0258e01c715eb6ebbc Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 4 Oct 2017 16:07:29 +0200 Subject: [PATCH 282/305] MW-415 THD::COND_wsrep_thd is never destroyed THD::COND_wsrep_thd is never destroyed. This patch adds missing call to mysql_cond_destroy(&COND_wsrep_thd) in THD::release_resources(). --- sql/sql_class.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 909749a28f2c..626fa0a2457c 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1843,6 +1843,7 @@ void THD::release_resources() mysql_mutex_lock(&LOCK_wsrep_thd); mysql_mutex_unlock(&LOCK_wsrep_thd); mysql_mutex_destroy(&LOCK_wsrep_thd); + mysql_cond_destroy(&COND_wsrep_thd); if (wsrep_rli) delete wsrep_rli; wsrep_free_status(this); #endif From b7d7fb2d0b98cdc4195e51e91f8f6e4a081b74b4 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Thu, 5 Oct 2017 11:41:02 +0200 Subject: [PATCH 283/305] MW-415 THD::COND_wsrep_thd is never destroyed THD::COND_wsrep_thd is never destroyed. This patch adds missing call to mysql_cond_destroy(&COND_wsrep_thd) in THD::release_resources(). --- sql/sql_class.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 9b33a3358e07..223bef0faaea 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1615,6 +1615,7 @@ THD::~THD() mysql_mutex_lock(&LOCK_wsrep_thd); mysql_mutex_unlock(&LOCK_wsrep_thd); mysql_mutex_destroy(&LOCK_wsrep_thd); + mysql_cond_destroy(&COND_wsrep_thd); if (wsrep_rli) delete wsrep_rli; if (wsrep_status_vars) wsrep->stats_free(wsrep, wsrep_status_vars); #endif From 62a55c5fffc1c261c6d5903b4a3eabf9fb946794 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 3 Oct 2017 23:37:02 +0300 Subject: [PATCH 284/305] MW-416 Moved TOI replication to happen after ACL checking for commands: SQLCOM_CREATE_EVENT SQLCOM_ALTER_EVENT SQLCOM_DROP_EVENT SQLCOM_CREATE_VIEW SQLCOM_CREATE_TRIGGER SQLCOM_DROP_TRIGGER SQLCOM_INSTALL_PLUGIN SQLCOM_UNINSTALL_PLUGIN --- sql/events.cc | 17 ++++++++++++++++- sql/sql_parse.cc | 5 ----- sql/sql_plugin.cc | 28 ++++++++-------------------- sql/sql_trigger.cc | 5 +++++ sql/sql_view.cc | 5 +++++ 5 files changed, 34 insertions(+), 26 deletions(-) diff --git a/sql/events.cc b/sql/events.cc index 0ee0026f0de5..0c0a35d1da08 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -327,6 +327,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, if (check_access(thd, EVENT_ACL, parse_data->dbname.str, NULL, NULL, 0, 0)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (lock_object_name(thd, MDL_key::EVENT, parse_data->dbname.str, parse_data->name.str)) @@ -395,7 +396,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, thd->add_to_binlog_accessed_dbs(parse_data->dbname.str); /* If the definer is not set or set to CURRENT_USER, the value of CURRENT_USER - will be written into the binary log as the definer for the SQL thread. + will be written int the binary log as the definer for the SQL thread. */ ret= write_bin_log(thd, TRUE, log_query.c_ptr(), log_query.length()); } @@ -408,6 +409,10 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, thd->variables.binlog_format= save_binlog_format; DBUG_RETURN(ret); +#ifdef WITH_WSREP + error: + DBUG_RETURN(true); +#endif /* WITH_WSREP */ } @@ -449,6 +454,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, if (check_access(thd, EVENT_ACL, parse_data->dbname.str, NULL, NULL, 0, 0)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (lock_object_name(thd, MDL_key::EVENT, parse_data->dbname.str, parse_data->name.str)) @@ -547,6 +553,10 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, thd->variables.binlog_format= save_binlog_format; DBUG_RETURN(ret); +#ifdef WITH_WSREP + error: + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ } @@ -585,6 +595,7 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) if (check_access(thd, EVENT_ACL, dbname.str, NULL, NULL, 0, 0)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (lock_object_name(thd, MDL_key::EVENT, dbname.str, name.str)) @@ -606,6 +617,10 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) #endif } DBUG_RETURN(ret); +#ifdef WITH_WSREP + error: + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 982626584646..33e4da045749 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4301,7 +4301,6 @@ case SQLCOM_PREPARE: if (res) break; - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) switch (lex->sql_command) { case SQLCOM_CREATE_EVENT: { @@ -4351,7 +4350,6 @@ case SQLCOM_PREPARE: } case SQLCOM_DROP_EVENT: { - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) LEX_STRING db_lex_str= {const_cast(lex->spname->m_db.str), lex->spname->m_db.length}; if (!(res= Events::drop_event(thd, @@ -5286,7 +5284,6 @@ case SQLCOM_PREPARE: Note: SQLCOM_CREATE_VIEW also handles 'ALTER VIEW' commands as specified through the thd->lex->create_view_mode flag. */ - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_create_view(thd, first_table, thd->lex->create_view_mode); break; } @@ -5302,7 +5299,6 @@ case SQLCOM_PREPARE: case SQLCOM_CREATE_TRIGGER: { /* Conditionally writes to binlog. */ - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_create_or_drop_trigger(thd, all_tables, 1); break; @@ -5310,7 +5306,6 @@ case SQLCOM_PREPARE: case SQLCOM_DROP_TRIGGER: { /* Conditionally writes to binlog. */ - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_create_or_drop_trigger(thd, all_tables, 0); break; } diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index cb395b24edc3..45b7b9d1eefd 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1984,6 +1984,7 @@ static bool mysql_install_plugin(THD *thd, const LEX_STRING *name, if (!opt_noacl && check_table_access(thd, INSERT_ACL, &tables, false, 1, false)) DBUG_RETURN(true); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) /* need to open before acquiring LOCK_plugin or it will deadlock */ if (! (table = open_ltable(thd, &tables, TL_WRITE, @@ -2083,6 +2084,9 @@ static bool mysql_install_plugin(THD *thd, const LEX_STRING *name, mysql_mutex_unlock(&LOCK_plugin); trans_rollback_stmt(thd); close_mysql_tables(thd); +#ifdef WITH_WSREP + error: +#endif /* WITH_WSREP */ DBUG_RETURN(true); } @@ -2103,6 +2107,7 @@ static bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) if (!opt_noacl && check_table_access(thd, DELETE_ACL, &tables, false, 1, false)) DBUG_RETURN(true); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) /* need to open before acquiring LOCK_plugin or it will deadlock */ if (! (table= open_ltable(thd, &tables, TL_WRITE, MYSQL_LOCK_IGNORE_TIMEOUT))) @@ -2263,6 +2268,9 @@ static bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) trans_rollback_stmt(thd); close_mysql_tables(thd); +#ifdef WITH_WSREP + error: +#endif /* WITH_WSREP */ DBUG_RETURN(true); } @@ -4241,43 +4249,23 @@ int unlock_plugin_data() bool Sql_cmd_install_plugin::execute(THD *thd) { -#ifdef WITH_WSREP - bool st; - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); - st= mysql_install_plugin(thd, &m_comment, &m_ident); -#else bool st= mysql_install_plugin(thd, &m_comment, &m_ident); -#endif /* WITH_WSREP */ if (!st) my_ok(thd); #ifndef EMBEDDED_LIBRARY mysql_audit_release(thd); #endif return st; -#ifdef WITH_WSREP - error: - return true; -#endif /* WITH_WSREP */ } bool Sql_cmd_uninstall_plugin::execute(THD *thd) { -#ifdef WITH_WSREP - bool st; - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) - st= mysql_uninstall_plugin(thd, &m_comment); -#else bool st= mysql_uninstall_plugin(thd, &m_comment); -#endif /* WITH_WSREP */ if (!st) my_ok(thd); #ifndef EMBEDDED_LIBRARY mysql_audit_release(thd); #endif return st; -#ifdef WITH_WSREP - error: - return true; -#endif /* WITH_WSREP */ } diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 1885215a6d23..416a6bc5737f 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -128,6 +128,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) my_error(ER_BINLOG_CREATE_ROUTINE_NEED_SUPER, MYF(0)); DBUG_RETURN(TRUE); } + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (!create) { @@ -313,6 +314,10 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) my_ok(thd); } +#ifdef WITH_WSREP + error: + DBUG_RETURN(true); +#endif /* WITH_WSREP */ DBUG_RETURN(result); } diff --git a/sql/sql_view.cc b/sql/sql_view.cc index d9605a294dac..966eb401f74e 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -430,6 +430,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, if ((res= create_view_precheck(thd, tables, view, mode))) goto err; + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) lex->link_first_table_back(view, link_to_local); view->open_type= OT_BASE_ONLY; @@ -759,6 +760,10 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, lex->link_first_table_back(view, link_to_local); unit->cleanup(true); DBUG_RETURN(res || thd->is_error()); +#ifdef WITH_WSREP + error: + DBUG_RETURN(true); +#endif /* WITH_WSREP */ } From eee0aec958f696d40084cc9ca2cf96ffe038bb33 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 4 Oct 2017 21:42:42 +0300 Subject: [PATCH 285/305] MW-416 Fixed a typo in native mysql comment, which was brought in by sjaakola in Marc 10 2017 --- sql/events.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/events.cc b/sql/events.cc index 0c0a35d1da08..877a95f6204c 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -396,7 +396,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, thd->add_to_binlog_accessed_dbs(parse_data->dbname.str); /* If the definer is not set or set to CURRENT_USER, the value of CURRENT_USER - will be written int the binary log as the definer for the SQL thread. + will be written into the binary log as the definer for the SQL thread. */ ret= write_bin_log(thd, TRUE, log_query.c_ptr(), log_query.length()); } From 002aecf8093dd69e02bf9c3484b42363d0487d0e Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 4 Oct 2017 22:47:59 +0300 Subject: [PATCH 286/305] MW-416 Changed return code for replicatio error to TRUE. This is aligned with native mysql convention to return TRUE (defined to 1) or FALSE (defined to 0) from a bool function. This is wrong, but follows the mysql conventiosn, at least... --- sql/events.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/events.cc b/sql/events.cc index 877a95f6204c..bf1a54e0967f 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -411,7 +411,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, DBUG_RETURN(ret); #ifdef WITH_WSREP error: - DBUG_RETURN(true); + DBUG_RETURN(TRUE); #endif /* WITH_WSREP */ } From 6a495e6d776e2e36d5e68fddb61e99258ce02e0f Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 6 Oct 2017 09:49:42 +0300 Subject: [PATCH 287/305] MW-416 DDL replication moved after acl checking galera_events test shows a regression with the original fix for MW-416 Reason was that Events::drop_event() can be called also from inside event execution, and there we have a speacial treatment for event, which executes "DROP EVENT" statement, and runs TOI replication inside the event processing body. This resulted in executing WSREP_TO_ISOLATION two times for such DROP EVENT statement. Fix is to call WSREP_TO_ISOLATION_BEGIN only in Events::drop_event() --- sql/event_data_objects.cc | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index fd35af1a1a2b..ba8fe148c34e 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1485,23 +1485,34 @@ Event_job_data::execute(THD *thd, bool drop) thd->tx_read_only= false; #ifdef WITH_WSREP - if (WSREP(thd)) { - // sql_print_information("sizeof(LEX) = %d", sizeof(struct LEX)); - // sizeof(LEX) = 4512, so it's relatively safe to allocate it on stack. - LEX lex; - LEX* saved = thd->lex; - lex.sql_command = SQLCOM_DROP_EVENT; - thd->lex = &lex; - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); - thd->lex = saved; + /* + This code is processing event execution and does not have client + connection. Here, event execution will now execute a prepared + DROP EVENT statement, but thd->lex->sql_command is set to + SQLCOM_CREATE_PROCEDURE + DROP EVENT will be logged in binlog, and we have to + replicate it to make all nodes have consistent event definitions + Wsrep DDL replication is triggered inside Events::drop_event(), + and here we need to prepare the THD so that DDL replication is + possible, essentially it requires setting sql_command to + SQLCOMM_DROP_EVENT, we will switch sql_command for the duration + of DDL replication only. + */ + enum_sql_command sql_command_save= SQLCOM_END; + if (WSREP(thd)) + { + sql_command_save= thd->lex->sql_command; + thd->lex->sql_command = SQLCOM_DROP_EVENT; } #endif ret= Events::drop_event(thd, dbname, name, FALSE); - #ifdef WITH_WSREP - WSREP_TO_ISOLATION_END; - error: + if (WSREP(thd)) + { + WSREP_TO_ISOLATION_END; + thd->lex->sql_command = sql_command_save; + } #endif thd->tx_read_only= save_tx_read_only; thd->security_context()->set_master_access(saved_master_access); From 8ff1c511bd706ba64980680f34c88494a617c37c Mon Sep 17 00:00:00 2001 From: sjaakola Date: Fri, 6 Oct 2017 13:19:09 +0300 Subject: [PATCH 288/305] MW-416 DDL replication moved after acl checking Secured the logic of setting sql_command for the duration of WSREP_TO_ISOLATION calls --- sql/event_data_objects.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index ba8fe148c34e..a163348c67f4 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1498,17 +1498,17 @@ Event_job_data::execute(THD *thd, bool drop) SQLCOMM_DROP_EVENT, we will switch sql_command for the duration of DDL replication only. */ - enum_sql_command sql_command_save= SQLCOM_END; - if (WSREP(thd)) + const enum_sql_command sql_command_save= thd->lex->sql_command; + const bool sql_command_set= WSREP(thd); + if (sql_command_set) { - sql_command_save= thd->lex->sql_command; thd->lex->sql_command = SQLCOM_DROP_EVENT; } #endif ret= Events::drop_event(thd, dbname, name, FALSE); #ifdef WITH_WSREP - if (WSREP(thd)) + if (sql_command_set) { WSREP_TO_ISOLATION_END; thd->lex->sql_command = sql_command_save; From be352d89395554d8e31ca5cf7795961a11135aeb Mon Sep 17 00:00:00 2001 From: sjaakola Date: Mon, 9 Oct 2017 12:02:55 +0300 Subject: [PATCH 289/305] MW-416 moving DDL replication to happen after ACL check Fixed a mistake in original patch for this bug. The error return for wsrep execution masked out the native function return, we forced failure return code for sql_trigger.cc:mysql_create_or_drop_trigger() --- sql/sql_trigger.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 416a6bc5737f..91dfe233e992 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -314,11 +314,11 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) my_ok(thd); } + DBUG_RETURN(result); #ifdef WITH_WSREP error: DBUG_RETURN(true); #endif /* WITH_WSREP */ - DBUG_RETURN(result); } From 778043d3f4be3b648fea40c22d1b5f6042205dff Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 10 Oct 2017 10:06:59 +0300 Subject: [PATCH 290/305] MW-416 Replicating DDL after ACL checks Implemented mtr test for executing all possible DDL and DCL statements with non privileged user account. Checking that nothing was replicated during the test. DDL and DCL syntax is from MySQL 5.7 manual. --- mysql-test/suite/galera/r/MW-416.result | 117 +++++++++++++++++++++ mysql-test/suite/galera/t/MW-416.test | 132 ++++++++++++++++++++++++ 2 files changed, 249 insertions(+) create mode 100644 mysql-test/suite/galera/r/MW-416.result create mode 100644 mysql-test/suite/galera/t/MW-416.test diff --git a/mysql-test/suite/galera/r/MW-416.result b/mysql-test/suite/galera/r/MW-416.result new file mode 100644 index 000000000000..7c62e5bc410f --- /dev/null +++ b/mysql-test/suite/galera/r/MW-416.result @@ -0,0 +1,117 @@ +CREATE USER 'userMW416'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost'; +SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; +Variable_name Value +wsrep_replicated 2 +ALTER DATABASE db CHARACTER SET = utf8; +ERROR 42000: Access denied for user 'userMW416'@'localhost' to database 'db' +ALTER EVENT ev1 RENAME TO ev2; +ERROR 42000: Access denied for user 'userMW416'@'localhost' to database 'test' +ALTER FUNCTION fun1 COMMENT 'foo'; +ERROR 42000: alter routine command denied to user 'userMW416'@'localhost' for routine 'test.fun1' +ALTER INSTANCE ROTATE INNODB MASTER KEY; +Got one of the listed errors +ALTER LOGFILE GROUP lfg ADD UNDOFILE 'file' ENGINE=InnoDB; +Got one of the listed errors +ALTER PROCEDURE proc1 COMMENT 'foo'; +Got one of the listed errors +ALTER SERVER srv OPTIONS (USER 'sally'); +Got one of the listed errors +ALTER TABLE tbl DROP COLUMN col; +Got one of the listed errors +ALTER TABLESPACE tblspc DROP DATAFILE 'file' ENGINE=innodb; +Got one of the listed errors +ALTER VIEW vw AS SELECT 1; +Got one of the listed errors +CREATE DATABASE db; +Got one of the listed errors +CREATE EVENT ev1 ON SCHEDULE AT CURRENT_TIMESTAMP DO SELECT 1; +Got one of the listed errors +CREATE FUNCTION fun1() RETURNS int RETURN(1); +Got one of the listed errors +CREATE FUNCTION fun1 RETURNS STRING SONAME 'funlib.so'; +Got one of the listed errors +CREATE PROCEDURE proc1() BEGIN END; +Got one of the listed errors +CREATE INDEX idx ON tbl(id); +Got one of the listed errors +CREATE LOGFILE GROUP lfg ADD UNDOFILE 'undofile' ENGINE innodb; +Got one of the listed errors +CREATE SERVER srv FOREIGN DATA WRAPPER 'fdw' OPTIONS (USER 'user'); +Got one of the listed errors +CREATE TABLE t (i int); +Got one of the listed errors +CREATE TABLESPACE tblspc ADD DATAFILE 'file' ENGINE=innodb; +Got one of the listed errors +CREATE TRIGGER trg BEFORE UPDATE ON t FOR EACH ROW BEGIN END; +Got one of the listed errors +CREATE VIEW vw AS SELECT 1; +Got one of the listed errors +DROP DATABASE db; +Got one of the listed errors +DROP EVENT ev; +Got one of the listed errors +DROP FUNCTION fun1; +Got one of the listed errors +DROP INDEX idx ON t0; +Got one of the listed errors +DROP LOGFILE GROUP lfg; +Got one of the listed errors +DROP PROCEDURE proc1; +Got one of the listed errors +DROP SERVEr srv; +Got one of the listed errors +DROP TABLE t0; +Got one of the listed errors +DROP TABLESPACE tblspc; +Got one of the listed errors +DROP TRIGGER trg; +Got one of the listed errors +DROP VIEW vw; +Got one of the listed errors +RENAME TABLE t0 TO t1; +Got one of the listed errors +TRUNCATE TABLE t0; +Got one of the listed errors +ALTER USER myuser IDENTIFIED BY 'pass'; +Got one of the listed errors +CREATE USER myuser IDENTIFIED BY 'pass'; +Got one of the listed errors +DROP USER myuser; +Got one of the listed errors +GRANT ALL ON *.* TO 'myuser'; +Got one of the listed errors +RENAME USER myuser TO mariauser; +Got one of the listed errors +REVOKE SELECT ON test FROM myuser; +Got one of the listed errors +REVOKE ALL, GRANT OPTION FROM myuser; +Got one of the listed errors +REVOKE PROXY ON myuser FROM myuser; +Got one of the listed errors +ANALYZE TABLE db.tbl; +Got one of the listed errors +CHECK TABLE db.tbl; +Got one of the listed errors +CHECKSUM TABLE db.tbl; +Got one of the listed errors +OPTIMIZE TABLE db.tbl; +Got one of the listed errors +REPAIR TABLE db.tbl; +Got one of the listed errors +INSTALL PLUGIN plg SONAME 'plg.so'; +Got one of the listed errors +UNINSTALL PLUGIN plg; +Got one of the listed errors +DROP USER 'userMW416'@'localhost'; +SHOW DATABASES; +Database +information_schema +mtr +mysql +performance_schema +sys +test +SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; +Variable_name Value +wsrep_replicated 3 diff --git a/mysql-test/suite/galera/t/MW-416.test b/mysql-test/suite/galera/t/MW-416.test new file mode 100644 index 000000000000..27d20148f9c7 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-416.test @@ -0,0 +1,132 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE USER 'userMW416'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost'; + +SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; + +--connect userMW416, localhost, userMW416,, test, $NODE_MYPORT_1 +--connection userMW416 + +# DDL + +--error 1044 +ALTER DATABASE db CHARACTER SET = utf8; +--error 1044 +ALTER EVENT ev1 RENAME TO ev2; +--error 1370 +ALTER FUNCTION fun1 COMMENT 'foo'; +--error 1044,1227 +ALTER INSTANCE ROTATE INNODB MASTER KEY; +--error 1044,1227 +ALTER LOGFILE GROUP lfg ADD UNDOFILE 'file' ENGINE=InnoDB; +--error 1044,1227,1370 +ALTER PROCEDURE proc1 COMMENT 'foo'; +--error 1044,1227,1370 +ALTER SERVER srv OPTIONS (USER 'sally'); +--error 1044,1142,1227,1370 +ALTER TABLE tbl DROP COLUMN col; +--error 1044,1227,1370 +ALTER TABLESPACE tblspc DROP DATAFILE 'file' ENGINE=innodb; +--error 1044,1142,1227,1370 +ALTER VIEW vw AS SELECT 1; + +--error 1044,1227,1370 +CREATE DATABASE db; +--error 1044,1227,1370 +CREATE EVENT ev1 ON SCHEDULE AT CURRENT_TIMESTAMP DO SELECT 1; +--error 1044,1227,1370 +CREATE FUNCTION fun1() RETURNS int RETURN(1); +--error 1044,1227,1370 +CREATE FUNCTION fun1 RETURNS STRING SONAME 'funlib.so'; +--error 1044,1227,1370 +CREATE PROCEDURE proc1() BEGIN END; +--error 1044,1142,1227,1370 +CREATE INDEX idx ON tbl(id); +--error 1044,1142,1227,1370 +CREATE LOGFILE GROUP lfg ADD UNDOFILE 'undofile' ENGINE innodb; +--error 1044,1142,1227,1370 +CREATE SERVER srv FOREIGN DATA WRAPPER 'fdw' OPTIONS (USER 'user'); +--error 1044,1142,1227,1370 +CREATE TABLE t (i int); +--error 1044,1142,1227,1370 +CREATE TABLESPACE tblspc ADD DATAFILE 'file' ENGINE=innodb; +--error 1044,1142,1227,1370 +CREATE TRIGGER trg BEFORE UPDATE ON t FOR EACH ROW BEGIN END; +--error 1044,1142,1227,1370 +CREATE VIEW vw AS SELECT 1; + + + +--error 1044,1142,1227,1370 +DROP DATABASE db; +--error 1044,1142,1227,1370 +DROP EVENT ev; +--error 1044,1142,1227,1370 +DROP FUNCTION fun1; +--error 1044,1142,1227,1370 +DROP INDEX idx ON t0; +--error 1044,1142,1227,1370 +DROP LOGFILE GROUP lfg; +--error 1044,1142,1227,1370 +DROP PROCEDURE proc1; +--error 1044,1142,1227,1370 +DROP SERVEr srv; +--error 1044,1142,1227,1370 +DROP TABLE t0; +--error 1044,1142,1227,1370 +DROP TABLESPACE tblspc; +--error 1044,1142,1227,1360,1370 +DROP TRIGGER trg; +--error 1044,1142,1227,1370 +DROP VIEW vw; + +--error 1044,1142,1227,1370 +RENAME TABLE t0 TO t1; + +--error 1044,1142,1227,1370 +TRUNCATE TABLE t0; + +# DCL + +# account management +--error 1044,1142,1227,1370 +ALTER USER myuser IDENTIFIED BY 'pass'; +--error 1044,1142,1227,1370 +CREATE USER myuser IDENTIFIED BY 'pass'; +--error 1044,1142,1227,1370 +DROP USER myuser; +--error 1044,1045,1142,1227,1370 +GRANT ALL ON *.* TO 'myuser'; +--error 1044,1142,1227,1370 +RENAME USER myuser TO mariauser; +--error 1044,1142,1227,1370 +REVOKE SELECT ON test FROM myuser; +--error 1044,1142,1227,1370,1698 +REVOKE ALL, GRANT OPTION FROM myuser; +--error 1044,1142,1227,1370,1698 +REVOKE PROXY ON myuser FROM myuser; + +# table maintenance +--error 1044,1142,1227,1370 +ANALYZE TABLE db.tbl; +--error 1044,1142,1227,1370 +CHECK TABLE db.tbl; +--error 1044,1142,1227,1370 +CHECKSUM TABLE db.tbl; +--error 1044,1142,1227,1370 +OPTIMIZE TABLE db.tbl; +--error 1044,1142,1227,1370 +REPAIR TABLE db.tbl; + +# plugin and user defined functions +--error 1044,1142,1227,1370 +INSTALL PLUGIN plg SONAME 'plg.so'; +--error 1044,1142,1227,1370 +UNINSTALL PLUGIN plg; + +--connection node_1 +DROP USER 'userMW416'@'localhost'; +SHOW DATABASES; +SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; From d3f1b9ea16d37efe9ba671bf45bc5c2c3f409843 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 10 Oct 2017 10:09:47 +0300 Subject: [PATCH 291/305] MW-416 Replicating DDL after ACL check CREATE TRIGGER replication happened still too early, mtr test failed for this Moved CREATE TRIGGER replication later after privilege checking --- sql/sql_trigger.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 91dfe233e992..1cbfa23cddea 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -128,7 +128,6 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) my_error(ER_BINLOG_CREATE_ROUTINE_NEED_SUPER, MYF(0)); DBUG_RETURN(TRUE); } - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (!create) { @@ -189,6 +188,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) if (err_status) goto end; } + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) /* We should have only one table in table list. */ DBUG_ASSERT(tables->next_global == 0); From baf9a09686c9988d2e7c23cbced880edfd3355a4 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 10 Oct 2017 11:08:14 +0300 Subject: [PATCH 292/305] MW-416 Convert error numbers to symbolic names in MW-416.test --- mysql-test/suite/galera/t/MW-416.test | 100 +++++++++++++------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/mysql-test/suite/galera/t/MW-416.test b/mysql-test/suite/galera/t/MW-416.test index 27d20148f9c7..0141d3c12342 100644 --- a/mysql-test/suite/galera/t/MW-416.test +++ b/mysql-test/suite/galera/t/MW-416.test @@ -11,119 +11,119 @@ SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; # DDL ---error 1044 +--error ER_DBACCESS_DENIED_ERROR ALTER DATABASE db CHARACTER SET = utf8; ---error 1044 +--error ER_DBACCESS_DENIED_ERROR ALTER EVENT ev1 RENAME TO ev2; ---error 1370 +--error ER_PROCACCESS_DENIED_ERROR ALTER FUNCTION fun1 COMMENT 'foo'; ---error 1044,1227 +--error ER_DBACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER INSTANCE ROTATE INNODB MASTER KEY; ---error 1044,1227 +--error ER_DBACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR ALTER LOGFILE GROUP lfg ADD UNDOFILE 'file' ENGINE=InnoDB; ---error 1044,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR ALTER PROCEDURE proc1 COMMENT 'foo'; ---error 1044,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR ALTER SERVER srv OPTIONS (USER 'sally'); ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR ALTER TABLE tbl DROP COLUMN col; ---error 1044,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR ALTER TABLESPACE tblspc DROP DATAFILE 'file' ENGINE=innodb; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR ALTER VIEW vw AS SELECT 1; ---error 1044,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE DATABASE db; ---error 1044,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE EVENT ev1 ON SCHEDULE AT CURRENT_TIMESTAMP DO SELECT 1; ---error 1044,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE FUNCTION fun1() RETURNS int RETURN(1); ---error 1044,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE FUNCTION fun1 RETURNS STRING SONAME 'funlib.so'; ---error 1044,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE PROCEDURE proc1() BEGIN END; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE INDEX idx ON tbl(id); ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE LOGFILE GROUP lfg ADD UNDOFILE 'undofile' ENGINE innodb; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE SERVER srv FOREIGN DATA WRAPPER 'fdw' OPTIONS (USER 'user'); ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE TABLE t (i int); ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE TABLESPACE tblspc ADD DATAFILE 'file' ENGINE=innodb; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE TRIGGER trg BEFORE UPDATE ON t FOR EACH ROW BEGIN END; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE VIEW vw AS SELECT 1; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR DROP DATABASE db; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR DROP EVENT ev; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR DROP FUNCTION fun1; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR DROP INDEX idx ON t0; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR DROP LOGFILE GROUP lfg; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR DROP PROCEDURE proc1; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR DROP SERVEr srv; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR DROP TABLE t0; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR DROP TABLESPACE tblspc; ---error 1044,1142,1227,1360,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_TRG_DOES_NOT_EXIST,ER_PROCACCESS_DENIED_ERROR DROP TRIGGER trg; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR DROP VIEW vw; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR RENAME TABLE t0 TO t1; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR TRUNCATE TABLE t0; # DCL # account management ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR ALTER USER myuser IDENTIFIED BY 'pass'; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CREATE USER myuser IDENTIFIED BY 'pass'; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR DROP USER myuser; ---error 1044,1045,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_ACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR GRANT ALL ON *.* TO 'myuser'; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR RENAME USER myuser TO mariauser; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR REVOKE SELECT ON test FROM myuser; ---error 1044,1142,1227,1370,1698 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR,ER_ACCESS_DENIED_NO_PASSWORD_ERROR REVOKE ALL, GRANT OPTION FROM myuser; ---error 1044,1142,1227,1370,1698 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR,ER_ACCESS_DENIED_NO_PASSWORD_ERROR REVOKE PROXY ON myuser FROM myuser; # table maintenance ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR ANALYZE TABLE db.tbl; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CHECK TABLE db.tbl; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR CHECKSUM TABLE db.tbl; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR OPTIMIZE TABLE db.tbl; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR REPAIR TABLE db.tbl; # plugin and user defined functions ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR INSTALL PLUGIN plg SONAME 'plg.so'; ---error 1044,1142,1227,1370 +--error ER_DBACCESS_DENIED_ERROR,ER_TABLEACCESS_DENIED_ERROR,ER_SPECIFIC_ACCESS_DENIED_ERROR,ER_PROCACCESS_DENIED_ERROR UNINSTALL PLUGIN plg; --connection node_1 From db25f126a8f8c496b30c217a0cb93a64f09128b9 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 10 Oct 2017 13:02:57 +0300 Subject: [PATCH 293/305] MW-416 Fix MW-416.test not to rely on any particular values of 'wsrep_replicated' --- mysql-test/suite/galera/r/MW-416.result | 8 ++------ mysql-test/suite/galera/t/MW-416.test | 7 +++++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/mysql-test/suite/galera/r/MW-416.result b/mysql-test/suite/galera/r/MW-416.result index 7c62e5bc410f..c7a8bb8b897d 100644 --- a/mysql-test/suite/galera/r/MW-416.result +++ b/mysql-test/suite/galera/r/MW-416.result @@ -1,8 +1,5 @@ CREATE USER 'userMW416'@'localhost'; GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost'; -SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; -Variable_name Value -wsrep_replicated 2 ALTER DATABASE db CHARACTER SET = utf8; ERROR 42000: Access denied for user 'userMW416'@'localhost' to database 'db' ALTER EVENT ev1 RENAME TO ev2; @@ -112,6 +109,5 @@ mysql performance_schema sys test -SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; -Variable_name Value -wsrep_replicated 3 +wsrep_replicated_after_diff +1 diff --git a/mysql-test/suite/galera/t/MW-416.test b/mysql-test/suite/galera/t/MW-416.test index 0141d3c12342..84e37ed19918 100644 --- a/mysql-test/suite/galera/t/MW-416.test +++ b/mysql-test/suite/galera/t/MW-416.test @@ -4,7 +4,7 @@ CREATE USER 'userMW416'@'localhost'; GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost'; -SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; +--let $wsrep_replicated_before = `SELECT variable_value FROM performance_schema.global_status WHERE variable_name = 'wsrep_replicated'` --connect userMW416, localhost, userMW416,, test, $NODE_MYPORT_1 --connection userMW416 @@ -129,4 +129,7 @@ UNINSTALL PLUGIN plg; --connection node_1 DROP USER 'userMW416'@'localhost'; SHOW DATABASES; -SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; +--let $wsrep_replicated_after = `SELECT variable_value FROM performance_schema.global_status WHERE variable_name = 'wsrep_replicated'` +--disable_query_log +--eval SELECT $wsrep_replicated_after - $wsrep_replicated_before AS wsrep_replicated_after_diff +--enable_query_log From 6c3e42575cd2dd9b72bb1a9575c56a5ae62f8c3c Mon Sep 17 00:00:00 2001 From: sjaakola Date: Sun, 8 Oct 2017 23:44:19 +0300 Subject: [PATCH 294/305] MW-417 ALTER EVENT replication failure Fixed the parsing in ALTER EVENT parsing. This is regression from original merging from 5.6 code. galera_events test stresses this part in code but fails to make the bug to surface. Without this commit, the node 2's error log has an error message about ALTER EVENt applying. Problem was that ALTER EVENT statement was badly constructed in node 1. --- sql/sql_yacc.yy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 463d4579ce79..4f24ffef6d81 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -7622,8 +7622,8 @@ alter: Lex->event_parse_data->identifier= $4; Lex->sql_command= SQLCOM_ALTER_EVENT; -#ifdef WITH_WSREP_OUT - /*Lex->stmt_definition_begin= $3;*/ +#ifdef WITH_WSREP + Lex->stmt_definition_begin= @3.cpp.start; #endif } ev_alter_on_schedule_completion @@ -7642,8 +7642,8 @@ alter: can overwrite it */ Lex->sql_command= SQLCOM_ALTER_EVENT; -#ifdef WITH_WSREP_OUT - /*Lex->stmt_definition_end= (char*)YYLIP->get_cpp_ptr();*/ +#ifdef WITH_WSREP + Lex->stmt_definition_end= (char*)YYLIP->get_cpp_ptr(); #endif } | ALTER TABLESPACE_SYM alter_tablespace_info From d47bc23e0079642b0345095ed5c1e6a32cc8290f Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 10 Oct 2017 23:39:48 +0300 Subject: [PATCH 295/305] MW-416 Replicating DDL after ACL check, 5.6 version Re-implemented the fix for MW-416 according to 5.7 version --- mysql-test/suite/galera/r/MW-416.result | 114 ++++++++++++++++++++ mysql-test/suite/galera/t/MW-416.test | 132 ++++++++++++++++++++++++ sql/events.cc | 15 +++ sql/sql_parse.cc | 9 +- sql/sql_plugin.cc | 8 ++ sql/sql_trigger.cc | 5 + sql/sql_view.cc | 5 + 7 files changed, 280 insertions(+), 8 deletions(-) create mode 100644 mysql-test/suite/galera/r/MW-416.result create mode 100644 mysql-test/suite/galera/t/MW-416.test diff --git a/mysql-test/suite/galera/r/MW-416.result b/mysql-test/suite/galera/r/MW-416.result new file mode 100644 index 000000000000..05399b213a83 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-416.result @@ -0,0 +1,114 @@ +CREATE USER 'userMW416'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost'; +SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; +Variable_name Value +wsrep_replicated 2 +ALTER DATABASE db CHARACTER SET = utf8; +ERROR 42000: Access denied for user 'userMW416'@'localhost' to database 'db' +ALTER EVENT ev1 RENAME TO ev2; +ERROR 42000: Access denied for user 'userMW416'@'localhost' to database 'test' +ALTER FUNCTION fun1 COMMENT 'foo'; +ERROR 42000: alter routine command denied to user 'userMW416'@'localhost' for routine 'test.fun1' +ALTER LOGFILE GROUP lfg ADD UNDOFILE 'file' ENGINE=InnoDB; +Got one of the listed errors +ALTER PROCEDURE proc1 COMMENT 'foo'; +Got one of the listed errors +ALTER SERVER srv OPTIONS (USER 'sally'); +Got one of the listed errors +ALTER TABLE tbl DROP COLUMN col; +Got one of the listed errors +ALTER TABLESPACE tblspc DROP DATAFILE 'file' ENGINE=innodb; +Got one of the listed errors +ALTER VIEW vw AS SELECT 1; +Got one of the listed errors +CREATE DATABASE db; +Got one of the listed errors +CREATE EVENT ev1 ON SCHEDULE AT CURRENT_TIMESTAMP DO SELECT 1; +Got one of the listed errors +CREATE FUNCTION fun1() RETURNS int RETURN(1); +Got one of the listed errors +CREATE FUNCTION fun1 RETURNS STRING SONAME 'funlib.so'; +Got one of the listed errors +CREATE PROCEDURE proc1() BEGIN END; +Got one of the listed errors +CREATE INDEX idx ON tbl(id); +Got one of the listed errors +CREATE LOGFILE GROUP lfg ADD UNDOFILE 'undofile' ENGINE innodb; +Got one of the listed errors +CREATE SERVER srv FOREIGN DATA WRAPPER 'fdw' OPTIONS (USER 'user'); +Got one of the listed errors +CREATE TABLE t (i int); +Got one of the listed errors +CREATE TABLESPACE tblspc ADD DATAFILE 'file' ENGINE=innodb; +Got one of the listed errors +CREATE TRIGGER trg BEFORE UPDATE ON t FOR EACH ROW BEGIN END; +Got one of the listed errors +CREATE VIEW vw AS SELECT 1; +Got one of the listed errors +DROP DATABASE db; +Got one of the listed errors +DROP EVENT ev; +Got one of the listed errors +DROP FUNCTION fun1; +Got one of the listed errors +DROP INDEX idx ON t0; +Got one of the listed errors +DROP LOGFILE GROUP lfg; +Got one of the listed errors +DROP PROCEDURE proc1; +Got one of the listed errors +DROP SERVEr srv; +Got one of the listed errors +DROP TABLE t0; +Got one of the listed errors +DROP TABLESPACE tblspc; +Got one of the listed errors +DROP TRIGGER trg; +Got one of the listed errors +DROP VIEW vw; +Got one of the listed errors +RENAME TABLE t0 TO t1; +Got one of the listed errors +TRUNCATE TABLE t0; +Got one of the listed errors +ALTER USER myuser PASSWORD EXPIRE; +Got one of the listed errors +CREATE USER myuser IDENTIFIED BY 'pass'; +Got one of the listed errors +DROP USER myuser; +Got one of the listed errors +GRANT ALL ON *.* TO 'myuser'; +Got one of the listed errors +RENAME USER myuser TO mariauser; +Got one of the listed errors +REVOKE SELECT ON test FROM myuser; +Got one of the listed errors +REVOKE ALL, GRANT OPTION FROM myuser; +Got one of the listed errors +REVOKE PROXY ON myuser FROM myuser; +Got one of the listed errors +ANALYZE TABLE db.tbl; +Got one of the listed errors +CHECK TABLE db.tbl; +Got one of the listed errors +CHECKSUM TABLE db.tbl; +Got one of the listed errors +OPTIMIZE TABLE db.tbl; +Got one of the listed errors +REPAIR TABLE db.tbl; +Got one of the listed errors +INSTALL PLUGIN plg SONAME 'plg.so'; +Got one of the listed errors +UNINSTALL PLUGIN plg; +Got one of the listed errors +DROP USER 'userMW416'@'localhost'; +SHOW DATABASES; +Database +information_schema +mtr +mysql +performance_schema +test +SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; +Variable_name Value +wsrep_replicated 3 diff --git a/mysql-test/suite/galera/t/MW-416.test b/mysql-test/suite/galera/t/MW-416.test new file mode 100644 index 000000000000..ebc15438adce --- /dev/null +++ b/mysql-test/suite/galera/t/MW-416.test @@ -0,0 +1,132 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE USER 'userMW416'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost'; + +SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; + +--connect userMW416, localhost, userMW416,, test, $NODE_MYPORT_1 +--connection userMW416 + +# DDL + +--error 1044 +ALTER DATABASE db CHARACTER SET = utf8; +--error 1044 +ALTER EVENT ev1 RENAME TO ev2; +--error 1370 +ALTER FUNCTION fun1 COMMENT 'foo'; +#--error 1044,1227 +#ALTER INSTANCE ROTATE INNODB MASTER KEY; +--error 1044,1227 +ALTER LOGFILE GROUP lfg ADD UNDOFILE 'file' ENGINE=InnoDB; +--error 1044,1227,1370 +ALTER PROCEDURE proc1 COMMENT 'foo'; +--error 1044,1227,1370 +ALTER SERVER srv OPTIONS (USER 'sally'); +--error 1044,1142,1227,1370 +ALTER TABLE tbl DROP COLUMN col; +--error 1044,1227,1370 +ALTER TABLESPACE tblspc DROP DATAFILE 'file' ENGINE=innodb; +--error 1044,1142,1227,1370 +ALTER VIEW vw AS SELECT 1; + +--error 1044,1227,1370 +CREATE DATABASE db; +--error 1044,1227,1370 +CREATE EVENT ev1 ON SCHEDULE AT CURRENT_TIMESTAMP DO SELECT 1; +--error 1044,1227,1370 +CREATE FUNCTION fun1() RETURNS int RETURN(1); +--error 1044,1227,1370 +CREATE FUNCTION fun1 RETURNS STRING SONAME 'funlib.so'; +--error 1044,1227,1370 +CREATE PROCEDURE proc1() BEGIN END; +--error 1044,1142,1227,1370 +CREATE INDEX idx ON tbl(id); +--error 1044,1142,1227,1370 +CREATE LOGFILE GROUP lfg ADD UNDOFILE 'undofile' ENGINE innodb; +--error 1044,1142,1227,1370 +CREATE SERVER srv FOREIGN DATA WRAPPER 'fdw' OPTIONS (USER 'user'); +--error 1044,1142,1227,1370 +CREATE TABLE t (i int); +--error 1044,1142,1227,1370 +CREATE TABLESPACE tblspc ADD DATAFILE 'file' ENGINE=innodb; +--error 1044,1142,1227,1370 +CREATE TRIGGER trg BEFORE UPDATE ON t FOR EACH ROW BEGIN END; +--error 1044,1142,1227,1370 +CREATE VIEW vw AS SELECT 1; + + + +--error 1044,1142,1227,1370 +DROP DATABASE db; +--error 1044,1142,1227,1370 +DROP EVENT ev; +--error 1044,1142,1227,1370 +DROP FUNCTION fun1; +--error 1044,1142,1227,1370 +DROP INDEX idx ON t0; +--error 1044,1142,1227,1370 +DROP LOGFILE GROUP lfg; +--error 1044,1142,1227,1370 +DROP PROCEDURE proc1; +--error 1044,1142,1227,1370 +DROP SERVEr srv; +--error 1044,1142,1227,1370 +DROP TABLE t0; +--error 1044,1142,1227,1370 +DROP TABLESPACE tblspc; +--error 1044,1142,1227,1360,1370 +DROP TRIGGER trg; +--error 1044,1142,1227,1370 +DROP VIEW vw; + +--error 1044,1142,1227,1370 +RENAME TABLE t0 TO t1; + +--error 1044,1142,1227,1370 +TRUNCATE TABLE t0; + +# DCL + +# account management +--error 1044,1142,1227,1370 +ALTER USER myuser PASSWORD EXPIRE; +--error 1044,1142,1227,1370 +CREATE USER myuser IDENTIFIED BY 'pass'; +--error 1044,1142,1227,1370 +DROP USER myuser; +--error 1044,1045,1142,1227,1370 +GRANT ALL ON *.* TO 'myuser'; +--error 1044,1142,1227,1370 +RENAME USER myuser TO mariauser; +--error 1044,1142,1227,1370 +REVOKE SELECT ON test FROM myuser; +--error 1044,1142,1227,1370,1698 +REVOKE ALL, GRANT OPTION FROM myuser; +--error 1044,1142,1227,1370,1698 +REVOKE PROXY ON myuser FROM myuser; + +# table maintenance +--error 1044,1142,1227,1370 +ANALYZE TABLE db.tbl; +--error 1044,1142,1227,1370 +CHECK TABLE db.tbl; +--error 1044,1142,1227,1370 +CHECKSUM TABLE db.tbl; +--error 1044,1142,1227,1370 +OPTIMIZE TABLE db.tbl; +--error 1044,1142,1227,1370 +REPAIR TABLE db.tbl; + +# plugin and user defined functions +--error 1044,1142,1227,1370 +INSTALL PLUGIN plg SONAME 'plg.so'; +--error 1044,1142,1227,1370 +UNINSTALL PLUGIN plg; + +--connection node_1 +DROP USER 'userMW416'@'localhost'; +SHOW DATABASES; +SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; diff --git a/sql/events.cc b/sql/events.cc index cb410c5647df..17cea5766c1b 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -326,6 +326,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, if (check_access(thd, EVENT_ACL, parse_data->dbname.str, NULL, NULL, 0, 0)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); if (check_db_dir_existence(parse_data->dbname.str)) { @@ -402,6 +403,10 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, thd->set_current_stmt_binlog_format_row(); DBUG_RETURN(ret); +#ifdef WITH_WSREP + error: + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ } @@ -442,6 +447,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, if (check_access(thd, EVENT_ACL, parse_data->dbname.str, NULL, NULL, 0, 0)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); if (new_dbname) /* It's a rename */ { @@ -517,6 +523,10 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, thd->set_current_stmt_binlog_format_row(); DBUG_RETURN(ret); +#ifdef WITH_WSREP + error: + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ } @@ -556,6 +566,7 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) if (check_access(thd, EVENT_ACL, dbname.str, NULL, NULL, 0, 0)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); /* Turn off row binlogging of this statement and use statement-based so @@ -581,6 +592,10 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) if (save_binlog_row_based) thd->set_current_stmt_binlog_format_row(); DBUG_RETURN(ret); +#ifdef WITH_WSREP + error: + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index be548daa8fdd..967af4dedbfe 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3827,7 +3827,6 @@ case SQLCOM_PREPARE: if (res) break; - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) switch (lex->sql_command) { case SQLCOM_CREATE_EVENT: { @@ -3863,7 +3862,6 @@ case SQLCOM_PREPARE: lex->spname->m_name); break; case SQLCOM_DROP_EVENT: - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (!(res= Events::drop_event(thd, lex->spname->m_db, lex->spname->m_name, lex->drop_if_exists))) @@ -4767,7 +4765,6 @@ case SQLCOM_PREPARE: Note: SQLCOM_CREATE_VIEW also handles 'ALTER VIEW' commands as specified through the thd->lex->create_view_mode flag. */ - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_create_view(thd, first_table, thd->lex->create_view_mode); break; } @@ -4783,7 +4780,6 @@ case SQLCOM_PREPARE: case SQLCOM_CREATE_TRIGGER: { /* Conditionally writes to binlog. */ - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_create_or_drop_trigger(thd, all_tables, 1); break; @@ -4791,7 +4787,6 @@ case SQLCOM_PREPARE: case SQLCOM_DROP_TRIGGER: { /* Conditionally writes to binlog. */ - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_create_or_drop_trigger(thd, all_tables, 0); break; } @@ -4854,14 +4849,12 @@ case SQLCOM_PREPARE: my_ok(thd); break; case SQLCOM_INSTALL_PLUGIN: - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (! (res= mysql_install_plugin(thd, &thd->lex->comment, &thd->lex->ident))) my_ok(thd); break; case SQLCOM_UNINSTALL_PLUGIN: - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) - if (! (res= mysql_uninstall_plugin(thd, &thd->lex->comment))) + if (! (res= mysql_uninstall_plugin(thd, &thd->lex->comment))) my_ok(thd); break; case SQLCOM_BINLOG_BASE64_EVENT: diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 358d03ddc7c8..09dd5b6b8bb4 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1786,6 +1786,7 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl tables.init_one_table("mysql", 5, "plugin", 6, "plugin", TL_WRITE); if (check_table_access(thd, INSERT_ACL, &tables, FALSE, 1, FALSE)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); /* need to open before acquiring LOCK_plugin or it will deadlock */ if (! (table = open_ltable(thd, &tables, TL_WRITE, @@ -1873,6 +1874,9 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl reap_plugins(); err: mysql_mutex_unlock(&LOCK_plugin); +#ifdef WITH_WSREP + error: +#endif /* WITH_WSREP */ DBUG_RETURN(TRUE); } @@ -1894,6 +1898,7 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) if (check_table_access(thd, DELETE_ACL, &tables, FALSE, 1, FALSE)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); /* need to open before acquiring LOCK_plugin or it will deadlock */ if (! (table= open_ltable(thd, &tables, TL_WRITE, MYSQL_LOCK_IGNORE_TIMEOUT))) @@ -2028,6 +2033,9 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) DBUG_RETURN(FALSE); err: mysql_mutex_unlock(&LOCK_plugin); +#ifdef WITH_WSREP + error: +#endif /* WITH_WSREP */ DBUG_RETURN(TRUE); } diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index a79f358c994f..36d1b5beec59 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -501,6 +501,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) if (err_status) goto end; } + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); /* We should have only one table in table list. */ DBUG_ASSERT(tables->next_global == 0); @@ -604,6 +605,10 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) my_ok(thd); DBUG_RETURN(result); +#ifdef WITH_WSREP + error: + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ } diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 18eb03da866a..53bf5e5f5b2c 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -431,6 +431,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, if ((res= create_view_precheck(thd, tables, view, mode))) goto err; + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); lex->link_first_table_back(view, link_to_local); view->open_type= OT_BASE_ONLY; @@ -716,6 +717,10 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, lex->link_first_table_back(view, link_to_local); DBUG_RETURN(0); +#ifdef WITH_WSREP + error: + res= TRUE; +#endif /* WITH_WSREP */ err: thd_proc_info(thd, "end"); lex->link_first_table_back(view, link_to_local); From 4a2b794211d08af2a50460f8b6ee2d70c22f9589 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 10 Oct 2017 23:39:48 +0300 Subject: [PATCH 296/305] MW-416 Replicating DDL after ACL check --- sql/event_data_objects.cc | 34 +++++++++++++++++++++++----------- sql/events.cc | 15 +++++++++++++++ sql/sql_parse.cc | 9 +-------- sql/sql_plugin.cc | 8 ++++++++ sql/sql_trigger.cc | 5 +++++ sql/sql_view.cc | 5 +++++ 6 files changed, 57 insertions(+), 19 deletions(-) diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index da43c227e1cb..bdc3962d9e3e 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1469,23 +1469,35 @@ Event_job_data::execute(THD *thd, bool drop) thd->security_ctx->master_access |= SUPER_ACL; #ifdef WITH_WSREP - if (WSREP(thd)) { - // sql_print_information("sizeof(LEX) = %d", sizeof(struct LEX)); - // sizeof(LEX) = 4512, so it's relatively safe to allocate it on stack. - LEX lex; - lex.sql_command = SQLCOM_DROP_EVENT; - LEX* saved = thd->lex; - thd->lex = &lex; - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); - thd->lex = saved; + /* + This code is processing event execution and does not have client + connection. Here, event execution will now execute a prepared + DROP EVENT statement, but thd->lex->sql_command is set to + SQLCOM_CREATE_PROCEDURE + DROP EVENT will be logged in binlog, and we have to + replicate it to make all nodes have consistent event definitions + Wsrep DDL replication is triggered inside Events::drop_event(), + and here we need to prepare the THD so that DDL replication is + possible, essentially it requires setting sql_command to + SQLCOMM_DROP_EVENT, we will switch sql_command for the duration + of DDL replication only. + */ + const enum_sql_command sql_command_save= thd->lex->sql_command; + const bool sql_command_set= WSREP(thd); + if (WSREP(thd)) + { + thd->lex->sql_command = SQLCOM_DROP_EVENT; } #endif ret= Events::drop_event(thd, dbname, name, FALSE); #ifdef WITH_WSREP - WSREP_TO_ISOLATION_END; - error: + if (sql_command_set) + { + WSREP_TO_ISOLATION_END; + thd->lex->sql_command = sql_command_save; + } #endif thd->security_ctx->master_access= saved_master_access; } diff --git a/sql/events.cc b/sql/events.cc index cb410c5647df..17cea5766c1b 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -326,6 +326,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, if (check_access(thd, EVENT_ACL, parse_data->dbname.str, NULL, NULL, 0, 0)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); if (check_db_dir_existence(parse_data->dbname.str)) { @@ -402,6 +403,10 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, thd->set_current_stmt_binlog_format_row(); DBUG_RETURN(ret); +#ifdef WITH_WSREP + error: + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ } @@ -442,6 +447,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, if (check_access(thd, EVENT_ACL, parse_data->dbname.str, NULL, NULL, 0, 0)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); if (new_dbname) /* It's a rename */ { @@ -517,6 +523,10 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, thd->set_current_stmt_binlog_format_row(); DBUG_RETURN(ret); +#ifdef WITH_WSREP + error: + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ } @@ -556,6 +566,7 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) if (check_access(thd, EVENT_ACL, dbname.str, NULL, NULL, 0, 0)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); /* Turn off row binlogging of this statement and use statement-based so @@ -581,6 +592,10 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) if (save_binlog_row_based) thd->set_current_stmt_binlog_format_row(); DBUG_RETURN(ret); +#ifdef WITH_WSREP + error: + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index be548daa8fdd..967af4dedbfe 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3827,7 +3827,6 @@ case SQLCOM_PREPARE: if (res) break; - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) switch (lex->sql_command) { case SQLCOM_CREATE_EVENT: { @@ -3863,7 +3862,6 @@ case SQLCOM_PREPARE: lex->spname->m_name); break; case SQLCOM_DROP_EVENT: - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (!(res= Events::drop_event(thd, lex->spname->m_db, lex->spname->m_name, lex->drop_if_exists))) @@ -4767,7 +4765,6 @@ case SQLCOM_PREPARE: Note: SQLCOM_CREATE_VIEW also handles 'ALTER VIEW' commands as specified through the thd->lex->create_view_mode flag. */ - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_create_view(thd, first_table, thd->lex->create_view_mode); break; } @@ -4783,7 +4780,6 @@ case SQLCOM_PREPARE: case SQLCOM_CREATE_TRIGGER: { /* Conditionally writes to binlog. */ - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_create_or_drop_trigger(thd, all_tables, 1); break; @@ -4791,7 +4787,6 @@ case SQLCOM_PREPARE: case SQLCOM_DROP_TRIGGER: { /* Conditionally writes to binlog. */ - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) res= mysql_create_or_drop_trigger(thd, all_tables, 0); break; } @@ -4854,14 +4849,12 @@ case SQLCOM_PREPARE: my_ok(thd); break; case SQLCOM_INSTALL_PLUGIN: - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) if (! (res= mysql_install_plugin(thd, &thd->lex->comment, &thd->lex->ident))) my_ok(thd); break; case SQLCOM_UNINSTALL_PLUGIN: - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL) - if (! (res= mysql_uninstall_plugin(thd, &thd->lex->comment))) + if (! (res= mysql_uninstall_plugin(thd, &thd->lex->comment))) my_ok(thd); break; case SQLCOM_BINLOG_BASE64_EVENT: diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 358d03ddc7c8..09dd5b6b8bb4 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1786,6 +1786,7 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl tables.init_one_table("mysql", 5, "plugin", 6, "plugin", TL_WRITE); if (check_table_access(thd, INSERT_ACL, &tables, FALSE, 1, FALSE)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); /* need to open before acquiring LOCK_plugin or it will deadlock */ if (! (table = open_ltable(thd, &tables, TL_WRITE, @@ -1873,6 +1874,9 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl reap_plugins(); err: mysql_mutex_unlock(&LOCK_plugin); +#ifdef WITH_WSREP + error: +#endif /* WITH_WSREP */ DBUG_RETURN(TRUE); } @@ -1894,6 +1898,7 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) if (check_table_access(thd, DELETE_ACL, &tables, FALSE, 1, FALSE)) DBUG_RETURN(TRUE); + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); /* need to open before acquiring LOCK_plugin or it will deadlock */ if (! (table= open_ltable(thd, &tables, TL_WRITE, MYSQL_LOCK_IGNORE_TIMEOUT))) @@ -2028,6 +2033,9 @@ bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name) DBUG_RETURN(FALSE); err: mysql_mutex_unlock(&LOCK_plugin); +#ifdef WITH_WSREP + error: +#endif /* WITH_WSREP */ DBUG_RETURN(TRUE); } diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index a79f358c994f..36d1b5beec59 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -501,6 +501,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) if (err_status) goto end; } + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); /* We should have only one table in table list. */ DBUG_ASSERT(tables->next_global == 0); @@ -604,6 +605,10 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) my_ok(thd); DBUG_RETURN(result); +#ifdef WITH_WSREP + error: + DBUG_RETURN(TRUE); +#endif /* WITH_WSREP */ } diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 18eb03da866a..53bf5e5f5b2c 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -431,6 +431,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, if ((res= create_view_precheck(thd, tables, view, mode))) goto err; + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); lex->link_first_table_back(view, link_to_local); view->open_type= OT_BASE_ONLY; @@ -716,6 +717,10 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, lex->link_first_table_back(view, link_to_local); DBUG_RETURN(0); +#ifdef WITH_WSREP + error: + res= TRUE; +#endif /* WITH_WSREP */ err: thd_proc_info(thd, "end"); lex->link_first_table_back(view, link_to_local); From 230f169ff999e87d3318b80ab482c80b2d6d5687 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Wed, 11 Oct 2017 15:35:17 +0300 Subject: [PATCH 297/305] MW-416 Replicate DDL after ACL check CREATE VIEW handling had an issue, because CREATE VIEW replication happened when view was unlinked from table list. This caused debug assert in wsrep_mysqld.cc:wsrep_can_run_in_toi() MySQL 5.5 version does not have this assert, but it is still better to run replication when table list is not manipulated. --- sql/sql_view.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 53bf5e5f5b2c..61e2e15f03f1 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -431,10 +431,10 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, if ((res= create_view_precheck(thd, tables, view, mode))) goto err; - WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); lex->link_first_table_back(view, link_to_local); view->open_type= OT_BASE_ONLY; + WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); if (open_and_lock_tables(thd, lex->query_tables, TRUE, 0)) { From f69050dc30d1f5020de08012afd0ed514f43f43d Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Sun, 8 Oct 2017 22:11:32 +0300 Subject: [PATCH 298/305] Set debian-start to noop according to LP bug 1577712 --- packaging/deb-in/extra/debian-start | 32 ----------------------------- 1 file changed, 32 deletions(-) diff --git a/packaging/deb-in/extra/debian-start b/packaging/deb-in/extra/debian-start index 2ffac877a99b..ca916d098dab 100644 --- a/packaging/deb-in/extra/debian-start +++ b/packaging/deb-in/extra/debian-start @@ -1,33 +1 @@ -#!/bin/bash -# -# This script is executed by "/etc/init.d/mysql" on every (re)start. -# -# Changes to this file will be preserved when updating the Debian package. -# - -source /usr/share/mysql/debian-start.inc.sh - -MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf" -MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" -MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf" -MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf" -MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables" -MYCHECK_PARAMS="--all-databases --fast --silent" -MYCHECK_RCPT="root" - -## Checking for corrupt, not cleanly closed and upgrade needing tables. - -# The following commands should be run when the server is up but in background -# where they do not block the server start and in one shell instance so that -# they run sequentially. They are supposed not to echo anything to stdout. -# If you want to disable the check for crashed tables comment -# "check_for_crashed_tables" out. -# (There may be no output to stdout inside the background process!) - -( - upgrade_system_tables_if_necessary; - check_root_accounts; - check_for_crashed_tables; -) >&2 & - exit 0 From aaf96dc7d64f4412ee8c15af756210d36f479ea2 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Fri, 29 Sep 2017 14:19:27 +0300 Subject: [PATCH 299/305] MW-356 FK parent reference lock timeout causes debug assert * Break from row_upd_sec_index_entry() in case of an error to avoid triggering the assert that follows, similarly to original MySQL code * Convert DB_LOCK_WAIT to DB_LOCK_WAIT_TIMEOUT to prevent a retry that would succeed. --- mysql-test/suite/galera/r/MW-356.result | 12 ++++++++++++ mysql-test/suite/galera/t/MW-356.test | 25 +++++++++++++++++++++++++ storage/innobase/row/row0upd.cc | 7 +++++++ 3 files changed, 44 insertions(+) create mode 100644 mysql-test/suite/galera/r/MW-356.result create mode 100644 mysql-test/suite/galera/t/MW-356.test diff --git a/mysql-test/suite/galera/r/MW-356.result b/mysql-test/suite/galera/r/MW-356.result new file mode 100644 index 000000000000..683710a21a2f --- /dev/null +++ b/mysql-test/suite/galera/r/MW-356.result @@ -0,0 +1,12 @@ +SET GLOBAL innodb_lock_wait_timeout = 1; +CREATE TABLE p (i INT PRIMARY KEY, j INT) ENGINE=INNODB; +INSERT INTO p VALUES (1, 0), (2, 0); +CREATE TABLE c (i INT PRIMARY KEY, j INT, f INT, FOREIGN KEY(f) REFERENCES p(i)) ENGINE=INNODB; +INSERT INTO c VALUES (1, 0, 1); +BEGIN; +UPDATE p SET j = 1 WHERE i = 1; +UPDATE c SET f = 2 WHERE i = 1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +COMMIT; +DROP TABLE c, p; +SET GLOBAL innodb_lock_wait_timeout = default; diff --git a/mysql-test/suite/galera/t/MW-356.test b/mysql-test/suite/galera/t/MW-356.test new file mode 100644 index 000000000000..9b531c1540e2 --- /dev/null +++ b/mysql-test/suite/galera/t/MW-356.test @@ -0,0 +1,25 @@ +-- source include/galera_cluster.inc +-- source include/have_innodb.inc + +-- connection node_1 +SET GLOBAL innodb_lock_wait_timeout = 1; +CREATE TABLE p (i INT PRIMARY KEY, j INT) ENGINE=INNODB; +INSERT INTO p VALUES (1, 0), (2, 0); + +CREATE TABLE c (i INT PRIMARY KEY, j INT, f INT, FOREIGN KEY(f) REFERENCES p(i)) ENGINE=INNODB; +INSERT INTO c VALUES (1, 0, 1); + +BEGIN; +UPDATE p SET j = 1 WHERE i = 1; + +-- connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +# This causes a crash if the bug exists +-- error ER_LOCK_WAIT_TIMEOUT +UPDATE c SET f = 2 WHERE i = 1; + +-- connection node_1 +COMMIT; + +DROP TABLE c, p; + +SET GLOBAL innodb_lock_wait_timeout = default; diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index adc1d1c03170..a793ccb7fa53 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -2466,6 +2466,9 @@ row_upd_sec_index_entry( << " table " << index->table->name; } break; + case DB_LOCK_WAIT: + err = DB_LOCK_WAIT_TIMEOUT; + break; default: ib::error() << "WSREP: referenced FK check fail: " << ut_strerr(err) << " index " << index->name @@ -2473,6 +2476,10 @@ row_upd_sec_index_entry( break; } } + + if (err != DB_SUCCESS) { + break; + } #endif /* WITH_WSREP */ } From 561bace0edea709393653e9dfed1c1dcd40326ff Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Mon, 23 Oct 2017 20:25:00 +0300 Subject: [PATCH 300/305] Update mtr tests results wrt deprecation of query cache --- mysql-test/suite/galera/r/galera_flush.result | 2 ++ mysql-test/suite/galera/r/galera_flush_local.result | 4 ++++ mysql-test/suite/galera/r/galera_query_cache.result | 2 ++ mysql-test/suite/galera/r/galera_query_cache_sync_wait.result | 2 ++ mysql-test/suite/galera/r/mysql-wsrep#201.result | 4 ++++ 5 files changed, 14 insertions(+) diff --git a/mysql-test/suite/galera/r/galera_flush.result b/mysql-test/suite/galera/r/galera_flush.result index b1aeefd92805..93fec67aa6e8 100644 --- a/mysql-test/suite/galera/r/galera_flush.result +++ b/mysql-test/suite/galera/r/galera_flush.result @@ -11,6 +11,8 @@ DELETE FROM mysql.user WHERE user = 'user1'; SET GLOBAL wsrep_replicate_myisam = FALSE; FLUSH PRIVILEGES; FLUSH QUERY CACHE; +Warnings: +Warning 1681 'FLUSH QUERY CACHE' is deprecated and will be removed in a future release. wsrep_last_committed_diff 1 FLUSH STATUS; diff --git a/mysql-test/suite/galera/r/galera_flush_local.result b/mysql-test/suite/galera/r/galera_flush_local.result index da66a55e4ce3..d7c65b5577bb 100644 --- a/mysql-test/suite/galera/r/galera_flush_local.result +++ b/mysql-test/suite/galera/r/galera_flush_local.result @@ -11,6 +11,8 @@ INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); FLUSH LOCAL DES_KEY_FILE; FLUSH LOCAL HOSTS; FLUSH LOCAL QUERY CACHE; +Warnings: +Warning 1681 'FLUSH QUERY CACHE' is deprecated and will be removed in a future release. FLUSH LOCAL STATUS; FLUSH LOCAL PRIVILEGES; FLUSH LOCAL USER_RESOURCES; @@ -79,6 +81,8 @@ set wsrep_on=0; FLUSH DES_KEY_FILE; FLUSH HOSTS; FLUSH QUERY CACHE; +Warnings: +Warning 1681 'FLUSH QUERY CACHE' is deprecated and will be removed in a future release. FLUSH STATUS; FLUSH PRIVILEGES; FLUSH USER_RESOURCES; diff --git a/mysql-test/suite/galera/r/galera_query_cache.result b/mysql-test/suite/galera/r/galera_query_cache.result index 20a7e20d561c..4005cac5dfcf 100644 --- a/mysql-test/suite/galera/r/galera_query_cache.result +++ b/mysql-test/suite/galera/r/galera_query_cache.result @@ -1,6 +1,8 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); RESET QUERY CACHE; +Warnings: +Warning 1681 'RESET QUERY CACHE' is deprecated and will be removed in a future release. FLUSH STATUS; SELECT COUNT(*) FROM t1; COUNT(*) diff --git a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result index e5b116e71d75..4e546f4ba34c 100644 --- a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result +++ b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result @@ -11,6 +11,8 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; FLUSH QUERY CACHE; +Warnings: +Warning 1681 'FLUSH QUERY CACHE' is deprecated and will be removed in a future release. SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; INSERT INTO t1 VALUES (3); SELECT MAX(id) FROM t1; diff --git a/mysql-test/suite/galera/r/mysql-wsrep#201.result b/mysql-test/suite/galera/r/mysql-wsrep#201.result index 34d184d8ec1c..ab7a2286e5c9 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#201.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#201.result @@ -1,3 +1,7 @@ CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; INSERT INTO t1 VALUES (DEFAULT); SET GLOBAL query_cache_size=1355776; +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. +Warnings: +Warning 1287 '@@query_cache_size' is deprecated and will be removed in a future release. From 6bc8560de6ee4fde1418eff84975908ae16a9b18 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 24 Oct 2017 09:23:15 +0300 Subject: [PATCH 301/305] Update rpl_operation_ignore_super_read_only.result due to extra wsrep variable --- .../suite/rpl/r/rpl_operation_ignore_super_read_only.result | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/suite/rpl/r/rpl_operation_ignore_super_read_only.result b/mysql-test/suite/rpl/r/rpl_operation_ignore_super_read_only.result index 2d787bd88dd7..0f974f001710 100644 --- a/mysql-test/suite/rpl/r/rpl_operation_ignore_super_read_only.result +++ b/mysql-test/suite/rpl/r/rpl_operation_ignore_super_read_only.result @@ -16,6 +16,7 @@ SET AUTOCOMMIT= ON; SHOW VARIABLES like '%autocommit%'; Variable_name Value autocommit ON +wsrep_retry_autocommit 1 #################################################################### # Test Case1: STOP SLAVE command #################################################################### @@ -82,6 +83,7 @@ SET AUTOCOMMIT= OFF; SHOW VARIABLES like '%autocommit%'; Variable_name Value autocommit OFF +wsrep_retry_autocommit 1 #################################################################### # Test Case1: STOP SLAVE command #################################################################### From 72f0bcae5e343acad5e365e7e5850dba6b616121 Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Tue, 24 Oct 2017 12:20:11 +0300 Subject: [PATCH 302/305] Fix deb packaging mess due to upstream release vs debug merge --- packaging/deb-in/CMakeLists.txt | 22 +----------- packaging/deb-in/changelog.in | 36 ++++++++++++++++--- ...sql-packagesource-server-SERIES.install.in | 1 - packaging/deb-in/rules.in | 21 +++++------ 4 files changed, 42 insertions(+), 38 deletions(-) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index a75348386737..aa14eb424251 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -40,15 +40,6 @@ ENDIF() SET (DEB_BASE_VERSION "${DEB_BASE_VERSION}-${WSREP_VERSION}") -# Timestamp for use in debian/changelog -IF (NOT DEFINED DEB_CHANGELOG_TIMESTAMP) - execute_process( - COMMAND date --rfc-2822 - OUTPUT_VARIABLE DEB_CHANGELOG_TIMESTAMP - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - SET (DEB_CHANGELOG_TIMESTAMP ${DEB_CHANGELOG_TIMESTAMP} CACHE STRING "") -ENDIF() # Commercial or community IF (DEB_PRODUCT STREQUAL "commercial") message (FATAL_ERROR "mysql-wsrep is GPL only, no commercial builds") @@ -78,11 +69,6 @@ usr/lib/mysql/plugin/authentication_pam.so usr/lib/mysql/plugin/openssl_udf.so usr/lib/mysql/plugin/thread_pool.so usr/lib/mysql/plugin/firewall.so -") - - # Add debug versions of commercial plugins, if enabled - if (DEFINED DEB_WITH_DEBUG) - SET (DEB_INSTALL_SERVER_PLUGINS "${DEB_INSTALL_SERVER_PLUGINS} usr/lib/mysql/plugin/debug/audit_log.so usr/lib/mysql/plugin/debug/authentication_pam.so usr/lib/mysql/plugin/debug/keyring_okv.so @@ -90,8 +76,6 @@ usr/lib/mysql/plugin/debug/openssl_udf.so usr/lib/mysql/plugin/debug/thread_pool.so usr/lib/mysql/plugin/debug/firewall.so ") - ENDIF() - SET (DEB_REMOVEPATTERN "gpl.in") ELSE() SET (DEB_PRODUCT "${DEB_BASE_PRODUCT}community") @@ -295,11 +279,7 @@ ELSE() RETURN() ENDIF() - -if (DEFINED DEB_WITH_DEBUG) - INCLUDE(deb_debug.cmake) -ENDIF() -# All files are configured and copied to the debian/ directory, which is used +# All files are configured and copied to the debian/ directory, which is used # by debuild to make the packages # 5.7.11 builds out-of-source. Hack: have duplicate debian/ SET (DEB_ROOT ${CMAKE_SOURCE_DIR}/packaging/deb-in) diff --git a/packaging/deb-in/changelog.in b/packaging/deb-in/changelog.in index 748408175ef8..a22d9da5657b 100644 --- a/packaging/deb-in/changelog.in +++ b/packaging/deb-in/changelog.in @@ -13,10 +13,38 @@ mysql-@DEB_PRODUCTNAME@@DEB_PRODUCTSERIES@ (@DEB_SERVERVERSION@@DEB_PLATFORMRELE mysql-@DEB_PRODUCTNAME@ (@DEB_SERVERVERSION@@DEB_PLATFORMRELEASE@) @DEB_CODENAME@; urgency=low - * New Release. For release notes, please refer to - https://dev.mysql.com/doc/relnotes/mysql/@MYSQL_BASE_VERSION@/en/news-@MAJOR_VERSION@-@MINOR_VERSION@-@PATCH_VERSION@.html - - -- MySQL Release Engineering @DEB_CHANGELOG_TIMESTAMP@ + [ Akhil Mohan ] + * new upstream release + * Added new libtest_* plugins to source/include-binaries, mysql-*-test.install + * added new plugin to source/include-binaries, mysql-*-test.install + libtest_framework + libtest_services + libtest_services_threaded + locking_service + test_security_context + version_token + * added support for MECAB in + d/{control,rules,mysql-*-server.install,source/include-binaries} + (Closes: #20315007) + * added automatic setup of ssl certs in + d/mysql-*-server.mysql.init + d/extra/mysql-systemd-start + (Closes: #20650118) + * removed pkg mysql-*-bench; sqlbench will not be packaged + (Closes: #21303289) + * removed cleanup statement for client lib symlinks *_r in d/rules + (Closes: #21311067) + + [ Balasubramanian Kandasamy ] + * Added mysqlpump man page to d/mysql-*-client.install + * Added new decompression utilities lz4_decompress and zlib_decompress + binaries. + * Added mysqlx plugin + + [ Lars Tangvald ] + * Added keyring directory and plugin + + -- Balasubramanian Kandasamy Wed, 26 Aug 2015 15:20:12 +0530 mysql-@DEB_PRODUCTNAME@ (5.7.7-rc-3ubuntu15.04) vivid; urgency=low diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in index 1020a54b02d8..75a63c82f3a9 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -83,7 +83,6 @@ usr/share/man/man1/replace.1 usr/share/man/man1/resolveip.1 usr/share/man/man1/resolve_stack_dump.1 usr/share/man/man8/mysqld.8 -@DEB_INSTALL_DEBUG_SERVER@ # confguration files usr/share/mysql/my-default.cnf debian/extra/mysql.cnf etc/mysql/ diff --git a/packaging/deb-in/rules.in b/packaging/deb-in/rules.in index aef0a471bf6b..09dffea0bf97 100644 --- a/packaging/deb-in/rules.in +++ b/packaging/deb-in/rules.in @@ -28,11 +28,7 @@ export CXXFLAGS= override_dh_auto_configure: @echo "RULES.$@" - - @DEB_RULES_DEBUG_CMAKE@ - - mkdir release && cd release && \ - cmake .. \ + cmake . \ -DBUILD_CONFIG=mysql_release \ $(CMAKE_SYSTEMD_OPTIONS) \ -DWITH_WSREP=1 \ @@ -59,13 +55,10 @@ override_dh_auto_configure: -DINSTALL_LAYOUT=DEB \ -DDEB_PRODUCT=@DEB_PRODUCT@ \ @DEB_CMAKE_EXTRAS@ - touch $@ override_dh_auto_build: @echo "RULES.$@" - @DEB_RULES_DEBUG_MAKE@ - cd release && \ $(MAKE) -j8 VERBOSE=1 touch $@ @@ -77,13 +70,17 @@ override_dh_auto_install: @echo "RULES.$@" # complete install first - cd release && \ - $(MAKE) install DESTDIR=../debian/tmp - @DEB_RULES_DEBUG_EXTRA@ + $(MAKE) install DESTDIR=debian/tmp # remove all redundant files - rm debian/tmp/usr/lib/*/*_r* + rm debian/tmp/usr/lib/mysql-test/cmake_install.cmake + rm debian/tmp/usr/lib/mysql-test/CTestTestfile.cmake + rm debian/tmp/usr/lib/mysql-test/Makefile # add missing man pages # install -g root -o root -m 0644 debian/extra/mysql_embedded.1 debian/tmp/usr/share/man/man1 + # add MySQL Server debug binary and library to package + # install -g root -o root -m 0755 debian/extra/server-binary debian/tmp/usr/sbin/mysqld-debug + # install -g root -o root -m 0755 debian/extra/embedded-server debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libmysqld-debug.a + # add debug plugin libraries to package install -m 0644 support-files/wsrep.cnf debian/tmp/usr/share/mysql # SysV init stuff, or Systemd files ? On Debian 8, we need both! #ifneq (,$(findstring SYSV,@DEB_STARTUP@)) From 4c0f503a8f242447086bc694cf27c21a67a427bf Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Tue, 24 Oct 2017 12:21:57 +0300 Subject: [PATCH 303/305] Fix deb packaging mess due to upstream release vs debug merge --- packaging/deb-in/CMakeLists.txt | 23 ------------ packaging/deb-in/changelog.in | 36 ++++++++++++++++--- packaging/deb-in/extra/debian-start | 32 +++++++++++++++++ ...sql-packagesource-server-SERIES.install.in | 1 - ...mysql-packagesource-test-SERIES.install.in | 36 +++++++++++++++++-- packaging/deb-in/rules.in | 17 ++++----- 6 files changed, 104 insertions(+), 41 deletions(-) diff --git a/packaging/deb-in/CMakeLists.txt b/packaging/deb-in/CMakeLists.txt index 5598bf3b5b86..d58a7386f0e1 100644 --- a/packaging/deb-in/CMakeLists.txt +++ b/packaging/deb-in/CMakeLists.txt @@ -40,15 +40,6 @@ ENDIF() SET (DEB_BASE_VERSION "${DEB_BASE_VERSION}-${WSREP_VERSION}") -# Timestamp for use in debian/changelog -IF (NOT DEFINED DEB_CHANGELOG_TIMESTAMP) - execute_process( - COMMAND date --rfc-2822 - OUTPUT_VARIABLE DEB_CHANGELOG_TIMESTAMP - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - SET (DEB_CHANGELOG_TIMESTAMP ${DEB_CHANGELOG_TIMESTAMP} CACHE STRING "") -ENDIF() # Commercial or community IF (DEB_PRODUCT STREQUAL "commercial") message (FATAL_ERROR "mysql-wsrep is GPL only, no commercial builds") @@ -82,10 +73,6 @@ usr/lib/mysql/plugin/keyring_okv.so usr/lib/mysql/plugin/openssl_udf.so usr/lib/mysql/plugin/thread_pool.so usr/lib/mysql/plugin/firewall.so -") - # Add debug versions of commercial plugins, if enabled - IF (DEFINED DEB_WITH_DEBUG) - SET (DEB_INSTALL_SERVER_PLUGINS "${DEB_INSTALL_SERVER_PLUGINS} usr/lib/mysql/plugin/debug/audit_log.so usr/lib/mysql/plugin/debug/authentication_pam.so usr/lib/mysql/plugin/debug/authentication_ldap_sasl.so @@ -95,8 +82,6 @@ usr/lib/mysql/plugin/debug/openssl_udf.so usr/lib/mysql/plugin/debug/thread_pool.so usr/lib/mysql/plugin/debug/firewall.so ") - ENDIF() - IF (DEB_AWS_SDK) SET (DEB_CMAKE_EXTRAS "${DEB_CMAKE_EXTRAS} -DWITH_AWS_SDK=${DEB_AWS_SDK} -DDEB_AWS_SDK=${DEB_AWS_SDK}") SET (DEB_INCLUDE_BINARIES_EXTRA "${DEB_INCLUDE_BINARIES_EXTRA} @@ -104,14 +89,9 @@ debian/extra/keyring_aws-plugin ") SET (DEB_INSTALL_SERVER_PLUGINS "${DEB_INSTALL_SERVER_PLUGINS} usr/lib/mysql/plugin/keyring_aws.so -") - IF (DEFINED DEB_WITH_DEBUG) - SET (DEB_INSTALL_SERVER_PLUGINS "${DEB_INSTALL_SERVER_PLUGINS} usr/lib/mysql/plugin/debug/keyring_aws.so ") - ENDIF() ENDIF() - IF (WITH_CURL) SET (DEB_CMAKE_EXTRAS "${DEB_CMAKE_EXTRAS} -DWITH_CURL=${WITH_CURL}") ENDIF() @@ -342,9 +322,6 @@ ENDIF() IF (DEFINED WITH_NDBCLUSTER_STORAGE_ENGINE) INCLUDE(deb_ndb.cmake) ENDIF() -if (DEFINED DEB_WITH_DEBUG) - INCLUDE(deb_debug.cmake) -ENDIF() # All files are configured and copied to the debian/ directory, which is used # by debuild to make the packages # 5.7.11 builds out-of-source. Hack: have duplicate debian/ diff --git a/packaging/deb-in/changelog.in b/packaging/deb-in/changelog.in index 5642682a7584..c2e93ecb5936 100644 --- a/packaging/deb-in/changelog.in +++ b/packaging/deb-in/changelog.in @@ -10,10 +10,38 @@ mysql-@DEB_PRODUCTNAME@@DEB_PRODUCTSERIES@ (@DEB_SERVERVERSION@@DEB_PLATFORMRELE mysql-@DEB_PRODUCTNAME@ (@DEB_SERVERVERSION@@DEB_PLATFORMRELEASE@) @DEB_CODENAME@; urgency=low - * New Release. For release notes, please refer to - https://dev.mysql.com/doc/relnotes/mysql/@MYSQL_BASE_VERSION@/en/news-@MAJOR_VERSION@-@MINOR_VERSION@-@PATCH_VERSION@.html - - -- MySQL Release Engineering @DEB_CHANGELOG_TIMESTAMP@ + [ Akhil Mohan ] + * new upstream release + * Added new libtest_* plugins to source/include-binaries, mysql-*-test.install + * added new plugin to source/include-binaries, mysql-*-test.install + libtest_framework + libtest_services + libtest_services_threaded + locking_service + test_security_context + version_token + * added support for MECAB in + d/{control,rules,mysql-*-server.install,source/include-binaries} + (Closes: #20315007) + * added automatic setup of ssl certs in + d/mysql-*-server.mysql.init + d/extra/mysql-systemd-start + (Closes: #20650118) + * removed pkg mysql-*-bench; sqlbench will not be packaged + (Closes: #21303289) + * removed cleanup statement for client lib symlinks *_r in d/rules + (Closes: #21311067) + + [ Balasubramanian Kandasamy ] + * Added mysqlpump man page to d/mysql-*-client.install + * Added new decompression utilities lz4_decompress and zlib_decompress + binaries. + * Added mysqlx plugin + + [ Lars Tangvald ] + * Added keyring directory and plugin + + -- Balasubramanian Kandasamy Wed, 26 Aug 2015 15:20:12 +0530 mysql-@DEB_PRODUCTNAME@ (5.7.7-rc-3ubuntu15.04) vivid; urgency=low diff --git a/packaging/deb-in/extra/debian-start b/packaging/deb-in/extra/debian-start index ca916d098dab..2ffac877a99b 100644 --- a/packaging/deb-in/extra/debian-start +++ b/packaging/deb-in/extra/debian-start @@ -1 +1,33 @@ +#!/bin/bash +# +# This script is executed by "/etc/init.d/mysql" on every (re)start. +# +# Changes to this file will be preserved when updating the Debian package. +# + +source /usr/share/mysql/debian-start.inc.sh + +MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf" +MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" +MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf" +MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf" +MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables" +MYCHECK_PARAMS="--all-databases --fast --silent" +MYCHECK_RCPT="root" + +## Checking for corrupt, not cleanly closed and upgrade needing tables. + +# The following commands should be run when the server is up but in background +# where they do not block the server start and in one shell instance so that +# they run sequentially. They are supposed not to echo anything to stdout. +# If you want to disable the check for crashed tables comment +# "check_for_crashed_tables" out. +# (There may be no output to stdout inside the background process!) + +( + upgrade_system_tables_if_necessary; + check_root_accounts; + check_for_crashed_tables; +) >&2 & + exit 0 diff --git a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in index 62c1445499c7..58475b68abbd 100644 --- a/packaging/deb-in/mysql-packagesource-server-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-server-SERIES.install.in @@ -90,7 +90,6 @@ usr/share/man/man1/resolveip.1 usr/share/man/man1/resolve_stack_dump.1 usr/share/man/man1/zlib_decompress.1 usr/share/man/man8/mysqld.8 -@DEB_INSTALL_DEBUG_SERVER@ # confguration files debian/extra/mysql.cnf etc/mysql/ debian/extra/mysqld.cnf /etc/mysql/mysql.conf.d/ diff --git a/packaging/deb-in/mysql-packagesource-test-SERIES.install.in b/packaging/deb-in/mysql-packagesource-test-SERIES.install.in index 1693359a6409..185ff8903110 100644 --- a/packaging/deb-in/mysql-packagesource-test-SERIES.install.in +++ b/packaging/deb-in/mysql-packagesource-test-SERIES.install.in @@ -1,4 +1,4 @@ -# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. # # 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 @@ -57,7 +57,39 @@ usr/lib/mysql/plugin/replication_observers_example_plugin.so usr/lib/mysql/plugin/rewrite_example.so usr/lib/mysql/plugin/test_security_context.so usr/lib/mysql/plugin/test_udf_services.so -# @DEB_INSTALL_DEBUG_TEST_PLUGINS@ +# usr/lib/mysql/plugin/debug/auth.so +# usr/lib/mysql/plugin/debug/auth_test_plugin.so +# usr/lib/mysql/plugin/debug/daemon_example.ini +# usr/lib/mysql/plugin/debug/ha_example.so +# usr/lib/mysql/plugin/debug/libdaemon_example.so +# usr/lib/mysql/plugin/debug/libtest_framework.so +# usr/lib/mysql/plugin/debug/libtest_services.so +# usr/lib/mysql/plugin/debug/libtest_services_threaded.so +# usr/lib/mysql/plugin/debug/libtest_session_detach.so +# usr/lib/mysql/plugin/debug/libtest_session_info.so +# usr/lib/mysql/plugin/debug/libtest_session_in_thd.so +# usr/lib/mysql/plugin/debug/libtest_sql_2_sessions.so +# usr/lib/mysql/plugin/debug/libtest_sql_all_col_types.so +# usr/lib/mysql/plugin/debug/libtest_sql_cmds_1.so +# usr/lib/mysql/plugin/debug/libtest_sql_commit.so +# usr/lib/mysql/plugin/debug/libtest_sql_complex.so +# usr/lib/mysql/plugin/debug/libtest_sql_errors.so +# usr/lib/mysql/plugin/debug/libtest_sql_lock.so +# usr/lib/mysql/plugin/debug/libtest_sql_processlist.so +# usr/lib/mysql/plugin/debug/libtest_sql_replication.so +# usr/lib/mysql/plugin/debug/libtest_sql_shutdown.so +# usr/lib/mysql/plugin/debug/libtest_sql_sqlmode.so +# usr/lib/mysql/plugin/debug/libtest_sql_stored_procedures_functions.so +# usr/lib/mysql/plugin/debug/libtest_sql_views_triggers.so +# usr/lib/mysql/plugin/debug/libtest_x_sessions_deinit.so +# usr/lib/mysql/plugin/debug/libtest_x_sessions_init.so +# usr/lib/mysql/plugin/debug/qa_auth_client.so +# usr/lib/mysql/plugin/debug/qa_auth_interface.so +# usr/lib/mysql/plugin/debug/qa_auth_server.so +# usr/lib/mysql/plugin/debug/replication_observers_example_plugin.so +# usr/lib/mysql/plugin/debug/rewrite_example.so +# usr/lib/mysql/plugin/debug/test_security_context.so +# usr/lib/mysql/plugin/debug/test_udf_services.so # test suite usr/lib/mysql-test/* # legal diff --git a/packaging/deb-in/rules.in b/packaging/deb-in/rules.in index cc87ccc7f417..2b4f8a1609b0 100644 --- a/packaging/deb-in/rules.in +++ b/packaging/deb-in/rules.in @@ -28,11 +28,7 @@ export CXXFLAGS= override_dh_auto_configure: @echo "RULES.$@" - - @DEB_RULES_DEBUG_CMAKE@ - - mkdir release && cd release && \ - cmake .. \ + cmake . \ -DBUILD_CONFIG=mysql_release \ $(CMAKE_SYSTEMD_OPTIONS) \ -DWITH_WSREP=1 \ @@ -59,13 +55,10 @@ override_dh_auto_configure: -DINSTALL_LAYOUT=DEB \ -DDEB_PRODUCT=@DEB_PRODUCT@ \ @DEB_CMAKE_EXTRAS@ - touch $@ override_dh_auto_build: @echo "RULES.$@" - @DEB_RULES_DEBUG_MAKE@ - cd release && \ $(MAKE) -j8 VERBOSE=1 touch $@ @@ -77,9 +70,11 @@ override_dh_auto_install: @echo "RULES.$@" # complete install first - cd release && \ - $(MAKE) install DESTDIR=../debian/tmp - @DEB_RULES_DEBUG_EXTRA@ + $(MAKE) install DESTDIR=debian/tmp + # remove all redundant files + rm debian/tmp/usr/lib/mysql-test/cmake_install.cmake + rm debian/tmp/usr/lib/mysql-test/CTestTestfile.cmake + rm debian/tmp/usr/lib/mysql-test/Makefile # add missing man pages # install -g root -o root -m 0644 debian/extra/mysql_embedded.1 debian/tmp/usr/share/man/man1 # add MySQL Server debug binary and library to package From 96fe3d79678ef8f3475672361b330d278fed744a Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Fri, 29 Sep 2017 11:20:38 +0300 Subject: [PATCH 304/305] Fix a use-after-free bug in THD::~THD() In wsrep_prepare_bf_thd() we could do: thd->rli_slave = thd->wsrep_rli; So THD::rli_slave could in some cases be equal to THD::wsrep_rli. Then in THD::~THD() the code does: release_resources() if (wsrep_rli) { delete wsrep_rli; } ... if (rli_slave) { rli_slave->cleanup_after_session(); <-- oops, the object pointed to by both wsrep_rli and rli_slave has been deleted already } --- sql/sql_class.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index fe1b8861a0bb..f5a3f8e475e4 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -2122,6 +2122,10 @@ void THD::release_resources() delete wsrep_rli->current_mts_submode; wsrep_rli->current_mts_submode = 0; delete wsrep_rli; + if (rli_slave == wsrep_rli) { + rli_slave = NULL; + } + wsrep_rli = NULL; } wsrep_free_status(this); #endif From bccf6ed6892e54d79aedf71a418bc8a8a8d9e081 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Tue, 24 Oct 2017 16:48:08 +0300 Subject: [PATCH 305/305] Set wsrep_rli to NULL after deleting it --- sql/sql_class.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 223bef0faaea..2aec451aad21 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1616,7 +1616,10 @@ THD::~THD() mysql_mutex_unlock(&LOCK_wsrep_thd); mysql_mutex_destroy(&LOCK_wsrep_thd); mysql_cond_destroy(&COND_wsrep_thd); - if (wsrep_rli) delete wsrep_rli; + if (wsrep_rli != NULL) { + delete wsrep_rli; + wsrep_rli = NULL; + } if (wsrep_status_vars) wsrep->stats_free(wsrep, wsrep_status_vars); #endif /* Close connection */